MakeAvailable.cmake 529 B

1234567891011121314151617181920
  1. include(FetchContent)
  2. FetchContent_Declare(
  3. WithProject
  4. SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/WithProject
  5. )
  6. FetchContent_Declare(
  7. WithoutProject
  8. SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/WithoutProject
  9. )
  10. # Order is important and will be verified by test output
  11. FetchContent_MakeAvailable(WithProject WithoutProject)
  12. get_property(addedWith GLOBAL PROPERTY FetchWithProject SET)
  13. if(NOT addedWith)
  14. message(SEND_ERROR "Subdir with CMakeLists.txt not added")
  15. endif()
  16. include(${withoutproject_SOURCE_DIR}/confirmMessage.cmake)