From 1bfd4202b98c6e5e499a05540c2d64ea93f8f618 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 3 Jan 2014 01:27:19 +0000 Subject: [PATCH] Reorganised source directory. --- CMakeLists.txt | 5 +- libethereum/CMakeLists.txt | 2 + libethereum/CMakeLists.txt.user | 181 ++++++++++++++++++ Common.cpp => libethereum/Common.cpp | 0 Common.h => libethereum/Common.h | 0 .../PatriciaTree.cpp | 0 PatriciaTree.h => libethereum/PatriciaTree.h | 0 RLP.cpp => libethereum/RLP.cpp | 0 RLP.h => libethereum/RLP.h | 0 .../VirtualMachine.cpp | 0 .../VirtualMachine.h | 0 foreign.h => libethereum/foreign.h | 0 sha256.cpp => libethereum/sha256.cpp | 0 sha256.h => libethereum/sha256.h | 0 test/CMakeLists.txt | 9 + test/CMakeLists.txt.user | 181 ++++++++++++++++++ main.cpp => test/main.cpp | 0 17 files changed, 376 insertions(+), 2 deletions(-) create mode 100644 libethereum/CMakeLists.txt create mode 100644 libethereum/CMakeLists.txt.user rename Common.cpp => libethereum/Common.cpp (100%) rename Common.h => libethereum/Common.h (100%) rename PatriciaTree.cpp => libethereum/PatriciaTree.cpp (100%) rename PatriciaTree.h => libethereum/PatriciaTree.h (100%) rename RLP.cpp => libethereum/RLP.cpp (100%) rename RLP.h => libethereum/RLP.h (100%) rename VirtualMachine.cpp => libethereum/VirtualMachine.cpp (100%) rename VirtualMachine.h => libethereum/VirtualMachine.h (100%) rename foreign.h => libethereum/foreign.h (100%) rename sha256.cpp => libethereum/sha256.cpp (100%) rename sha256.h => libethereum/sha256.h (100%) create mode 100644 test/CMakeLists.txt create mode 100644 test/CMakeLists.txt.user rename main.cpp => test/main.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5a211420..c1cd458fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,5 +21,6 @@ else () message(FATAL_ERROR "Your C++ compiler does not support C++11.") endif () -aux_source_directory(. SRC_LIST) -add_executable(${PROJECT_NAME} ${SRC_LIST}) +add_subdirectory(libethereum) +add_subdirectory(test) + diff --git a/libethereum/CMakeLists.txt b/libethereum/CMakeLists.txt new file mode 100644 index 000000000..c2d80b5a1 --- /dev/null +++ b/libethereum/CMakeLists.txt @@ -0,0 +1,2 @@ +aux_source_directory(. SRC_LIST) +add_library(libethereum ${SRC_LIST}) diff --git a/libethereum/CMakeLists.txt.user b/libethereum/CMakeLists.txt.user new file mode 100644 index 000000000..6948bb794 --- /dev/null +++ b/libethereum/CMakeLists.txt.user @@ -0,0 +1,181 @@ + + + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + true + 1 + false + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + {0d0560e6-4479-432d-8a2c-23989b161c58} + 0 + 0 + 0 + + /home/gav/Projects/cpp-ethereum-build + false + + + + + all + + false + false + true + Make + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + clean + + true + false + true + Make + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + all + + CMakeProjectManager.CMakeBuildConfiguration + + 1 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + true + + false + false + false + false + true + 0.01 + 10 + true + 25 + + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + ethereum + + false + + 2 + + ethereum + + CMakeProjectManager.CMakeRunConfiguration.ethereum + 3768 + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.EnvironmentId + {2115e592-0090-43c3-97c5-38078516e87a} + + + ProjectExplorer.Project.Updater.FileVersion + 12 + + diff --git a/Common.cpp b/libethereum/Common.cpp similarity index 100% rename from Common.cpp rename to libethereum/Common.cpp diff --git a/Common.h b/libethereum/Common.h similarity index 100% rename from Common.h rename to libethereum/Common.h diff --git a/PatriciaTree.cpp b/libethereum/PatriciaTree.cpp similarity index 100% rename from PatriciaTree.cpp rename to libethereum/PatriciaTree.cpp diff --git a/PatriciaTree.h b/libethereum/PatriciaTree.h similarity index 100% rename from PatriciaTree.h rename to libethereum/PatriciaTree.h diff --git a/RLP.cpp b/libethereum/RLP.cpp similarity index 100% rename from RLP.cpp rename to libethereum/RLP.cpp diff --git a/RLP.h b/libethereum/RLP.h similarity index 100% rename from RLP.h rename to libethereum/RLP.h diff --git a/VirtualMachine.cpp b/libethereum/VirtualMachine.cpp similarity index 100% rename from VirtualMachine.cpp rename to libethereum/VirtualMachine.cpp diff --git a/VirtualMachine.h b/libethereum/VirtualMachine.h similarity index 100% rename from VirtualMachine.h rename to libethereum/VirtualMachine.h diff --git a/foreign.h b/libethereum/foreign.h similarity index 100% rename from foreign.h rename to libethereum/foreign.h diff --git a/sha256.cpp b/libethereum/sha256.cpp similarity index 100% rename from sha256.cpp rename to libethereum/sha256.cpp diff --git a/sha256.h b/libethereum/sha256.h similarity index 100% rename from sha256.h rename to libethereum/sha256.h diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 000000000..336ccd15a --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_policy(SET CMP0015 NEW) + +aux_source_directory(. SRC_LIST) +include_directories(../libethereum) +link_directories(../libethereum) + +add_executable(testeth ${SRC_LIST}) + +target_link_libraries(testeth libethereum) diff --git a/test/CMakeLists.txt.user b/test/CMakeLists.txt.user new file mode 100644 index 000000000..6948bb794 --- /dev/null +++ b/test/CMakeLists.txt.user @@ -0,0 +1,181 @@ + + + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + true + 1 + false + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + {0d0560e6-4479-432d-8a2c-23989b161c58} + 0 + 0 + 0 + + /home/gav/Projects/cpp-ethereum-build + false + + + + + all + + false + false + true + Make + + CMakeProjectManager.MakeStep + + 1 + Build + + ProjectExplorer.BuildSteps.Build + + + + clean + + true + false + true + Make + + CMakeProjectManager.MakeStep + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + all + + CMakeProjectManager.CMakeBuildConfiguration + + 1 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + true + + false + false + false + false + true + 0.01 + 10 + true + 25 + + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + ethereum + + false + + 2 + + ethereum + + CMakeProjectManager.CMakeRunConfiguration.ethereum + 3768 + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.EnvironmentId + {2115e592-0090-43c3-97c5-38078516e87a} + + + ProjectExplorer.Project.Updater.FileVersion + 12 + + diff --git a/main.cpp b/test/main.cpp similarity index 100% rename from main.cpp rename to test/main.cpp