Open Colengms opened 1 year ago
@Colengms Thanks for reporting the issue! I have investigated this and the issue is a gap in what is reported by the CMake File API.
We will investigate improving this and/or finding a fix. Thanks!
Some context:
It appears to repro with the simplest of examples.
cmake_minimum_required(VERSION 3.10)
project(MyProject VERSION 1.0)
add_executable(MyProject main.cpp)
set(CMAKE_VERBOSE_MAKEFILE on)
It repro's with MSBuild, not Ninja, so just don't set the generator and choose a CL kit.
In the verbose build output, you'll see: /Fo"MyProject.dir\Debug\"
In the C/C++ logging output, I see:
Custom configurations received: ... "compilerFragments": [ "/DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1" ... }
When I build a file with CMake Tools with a simple example, I'm seeing the following command line used:
The custom configuration sent to cpptools is missing some of those arguments:
I've not dug into the importance of the other missing arguments, but cpptools specifically needs the
/Fo
argument. If (and only if) it is a path ending in a backslash or forward slash, it's used as an output directory for.tlh
files. We need that path to pass to EDGE for--import_dir
. That argument would be needed in order to properly support#using
of COM.tlb
files in cpptools.