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.
34 lines
980 B
CMake
34 lines
980 B
CMake
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
# file LICENSE.rst or https://cmake.org/licensing for details.
|
|
|
|
# Re-configure to save learned information.
|
|
block()
|
|
foreach(_var IN ITEMS
|
|
# Compiler information.
|
|
# Keep in sync with CMakeDetermineASMCompiler.
|
|
COMPILER
|
|
COMPILER_ID
|
|
COMPILER_ARG1
|
|
COMPILER_ENV_VAR
|
|
COMPILER_AR
|
|
COMPILER_RANLIB
|
|
COMPILER_VERSION
|
|
COMPILER_ARCHITECTURE_ID
|
|
COMPILER_FRONTEND_VARIANT
|
|
SIMULATE_ID
|
|
# Linker information.
|
|
COMPILER_LINKER
|
|
COMPILER_LINKER_ID
|
|
COMPILER_LINKER_VERSION
|
|
COMPILER_LINKER_FRONTEND_VARIANT
|
|
LINKER_DEPFILE_SUPPORTED
|
|
LINKER_PUSHPOP_STATE_SUPPORTED
|
|
)
|
|
set(_CMAKE_ASM_${_var} "${CMAKE_ASM${ASM_DIALECT}_${_var}}")
|
|
endforeach()
|
|
configure_file(
|
|
${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
|
|
${CMAKE_PLATFORM_INFO_DIR}/CMakeASM${ASM_DIALECT}Compiler.cmake
|
|
@ONLY)
|
|
endblock()
|