From 32715207cc51aea71ad3f05aa79eb9e1b5c910a6 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Sat, 3 Oct 2020 00:30:19 +0200 Subject: [PATCH] More s/c++11/c++14/. --- FindSimGrid.cmake | 2 +- docs/source/Installing_SimGrid.rst | 2 +- docs/source/Start_Your_Own_Project.rst | 4 ++-- sonar-project.properties | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FindSimGrid.cmake b/FindSimGrid.cmake index 1b1817689e..ba64ec59dd 100644 --- a/FindSimGrid.cmake +++ b/FindSimGrid.cmake @@ -119,7 +119,7 @@ if (SimGrid_FOUND AND NOT CMAKE_VERSION VERSION_LESS 2.8.12) ) # We need C++14, so check for it just in case the user removed it since compiling SimGrid if (NOT CMAKE_VERSION VERSION_LESS 3.8) - # 3.8+ allows us to simply require C++11 (or higher) + # 3.8+ allows us to simply require C++14 (or higher) set_property(TARGET SimGrid::SimGrid PROPERTY INTERFACE_COMPILE_FEATURES cxx_std_14) elseif (NOT CMAKE_VERSION VERSION_LESS 3.1) # 3.1+ is similar but for certain features. We pick just one diff --git a/docs/source/Installing_SimGrid.rst b/docs/source/Installing_SimGrid.rst index 47c344749e..0081350565 100644 --- a/docs/source/Installing_SimGrid.rst +++ b/docs/source/Installing_SimGrid.rst @@ -97,7 +97,7 @@ Getting the Dependencies ^^^^^^^^^^^^^^^^^^^^^^^^ C++ compiler (either g++, clang, or icc). - We use the C++11 standard, and older compilers tend to fail on + We use the C++14 standard, and older compilers tend to fail on us. It seems that g++ 5.0 or higher is required nowadays (because of boost). SimGrid compiles well with `clang` or `icc` too. Python 3. diff --git a/docs/source/Start_Your_Own_Project.rst b/docs/source/Start_Your_Own_Project.rst index d24eea4304..5325abeb7c 100644 --- a/docs/source/Start_Your_Own_Project.rst +++ b/docs/source/Start_Your_Own_Project.rst @@ -32,7 +32,7 @@ your project. It builds two simulators from a given set of source files. cmake_minimum_required(VERSION 2.8.8) project(MyFirstSimulator) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") find_package(SimGrid REQUIRED) @@ -121,7 +121,7 @@ Develop in C++ with Eclipse If you wish to develop your plugin or modify SimGrid using Eclipse. You have to run cmake and import it as a Makefile project. -Next you have to activate C++11 in your build settings, add -std=c++11 +Next you have to activate C++14 in your build settings, add -std=c++14 in the CDT GCC Built-in compiler settings. .. image:: /img/eclipseScreenShot.png diff --git a/sonar-project.properties b/sonar-project.properties index e6e7f492ea..a5683eae03 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -70,7 +70,7 @@ sonar.issue.ignore.multicriteria.c3.ruleKey=c:PPMacroName sonar.issue.ignore.multicriteria.c3.resourceKey=include/smpi/smpi_extended_traces.h # Concise syntax should be used for concatenatable namespaces -# This is C++17, and we still support C++11 +# This is C++17, and we still support C++14 sonar.issue.ignore.multicriteria.c4.ruleKey=cpp:S5812 sonar.issue.ignore.multicriteria.c4.resourceKey=**/* -- 2.20.1