Open gblikas opened 5 years ago
@sakra Have you gotten a chance to look at this?
I understand that it might not be a solution for you if you need/want to use Visual Studio IDE, but I'm using VSCode + Visual C++ 2017 + Cotire + Ninja build and /Yu
and /Fp
flags are all correctly set.
I decided to abandon Visual Studio IDE because it's intellisense was too slow, and I'm quite happy with the current setup, now.
@enricodetoma Have you had a similar experience using a similar setup like I have?
Sorry no. I wasn't using cotire yet, when I used cmake + visual studio ide.
Running the default example
/CMakeLists.txt
(top-most CMake Project), via the following command has some interesting command-line settings, which do not seem to actually utilize a pch system. I am running MSVC 2017 (x64).In particular, here is
[example Property Page] -> [C/C++] -> [Command Line]
output:For one,
/Yu
is not used, which causes the core MSVC system not to use a pre-compiled header (afaik, I am not a MSVC wiz). However, it is set in the following 2 methods:https://github.com/sakra/cotire/blob/391bf6b7609e14f5976bd5247b68d63cbf8d4d12/CMake/cotire.cmake#L1627
and
https://github.com/sakra/cotire/blob/391bf6b7609e14f5976bd5247b68d63cbf8d4d12/CMake/cotire.cmake#L1786
Another interesting quirk is that
/Fp"example.dir\Debug\example.pch
doesn't exist:It seems like in either the
_unity
build, or standard target name build, both should point to the pch content in/build/src/Debug/cotire
:If this is already explained in the documentation, I would love to figure out where. I am new to Cotire, so sorry for any obvious mistakes I may have made. Additionally, here is my
vswhere.exe
output, and CMake version information.cmake version 3.12.1
CMake suite maintained and supported by Kitware (kitware.com/cmake)