mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
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:
parent
5ddbfa5953
commit
299643400d
1
.gitignore
vendored
1
.gitignore
vendored
@ -38,5 +38,4 @@ docs/doxygen
|
||||
|
||||
# Tests
|
||||
tests/test262/
|
||||
tests/unit-doc/*.c
|
||||
.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
|
||||
# dependencies between the MarkDown files and the generated sources.
|
||||
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
|
||||
RESULT_VARIABLE GEN_DOCTEST_RESULT
|
||||
)
|
||||
@ -53,7 +53,7 @@ endforeach()
|
||||
# Add custom command to run doctest generator if any of the MarkDown sources
|
||||
# changes.
|
||||
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}
|
||||
OUTPUT ${DOCTEST_COMPILE} ${DOCTEST_LINK} ${DOCTEST_RUN}
|
||||
COMMENT "Generating doctests"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user