From d2165828ff663600e5347644b029e49693088e61 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 9 Feb 2015 13:39:01 -0800 Subject: [PATCH] Fixed #988. --- CMakeLists.txt | 4 ++++ test/CMakeLists.txt | 7 ++++--- test/natspec.cpp | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd79112f4..a3adde425 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,10 @@ function(configureProject) if (EVMJIT) add_definitions(-DETH_EVMJIT) endif() + + if (HEADLESS) + add_definitions(-DETH_HEADLESS) + endif() endfunction() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 36876eea6..ab8afcd70 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -21,9 +21,10 @@ target_link_libraries(testeth ethereum) target_link_libraries(testeth ethcore) target_link_libraries(testeth secp256k1) target_link_libraries(testeth solidity) -target_link_libraries(testeth webthree) -target_link_libraries(testeth natspec) - +if (NOT HEADLESS) + target_link_libraries(testeth webthree) + target_link_libraries(testeth natspec) +endif() if (JSONRPC) target_link_libraries(testeth web3jsonrpc) target_link_libraries(testeth ${JSON_RPC_CPP_CLIENT_LIBRARIES}) diff --git a/test/natspec.cpp b/test/natspec.cpp index 827f96625..8ba660418 100644 --- a/test/natspec.cpp +++ b/test/natspec.cpp @@ -19,6 +19,8 @@ * @date 2015 */ +#if !ETH_HEADLESS + #include #include #include @@ -110,3 +112,5 @@ BOOST_AUTO_TEST_CASE(natspec_js_eval_error) } BOOST_AUTO_TEST_SUITE_END() + +#endif