From 5ebddf8e70e12a6fba752d829cfcda751ef2a1c8 Mon Sep 17 00:00:00 2001 From: David Gardner Date: Thu, 28 Dec 2023 12:55:14 -0800 Subject: [PATCH] Separate the initialization of cuda from enabling it --- CMakeLists.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f3fe447cb7..367934d8b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)