Don't let doctests pollute the source tree (#2346)
The patch changes the cmakelists of the doctests to extract the test sources from the markdown docs into the binary tree. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
@@ -38,5 +38,4 @@ docs/doxygen
|
|||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
tests/test262/
|
tests/test262/
|
||||||
tests/unit-doc/*.c
|
|
||||||
.vs
|
.vs
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ set(COMPILE_FLAGS_DOCTEST "-Wno-unused-parameter -Wno-unused-function -Wno-unuse
|
|||||||
# file names that will be generated. This allows the definition of proper
|
# file names that will be generated. This allows the definition of proper
|
||||||
# dependencies between the MarkDown files and the generated sources.
|
# dependencies between the MarkDown files and the generated sources.
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${GEN_DOCTEST} --dry -d ${CMAKE_CURRENT_SOURCE_DIR} ${DOC_FILES}
|
COMMAND ${GEN_DOCTEST} --dry -d ${CMAKE_CURRENT_BINARY_DIR} ${DOC_FILES}
|
||||||
OUTPUT_VARIABLE DOCTEST_OUTPUT
|
OUTPUT_VARIABLE DOCTEST_OUTPUT
|
||||||
RESULT_VARIABLE GEN_DOCTEST_RESULT
|
RESULT_VARIABLE GEN_DOCTEST_RESULT
|
||||||
)
|
)
|
||||||
@@ -53,7 +53,7 @@ endforeach()
|
|||||||
# Add custom command to run doctest generator if any of the MarkDown sources
|
# Add custom command to run doctest generator if any of the MarkDown sources
|
||||||
# changes.
|
# changes.
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
COMMAND ${GEN_DOCTEST} -d ${CMAKE_CURRENT_SOURCE_DIR} ${DOC_FILES}
|
COMMAND ${GEN_DOCTEST} -d ${CMAKE_CURRENT_BINARY_DIR} ${DOC_FILES}
|
||||||
DEPENDS ${GEN_DOCTEST} ${DOC_FILES}
|
DEPENDS ${GEN_DOCTEST} ${DOC_FILES}
|
||||||
OUTPUT ${DOCTEST_COMPILE} ${DOCTEST_LINK} ${DOCTEST_RUN}
|
OUTPUT ${DOCTEST_COMPILE} ${DOCTEST_LINK} ${DOCTEST_RUN}
|
||||||
COMMENT "Generating doctests"
|
COMMENT "Generating doctests"
|
||||||
|
|||||||
Reference in New Issue
Block a user