Skip to content

Commit

Permalink
First step in adding CUDA support
Browse files Browse the repository at this point in the history
Adding a CUDA example and adding CUDA/CUPTI headers through
CMake.
  • Loading branch information
khuck committed Jul 23, 2020
1 parent b308cd8 commit 1ed05a2
Show file tree
Hide file tree
Showing 6 changed files with 957 additions and 12 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
endif()
endif()

#if (${CMAKE_MAJOR_VERSION} GREATER 2)
# if (${CMAKE_MAJOR_VERSION} GREATER 1)
# cmake_policy(SET CMP0054 OLD)
# endif()
#endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/Modules)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
if(APEX_USE_CUDA)
enable_language(CUDA)
find_package(CUDAToolkit REQUIRED QUIET COMPONENTS CUPTI)
endif(APEX_USE_CUDA)

# if the user didn't specify, set the installation directory.
if(NOT DEFINED CMAKE_INSTALL_PREFIX OR CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
Expand Down Expand Up @@ -857,6 +856,7 @@ if(BUILD_TESTS)
endif(OMPT_FOUND)
add_subdirectory (src/unit_tests/C)
add_subdirectory (src/unit_tests/C++)
add_subdirectory (src/unit_tests/CUDA)
else()
#add_subdirectory (src/unit_tests/C EXCLUDE_FROM_ALL)
#add_subdirectory (src/unit_tests/C++ EXCLUDE_FROM_ALL)
Expand Down
Loading

0 comments on commit 1ed05a2

Please sign in to comment.