summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2017-01-31 16:27:50 -0800
committerGitHub <noreply@github.com>2017-01-31 16:27:50 -0800
commit7bc8f14d8699f56777a763f99ad8098fcf7c0583 (patch)
treec838d496b731f846362328076f87a4da364c4065 /CMakeLists.txt
parent64284970344ce5463adada38e348230256b31226 (diff)
downloadbinaryen-7bc8f14d8699f56777a763f99ad8098fcf7c0583.tar.gz
binaryen-7bc8f14d8699f56777a763f99ad8098fcf7c0583.tar.bz2
binaryen-7bc8f14d8699f56777a763f99ad8098fcf7c0583.zip
Make ast_utils into a library (#892)
Split ExpressionAnalyzer and ExpressionManipulator into cpp files, and turn their giant template functions into simple functions which take a callback. More organization, fewer mammoth headers, makes the build a few seconds faster, and the binaries a couple MB smaller.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 74471d1e5..e557b289c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,6 +118,7 @@ IF (UNIX AND
ENDIF()
# Static libraries
+ADD_SUBDIRECTORY(src/ast)
ADD_SUBDIRECTORY(src/asmjs)
ADD_SUBDIRECTORY(src/emscripten-optimizer)
ADD_SUBDIRECTORY(src/passes)
@@ -136,7 +137,7 @@ IF(BUILD_STATIC_LIB)
ELSE()
ADD_LIBRARY(binaryen SHARED ${binaryen_SOURCES})
ENDIF()
-TARGET_LINK_LIBRARIES(binaryen ${all_passes} wasm asmjs support)
+TARGET_LINK_LIBRARIES(binaryen ${all_passes} wasm asmjs ast support)
INSTALL(TARGETS binaryen DESTINATION lib)
INSTALL(FILES src/binaryen-c.h DESTINATION include)
@@ -150,7 +151,7 @@ SET(wasm-shell_SOURCES
)
ADD_EXECUTABLE(wasm-shell
${wasm-shell_SOURCES})
-TARGET_LINK_LIBRARIES(wasm-shell wasm asmjs emscripten-optimizer ${all_passes} support)
+TARGET_LINK_LIBRARIES(wasm-shell wasm asmjs emscripten-optimizer ${all_passes} ast support)
SET_PROPERTY(TARGET wasm-shell PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET wasm-shell PROPERTY CXX_STANDARD_REQUIRED ON)
INSTALL(TARGETS wasm-shell DESTINATION bin)
@@ -160,7 +161,7 @@ SET(wasm-opt_SOURCES
)
ADD_EXECUTABLE(wasm-opt
${wasm-opt_SOURCES})
-TARGET_LINK_LIBRARIES(wasm-opt wasm asmjs emscripten-optimizer ${all_passes} support)
+TARGET_LINK_LIBRARIES(wasm-opt wasm asmjs emscripten-optimizer ${all_passes} ast support)
SET_PROPERTY(TARGET wasm-opt PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET wasm-opt PROPERTY CXX_STANDARD_REQUIRED ON)
INSTALL(TARGETS wasm-opt DESTINATION bin)
@@ -171,7 +172,7 @@ SET(asm2wasm_SOURCES
)
ADD_EXECUTABLE(asm2wasm
${asm2wasm_SOURCES})
-TARGET_LINK_LIBRARIES(asm2wasm emscripten-optimizer ${all_passes} wasm asmjs support)
+TARGET_LINK_LIBRARIES(asm2wasm emscripten-optimizer ${all_passes} wasm asmjs ast support)
SET_PROPERTY(TARGET asm2wasm PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET asm2wasm PROPERTY CXX_STANDARD_REQUIRED ON)
INSTALL(TARGETS asm2wasm DESTINATION bin)
@@ -183,7 +184,7 @@ SET(s2wasm_SOURCES
)
ADD_EXECUTABLE(s2wasm
${s2wasm_SOURCES})
-TARGET_LINK_LIBRARIES(s2wasm passes wasm asmjs support)
+TARGET_LINK_LIBRARIES(s2wasm passes wasm asmjs ast support)
SET_PROPERTY(TARGET s2wasm PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET s2wasm PROPERTY CXX_STANDARD_REQUIRED ON)
INSTALL(TARGETS s2wasm DESTINATION bin)
@@ -193,7 +194,7 @@ SET(wasm_as_SOURCES
)
ADD_EXECUTABLE(wasm-as
${wasm_as_SOURCES})
-TARGET_LINK_LIBRARIES(wasm-as wasm asmjs passes support)
+TARGET_LINK_LIBRARIES(wasm-as wasm asmjs passes ast support)
SET_PROPERTY(TARGET wasm-as PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET wasm-as PROPERTY CXX_STANDARD_REQUIRED ON)
INSTALL(TARGETS wasm-as DESTINATION bin)
@@ -203,7 +204,7 @@ SET(wasm_dis_SOURCES
)
ADD_EXECUTABLE(wasm-dis
${wasm_dis_SOURCES})
-TARGET_LINK_LIBRARIES(wasm-dis passes wasm asmjs support)
+TARGET_LINK_LIBRARIES(wasm-dis passes wasm asmjs ast support)
SET_PROPERTY(TARGET wasm-dis PROPERTY CXX_STANDARD 11)
SET_PROPERTY(TARGET wasm-dis PROPERTY CXX_STANDARD_REQUIRED ON)
INSTALL(TARGETS wasm-dis DESTINATION bin)