From e0ca56bd67ff7444da9c62ec078bce1c0d123387 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Wed, 11 May 2016 13:33:01 +0100 Subject: [PATCH] Set the C++11 flag when using the Cray compiler --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd8988d..dbf8c64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,13 @@ set(gpu-stream_VERSION_MINOR 0) configure_file(common.h.in common.h) +# If using the Cray compiler, manually add the C++11 flag because setting the +# standard through CMake as above doesn't set this flag with Cray +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Cray") + list(APPEND CMAKE_CXX_FLAGS -hstd=c++11) +endif() + + find_package(CUDA 7.0 QUIET) set(FLAG True) if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")