2018-10-15 09:52:35 +00:00
|
|
|
# Until we have a clear separation, libyul has to be included here
|
2018-11-23 13:21:17 +00:00
|
|
|
set(sources
|
|
|
|
analysis/ConstantEvaluator.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/ConstantEvaluator.h
|
2018-11-29 16:35:14 +00:00
|
|
|
analysis/ContractLevelChecker.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/ContractLevelChecker.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/ControlFlowAnalyzer.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/ControlFlowAnalyzer.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/ControlFlowBuilder.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/ControlFlowBuilder.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/ControlFlowGraph.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/ControlFlowGraph.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/DeclarationContainer.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/DeclarationContainer.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/DocStringAnalyser.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/DocStringAnalyser.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/GlobalContext.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/GlobalContext.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/NameAndTypeResolver.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/NameAndTypeResolver.h
|
2019-12-09 22:43:58 +00:00
|
|
|
analysis/OverrideChecker.cpp
|
|
|
|
analysis/OverrideChecker.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/PostTypeChecker.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/PostTypeChecker.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/ReferencesResolver.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/ReferencesResolver.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/StaticAnalyzer.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/StaticAnalyzer.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/SyntaxChecker.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/SyntaxChecker.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/TypeChecker.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/TypeChecker.h
|
2018-11-23 13:21:17 +00:00
|
|
|
analysis/ViewPureChecker.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
analysis/ViewPureChecker.h
|
2018-11-23 13:21:17 +00:00
|
|
|
ast/AST.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
ast/AST.h
|
|
|
|
ast/AST_accept.h
|
2018-11-23 13:21:17 +00:00
|
|
|
ast/ASTAnnotations.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
ast/ASTAnnotations.h
|
|
|
|
ast/ASTEnums.h
|
|
|
|
ast/ASTForward.h
|
2019-09-11 19:16:35 +00:00
|
|
|
ast/AsmJsonImporter.cpp
|
|
|
|
ast/AsmJsonImporter.h
|
2018-11-23 13:21:17 +00:00
|
|
|
ast/ASTJsonConverter.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
ast/ASTJsonConverter.h
|
2019-12-03 00:02:33 +00:00
|
|
|
ast/ASTUtils.cpp
|
|
|
|
ast/ASTUtils.h
|
2019-09-11 19:16:35 +00:00
|
|
|
ast/ASTJsonImporter.cpp
|
|
|
|
ast/ASTJsonImporter.h
|
2018-12-17 14:00:39 +00:00
|
|
|
ast/ASTVisitor.h
|
|
|
|
ast/ExperimentalFeatures.h
|
2018-11-23 13:21:17 +00:00
|
|
|
ast/Types.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
ast/Types.h
|
2019-04-15 13:33:39 +00:00
|
|
|
ast/TypeProvider.cpp
|
|
|
|
ast/TypeProvider.h
|
2018-11-23 13:21:17 +00:00
|
|
|
codegen/ABIFunctions.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
codegen/ABIFunctions.h
|
2018-11-23 13:21:17 +00:00
|
|
|
codegen/ArrayUtils.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
codegen/ArrayUtils.h
|
2018-11-23 13:21:17 +00:00
|
|
|
codegen/Compiler.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
codegen/Compiler.h
|
2018-11-23 13:21:17 +00:00
|
|
|
codegen/CompilerContext.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
codegen/CompilerContext.h
|
2018-11-23 13:21:17 +00:00
|
|
|
codegen/CompilerUtils.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
codegen/CompilerUtils.h
|
2018-11-23 13:21:17 +00:00
|
|
|
codegen/ContractCompiler.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
codegen/ContractCompiler.h
|
2018-11-23 13:21:17 +00:00
|
|
|
codegen/ExpressionCompiler.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
codegen/ExpressionCompiler.h
|
2018-11-23 13:21:17 +00:00
|
|
|
codegen/LValue.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
codegen/LValue.h
|
2019-03-05 16:20:28 +00:00
|
|
|
codegen/MultiUseYulFunctionCollector.h
|
|
|
|
codegen/MultiUseYulFunctionCollector.cpp
|
|
|
|
codegen/YulUtilFunctions.h
|
|
|
|
codegen/YulUtilFunctions.cpp
|
2019-03-04 22:26:46 +00:00
|
|
|
codegen/ir/IRGenerator.cpp
|
|
|
|
codegen/ir/IRGenerator.h
|
2019-03-18 10:21:41 +00:00
|
|
|
codegen/ir/IRGeneratorForStatements.cpp
|
|
|
|
codegen/ir/IRGeneratorForStatements.h
|
2019-03-04 22:26:46 +00:00
|
|
|
codegen/ir/IRGenerationContext.cpp
|
|
|
|
codegen/ir/IRGenerationContext.h
|
2019-04-30 16:32:56 +00:00
|
|
|
codegen/ir/IRLValue.cpp
|
|
|
|
codegen/ir/IRLValue.h
|
2019-06-25 10:46:17 +00:00
|
|
|
formal/BMC.cpp
|
|
|
|
formal/BMC.h
|
2019-07-04 12:44:10 +00:00
|
|
|
formal/CHC.cpp
|
|
|
|
formal/CHC.h
|
2019-09-24 15:35:31 +00:00
|
|
|
formal/CHCSmtLib2Interface.cpp
|
|
|
|
formal/CHCSmtLib2Interface.h
|
2019-07-03 14:33:20 +00:00
|
|
|
formal/CHCSolverInterface.h
|
2019-04-17 13:55:46 +00:00
|
|
|
formal/EncodingContext.cpp
|
|
|
|
formal/EncodingContext.h
|
2019-06-25 10:46:17 +00:00
|
|
|
formal/ModelChecker.cpp
|
|
|
|
formal/ModelChecker.h
|
|
|
|
formal/SMTEncoder.cpp
|
|
|
|
formal/SMTEncoder.h
|
2018-11-23 13:21:17 +00:00
|
|
|
formal/SMTLib2Interface.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
formal/SMTLib2Interface.h
|
2018-11-23 13:21:17 +00:00
|
|
|
formal/SMTPortfolio.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
formal/SMTPortfolio.h
|
|
|
|
formal/SolverInterface.h
|
2018-11-23 13:21:17 +00:00
|
|
|
formal/SSAVariable.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
formal/SSAVariable.h
|
2018-11-23 13:21:17 +00:00
|
|
|
formal/SymbolicTypes.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
formal/SymbolicTypes.h
|
2018-11-23 13:21:17 +00:00
|
|
|
formal/SymbolicVariables.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
formal/SymbolicVariables.h
|
2018-11-23 13:21:17 +00:00
|
|
|
formal/VariableUsage.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
formal/VariableUsage.h
|
2018-11-23 13:21:17 +00:00
|
|
|
interface/ABI.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
interface/ABI.h
|
2018-11-23 13:21:17 +00:00
|
|
|
interface/CompilerStack.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
interface/CompilerStack.h
|
2019-09-18 14:44:36 +00:00
|
|
|
interface/DebugSettings.h
|
2018-11-23 13:21:17 +00:00
|
|
|
interface/GasEstimator.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
interface/GasEstimator.h
|
2018-11-23 13:21:17 +00:00
|
|
|
interface/Natspec.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
interface/Natspec.h
|
2017-07-17 11:12:00 +00:00
|
|
|
interface/OptimiserSettings.h
|
2018-12-17 14:00:39 +00:00
|
|
|
interface/ReadFile.h
|
2018-11-23 13:21:17 +00:00
|
|
|
interface/StandardCompiler.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
interface/StandardCompiler.h
|
2019-10-30 17:11:33 +00:00
|
|
|
interface/StorageLayout.cpp
|
|
|
|
interface/StorageLayout.h
|
2018-11-23 13:21:17 +00:00
|
|
|
interface/Version.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
interface/Version.h
|
2018-11-23 13:21:17 +00:00
|
|
|
parsing/DocStringParser.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
parsing/DocStringParser.h
|
2018-11-23 13:21:17 +00:00
|
|
|
parsing/Parser.cpp
|
2018-12-17 14:00:39 +00:00
|
|
|
parsing/Parser.h
|
|
|
|
parsing/Token.h
|
2018-11-23 13:21:17 +00:00
|
|
|
)
|
2014-10-06 15:13:52 +00:00
|
|
|
|
2019-02-04 13:39:45 +00:00
|
|
|
find_package(Z3 4.6.0)
|
2017-07-13 19:04:19 +00:00
|
|
|
if (${Z3_FOUND})
|
|
|
|
add_definitions(-DHAVE_Z3)
|
2018-04-06 16:01:40 +00:00
|
|
|
message("Z3 SMT solver found. This enables optional SMT checking with Z3.")
|
2019-07-03 14:33:20 +00:00
|
|
|
set(z3_SRCS formal/Z3Interface.cpp formal/Z3Interface.h formal/Z3CHCInterface.cpp formal/Z3CHCInterface.h)
|
2017-07-13 19:04:19 +00:00
|
|
|
else()
|
2018-11-23 13:21:17 +00:00
|
|
|
set(z3_SRCS)
|
2018-04-20 14:56:10 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package(CVC4 QUIET)
|
|
|
|
if (${CVC4_FOUND})
|
2018-08-08 15:23:15 +00:00
|
|
|
add_definitions(-DHAVE_CVC4)
|
|
|
|
message("CVC4 SMT solver found. This enables optional SMT checking with CVC4.")
|
2018-12-17 14:00:39 +00:00
|
|
|
set(cvc4_SRCS formal/CVC4Interface.cpp formal/CVC4Interface.h)
|
2018-04-20 14:56:10 +00:00
|
|
|
else()
|
2018-11-23 13:21:17 +00:00
|
|
|
set(cvc4_SRCS)
|
2018-04-20 14:56:10 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT (${Z3_FOUND} OR ${CVC4_FOUND}))
|
2018-08-08 14:46:17 +00:00
|
|
|
message("No SMT solver found (or it has been forcefully disabled). Optional SMT checking will not be available.\
|
|
|
|
\nPlease install Z3 or CVC4 or remove the option disabling them (USE_Z3, USE_CVC4).")
|
2017-07-13 19:04:19 +00:00
|
|
|
endif()
|
|
|
|
|
2018-11-23 13:21:17 +00:00
|
|
|
add_library(solidity ${sources} ${z3_SRCS} ${cvc4_SRCS})
|
2020-01-13 14:52:46 +00:00
|
|
|
target_link_libraries(solidity PUBLIC yul evmasm langutil solutil Boost::boost Boost::filesystem Boost::system)
|
2017-07-13 19:04:19 +00:00
|
|
|
|
|
|
|
if (${Z3_FOUND})
|
2019-06-04 12:55:45 +00:00
|
|
|
target_link_libraries(solidity PUBLIC z3::libz3)
|
2018-04-06 16:01:40 +00:00
|
|
|
endif()
|
|
|
|
|
2018-08-08 15:23:15 +00:00
|
|
|
if (${CVC4_FOUND})
|
2018-12-17 12:42:48 +00:00
|
|
|
target_link_libraries(solidity PUBLIC CVC4::CVC4)
|
2018-04-06 16:01:40 +00:00
|
|
|
endif()
|