MantisBT - CMake
View Issue Details
0011270CMakeCMakepublic2010-09-26 18:192010-10-06 13:39
d3x0r 
Brad King 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.3CMake 2.8.3 
0011270: Visual Studio 2010 generator makes same object output filename
this is the sample cmakelists that causes bad output... When a .c file and a .rc share the same base name...

--------------

cmake_minimum_required(VERSION 2.8)

project( launchpad )
set(BASE_SOURCES launchpad.c launchpad.rc )
add_executable(${PROJECT_NAME} WIN32 ${BASE_SOURCES} )

-------------

the 'Output File Name' property in visual studio is ...
     <ObjectFileName>$(Configuration)/launchpad.c.obj</ObjectFileName>
Normally this is just $(IntDir)

but some reason because I have a resource and a source file the same
name the output file is different?

and even if it was... it should still be $(IntDir)/launchpad.c.obj (
I guess so I can have launchpad.c.obj and launchpad.cpp.obj and
launchpad.rc.obj ?)


Also if I have another project like...
-----
project( launchpad2 )
set(BASE_SOURCES launchpad.c ) # no resources
add_executable(${PROJECT_NAME} WIN32 ${BASE_SOURCES} )
-----

the output file of this also becomes $((Configuration)/launchpad.c.obj
instead of referencing just $(Configuation) when the object name has a special property set (tried to find the property to just set with set_source_files_properties instead of using a duplicate filename)
No tags attached.
patch cmake.patch (509) 2010-09-26 18:19
https://public.kitware.com/Bug/file/3413/cmake.patch
Issue History
2010-09-26 18:19d3x0rNew Issue
2010-09-26 18:19d3x0rFile Added: cmake.patch
2010-09-26 19:00Bill HoffmanStatusnew => assigned
2010-09-26 19:00Bill HoffmanAssigned To => Brad King
2010-09-27 01:18Kovarththanan RajaratnamCategoryCCMake => CMake
2010-09-27 09:06Brad KingNote Added: 0022361
2010-09-27 09:06Brad KingStatusassigned => closed
2010-09-27 09:06Brad KingResolutionopen => fixed
2010-10-06 13:39David ColeFixed in Version => CMake 2.8.3
2010-10-06 13:39David ColeTarget Version => CMake 2.8.3

Notes
(0022361)
Brad King   
2010-09-27 09:06   
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ef659fc [^]