[CMake] CMake add_subdirectory and recompiling
Michael Wild
themiwi at gmail.com
Wed Dec 21 11:56:08 EST 2011
On 12/21/2011 05:25 PM, André Caron wrote:
> I've recently been surprised by the behavior of CMake when modifying
> "CMakeLists.txt" files pointed to by "add_subdirectory()" directives.
> I've asked the question on StackOverflow[1] and have gotten no clean
> answer. If anyone is interested, there is a small bounty (50 points)
> on the question expiring in a few hours.
>
> The question is tad bit lengthy, so I won't duplicate here. Any reply
> on either the mailing list or to the linked StackOverflow question is
> appreciated.
>
> Thanks!
> André
>
> [1]: http://stackoverflow.com/questions/8479929/cmake-add-subdirectory-and-recompiling
Get rid of the file(GLOB ...). Never, ever use it unless you know
exactly what you're doing. Using it usually breaks something.
Also, you didn't say *what* changes you made that caused a full rebuild.
If you change anything that will show up on the command line (e.g.
change add_definitions(), include_directories(), etc.), this will of
course cause a rebuild.
Michael
More information about the CMake
mailing list