Skip to content

Commit 84c9d3c

Browse files
authored
Merge pull request #26 from arcaneframework/dev/sdc-update-from-svn-commits
Update from svn commits (Rocky9 + dlopen for Windows and alien libs)
2 parents 994cdb9 + d5c0881 commit 84c9d3c

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

tools/LoadOSFeatures.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ else()
3333
elseif(${REDHAT_RELEASE} MATCHES "release 8.")
3434
set(RHEL_TAG RHEL8)
3535
loadMeta(NAME rhel8)
36+
elseif(${REDHAT_RELEASE} MATCHES "release 9.")
37+
set(RHEL_TAG RHEL9)
38+
loadMeta(NAME rhel9)
3639
else()
3740
logFatalError("Cannot identify current RedHat release")
3841
endif()

tools/commands/user/commit.cmake

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@ function(__commit_executable target)
9191

9292
# cibles internes (compilées par le projet et déclarées via createLibrary)
9393
get_property(BUILTIN GLOBAL PROPERTY BUILDSYSTEM_BUILTIN_LIBRARIES)
94-
94+
if(WIN32)
95+
get_target_property(DLOPEN ${target} NEED_DLOPEN)
96+
endif()
97+
9598
set(libraries_whole_archive)
96-
99+
97100
foreach(library ${libraries})
98-
99101
# check
100102
if(NOT TARGET ${library})
101103
logFatalError("undefined library ${library} linked with ${target}")
@@ -116,7 +118,11 @@ function(__commit_executable target)
116118
else()
117119
target_link_libraries(${target} PUBLIC ${library})
118120
endif()
119-
else()
121+
elseif(${library} IN_LIST DLOPEN AND WIN32)
122+
# pour le chargement dynamique
123+
set_property(TARGET ${target} APPEND PROPERTY DYNAMIC_LIBRARIES ${library})
124+
target_link_libraries(${target} PUBLIC ${library})
125+
else()
120126
target_link_libraries(${target} PUBLIC ${library})
121127
endif()
122128

tools/commands/user/linkLibraries.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,18 @@ function(linkLibraries target)
99

1010
# ajouts des libraries
1111
set_property(TARGET ${target} APPEND PROPERTY BUILDSYSTEM_LIBRARIES ${ARGN})
12+
endfunction()
13+
14+
function(linkDynLibraries target)
15+
16+
# commit ?
17+
get_target_property(committed ${target} BUILDSYSTEM_COMMITTED)
1218

19+
if(${committed})
20+
logFatalError("target ${target} is already committed, can't link libraries")
21+
endif()
22+
23+
# ajouts des libraries
24+
set_property(TARGET ${target} APPEND PROPERTY BUILDSYSTEM_LIBRARIES ${ARGN})
25+
set_property(TARGET ${target} APPEND PROPERTY NEED_DLOPEN ${ARGN})
1326
endfunction()

0 commit comments

Comments
 (0)