Skip to content

Commit

Permalink
[joltphysics] Update to 5.0.0 (microsoft#37997)
Browse files Browse the repository at this point in the history
  • Loading branch information
RT2Code authored Apr 6, 2024
1 parent 8d8cec2 commit 5fa0f07
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 23 deletions.
36 changes: 16 additions & 20 deletions ports/joltphysics/fix-export.diff
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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()

Expand All @@ -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()

Expand All @@ -69,9 +69,5 @@ index c0f7099..d447a3f 100644
+ $<INSTALL_INTERFACE:include>
+)
target_precompile_headers(Jolt PRIVATE ${JOLT_PHYSICS_ROOT}/Jolt.h)
target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Debug>:_DEBUG;JPH_PROFILE_ENABLED;JPH_DEBUG_RENDERER>")
-target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Release>:NDEBUG;JPH_PROFILE_ENABLED;JPH_DEBUG_RENDERER>")
+target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Release>:NDEBUG>")
target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Distribution>:NDEBUG>")
target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:ReleaseASAN>:NDEBUG;JPH_PROFILE_ENABLED;JPH_DISABLE_TEMP_ALLOCATOR;JPH_DISABLE_CUSTOM_ALLOCATOR;JPH_DEBUG_RENDERER>")
target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:ReleaseUBSAN>:NDEBUG;JPH_PROFILE_ENABLED;JPH_DEBUG_RENDERER>")

# Set the debug/non-debug build flags
4 changes: 3 additions & 1 deletion ports/joltphysics/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion ports/joltphysics/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3725,7 +3725,7 @@
"port-version": 1
},
"joltphysics": {
"baseline": "4.0.0",
"baseline": "5.0.0",
"port-version": 0
},
"josuttis-jthread": {
Expand Down
5 changes: 5 additions & 0 deletions versions/j-/joltphysics.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9f3c7087c8c79ef501b33872b730510d2a0a2b2b",
"version": "5.0.0",
"port-version": 0
},
{
"git-tree": "f7ea4a51e3f8cfa76e079f80d8ece87ef6695553",
"version": "4.0.0",
Expand Down

0 comments on commit 5fa0f07

Please sign in to comment.