From 32d00796ad530d202dcbdaf817d47a2405b31301 Mon Sep 17 00:00:00 2001 From: Sergiy Oryekhov Date: Wed, 23 Mar 2016 16:42:35 -0700 Subject: [PATCH] Adding unittest-cpp as a submodule. --- .gitignore | 1 - .gitmodules | 3 +++ tests/CMakeLists.txt | 4 ++-- tests/unittest-cpp | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 tests/unittest-cpp diff --git a/.gitignore b/.gitignore index ea47eb3..d452689 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -tests/unittest-cpp CMakeFiles tests/CMakeFiles tests/Debug diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d9229ae --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "tests/unittest-cpp"] + path = tests/unittest-cpp + url = https://github.com/Microsoft/unittest-cpp.git diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7990ec3..66516fe 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -28,8 +28,8 @@ else() endif() endif() -if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/unittest-cpp) - message(FATAL_ERROR "Could not find unittest-cpp enlistment. Please run 'git clone https://github.com/Microsoft/unittest-cpp.git unittest-cpp' in the tests directory") +if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/unittest-cpp/tests) + execute_process(COMMAND git submodule update --init --recursive WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") endif() function(add_gsl_test name) diff --git a/tests/unittest-cpp b/tests/unittest-cpp new file mode 160000 index 0000000..dc6b908 --- /dev/null +++ b/tests/unittest-cpp @@ -0,0 +1 @@ +Subproject commit dc6b90838014ab985bf3cd74ac17ad9d00e1fbcb