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

Commit

Permalink
cmake/install: mv ThrustAddSubdir handling to after project()
Browse files Browse the repository at this point in the history
We want to add the option to install in this case, which requires
the paths set by project()
  • Loading branch information
germasch committed Sep 26, 2020
1 parent e4d96a2 commit bd6d6e9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Support adding Thrust to a parent project via add_subdirectory.
# See examples/cmake/add_subdir/CMakeLists.txt for details.
if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
include(cmake/ThrustAddSubdir.cmake)
return()
endif()

# 3.15 is the minimum.
# 3.17 for nvc++/Feta
# 3.18 for C++17 + CUDA
Expand All @@ -18,6 +11,13 @@ endif()

project(Thrust NONE)

# Support adding Thrust to a parent project via add_subdirectory.
# See examples/cmake/add_subdir/CMakeLists.txt for details.
if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
include(cmake/ThrustAddSubdir.cmake)
return()
endif()

include(cmake/AppendOptionIfAvailable.cmake)

include(cmake/ThrustBuildCompilerTargets.cmake)
Expand Down

0 comments on commit bd6d6e9

Please sign in to comment.