Skip to content

Commit

Permalink
Moves dependency resolution into Hylo's common CMakeModules. (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
dabrahams authored Mar 22, 2024
1 parent 6bf6efe commit 453ed1c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 60 deletions.
2 changes: 1 addition & 1 deletion Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
find_package(ArgumentParser REQUIRED)
find_package(SwiftArgumentParser REQUIRED)
find_package(SwiftSyntax REQUIRED)

add_executable(GenerateSwiftXCTestMain GenerateSwiftXCTestMain.swift)
Expand Down
23 changes: 21 additions & 2 deletions cmake/TopLevelDefaults.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# commands used to create an easy development environment when
# Commands used to create an easy development environment when
# building this project directly (not as a dependency).

# Without this, generated Xcode projects aren't debuggable.
set(CMAKE_XCODE_GENERATE_SCHEME YES)
include(GenerateSwiftXCTestMain_FetchDependencies)

#
# Hylo-standard dependency resolution.
#
include(FetchContent)

block()

set(FETCHCONTENT_TRY_FIND_PACKAGE_MODE NEVER)
FetchContent_Declare(Hylo-CMakeModules
GIT_REPOSITORY https://github.com/hylo-lang/CMakeModules.git
GIT_TAG main
OVERRIDE_FIND_PACKAGE
)

endblock()
FetchContent_MakeAvailable(Hylo-CMakeModules)

list(PREPEND CMAKE_MODULE_PATH ${hylo-cmakemodules_SOURCE_DIR})
57 changes: 0 additions & 57 deletions cmake/modules/GenerateSwiftXCTestMain_FetchDependencies.cmake

This file was deleted.

0 comments on commit 453ed1c

Please sign in to comment.