diff options
| author | Marijn Tamis <[email protected]> | 2018-05-03 18:22:48 +0200 |
|---|---|---|
| committer | Marijn Tamis <[email protected]> | 2018-05-03 18:22:48 +0200 |
| commit | ca32c59a58d37c1822e185a2d5f3d0d3e8943593 (patch) | |
| tree | b06b9eec03f34344ef8fc31aa147b2714d3962ee /NvCloth/compiler | |
| parent | Forced rename of platform folders in cmake dir. Git didn't pick this up before. (diff) | |
| download | archived-nvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.tar.xz archived-nvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.zip | |
NvCloth 1.1.4 Release. (24070740)
Diffstat (limited to 'NvCloth/compiler')
| -rw-r--r-- | NvCloth/compiler/cmake/ios/CMakeLists.txt | 49 | ||||
| -rw-r--r-- | NvCloth/compiler/cmake/ios/NvCloth.cmake | 59 | ||||
| -rw-r--r-- | NvCloth/compiler/cmake/linux/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | NvCloth/compiler/cmake/linux/NvCloth.cmake | 6 | ||||
| -rw-r--r-- | NvCloth/compiler/cmake/mac/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | NvCloth/compiler/cmake/windows/NvCloth.cmake | 2 |
6 files changed, 118 insertions, 6 deletions
diff --git a/NvCloth/compiler/cmake/ios/CMakeLists.txt b/NvCloth/compiler/cmake/ios/CMakeLists.txt new file mode 100644 index 0000000..c0c890e --- /dev/null +++ b/NvCloth/compiler/cmake/ios/CMakeLists.txt @@ -0,0 +1,49 @@ +cmake_minimum_required(VERSION 3.3) +MESSAGE("[NvCloth]cmake/ios/CMakeList.txt") +include(../common/CMakeLists.txt) + + +IF(NOT DEFINED TARGET_BUILD_PLATFORM) # Not defined, default to ios + SET(TARGET_BUILD_PLATFORM "ios") +ENDIF() + +SET(PLATFORM_LIST ios) + +IF (NOT ${TARGET_BUILD_PLATFORM} IN_LIST PLATFORM_LIST) + MESSAGE(FATAL_ERROR "Invalid platform:" ${TARGET_BUILD_PLATFORM}) +ENDIF() + +SET(CMAKE_CXX_FLAGS "-std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -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-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2 -Wno-unused-value -Wno-format-nonliteral -Wno-undef -Wno-double-promotion") +SET(CMAKE_SHARED_LINKER_FLAGS "") + +# Build debug info for all configurations +SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") +SET(CMAKE_CXX_FLAGS_CHECKED "-O3 -g") +SET(CMAKE_CXX_FLAGS_PROFILE "-O3 -g") +SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -g") + +#set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym") + +# Controls PX_NVTX for all projects on ios +SET(PHYSX_IOS_ENABLE_NVTX 0) + +# Disable cuda and dx for all projects on ios +SET(PHYSX_IOS_COMPILE_DEFS DISABLE_COMPUTE_PHYSX) +SET(PHYSX_IOS_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1;PX_NVTX=${PHYSX_IOS_ENABLE_NVTX};PX_SUPPORT_PVD=0) +SET(PHYSX_IOS_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1;PX_NVTX=${PHYSX_IOS_ENABLE_NVTX};PX_SUPPORT_PVD=0) +SET(PHYSX_IOS_PROFILE_COMPILE_DEFS NDEBUG;PX_PROFILE=1;PX_NVTX=${PHYSX_IOS_ENABLE_NVTX};PX_SUPPORT_PVD=0) +SET(PHYSX_IOS_RELEASE_COMPILE_DEFS NDEBUG;PX_SUPPORT_PVD=0) + +SET(PX_SELECT_COMPONENTS PxFoundation) +FIND_PACKAGE(PxShared REQUIRED) + +# Include the PxShared-exports.cmake file that PxShared created. There's other ways to do this, but there's a bunch of issues with it in a CI environment +# such as - we don't want to be installing any built artifacts on this server, etc. So for now we hack it. + +# Add PxShared as a dependency so that we can use project references +ADD_SUBDIRECTORY(${PXSHARED_ROOT_DIR}/src/compiler/cmake/ios "${CMAKE_CURRENT_BINARY_DIR}/pxshared_bin") + +# Include all of the projects +INCLUDE(NvCloth.cmake) + + diff --git a/NvCloth/compiler/cmake/ios/NvCloth.cmake b/NvCloth/compiler/cmake/ios/NvCloth.cmake new file mode 100644 index 0000000..e837e4a --- /dev/null +++ b/NvCloth/compiler/cmake/ios/NvCloth.cmake @@ -0,0 +1,59 @@ +# +# Build NvCloth (PROJECT not SOLUTION) +# + +MESSAGE("[NvCloth]cmake/ios/NvCloth.cmake") + +SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT}) +FIND_PACKAGE(PxShared REQUIRED) + + +#FIND_PACKAGE(nvToolsExt REQUIRED) + +SET(NVCLOTH_PLATFORM_INCLUDES + ${NVTOOLSEXT_INCLUDE_DIRS} +) + +SET(NVCLOTH_PLATFORM_SOURCE_FILES + #${PROJECT_ROOT_DIR}/src/neon/NeonCollision.cpp + #${PROJECT_ROOT_DIR}/src/neon/NeonSelfCollision.cpp + #${PROJECT_ROOT_DIR}/src/neon/NeonSolverKernel.cpp + #${PROJECT_ROOT_DIR}/src/neon/SwCollisionHelpers.h +) + +# Use generator expressions to set config specific preprocessor definitions +SET(NVCLOTH_COMPILE_DEFS + NV_CLOTH_IMPORT=PX_DLL_EXPORT + NV_CLOTH_ENABLE_DX11=0 + NV_CLOTH_ENABLE_CUDA=0 + + # Common to all configurations + ${PHYSX_IOS_COMPILE_DEFS};PX_PHYSX_CORE_EXPORTS + + $<$<CONFIG:debug>:${PHYSX_IOS_DEBUG_COMPILE_DEFS};PX_PHYSX_DLL_NAME_POSTFIX=DEBUG;> + $<$<CONFIG:checked>:${PHYSX_IOS_CHECKED_COMPILE_DEFS};PX_PHYSX_DLL_NAME_POSTFIX=CHECKED;> + $<$<CONFIG:profile>:${PHYSX_IOS_PROFILE_COMPILE_DEFS};PX_PHYSX_DLL_NAME_POSTFIX=PROFILE;> + $<$<CONFIG:release>:${PHYSX_IOS_RELEASE_COMPILE_DEFS};> +) + +SET(NVCLOTH_LIBTYPE STATIC) + +# include common PhysX settings +INCLUDE(../common/NvCloth.cmake) + + +# Add linked libraries +# TARGET_LINK_LIBRARIES(NvCloth PUBLIC ${NVTOOLSEXT_LIBRARIES} LowLevel LowLevelAABB LowLevelCloth LowLevelDynamics LowLevelParticles PhysXCommon PhysXGpu PxFoundation PxPvdSDK PxTask SceneQuery SimulationController) + +TARGET_LINK_LIBRARIES(NvCloth PUBLIC PxFoundation) + +SET_TARGET_PROPERTIES(NvCloth PROPERTIES + LINK_FLAGS_DEBUG "" + LINK_FLAGS_CHECKED "" + LINK_FLAGS_PROFILE "" + LINK_FLAGS_RELEASE "" +) + +# enable -fPIC so we can link static libs with the editor +SET_TARGET_PROPERTIES(NvCloth PROPERTIES POSITION_INDEPENDENT_CODE TRUE) +MESSAGE("[NvCloth]cmake/ios/NvCloth.cmake END") diff --git a/NvCloth/compiler/cmake/linux/CMakeLists.txt b/NvCloth/compiler/cmake/linux/CMakeLists.txt index d6c8db6..5bd8323 100644 --- a/NvCloth/compiler/cmake/linux/CMakeLists.txt +++ b/NvCloth/compiler/cmake/linux/CMakeLists.txt @@ -14,9 +14,9 @@ IF (NOT ${TARGET_BUILD_PLATFORM} IN_LIST PLATFORM_LIST) ENDIF() IF (DEFINED PX_32BIT) -SET(CMAKE_CXX_FLAGS "-arch i386 -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -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-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2 -Wno-unused-value -Wno-format-nonliteral -Wno-undef") +SET(CMAKE_CXX_FLAGS "-arch i386 -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -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-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2 -Wno-unused-value -Wno-format-nonliteral -Wno-undef") ELSEIF() -SET(CMAKE_CXX_FLAGS "-arch x86_64 -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -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-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2 -Wno-unused-value -Wno-format-nonliteral -Wno-undef") +SET(CMAKE_CXX_FLAGS "-arch x86_64 -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -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-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2 -Wno-unused-value -Wno-format-nonliteral -Wno-undef") ENDIF() SET(CMAKE_SHARED_LINKER_FLAGS "") diff --git a/NvCloth/compiler/cmake/linux/NvCloth.cmake b/NvCloth/compiler/cmake/linux/NvCloth.cmake index 323efd5..1d53df6 100644 --- a/NvCloth/compiler/cmake/linux/NvCloth.cmake +++ b/NvCloth/compiler/cmake/linux/NvCloth.cmake @@ -119,7 +119,11 @@ LIST(APPEND NVCLOTH_COMPILE_DEFS ) ENDIF() -SET(NVCLOTH_LIBTYPE SHARED) +IF(DEFINED PX_STATIC_LIBRARIES) + SET(NVCLOTH_LIBTYPE STATIC) +ELSE() + SET(NVCLOTH_LIBTYPE SHARED) +ENDIF() # include common NvCloth settings INCLUDE(../common/NvCloth.cmake) diff --git a/NvCloth/compiler/cmake/mac/CMakeLists.txt b/NvCloth/compiler/cmake/mac/CMakeLists.txt index b99d60e..83ca14d 100644 --- a/NvCloth/compiler/cmake/mac/CMakeLists.txt +++ b/NvCloth/compiler/cmake/mac/CMakeLists.txt @@ -14,9 +14,9 @@ IF (NOT ${TARGET_BUILD_PLATFORM} IN_LIST PLATFORM_LIST) ENDIF() IF (DEFINED PX_32BIT) -SET(CMAKE_CXX_FLAGS "-arch i386 -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -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-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2 -Wno-unused-value -Wno-format-nonliteral -Wno-undef") +SET(CMAKE_CXX_FLAGS "-arch i386 -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -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-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2 -Wno-unused-value -Wno-format-nonliteral -Wno-undef -Wno-double-promotion") ELSEIF() -SET(CMAKE_CXX_FLAGS "-arch x86_64 -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -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-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2 -Wno-unused-value -Wno-format-nonliteral -Wno-undef") +SET(CMAKE_CXX_FLAGS "-arch x86_64 -msse2 -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -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-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2 -Wno-unused-value -Wno-format-nonliteral -Wno-undef -Wno-double-promotion") ENDIF() SET(CMAKE_SHARED_LINKER_FLAGS "") diff --git a/NvCloth/compiler/cmake/windows/NvCloth.cmake b/NvCloth/compiler/cmake/windows/NvCloth.cmake index 2a757f5..cc8ca0f 100644 --- a/NvCloth/compiler/cmake/windows/NvCloth.cmake +++ b/NvCloth/compiler/cmake/windows/NvCloth.cmake @@ -107,7 +107,7 @@ set( # Important: to be able to debug CUDA kernel (correct stepping and workable warp watches), # you should add the -G (short for --device-debug) option to the line below. # Don't forget to remove it afterwards, since the code execution will be very slow with this flag. - -use_fast_math -ftz=true -prec-div=false -prec-sqrt=false -lineinfo -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -D_USE_MATH_DEFINES -DNDEBUG -DPX_PROFILE=1 + -use_fast_math -ftz=true -prec-div=false -prec-sqrt=false -lineinfo -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -gencode arch=compute_60,code=sm_60 -D_USE_MATH_DEFINES -DNDEBUG -DPX_PROFILE=1 ) SET(NVCLOTH_CUDA_FILES ${PROJECT_ROOT_DIR}/src/cuda/CuSolverKernel.cu |