diff options
author | Patrick Steinhardt <ps@pks.im> | 2017-05-10 12:14:36 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2017-06-23 15:17:44 +0200 |
commit | 4305fcca1bbc8ee9f84df898c1124ac1db0a5e97 (patch) | |
tree | eedba7a165074d378332f64cc996303c863d7a11 | |
parent | 8d22bcea29cd54d9c8bbe8ea298a033a303eedeb (diff) | |
download | libgit2-4305fcca1bbc8ee9f84df898c1124ac1db0a5e97.tar.gz |
cmake: generate clar.suite in binary directory
Change the output path of generate.py to generate the clar.suite file
inside of the binary directory. This fixes out of tree builds with
read-only source trees as we now refrain from writing anything into the
source tree.
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4783e3ef9..12b156b75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -676,15 +676,16 @@ IF (BUILD_CLAR) SET(SRC_CLAR "${CLAR_PATH}/main.c" "${CLAR_PATH}/clar_libgit2.c" "${CLAR_PATH}/clar_libgit2_trace.c" "${CLAR_PATH}/clar_libgit2_timer.c" "${CLAR_PATH}/clar.c") ADD_CUSTOM_COMMAND( - OUTPUT ${CLAR_PATH}/clar.suite - COMMAND ${PYTHON_EXECUTABLE} generate.py -f -xonline -xstress . + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clar.suite + COMMAND ${PYTHON_EXECUTABLE} generate.py -o "${CMAKE_CURRENT_BINARY_DIR}" -f -xonline -xstress . DEPENDS ${SRC_TEST} WORKING_DIRECTORY ${CLAR_PATH} ) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) SET_SOURCE_FILES_PROPERTIES( ${CLAR_PATH}/clar.c - PROPERTIES OBJECT_DEPENDS ${CLAR_PATH}/clar.suite) + PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/clar.suite) ADD_EXECUTABLE(libgit2_clar ${SRC_H} ${SRC_GIT2} ${SRC_OS} ${SRC_CLAR} ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX} ${SRC_SSH} ${SRC_SHA1}) |