Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude files on ConfigureAll step #33

Open
DJLink opened this issue Jun 12, 2018 · 2 comments
Open

Exclude files on ConfigureAll step #33

DJLink opened this issue Jun 12, 2018 · 2 comments

Comments

@DJLink
Copy link

DJLink commented Jun 12, 2018

Hello, sorry if this explain somewhere but searched documentation and source code but can't find.

I have a framework with multiple platforms and I wanted to exclude folders/files from the project according to each configuration when ConfigureAll()

So I know we can use SourceFilesExcludeRegex.Add to exclude files/patters from project.

But I'm looking into excluding them in ConfigureAll() step, I found conf.SourceFilesBuildExcludeRegex but this is only for excluding from build. Is it possible?
using Project.SourceFilesExcludeRegex on ConfigureAll() says we can't change it on that step, read only.

Or is there a better way to do this?

@belkiss
Copy link
Contributor

belkiss commented Jun 12, 2018

Hello!

It is not currently possible to completely exclude source files from a configure method of a project.

Usually projects output all their configurations to the same file, for instance a vcxproj that would contain Debug and Release, and in that case, if a file is used in at least one configuration then it must be in the project. The only possibility if you don't want it in Release for example is to exclude it from the build.

I realize that this might be a little harsh, and maybe we could relax the restriction in case the output file differs between configurations, as is your case if I understand correctly.

@DJLink
Copy link
Author

DJLink commented Jun 12, 2018

Yes that what was trying. In my case I was trying to use it for a OS level and also even added custom Fragment for Render API for example.
Let's say I have Win32 and Switch OS and different folders for some files. When I receive the config on ConfigAll I was trying to exclude files according to that platform.
Ideally each project would only mention each corresponding platform, this can be useful if I wanna share only a configuration solution with a partner that can't have access to a console platform for example, so the project doesn't even mention the files at all.

Also any way to exclude from build the .h? That way seeing the solution user sees can see all files not being used with a block icon (picture). Visual Studio does allow this using it directly for example

capture

Sorry for all the questions and thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@DJLink @belkiss and others