Browse Source

Added cusplibrary as a git submodule.

Former-commit-id: 152764c8f3
tempestpy_adaptions
PBerger 11 years ago
parent
commit
a964846e2d
  1. 3
      .gitmodules
  2. 1
      resources/3rdparty/cusplibrary
  3. 53
      resources/cmake/FindThrust.cmake
  4. 9
      resources/cudaForStorm/CMakeLists.txt

3
.gitmodules

@ -0,0 +1,3 @@
[submodule "resources/3rdparty/cusplibrary"]
path = resources/3rdparty/cusplibrary
url = https://github.com/cusplibrary/cusplibrary.git

1
resources/3rdparty/cusplibrary

@ -0,0 +1 @@
Subproject commit d8d7d9e97add8db08ef0ad5c0a7e9929fd83ce3c

53
resources/cmake/FindThrust.cmake

@ -0,0 +1,53 @@
#
# FindThrust
#
# This module finds the Thrust header files and extrats their version. It
# sets the following variables.
#
# THRUST_INCLUDE_DIR - Include directory for thrust header files. (All header
# files will actually be in the thrust subdirectory.)
# THRUST_VERSION - Version of thrust in the form "major.minor.patch".
#
find_path( THRUST_INCLUDE_DIR
HINTS
/usr/include/cuda
/usr/local/include
/usr/local/cuda/include
${CUDA_INCLUDE_DIRS}
NAMES thrust/version.h
DOC "Thrust headers"
)
if( THRUST_INCLUDE_DIR )
list( REMOVE_DUPLICATES THRUST_INCLUDE_DIR )
endif( THRUST_INCLUDE_DIR )
# Find thrust version
file( STRINGS ${THRUST_INCLUDE_DIR}/thrust/version.h
version
REGEX "#define THRUST_VERSION[ \t]+([0-9x]+)"
)
string( REGEX REPLACE
"#define THRUST_VERSION[ \t]+"
""
version
"${version}"
)
string( REGEX MATCH "^[0-9]" major ${version} )
string( REGEX REPLACE "^${major}00" "" version "${version}" )
string( REGEX MATCH "^[0-9]" minor ${version} )
string( REGEX REPLACE "^${minor}0" "" version "${version}" )
set( THRUST_VERSION "${major}.${minor}.${version}")
set( THRUST_MAJOR_VERSION "${major}")
set( THRUST_MINOR_VERSION "${minor}")
# Check for required components
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( Thrust
REQUIRED_VARS THRUST_INCLUDE_DIR
VERSION_VAR THRUST_VERSION
)
set(THRUST_INCLUDE_DIRS ${THRUST_INCLUDE_DIR})
mark_as_advanced(THRUST_INCLUDE_DIR)

9
resources/cudaForStorm/CMakeLists.txt

@ -38,6 +38,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/../cmake/")
find_package(CUDA REQUIRED)
find_package(Doxygen REQUIRED)
find_package(Threads REQUIRED)
find_package(Thrust REQUIRED)
# If the DEBUG option was turned on, we will target a debug version and a release version otherwise
if (CUDAFORSTORM_DEBUG)
@ -209,6 +210,14 @@ include_directories(${CUDA_INCLUDE_DIRS})
include_directories(${THREADS_INCLUDE_DIRS})
target_link_libraries(cudaForStorm ${CMAKE_THREAD_LIBS_INIT})
#############################################################
##
## Thrust
##
#############################################################
include_directories(${THRUST_INCLUDE_DIR})
message(STATUS "StoRM (CudaPlugin) - Found Thrust Version ${THRUST_VERSION}")
if (MSVC)
# Add the DebugHelper DLL
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} Dbghelp.lib")

Loading…
Cancel
Save