mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Previously, `CMAKE_ASM${DIALECT}_COMPILER_FRONTEND_VARIANT` and
`CMAKE_ASM${DIALECT}_SIMULATE_ID` were not saved in with the build
configuration. As a result, these were left unpopulated on re-configure.
This is particularly problematic when `clang-cl` is used as the
assembler on Windows, since CMake would mistakenly identify the build as
being "GCC on Windows", resulting in include paths being passed with
forward slashes on re-configure, causing a full rebuild.
Fix the issue by saving the information so it persists across
re-configures.
16 lines
677 B
CMake
16 lines
677 B
CMake
# Assembler information is detected once and written to
|
|
# CMakeASM<dialect>Compiler.cmake, then reloaded from that file on every later
|
|
# configure. A field that detection computes but the file does not record
|
|
# comes back empty, so a re-configure sees a different assembler than the one
|
|
# that was detected. The -check script reloads the file and verifies this.
|
|
|
|
enable_language(ASM)
|
|
|
|
# Detection must identify the assembler in the first place.
|
|
if(NOT CMAKE_ASM_COMPILER_ID)
|
|
message(SEND_ERROR "CMAKE_ASM_COMPILER_ID was not detected")
|
|
endif()
|
|
if(NOT CMAKE_ASM_COMPILER_FRONTEND_VARIANT)
|
|
message(SEND_ERROR "CMAKE_ASM_COMPILER_FRONTEND_VARIANT was not detected")
|
|
endif()
|