Skip to content

Commit

Permalink
Separate the initialization of cuda from enabling it
Browse files Browse the repository at this point in the history
  • Loading branch information
dagardner-nv committed Dec 28, 2023
1 parent 1aef7f4 commit 5ebddf8
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,29 @@ set(MORPHEUS_UTILS_RAPIDS_VERSION ${MORPHEUS_RAPIDS_VERSION} CACHE STRING "" FOR
# Load morpheus utils and update CMake paths
include(morpheus_utils/load)

morpheus_utils_initialize_package_manager(
MORPHEUS_USE_CONDA
BUILD_SHARED_LIBS
)

# Initialize CUDA
# NOTE: This MUST occur before any 'project' calls because of rapids_cmake requirements.
if(DEFINED MORPHEUS_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES "${MORPHEUS_CUDA_ARCHITECTURES}")
endif()

morpheus_utils_initialize_cuda_arch(morpheus)

# Project definition
# Note intentionally excluding CUDA from the LANGUAGES list allowing us to set some clang specific settings later when
# we call morpheus_utils_enable_cuda()
project(morpheus
VERSION 24.03.00
LANGUAGES C CXX
)

# Configure project package manager (Must come after project)
morpheus_utils_initialize_package_manager(
MORPHEUS_USE_CONDA
BUILD_SHARED_LIBS
)

# Configure CUDA architecture
morpheus_utils_initialize_cuda()
morpheus_utils_enable_cuda()

rapids_cmake_write_version_file(${CMAKE_BINARY_DIR}/autogenerated/include/morpheus/version.hpp)

Expand Down

0 comments on commit 5ebddf8

Please sign in to comment.