mirror of
https://github.com/apple/swift-argument-parser.git
synced 2026-05-07 20:12:41 +00:00
Suppress needlessly alarming messages (#628)
These packages are not marked `REQUIRED` and when this project is used as a dependency of another CMake project they don't need to be findable when this CMakeLists.txt is read. They may in fact be found later in the configuration process, so the messages when they actually _are_ needed, so the messages ``` -- Could NOT find dispatch (missing: dispatch_DIR) -- Could NOT find Foundation (missing: Foundation_DIR) -- Could NOT find XCTest (missing: XCTest_DIR) ``` are needlessly alarming.
This commit is contained in:
+7
-3
@@ -21,9 +21,13 @@ include(CTest)
|
||||
include(GNUInstallDirs)
|
||||
include(SwiftSupport)
|
||||
|
||||
find_package(dispatch CONFIG)
|
||||
find_package(Foundation CONFIG)
|
||||
find_package(XCTest CONFIG)
|
||||
if(NOT APPLE)
|
||||
find_package(dispatch CONFIG)
|
||||
find_package(Foundation CONFIG)
|
||||
if(BUILD_TESTING)
|
||||
find_package(XCTest CONFIG)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(Sources)
|
||||
if(BUILD_EXAMPLES)
|
||||
|
||||
Reference in New Issue
Block a user