CXX Module Windows MSVC NinjaMulticonfig
@ben.boeckel Continuing the conversation
On WIndows with MSVC and NinjaMultiConfig, with the debug configuration. (Note that the same build is working with Ninja)
It tries to open the modmap from the other configuration (RelWithDebInfo, and Release)
[14/24] "C:\Program Files\CMake\bin\cmake.exe" -E __run_co_compile --tidy="C:/Program Files/LLVM/bin/clang-tidy.exe;-extra-arg=-Wno-unknown-warning-option;-extra-arg=-Wno-ignored-optimization-argument;-extra-arg=-Wno-unused-command-line-argument;-p;-extra-arg=/std:c++23;--extra-arg-before=--driver-mode=cl" --source=D:\a\CmakeCppTemplate\CmakeCppTemplate\Projects\Sample\Sample\Sample.cpp -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1438~1.331\bin\HostX64\x64\cl.exe /TP -DFMT_SHARED -DSAMPLE_STATIC_DEFINE -DCMAKE_INTDIR=\"Debug\" -ID:\a\CmakeCppTemplate\CmakeCppTemplate\Projects\Sample -ID:\a\CmakeCppTemplate\CmakeCppTemplate\_Out\build\Windows-Msvc-NinjaMultiConfig\Projects\Sample -ID:\a\CmakeCppTemplate\CmakeCppTemplate\_Out\build\Windows-Msvc-NinjaMultiConfig\Projects\Config -external:ID:\a\CmakeCppTemplate\CmakeCppTemplate\_Out\vcpkg_installed\x64-windows\include -external:W0 /DWIN32 /D_WINDOWS /EHsc /Ob0 /Od /RTC1 -std:c++latest -MDd -Zi /GL /MP /diagnostics:column /sdl /DYNAMICBASE /guard:cf /W4 /w14242 /w14254 /w14263 /w14265 /w14287 /we4289 /w14296 /w14311 /w14545 /w14546 /w14547 /w14549 /w14555 /w14619 /w14640 /w14826 /w14905 /w14906 /w14928 /permissive- /showIncludes @Projects\Sample\CMakeFiles\Sample.dir\Debug\Sample\Sample.cpp.obj.modmap /FoProjects\Sample\CMakeFiles\Sample.dir\Debug\Sample\Sample.cpp.obj /FdProjects\Sample\CMakeFiles\Sample.dir\Debug\Sample.pdb /FS -c D:\a\CmakeCppTemplate\CmakeCppTemplate\Projects\Sample\Sample\Sample.cpp
FAILED: Projects/Sample/CMakeFiles/Sample.dir/Debug/Sample/Sample.cpp.obj
"C:\Program Files\CMake\bin\cmake.exe" -E __run_co_compile --tidy="C:/Program Files/LLVM/bin/clang-tidy.exe;-extra-arg=-Wno-unknown-warning-option;-extra-arg=-Wno-ignored-optimization-argument;-extra-arg=-Wno-unused-command-line-argument;-p;-extra-arg=/std:c++23;--extra-arg-before=--driver-mode=cl" --source=D:\a\CmakeCppTemplate\CmakeCppTemplate\Projects\Sample\Sample\Sample.cpp -- C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1438~1.331\bin\HostX64\x64\cl.exe /TP -DFMT_SHARED -DSAMPLE_STATIC_DEFINE -DCMAKE_INTDIR=\"Debug\" -ID:\a\CmakeCppTemplate\CmakeCppTemplate\Projects\Sample -ID:\a\CmakeCppTemplate\CmakeCppTemplate\_Out\build\Windows-Msvc-NinjaMultiConfig\Projects\Sample -ID:\a\CmakeCppTemplate\CmakeCppTemplate\_Out\build\Windows-Msvc-NinjaMultiConfig\Projects\Config -external:ID:\a\CmakeCppTemplate\CmakeCppTemplate\_Out\vcpkg_installed\x64-windows\include -external:W0 /DWIN32 /D_WINDOWS /EHsc /Ob0 /Od /RTC1 -std:c++latest -MDd -Zi /GL /MP /diagnostics:column /sdl /DYNAMICBASE /guard:cf /W4 /w14242 /w14254 /w14263 /w14265 /w14287 /we4289 /w14296 /w14311 /w14545 /w14546 /w14547 /w14549 /w14555 /w14619 /w14640 /w14826 /w14905 /w14906 /w14928 /permissive- /showIncludes @Projects\Sample\CMakeFiles\Sample.dir\Debug\Sample\Sample.cpp.obj.modmap /FoProjects\Sample\CMakeFiles\Sample.dir\Debug\Sample\Sample.cpp.obj /FdProjects\Sample\CMakeFiles\Sample.dir\Debug\Sample.pdb /FS -c D:\a\CmakeCppTemplate\CmakeCppTemplate\Projects\Sample\Sample\Sample.cpp
error: no such file or directory: '@Projects\Sample\CMakeFiles\Sample.dir\RelWithDebInfo\Sample\Sample.cpp.obj.modmap' [clang-diagnostic-error]
error: no such file or directory: '@Projects\Sample\CMakeFiles\Sample.dir\Release\Sample\Sample.cpp.obj.modmap' [clang-diagnostic-error]
error: no such file or directory: '@Projects\Sample\CMakeFiles\SampleTestsCatch2.dir\RelWithDebInfo\Sample\Sample.cpp.obj.modmap' [clang-diagnostic-error]
error: no such file or directory: '@Projects\Sample\CMakeFiles\SampleTestsCatch2.dir\Release\Sample\Sample.cpp.obj.modmap' [clang-diagnostic-error]
error: no such file or directory: '@Projects\Sample\CMakeFiles\SampleTestsGTest.dir\RelWithDebInfo\Sample\Sample.cpp.obj.modmap' [clang-diagnostic-error]
error: no such file or directory: '@Projects\Sample\CMakeFiles\SampleTestsGTest.dir\Release\Sample\Sample.cpp.obj.modmap' [clang-diagnostic-error]
It might not be a Cmake issue, if it is not, we'll just close it. ( Suspect this is a NinjaMultiConfig issue)