mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 09:03:42 +00:00
fix(CMakeLists.txt): fix MinGW compilation issues
This commit is contained in:
parent
1b571a6a46
commit
8e0c76457e
@ -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
|
||||
)
|
||||
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()
|
||||
Loading…
x
Reference in New Issue
Block a user