Notes |
|
(0009968)
|
Brad King
|
2007-12-17 18:02
|
|
Ken, this is because flags.make gets lines like this:
# Custom flags: CMakeFiles/b.dir/a.o_FLAGS = -Wall
# Custom flags: CMakeFiles/b.dir/b.o_FLAGS = -Wall
Adding or removing a line causes rebuilds just as much as changing the flags. My original design had a separate rule file per object so that this would not happen. Of course that had the problem of taking forever to generate so many build files on Windows filesystems. |
|
|
(0009969)
|
Brad King
|
2007-12-17 18:05
|
|
ufnoise, you can work around this by not setting these flags directly on the source files. The COMPILE_FLAGS property is really meant for when one file has something special as compared to the others.
You may use SET_TARGET_PROPERTIES to add the flags to the target's COMPILE_FLAGS property, or add the flags to the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS variables directly. |
|
|
(0030553)
|
Brad King
|
2012-08-13 10:44
|
|
Sending issues I'm not actively working on to the backlog to await someone with time for them.
If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:
http://www.cmake.org/mailman/listinfo/cmake [^]
It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
|
|
|
(0033083)
|
Craig Scott
|
2013-05-17 08:25
|
|
We are also being bitten by this problem. In our case, we have the software package version passed through as a define to just those few source files that need it. Because of this bug, however, whenever we change the software version, the whole target gets rebuilt rather than just those few files that should be affected. |
|
|
(0033086)
|
Brad King
|
2013-05-17 09:00
|
|
Re 0005473:0033083: This is not a bug, just the lack of an optimization. We once experimented with per-object rule files for dependencies and it was *very* slow on filesystems that do not deal well with lots of small files. Therefore we use one flags.make file for a whole target.
The comment is used in flags.make specifically in order to *cause* this rebuild so that changing per-source flags will result in a correct rebuild.
I suggest one of the following workarounds:
* Use an OBJECT library to hold the sources with special flags so that only those rebuild when the per-source flags change.
* Use the Ninja generator |
|
|
(0041379)
|
Kitware Robot
|
2016-06-10 14:27
|
|
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. |
|