-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake : add support for RLM protection #1780
Draft
cedricga91
wants to merge
6
commits into
arcaneframework:main
Choose a base branch
from
cedricga91:cmake/add-support-for-rlm-protection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
96fe200
Add support for RLM :
fa9b2a8
CMake : replace PROTECTION_TYPE by PROTECTION_NAE
ab878b4
Update FindRLM.cmake for Windows
545e567
CMAKE RLM Support ; replace PROTECTION_NAME variable by FLEXLM_PROTEC…
a3748c6
Replace ADD_DEFINITIONS(-DARCANE_TEST_) by ADD_DEFINITIONS(-DARCANE_T…
141cd82
Update Copyright
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# | ||
# Find the FLEXLM includes and library (FlexlmAPI) | ||
# | ||
# This module defines | ||
# FLEXLM_INCLUDE_DIR, where to find headers to use RLM (FlexlmAPI) | ||
# FLEXLM_LIBRARIES, the libraries to link against to use RLM (FlexlmAPI) | ||
# FLEXLM_LIBRARY_DIRS, the library path to link against to use RLM (FlexlmAPI) | ||
# FLEXLM_FOUND, if false, do not try to use RLM (FlexlmAPI) | ||
# FLEXLM_PROTECTION_NAME, return the protection name : RLM | ||
|
||
if(NOT RLM_ROOT) | ||
set(RLM_ROOT $ENV{RLM_ROOT}) | ||
endif() | ||
|
||
# Replace \ by / in RLM_ROOT | ||
if(RLM_ROOT) | ||
string(REPLACE "\\" "/" RLM_ROOT ${RLM_ROOT}) | ||
endif() | ||
|
||
# HINTS can be removed when using find_package for FLEXLM | ||
FIND_PATH(FLEXLM_INCLUDE_DIR FlexlmAPI.h HINTS ${RLM_ROOT}/include) | ||
|
||
|
||
SET(FLEXLM_LIBRARY) | ||
SET(FLEXLM_LIBRARY_FAILED) | ||
|
||
IF(WIN32) | ||
FOREACH(WANTED_LIB licenseapi rlm1603) | ||
FIND_LIBRARY(FLEXLM_SUB_LIBRARY_${WANTED_LIB} ${WANTED_LIB} HINTS ${RLM_ROOT}/lib) | ||
MESSAGE(STATUS "Look for RLM lib ${WANTED_LIB} : ${FLEXLM_SUB_LIBRARY_${WANTED_LIB}}") | ||
IF(FLEXLM_SUB_LIBRARY_${WANTED_LIB}) | ||
SET(FLEXLM_LIBRARY ${FLEXLM_LIBRARY} ${FLEXLM_SUB_LIBRARY_${WANTED_LIB}}) | ||
GET_FILENAME_COMPONENT(FLEXLM_SUB_PATHLIB_${WANTED_LIB} ${FLEXLM_SUB_LIBRARY_${WANTED_LIB}} PATH) | ||
LIST(APPEND FLEXLM_LIBRARY_DIRS ${FLEXLM_LIBRARY_DIRS} ${FLEXLM_SUB_PATHLIB_${WANTED_LIB}}) | ||
ELSE(FLEXLM_SUB_LIBRARY_${WANTED_LIB}) | ||
SET(FLEXLM_LIBRARY_FAILED "YES") | ||
ENDIF(FLEXLM_SUB_LIBRARY_${WANTED_LIB}) | ||
ENDFOREACH(WANTED_LIB) | ||
ELSE(WIN32) | ||
FOREACH(WANTED_LIB licenseapi rlm) | ||
FIND_LIBRARY(FLEXLM_SUB_LIBRARY_${WANTED_LIB} ${WANTED_LIB} HINTS ${RLM_ROOT}/lib) | ||
MESSAGE(STATUS "Look for RLM lib ${WANTED_LIB} : ${FLEXLM_SUB_LIBRARY_${WANTED_LIB}}") | ||
IF(FLEXLM_SUB_LIBRARY_${WANTED_LIB}) | ||
GET_FILENAME_COMPONENT(FLEXLM_SUB_NAMELIB_${WANTED_LIB} ${FLEXLM_SUB_LIBRARY_${WANTED_LIB}} NAME_WE) | ||
STRING(REGEX REPLACE "^lib" "" FLEXLM_SUB_NAMELIB_${WANTED_LIB} ${FLEXLM_SUB_NAMELIB_${WANTED_LIB}}) | ||
GET_FILENAME_COMPONENT(FLEXLM_SUB_PATHLIB_${WANTED_LIB} ${FLEXLM_SUB_LIBRARY_${WANTED_LIB}} PATH) | ||
# SET(FLEXLM_LIBRARY ${FLEXLM_LIBRARY} ${FLEXLM_SUB_LIBRARY_${WANTED_LIB}}) | ||
SET(FLEXLM_LIBRARY ${FLEXLM_LIBRARY} ${FLEXLM_SUB_NAMELIB_${WANTED_LIB}}) | ||
LIST(APPEND FLEXLM_LIBRARY_DIRS ${FLEXLM_LIBRARY_DIRS} ${FLEXLM_SUB_PATHLIB_${WANTED_LIB}}) | ||
ELSE(FLEXLM_SUB_LIBRARY_${WANTED_LIB}) | ||
SET(FLEXLM_LIBRARY_FAILED "YES") | ||
ENDIF(FLEXLM_SUB_LIBRARY_${WANTED_LIB}) | ||
ENDFOREACH(WANTED_LIB) | ||
ENDIF(WIN32) | ||
|
||
SET(FLEXLM_FOUND "NO") | ||
IF(FLEXLM_INCLUDE_DIR) | ||
IF(FLEXLM_LIBRARY_FAILED) | ||
# erreur dans une recherche de lib | ||
ELSE(FLEXLM_LIBRARY_FAILED) | ||
SET(FLEXLM_FOUND "YES") | ||
SET(FLEXLM_PROTECTION_NAME "RLM") | ||
# Biblioth�ques syst�mes suppl�mentaires | ||
if(WIN32) | ||
SET(FLEXLM_LIBRARIES ${FLEXLM_LIBRARY}) | ||
else(WIN32) | ||
SET(FLEXLM_LIBRARIES ${FLEXLM_LIBRARY} pthread) | ||
endif(WIN32) | ||
SET(FLEXLM_INCLUDE_DIRS ${FLEXLM_INCLUDE_DIR}) | ||
LIST(REMOVE_DUPLICATES FLEXLM_LIBRARY_DIRS) | ||
ENDIF(FLEXLM_LIBRARY_FAILED) | ||
ENDIF(FLEXLM_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il faudrait déplacer cet ajout de définition dans le cmake de arcane_impl : arcane/src/arcane/impl/CMakeLists.txt et écrire plutôt, dans la section
if (FLEXLM_FOUND)
avec untarget_compile_definition
:target_compile_definition(arcane_impl PUBLIC ARCANE_TEST_RLM)