Create directory for generated runner.

And remove IMPLICIT_DEPENDS for runner generating.
This commit is contained in:
Xpol Wan 2016-06-29 20:23:14 +08:00
parent 0fd1264903
commit ad6922694e

View File

@ -25,6 +25,7 @@ FILE(GLOB TEST_HELPERS_SOURCES tests/helpers/*.cpp)
SET(TEST_HELPERS ${TEST_HELPERS_HEADERS} ${TEST_HELPERS_SOURCES}) SET(TEST_HELPERS ${TEST_HELPERS_HEADERS} ${TEST_HELPERS_SOURCES})
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/tests")
SET(RUNNER "${CMAKE_CURRENT_BINARY_DIR}/tests/runner-autogen.cpp") SET(RUNNER "${CMAKE_CURRENT_BINARY_DIR}/tests/runner-autogen.cpp")
SET_SOURCE_FILES_PROPERTIES(${RUNNER} PROPERTIES GENERATED TRUE) SET_SOURCE_FILES_PROPERTIES(${RUNNER} PROPERTIES GENERATED TRUE)
@ -62,7 +63,6 @@ endif()
add_custom_command(OUTPUT ${RUNNER} add_custom_command(OUTPUT ${RUNNER}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/generate-tests ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/generate-tests ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${TESTS} DEPENDS ${TESTS}
IMPLICIT_DEPENDS CXX ${TESTS}
COMMENT "Generating test runner ${RUNNER}" COMMENT "Generating test runner ${RUNNER}"
) )