Skip to content

Commit 90bd7ce

Browse files
committed
Make default RelWithDebInfo
1 parent 79eed48 commit 90bd7ce

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
77

8-
# Build with debug symbols by default
8+
# Default to Release with debug symbols
99
if(NOT CMAKE_BUILD_TYPE)
10-
set(CMAKE_BUILD_TYPE Debug)
10+
set(CMAKE_BUILD_TYPE RelWithDebInfo)
1111
endif()
1212

13-
# Add debug flags
13+
# Compiler flags for different build types
1414
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
1515
set(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)
1820
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/proton")

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

33
LIB_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
5252
local:
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
5966
test: local
6067
@echo "=== Running tests ==="

0 commit comments

Comments
 (0)