| Summary: | CMake buildscripts require explicit listing of source files | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Ben Morgan <Ben.Morgan> |
| Component: | cmake | Assignee: | Ben Morgan <Ben.Morgan> |
| Status: | CLOSED WONTFIX | ||
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 9.4 | ||
| Hardware: | All | ||
| OS: | All | ||
| Problem Depends on: | |||
| Problem Blocks: | 1199 | ||
|
Description
Ben Morgan
2011-04-21 15:48:54 CEST
This can be fixed using CMake's file(GLOB ...) command. I note that this is not the recommended way to locate sources in CMake. Explicit listing is recommended because changes to CMake scripts (in this case sources.cmake) are picked up by the buildsystem because CMake encodes dependencies on these files into the Make/project files. The developer then only needs to work with the buildsystem of choice, and rebuilds will automatically rerun CMake. In Geant4, it's recognised that whilst explicit listing is recommended, it can lead to inconsistent builds because developers can and do forget to edit the sources.cmake files. Usage of file(GLOB ...) will help to mitigate this problem, at the cost of needing to explicitly rerun CMake when sources and/or VCS updates are made (e.g. 'make rebuild_cache' with Makefiles). This fix has no effect on end users of Geant4. This will be addressed following the 9.5 release, so postponed until 2012. Just marking the bug as LATER, so it's known about, but the status is clear. Globbing of sources is explicitly not recommended by CMake, so will not be implemented. |