]> OCCT Git - occt.git/commit
0032921: Configuration, CMake - allow selecting C++ standard.
authorddzama <ddzama@opencascade.com>
Wed, 4 May 2022 09:57:51 +0000 (12:57 +0300)
committersmoskvin <smoskvin@opencascade.com>
Tue, 6 Sep 2022 17:06:54 +0000 (20:06 +0300)
commite92d322d4090d9611930bf7cabcc74fa981432b0
tree3cf0ba1d7cf38968a67037773c39830d9f8df95d
parentb71cb85f671f0019067a3e115f1b2acdbc88c585
0032921: Configuration, CMake - allow selecting C++ standard.

Make C++ standard to be enable from cmake settings:

User will be able choosing C++ language standard by selecting cmake variable BUILD_CPP_STANDARD.
For correct working, CMAKE_CXX_STANDARD cmake built-in variable should be available.
To enable CMAKE_CXX_STANDARD, minimum CMAKE version has been updated to 3.1.

Available next standard items:
C++11
C++14
C++17
C++20
C++23

This issue consists from several steps to achive main goal:
1) Configuratiuon, CMake - allow selecting C++ standard.
2) Require minimum CMAKE version 3.1 (for enabling CMAKE_CXX_STANDARD).
3) More flexible CMAKE_CXX_COMPILER_ID identification (fixups previous commit!)
4) Add description of new CMAKE variable `BUILD_CPP_STANDARD` into documentation.
5) Update CMAKE requirements in documentation.
6) Set C++11 standard for several projects.
28 files changed:
CMakeLists.txt
adm/cmake/cotire.cmake
adm/cmake/occt_defs_flags.cmake
adm/cmake/occt_macros.cmake
adm/cmake/occt_toolkit.cmake
dox/build/build_occt/building_occt.md
dox/introduction/introduction.md
samples/glfw/CMakeLists.txt
samples/glfw/adm/cmake/FindOpenCASCADE.cmake
samples/java/jniviewer/app/src/main/jni/CMakeLists.txt
samples/mfc/standard/01_Geometry/CMakeLists.txt
samples/mfc/standard/02_Modeling/CMakeLists.txt
samples/mfc/standard/03_ImportExport/CMakeLists.txt
samples/mfc/standard/04_HLR/CMakeLists.txt
samples/mfc/standard/mfcsample/CMakeLists.txt
samples/webgl/CMakeLists.txt
tools/CMakeLists.txt
tools/TInspectorEXE/CMakeLists.txt
tools/TKDFBrowser/CMakeLists.txt
tools/TKMessageModel/CMakeLists.txt
tools/TKMessageView/CMakeLists.txt
tools/TKShapeView/CMakeLists.txt
tools/TKTInspector/CMakeLists.txt
tools/TKTInspectorAPI/CMakeLists.txt
tools/TKToolsDraw/CMakeLists.txt
tools/TKTreeModel/CMakeLists.txt
tools/TKVInspector/CMakeLists.txt
tools/TKView/CMakeLists.txt