solidity/test/CMakeLists.txt

199 lines
6.0 KiB
CMake
Raw Normal View History

2019-11-08 15:07:15 +00:00
set(sources
boostTest.cpp
Common.cpp
Common.h
2020-02-04 18:40:32 +00:00
CommonSyntaxTest.cpp
CommonSyntaxTest.h
2019-11-08 15:07:15 +00:00
EVMHost.cpp
EVMHost.h
ExecutionFramework.cpp
ExecutionFramework.h
InteractiveTests.h
Metadata.cpp
Metadata.h
TestCase.cpp
TestCase.h
)
detect_stray_source_files("${sources}" ".")
set(contracts_sources
contracts/AuctionRegistrar.cpp
contracts/ContractInterface.h
contracts/FixedFeeRegistrar.cpp
contracts/Wallet.cpp
)
detect_stray_source_files("${contracts_sources}" "contracts/")
set(libsolutil_sources
libsolutil/Checksum.cpp
libsolutil/CommonData.cpp
libsolutil/IndentedWriter.cpp
libsolutil/IpfsHash.cpp
libsolutil/IterateReplacing.cpp
libsolutil/JSON.cpp
libsolutil/Keccak256.cpp
libsolutil/StringUtils.cpp
libsolutil/SwarmHash.cpp
libsolutil/UTF8.cpp
libsolutil/Whiskers.cpp
2019-11-08 15:07:15 +00:00
)
detect_stray_source_files("${libsolutil_sources}" "libsolutil/")
2019-11-08 15:07:15 +00:00
set(libevmasm_sources
libevmasm/Assembler.cpp
libevmasm/Optimiser.cpp
)
detect_stray_source_files("${libevmasm_sources}" "libevmasm/")
set(liblangutil_sources
liblangutil/CharStream.cpp
liblangutil/SourceLocation.cpp
)
detect_stray_source_files("${liblangutil_sources}" "liblangutil/")
set(libsolidity_sources
libsolidity/ABIDecoderTests.cpp
libsolidity/ABIEncoderTests.cpp
libsolidity/ABIJsonTest.cpp
libsolidity/ABIJsonTest.h
libsolidity/ABITestsCommon.h
libsolidity/AnalysisFramework.cpp
libsolidity/AnalysisFramework.h
libsolidity/Assembly.cpp
libsolidity/ASTJSONTest.cpp
libsolidity/ASTJSONTest.h
libsolidity/ErrorCheck.cpp
libsolidity/ErrorCheck.h
libsolidity/GasCosts.cpp
libsolidity/GasMeter.cpp
libsolidity/GasTest.cpp
libsolidity/GasTest.h
libsolidity/Imports.cpp
libsolidity/InlineAssembly.cpp
libsolidity/LibSolc.cpp
libsolidity/Metadata.cpp
libsolidity/SemanticTest.cpp
libsolidity/SemanticTest.h
libsolidity/SemVerMatcher.cpp
libsolidity/SMTChecker.cpp
libsolidity/SMTCheckerJSONTest.cpp
libsolidity/SMTCheckerJSONTest.h
2019-12-03 15:50:28 +00:00
libsolidity/SMTCheckerTest.cpp
libsolidity/SMTCheckerTest.h
2019-11-08 15:07:15 +00:00
libsolidity/SolidityCompiler.cpp
libsolidity/SolidityEndToEndTest.cpp
libsolidity/SolidityExecutionFramework.cpp
libsolidity/SolidityExecutionFramework.h
libsolidity/SolidityExpressionCompiler.cpp
libsolidity/SolidityNameAndTypeResolution.cpp
libsolidity/SolidityNatspecJSON.cpp
libsolidity/SolidityOptimizer.cpp
libsolidity/SolidityParser.cpp
libsolidity/SolidityScanner.cpp
libsolidity/SolidityTypes.cpp
libsolidity/StandardCompiler.cpp
libsolidity/SyntaxTest.cpp
libsolidity/SyntaxTest.h
libsolidity/ViewPureChecker.cpp
)
detect_stray_source_files("${libsolidity_sources}" "libsolidity/")
set(libsolidity_util_sources
libsolidity/util/BytesUtils.cpp
libsolidity/util/BytesUtils.h
libsolidity/util/ContractABIUtils.cpp
libsolidity/util/ContractABIUtils.h
libsolidity/util/SoltestErrors.h
libsolidity/util/SoltestTypes.h
libsolidity/util/TestFileParser.cpp
libsolidity/util/TestFileParser.h
libsolidity/util/TestFileParserTests.cpp
libsolidity/util/TestFunctionCall.cpp
libsolidity/util/TestFunctionCall.h
libsolidity/util/TestFunctionCallTests.cpp
)
detect_stray_source_files("${libsolidity_util_sources}" "libsolidity/util/")
set(libyul_sources
libyul/Common.cpp
libyul/Common.h
libyul/CompilabilityChecker.cpp
libyul/EwasmTranslationTest.cpp
libyul/EwasmTranslationTest.h
2019-11-08 15:07:15 +00:00
libyul/FunctionSideEffects.cpp
libyul/FunctionSideEffects.h
libyul/Inliner.cpp
libyul/Metrics.cpp
libyul/ObjectCompilerTest.cpp
libyul/ObjectCompilerTest.h
libyul/ObjectParser.cpp
libyul/Parser.cpp
libyul/StackReuseCodegen.cpp
2020-02-04 18:40:32 +00:00
libyul/SyntaxTest.h
libyul/SyntaxTest.cpp
2019-11-08 15:07:15 +00:00
libyul/YulInterpreterTest.cpp
libyul/YulInterpreterTest.h
libyul/YulOptimizerTest.cpp
libyul/YulOptimizerTest.h
)
detect_stray_source_files("${libyul_sources}" "libyul/")
set(yul_phaser_sources
yulPhaser/Common.h
yulPhaser/Common.cpp
yulPhaser/CommonTest.cpp
yulPhaser/Chromosome.cpp
2020-02-05 13:58:06 +00:00
yulPhaser/FitnessMetrics.cpp
yulPhaser/AlgorithmRunner.cpp
yulPhaser/GeneticAlgorithms.cpp
yulPhaser/Mutations.cpp
yulPhaser/PairSelections.cpp
yulPhaser/Population.cpp
2020-01-23 18:02:59 +00:00
yulPhaser/Program.cpp
yulPhaser/Selections.cpp
yulPhaser/SimulationRNG.cpp
# FIXME: yul-phaser is not a library so I can't just add it to target_link_libraries().
# My current workaround is just to include its source files here but this introduces
# unnecessary duplication. Create a library or find a way to reuse the list in both places.
../tools/yulPhaser/AlgorithmRunner.cpp
../tools/yulPhaser/Chromosome.cpp
../tools/yulPhaser/FitnessMetrics.cpp
../tools/yulPhaser/GeneticAlgorithms.cpp
../tools/yulPhaser/Mutations.cpp
../tools/yulPhaser/PairSelections.cpp
../tools/yulPhaser/Population.cpp
2020-01-23 18:02:59 +00:00
../tools/yulPhaser/Program.cpp
../tools/yulPhaser/Selections.cpp
../tools/yulPhaser/SimulationRNG.cpp
)
detect_stray_source_files("${yul_phaser_sources}" "yulPhaser/")
2019-11-08 15:07:15 +00:00
add_executable(soltest ${sources}
${contracts_sources}
${libsolutil_sources}
2019-11-08 15:07:15 +00:00
${liblangutil_sources}
${libevmasm_sources}
${libyul_sources}
${libsolidity_sources}
${libsolidity_util_sources}
${yul_phaser_sources}
)
target_link_libraries(soltest PRIVATE libsolc yul solidity yulInterpreter evmasm solutil Boost::boost Boost::program_options Boost::unit_test_framework evmc)
2018-11-13 14:34:19 +00:00
# Special compilation flag for Visual Studio (version 2019 at least affected)
# in order to compile SolidityEndToEndTest.cpp, which is quite huge.
# We can remove this flag once we've extracted the tests.
# TODO: Remove this option as soon as we have reduced the SLoC's in SolidityEndToEndTest.cpp
if (MSVC)
target_compile_options(soltest PUBLIC "/bigobj")
endif()
if (NOT Boost_USE_STATIC_LIBS)
target_compile_definitions(soltest PUBLIC -DBOOST_TEST_DYN_LINK)
endif()
add_subdirectory(tools)
add_subdirectory(evmc)