diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index f87ee9dda2a..6590e31f940 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -85,7 +85,7 @@ function(CGAL_setup_CGAL_dependencies target) set(keyword PUBLIC) endif() if(CGAL_DISABLE_GMP) - target_compile_definitions(${target} ${keyword} CGAL_DISABLE_GMP=1) + target_compile_definitions(${target} ${keyword} CGAL_DISABLE_GMP=1) else() use_CGAL_GMP_support(${target} ${keyword}) set(CGAL_USE_GMP TRUE CACHE INTERNAL "CGAL library is configured to use GMP") @@ -95,7 +95,7 @@ function(CGAL_setup_CGAL_dependencies target) if(WITH_LEDA) use_CGAL_LEDA_support(${target} ${keyword}) endif() - + if (NOT CGAL_HEADER_ONLY) target_compile_definitions(${target} ${keyword} CGAL_NOT_HEADER_ONLY=1) endif() @@ -136,6 +136,12 @@ function(CGAL_setup_CGAL_dependencies target) $<$:/bigobj> # Use /bigobj by default ) endif() + elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang") + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.3) + message(STATUS "Apple Clang version ${CMAKE_CXX_COMPILER_VERSION} compiler detected") + message(STATUS "Boost MP is turned off for all Apple Clang versions below 11.0.3!") + target_compile_options(${target} ${keyword} "-DCGAL_DO_NOT_USE_BOOST_MP") + endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") message( STATUS "Using Intel Compiler. Adding -fp-model strict" ) if(WIN32)