Enable C++11 if possible.

This commit is contained in:
Victor Zverovich 2013-09-07 13:04:45 -07:00
parent 8e37936c77
commit 3937644a8d

View File

@ -10,6 +10,10 @@ endif ()
project(FORMAT) project(FORMAT)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-std=c++11 HAVE_STD_CPP11_FLAG)
add_definitions(-std=c++11)
add_library(format format.cc) add_library(format format.cc)
if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_COMPILER_IS_GNUCXX)
set_target_properties(format PROPERTIES COMPILE_FLAGS set_target_properties(format PROPERTIES COMPILE_FLAGS