Skip to content

Draft: Use configure_file to generate compiler script

Simon Praetorius requested to merge issue/overwrite-compiler into master

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 and CMAKE_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 original CMAKE_CXX_COMPILER variable does not need to be touched.
Edited by Simon Praetorius

Merge request reports