diff options
author | Ben Clayton <bclayton@google.com> | 2020-01-17 18:20:58 +0000 |
---|---|---|
committer | dan sinclair <dsinclair@google.com> | 2020-01-17 13:20:57 -0500 |
commit | 9221e1f7f337bffa87c972dcd16b17f083ae5665 (patch) | |
tree | bbdb15e6337c81f8acfcd3ec61504384551ee94c /CMakeLists.txt | |
parent | 42eda81eba7e6ca9d0ddd500931eeb53e6c495c5 (diff) | |
download | amber-9221e1f7f337bffa87c972dcd16b17f083ae5665.tar.gz |
Roll SwiftShader forward (#768)
Repoint SwiftShader to 2cb1db08.
Update CMake build flags after a renaming spree.
SwiftShader has also moved to C++14, so set `CMAKE_CXX_STANDARD` to 14
when `AMBER_ENABLE_SWIFTSHADER` is enabled. Also use GCC 7, which can
correctly compile C++14.
Fixes: #763
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 24c0c58..1c75148 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,11 +28,6 @@ enable_testing() set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) set(CMAKE_POSITION_INDEPENDENT_CODE ON) -if (${AMBER_USE_CLSPV}) - set(CMAKE_CXX_STANDARD 14) -else() - set(CMAKE_CXX_STANDARD 11) -endif() include(CheckIncludeFile) include(GNUInstallDirs) @@ -53,6 +48,12 @@ option(AMBER_USE_CLSPV "Build with Clspv support" OFF) option(AMBER_ENABLE_SWIFTSHADER "Build using SwiftShader" ${AMBER_ENABLE_SWIFTSHADER}) +if (${AMBER_USE_CLSPV} OR ${AMBER_ENABLE_SWIFTSHADER}) + set(CMAKE_CXX_STANDARD 14) +else() + set(CMAKE_CXX_STANDARD 11) +endif() + if(WIN32) # On Windows, CMake by default compiles with the shared CRT. # Default it to the static CRT. |