Commit c90557f8 authored by Davis King's avatar Davis King

Made this script work with clang

parent 565d9293
......@@ -29,6 +29,14 @@ if (CMAKE_VERSION VERSION_LESS "3.1")
add_global_compiler_switch("-std=gnu++0x")
set(COMPILER_CAN_DO_CPP_11 1)
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
execute_process( COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string )
string (REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION ${clang_full_version_string})
if (CLANG_VERSION VERSION_GREATER 3.1)
message(STATUS "C++11 activated.")
add_global_compiler_switch("-std=c++11")
set(COMPILER_CAN_DO_CPP_11 1)
endif()
endif()
else()
# Set a flag if the compiler you are using is capable of providing C++11 features.
......
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