mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Moving submodule init before subdirectory.
This commit is contained in:
parent
32d00796ad
commit
79030c5586
@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 2.8.7)
|
|||||||
|
|
||||||
project(GSLTests CXX)
|
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)
|
add_subdirectory(unittest-cpp)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
@ -28,10 +32,6 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
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)
|
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)
|
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++)
|
target_link_libraries(${name} UnitTest++)
|
||||||
|
Loading…
Reference in New Issue
Block a user