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

Fetch content #446

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ if(NOT ${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
else()
set(CPM_RELEASE TRUE)
endif()
flagarde marked this conversation as resolved.
Show resolved Hide resolved
# Trick to use the find_package
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/CPM.cmake" "${CMAKE_CURRENT_BINARY_DIR}/CPM.cmake" COPYONLY
)
set(CPM_DIR "${CMAKE_CURRENT_BINARY_DIR}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really necessary. In my tests, these are not set upstream. I don't understand how but:

  • CPM_DIR (set in this file) and CURRENT_CPM_VERSION (set in the include(cmake/CPM.cmake)) do not propagate upstream
  • But we can still use the macro/functions defined in cmake/CPM.cmake

include(cmake/CPM.cmake)
endif()

Expand Down