[CMake] CMake minimum required version

David Cole david.cole at kitware.com
Sat Aug 25 13:48:05 EDT 2012


On Sat, Aug 25, 2012 at 1:38 PM, Russell Wallace
<russell.wallace at gmail.com> wrote:
> On Sat, Aug 25, 2012 at 12:41 PM, Rolf Eike Beer <eike at sf-mail.de> wrote:
>> That sounds suspicious. From the documentation (cmake --help-command file):
>>
>>        We do not recommend using GLOB to
>>        collect a list of source files from your source tree.  If no
>>        CMakeLists.txt file changes when a source is added or removed then the
>>        generated build system cannot know when to ask CMake to regenerate.
>
> Of course it can't, I wasn't expecting it to. That's not a reason to
> violate DRY keeping the two lists in sync by hand! All you need to do
> is issue a single command to scrub the build directory and re-create
> it. Not only is that strictly less work, more importantly, it's
> strictly less error-prone.
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


Nobody's asking you to keep two lists in sync.

We're recommending that you keep your one list in a CMakeLists.txt
file (or something included by it) so that when you modify the list,
CMake will automatically re-run.

Where is your list of source files, if it's not explicit in the CMakeLists file?


More information about the CMake mailing list