Commit 32af7129 authored by GILLES Sebastien's avatar GILLES Sebastien

#1286 CMake: replace a deprecated command.

parent 93570e36
......@@ -4,7 +4,7 @@ include(TestCXXAcceptsFlag)
# add a compiler flag only if it is accepted
macro(add_cxx_compiler_flag _flag)
string(REPLACE "-" "_" _flag_var ${_flag})
check_cxx_accepts_flag("${_flag}" CXX_COMPILER_${_flag_var}_OK)
check_cxx_compiler_flag("${_flag}" CXX_COMPILER_${_flag_var}_OK)
if(CXX_COMPILER_${_flag_var}_OK)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flag}")
......@@ -14,7 +14,7 @@ endmacro()
macro(add_c_compiler_flag _flag)
string(REPLACE "-" "_" _flag_var ${_flag})
check_c_accepts_flag("${_flag}" C_COMPILER_${_flag_var}_OK)
check_c_compiler_flag("${_flag}" C_COMPILER_${_flag_var}_OK)
if(C_COMPILER_${_flag_var}_OK)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flag}")
endif()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment