mirror of https://github.com/CGAL/cgal
CGAL depends on threads-support... for all compilers!
This commit is contained in:
parent
4296d0c37f
commit
f9444fa85d
|
|
@ -102,6 +102,16 @@ function(CGAL_setup_CGAL_dependencies target)
|
|||
target_include_directories(${target} INTERFACE
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
|
||||
# Make CGAL depend on threads-support (for Epeck and Epeck_d)
|
||||
if(CGAL_HAS_NO_THREADS)
|
||||
target_compile_definitions(${target} INTERFACE CGAL_HAS_NO_THREADS)
|
||||
else()
|
||||
if(NOT TARGET Threads::Threads)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
target_link_libraries(${target} INTERFACE Threads::Threads)
|
||||
endif()
|
||||
|
||||
# Now setup compilation flags
|
||||
if(MSVC)
|
||||
target_compile_options(${target} INTERFACE
|
||||
|
|
@ -144,14 +154,6 @@ function(CGAL_setup_CGAL_dependencies target)
|
|||
if ( RUNNING_CGAL_AUTO_TEST )
|
||||
target_compile_options(${target} INTERFACE "-Wall")
|
||||
endif()
|
||||
if(CGAL_HAS_NO_THREADS)
|
||||
target_compile_definitions(${target} INTERFACE CGAL_HAS_NO_THREADS)
|
||||
else()
|
||||
if(NOT TARGET Threads::Threads)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
target_link_libraries(${target} INTERFACE Threads::Threads)
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3)
|
||||
message( STATUS "Using gcc version 4 or later. Adding -frounding-math" )
|
||||
if(CMAKE_VERSION VERSION_LESS 3.3)
|
||||
|
|
|
|||
Loading…
Reference in New Issue