| Summary: | CMAKE Build with -g and FPE but without -O2 | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Andrea Dotti <andrea.dotti> |
| Component: | cmake | Assignee: | Ben Morgan <Ben.Morgan> |
| Status: | CLOSED FIXED | ||
| Severity: | trivial | CC: | Gabriele.Cosmo, Gunter.Folger, pere.mato |
| Priority: | P5 | ||
| Version: | other | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Andrea Dotti
2011-11-24 12:17:29 CET
This is not a problem to fix, but I need an absolutely clear statement of the flags that are needed, and their platform and compiler dependencies. To clarify what is done in 9.5, for the GNU C++ compiler, we create a mode 'TestRelease'. This has flags (in addition to the core Geant4 flags): Non-Apple: -O2 -g -G4DEBUG_VERBOSE -G4FPE_DEBUG Apple : -g -G4DEBUG_VERBOSE -G4FPE_DEBUG With MSVC, the additional flags are -O2 -Zi -G4DEBUG_VERBOSE With Intel compilers, the additional flags are -O2 -g -G4DEBUG_VERBOSE From the description, it sounds like this mode is really used to validate, so perhaps 'Validation' would be a better name for the mode? Is optimization always/never/sometimes needed? There's no technical issue in fixing this other than having a clear and agreed definition of the required flags, and avoiding too many different modes. Cheers, Ben. Is this bug still valid, and if so, please review Comment #1 and reply. Hi. An important use case for "TestRelease" is the use for Validation. In particular my concern is on the non-Apple (i.e. Linux) -O2 option, that makes more difficult debugging in case of problems. I thus propose to drop the -O2. If it helps to reduce confusion, I agree on changing the name of the following combination of options (on all possible platforms that support it, with priority to LINUX): -DG4FPE_DEBUG -g -DG4DEBUG_VERBOSE A name like "Validation" is adequate Thanks Andrea! I will update when there is a tag in place to implement this (likely next few weeks) I've just proposed tag cmake-V09-05-44: """ Remove optimization in TestRelease mode (Bug #1263) Build TestRelease mode without optimization on all platforms currently supporting this mode. Remove obsolete TestReleaseDebug build mode as new TestRelease mode fully supports debug. """ The TestRelease mode should now be consistent - please let me know if this is o.k., and we can close the bug. Cheers, Ben. Marking this as fixed, please reopen if there are still issues. |