[cmake-developers] [CMake 0011902]: EXCLUDE_FROM_BUILD source property for Visual Studio

Mantis Bug Tracker mantis at public.kitware.com
Mon Feb 28 10:59:38 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11902 
====================================================================== 
Reported By:                ixSci
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11902
Category:                   CMake
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-02-28 10:59 EST
Last Modified:              2011-02-28 10:59 EST
====================================================================== 
Summary:                    EXCLUDE_FROM_BUILD source property for Visual Studio
Description: 
It would be very useful to have an property which will allow to exclude some
source from the build by setting the VS property "Exclude from build".
I've found this proposal here http://public.kitware.com/Bug/view.php?id=6314
People reasonable said that such a behavior could be achieved by using
HEADER_FILE_ONLY property. But it is rather a workaround than solution because
we have only similar behavior not a right one.
Difference:
If we set file property to HEADER_FILE_ONLY then VC++ compiler will ignore that
file(and this part is what we need) but it doesn't do following: 
a) If we mark cpp file as HEADER_FILE_ONLY then it won't be included in the
project filter(by using SOURCE_GROUP) but will be placed at the project root
instead. If we have many different files which should not build then we will
have a mess where header will be placed in the correspondent group but cpp not.
b) Files which are marked as HEADER_FILE_ONLY don't have this verbose red circle
which tells to the user "Hey I'm not part of the build, so just ignore me!". If
that sign is present in the excluded file it makes project hierarchy more clear

So I think such an option should be added to the CMake.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-28 10:59 ixSci          New Issue                                    
======================================================================




More information about the cmake-developers mailing list