Skip to content

Commit

Permalink
CMAKE: -DACE_DEBUG=ON to enable ACE's debugging features
Browse files Browse the repository at this point in the history
  • Loading branch information
tehKaiN committed Sep 7, 2018
1 parent 57733d4 commit 8db9f0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Expand Up @@ -19,7 +19,6 @@ endif()

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DAMIGA -Wall -Wextra -fomit-frame-pointer")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DACE_DEBUG")
file(GLOB_RECURSE SOURCES src/*.c)
file(GLOB HEADERS_ACE include/ace/*.h)
file(GLOB HEADERS_ACE_GENERIC include/ace/generic/*.h)
Expand All @@ -33,6 +32,11 @@ set(
${HEADERS_ACE_MANAGERS} ${HEADERS_ACE_MANAGERS_VP} ${HEADERS_FIXMATH}
)

if(ACE_DEBUG)
# Add ACE debugging features to release build
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DACE_DEBUG")
endif()

include_directories(
${PROJECT_SOURCE_DIR}/include
)
Expand Down
7 changes: 7 additions & 0 deletions docs/programming/hello_world.md
Expand Up @@ -56,6 +56,13 @@ include_directories(
${PROJECT_SOURCE_DIR}/src
)
if(GAME_DEBUG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGAME_DEBUG")
endif()
if(ACE_DEBUG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DACE_DEBUG") # For ACE headers with ifdefs
endif()
# ACE
# If you cloned ACE into subdirectory, e.g. to `deps/ace` folder, use following:
add_subdirectory(deps/ace ace)
Expand Down

0 comments on commit 8db9f0d

Please sign in to comment.