From 8e0c76457ee30d4626b12c97881ea68b830df609 Mon Sep 17 00:00:00 2001 From: Nimac0 Date: Mon, 29 Apr 2024 22:15:38 +0200 Subject: [PATCH] fix(CMakeLists.txt): fix MinGW compilation issues --- CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 797b71e..5149005 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,13 +36,14 @@ target_link_libraries(${PROJECT_NAME} PUBLIC # should be private when all SDL fu ) if(CMAKE_BUILD_TYPE MATCHES "Debug") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address -fno-omit-frame-pointer") - target_link_libraries(${PROJECT_NAME} PRIVATE "-fsanitize=address") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") endif() # link/copy compile commands to root dir -file(CREATE_LINK - ${PROJECT_BINARY_DIR}/compile_commands.json - ${PROJECT_SOURCE_DIR}/compile_commands.json - COPY_ON_ERROR SYMBOLIC -) \ No newline at end of file +if(EXISTS ${PROJECT_BINARY_DIR}/compile_commands.json) + file(CREATE_LINK + ${PROJECT_BINARY_DIR}/compile_commands.json + ${PROJECT_SOURCE_DIR}/compile_commands.json + COPY_ON_ERROR SYMBOLIC + ) +endif() \ No newline at end of file