Skip to content

Commit

Permalink
Fix ENABLE_AMICI_DEBUGGING=TRUE not working with MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Feb 20, 2024
1 parent 24685a3 commit 8a6d91d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ endif()

# Debug build?
if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}")
add_compile_options(-UNDEBUG -O0 -g)
add_compile_options(-UNDEBUG)
if(MSVC)
add_compile_options(-DEBUG)
else()
add_compile_options(-O0 -g)
endif()
set(CMAKE_BUILD_TYPE "Debug")
endif()

Expand Down
7 changes: 6 additions & 1 deletion src/CMakeLists.template.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ message(STATUS "Found AMICI ${Amici_DIR}")

# Debug build?
if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}")
add_compile_options(-UNDEBUG -O0 -g)
add_compile_options(-UNDEBUG)
if(MSVC)
add_compile_options(-DEBUG)
else()
add_compile_options(-O0 -g)
endif()
set(CMAKE_BUILD_TYPE "Debug")
endif()

Expand Down

0 comments on commit 8a6d91d

Please sign in to comment.