Commit 60011c94 authored by dugupeiwen's avatar dugupeiwen
Browse files

Compile with C++14

parent 8ec57337
...@@ -36,11 +36,11 @@ enable_language(CXX) ...@@ -36,11 +36,11 @@ enable_language(CXX)
# CMAKE 3.1.0+ has CXX_STANDARD etc, not present by default on older linux # CMAKE 3.1.0+ has CXX_STANDARD etc, not present by default on older linux
# just check the flag is supported (most likely gcc). # just check the flag is supported (most likely gcc).
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(-std=c++11 CXX_HAS_CXX11) CHECK_CXX_COMPILER_FLAG(-std=c++14 CXX_HAS_CXX14)
if(CXX_HAS_CXX11) if(CXX_HAS_CXX14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fno-rtti -Wall -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fno-rtti -Wall -std=c++14")
else() else()
message(FATAL_ERROR "Compiler must support C++11") message(FATAL_ERROR "Compiler must support C++14")
endif() endif()
find_package(LLVM REQUIRED CONFIG) find_package(LLVM REQUIRED CONFIG)
......
...@@ -46,5 +46,5 @@ set_target_properties(rocmlite PROPERTIES ...@@ -46,5 +46,5 @@ set_target_properties(rocmlite PROPERTIES
# Add in test dir # Add in test dir
# add_subdirectory(googletest) # add_subdirectory(googletest)
add_subdirectory(test) # add_subdirectory(test)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment