mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
`CMAKE_<LANG>_COMPILER` may be a list if it was defined by a toolchain file. In this case we move the args to `CMAKE_<LANG>_COMPILER_ARG1`. If `CMAKE_<LANG>_COMPILER` is not a list, then it might have been cached by a previous run that split the `CC` or `CXX` environment variable into `CMAKE_<LANG>_COMPILER` and `CMAKE_<LANG>_COMPILER_ARG1`. In this latter case, avoid clobbering `CMAKE_<LANG>_COMPILER_ARG1`. Fixes: #23358
5 lines
147 B
CMake
5 lines
147 B
CMake
enable_language(C)
|
|
set(CMAKE_VERBOSE_MAKEFILE TRUE)
|
|
message(STATUS "CMAKE_C_COMPILER_ARG1='${CMAKE_C_COMPILER_ARG1}'")
|
|
add_executable(main main.c)
|