MantisBT - CMake
View Issue Details
0013130CMakeCMakepublic2012-04-13 17:042016-06-10 14:31
Gehua yang 
Kitware Robot 
normalmajoralways
closedmoved 
WindowsWindows7
CMake 2.8.7 
 
0013130: Version is not set for executable or dll targets
SET_TARGET_PROPERTIES( a PROPERTIES VERSION "1.2.3")

Such sentence does not seem to have any effect with a Windows Visual Studio build. A screen shot of Visual Studio to demonstrate the version is not being set in VS.
A minimum example project was created to demo this issues. Files are enclosed.
No tags attached.
png shot.png (108,674) 2012-04-13 17:04
https://public.kitware.com/Bug/file/4299/shot.png
png

cxx a.cxx (77) 2012-04-13 17:04
https://public.kitware.com/Bug/file/4300/a.cxx
txt CMakeLists.txt (158) 2012-04-13 17:04
https://public.kitware.com/Bug/file/4301/CMakeLists.txt
? dumpbin-IDE.out (6,125) 2012-04-16 11:56
https://public.kitware.com/Bug/file/4307/dumpbin-IDE.out
? dumpbin-nmake.out (6,120) 2012-04-16 11:56
https://public.kitware.com/Bug/file/4308/dumpbin-nmake.out
Issue History
2012-04-13 17:04Gehua yangNew Issue
2012-04-13 17:04Gehua yangFile Added: shot.png
2012-04-13 17:04Gehua yangFile Added: a.cxx
2012-04-13 17:04Gehua yangFile Added: CMakeLists.txt
2012-04-16 09:18Brad KingNote Added: 0029172
2012-04-16 11:56Gehua yangFile Added: dumpbin-IDE.out
2012-04-16 11:56Gehua yangFile Added: dumpbin-nmake.out
2012-04-16 11:57Gehua yangNote Added: 0029181
2012-04-16 11:57Gehua yangNote Edited: 0029181bug_revision_view_page.php?bugnote_id=29181#r611
2012-04-16 13:27Brad KingNote Added: 0029182
2012-04-16 13:27Brad KingStatusnew => backlog
2016-06-10 14:28Kitware RobotNote Added: 0042025
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0029172)
Brad King   
2012-04-16 09:18   
Does it work in the NMake Makefiles generator?

The mapping of this property to IDE project file attributes may be missing.
(0029181)
Gehua yang   
2012-04-16 11:57   
Indeed, The NMake does write the image version! The two dumpbin output of the executable headers are attached.

(0029182)
Brad King   
2012-04-16 13:27   
The generated NMake makefile build rules know how to write the version because the Modules/Platform/cl.cmake file tells CMake to use the /version:... option on the link line. The equivalent of this in the IDE project files is to write a <Version>...</Version> XML element at the proper point in the project file format. The change will probably go in cmLocalVisualStudio7Generator::OutputBuildTool and cmVisualStudio10TargetGenerator::WriteLinkOptions where they write the linker tool options.
(0042025)
Kitware Robot   
2016-06-10 14:28   
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.