Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake vars for module discovery and install #110

Open
wants to merge 1 commit into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ list(APPEND CMAKE_MESSAGE_CONTEXT ${PROJECT_NAME})
if(NOT DEFINED CMAKE_INSTALL_PREFIX OR ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr/local")
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/release)
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake)
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake)

# Make sure Cuda's bin directory is in ${PATH} so that check_language can find it.
set(ENV{PATH} "${CUDAToolkit_ROOT}/bin:$ENV{PATH}")
if(DEFINED CUDAToolkit_ROOT)
set(ENV{PATH} "${CUDAToolkit_ROOT}/bin:$ENV{PATH}")
endif()

include(CheckLanguage)
check_language(CUDA)
Expand Down
3 changes: 0 additions & 3 deletions arras/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ project(Arras
VERSION 4.9.0
LANGUAGES CXX)

set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/../release)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

set(Building_ArrasCore TRUE)

add_subdirectory(arras4_core)
Expand Down
6 changes: 4 additions & 2 deletions arras/distributed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ project(ArrasDistributed
VERSION 4.9.0
LANGUAGES CXX)

set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/../../release)
if (NOT Building_ArrasCore)
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/../../release)
endif()
# set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake)

# ================================================
Expand All @@ -26,7 +28,7 @@ find_package(Boost REQUIRED

# if we aren't building ArrasCore, get it from the release
if (NOT Building_ArrasCore)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_INSTALL_PREFIX}/cmake")
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/cmake")
find_package(ArrasCore REQUIRED)
endif()

Expand Down