mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
10 lines
344 B
CMake
10 lines
344 B
CMake
include(CheckCXXCompilerFlag)
|
|
function(sls_add_flag_if_available flag target)
|
|
check_cxx_compiler_flag(${flag} flag_supported)
|
|
if(flag_supported)
|
|
target_compile_options(${target} INTERFACE ${flag})
|
|
message("Adding: ${flag} to ${target}")
|
|
else()
|
|
message("Flag: ${flag} not supported")
|
|
endif()
|
|
endfunction() |