Wrap glfwTerminate() in DEBUG symbol
This prevents asan from spitting out a lot of unhelpful warnings.
This commit is contained in:
parent
ec0155bc77
commit
d3506737f0
|
@ -9,6 +9,7 @@ add_executable(Exponent
|
||||||
target_link_libraries(Exponent PUBLIC glfw glm::glm)
|
target_link_libraries(Exponent PUBLIC glfw glm::glm)
|
||||||
target_include_directories(Exponent PUBLIC ${CMAKE_SOURCE_DIR}/include)
|
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)
|
target_compile_definitions(Exponent PRIVATE GLFW_INCLUDE_NONE)
|
||||||
|
|
||||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/shaders/shader.frag" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/shaders/")
|
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/shaders/shader.frag" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/shaders/")
|
||||||
|
|
|
@ -175,6 +175,8 @@ int main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
glfwDestroyWindow(w);
|
glfwDestroyWindow(w);
|
||||||
|
#ifndef DEBUG
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
|
#endif
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue