From 79030c55863d8a98fb67d549c747c9666b4ef2ec Mon Sep 17 00:00:00 2001 From: Sergiy Oryekhov Date: Wed, 23 Mar 2016 16:53:00 -0700 Subject: [PATCH] Moving submodule init before subdirectory. --- tests/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 66516fe..e6527da 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 2.8.7) project(GSLTests CXX) +if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/unittest-cpp/tests) + execute_process(COMMAND git submodule update --init WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") +endif() + add_subdirectory(unittest-cpp) include_directories( @@ -28,10 +32,6 @@ else() endif() endif() -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) add_executable(${name} ${name}.cpp ../include/gsl.h ../include/gsl_assert.h ../include/gsl_util.h ../include/span.h ../include/string_span.h) target_link_libraries(${name} UnitTest++)