mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
CMake: Support multiple values for REQUIRES in fairmq_build_option
This commit is contained in:
parent
b9720e5269
commit
ea9ad64664
|
@ -499,7 +499,7 @@ function(build_bundled package bundle)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
macro(fairmq_build_option option description)
|
macro(fairmq_build_option option description)
|
||||||
cmake_parse_arguments(ARGS "" "DEFAULT;REQUIRES" "" ${ARGN})
|
cmake_parse_arguments(ARGS "" "DEFAULT" "REQUIRES" ${ARGN})
|
||||||
|
|
||||||
if(ARGS_DEFAULT)
|
if(ARGS_DEFAULT)
|
||||||
set(__default__ ON)
|
set(__default__ ON)
|
||||||
|
@ -510,13 +510,15 @@ macro(fairmq_build_option option description)
|
||||||
if(ARGS_REQUIRES)
|
if(ARGS_REQUIRES)
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
set(__requires__ ${ARGS_REQUIRES})
|
set(__requires__ ${ARGS_REQUIRES})
|
||||||
string(REGEX REPLACE " +" ";" __requires_condition__ "${__requires__}")
|
foreach(d ${__requires__})
|
||||||
if(${__requires_condition__})
|
string(REGEX REPLACE " +" ";" __requires_condition__ "${d}")
|
||||||
else()
|
if(${__requires_condition__})
|
||||||
if(${option})
|
else()
|
||||||
message(WARNING "Cannot enable build option ${option}, depending options are not set: ${__requires_condition__}.")
|
if(${option})
|
||||||
|
message(WARNING "Cannot enable build option ${option}, depending option is not set: ${__requires_condition__}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endforeach()
|
||||||
else()
|
else()
|
||||||
set(__requires__)
|
set(__requires__)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user