mirror of https://github.com/CGAL/cgal
prevent GCC flags propagating to NVCC, fixes #2775
This commit is contained in:
parent
070f661244
commit
de47e36dac
|
|
@ -136,7 +136,11 @@ function(CGAL_setup_CGAL_dependencies target)
|
|||
endif()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3)
|
||||
message( STATUS "Using gcc version 4 or later. Adding -frounding-math" )
|
||||
target_compile_options(${target} ${keyword} "-frounding-math")
|
||||
if(CMAKE_VERSION VERSION_LESS 3.3)
|
||||
target_compile_options(${target} ${keyword} "-frounding-math")
|
||||
else()
|
||||
target_compile_options(${target} ${keyword} "$<$<COMPILE_LANGUAGE:CXX>:-frounding-math>")
|
||||
endif()
|
||||
endif()
|
||||
if ( "${GCC_VERSION}" MATCHES "^4.2" )
|
||||
message( STATUS "Using gcc version 4.2. Adding -fno-strict-aliasing" )
|
||||
|
|
|
|||
Loading…
Reference in New Issue