Add build dependency for clar. Also, fuck you CMake. Fuck you.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6976844..f2cf252 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -242,17 +242,23 @@ IF (BUILD_CLAR)
ADD_DEFINITIONS(-DCLAR_RESOURCES=\"${TEST_RESOURCES}\")
INCLUDE_DIRECTORIES(${CLAR_PATH})
- FILE(GLOB_RECURSE SRC_TEST ${CLAR_PATH}/*/*.c ${CLAR_PATH}/clar_helpers.c)
+ FILE(GLOB_RECURSE SRC_TEST ${CLAR_PATH}/*/*.c)
+ SET(SRC_CLAR "${CLAR_PATH}/main.c" "${CLAR_PATH}/clar_helpers.c")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-prototypes")
ADD_CUSTOM_COMMAND(
OUTPUT ${CLAR_PATH}/clar.suite
COMMAND ${PYTHON_EXECUTABLE} clar/generate.py .
- DEPENDS ${CLAR_PATH}/clar.suite ${SRC_TEST}
+ DEPENDS ${SRC_TEST}
WORKING_DIRECTORY ${CLAR_PATH}
)
- ADD_EXECUTABLE(libgit2_clar ${SRC_GIT2} ${SRC_OS} ${CLAR_PATH}/main.c ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SHA1})
+ SET_SOURCE_FILES_PROPERTIES(
+ ${CLAR_PATH}/clar/clar.c
+ PROPERTIES OBJECT_DEPENDS ${CLAR_PATH}/clar.suite)
+
+ ADD_EXECUTABLE(libgit2_clar ${SRC_GIT2} ${SRC_OS} ${SRC_CLAR} ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SHA1})
+
TARGET_LINK_LIBRARIES(libgit2_clar ${SSL_LIBRARIES})
TARGET_OS_LIBRARIES(libgit2_clar)
MSVC_SPLIT_SOURCES(libgit2_clar)
diff --git a/tests-clar/clar b/tests-clar/clar
index 1febaef..fe7d974 160000
--- a/tests-clar/clar
+++ b/tests-clar/clar
@@ -1 +1 @@
-Subproject commit 1febaef178ccc12d3bdc4568a23f089b520a987b
+Subproject commit fe7d9740becabac0e856eb0cdc19bc7e48680ba5