Skip to content

Commit

Permalink
Disable CONSTEXPR_MUTEX_CONSTRUCTOR everywhere
Browse files Browse the repository at this point in the history
This is a workaround for the f*cked up Windows runner image that broke STL
  • Loading branch information
timoschwarzer committed Jun 9, 2024
1 parent 93ccb57 commit 1373fb3
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
steps:
- name: Enable Git support for long file paths
run: git config --system core.longpaths true
- name: Install VS2022 BuildTools 17.9.7
run: choco install -y visualstudio2022buildtools --version=117.9.7.0 --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --installChannelUri https://aka.ms/vs/17/release/180911598_-255012421/channel"
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- run: choco upgrade llvm # Workaround for https://github.com/actions/runner-images/issues/10001
Expand Down
2 changes: 2 additions & 0 deletions projects/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ message(STATUS "Assigning source groups.")
set_vc_structure("${CMAKE_CURRENT_SOURCE_DIR}" "${SOURCE_FILES};${PUBLIC_HEADER_FILES};${MISC_FILES};")
set_vc_structure_with_prefix("_project_settings" "${CMAKE_CURRENT_SOURCE_DIR}" "${MISC_FILES};")

target_compile_options(${PROJECT_NAME} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

install(
TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION "${WOTWR_INSTALL_DIR}"
Expand Down
2 changes: 2 additions & 0 deletions projects/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ message(STATUS "Assigning source groups.")
set_vc_structure("${CMAKE_CURRENT_SOURCE_DIR}" "${SOURCE_FILES};${PUBLIC_HEADER_FILES};${MISC_FILES}")
set_vc_structure_with_prefix("_project_settings" "${CMAKE_CURRENT_SOURCE_DIR}" "${MISC_FILES};")

target_compile_options(${PROJECT_NAME} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

message(STATUS "TESTING ${PROJECT_BINARY_DIR}")

install(
Expand Down
2 changes: 2 additions & 0 deletions projects/InjectLoader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ message(STATUS "Assigning source groups.")
set_vc_structure("${CMAKE_CURRENT_SOURCE_DIR}" "${SOURCE_FILES};${PUBLIC_HEADER_FILES};${MISC_FILES};")
set_vc_structure_with_prefix("_project_settings" "${CMAKE_CURRENT_SOURCE_DIR}" "${MISC_FILES};")

target_compile_options(${PROJECT_NAME} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

target_link_libraries(
${PROJECT_NAME}
)
Expand Down
2 changes: 2 additions & 0 deletions projects/InjectProxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ message(STATUS "Assigning source groups.")
set_vc_structure("${CMAKE_CURRENT_SOURCE_DIR}" "${SOURCE_FILES};${PUBLIC_HEADER_FILES};${MISC_FILES};")
set_vc_structure_with_prefix("_project_settings" "${CMAKE_CURRENT_SOURCE_DIR}" "${MISC_FILES};")

target_compile_options(${PROJECT_NAME} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

install(
TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION "${WOTWR_INSTALL_DIR}"
Expand Down
2 changes: 2 additions & 0 deletions projects/Injector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ message(STATUS "Assigning source groups.")
set_vc_structure("${CMAKE_CURRENT_SOURCE_DIR}" "${SOURCE_FILES};${PUBLIC_HEADER_FILES};${MISC_FILES};")
set_vc_structure_with_prefix("_project_settings" "${CMAKE_CURRENT_SOURCE_DIR}" "${MISC_FILES};")

target_compile_options(${PROJECT_NAME} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

target_link_libraries(
${PROJECT_NAME}
Common
Expand Down
1 change: 1 addition & 0 deletions projects/Modloader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ find_library(DETOURS_LIBRARY detours REQUIRED)
target_include_directories(${PROJECT_NAME} PRIVATE ${DETOURS_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${DETOURS_LIBRARY})

target_compile_options(${PROJECT_NAME} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

message(STATUS "Assigning source groups.")

Expand Down
2 changes: 2 additions & 0 deletions projects/Randomizer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ message(STATUS "Assigning source groups.")
set_vc_structure("${CMAKE_CURRENT_SOURCE_DIR}" "${SOURCE_FILES};${PUBLIC_HEADER_FILES};${MISC_FILES}")
set_vc_structure_with_prefix("_project_settings" "${CMAKE_CURRENT_SOURCE_DIR}" "${MISC_FILES};")

target_compile_options(${PROJECT_NAME} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

install(
TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION "${WOTWR_INSTALL_DIR}"
Expand Down
2 changes: 2 additions & 0 deletions projects/RandomizerTester/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ message(STATUS "Assigning source groups.")
set_vc_structure("${CMAKE_CURRENT_SOURCE_DIR}" "${SOURCE_FILES};${PUBLIC_HEADER_FILES};${MISC_FILES}")
set_vc_structure_with_prefix("_project_settings" "${CMAKE_CURRENT_SOURCE_DIR}" "${MISC_FILES};")

target_compile_options(${PROJECT_NAME} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

message(STATUS "TESTING ${PROJECT_BINARY_DIR}")

install(
Expand Down
2 changes: 2 additions & 0 deletions projects/TAS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ message(STATUS "Assigning source groups.")
set_vc_structure("${CMAKE_CURRENT_SOURCE_DIR}" "${SOURCE_FILES};${PUBLIC_HEADER_FILES};${MISC_FILES}")
set_vc_structure_with_prefix("_project_settings" "${CMAKE_CURRENT_SOURCE_DIR}" "${MISC_FILES};")

target_compile_options(${PROJECT_NAME} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

message(STATUS "TESTING ${PROJECT_BINARY_DIR}")

install(
Expand Down
3 changes: 3 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"overlay-triplets": [ "./vcpkg-triplets" ]
}
5 changes: 5 additions & 0 deletions vcpkg-triplets/x64-windows-static-md.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CXX_FLAGS "/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
set(VCPKG_C_FLAGS "")

0 comments on commit 1373fb3

Please sign in to comment.