Wrap glfwTerminate() in DEBUG symbol

This prevents asan from spitting out a lot of unhelpful warnings.
This commit is contained in:
Archie Hilton 2024-05-14 22:01:38 +01:00
parent ec0155bc77
commit d3506737f0
2 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,7 @@ add_executable(Exponent
target_link_libraries(Exponent PUBLIC glfw glm::glm)
target_include_directories(Exponent PUBLIC ${CMAKE_SOURCE_DIR}/include)
target_compile_definitions(Exponent PUBLIC "$<$<CONFIG:DEBUG>:DEBUG>")
target_compile_definitions(Exponent PRIVATE GLFW_INCLUDE_NONE)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/shaders/shader.frag" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/shaders/")

View File

@ -175,6 +175,8 @@ int main() {
}
glfwDestroyWindow(w);
#ifndef DEBUG
glfwTerminate();
#endif
exit(EXIT_SUCCESS);
}