From 30d192850454f101025cfb957b45a63ae5b6f2d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Senior=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Mon, 12 Mar 2018 08:48:13 +0900 Subject: [PATCH] Add contrib directory (#6) * Add contrib directory This commit adds contrib directory which will include all the incubating projects, and CMakeLists.txt for these incubating projects. This commit adds 'Getting Started' project template which includes a simple 'hello, world' example to show how to use this directory. Signed-off-by: Jonghyun Park * Remove unnecessary blank --- CMakeLists.txt | 5 +++++ contrib/CMakeLists.txt | 6 ++++++ contrib/getting_started/CMakeLists.txt | 1 + contrib/getting_started/hello.cpp | 7 +++++++ 4 files changed, 19 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 contrib/CMakeLists.txt create mode 100644 contrib/getting_started/CMakeLists.txt create mode 100644 contrib/getting_started/hello.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..1933324 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 2.8) + +project(nncc) + +add_subdirectory(contrib) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt new file mode 100644 index 0000000..78417ea --- /dev/null +++ b/contrib/CMakeLists.txt @@ -0,0 +1,6 @@ +file(GLOB CONTRIB_CMAKE_FILES "*/CMakeLists.txt") + +foreach(CONTRIB_CMAKE_FILE ${CONTRIB_CMAKE_FILES}) + get_filename_component(CONTRIB_BASE ${CONTRIB_CMAKE_FILE} DIRECTORY) + add_subdirectory(${CONTRIB_BASE}) +endforeach(CONTRIB_CMAKE_FILE ${CONTRIB_CMAKE_FILES}) diff --git a/contrib/getting_started/CMakeLists.txt b/contrib/getting_started/CMakeLists.txt new file mode 100644 index 0000000..6f9b540 --- /dev/null +++ b/contrib/getting_started/CMakeLists.txt @@ -0,0 +1 @@ +add_executable(hello hello.cpp) diff --git a/contrib/getting_started/hello.cpp b/contrib/getting_started/hello.cpp new file mode 100644 index 0000000..1cca206 --- /dev/null +++ b/contrib/getting_started/hello.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char **argv) +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} -- 2.7.4