Created
July 5, 2025 13:54
-
-
Save dadencukillia/6124bfe5ae02db95df38b8ab57feef11 to your computer and use it in GitHub Desktop.
Useful preferences for CMake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Autocompletition for clangd | |
| set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | |
| # Locate libraries in binary directory | |
| set(CMAKE_INSTALL_RPATH "$ORIGIN") | |
| set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) | |
| # Release/Debug build mode | |
| set(CMAKE_BUILD_TYPE Release) | |
| set(CMAKE_BUILD_TYPE Debug) | |
| # Compile static libraries | |
| set(BUILD_SHARED_LIBS false) | |
| # Use C++17 | |
| set(CMAKE_CXX_STANDARD 17) | |
| # Put all libraries in the "libs" directory | |
| set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/libs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment