-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
The use of a separate option DEBUG that controls optimization flags conflicts with standard CMake build type configuration (CMAKE_BUILD_TYPE=Debug). That is, even if I tell CMake to create a Debug build, GKLib will still use -O3, which breaks debuggability. It is worth noting that CMake will add -O3 for Release builds by itself without any need for projects to do this manually.
In analogy, having a baked-in option ASSERT that defines the NDEBUG macro leads to build results contrary to the user's expectation. CMake will set this macro in accordance with the build type. If you want to decoupled control over assertions, a separate macro (and assert functions) should be used (as is done with NDEBUG2).
Related: KarypisLab/METIS#116
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels