From 15a9dd50ae2112d6fe80b833bd05278a9b4f67a7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Jan 2020 03:17:04 +0300 Subject: add test/ to test, for starters, enum_symbols --- CMakeLists.txt | 1 + test/CMakeLists.txt | 6 ++++++ test/lab_rat.cpp | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 test/CMakeLists.txt create mode 100644 test/lab_rat.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index ef02ccf..4c99eda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ if(MSVC_VERSION EQUAL 1900) target_compile_options(pdb_repo PUBLIC /wd4091) endif() +add_subdirectory(test) add_subdirectory(utils) install(FILES LICENSE.txt DESTINATION share) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..0cd4c1a --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,6 @@ +add_executable(lab_rat lab_rat.cpp) + +install(TARGETS lab_rat RUNTIME DESTINATION bin) +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + install(FILES "$" DESTINATION bin OPTIONAL) +endif() diff --git a/test/lab_rat.cpp b/test/lab_rat.cpp new file mode 100644 index 0000000..24f75c6 --- /dev/null +++ b/test/lab_rat.cpp @@ -0,0 +1,20 @@ +#include + +void baz() { + std::cout << "baz\n"; +} + +void bar() { + std::cout << "bar\n"; + baz(); +} + +void foo() { + std::cout << "foo\n"; + bar(); +} + +int main() { + foo(); + return 0; +} -- cgit v1.2.3