Merge remote-tracking branch 'xpol/remove-and-ignore-genreated-test-runner'

pull/56/head
Thomas Fussell 2016-07-04 12:21:46 -04:00
commit 627e6d438e
4 changed files with 10 additions and 6 deletions

View File

@ -1,2 +1,2 @@
cd ${0%/*}
../third-party/cxxtest/bin/cxxtestgen --runner=ErrorPrinter -o ../tests/runner-autogen.cpp ../tests/*.hpp ../source/*/tests/*.hpp
../third-party/cxxtest/bin/cxxtestgen --runner=ErrorPrinter -o "$1"/tests/runner-autogen.cpp ../tests/*.hpp ../source/*/tests/*.hpp

View File

@ -1,2 +1,2 @@
cd %~dp0
../third-party/cxxtest/bin/cxxtestgen --runner=ErrorPrinter -o ../tests/runner-autogen.cpp ../tests/*.hpp ../source/*/tests/*.hpp
../third-party/cxxtest/bin/cxxtestgen --runner=ErrorPrinter -o "%1"/tests/runner-autogen.cpp ../tests/*.hpp ../source/*/tests/*.hpp

View File

@ -25,7 +25,9 @@ FILE(GLOB TEST_HELPERS_SOURCES tests/helpers/*.cpp)
SET(TEST_HELPERS ${TEST_HELPERS_HEADERS} ${TEST_HELPERS_SOURCES})
SET(RUNNER tests/runner-autogen.cpp)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/tests")
SET(RUNNER "${CMAKE_CURRENT_BINARY_DIR}/tests/runner-autogen.cpp")
SET_SOURCE_FILES_PROPERTIES(${RUNNER} PROPERTIES GENERATED TRUE)
add_executable(xlnt.test ${TEST_HELPERS} ${TESTS} ${RUNNER} )
@ -58,9 +60,12 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
target_link_libraries(xlnt.test Shlwapi)
endif()
add_custom_target (generate-test-runner
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/generate-tests
add_custom_command(OUTPUT ${RUNNER}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/generate-tests ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${TESTS}
COMMENT "Generating test runner ${RUNNER}"
)
add_custom_target(generate-test-runner DEPENDS ${RUNNER})
add_dependencies(xlnt.test generate-test-runner)

View File

@ -1 +0,0 @@
#error This file should be generated from tests before compiling