File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,16 @@ set(CMAKE_CXX_STANDARD 17)
55set (CMAKE_CXX_STANDARD_REQUIRED ON )
66set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
77
8- # Build with debug symbols by default
8+ # Default to Release with debug symbols
99if (NOT CMAKE_BUILD_TYPE )
10- set (CMAKE_BUILD_TYPE Debug )
10+ set (CMAKE_BUILD_TYPE RelWithDebInfo )
1111endif ()
1212
13- # Add debug flags
13+ # Compiler flags for different build types
1414set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0" )
1515set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0" )
16+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O2" )
17+ set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O2" )
1618
1719# Set proton directory (git submodule or Docker build)
1820if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR} /proton" )
Original file line number Diff line number Diff line change 1- .PHONY : all clean test build-amd64 build-arm64 build-all cross docker-push docker-test-build docker-test-run format
1+ .PHONY : all clean test build-amd64 build-arm64 build-all cross docker-push docker-test-build docker-test-run format local debug
22
33LIB_NAME = libparcagpucupti.so
44
@@ -48,13 +48,20 @@ cross:
4848 .
4949 @echo " Runtime container built for both platforms (cached, not loaded into Docker)"
5050
51- # Local build with CMake (for development/testing)
51+ # Local build with CMake (for development/testing) - default is Release with symbols
5252local :
53- @echo " === Building locally with CMake ==="
54- @cmake -B build-local -S . -DCMAKE_BUILD_TYPE=Debug
53+ @echo " === Building locally with CMake (RelWithDebInfo) ==="
54+ @cmake -B build-local -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo
5555 @cmake --build build-local
5656 @echo " Local build complete: build-local/lib/$( LIB_NAME) "
5757
58+ # Debug build with CMake (full debug, no optimizations)
59+ debug :
60+ @echo " === Building debug version with CMake ==="
61+ @cmake -B build-local -S . -DCMAKE_BUILD_TYPE=Debug
62+ @cmake --build build-local
63+ @echo " Debug build complete: build-local/lib/$( LIB_NAME) "
64+
5865# Run local tests
5966test : local
6067 @echo " === Running tests ==="
You can’t perform that action at this time.
0 commit comments