Skip to content

Commit

Permalink
remove MSVC 19.39 downgrade, fix crashes caused by the new version (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanfer authored Nov 16, 2024
1 parent f4d4c3f commit 4d69e4f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 30 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,11 @@ jobs:
c:/.conan
key: ${{ matrix.build_type }}-conan-cpp23-${{ hashFiles('**/conanfile.txt') }}

- name: Install MSVC build tools 14.39
run: |
& ".github\workflows\install_msvc1439.ps1"
- name: Configure
run: |
mkdir build
cd build
cmake .. -A x64 -T v143,version=14.39 -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CONFIGURATION_TYPES=${{matrix.build_type}} -DPLAYLUNKY_CONAN_VERBOSE=ON
cmake .. -A x64 -T v143 -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CONFIGURATION_TYPES=${{matrix.build_type}} -DPLAYLUNKY_CONAN_VERBOSE=ON
- name: Build
run: |
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/Nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,11 @@ jobs:
c:/.conan
key: ${{ matrix.build_type }}-conan-cpp23-${{ hashFiles('**/conanfile.txt') }}

- name: Install MSVC build tools 14.39
run: |
& ".github\workflows\install_msvc1439.ps1"
- name: Configure
run: |
mkdir build
cd build
cmake .. -A x64 -T v143,version=14.39 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DPLAYLUNKY_CONAN_VERBOSE=ON
cmake .. -A x64 -T v143 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DPLAYLUNKY_CONAN_VERBOSE=ON
- name: Build
run: |
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,11 @@ jobs:
c:/.conan
key: ${{ matrix.build_type }}-conan-cpp23-${{ hashFiles('**/conanfile.txt') }}

- name: Install MSVC build tools 14.39
run: |
& ".github\workflows\install_msvc1439.ps1"
- name: Configure
run: |
mkdir build
cd build
cmake .. -A x64 -T v143,version=14.39
cmake .. -A x64 -T v143
- name: Build
run: |
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/install_msvc1439.ps1

This file was deleted.

4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ run_conan()

project(Playlunky CXX C)

# Fix MSVC 19.40 crash with mutex due to spelunky using an old redist (mscvp140.dll)
# Related links: https://github.com/microsoft/STL/releases/tag/vs-2022-17.10 | https://github.com/actions/runner-images/issues/10004
add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/publish")
Expand Down
3 changes: 2 additions & 1 deletion cmake/conan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ macro(run_conan)
set(VERBOSE_SETTING "-vwarning")
endif()

set(CONAN_HOST_PROFILE "default;auto-cmake" CACHE STRING "Conan host profile" FORCE)
cmake_path(SET pl_conan_profile "${CMAKE_CURRENT_SOURCE_DIR}/cmake/conan_profile")
set(CONAN_HOST_PROFILE "${pl_conan_profile};auto-cmake" CACHE STRING "Conan host profile" FORCE)
set(CONAN_BUILD_PROFILE "default" CACHE STRING "Conan build profile" FORCE)
set(CONAN_INSTALL_ARGS "--build=missing;${VERBOSE_SETTING}" CACHE STRING "Command line arguments for conan install" FORCE)

Expand Down
3 changes: 3 additions & 0 deletions cmake/conan_profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[conf]
tools.info.package_id:confs=["tools.build:defines"]
tools.build:defines=["_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"]

0 comments on commit 4d69e4f

Please sign in to comment.