How to Set Build Type to 'RelWithDebInfo' in CLion for Linux
To set the build type to 'RelWithDebInfo' in CLion for a Linux project, follow these steps:
- Open your project in CLion.
- Click the 'Edit Configurations' button in the top-right corner (or go to 'Run' > 'Edit Configurations').
- In the 'Run/Debug Configurations' window, select the configuration to modify (e.g., 'CMake Application').
- Under the 'Configuration' tab, find the 'CMake options' field.
- Add this line to the 'CMake options' field:
-DCMAKE_BUILD_TYPE=RelWithDebInfo - Click 'OK' to save the changes.
- Now, building and running your project will use the 'RelWithDebInfo' build type, enabling optimization and debugging information.
Note: Ensure your project has the appropriate CMakeLists.txt file to handle different build types.
原文地址: http://www.cveoy.top/t/topic/qtX8 著作权归作者所有。请勿转载和采集!