This is regarding the build of a project by new compiler that I have configured in cmake toolchain file. For new compiler, I have configured CMAKE_CXX_COMPILER and CMAKE_CXX_COMPILER_ID.
Also, for c++17 feature I have set below 2 variable.
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
I have requested for C++17 features through CMakeLists.txt from our project by stmt “set(CMAKE_CXX_STANDARD 17)”. But Compiler flags to enable C++17, such as std=c++17, are not specified at compile time, C++17 source file cannot be compiled.
I have looked for CXX_FLAGS in flags.make of our project but “-std=c++17” in not added here by “Unix Makefiles” Generator.
I have to ask below query related to add new compiler in cmake tool chain file -
-
If we add any new compiler in cmake toolchain file that is not listed in cmake source code whether CMAKE_CXX_STANDARD variable will be supported to enable language feature, or we have to list new compiler in cmake source code.
-
Whether something is missing in cmake tool chain file so CMAKE_CXX_STANDARD might not work.