Browse Source

OpenMP required (but still not used) for compilation.

interpolate
Michael Uleysky 2 years ago
parent
commit
fc68616153
  1. 7
      CMakeLists.txt

7
CMakeLists.txt

@ -35,6 +35,13 @@ if(COMPILER_SUPPORTS_CXX20)
else() else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++20 support. Please use a different C++ compiler.") message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++20 support. Please use a different C++ compiler.")
endif() endif()
# OpenMP is required
CHECK_CXX_COMPILER_FLAG(-fopenmp COMPILER_SUPPORTS_OPENMP)
if(COMPILER_SUPPORTS_OPENMP)
set(default_options ${default_options} -fopenmp)
else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no OpenMP support. Please use a different C++ compiler.")
endif()
# Link time optimization check # Link time optimization check
set(CMAKE_REQUIRED_FLAGS -flto) set(CMAKE_REQUIRED_FLAGS -flto)
CHECK_CXX_COMPILER_FLAG(-flto COMPILER_SUPPORTS_FLTO) CHECK_CXX_COMPILER_FLAG(-flto COMPILER_SUPPORTS_FLTO)

Loading…
Cancel
Save