diff options
author | Fred Baksik <fdk17@ftml.net> | 2020-07-15 19:03:45 (GMT) |
---|---|---|
committer | Fred Baksik <fred.baksik@mrcy.com> | 2020-07-23 18:52:48 (GMT) |
commit | 6f1af899db4e93c960145dae12ebaacb308ea1f0 (patch) | |
tree | 83ffcfdd61df3d600ca587c06b551b9903f2b130 /Modules/CMakeDetermineCXXCompiler.cmake | |
parent | ec1d3bc0b64550307c23ceae7ef542124b68e2e5 (diff) | |
download | CMake-6f1af899db4e93c960145dae12ebaacb308ea1f0.zip CMake-6f1af899db4e93c960145dae12ebaacb308ea1f0.tar.gz CMake-6f1af899db4e93c960145dae12ebaacb308ea1f0.tar.bz2 |
Toolchain: Capture all arguments from CMAKE_<LANG>_COMPILER
Capture CMAKE_<LANG>_COMPILER_ARG1 from CMAKE_<LANG>_COMPILER in the
same fashion that it is from $ENV{<LANG>}.
Since get_filename_component() returns a single string of all the
arguments from $ENV{<LANG>}, a single string of arguments will be
constructed from the items contained in CMAKE_<LANG>_COMPILER.
Fixes #20089
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 662b831..e7e294f 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -42,7 +42,7 @@ else() if(NOT $ENV{CXX} STREQUAL "") get_filename_component(CMAKE_CXX_COMPILER_INIT $ENV{CXX} PROGRAM PROGRAM_ARGS CMAKE_CXX_FLAGS_ENV_INIT) if(CMAKE_CXX_FLAGS_ENV_INIT) - set(CMAKE_CXX_COMPILER_ARG1 "${CMAKE_CXX_FLAGS_ENV_INIT}" CACHE STRING "First argument to CXX compiler") + set(CMAKE_CXX_COMPILER_ARG1 "${CMAKE_CXX_FLAGS_ENV_INIT}" CACHE STRING "Arguments to CXX compiler") endif() if(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT}) message(FATAL_ERROR "Could not find compiler set in environment variable CXX:\n$ENV{CXX}.\n${CMAKE_CXX_COMPILER_INIT}") |