Commit 0df4167577873cc91fd3745566195c46c009c59d

Vicent Marti 2013-01-02T21:22:19

Submodule checkout

diff --git a/.travis.yml b/.travis.yml
index 8ce4903..e4e5a0b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,5 @@
 # Travis-CI Build for libgit2
 # see travis-ci.org for details
-
-# As CMake is not officially supported we use erlang VMs
 language: c
 
 compiler:
@@ -28,7 +26,7 @@ script:
  - mkdir _build
  - cd _build
  - cmake .. -DCMAKE_INSTALL_PREFIX=../_install $OPTIONS
- - cmake --build . --target install
+ - cmake --build . --target submodules install
  - ctest -V .
 
 # Run Tests
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2794bfa..dbb11d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -231,6 +231,12 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc DESTINATION ${LIB_INSTALL_D
 INSTALL(DIRECTORY include/git2 DESTINATION ${INCLUDE_INSTALL_DIR} )
 INSTALL(FILES include/git2.h DESTINATION ${INCLUDE_INSTALL_DIR} )
 
+
+ADD_CUSTOM_TARGET(
+	submodules
+	COMMAND git submodule update --init tests-clar/clar
+)
+
 # Tests
 IF (BUILD_CLAR)
 	FIND_PACKAGE(PythonInterp REQUIRED)
@@ -243,16 +249,10 @@ IF (BUILD_CLAR)
 
 	INCLUDE_DIRECTORIES(${CLAR_PATH})
 	FILE(GLOB_RECURSE SRC_TEST ${CLAR_PATH}/*/*.c)
-	SET(SRC_CLAR "${CLAR_PATH}/main.c" "${CLAR_PATH}/clar_helpers.c")
+	SET(SRC_CLAR "${CLAR_PATH}/main.c" "${CLAR_PATH}/clar_helpers.c" "${CLAR_PATH}/clar/clar.c")
 	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes")
 
 	ADD_CUSTOM_COMMAND(
-		COMMAND echo "###### testing this stuff"
-		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-		DEPENDS "${CLAR_PATH}/clar/clar.c"
-	)
-
-	ADD_CUSTOM_COMMAND(
 		OUTPUT ${CLAR_PATH}/clar.suite
 		COMMAND ${PYTHON_EXECUTABLE} clar/generate.py .
 		DEPENDS ${SRC_TEST}