diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2019-11-27 23:44:58 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2019-12-05 19:25:36 (GMT) |
commit | 6f48c59257e7baec2acd89015dde136931a72c7c (patch) | |
tree | 6e22fecb074b29d2d643ed1a349d0d217f667a63 /Modules/CMakeCXXInformation.cmake | |
parent | 7046a5219893436cbe19b6973ac13fb489199601 (diff) | |
download | CMake-6f48c59257e7baec2acd89015dde136931a72c7c.zip CMake-6f48c59257e7baec2acd89015dde136931a72c7c.tar.gz CMake-6f48c59257e7baec2acd89015dde136931a72c7c.tar.bz2 |
launcher: support setting a compiler launcher through the environment
This makes it much easier to use a launcher for all CMake projects in an
environment rather than having to remember to pass the setting to every
CMake build.
Diffstat (limited to 'Modules/CMakeCXXInformation.cmake')
-rw-r--r-- | Modules/CMakeCXXInformation.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index a896b99..da7440a 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -207,6 +207,11 @@ if(CMAKE_CXX_STANDARD_LIBRARIES_INIT) mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES) endif() +if(NOT CMAKE_CXX_COMPILER_LAUNCHER AND DEFINED ENV{CMAKE_CXX_COMPILER_LAUNCHER}) + set(CMAKE_CXX_COMPILER_LAUNCHER "$ENV{CMAKE_CXX_COMPILER_LAUNCHER}" + CACHE STRING "Compiler launcher for CXX.") +endif() + include(CMakeCommonLanguageInclude) # now define the following rules: |