From 37c0a3e5efbbcad740465efbe4e89350338b5625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Trho=C5=88?= Date: Tue, 29 Jun 2021 19:00:03 +0200 Subject: [PATCH] Remove obsolete C++11 flag from C++ module examples (#5057) Co-authored-by: Hugo Locurcio --- development/cpp/binding_to_external_libraries.rst | 7 +++++-- development/cpp/custom_modules_in_cpp.rst | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/development/cpp/binding_to_external_libraries.rst b/development/cpp/binding_to_external_libraries.rst index 7fbcc2dcc..cb49367ee 100644 --- a/development/cpp/binding_to_external_libraries.rst +++ b/development/cpp/binding_to_external_libraries.rst @@ -190,8 +190,11 @@ Example `SCsub` with custom flags: env_tts = env.Clone() env_tts.add_source_files(env.modules_sources, "*.cpp") - env_tts.Append(CCFLAGS=['-O2']) # Flags for C and C++ code - env_tts.Append(CXXFLAGS=['-std=c++11']) # Flags for C++ code only + # Append CCFLAGS flags for both C and C++ code. + env_tts.Append(CCFLAGS=['-O2']) + # If you need to, you can: + # - Append CFLAGS for C code only. + # - Append CXXFLAGS for C++ code only. The final module should look like this: diff --git a/development/cpp/custom_modules_in_cpp.rst b/development/cpp/custom_modules_in_cpp.rst index dfce62a03..6ba1a5ffb 100644 --- a/development/cpp/custom_modules_in_cpp.rst +++ b/development/cpp/custom_modules_in_cpp.rst @@ -402,7 +402,6 @@ using the `ARGUMENT` command: module_env = env.Clone() module_env.Append(CCFLAGS=['-O2']) - module_env.Append(CXXFLAGS=['-std=c++11']) if ARGUMENTS.get('summator_shared', 'no') == 'yes': # Shared lib compilation