Skip to content

Commit

Permalink
Move the logic inferring the value of CMAKE_INSTALL_PREFIX to it's …
Browse files Browse the repository at this point in the history
…own function (#74)

* The `morpheus_utils_initialize_package_manager` needs to be called prior to calling `project`, however the `CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT` isn't defined until after `project` has been called.
* Moves `CMAKE_INSTALL_PREFIX` logic to a new function named `morpheus_utils_initialize_install_prefix`
* This change is needed for nv-morpheus/Morpheus#1776

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: #74
  • Loading branch information
dagardner-nv authored Jul 16, 2024
1 parent 3e5d28d commit fb2c950
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ function(morpheus_utils_initialize_package_manager
)
# Ensure rapids CMake is setup
include(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/ensure_rapids_cmake_init.cmake)
endfunction()

function(morpheus_utils_initialize_install_prefix
USE_CONDA_VAR_NAME
)
set(USE_CONDA ${${USE_CONDA_VAR_NAME}})

if(USE_CONDA AND DEFINED ENV{CONDA_PREFIX})
Expand Down

0 comments on commit fb2c950

Please sign in to comment.