Skip to content

Instantly share code, notes, and snippets.

@bolry
Created September 10, 2017 10:19
Show Gist options
  • Save bolry/5f957b3b9e7d92d685841fde1e677369 to your computer and use it in GitHub Desktop.
Save bolry/5f957b3b9e7d92d685841fde1e677369 to your computer and use it in GitHub Desktop.
CMake stuff
Example of settings to CMake I use
Overrides RelWithDebugInfo from '-O2' to '-Og'
Also sets TYPE to 'Debug'
And example of setting the Eclipse executable path.
alias ncmake='CXX=g++ CC=gcc cmake -DCMAKE_C_FLAGS_RELWITHDEBINFO="-Og -g -DNDEBUG" -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-Og -g -DNDEBUG" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-v -DCMAKE_ECLIPSE_EXECUTABLE=/home/bo/eclipse/cpp-mars/eclipse/eclipse -DCMAKE_ECLIPSE_VERSION:STRING="4.5 (Mars)" -G "Eclipse CDT4 - Ninja"'
@bolry
Copy link
Author

bolry commented Dec 5, 2021

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