c++11: enable c++11 compliance unconditionally.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson
2016-10-20 14:21:03 -06:00
parent dd3e5290b2
commit 94cd7f185f
2 changed files with 12 additions and 33 deletions

View File

@ -179,22 +179,6 @@ macro(upm_swig_node)
endif()
endif()
if (NOT ENABLECXX11)
set_property (TARGET jsupm_${libname} PROPERTY CXX_STANDARD 11)
set_property (TARGET jsupm_${libname} PROPERTY CXX_STANDARD_REQUIRED ON)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
message (FATAL_ERROR "FATAL_ERROR: GNU gcc compiler is also too old (need 4.7+, but ${CMAKE_CXX_COMPILER_VERSION}) and does not support C++11 standard.")
endif ()
set (UPM_CXX11_WORKAROUND_OPTION "-std=gnu++11")
else ()
set (UPM_CXX11_WORKAROUND_OPTION "-std=c++11")
endif ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${UPM_CXX11_WORKAROUND_OPTION} ")
endif ()
endif ()
endif()
createpackagejson(${libname})