Skip to content

Commit

Permalink
Merge pull request #133 from SimonRohou/codac2_dev
Browse files Browse the repository at this point in the history
[cmake] corrected FAST_RELEASE config (closes #128)
  • Loading branch information
SimonRohou authored Nov 6, 2024
2 parents 15dca95 + b6bc7f4 commit 85197c5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@
################################################################################

if(FAST_RELEASE)
add_compile_definitions(FAST_RELEASE=1)
add_compile_definitions(FAST_RELEASE)
message(STATUS "You are running Codac in fast release mode. (option -DCMAKE_BUILD_TYPE=Release is required)")
endif()

add_subdirectory(src) # C++ sources
Expand Down
5 changes: 5 additions & 0 deletions examples/01_batman/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@

# Compilation

if(FAST_RELEASE)
add_compile_definitions(FAST_RELEASE)
message(STATUS "You are running Codac in fast release mode. (option -DCMAKE_BUILD_TYPE=Release is required)")
endif()

add_executable(${PROJECT_NAME} main.cpp)
target_compile_options(${PROJECT_NAME} PUBLIC ${CODAC_CXX_FLAGS})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${CODAC_INCLUDE_DIRS})
Expand Down
5 changes: 5 additions & 0 deletions examples/02_centered_form/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@

# Compilation

if(FAST_RELEASE)
add_compile_definitions(FAST_RELEASE)
message(STATUS "You are running Codac in fast release mode. (option -DCMAKE_BUILD_TYPE=Release is required)")
endif()

add_executable(${PROJECT_NAME} main.cpp)
target_compile_options(${PROJECT_NAME} PUBLIC ${CODAC_CXX_FLAGS})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${CODAC_INCLUDE_DIRS})
Expand Down
5 changes: 5 additions & 0 deletions examples/03_sivia/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@

# Compilation

if(FAST_RELEASE)
add_compile_definitions(FAST_RELEASE)
message(STATUS "You are running Codac in fast release mode. (option -DCMAKE_BUILD_TYPE=Release is required)")
endif()

add_executable(${PROJECT_NAME} main.cpp)
target_compile_options(${PROJECT_NAME} PUBLIC ${CODAC_CXX_FLAGS})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${CODAC_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion src/core/tools/codac2_assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace codac2
{
#if defined FAST_RELEASE & defined NDEBUG

#define assert_release(ignore_test,ignore_message) ((void)0)
#define assert_release(ignore_test) ((void)0)

#else

Expand Down

0 comments on commit 85197c5

Please sign in to comment.