Browse Source

Allow Solidity build to be disabled.

cl-refactor
Gav Wood 10 years ago
parent
commit
9fb30b141e
  1. 29
      CMakeLists.txt
  2. 2
      libethereum/BlockChain.cpp
  3. 3
      test/Assembly.cpp
  4. 4
      test/CMakeLists.txt
  5. 3
      test/SolidityABIJSON.cpp
  6. 3
      test/SolidityCompiler.cpp
  7. 4
      test/SolidityEndToEndTest.cpp
  8. 4
      test/SolidityExpressionCompiler.cpp
  9. 4
      test/SolidityInterface.cpp
  10. 3
      test/SolidityNameAndTypeResolution.cpp
  11. 4
      test/SolidityNatspecJSON.cpp
  12. 5
      test/SolidityOptimizer.cpp
  13. 3
      test/SolidityParser.cpp
  14. 4
      test/SolidityScanner.cpp
  15. 4
      test/SolidityTypes.cpp
  16. 1
      test/solidityExecutionFramework.h

29
CMakeLists.txt

@ -203,12 +203,23 @@ if (PROFILING)
else ()
set(PROFILING OFF)
endif ()
if (NOT CMAKE_BUILD_TYPE)
# Default CMAKE_BUILD_TYPE to "Release".
set(CMAKE_BUILD_TYPE CACHE STRING "Relase")
if ("x${CMAKE_BUILD_TYPE}" STREQUAL "x")
set(CMAKE_BUILD_TYPE "Release")
endif ()
message(STATUS "CMake Version: ${CMAKE_VERSION}")
# Default TARGET_PLATFORM to "linux".
set(TARGET_PLATFORM CACHE STRING "linux")
if ("x${TARGET_PLATFORM}" STREQUAL "x")
set(TARGET_PLATFORM "linux")
endif ()
message("------------------------------------------------------------------------")
message("-- CMake Version ${CMAKE_VERSION}")
message("-- Build type CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}")
message("-- Target platform TARGET_PLATFORM ${TARGET_PLATFORM}")
message("-- VM execution tracing VMTRACE ${VMTRACE}")
message("-- Profiling support PROFILING ${PROFILING}")
message("-- Additional (SLOW) database checking PARANOIA ${PARANOIA}")
@ -226,12 +237,6 @@ message("-----------------------------------------------------------------------
message("")
# Default TARGET_PLATFORM to "linux".
set(TARGET_PLATFORM CACHE STRING "linux")
if ("x${TARGET_PLATFORM}" STREQUAL "x")
set(TARGET_PLATFORM "linux")
endif ()
if ("${TARGET_PLATFORM}" STREQUAL "linux")
set(CMAKE_THREAD_LIBS_INIT pthread)
endif ()
@ -260,11 +265,15 @@ if (SERPENT)
add_subdirectory(sc)
endif ()
add_subdirectory(libsolidity)
if (SOLIDITY)
add_subdirectory(libsolidity)
endif ()
if (NOT JUSTTESTS)
add_subdirectory(lllc)
add_subdirectory(solc)
if (SOLIDITY)
add_subdirectory(solc)
endif ()
endif()
if (JSONRPC)

2
libethereum/BlockChain.cpp

@ -208,6 +208,8 @@ void BlockChain::rebuild(std::string const& _path, std::function<void(unsigned,
h256 lastHash = genesisHash();
for (unsigned d = 1; d < originalNumber; ++d)
{
if (originalNumber > 1000)
exit(0);
try
{
bytes b = block(queryExtras<BlockHash, ExtraBlockHash>(h256(u256(d)), m_blockHashes, x_blockHashes, NullBlockHash, oldExtrasDB).value);

3
test/Assembly.cpp

@ -20,6 +20,8 @@
* Unit tests for Assembly Items from evmcore/Assembly.h
*/
#if ETH_SOLIDITY
#include <string>
#include <iostream>
#include <boost/test/unit_test.hpp>
@ -119,3 +121,4 @@ BOOST_AUTO_TEST_SUITE_END()
}
} // end namespaces
#endif

4
test/CMakeLists.txt

@ -44,7 +44,9 @@ target_link_libraries(testeth ${CURL_LIBRARIES})
target_link_libraries(testeth ethereum)
target_link_libraries(testeth ethcore)
target_link_libraries(testeth secp256k1)
target_link_libraries(testeth solidity)
if (SOLIDITY)
target_link_libraries(testeth solidity)
endif ()
target_link_libraries(testeth testutils)
if (NOT HEADLESS AND NOT JUSTTESTS)
target_link_libraries(testeth webthree)

3
test/SolidityABIJSON.cpp

@ -19,6 +19,7 @@
* @date 2014
* Unit tests for the solidity compiler JSON Interface output.
*/
#if ETH_SOLIDITY
#include "TestHelper.h"
#include <libsolidity/CompilerStack.h>
@ -500,3 +501,5 @@ BOOST_AUTO_TEST_SUITE_END()
}
}
}
#endif

