aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--CMakeLists.txt50
-rw-r--r--libsolidity/AST.cpp (renamed from src/AST.cpp)0
-rw-r--r--libsolidity/AST.h (renamed from src/AST.h)0
-rw-r--r--libsolidity/ASTForward.h (renamed from src/ASTForward.h)0
-rw-r--r--libsolidity/ASTJsonConverter.cpp (renamed from src/ASTJsonConverter.cpp)0
-rw-r--r--libsolidity/ASTJsonConverter.h (renamed from src/ASTJsonConverter.h)0
-rw-r--r--libsolidity/ASTPrinter.cpp (renamed from src/ASTPrinter.cpp)0
-rw-r--r--libsolidity/ASTPrinter.h (renamed from src/ASTPrinter.h)0
-rw-r--r--libsolidity/ASTUtils.cpp (renamed from src/ASTUtils.cpp)0
-rw-r--r--libsolidity/ASTUtils.h (renamed from src/ASTUtils.h)0
-rw-r--r--libsolidity/ASTVisitor.h (renamed from src/ASTVisitor.h)0
-rw-r--r--libsolidity/AST_accept.h (renamed from src/AST_accept.h)0
-rw-r--r--libsolidity/ArrayUtils.cpp (renamed from src/ArrayUtils.cpp)0
-rw-r--r--libsolidity/ArrayUtils.h (renamed from src/ArrayUtils.h)0
-rw-r--r--libsolidity/CMakeLists.txt (renamed from src/CMakeLists.txt)0
-rw-r--r--libsolidity/Compiler.cpp (renamed from src/Compiler.cpp)0
-rw-r--r--libsolidity/Compiler.h (renamed from src/Compiler.h)0
-rw-r--r--libsolidity/CompilerContext.cpp (renamed from src/CompilerContext.cpp)0
-rw-r--r--libsolidity/CompilerContext.h (renamed from src/CompilerContext.h)0
-rw-r--r--libsolidity/CompilerStack.cpp (renamed from src/CompilerStack.cpp)0
-rw-r--r--libsolidity/CompilerStack.h (renamed from src/CompilerStack.h)0
-rw-r--r--libsolidity/CompilerUtils.cpp (renamed from src/CompilerUtils.cpp)0
-rw-r--r--libsolidity/CompilerUtils.h (renamed from src/CompilerUtils.h)0
-rw-r--r--libsolidity/DeclarationContainer.cpp (renamed from src/DeclarationContainer.cpp)0
-rw-r--r--libsolidity/DeclarationContainer.h (renamed from src/DeclarationContainer.h)0
-rw-r--r--libsolidity/Exceptions.h (renamed from src/Exceptions.h)0
-rw-r--r--libsolidity/ExpressionCompiler.cpp (renamed from src/ExpressionCompiler.cpp)0
-rw-r--r--libsolidity/ExpressionCompiler.h (renamed from src/ExpressionCompiler.h)0
-rw-r--r--libsolidity/GasEstimator.cpp (renamed from src/GasEstimator.cpp)0
-rw-r--r--libsolidity/GasEstimator.h (renamed from src/GasEstimator.h)0
-rw-r--r--libsolidity/GlobalContext.cpp (renamed from src/GlobalContext.cpp)0
-rw-r--r--libsolidity/GlobalContext.h (renamed from src/GlobalContext.h)0
-rw-r--r--libsolidity/InterfaceHandler.cpp (renamed from src/InterfaceHandler.cpp)0
-rw-r--r--libsolidity/InterfaceHandler.h (renamed from src/InterfaceHandler.h)0
-rw-r--r--libsolidity/LValue.cpp (renamed from src/LValue.cpp)0
-rw-r--r--libsolidity/LValue.h (renamed from src/LValue.h)0
-rw-r--r--libsolidity/NameAndTypeResolver.cpp (renamed from src/NameAndTypeResolver.cpp)0
-rw-r--r--libsolidity/NameAndTypeResolver.h (renamed from src/NameAndTypeResolver.h)0
-rw-r--r--libsolidity/Parser.cpp (renamed from src/Parser.cpp)0
-rw-r--r--libsolidity/Parser.h (renamed from src/Parser.h)0
-rw-r--r--libsolidity/Scanner.cpp (renamed from src/Scanner.cpp)0
-rw-r--r--libsolidity/Scanner.h (renamed from src/Scanner.h)0
-rw-r--r--libsolidity/SourceReferenceFormatter.cpp (renamed from src/SourceReferenceFormatter.cpp)0
-rw-r--r--libsolidity/SourceReferenceFormatter.h (renamed from src/SourceReferenceFormatter.h)0
-rw-r--r--libsolidity/Token.cpp (renamed from src/Token.cpp)0
-rw-r--r--libsolidity/Token.h (renamed from src/Token.h)0
-rw-r--r--libsolidity/Types.cpp (renamed from src/Types.cpp)0
-rw-r--r--libsolidity/Types.h (renamed from src/Types.h)0
-rw-r--r--libsolidity/Utils.h (renamed from src/Utils.h)0
-rw-r--r--libsolidity/Version.cpp (renamed from src/Version.cpp)0
-rw-r--r--libsolidity/Version.h (renamed from src/Version.h)0
-rw-r--r--libsolidity/grammar.txt (renamed from src/grammar.txt)0
53 files changed, 53 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index b8bd0267..675407ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,6 @@
*.exe
*.out
*.app
+
+# Build directory
+build/ \ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..e3c48341
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,50 @@
+cmake_minimum_required(VERSION 2.8.12)
+
+cmake_policy(SET CMP0015 NEW)
+# let cmake autolink dependencies on windows
+cmake_policy(SET CMP0020 NEW)
+# this policy was introduced in cmake 3.0
+# remove if, once 3.0 will be used on unix
+if (${CMAKE_MAJOR_VERSION} GREATER 2)
+ cmake_policy(SET CMP0043 OLD)
+endif()
+
+# TODO use version from Version.h
+set(PROJECT_VERSION "0.9.42")
+if (${CMAKE_VERSION} VERSION_GREATER 3.0)
+ cmake_policy(SET CMP0042 OLD) # fix MACOSX_RPATH
+ cmake_policy(SET CMP0048 NEW) # allow VERSION argument in project()
+ project(solidity VERSION ${PROJECT_VERSION})
+else()
+ project(solidity)
+endif()
+
+# Figure out environment.
+set(CPPETHEREUM_BUILD "${CMAKE_CURRENT_SOURCE_DIR}/../cpp-ethereum/${BUILD_DIR_NAME}" CACHE STRING "The absolute build directory of cpp-ethereum.")
+set(ETH_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/../cpp-ethereum-cmake" CACHE PATH "The the path to the cmake directory")
+set(ETH_DIR "${CMAKE_CURRENT_LIST_DIR}/../cpp-ethereum" CACHE PATH "The path to the cpp-ethereum directory")
+set(BUILD_DIR_NAME "build" CACHE STRING "The name of the build directory in cpp-ethereum")
+set(ETH_BUILD_DIR "${ETH_DIR}/${BUILD_DIR_NAME}")
+
+list(APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR})
+
+include(EthDependencies)
+include(EthExecutableHelper)
+include(EthCompilerSettings)
+
+include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS})
+include_directories(BEFORE ..)
+include_directories(${Boost_INCLUDE_DIRS})
+include_directories(libsolidity)
+# Include a directory with BuildInfo.h
+include_directories(${ETH_BUILD_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../cpp-ethereum)
+include_directories(${CPPETHEREUM_BUILD})
+
+file(GLOB_RECURSE SRC_LIST "libsolidity/*.cpp")
+file(GLOB_RECURSE HEADERS "libsolidity/*.h")
+
+set(EXECUTABLE solidity)
+add_library(${EXECUTABLE} ${SRC_LIST} ${HEADERS})
+
+# TODO installation and packaging rules
diff --git a/src/AST.cpp b/libsolidity/AST.cpp
index 8bad6ccf..8bad6ccf 100644
--- a/src/AST.cpp
+++ b/libsolidity/AST.cpp
diff --git a/src/AST.h b/libsolidity/AST.h
index fb83d4e1..fb83d4e1 100644
--- a/src/AST.h
+++ b/libsolidity/AST.h
diff --git a/src/ASTForward.h b/libsolidity/ASTForward.h
index 0ba485a2..0ba485a2 100644
--- a/src/ASTForward.h
+++ b/libsolidity/ASTForward.h
diff --git a/src/ASTJsonConverter.cpp b/libsolidity/ASTJsonConverter.cpp
index 122b1c0d..122b1c0d 100644
--- a/src/ASTJsonConverter.cpp
+++ b/libsolidity/ASTJsonConverter.cpp
diff --git a/src/ASTJsonConverter.h b/libsolidity/ASTJsonConverter.h
index aaa54f7f..aaa54f7f 100644
--- a/src/ASTJsonConverter.h
+++ b/libsolidity/ASTJsonConverter.h
diff --git a/src/ASTPrinter.cpp b/libsolidity/ASTPrinter.cpp
index d29ace17..d29ace17 100644
--- a/src/ASTPrinter.cpp
+++ b/libsolidity/ASTPrinter.cpp
diff --git a/src/ASTPrinter.h b/libsolidity/ASTPrinter.h
index cdf651f3..cdf651f3 100644
--- a/src/ASTPrinter.h
+++ b/libsolidity/ASTPrinter.h
diff --git a/src/ASTUtils.cpp b/libsolidity/ASTUtils.cpp
index 081d6b31..081d6b31 100644
--- a/src/ASTUtils.cpp
+++ b/libsolidity/ASTUtils.cpp
diff --git a/src/ASTUtils.h b/libsolidity/ASTUtils.h
index b24a3404..b24a3404 100644
--- a/src/ASTUtils.h
+++ b/libsolidity/ASTUtils.h
diff --git a/src/ASTVisitor.h b/libsolidity/ASTVisitor.h
index f7847220..f7847220 100644
--- a/src/ASTVisitor.h
+++ b/libsolidity/ASTVisitor.h
diff --git a/src/AST_accept.h b/libsolidity/AST_accept.h
index 3557f877..3557f877 100644
--- a/src/AST_accept.h
+++ b/libsolidity/AST_accept.h
diff --git a/src/ArrayUtils.cpp b/libsolidity/ArrayUtils.cpp
index 48ee5a05..48ee5a05 100644
--- a/src/ArrayUtils.cpp
+++ b/libsolidity/ArrayUtils.cpp
diff --git a/src/ArrayUtils.h b/libsolidity/ArrayUtils.h
index 80ffc008..80ffc008 100644
--- a/src/ArrayUtils.h
+++ b/libsolidity/ArrayUtils.h
diff --git a/src/CMakeLists.txt b/libsolidity/CMakeLists.txt
index 787e5576..787e5576 100644
--- a/src/CMakeLists.txt
+++ b/libsolidity/CMakeLists.txt
diff --git a/src/Compiler.cpp b/libsolidity/Compiler.cpp
index f0d1b38e..f0d1b38e 100644
--- a/src/Compiler.cpp
+++ b/libsolidity/Compiler.cpp
diff --git a/src/Compiler.h b/libsolidity/Compiler.h
index bec2b064..bec2b064 100644
--- a/src/Compiler.h
+++ b/libsolidity/Compiler.h
diff --git a/src/CompilerContext.cpp b/libsolidity/CompilerContext.cpp
index 0f6f5fe7..0f6f5fe7 100644
--- a/src/CompilerContext.cpp
+++ b/libsolidity/CompilerContext.cpp
diff --git a/src/CompilerContext.h b/libsolidity/CompilerContext.h
index 3f97d900..3f97d900 100644
--- a/src/CompilerContext.h
+++ b/libsolidity/CompilerContext.h
diff --git a/src/CompilerStack.cpp b/libsolidity/CompilerStack.cpp
index a85738eb..a85738eb 100644
--- a/src/CompilerStack.cpp
+++ b/libsolidity/CompilerStack.cpp
diff --git a/src/CompilerStack.h b/libsolidity/CompilerStack.h
index 735c4d15..735c4d15 100644
--- a/src/CompilerStack.h
+++ b/libsolidity/CompilerStack.h
diff --git a/src/CompilerUtils.cpp b/libsolidity/CompilerUtils.cpp
index 49247581..49247581 100644
--- a/src/CompilerUtils.cpp
+++ b/libsolidity/CompilerUtils.cpp
diff --git a/src/CompilerUtils.h b/libsolidity/CompilerUtils.h
index dbb00a1d..dbb00a1d 100644
--- a/src/CompilerUtils.h
+++ b/libsolidity/CompilerUtils.h
diff --git a/src/DeclarationContainer.cpp b/libsolidity/DeclarationContainer.cpp
index 3e23d93b..3e23d93b 100644
--- a/src/DeclarationContainer.cpp
+++ b/libsolidity/DeclarationContainer.cpp
diff --git a/src/DeclarationContainer.h b/libsolidity/DeclarationContainer.h
index 0f0b5717..0f0b5717 100644
--- a/src/DeclarationContainer.h
+++ b/libsolidity/DeclarationContainer.h
diff --git a/src/Exceptions.h b/libsolidity/Exceptions.h
index 4bb6644b..4bb6644b 100644
--- a/src/Exceptions.h
+++ b/libsolidity/Exceptions.h
diff --git a/src/ExpressionCompiler.cpp b/libsolidity/ExpressionCompiler.cpp
index 0841089b..0841089b 100644
--- a/src/ExpressionCompiler.cpp
+++ b/libsolidity/ExpressionCompiler.cpp
diff --git a/src/ExpressionCompiler.h b/libsolidity/ExpressionCompiler.h
index 642560c6..642560c6 100644
--- a/src/ExpressionCompiler.h
+++ b/libsolidity/ExpressionCompiler.h
diff --git a/src/GasEstimator.cpp b/libsolidity/GasEstimator.cpp
index 01219a65..01219a65 100644
--- a/src/GasEstimator.cpp
+++ b/libsolidity/GasEstimator.cpp
diff --git a/src/GasEstimator.h b/libsolidity/GasEstimator.h
index 4020d60b..4020d60b 100644
--- a/src/GasEstimator.h
+++ b/libsolidity/GasEstimator.h
diff --git a/src/GlobalContext.cpp b/libsolidity/GlobalContext.cpp
index 80cebd76..80cebd76 100644
--- a/src/GlobalContext.cpp
+++ b/libsolidity/GlobalContext.cpp
diff --git a/src/GlobalContext.h b/libsolidity/GlobalContext.h
index f861c67d..f861c67d 100644
--- a/src/GlobalContext.h
+++ b/libsolidity/GlobalContext.h
diff --git a/src/InterfaceHandler.cpp b/libsolidity/InterfaceHandler.cpp
index c6f8553d..c6f8553d 100644
--- a/src/InterfaceHandler.cpp
+++ b/libsolidity/InterfaceHandler.cpp
diff --git a/src/InterfaceHandler.h b/libsolidity/InterfaceHandler.h
index 7784dbd7..7784dbd7 100644
--- a/src/InterfaceHandler.h
+++ b/libsolidity/InterfaceHandler.h
diff --git a/src/LValue.cpp b/libsolidity/LValue.cpp
index 5c43fb82..5c43fb82 100644
--- a/src/LValue.cpp
+++ b/libsolidity/LValue.cpp
diff --git a/src/LValue.h b/libsolidity/LValue.h
index a93df9f9..a93df9f9 100644
--- a/src/LValue.h
+++ b/libsolidity/LValue.h
diff --git a/src/NameAndTypeResolver.cpp b/libsolidity/NameAndTypeResolver.cpp
index 87f9da7e..87f9da7e 100644
--- a/src/NameAndTypeResolver.cpp
+++ b/libsolidity/NameAndTypeResolver.cpp
diff --git a/src/NameAndTypeResolver.h b/libsolidity/NameAndTypeResolver.h
index d7a0a3b2..d7a0a3b2 100644
--- a/src/NameAndTypeResolver.h
+++ b/libsolidity/NameAndTypeResolver.h
diff --git a/src/Parser.cpp b/libsolidity/Parser.cpp
index fbf8478d..fbf8478d 100644
--- a/src/Parser.cpp
+++ b/libsolidity/Parser.cpp
diff --git a/src/Parser.h b/libsolidity/Parser.h
index d667aa3e..d667aa3e 100644
--- a/src/Parser.h
+++ b/libsolidity/Parser.h
diff --git a/src/Scanner.cpp b/libsolidity/Scanner.cpp
index fbe3ea97..fbe3ea97 100644
--- a/src/Scanner.cpp
+++ b/libsolidity/Scanner.cpp
diff --git a/src/Scanner.h b/libsolidity/Scanner.h
index 43fcd133..43fcd133 100644
--- a/src/Scanner.h
+++ b/libsolidity/Scanner.h
diff --git a/src/SourceReferenceFormatter.cpp b/libsolidity/SourceReferenceFormatter.cpp
index 77805efc..77805efc 100644
--- a/src/SourceReferenceFormatter.cpp
+++ b/libsolidity/SourceReferenceFormatter.cpp
diff --git a/src/SourceReferenceFormatter.h b/libsolidity/SourceReferenceFormatter.h
index dd258c27..dd258c27 100644
--- a/src/SourceReferenceFormatter.h
+++ b/libsolidity/SourceReferenceFormatter.h
diff --git a/src/Token.cpp b/libsolidity/Token.cpp
index d07d7502..d07d7502 100644
--- a/src/Token.cpp
+++ b/libsolidity/Token.cpp
diff --git a/src/Token.h b/libsolidity/Token.h
index 7c7b1c7f..7c7b1c7f 100644
--- a/src/Token.h
+++ b/libsolidity/Token.h
diff --git a/src/Types.cpp b/libsolidity/Types.cpp
index bda68356..bda68356 100644
--- a/src/Types.cpp
+++ b/libsolidity/Types.cpp
diff --git a/src/Types.h b/libsolidity/Types.h
index c4992cfd..c4992cfd 100644
--- a/src/Types.h
+++ b/libsolidity/Types.h
diff --git a/src/Utils.h b/libsolidity/Utils.h
index 05c5fa6f..05c5fa6f 100644
--- a/src/Utils.h
+++ b/libsolidity/Utils.h
diff --git a/src/Version.cpp b/libsolidity/Version.cpp
index 75a0dd25..75a0dd25 100644
--- a/src/Version.cpp
+++ b/libsolidity/Version.cpp
diff --git a/src/Version.h b/libsolidity/Version.h
index 6e00f07b..6e00f07b 100644
--- a/src/Version.h
+++ b/libsolidity/Version.h
diff --git a/src/grammar.txt b/libsolidity/grammar.txt
index 6503516c..6503516c 100644
--- a/src/grammar.txt
+++ b/libsolidity/grammar.txt