Mentions légales du service

Skip to content
Snippets Groups Projects

Undef CMAKE8REQUIRED_FLAGS after using it to avoid propagation of parameters

Merged Mathieu Faverge requested to merge hotfix/undef_cmake_variable into master
1 file
+ 6
4
Compare changes
  • Side-by-side
  • Inline
+ 6
4
@@ -34,16 +34,16 @@ foreach(sanitizer ${SANITIZERS} )
@@ -34,16 +34,16 @@ foreach(sanitizer ${SANITIZERS} )
check_c_compiler_flag( "${${sanitizer}_OPTION} ${${sanitizer}_FLAGS}" HAVE_C_${sanitizer} )
check_c_compiler_flag( "${${sanitizer}_OPTION} ${${sanitizer}_FLAGS}" HAVE_C_${sanitizer} )
if ( HAVE_C_${sanitizer} )
if ( HAVE_C_${sanitizer} )
set( CMAKE_C_FLAGS_${sanitizer} "${${sanitizer}_OPTION} ${${sanitizer}_FLAGS}" CACHE STRING
set( CMAKE_C_FLAGS_${sanitizer} "${${sanitizer}_OPTION} ${${sanitizer}_FLAGS}" CACHE STRING
"Flags used by the C compiler during ${sanitizer} builds."
"Flags used by the C compiler during ${sanitizer} builds."
FORCE )
FORCE )
endif()
endif()
endif()
endif()
if ( "CXX" IN_LIST languages )
if ( "CXX" IN_LIST languages )
check_cxx_compiler_flag( "${${sanitizer}_OPTION} ${${sanitizer}_FLAGS}" HAVE_CXX_${sanitizer} )
check_cxx_compiler_flag( "${${sanitizer}_OPTION} ${${sanitizer}_FLAGS}" HAVE_CXX_${sanitizer} )
if ( HAVE_CXX_${sanitizer} )
if ( HAVE_CXX_${sanitizer} )
set( CMAKE_CXX_FLAGS_${sanitizer} "${${sanitizer}_OPTION} ${${sanitizer}_FLAGS}" CACHE STRING
set( CMAKE_CXX_FLAGS_${sanitizer} "${${sanitizer}_OPTION} ${${sanitizer}_FLAGS}" CACHE STRING
"Flags used by the C++ compiler during ${sanitizer} builds."
"Flags used by the C++ compiler during ${sanitizer} builds."
FORCE )
FORCE )
endif()
endif()
endif()
endif()
@@ -81,3 +81,5 @@ foreach(sanitizer ${SANITIZERS} )
@@ -81,3 +81,5 @@ foreach(sanitizer ${SANITIZERS} )
endif()
endif()
endforeach()
endforeach()
 
# Restore CMAKE_REQUIRED_FLAGS
 
set(CMAKE_REQUIRED_FLAGS)
Loading