initial commit for new repo
This commit is contained in:
12
dev/conan-project/cmake/functions.cmake
Normal file
12
dev/conan-project/cmake/functions.cmake
Normal file
@@ -0,0 +1,12 @@
|
||||
INCLUDE(CheckCXXCompilerFlag)
|
||||
|
||||
function(enable_cxx_compiler_flag_if_supported flag)
|
||||
string(FIND "${CMAKE_CXX_FLAGS}" "${flag}" flag_already_set)
|
||||
if(flag_already_set EQUAL -1)
|
||||
check_cxx_compiler_flag("${flag}" flag_supported)
|
||||
if(flag_supported)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
|
||||
endif()
|
||||
unset(flag_supported CACHE)
|
||||
endif()
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user