mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-15 17:02:14 +03:00
WIP: Refactor CMake build system to more modular
This commit is contained in:
19
cmake/compiler.cmake
Normal file
19
cmake/compiler.cmake
Normal file
@@ -0,0 +1,19 @@
|
||||
# determine compiler
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_COMPILER_IS_CLANG TRUE)
|
||||
set(CLANGCXX_MINVER "5")
|
||||
message(STATUS "clang++ version ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANGCXX_MINVER)
|
||||
message(FATAL_ERROR "A minimum of clang++ ${CLANGCXX_MINVER} is required for C++17 support")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# compiler version checks TODO: test more compilers
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(GNUCXX_MINVER "9")
|
||||
message(STATUS "g++ version ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS GNUCXX_MINVER)
|
||||
message(FATAL_ERROR "A minimum of g++ ${GNUCXX_MINVER} is required for C++17 support")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user