3
test/SolidityCompiler.cpp

@ -20,6 +20,8 @@
* Unit tests for the solidity compiler.
*/
#if ETH_SOLIDITY
#include <string>
#include <iostream>
#include <boost/test/unit_test.hpp>
@ -192,3 +194,4 @@ BOOST_AUTO_TEST_SUITE_END()
}
} // end namespaces
#endif

4
test/SolidityEndToEndTest.cpp

@ -1,4 +1,3 @@
/*
This file is part of cpp-ethereum.
@ -22,6 +21,8 @@
* Unit tests for the solidity expression compiler, testing the behaviour of the code.
*/
#if ETH_SOLIDITY
#include <string>
#include <tuple>
#include <boost/test/unit_test.hpp>
@ -3627,3 +3628,4 @@ BOOST_AUTO_TEST_SUITE_END()
}
} // end namespaces
#endif

4
test/SolidityExpressionCompiler.cpp

@ -1,4 +1,3 @@
/*
This file is part of cpp-ethereum.
@ -21,6 +20,8 @@
* Unit tests for the solidity expression compiler.
*/
#if ETH_SOLIDITY
#include <string>
#include <libdevcore/Log.h>
@ -491,3 +492,4 @@ BOOST_AUTO_TEST_SUITE_END()
}
} // end namespaces
#endif

4
test/SolidityInterface.cpp

@ -20,6 +20,8 @@
* Unit tests for generating source interfaces for Solidity contracts.
*/
#if ETH_SOLIDITY
#include "TestHelper.h"
#include <libsolidity/CompilerStack.h>
#include <libsolidity/AST.h>
@ -147,3 +149,5 @@ BOOST_AUTO_TEST_SUITE_END()
}
}
}
#endif

3
test/SolidityNameAndTypeResolution.cpp

@ -20,6 +20,8 @@
* Unit tests for the name and type resolution of the solidity parser.
*/
#if ETH_SOLIDITY
#include <string>
#include <libdevcore/Log.h>
@ -1627,3 +1629,4 @@ BOOST_AUTO_TEST_SUITE_END()
}
} // end namespaces
#endif

4
test/SolidityNatspecJSON.cpp

@ -20,6 +20,8 @@
* Unit tests for the solidity compiler JSON Interface output.
*/
#if ETH_SOLIDITY
#include "TestHelper.h"
#include <json/json.h>
#include <libsolidity/CompilerStack.h>
@ -537,3 +539,5 @@ BOOST_AUTO_TEST_SUITE_END()
}
}
}
#endif

5
test/SolidityOptimizer.cpp

@ -1,4 +1,3 @@
/*
This file is part of cpp-ethereum.
@ -21,6 +20,8 @@
* Tests for the Solidity optimizer.
*/
#if ETH_SOLIDITY
#include <string>
#include <tuple>
#include <boost/test/unit_test.hpp>
@ -573,3 +574,5 @@ BOOST_AUTO_TEST_SUITE_END()
}
}
} // end namespaces
#endif

3
test/SolidityParser.cpp

@ -20,6 +20,8 @@
* Unit tests for the solidity parser.
*/
#if ETH_SOLIDITY
#include <string>
#include <memory>
#include <libdevcore/Log.h>
@ -845,3 +847,4 @@ BOOST_AUTO_TEST_SUITE_END()
}
} // end namespaces
#endif

4
test/SolidityScanner.cpp

@ -20,6 +20,8 @@
* Unit tests for the solidity scanner.
*/
#if ETH_SOLIDITY
#include <libsolidity/Scanner.h>
#include <boost/test/unit_test.hpp>
@ -286,3 +288,5 @@ BOOST_AUTO_TEST_SUITE_END()
}
}
} // end namespaces
#endif

4
test/SolidityTypes.cpp

@ -20,6 +20,8 @@
* Unit tests for the type system of Solidity.
*/
#if ETH_SOLIDITY
#include <libsolidity/Types.h>
#include <boost/test/unit_test.hpp>
@ -91,3 +93,5 @@ BOOST_AUTO_TEST_SUITE_END()
}
}
}
#endif

1
test/solidityExecutionFramework.h

@ -1,4 +1,3 @@
/*
This file is part of cpp-ethereum.

Loading…
Cancel
Save