Skip to content

Commit 7b1c4dc

Browse files
committed
[swift-inspect] clarify CMake use block() to scope ArgumentParser properties
1 parent b0bae63 commit 7b1c4dc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/swift-inspect/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ FetchContent_Declare(ArgumentParser
2020
GIT_SHALLOW TRUE
2121
EXCLUDE_FROM_ALL
2222
FIND_PACKAGE_ARGS CONFIG)
23-
set(BUILD_TESTING OFF CACHE INTERNAL "Skip building ArgumentParser tests")
24-
set(BUILD_EXAMPLES OFF CACHE INTERNAL "Skip building ArgumentParser examples")
25-
FetchContent_MakeAvailable(ArgumentParser)
23+
24+
block(SCOPE_FOR VARIABLES)
25+
set(BUILD_TESTING OFF CACHE INTERNAL "Skip building ArgumentParser tests")
26+
set(BUILD_EXAMPLES OFF CACHE INTERNAL "Skip building ArgumentParser examples")
27+
FetchContent_MakeAvailable(ArgumentParser)
28+
endblock()
2629

2730
add_library(SymbolicationShims INTERFACE)
2831
target_include_directories(SymbolicationShims INTERFACE

0 commit comments

Comments
 (0)