Reputation: 549
Is there a way to exclude all files with a dedicated file extension e.g. *.ipp from C++ build process ?
Upvotes: 0
Views: 245
Reputation: 549
Ok in the meantime I figured it out on my own:
Environment: VS2010 / C++ project with templates. Templates are declared in *.h and implemented in *.cpp. Each *.cpp file is set to "Exclude from build = Yes"
Problem: Each time a new template implementation is added the corresponding *.cpp must be manual set to "Exclude from build = Yes"
What I want: A build rule to exclude ALL template implementation files from build process.
Action: Renamed *.cpp file within the "Solution Explorer" to *.ipp.
Result: When "Exclude from build = No" file is compiled even it has no *.cpp extension.
Option A: Set each individual *.ipp file to "Exlcude from build = Yes" -> This is no option for me !
Option B: Remove the *.ipp from the solution and add it again. Within *.vcxproj file is then added as follows:
<ItemGroup>
<None Include="..\..\src\foo.ipp" />
</ItemGroup>
and therefore not compiled anymore.
Upvotes: 1