Skip to content

Commit 54d459c

Browse files
author
Gwen Mittertreiner
committed
Fix CMake build on Linux
- TestHelpers has a implicit dependency on Foundation through ArgumentParser, so it needs to link against Foundation - The find package calls should be REQUIRED and CONFIG so they can take advantage of CMake configs
1 parent 92646c0 commit 54d459c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ endif()
2222
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
2323
set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift)
2424

25-
find_package(dispatch QUIET)
26-
find_package(Foundation QUIET)
27-
find_package(XCTest QUIET)
25+
find_package(dispatch QUIET CONFIG REQUIRED)
26+
find_package(Foundation QUIET CONFIG REQUIRED)
27+
find_package(XCTest QUIET CONFIG REQUIRED)
2828

2929
add_subdirectory(Sources)
3030
if(BUILD_EXAMPLES)

Sources/ArgumentParserTestHelpers/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set_target_properties(ArgumentParserTestHelpers PROPERTIES
55
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
66
target_link_libraries(ArgumentParserTestHelpers PUBLIC
77
ArgumentParser
8-
XCTest)
8+
XCTest Foundation)

0 commit comments

Comments
 (0)