Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
[BR] Changes to build PhysX on linux natively
Browse files Browse the repository at this point in the history
  • Loading branch information
qoh committed May 29, 2020
1 parent 4ea900a commit 8a2ad35
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions externals/cmakemodules/GetCompilerAndPlatform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ FUNCTION (GetPlatformBinName PLATFORM_BIN_NAME LIBPATH_SUFFIX)
ELSEIF(TARGET_BUILD_PLATFORM STREQUAL "android")
SET(RETVAL "android.${ANDROID_ABI}.fp-soft")
ELSEIF(TARGET_BUILD_PLATFORM STREQUAL "linux")
IF (${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "x86_64-unknown-linux-gnu" OR ${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "x86_64-linux-gnu")
IF (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
SET(RETVAL "linux.clang")
ELSEIF(${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "aarch64-unknown-linux-gnueabi" OR ${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "aarch64-linux-gnu")
ELSEIF(${CMAKE_CXX_COMPILER_ID} MATCHES "^ARM.*" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "arm")
SET(RETVAL "linux.aarch64")
ENDIF()
ENDIF()
Expand Down
15 changes: 15 additions & 0 deletions physx/buildtools/presets/public/linux-brickadia.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<preset name="linux-brickadia" comment="Linux clang PhysX SDK general settings (for Brickadia)">
<platform targetPlatform="linux" compiler="clang" />
<CMakeSwitches>
<cmakeSwitch name="PX_BUILDSNIPPETS" value="False" comment="Generate the snippets" />
<cmakeSwitch name="PX_BUILDPUBLICSAMPLES" value="False" comment="Generate the samples" />
<cmakeSwitch name="PX_GENERATE_STATIC_LIBRARIES" value="True" comment="Generate static libs" />
<cmakeSwitch name="PX_FLOAT_POINT_PRECISE_MATH" value="False" comment="Float point precise math" />
<cmakeSwitch name="NV_FORCE_64BIT_SUFFIX" value="True" comment="Force a 64 bit suffix for platforms that don't register properly." />
<cmakeSwitch name="NV_FORCE_32BIT_SUFFIX" value="False" comment="Force a 32 bit suffix for platforms that don't register properly." />
</CMakeSwitches>
<CMakeParams>
<cmakeParam name="CMAKE_INSTALL_PREFIX" value="install/linux/PhysX" comment="Install path relative to PhysX SDK root" />
</CMakeParams>
</preset>
2 changes: 1 addition & 1 deletion physx/source/compiler/cmake/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWERCASE)

#TODO: Fix warnings
SET(CLANG_WARNINGS "-ferror-limit=0 -Wall -Wextra -Werror -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-gnu-anonymous-struct -Wno-undef -Wno-unused-function -Wno-nested-anon-types -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-format-nonliteral -Wno-implicit-fallthrough -Wno-undefined-reinterpret-cast -Wno-disabled-macro-expansion -Wno-zero-as-null-pointer-constant -Wno-shadow -Wno-unknown-warning-option -Wno-atomic-implicit-seq-cst -Wno-extra-semi-stmt")
SET(CLANG_WARNINGS "-ferror-limit=0 -Wall -Wextra -Werror -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-gnu-anonymous-struct -Wno-undef -Wno-unused-function -Wno-nested-anon-types -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-format-nonliteral -Wno-implicit-fallthrough -Wno-undefined-reinterpret-cast -Wno-disabled-macro-expansion -Wno-zero-as-null-pointer-constant -Wno-shadow -Wno-unknown-warning-option -Wno-atomic-implicit-seq-cst -Wno-extra-semi-stmt -Wno-alloca -Wno-misleading-indentation -Wno-anon-enum-enum-conversion")
SET(GCC_WARNINGS "-Wall -Werror -Wno-invalid-offsetof -Wno-uninitialized")

IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
Expand Down
2 changes: 1 addition & 1 deletion physx/source/geomutils/src/gjk/GuGJKType.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace Gu

virtual Ps::aos::Vec3V getCenter() const { return mAToB.transform(getConvex<Convex>().getCenter()); }

PX_FORCE_INLINE Ps::aos::PsMatTransformV& getRelativeTransform(){ return mAToB; }
PX_FORCE_INLINE const Ps::aos::PsMatTransformV& getRelativeTransform(){ return mAToB; }

//ML: we can't force inline function, otherwise win modern will throw compiler error
PX_INLINE RelativeConvex<typename ConvexGeom<Convex>::Type > getGjkConvex() const
Expand Down

0 comments on commit 8a2ad35

Please sign in to comment.