diff options
author | Arkadiy Paronyan <arkady.paronyan@gmail.com> | 2015-09-15 00:51:56 +0800 |
---|---|---|
committer | Arkadiy Paronyan <arkady.paronyan@gmail.com> | 2015-09-15 00:51:56 +0800 |
commit | 613ba2c3f1b3d26aa4adb5718215e1ececc190d3 (patch) | |
tree | ab02401a3e6c811d533f6f06c23ef54c7be307c1 | |
parent | 9309b6aa82de6bbe7a93d34559b6cfca20c5978d (diff) | |
parent | 6b4e564b7c8f2a47cafa743e786d8873f2c04078 (diff) | |
download | dexon-solidity-613ba2c3f1b3d26aa4adb5718215e1ececc190d3.tar.gz dexon-solidity-613ba2c3f1b3d26aa4adb5718215e1ececc190d3.tar.zst dexon-solidity-613ba2c3f1b3d26aa4adb5718215e1ececc190d3.zip |
Merge pull request #73 from chriseth/emscripten
Changes required to compile on emscripten target.
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | solc/CMakeLists.txt | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 69cbe0cc..c65383ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,8 @@ print_config() add_subdirectory(libsolidity) add_subdirectory(solc) -add_subdirectory(test) +if (NOT EMSCRIPTEN) + add_subdirectory(test) +endif() # TODO installation and packaging rules diff --git a/solc/CMakeLists.txt b/solc/CMakeLists.txt index 2d23dab1..40ab0e21 100644 --- a/solc/CMakeLists.txt +++ b/solc/CMakeLists.txt @@ -17,5 +17,11 @@ else() eth_install_executable(${EXECUTABLE}) endif() -add_library(soljson jsonCompiler.cpp ${HEADERS}) -target_link_libraries(soljson solidity) +if (EMSCRIPTEN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORTED_FUNCTIONS='[\"_compileJSON\",\"_version\"]'") + add_executable(soljson jsonCompiler.cpp ${HEADERS}) + eth_use(soljson REQUIRED Solidity) +else() + add_library(soljson jsonCompiler.cpp ${HEADERS}) + target_link_libraries(soljson solidity) +endif() |