Skip to content

ASM: Search for full path even when using C or C++ compiler

Raul Laasner requested to merge raullaasner/cmake:master into master

CMAKE_ASM_COMPILER was not correctly determined in situtations where ASM is enabled but C is not enabled and the user only specifies CMAKE_C_COMPILER. Specifically, the value of CMAKE_C_COMPILER was copied to CMAKE_ASM_COMPILER without further expansion. As a result, CMake would sometimes produce a misleading error such as the following:

The CMAKE_ASM_COMPILER:

gcc

is not a full path and was not found in the PATH.

This would show up even if gcc is in fact in the PATH.

Fixes: #18406 (closed)
Topic-rename: asm-path-from-c

Edited by Brad King

Merge request reports