Skip to content

Commit

Permalink
Problem with TEST_FLAGS when using CMake for Visual Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharpm committed May 13, 2018
1 parent c78c338 commit 33f574a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp
FLEX_TARGET(sqlcode sqlcode.l ${GENERATED_SRC}/sqlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(configimpl configimpl.l ${GENERATED_SRC}/configimpl.cpp COMPILE_FLAGS "${LEX_FLAGS}")

BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS ${YACC_FLAGS})
BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "${YACC_FLAGS}")

add_library(doxycfg STATIC
${GENERATED_SRC}/lang_cfg.h
Expand Down
4 changes: 2 additions & 2 deletions testing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
add_custom_target(tests
COMMENT "Running doxygen tests..."
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py $(TEST_FLAGS) --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
DEPENDS doxygen
)
add_test(NAME suite
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py $(TEST_FLAGS) --doxygen $<TARGET_FILE:doxygen> --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen $<TARGET_FILE:doxygen> --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
)

3 changes: 2 additions & 1 deletion testing/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ def main():
action="store_true")
parser.add_argument('--keep',help='keep result directories',
action="store_true")
args = parser.parse_args()
test_flags = os.getenv('TEST_FLAGS', default='').split()
args = parser.parse_args(test_flags + sys.argv[1:])

# sanity check
if (not args.xml) and (not args.pdf) and (not args.xhtml):
Expand Down

0 comments on commit 33f574a

Please sign in to comment.