소스 검색

Remove obsolete C++11 flag from C++ module examples (#5057)

Co-authored-by: Hugo Locurcio <[email protected]>
Adam Trhoň 4 년 전
부모
커밋
37c0a3e5ef
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 2
      development/cpp/binding_to_external_libraries.rst
  2. 0 1
      development/cpp/custom_modules_in_cpp.rst

+ 5 - 2
development/cpp/binding_to_external_libraries.rst

@@ -190,8 +190,11 @@ Example `SCsub` with custom flags:
 
 
     env_tts = env.Clone()
     env_tts = env.Clone()
     env_tts.add_source_files(env.modules_sources, "*.cpp")
     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:
 The final module should look like this:
 
 

+ 0 - 1
development/cpp/custom_modules_in_cpp.rst

@@ -402,7 +402,6 @@ using the `ARGUMENT` command:
 
 
     module_env = env.Clone()
     module_env = env.Clone()
     module_env.Append(CCFLAGS=['-O2'])
     module_env.Append(CCFLAGS=['-O2'])
-    module_env.Append(CXXFLAGS=['-std=c++11'])
 
 
     if ARGUMENTS.get('summator_shared', 'no') == 'yes':
     if ARGUMENTS.get('summator_shared', 'no') == 'yes':
         # Shared lib compilation
         # Shared lib compilation