Просмотр исходного кода

No longer adding _DEBUG to debug builds (#1843)

This makes it possible to link the debug build to the release MSVC runtime libraries. MSVC adds the _DEBUG define automatically when the debug libraries are linked, so adding this manually is not needed.

Fixes #1842
Jorrit Rouwe 1 месяц назад
Родитель
Сommit
3707f5dbbc
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      Jolt/Jolt.cmake

+ 1 - 2
Jolt/Jolt.cmake

@@ -511,8 +511,7 @@ else()
 	target_precompile_headers(Jolt PRIVATE "$<$<NOT:$<CONFIG:ReleaseCoverage>>:${JOLT_PHYSICS_ROOT}/Jolt.h>")
 endif()
 
-# Set the debug/non-debug build flags
-target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Debug>:_DEBUG>")
+# Set the NDEBUG define for release builds
 target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Release,Distribution,ReleaseASAN,ReleaseUBSAN,ReleaseTSAN,ReleaseCoverage>:NDEBUG>")
 
 # ASAN and TSAN should use the default allocators