From e1bebd647f9bb1bc686d13d062b112b3a16d6310 Mon Sep 17 00:00:00 2001 From: Hanjoung Lee Date: Tue, 20 Mar 2018 20:27:43 +0900 Subject: [PATCH] Add CMakeLists.txt for runtime And this adds a "Hello World" executable for dummy build. --- CMakeLists.txt | 1 + src/CMakeLists.txt | 1 + src/runtime/CMakeLists.txt | 1 + src/runtime/ref/CMakeLists.txt | 5 +++++ src/runtime/ref/main.cc | 8 ++++++++ src/runtime/ref/main.h | 6 ++++++ 6 files changed, 22 insertions(+) create mode 100644 src/CMakeLists.txt create mode 100644 src/runtime/CMakeLists.txt create mode 100644 src/runtime/ref/CMakeLists.txt create mode 100644 src/runtime/ref/main.cc create mode 100644 src/runtime/ref/main.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b22552..88019ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,3 +68,4 @@ endforeach() add_subdirectory(externals) add_subdirectory(tools) +add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..4c5f637 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(runtime) diff --git a/src/runtime/CMakeLists.txt b/src/runtime/CMakeLists.txt new file mode 100644 index 0000000..1d98c0e --- /dev/null +++ b/src/runtime/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(ref) diff --git a/src/runtime/ref/CMakeLists.txt b/src/runtime/ref/CMakeLists.txt new file mode 100644 index 0000000..27eb2b7 --- /dev/null +++ b/src/runtime/ref/CMakeLists.txt @@ -0,0 +1,5 @@ +file(GLOB SRCS *.cc) +file(GLOB HDRS *.h) + +add_executable(runtime_run ${SRCS} ${HDRS}) +target_include_directories(runtime_run PRIVATE .) diff --git a/src/runtime/ref/main.cc b/src/runtime/ref/main.cc new file mode 100644 index 0000000..b73039c --- /dev/null +++ b/src/runtime/ref/main.cc @@ -0,0 +1,8 @@ +#include +#include "main.h" + +int main() +{ + std::cout << HELLO_RUNTIME << std::endl; + return 0; +} diff --git a/src/runtime/ref/main.h b/src/runtime/ref/main.h new file mode 100644 index 0000000..58020d8 --- /dev/null +++ b/src/runtime/ref/main.h @@ -0,0 +1,6 @@ +#ifndef __RUNTIME_MAIN_H__ +#define __RUNTIME_MAIN_H__ + +const char *HELLO_RUNTIME = "Hello Runtime!"; + +#endif // __RUNTIME_MAIN_H__ -- 2.7.4