bkaradzic / GENie

GENie - Project generator tool
Other
898 stars 166 forks source link

vs2017 pchsource don't works #339

Open chena1982 opened 6 years ago

chena1982 commented 6 years ago

pchheader "xxx.h" pchsource "xxx.cpp" the xxx.cpp don't use /Yc, but still is /Yu.

ps, vpaths don't have any effects, for example: vpaths { ["Headers"] = "**.h" } Is there some simple method to debug this? or must use debug mode GENie?

Thanks.

ddengster commented 2 years ago

I'm also getting this. The Precompiled Header option should be Create (/Yc) instead of Use (/Yc)

image

This appropriate line that fixes this is in the .vcxproj file, with the <PrecompiledHeader> tag. Example:

<ItemGroup>
    <ClCompile Include="..\..\..\src\Simulation\RegisterSimulationMetadata.cpp">
    </ClCompile>
    <ClCompile Include="..\..\..\src\Simulation\SimulationPCH.cpp">
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
    </ClCompile>
    <ClCompile Include="..\..\..\src\Simulation\SimulationSystems.cpp">
    </ClCompile>
    <ClCompile Include="..\..\..\src\Simulation\Sim\Simulation.cpp">
    </ClCompile>
  </ItemGroup>

(platform is vs2019) We're likely missing some code that checks for pchsource and adds the tag. Could anyone help point us to the appropriate LOC so people can start on a fix? thanks!