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.
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