Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Correct issues with CMake install rules #331

Merged
merged 4 commits into from
Nov 15, 2022
Merged
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
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ else()
set(LIBCUDACXX_TOPLEVEL_PROJECT OFF)
endif()

set(PACKAGE_NAME libcudacxx)
set(PACKAGE_VERSION 11.0)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
project(libcudacxx NONE)

include(cmake/libcudacxxInstallRules.cmake)

if (NOT LIBCUDACXX_TOPLEVEL_PROJECT)
Expand All @@ -30,11 +35,6 @@ if (libcudacxx_ENABLE_CMAKE_TESTS)
return()
endif()

set(PACKAGE_NAME libcudacxx)
set(PACKAGE_VERSION 11.0)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
project(libcudacxx NONE)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(LLVM_PATH "${CMAKE_SOURCE_DIR}" CACHE STRING "" FORCE)

Expand Down
6 changes: 4 additions & 2 deletions cmake/libcudacxxInstallRules.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
option(libcudacxx_ENABLE_INSTALL_RULES
"Enable installation of libcudacxx" ${libcudacxx_TOPLEVEL_PROJECT}
"Enable installation of libcudacxx" ${LIBCUDACXX_TOPLEVEL_PROJECT}
)

if (NOT libcudacxx_ENABLE_INSTALL_RULES)
Expand All @@ -12,15 +12,17 @@ include(GNUInstallDirs)
# Libcudacxx headers
install(DIRECTORY "${libcudacxx_SOURCE_DIR}/include/cuda"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
PATTERN CMakeLists.txt EXCLUDE
)
install(DIRECTORY "${libcudacxx_SOURCE_DIR}/include/nv"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
PATTERN CMakeLists.txt EXCLUDE
)

# Libcudacxx cmake package
install(DIRECTORY "${libcudacxx_SOURCE_DIR}/lib/cmake/libcudacxx"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake"
PATTERN libcudacxx-header-search EXCLUDE
PATTERN *.cmake.in EXCLUDE
)

# Need to configure a file to store CMAKE_INSTALL_INCLUDEDIR
Expand Down