summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheGreatRambler <31906920+TheGreatRambler@users.noreply.github.com>2022-05-10 14:40:32 -0700
committerGitHub <noreply@github.com>2022-05-10 21:40:32 +0000
commit4a24f6cf2a287f91597378b97bf80cf1e4f9ecb2 (patch)
tree1b1a5c49588e5b2adcc68807167a2062bc43b8d0
parent5d43429f3c12cf7c2c43eb11d4e9b6b1816ed0ee (diff)
downloadbinaryen-4a24f6cf2a287f91597378b97bf80cf1e4f9ecb2.tar.gz
binaryen-4a24f6cf2a287f91597378b97bf80cf1e4f9ecb2.tar.bz2
binaryen-4a24f6cf2a287f91597378b97bf80cf1e4f9ecb2.zip
Add option to disable building tools (#4655)
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 820e78366..c7b45da0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,9 @@ option(BYN_ENABLE_ASSERTIONS "Enable assertions" ON)
# Turn this off to avoid the dependency on gtest.
option(BUILD_TESTS "Build GTest-based tests" ON)
+# Turn this off to build only the library.
+option(BUILD_TOOLS "Build tools" ON)
+
# Turn this on to build binaryen.js as ES5, with additional compatibility configuration for js_of_ocaml.
option(JS_OF_OCAML "Build binaryen.js for js_of_ocaml" OFF)
@@ -318,7 +321,12 @@ add_subdirectory(src/emscripten-optimizer)
add_subdirectory(src/passes)
add_subdirectory(src/support)
add_subdirectory(src/wasm)
-add_subdirectory(src/tools)
+
+if(BUILD_TOOLS)
+ # Build binaryen tools
+ add_subdirectory(src/tools)
+endif()
+
add_subdirectory(third_party)
# Configure lit tests