Skip to content

Commit 004a9dd

Browse files
[wasm][build] Exclude Tools from build when BUILD_TOOLS is OFF
This is a follow up to 5e7281b, which just adds the `BUILD_TOOLS` option but doesn't actually use it. This patch renames the option to follow the CMake conventions and uses it to actually exclude the tools from the build.
1 parent dbca8c7 commit 004a9dd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift)
4040
option(BUILD_SHARED_LIBS "build shared libraries" ON)
4141
option(HAS_LIBDISPATCH_API "has libdispatch API" ON)
4242
option(BUILD_NETWORKING "build FoundationNetworking module" ON)
43-
option(BUILD_TOOLS "build tools" ON)
43+
option(FOUNDATION_BUILD_TOOLS "build tools" ON)
4444
option(NS_CURL_ASSUME_FEATURES_MISSING "Assume that optional libcurl features are missing rather than test the library's version, for build debugging" NO)
4545

4646
if(HAS_LIBDISPATCH_API)

Sources/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ add_subdirectory(UUID)
22
add_subdirectory(Foundation)
33
add_subdirectory(FoundationNetworking)
44
add_subdirectory(FoundationXML)
5-
add_subdirectory(Tools)
5+
if(FOUNDATION_BUILD_TOOLS)
6+
add_subdirectory(Tools)
7+
endif()

0 commit comments

Comments
 (0)