MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0008787 | CMake | CMake | public | 2009-03-24 18:40 | 2013-10-21 11:21 | |||||
Reporter | Daniel Nelson | |||||||||
Assigned To | ||||||||||
Priority | normal | Severity | minor | Reproducibility | always | |||||
Status | closed | Resolution | won't fix | |||||||
Platform | OS | OS Version | ||||||||
Product Version | CMake-2-6 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0008787: set_property on sources causing extra files to be rebuilt | |||||||||
Description | I am using set_property to add extra compile flags to source files that are built using a precompiled header, but whenever a source file is added or removed it causes every file in the executable to be rebuilt. I have come up with a CMakeList that shows the issue. ##### cmake_minimum_required(VERSION 2.6) project(prop_test) set(sources foo.cpp bar.cpp main.cpp) add_executable(prop_test ${sources}) set_property(SOURCE foo.cpp main.cpp APPEND PROPERTY COMPILE_FLAGS -Wall) ##### If you compile the project using a Makefile generator, then remove foo.cpp from the sources variable and recompile, it will also recompile main.cpp and bar.cpp even though no compile flags have changed. If you then put foo.cpp back and build it will again rebuild main.cpp and bar.cpp. It seems that you will need to rebuild every source file that is used in the executable, even though nothing has changed. The problem appears to be that all files depend on flags.make so they will be rebuilt if a flag changes. But since they all share the same flags.make, they will always be rebuilt as a group. Perhaps we could write a separate flags.make file for every object file that has compile/define flags set? | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2009-03-24 18:40 | Daniel Nelson | New Issue | ||||||||
2009-03-24 19:08 | Daniel Nelson | Note Added: 0015796 | ||||||||
2009-03-27 12:25 | Bill Hoffman | Relationship added | duplicate of 0008642 | |||||||
2009-03-27 12:26 | Bill Hoffman | Status | new => closed | |||||||
2009-03-27 12:26 | Bill Hoffman | Resolution | open => won't fix | |||||||
2013-10-21 11:21 | Brad King | Relationship added | related to 0014493 | |||||||
2013-10-21 11:22 | Brad King | Relationship deleted | related to 0014493 |
Notes | |||||
|
|||||
|
|