Draft: Use configure_file to generate compiler script
Summary
- The compiler script is now based on a template file
cmake/scripts/compiler.sh.in
- It is generated using
configure_file()
command of cmake - The cmake variables
CMAKE_CXX_FLAGS
andCMAKE_CXX_COMPILER
are not touched anymore - Filtering flags happens inside of the compiler script not by modifying the cmake environment
- The output of the compiler script can be activated using the
VERBOSE
flag - Instead of setting the compiler, this MR uses the
CMAKE_CXX_COMPILER_LAUNCHER
technique, i.e., the original compiler is forwarded to the script as first argument and the originalCMAKE_CXX_COMPILER
variable does not need to be touched.
Edited by Simon Praetorius