check compiler version
This commit is contained in:
parent
ee58f2ab39
commit
2010b61006
1 changed files with 11 additions and 2 deletions
|
@ -1,8 +1,17 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
|
||||
project(multi_array)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14 -g -Wpedantic -Ofast -march=native -faligned-new -funroll-loops -fopenmp -ftemplate-backtrace-limit=0")
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0)
|
||||
message(FATAL_ERROR "require gcc version >= 7.0")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "compiler ${CMAKE_CXX_COMPILER_ID} officially not supported")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14 -Wpedantic -Ofast -march=native -faligned-new -funroll-loops -fopenmp")
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14 -g -Wpedantic -Ofast -march=native -faligned-new -funroll-loops -fopenmp -ftemplate-backtrace-limit=0")
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14 -g -Wpedantic -O0 -march=native -faligned-new -funroll-loops -fopenmp")
|
||||
|
||||
enable_testing()
|
||||
|
|
Loading…
Reference in a new issue