From f4311e593faa00381a50e4ca363e0b6753cadb1d Mon Sep 17 00:00:00 2001 From: jadebenn Date: Sat, 16 Nov 2024 22:16:50 -0600 Subject: [PATCH] temp fix for MSVC debug builds --- CMakeLists.txt | 7 +++++-- CMakePresets.json | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e12c1091..0d9d394b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,10 +90,12 @@ elseif(WIN32) endif() # Our output dir -set(CMAKE_BINARY_DIR ${PROJECT_BINARY_DIR}) #set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) # unfortunately, forces all libraries to be built in series, which will slow down the build process # TODO make this not have to override the build type directories +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}) @@ -267,7 +269,8 @@ endif() # Set warning flags if(MSVC) - add_compile_options("/W4") + # add_compile_options("/W4") + # Want to enable warnings eventually, but WAY too much noise right now elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") add_compile_options("-Wuninitialized" "-Wold-style-cast") else() diff --git a/CMakePresets.json b/CMakePresets.json index 37773c9f..c4595ed5 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -9,7 +9,7 @@ { "name": "default", "displayName": "Default configure step", - "description": "Use 'build' dir and Unix makefiles"s, + "description": "Use 'build' dir and Unix makefiles", "binaryDir": "${sourceDir}/build", "environment": { "DLU_CONFIG_DIR": "${sourceDir}/build" @@ -49,6 +49,7 @@ }, { "name": "windows-msvc", + "inherits": "default", "displayName": "[Multi] Windows (MSVC)", "description": "Set architecture to 64-bit (b/c RakNet)", "generator": "Visual Studio 17 2022",