diff options
| author | Bryan Galdrikian <[email protected]> | 2017-02-24 09:32:20 -0800 |
|---|---|---|
| committer | Bryan Galdrikian <[email protected]> | 2017-02-24 09:32:20 -0800 |
| commit | e1bf674c16e3c8472b29574159c789cd3f0c64e0 (patch) | |
| tree | 9f0cfce09c71a2c27ff19589fcad6cd83504477c /test/compiler/cmake/windows | |
| parent | first commit (diff) | |
| download | blast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.tar.xz blast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.zip | |
Updating to [email protected] and [email protected] with a new directory structure.
NvBlast folder is gone, files have been moved to top level directory. README is changed to reflect this.
Diffstat (limited to 'test/compiler/cmake/windows')
| -rw-r--r-- | test/compiler/cmake/windows/BlastPerfTests-AT.cmake | 7 | ||||
| -rw-r--r-- | test/compiler/cmake/windows/BlastPerfTests.cmake | 31 | ||||
| -rw-r--r-- | test/compiler/cmake/windows/BlastUnitTests-AT.cmake | 9 | ||||
| -rw-r--r-- | test/compiler/cmake/windows/BlastUnitTests.cmake | 40 | ||||
| -rw-r--r-- | test/compiler/cmake/windows/CMakeLists.txt | 52 |
5 files changed, 139 insertions, 0 deletions
diff --git a/test/compiler/cmake/windows/BlastPerfTests-AT.cmake b/test/compiler/cmake/windows/BlastPerfTests-AT.cmake new file mode 100644 index 0000000..d1f39d6 --- /dev/null +++ b/test/compiler/cmake/windows/BlastPerfTests-AT.cmake @@ -0,0 +1,7 @@ +# Copy the dlls from the deps + +ADD_CUSTOM_COMMAND(TARGET BlastPerfTests POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${PXSHAREDSDK_DLLS} + ${BL_EXE_OUTPUT_DIR} +) diff --git a/test/compiler/cmake/windows/BlastPerfTests.cmake b/test/compiler/cmake/windows/BlastPerfTests.cmake new file mode 100644 index 0000000..fe1de27 --- /dev/null +++ b/test/compiler/cmake/windows/BlastPerfTests.cmake @@ -0,0 +1,31 @@ +# +# Build BlastPerfTests Windows +# + +FIND_PACKAGE(nvToolsExt $ENV{PM_nvToolsExt_VERSION} REQUIRED) + +SET(BLASTPERFTESTS_PLATFORM_COMMON_FILES +) + +SET(BLASTPERFTESTS_PLATFORM_INCLUDES + PRIVATE ${NVTOOLSEXT_INCLUDE_DIRS} +) + +SET(BLASTPERFTESTS_COMPILE_DEFS + # Common to all configurations + ${BLASTTESTS_SLN_COMPILE_DEFS} + + $<$<CONFIG:debug>:${BLASTTESTS_SLN_DEBUG_COMPILE_DEFS}> + $<$<CONFIG:checked>:${BLASTTESTS_SLN_CHECKED_COMPILE_DEFS}> + $<$<CONFIG:profile>:${BLASTTESTS_SLN_PROFILE_COMPILE_DEFS}> + $<$<CONFIG:release>:${BLASTTESTS_SLN_RELEASE_COMPILE_DEFS}> +) + +SET(BLASTPERFTESTS_PLATFORM_LINKED_LIBS + ${NVTOOLSEXT_LIB} +) + + +SET(BLASTPERFTESTS_PLATFORM_LINKED_LIBS $<$<OR:$<CONFIG:debug>,$<CONFIG:checked>,$<CONFIG:profile>>:${NVTOOLSEXT_LIB}>) + + diff --git a/test/compiler/cmake/windows/BlastUnitTests-AT.cmake b/test/compiler/cmake/windows/BlastUnitTests-AT.cmake new file mode 100644 index 0000000..6b47219 --- /dev/null +++ b/test/compiler/cmake/windows/BlastUnitTests-AT.cmake @@ -0,0 +1,9 @@ +# Copy the dlls from the deps + +ADD_CUSTOM_COMMAND(TARGET BlastUnitTests POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${PXSHAREDSDK_DLLS} + ${PHYSXSDK_DLLS} + ${NVTOOLSEXT_DLL} + $<TARGET_FILE_DIR:BlastUnitTests> + ) diff --git a/test/compiler/cmake/windows/BlastUnitTests.cmake b/test/compiler/cmake/windows/BlastUnitTests.cmake new file mode 100644 index 0000000..9397652 --- /dev/null +++ b/test/compiler/cmake/windows/BlastUnitTests.cmake @@ -0,0 +1,40 @@ +# +# Build BlastUnitTests Windows +# + +FIND_PACKAGE(nvToolsExt $ENV{PM_nvToolsExt_VERSION} REQUIRED) + +SET(BLASTUNITTESTS_PLATFORM_COMMON_FILES +) + +SET(BLASTUNITTESTS_PLATFORM_INCLUDES + PRIVATE ${NVTOOLSEXT_INCLUDE_DIRS} +) + +SET(BLASTUNITTESTS_COMPILE_DEFS + # Common to all configurations + ${BLASTTESTS_SLN_COMPILE_DEFS} + + $<$<CONFIG:debug>:${BLASTTESTS_SLN_DEBUG_COMPILE_DEFS}> + $<$<CONFIG:checked>:${BLASTTESTS_SLN_CHECKED_COMPILE_DEFS}> + $<$<CONFIG:profile>:${BLASTTESTS_SLN_PROFILE_COMPILE_DEFS}> + $<$<CONFIG:release>:${BLASTTESTS_SLN_RELEASE_COMPILE_DEFS}> +) + + +if(SERIALIZATION_INCLUDED) + MESSAGE("Serialization included") + SET(BLASTUNITTESTS_PLATFORM_LINKED_LIBS + NvBlastExtSerialization + ${NVTOOLSEXT_LIB} + ) +else() + MESSAGE("Serialization NOT NOT NOT included") + SET(BLASTUNITTESTS_PLATFORM_LINKED_LIBS + ${NVTOOLSEXT_LIB} + ) +endif() + + +#TARGET_LINK_LIBRARIES(NvBlast PUBLIC ${NVTOOLSEXT_LIBRARIES}) +#SET_TARGET_PROPERTIES(NvBlast PROPERTIES LINK_FLAGS "/MAP" ) diff --git a/test/compiler/cmake/windows/CMakeLists.txt b/test/compiler/cmake/windows/CMakeLists.txt new file mode 100644 index 0000000..635927b --- /dev/null +++ b/test/compiler/cmake/windows/CMakeLists.txt @@ -0,0 +1,52 @@ +#Platform specific compile flags and project includes + +#NOTE: Warnings lowered on the sample projects as it's got a lot of warnings. Defines below hide more. +SET(CMAKE_CXX_FLAGS "/GR- /GF /MP /Gy /EHsc /d2Zi+ /errorReport:prompt /fp:fast /Gd /Gm- /GS- /nologo /W3 /WX /Zc:forScope /Zc:inline /Zc:wchar_t /Zi") + +# Are we using the static or dynamic RT library? Whatever we use, it needs to be the same in any dependencies +# we pull in or we're potentially having mismatch issues. +IF(STATIC_WINCRT) + SET(WINCRT_NDEBUG "/MT") + SET(WINCRT_DEBUG "/MTd") +ELSE() + SET(WINCRT_NDEBUG "/MD") + SET(WINCRT_DEBUG "/MDd") +ENDIF() + +SET(CMAKE_CXX_FLAGS_DEBUG "/Od /RTCsu ${WINCRT_DEBUG}") +SET(CMAKE_CXX_FLAGS_CHECKED "/Ox ${WINCRT_NDEBUG}") +SET(CMAKE_CXX_FLAGS_PROFILE "/Ox ${WINCRT_NDEBUG}") +SET(CMAKE_CXX_FLAGS_RELEASE "/Ox ${WINCRT_NDEBUG}") + +# Build PDBs for all configurations +SET(CMAKE_SHARED_LINKER_FLAGS "/DEBUG") + +IF(CMAKE_CL_64) + ADD_DEFINITIONS(-DWIN64) +ENDIF(CMAKE_CL_64) + + +SET(BLASTTESTS_SLN_COMPILE_DEFS WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;) + +SET(BLASTTESTS_SLN_DEBUG_COMPILE_DEFS _DEBUG;NV_DEBUG=1;NV_NVTX=1;) +SET(BLASTTESTS_SLN_CHECKED_COMPILE_DEFS NDEBUG;NV_CHECKED=1;NV_NVTX=1;) +SET(BLASTTESTS_SLN_PROFILE_COMPILE_DEFS NDEBUG;NV_PROFILE=1;NV_NVTX=1;) +SET(BLASTTESTS_SLN_RELEASE_COMPILE_DEFS NDEBUG;NV_NVTX=1;) + +IF(CMAKE_CL_64) + SET(LIBPATH_SUFFIX "x64") +ELSE(CMAKE_CL_64) + SET(LIBPATH_SUFFIX "x86") +ENDIF(CMAKE_CL_64) + +SET(CMAKE_DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}_${LIBPATH_SUFFIX}") +SET(CMAKE_PROFILE_POSTFIX "${CMAKE_PROFILE_POSTFIX}_${LIBPATH_SUFFIX}") +SET(CMAKE_CHECKED_POSTFIX "${CMAKE_CHECKED_POSTFIX}_${LIBPATH_SUFFIX}") +SET(CMAKE_RELEASE_POSTFIX "${CMAKE_RELEASE_POSTFIX}_${LIBPATH_SUFFIX}") + + +# Include all of the projects +INCLUDE(${PROJECT_CMAKE_FILES_DIR}/BlastUnitTests.cmake) +INCLUDE(${PROJECT_CMAKE_FILES_DIR}/BlastPerfTests.cmake) + + |