Add -std=c++11 flag only if supported by compiler.

This commit is contained in:
Victor Zverovich 2013-09-07 14:54:26 -07:00
parent 3937644a8d
commit 54c3ed92b6

View File

@ -12,7 +12,9 @@ project(FORMAT)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-std=c++11 HAVE_STD_CPP11_FLAG)
add_definitions(-std=c++11)
if (HAVE_STD_CPP11_FLAG)
add_definitions(-std=c++11)
endif ()
add_library(format format.cc)
if (CMAKE_COMPILER_IS_GNUCXX)