From 5fa0f075ea51f305b627ecd5e050a363707353ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Sat, 6 Apr 2024 02:20:31 +0200 Subject: [PATCH] [joltphysics] Update to 5.0.0 (#37997) --- ports/joltphysics/fix-export.diff | 36 ++++++++++++++----------------- ports/joltphysics/portfile.cmake | 4 +++- ports/joltphysics/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/j-/joltphysics.json | 5 +++++ 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/ports/joltphysics/fix-export.diff b/ports/joltphysics/fix-export.diff index a49dba54cfa338..7fb2ea049631a0 100644 --- a/ports/joltphysics/fix-export.diff +++ b/ports/joltphysics/fix-export.diff @@ -1,8 +1,8 @@ diff --git a/Build/CMakeLists.txt b/Build/CMakeLists.txt -index cc4cf1d..330b987 100644 +index 830453f..5c9f155 100644 --- a/Build/CMakeLists.txt +++ b/Build/CMakeLists.txt -@@ -100,8 +100,8 @@ if (("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR "${CMAKE_SYSTEM_NAME}" STREQUA +@@ -122,8 +122,8 @@ if (MSVC) endif() # Set compiler flags for various configurations @@ -13,18 +13,18 @@ index cc4cf1d..330b987 100644 set(CMAKE_CXX_FLAGS_DISTRIBUTION "/GS- /Gy /O2 /Oi /Ot") set(CMAKE_CXX_FLAGS_RELEASEASAN "-fsanitize=address /Od") set(CMAKE_CXX_FLAGS_RELEASEUBSAN "-fsanitize=undefined,implicit-conversion,float-divide-by-zero,local-bounds -fno-sanitize-recover=all") -@@ -160,8 +160,8 @@ elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQU - endif() +@@ -184,8 +184,8 @@ else() # Set compiler flags for various configurations -- set(CMAKE_CXX_FLAGS_DEBUG "") -- set(CMAKE_CXX_FLAGS_RELEASE "-O3") -+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") -+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") - set(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3") + if (OVERRIDE_CXX_FLAGS) +- set(CMAKE_CXX_FLAGS_DEBUG "") +- set(CMAKE_CXX_FLAGS_RELEASE "-O3") ++ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") ++ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") + endif() + set(CMAKE_CXX_FLAGS_DISTRIBUTION "${CMAKE_CXX_FLAGS_RELEASE}") set(CMAKE_CXX_FLAGS_RELEASEASAN "-fsanitize=address") - set(CMAKE_CXX_FLAGS_RELEASEUBSAN "-fsanitize=undefined,implicit-conversion,float-divide-by-zero,local-bounds -fno-sanitize-recover=all") -@@ -205,7 +205,11 @@ if (XCODE) +@@ -232,7 +232,11 @@ if (XCODE) endif() # Install Jolt library and includes @@ -37,7 +37,7 @@ index cc4cf1d..330b987 100644 foreach(SRC_FILE ${JOLT_PHYSICS_SRC_FILES}) string(REPLACE ${PHYSICS_REPO_ROOT} "" RELATIVE_SRC_FILE ${SRC_FILE}) get_filename_component(DESTINATION_PATH ${RELATIVE_SRC_FILE} DIRECTORY) -@@ -214,6 +218,17 @@ foreach(SRC_FILE ${JOLT_PHYSICS_SRC_FILES}) +@@ -241,6 +245,17 @@ foreach(SRC_FILE ${JOLT_PHYSICS_SRC_FILES}) endif() endforeach() @@ -56,10 +56,10 @@ index cc4cf1d..330b987 100644 if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) # Ability to turn ON/OFF individual applications diff --git a/Jolt/Jolt.cmake b/Jolt/Jolt.cmake -index c0f7099..d447a3f 100644 +index 2b28284..43912a5 100644 --- a/Jolt/Jolt.cmake +++ b/Jolt/Jolt.cmake -@@ -474,10 +474,13 @@ if (BUILD_SHARED_LIBS) +@@ -487,7 +487,10 @@ if (BUILD_SHARED_LIBS) target_compile_definitions(Jolt PRIVATE JPH_BUILD_SHARED_LIBRARY) endif() @@ -69,9 +69,5 @@ index c0f7099..d447a3f 100644 + $ +) target_precompile_headers(Jolt PRIVATE ${JOLT_PHYSICS_ROOT}/Jolt.h) - target_compile_definitions(Jolt PUBLIC "$<$:_DEBUG;JPH_PROFILE_ENABLED;JPH_DEBUG_RENDERER>") --target_compile_definitions(Jolt PUBLIC "$<$:NDEBUG;JPH_PROFILE_ENABLED;JPH_DEBUG_RENDERER>") -+target_compile_definitions(Jolt PUBLIC "$<$:NDEBUG>") - target_compile_definitions(Jolt PUBLIC "$<$:NDEBUG>") - target_compile_definitions(Jolt PUBLIC "$<$:NDEBUG;JPH_PROFILE_ENABLED;JPH_DISABLE_TEMP_ALLOCATOR;JPH_DISABLE_CUSTOM_ALLOCATOR;JPH_DEBUG_RENDERER>") - target_compile_definitions(Jolt PUBLIC "$<$:NDEBUG;JPH_PROFILE_ENABLED;JPH_DEBUG_RENDERER>") + + # Set the debug/non-debug build flags diff --git a/ports/joltphysics/portfile.cmake b/ports/joltphysics/portfile.cmake index 3e2cf0000a7d18..98a0193229f768 100644 --- a/ports/joltphysics/portfile.cmake +++ b/ports/joltphysics/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jrouwe/JoltPhysics REF "v${VERSION}" - SHA512 9b7530c37fc865682c4a130afc87daef1b038d1f457d2330a5253f35e3a4b6399ad738e97961f0ca8a9ae41ed999179e1c864dc699c5c93341ce4b6e6b2a1a61 + SHA512 802f6e1a50270c7348fd3740e0cd3f6e9c05d6f1ba52e1c2c890172897a33f34761165f6eabc4d6f36d6d5055017e9e9bd06b165239269634299f0674c0aaa26 HEAD_REF master PATCHES fix-export.diff @@ -30,6 +30,8 @@ vcpkg_cmake_configure( -DENABLE_ALL_WARNINGS=OFF OPTIONS_RELEASE -DGENERATE_DEBUG_SYMBOLS=OFF + -DDEBUG_RENDERER_IN_DEBUG_AND_RELEASE=OFF + -DPROFILER_IN_DEBUG_AND_RELEASE=OFF ) vcpkg_cmake_install() diff --git a/ports/joltphysics/vcpkg.json b/ports/joltphysics/vcpkg.json index 85c829fadeb885..e4cc909d8aec9c 100644 --- a/ports/joltphysics/vcpkg.json +++ b/ports/joltphysics/vcpkg.json @@ -1,6 +1,6 @@ { "name": "joltphysics", - "version": "4.0.0", + "version": "5.0.0", "description": "A multi core friendly rigid body physics and collision detection library suitable for games and VR applications", "homepage": "https://github.com/jrouwe/JoltPhysics", "license": "MIT", diff --git a/versions/baseline.json b/versions/baseline.json index e4953193260805..5db40a273ec268 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3725,7 +3725,7 @@ "port-version": 1 }, "joltphysics": { - "baseline": "4.0.0", + "baseline": "5.0.0", "port-version": 0 }, "josuttis-jthread": { diff --git a/versions/j-/joltphysics.json b/versions/j-/joltphysics.json index 10e69e5780c4e0..959855e93e90b5 100644 --- a/versions/j-/joltphysics.json +++ b/versions/j-/joltphysics.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "9f3c7087c8c79ef501b33872b730510d2a0a2b2b", + "version": "5.0.0", + "port-version": 0 + }, { "git-tree": "f7ea4a51e3f8cfa76e079f80d8ece87ef6695553", "version": "4.0.0",