| Summary: | GMake option/preprocessor macro to identify a non-release (developer, test) build? | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Michael Kelsey <kelsey> |
| Component: | cmake | Assignee: | Ben Morgan <Ben.Morgan> |
| Status: | CLOSED FIXED | ||
| Severity: | trivial | ||
| Priority: | P5 | ||
| Version: | 9.5 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Michael Kelsey
2012-09-14 10:29:45 CEST
Just for my own notes, the only tricky part is handling the different build modes in multi-config IDEs. Look at use of COMPILE_DEFINITIONS_<CONFIG> target property: http://www.cmake.org/cmake/help/v2.8.9/cmake.html#prop_tgt:COMPILE_DEFINITIONS_CONFIG Fix proposed in tag cmake-V09-06-06. The compile definition "GEANT4_DEVELOPER_<CONFIG>" is added to the definitions for each Geant4 target as appropriate for the available build types/configurations. For example, if the build type is "Debug", the the sources will be built with the definition "GEANT4_DEVELOPER_DEBUG". This behaviour is the same for all other build modes, and also works with multiconfiguration tools such as Xcode. The definition should *not* appear in any Geant4 header files. |