From: Joel Rosdahl Date: Sun, 1 Mar 2026 14:45:46 +0000 (+0100) Subject: build: Only inject config.h for C and C++, not assembler X-Git-Tag: v4.13~3 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=f1d1a492b83bd190604c495e6bcaf65627f76ef2;p=thirdparty%2Fccache.git build: Only inject config.h for C and C++, not assembler Fixes #1599. --- diff --git a/cmake/StandardSettings.cmake b/cmake/StandardSettings.cmake index 430c237d..d1c6a4c1 100644 --- a/cmake/StandardSettings.cmake +++ b/cmake/StandardSettings.cmake @@ -4,11 +4,18 @@ add_library(standard_settings INTERFACE) if(MSVC) - target_compile_options(standard_settings INTERFACE "/FI${CMAKE_BINARY_DIR}/config.h") + target_compile_options( + standard_settings + INTERFACE + $<$:-include /FI${CMAKE_BINARY_DIR}/config.h> + $<$:-include /FI${CMAKE_BINARY_DIR}/config.h> + ) else() target_compile_options( standard_settings - INTERFACE -include ${CMAKE_BINARY_DIR}/config.h + INTERFACE + $<$:-include ${CMAKE_BINARY_DIR}/config.h> + $<$:-include ${CMAKE_BINARY_DIR}/config.h> ) endif()