[arrayfire] 122/248: Call submodule update if submodules are missing
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Nov 17 15:54:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.
commit 66453c49c6942f3283cc7162cceaf935b8d30fd8
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Tue Oct 13 11:29:19 2015 -0400
Call submodule update if submodules are missing
---
examples/CMakeLists.txt | 12 ++++++------
test/CMakeLists.txt | 30 +++++++++++++++---------------
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 0fbe1b9..a795916 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -14,12 +14,12 @@ if(TARGET afcpu OR TARGET afcuda OR TARGET afopencl)
SET(ArrayFire_OpenCL_FOUND False)
SET(ASSETS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
IF(NOT EXISTS "${ASSETS_DIR}/LICENSE")
- MESSAGE(WARNING "Arrayfire assets are not available. Assets will not be installed.")
- MESSAGE("Did you miss the --recursive option when cloning?")
- MESSAGE("Run the following commands to correct this:")
- MESSAGE("git submodule init")
- MESSAGE("git submodule update")
- MESSAGE("git submodule foreach git pull origin master")
+ MESSAGE(STATUS "Assests submodule unavailable. Updating submodules.")
+ EXECUTE_PROCESS(
+ COMMAND git submodule update --init --recursive
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ OUTPUT_QUIET
+ )
ENDIF()
else()
FIND_PACKAGE(ArrayFire REQUIRED)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index aff4620..30907d3 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -42,15 +42,6 @@ ELSE()
SET(THREAD_LIB_FLAG ${CMAKE_THREAD_LIBS_INIT})
ENDIF()
-OPTION(USE_SYSTEM_GTEST "Use GTEST from system libraries" OFF)
-IF(USE_SYSTEM_GTEST)
- FIND_PACKAGE(GTest REQUIRED)
-ELSE(USE_SYSTEM_GTEST)
- INCLUDE("${CMAKE_MODULE_PATH}/build_gtest.cmake")
-ENDIF(USE_SYSTEM_GTEST)
-
-INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIRS})
-
OPTION(USE_RELATIVE_TEST_DIR "Use relative paths for the test data directory(For continious integration(CI) purposes only)" OFF)
IF(${USE_RELATIVE_TEST_DIR})
@@ -74,15 +65,24 @@ IF (EXISTS "${TESTDATA_SOURCE_DIR}" AND IS_DIRECTORY "${TESTDATA_SOURCE_DIR}"
# Do Nothing
ELSE (EXISTS "${TESTDATA_SOURCE_DIR}" AND IS_DIRECTORY "${TESTDATA_SOURCE_DIR}"
AND EXISTS "${TESTDATA_SOURCE_DIR}/README.md")
- MESSAGE(WARNING "Test Data is not available. Tests will build but fail when run.")
- MESSAGE("Did you miss the --recursive option when cloning?")
- MESSAGE("Run the following commands to correct this:")
- MESSAGE("git submodule init")
- MESSAGE("git submodule update")
- MESSAGE("git submodule foreach git pull origin master")
+ MESSAGE(STATUS "Test submodules unavailable. Updating submodules.")
+ EXECUTE_PROCESS(
+ COMMAND git submodule update --init --recursive
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ OUTPUT_QUIET
+ )
ENDIF()
ENDIF(NOT ${USE_RELATIVE_TEST_DIR})
+OPTION(USE_SYSTEM_GTEST "Use GTEST from system libraries" OFF)
+IF(USE_SYSTEM_GTEST)
+ FIND_PACKAGE(GTest REQUIRED)
+ELSE(USE_SYSTEM_GTEST)
+ INCLUDE("${CMAKE_MODULE_PATH}/build_gtest.cmake")
+ENDIF(USE_SYSTEM_GTEST)
+
+INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIRS})
+
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
FILE(GLOB FILES "*.cpp" "*.c")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list