aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt26
-rw-r--r--test.cc7
2 files changed, 33 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..ed284d4
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 2.8)
+project(TypeAsValue)
+
+set(
+ CMAKE_CXX_FLAGS
+ "-std=c++14 -W -Wall -Wextra -Winline -pedantic"
+)
+
+include_directories(
+ src/
+)
+
+add_executable(
+ tests
+ test.cc
+)
+
+target_link_libraries(
+ tests
+ gtest
+)
+
+add_custom_command(
+ TARGET tests
+ POST_BUILD COMMAND ./tests
+)
diff --git a/test.cc b/test.cc
new file mode 100644
index 0000000..f70f5ac
--- /dev/null
+++ b/test.cc
@@ -0,0 +1,7 @@
+#include "gtest/gtest.h"
+
+int main(int argc, char **argv) {
+ testing::InitGoogleTest(&argc, argv);
+
+ return RUN_ALL_TESTS();
+}