Skip to content

Conversation

@bredelings
Copy link
Contributor

@bredelings bredelings commented Aug 23, 2025

Typically in cmake to compile in debug mode, you would add -DCMAKE_BUILD_TYPE=Debug to the cmake command line. In addition to the command line, various IDEs assume also add -DCMAKE_BUILD_TYPE=Debug to create a debugable executable.

Right now the CMakeLists.txt prevent this. First, it sets CMAKE_BUILD_TYPE, which overrides whatever is set on the command line. Second, it forces -O3 optimization, which makes debugging difficult.

This PR addresses these problems by:

  • only setting CMAKE_BUILD_TYPE when it is not already specified
  • only setting -O3 optimization if CMAKE_BUILD_TYPE is not Debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant