[mapguide-commits] r9515 - sandbox/jng/v4

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed May 29 03:58:08 PDT 2019


Author: jng
Date: 2019-05-29 03:58:08 -0700 (Wed, 29 May 2019)
New Revision: 9515

Modified:
   sandbox/jng/v4/CMakeLists.txt
Log:
RFC 172: Activate C++11 mode

Modified: sandbox/jng/v4/CMakeLists.txt
===================================================================
--- sandbox/jng/v4/CMakeLists.txt	2019-05-27 15:29:07 UTC (rev 9514)
+++ sandbox/jng/v4/CMakeLists.txt	2019-05-29 10:58:08 UTC (rev 9515)
@@ -202,7 +202,18 @@
     execute_process(COMMAND ln -sf ${target} ${CMAKE_CURRENT_BINARY_DIR}/${linkname})
     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${linkname} DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${component})
 endmacro(install_symlink)
+macro(use_cxx11)
+  if (CMAKE_VERSION VERSION_LESS "3.1")
+    if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+      set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+    endif ()
+  else ()
+    set (CMAKE_CXX_STANDARD 11)
+  endif ()
+endmacro(use_cxx11)
 
+use_cxx11()
+
 # See if Xerces typedefs XMLCh to char16_t
 # This would be the case on Ubuntu 18.04 for its version of xerces-c (3.2.0)
 check_cxx_source_compiles(



More information about the mapguide-commits mailing list