diff --git a/recipes/cgal/all/conanfile.py b/recipes/cgal/all/conanfile.py index 68460d558b139..aa8c4dbd42d8a 100644 --- a/recipes/cgal/all/conanfile.py +++ b/recipes/cgal/all/conanfile.py @@ -135,10 +135,18 @@ def _create_cmake_module_variables(self, module_file): endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) - if(WIN32) - target_compile_options(${target} INTERFACE "/fp:strict") + if(CMAKE_VERSION VERSION_LESS 3.3) + if(WIN32) + target_compile_options(${target} INTERFACE "/fp:strict") + else() + target_compile_options(${target} INTERFACE "-fp-model=strict") + endif() else() - target_compile_options(${target} INTERFACE "-fp-model" "strict") + if(WIN32) + target_compile_options(${target} INTERFACE "$<$:/fp:strict>") + else() + target_compile_options(${target} INTERFACE "$<$:-fp-model=strict>") + endif() endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") message( STATUS "Using SunPro compiler, using STLPort 4." )