From 16d19648d287991b5707d215cc06a45a9717312a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=84=9C=EC=83=81=EB=AF=BC/=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, 16 Apr 2018 16:23:44 +0900 Subject: [PATCH] contrib: add the top-level CMakeLists and example (#722) For issue #680 This commit adds an example for the contrib directory as well as the top-level CMakeLists.txt. The files were copied from STAR/nncc/contrib and modified. Signed-off-by: Sangmin Seo --- CMakeLists.txt | 1 + contrib/CMakeLists.txt | 6 ++++++ contrib/example/CMakeLists.txt | 1 + contrib/example/example.cpp | 7 +++++++ 4 files changed, 15 insertions(+) create mode 100644 contrib/CMakeLists.txt create mode 100644 contrib/example/CMakeLists.txt create mode 100644 contrib/example/example.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index f1b6ff6..feca7e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,3 +138,4 @@ if(BUILD_LABS) add_subdirectory(labs) endif(BUILD_LABS) add_subdirectory(benchmark) +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/example/CMakeLists.txt b/contrib/example/CMakeLists.txt new file mode 100644 index 0000000..2d487d5 --- /dev/null +++ b/contrib/example/CMakeLists.txt @@ -0,0 +1 @@ +add_executable(example example.cpp) diff --git a/contrib/example/example.cpp b/contrib/example/example.cpp new file mode 100644 index 0000000..1cca206 --- /dev/null +++ b/contrib/example/example.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char **argv) +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} -- 2.7.4