Skip to content

Commit

Permalink
Build fixes, add non-asan Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
tuokri committed Feb 6, 2025
1 parent c978012 commit 07a856a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
14 changes: 9 additions & 5 deletions build_commands_bot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ project(build_commands_bot)

set(CMAKE_CXX_STANDARD 23)

include(CMakePrintHelpers)

include(CheckIPOSupported)
check_ipo_supported(RESULT BO_IPO_SUPPORTED OUTPUT BO_IPO_ERROR)

Expand All @@ -12,6 +14,13 @@ else ()
message(STATUS "IPO / LTO not supported: ${BO_IPO_ERROR}")
endif ()

if (WIN32)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
cmake_print_variables(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
cmake_print_variables(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
endif ()

include(cmake/dpp.cmake)
include(cmake/uuid_v4.cmake)

Expand Down Expand Up @@ -45,11 +54,6 @@ find_package(
system
)

if (WIN32)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
endif ()

add_subdirectory(src)

# TODO: figure out smart way to build with different AVX/SSE versions
Expand Down
18 changes: 18 additions & 0 deletions build_commands_bot/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@
},
"binaryDir": "${sourceDir}/cmake-build-${presetName}"
},
{
"name": "config-windows-debug-x64-no-asan",
"displayName": "Windows Debug x64 configuration (no AddressSanitizer)",
"inherits": "config-base-windows-debug",
"architecture": {
"value": "x64",
"strategy": "external"
},
"binaryDir": "${sourceDir}/cmake-build-${presetName}",
"cacheVariables": {
"BO_COMPILE_OPTIONS": "/W4;/await:strict;/Zi"
}
},
{
"name": "config-windows-release-x64",
"displayName": "Windows Release x64 configuration",
Expand Down Expand Up @@ -149,6 +162,11 @@
"configurePreset": "config-windows-debug-x64",
"displayName": "Windows Debug x64"
},
{
"name": "windows-debug-x64-no-asan",
"configurePreset": "config-windows-debug-x64-no-asan",
"displayName": "Windows Debug x64 (no AddressSanitizer)"
},
{
"name": "windows-release-x64",
"configurePreset": "config-windows-release-x64",
Expand Down

0 comments on commit 07a856a

Please sign in to comment.