|
|
|
@ -35,6 +35,13 @@ if(COMPILER_SUPPORTS_CXX20)
|
|
|
|
|
else() |
|
|
|
|
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++20 support. Please use a different C++ compiler.") |
|
|
|
|
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 |
|
|
|
|
set(CMAKE_REQUIRED_FLAGS -flto) |
|
|
|
|
CHECK_CXX_COMPILER_FLAG(-flto COMPILER_SUPPORTS_FLTO) |
|
|
|
|