From: Michael Kruse Date: Sun, 20 Jun 2021 19:20:40 +0000 (-0500) Subject: Use single command line arg for /FI (#869) X-Git-Tag: v4.4~192 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa179512fc69bbcdc6e24a21491263c57ec98f57;p=thirdparty%2Fccache.git Use single command line arg for /FI (#869) CMake seems to interpret /FI and its argument as two separate options. For instance, CMake de-duplicates arguments, leading any to non-first /FI flag to be removed. This might be the reason why the option is not honored with Visual Studio 16.10.2 / CMake 3.20.3. Fix by combining /FI and its argument into a single command line option. --- diff --git a/cmake/StandardSettings.cmake b/cmake/StandardSettings.cmake index b0fa8b5f7..8742be0bb 100644 --- a/cmake/StandardSettings.cmake +++ b/cmake/StandardSettings.cmake @@ -52,7 +52,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^GNU|(Apple)?Clang$") include(StdAtomic) elseif(MSVC) - target_compile_options(standard_settings INTERFACE /FI ${CMAKE_BINARY_DIR}/config.h) + target_compile_options(standard_settings INTERFACE "/FI${CMAKE_BINARY_DIR}/config.h") target_compile_options( standard_settings