Default to C++11
This commit is contained in:
parent
fc6d032d7f
commit
23f343fa15
@ -53,6 +53,8 @@ set(EXE_NAME babelstream)
|
|||||||
|
|
||||||
# select default build type
|
# select default build type
|
||||||
set(CMAKE_BUILD_TYPE "Release")
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
|
# for chrono and some basic CXX features, models can overwrite this if required
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
if (NOT CMAKE_BUILD_TYPE)
|
||||||
message("No CMAKE_BUILD_TYPE specified, defaulting to 'Release'")
|
message("No CMAKE_BUILD_TYPE specified, defaulting to 'Release'")
|
||||||
|
|||||||
@ -17,6 +17,7 @@ set(KOKKOS_FLAGS_CPU_INTEL -qopt-streaming-stores=always)
|
|||||||
|
|
||||||
macro(setup)
|
macro(setup)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
cmake_policy(SET CMP0074 NEW) #see https://github.com/kokkos/kokkos/blob/master/BUILD.md
|
cmake_policy(SET CMP0074 NEW) #see https://github.com/kokkos/kokkos/blob/master/BUILD.md
|
||||||
|
|
||||||
message(STATUS "Building using in-tree Kokkos source at `${KOKKOS_IN_TREE}`")
|
message(STATUS "Building using in-tree Kokkos source at `${KOKKOS_IN_TREE}`")
|
||||||
|
|||||||
@ -10,6 +10,7 @@ macro(setup)
|
|||||||
# C++ 2a is too new, disable CMake's std flags completely:
|
# C++ 2a is too new, disable CMake's std flags completely:
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
|
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
|
||||||
|
unset(CMAKE_CXX_STANDARD) # drop any existing standard we have set by default
|
||||||
# and append our own:
|
# and append our own:
|
||||||
register_append_cxx_flags(ANY -std=c++2a)
|
register_append_cxx_flags(ANY -std=c++2a)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user