MantisBT - CMake
View Issue Details
0015731CMakeCMakepublic2015-09-09 08:372016-06-10 14:31
Marco Foco 
Gilles Khouzam 
normalminoralways
closedmoved 
x86Windows7
CMake 3.3.1 
 
0015731: VS_DEPLOYMENT_CONTENT
Reading the documentation for the property VS_DEPLOYMENT_CONTENT looks like it can be used to mark a file as "Excluded from build":

http://www.cmake.org/cmake/help/v3.3/prop_sf/VS_DEPLOYMENT_CONTENT.html [^]

"Mark a source file as content for deployment with a Windows Phone or Windows Store application when built with a Visual Studio generator. The value must evaluate to either 1 or 0 and may use generator expressions to make the choice based on the build configuration. The .vcxproj file entry for the source file will be marked either DeploymentContent or ExcludedFromBuild for values 1 and 0, respectively."

Actually, this is not working in a plain C++ project.

I suspect that the note "with a Windows Phone or Windows Store application" restricts the activity of this flag.

The workaround of marking a C++ file as HEADER_FILE_ONLY TRUE is inconvenient, because it does not put a mark in the solution explorer (making very difficult to spot the excluded files).
- add a file
- mark it as VS_DEPLOYMENT_CONTENT 0 (or FALSE, tested with both)

Load the vcxproj and notice that the file is not marked as "Excluded from build" by right-clicking on the files and selecting "Properties" ("Excluded from build" is actually empty, which defaults to false).
Related tickets (same problem, different solution proposed, all unimplemented:
http://public.kitware.com/Bug/view.php?id=6314 [^]
http://public.kitware.com/Bug/view.php?id=11902 [^]
No tags attached.
Issue History
2015-09-09 08:37Marco FocoNew Issue
2015-09-09 09:47Brad KingAssigned To => Gilles Khouzam
2015-09-09 09:47Brad KingStatusnew => assigned
2016-06-10 14:29Kitware RobotNote Added: 0042835
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042835)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.