From 33f574a534239b9d9e713b8d4c9d1d1dedf4d177 Mon Sep 17 00:00:00 2001 From: Tushar Maheshwari Date: Sun, 13 May 2018 12:07:34 +0530 Subject: Problem with TEST_FLAGS when using CMake for Visual Studio --- src/CMakeLists.txt | 2 +- testing/CMakeLists.txt | 4 ++-- testing/runtests.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5c55efa..b57d360 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt index ae5c24f..40cb40b 100644 --- a/testing/CMakeLists.txt +++ b/testing/CMakeLists.txt @@ -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 $ --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen $ --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing ) diff --git a/testing/runtests.py b/testing/runtests.py index a714cd8..9330d23 100644 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -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): -- cgit v0.12