mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
cmake: get_whole_archive_options macro -> function
This commit is contained in:
parent
a06f598442
commit
90766dcc82
@ -1,10 +1,10 @@
|
|||||||
macro (get_whole_archive_options OUT_VAR)
|
function (get_whole_archive_options OUT_VAR)
|
||||||
# We use --whole-archive because OSG plugins use registration.
|
# We use --whole-archive because OSG plugins use registration.
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
set(${OUT_VAR} -Wl,--whole-archive ${ARGN} -Wl,--no-whole-archive)
|
set(${OUT_VAR} -Wl,--whole-archive ${ARGN} -Wl,--no-whole-archive PARENT_SCOPE)
|
||||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
set(${OUT_VAR} -Wl,-all_load ${ARGN} -Wl,-noall_load)
|
set(${OUT_VAR} -Wl,-all_load ${ARGN} -Wl,-noall_load PARENT_SCOPE)
|
||||||
else ()
|
else ()
|
||||||
message(FATAL_ERROR "get_whole_archive_options not implemented for CMAKE_CXX_COMPILER_ID ${CMAKE_CXX_COMPILER_ID}")
|
message(FATAL_ERROR "get_whole_archive_options not implemented for CMAKE_CXX_COMPILER_ID ${CMAKE_CXX_COMPILER_ID}")
|
||||||
endif()
|
endif()
|
||||||
endmacro (whole_archive_options)
|
endfunction (whole_archive_options)
|
||||||
|
Loading…
Reference in New Issue
Block a user