2019-11-08 15:07:15 +00:00
|
|
|
set(sources
|
2022-06-22 11:53:40 +00:00
|
|
|
soltest.cpp
|
2019-11-08 15:07:15 +00:00
|
|
|
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
|
2021-06-25 13:18:37 +00:00
|
|
|
FilesystemUtils.cpp
|
|
|
|
FilesystemUtils.h
|
2019-11-08 15:07:15 +00:00
|
|
|
InteractiveTests.h
|
|
|
|
Metadata.cpp
|
|
|
|
Metadata.h
|
|
|
|
TestCase.cpp
|
|
|
|
TestCase.h
|
2020-03-06 00:22:51 +00:00
|
|
|
TestCaseReader.cpp
|
|
|
|
TestCaseReader.h
|
2019-11-08 15:07:15 +00:00
|
|
|
)
|
|
|
|
detect_stray_source_files("${sources}" ".")
|
|
|
|
|
|
|
|
set(contracts_sources
|
|
|
|
contracts/AuctionRegistrar.cpp
|
|
|
|
contracts/ContractInterface.h
|
|
|
|
contracts/Wallet.cpp
|
|
|
|
)
|
|
|
|
detect_stray_source_files("${contracts_sources}" "contracts/")
|
|
|
|
|
2020-01-06 10:52:23 +00:00
|
|
|
set(libsolutil_sources
|
|
|
|
libsolutil/Checksum.cpp
|
|
|
|
libsolutil/CommonData.cpp
|
2021-06-25 13:28:54 +00:00
|
|
|
libsolutil/CommonIO.cpp
|
2019-12-13 02:59:45 +00:00
|
|
|
libsolutil/FixedHash.cpp
|
2022-09-27 12:13:44 +00:00
|
|
|
libsolutil/FunctionSelector.cpp
|
2020-01-06 10:52:23 +00:00
|
|
|
libsolutil/IndentedWriter.cpp
|
|
|
|
libsolutil/IpfsHash.cpp
|
|
|
|
libsolutil/IterateReplacing.cpp
|
|
|
|
libsolutil/JSON.cpp
|
|
|
|
libsolutil/Keccak256.cpp
|
2020-05-14 14:48:50 +00:00
|
|
|
libsolutil/LazyInit.cpp
|
2020-09-28 16:02:22 +00:00
|
|
|
libsolutil/LEB128.cpp
|
2020-01-06 10:52:23 +00:00
|
|
|
libsolutil/StringUtils.cpp
|
|
|
|
libsolutil/SwarmHash.cpp
|
2022-05-15 15:45:43 +00:00
|
|
|
libsolutil/TemporaryDirectoryTest.cpp
|
2020-01-06 10:52:23 +00:00
|
|
|
libsolutil/UTF8.cpp
|
|
|
|
libsolutil/Whiskers.cpp
|
2019-11-08 15:07:15 +00:00
|
|
|
)
|
2020-01-06 10:52:23 +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
|
2020-08-05 12:33:32 +00:00
|
|
|
liblangutil/Scanner.cpp
|
2019-11-08 15:07:15 +00:00
|
|
|
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
|
2022-02-10 16:57:43 +00:00
|
|
|
libsolidity/MemoryGuardTest.cpp
|
|
|
|
libsolidity/MemoryGuardTest.h
|
2023-07-31 17:52:27 +00:00
|
|
|
libsolidity/NatspecJSONTest.cpp
|
|
|
|
libsolidity/NatspecJSONTest.h
|
2019-11-08 15:07:15 +00:00
|
|
|
libsolidity/SemanticTest.cpp
|
|
|
|
libsolidity/SemanticTest.h
|
|
|
|
libsolidity/SemVerMatcher.cpp
|
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/SolidityOptimizer.cpp
|
|
|
|
libsolidity/SolidityParser.cpp
|
|
|
|
libsolidity/SolidityTypes.cpp
|
|
|
|
libsolidity/StandardCompiler.cpp
|
|
|
|
libsolidity/SyntaxTest.cpp
|
|
|
|
libsolidity/SyntaxTest.h
|
|
|
|
libsolidity/ViewPureChecker.cpp
|
2021-01-28 20:11:30 +00:00
|
|
|
libsolidity/analysis/FunctionCallGraph.cpp
|
2021-06-15 12:52:53 +00:00
|
|
|
libsolidity/interface/FileReader.cpp
|
2023-05-29 08:58:48 +00:00
|
|
|
libsolidity/ASTPropertyTest.h
|
|
|
|
libsolidity/ASTPropertyTest.cpp
|
2019-11-08 15:07:15 +00:00
|
|
|
)
|
|
|
|
detect_stray_source_files("${libsolidity_sources}" "libsolidity/")
|
|
|
|
|
|
|
|
set(libsolidity_util_sources
|
|
|
|
libsolidity/util/BytesUtils.cpp
|
2021-07-27 14:32:34 +00:00
|
|
|
libsolidity/util/BytesUtilsTests.cpp
|
2019-11-08 15:07:15 +00:00
|
|
|
libsolidity/util/BytesUtils.h
|
2023-08-04 16:54:06 +00:00
|
|
|
libsolidity/util/Common.cpp
|
|
|
|
libsolidity/util/Common.h
|
2019-11-08 15:07:15 +00:00
|
|
|
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
|
2021-06-11 17:17:41 +00:00
|
|
|
libyul/ControlFlowGraphTest.cpp
|
|
|
|
libyul/ControlFlowGraphTest.h
|
2021-09-30 15:01:54 +00:00
|
|
|
libyul/ControlFlowSideEffectsTest.cpp
|
|
|
|
libyul/ControlFlowSideEffectsTest.h
|
2021-03-09 13:53:10 +00:00
|
|
|
libyul/EVMCodeTransformTest.cpp
|
|
|
|
libyul/EVMCodeTransformTest.h
|
2019-11-08 15:07:15 +00:00
|
|
|
libyul/FunctionSideEffects.cpp
|
|
|
|
libyul/FunctionSideEffects.h
|
|
|
|
libyul/Inliner.cpp
|
2021-05-05 16:02:35 +00:00
|
|
|
libyul/KnowledgeBaseTest.cpp
|
2019-11-08 15:07:15 +00:00
|
|
|
libyul/Metrics.cpp
|
|
|
|
libyul/ObjectCompilerTest.cpp
|
|
|
|
libyul/ObjectCompilerTest.h
|
|
|
|
libyul/ObjectParser.cpp
|
|
|
|
libyul/Parser.cpp
|
2021-07-05 16:13:44 +00:00
|
|
|
libyul/StackLayoutGeneratorTest.cpp
|
|
|
|
libyul/StackLayoutGeneratorTest.h
|
2022-01-21 14:24:18 +00:00
|
|
|
libyul/StackShufflingTest.cpp
|
2023-04-25 10:07:44 +00:00
|
|
|
libyul/StackShufflingTest.h
|
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
|
2020-12-28 15:39:14 +00:00
|
|
|
libyul/YulOptimizerTestCommon.cpp
|
|
|
|
libyul/YulOptimizerTestCommon.h
|
2019-11-08 15:07:15 +00:00
|
|
|
)
|
|
|
|
detect_stray_source_files("${libyul_sources}" "libyul/")
|
|
|
|
|
2021-06-07 17:04:02 +00:00
|
|
|
set(solcli_sources
|
2021-06-13 13:53:16 +00:00
|
|
|
solc/Common.cpp
|
|
|
|
solc/Common.h
|
|
|
|
solc/CommandLineInterface.cpp
|
2021-07-22 19:54:31 +00:00
|
|
|
solc/CommandLineInterfaceAllowPaths.cpp
|
2021-06-07 17:04:02 +00:00
|
|
|
solc/CommandLineParser.cpp
|
|
|
|
)
|
|
|
|
detect_stray_source_files("${solcli_sources}" "solc/")
|
|
|
|
|
2020-01-17 06:51:45 +00:00
|
|
|
set(yul_phaser_sources
|
2020-03-02 08:40:58 +00:00
|
|
|
yulPhaser/TestHelpers.h
|
|
|
|
yulPhaser/TestHelpers.cpp
|
|
|
|
yulPhaser/TestHelpersTest.cpp
|
2020-03-02 09:19:44 +00:00
|
|
|
yulPhaser/Common.cpp
|
2020-01-17 06:51:45 +00:00
|
|
|
yulPhaser/Chromosome.cpp
|
2020-02-05 13:58:06 +00:00
|
|
|
yulPhaser/FitnessMetrics.cpp
|
2020-02-21 15:10:07 +00:00
|
|
|
yulPhaser/AlgorithmRunner.cpp
|
2020-02-05 13:56:55 +00:00
|
|
|
yulPhaser/GeneticAlgorithms.cpp
|
2020-02-05 13:42:38 +00:00
|
|
|
yulPhaser/Mutations.cpp
|
2020-02-06 03:36:46 +00:00
|
|
|
yulPhaser/PairSelections.cpp
|
2020-03-04 18:48:05 +00:00
|
|
|
yulPhaser/Phaser.cpp
|
2020-01-24 03:56:32 +00:00
|
|
|
yulPhaser/Population.cpp
|
2020-01-23 18:02:59 +00:00
|
|
|
yulPhaser/Program.cpp
|
2020-02-26 18:28:58 +00:00
|
|
|
yulPhaser/ProgramCache.cpp
|
2020-02-05 13:57:29 +00:00
|
|
|
yulPhaser/Selections.cpp
|
2020-02-15 02:03:22 +00:00
|
|
|
yulPhaser/SimulationRNG.cpp
|
2020-01-17 06:51:45 +00:00
|
|
|
)
|
|
|
|
detect_stray_source_files("${yul_phaser_sources}" "yulPhaser/")
|
|
|
|
|
2019-11-08 15:07:15 +00:00
|
|
|
add_executable(soltest ${sources}
|
|
|
|
${contracts_sources}
|
2020-01-06 10:52:23 +00:00
|
|
|
${libsolutil_sources}
|
2019-11-08 15:07:15 +00:00
|
|
|
${liblangutil_sources}
|
|
|
|
${libevmasm_sources}
|
|
|
|
${libyul_sources}
|
|
|
|
${libsolidity_sources}
|
|
|
|
${libsolidity_util_sources}
|
2021-06-07 17:04:02 +00:00
|
|
|
${solcli_sources}
|
2020-01-17 06:51:45 +00:00
|
|
|
${yul_phaser_sources}
|
2018-03-12 13:13:19 +00:00
|
|
|
)
|
2021-06-07 17:04:02 +00:00
|
|
|
target_link_libraries(soltest PRIVATE solcli libsolc yul solidity smtutil solutil phaser Boost::boost yulInterpreter evmasm Boost::filesystem Boost::program_options Boost::unit_test_framework evmc)
|
2019-07-08 14:04:52 +00:00
|
|
|
|
2018-11-13 14:34:19 +00:00
|
|
|
|
2019-05-27 13:10:17 +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()
|
|
|
|
|
2018-08-02 12:36:14 +00:00
|
|
|
if (NOT Boost_USE_STATIC_LIBS)
|
|
|
|
target_compile_definitions(soltest PUBLIC -DBOOST_TEST_DYN_LINK)
|
|
|
|
endif()
|
|
|
|
|
2018-03-12 13:13:19 +00:00
|
|
|
add_subdirectory(tools)
|
2019-07-08 14:04:52 +00:00
|
|
|
add_subdirectory(evmc)
|