Skip to content

Commit b9a9262

Browse files
committed
Added C++0x/C++11 compiler flags, where appropriate.
1 parent d4ebe01 commit b9a9262

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

CMakeLists.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
2525
CHECK_CXX_COMPILER_FLAG(-std=c++0x HAVE_STD0X)
2626
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_STD11)
2727

28-
if (NOT HAVE_STD0X)
29-
if (NOT HAVE_STD11)
30-
message(FATAL_ERROR "No advanced standard C++ support (-std=c++0x and -std=c++11 not defined).")
31-
endif()
28+
if (HAVE_STD11)
29+
set(CMAKE_CXX_FLAGS -std=c++11)
30+
elseif (HAVE_STD0X)
31+
set(CMAKE_CXX_FLAGS -std=c++0x)
32+
else()
33+
message(FATAL_ERROR "No advanced standard C++ support (-std=c++0x and -std=c++11 not defined).")
3234
endif()
3335
endif()
3436

0 commit comments

Comments
 (0)