MantisBT - CMake
View Issue Details
0015208CMakeCMakepublic2014-10-16 06:142016-06-10 14:31
Antoine Bussy 
Kitware Robot 
normalminoralways
closedmoved 
CMake 3.0.2 
 
0015208: set_source_files_properties and extensions
Setting a property of source file "test.c" also sets the property of the source file named "test".

Reproduced with properties HEADER_FILE_ONLY and GENERATED.

Same problem is seen with .cpp extension but not .txt

I have attached a minimal example that reproduces the problem.
No tags attached.
txt CMakeLists.txt (930) 2014-10-16 06:14
https://public.kitware.com/Bug/file/5276/CMakeLists.txt
Issue History
2014-10-16 06:14Antoine BussyNew Issue
2014-10-16 06:14Antoine BussyFile Added: CMakeLists.txt
2014-10-16 08:48Brad KingNote Added: 0037036
2016-06-10 14:29Kitware RobotNote Added: 0042648
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0037036)
Brad King   
2014-10-16 08:48   
For historical reasons source file names are matched by trying common extensions for sources of the enabled languages. So, the property is actually on "test.c", but looking up by the name "test" finds "test.c" too.

The matching implementation is here:

 http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmSourceFileLocation.cxx;hb=v3.0.2#l188 [^]

One day we may introduce a policy to get rid of this behavior.
(0042648)
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.