Skip to content

Add toolchain file usable with multi-config generators

Marco Clemencic requested to merge ide-friendly-main-toolchain into master

When using multi-config generators (or IDEs with CMake support) the CMAKE_BUILD_TYPE must not be managed by the toolchain.

The proposed change introduces a main toolchain.cmake file that requires LCG_VERSION (default to 97a), LCG_SYSTEM (default to x86_64-centos7-gcc9) and either a multi-config generator or CMAKE_BUILD_TYPE (default to FastDebug). This allows pointing the IDE to a fixed toolchain file and chose which configuration to build.

It must be noted that LCG_VERSION and LCG_SYSTEM are only used on the first configuration, and that fixes the LCG baseline platform for subsequent configurations that only change the CMAKE_BUILD_TYPE.

We can also fix the baseline platform using the explicit toolchain files in the LCG_* directories, in which case the LCG_OPTIMIZATION behaves as a hint for the CMAKE_BUILD_TYPE that can be changed (or ignored for multi-config generators).

Merge request reports

Loading