I am using VS Code and the CMake Extension. I have a CMakelists.txt file and two Toolchain files.
- ToolchainFile_Release.cmake
- ToolchainFile_Debug.cmake
Both files have different configurations in the compiler flags (different optimization levels).
When I put the both files in the configureArgs parameter, I don't know, if the extension can differentiate between both files and if the extension know which toolchain file in which case shall take:
"cmake.configureArgs": [
"-DCMAKE_TOOLCHAIN_FILE=\"../ToolchainFile_Debug.cmake\"",
"-DCMAKE_TOOLCHAIN_FILE=\"../ToolchainFile_Release.cmake\""
]
How can I tell the CMake extension to use in debug the ToolchainFile_Debug.cmake and in release, the ToolchainFile_Release.cmake?
In eclipse it is possible to choose between different configurations. So I think in VS Code it is also possible to choose between different configurations.