From 635d8cf30e702bdf83fe5c96452f8f863d57bdee Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 31 May 2015 09:59:01 +0200 Subject: Further cmake changes - made static build option for all windows targets - made wizard flex interactive - add 64bit support for libiconv on windows build - updated test mechanism --- CMakeLists.txt | 21 +++++++- addon/doxywizard/CMakeLists.txt | 17 ------- addon/doxywizard/config_doxyw.l | 3 ++ cmake/FindIconv.cmake | 27 +++++++--- cmake/version.cmake | 10 ++-- src/xmlcode.l | 2 + src/xmlgen.cpp | 4 +- testing/009/class_bug.xml | 2 +- testing/009/class_deprecated.xml | 2 +- testing/009/class_reminder.xml | 2 +- testing/009/class_test.xml | 2 +- testing/009/class_todo.xml | 2 +- testing/011/category_integer_07_arithmetic_08.xml | 2 +- testing/011/interface_integer.xml | 4 +- testing/012_cite.dox | 2 +- testing/013/class_t1.xml | 2 +- testing/013/class_t2.xml | 2 +- testing/013/class_t3.xml | 2 +- testing/013/class_t4.xml | 2 +- testing/015/015__cond_8c.xml | 2 +- testing/018/018__def_8c.xml | 10 ++-- testing/021_dontinclude.cpp | 1 - testing/025/class_test.xml | 4 +- testing/025_example.cpp | 2 +- testing/026/class_test.xml | 2 +- testing/027/struct_car.xml | 4 +- testing/027/struct_object.xml | 4 +- testing/027/struct_truck.xml | 4 +- testing/027/struct_vehicle.xml | 4 +- testing/029/029__hideinit_8c.xml | 4 +- testing/030_htmlinclude.dox | 1 - testing/032_include.cpp | 1 - testing/035/035__invariant_8c.xml | 2 +- testing/037/class_receiver.xml | 2 +- testing/037/class_sender.xml | 2 +- testing/039/class_test.xml | 2 +- testing/041/class_test.xml | 8 +-- testing/044/struct_s.xml | 14 +++--- testing/046/class_test.xml | 2 +- testing/048/048__showinit_8c.xml | 4 +- testing/049_snippet.cpp | 1 - testing/050_verbatim.dox | 1 - testing/056_latexinclude.dox | 1 - testing/057/057__caller__graphs_8tcl.xml | 10 ++-- testing/057/__057__caller__graphs_8tcl.xml | 2 +- testing/057/namespace1.xml | 14 +++--- testing/057/namespace1_1_11.xml | 2 +- testing/057/namespace1_1_11_1_11.xml | 2 +- testing/057/namespace2.xml | 2 +- testing/057/namespace2_1_12.xml | 2 +- testing/057/namespace2_1_12_1_12.xml | 2 +- testing/057/namespace2_1_12_1_12_1_12.xml | 2 +- testing/057/namespace2_1_12_1_12_1_12_1_12.xml | 2 +- testing/057/namespacebar.xml | 6 +-- testing/057/namespacefoo.xml | 2 +- testing/057_caller_graphs.tcl | 2 +- testing/058/058__bracket__recursion_8tcl.xml | 50 +++++++++---------- testing/059/059__command__catch_8tcl.xml | 24 ++++----- testing/060/060__command__switch_8tcl.xml | 42 ++++++++-------- testing/061/class_test.xml | 8 +-- testing/062/namespacen1.xml | 4 +- testing/062/namespacen2.xml | 4 +- testing/062/namespacen3.xml | 4 +- testing/063/namespaceoo_1_1_helpers.xml | 2 +- testing/063/namespaceoo_1_1define.xml | 2 +- testing/064/struct_foo.xml | 2 +- testing/CMakeLists.txt | 61 ++--------------------- testing/Makefile | 2 +- testing/test_driver.cmake | 29 ----------- 69 files changed, 204 insertions(+), 272 deletions(-) delete mode 100644 testing/test_driver.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 616b406..bc36d23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ option(build_search "Build external search tools (doxysearch and doxyindexer) option(build_doc "Build user manual" OFF) option(use_sqlite3 "Add support for sqlite3 output [experimental]." OFF) option(use_libclang "Add support for libclang parsing." OFF) -option(qt_static "Link doxywizard with /MT in stead of /MD on windows" OFF) +option(win_static "Link with /MT in stead of /MD on windows" OFF) list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") include(version) @@ -36,7 +36,6 @@ if (use_libclang) find_package(LibClang REQUIRED) endif() - if (${CMAKE_SYSTEM} MATCHES "Darwin") set(CMAKE_CXX_FLAGS "-Wno-deprecated-register -mmacosx-version-min=10.5 ${CMAKE_CXX_FLAGS}") find_library(CORESERVICES_LIB CoreServices) @@ -81,6 +80,24 @@ if (${CUSTOM_LINK_DIR}) link_directories(${CUSTOM_LINK_DIR}) endif() +if (win_static) + set(CompilerFlags + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_RELEASE + CMAKE_CXX_FLAGS_MINSIZEREL + CMAKE_CXX_FLAGS_RELWITHDEBINFO + CMAKE_C_FLAGS + CMAKE_C_FLAGS_DEBUG + CMAKE_C_FLAGS_RELEASE + CMAKE_C_FLAGS_MINSIZEREL + CMAKE_C_FLAGS_RELWITHDEBINFO) + foreach(CompilerFlag ${CompilerFlags}) + string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") + endforeach() +endif() + + add_subdirectory(libmd5) add_subdirectory(qtools) add_subdirectory(vhdlparser) diff --git a/addon/doxywizard/CMakeLists.txt b/addon/doxywizard/CMakeLists.txt index 30130af..055aac3 100644 --- a/addon/doxywizard/CMakeLists.txt +++ b/addon/doxywizard/CMakeLists.txt @@ -41,23 +41,6 @@ OUTPUT ${GENERATED_SRC_WIZARD}/configdoc.cpp ) set_source_files_properties(${GENERATED_SRC_WIZARD}/configdoc.cpp PROPERTIES GENERATED 1) -if (qt_static) - set(CompilerFlags - CMAKE_CXX_FLAGS - CMAKE_CXX_FLAGS_DEBUG - CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_MINSIZEREL - CMAKE_CXX_FLAGS_RELWITHDEBINFO - CMAKE_C_FLAGS - CMAKE_C_FLAGS_DEBUG - CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_MINSIZEREL - CMAKE_C_FLAGS_RELWITHDEBINFO) - foreach(CompilerFlag ${CompilerFlags}) - string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") - endforeach() -endif() - FLEX_TARGET(config_doxyw config_doxyw.l ${GENERATED_SRC_WIZARD}/config_doxyw.cpp COMPILE_FLAGS "-Pconfig_doxywYY") QT4_WRAP_CPP(doxywizard_MOC diff --git a/addon/doxywizard/config_doxyw.l b/addon/doxywizard/config_doxyw.l index 6402674..3e1c59f 100644 --- a/addon/doxywizard/config_doxyw.l +++ b/addon/doxywizard/config_doxyw.l @@ -12,6 +12,7 @@ * */ +%option never-interactive %{ /* @@ -21,6 +22,8 @@ #include "input.h" #include +#define YY_NO_UNISTD_H 1 + #define MAX_INCLUDE_DEPTH 10 diff --git a/cmake/FindIconv.cmake b/cmake/FindIconv.cmake index 5ef8686..d96e3c0 100644 --- a/cmake/FindIconv.cmake +++ b/cmake/FindIconv.cmake @@ -45,14 +45,25 @@ if(NOT ICONV_INCLUDE_DIR STREQUAL "ICONV_INCLUDE_DIR-NOTFOUND") endif() if(NOT ICONV_IN_GLIBC) - find_library(ICONV_LIBRARY - NAMES iconv - HINTS - ${CMAKE_PREFIX_PATH} - ${ICONV_DIR} - $ENV{ICONV_DIR} - PATH_SUFFIXES lib64 lib - ) + if (CMAKE_CL_64) + find_library(ICONV_LIBRARY + NAMES iconv64 + HINTS + ${CMAKE_PREFIX_PATH} + ${ICONV_DIR} + $ENV{ICONV_DIR} + PATH_SUFFIXES lib64 lib + ) + else() + find_library(ICONV_LIBRARY + NAMES iconv + HINTS + ${CMAKE_PREFIX_PATH} + ${ICONV_DIR} + $ENV{ICONV_DIR} + PATH_SUFFIXES lib64 lib + ) + endif() set(ICONV_TEST ${ICONV_LIBRARY}) else() set(ICONV_TEST "In glibc") diff --git a/cmake/version.cmake b/cmake/version.cmake index b8af217..0c5add9 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -1,6 +1,8 @@ -set(doxygen_version_major "1" CACHE STRING "Major") -set(doxygen_version_minor "8" CACHE STRING "Minor") -set(doxygen_version_revision "8" CACHE STRING "Revision") +file (STRINGS "VERSION" VERSION) +#string(REGEX MATCH "([0-9]+).([0-9]+).([0-9]+)" ${doxygen_version_major} ${doxygen_version_minor} ${doxygen_version_revision} ) +#set(doxygen_version_major "1" CACHE STRING "Major") +#set(doxygen_version_minor "8" CACHE STRING "Minor") +#set(doxygen_version_revision "9.1" CACHE STRING "Revision") #set(doxygen_version_mmn "-5" CACHE STRING "Mmn") -set(VERSION "${doxygen_version_major}.${doxygen_version_minor}.${doxygen_version_revision}${doxygen_version_mmn}") +#set(VERSION "${doxygen_version_major}.${doxygen_version_minor}.${doxygen_version_revision}${doxygen_version_mmn}") set(ENV{VERSION} "${VERSION}") diff --git a/src/xmlcode.l b/src/xmlcode.l index 772f919..15b5d7e 100644 --- a/src/xmlcode.l +++ b/src/xmlcode.l @@ -17,6 +17,7 @@ * written by Weston Thayer ******************************************************************************/ +%option never-interactive %{ #include @@ -35,6 +36,7 @@ #define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 1 +#define YY_NO_UNISTD_H 1 static CodeOutputInterface * g_code; static QCString g_curClassName; diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index bdb0d0e..467ebe4 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -986,7 +986,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De FileDef *bodyDef = md->getBodyDef(); if (bodyDef) { - t << " bodyfile=\"" << bodyDef->absFilePath() << "\""; + t << " bodyfile=\"" << stripFromPath(bodyDef->absFilePath()) << "\""; } t << " bodystart=\"" << md->getStartBodyLine() << "\" bodyend=\"" << md->getEndBodyLine() << "\""; @@ -1412,7 +1412,7 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti) FileDef *bodyDef = cd->getBodyDef(); if (bodyDef) { - t << " bodyfile=\"" << bodyDef->absFilePath() << "\""; + t << " bodyfile=\"" << stripFromPath(bodyDef->absFilePath()) << "\""; } t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\"" << cd->getEndBodyLine() << "\""; diff --git a/testing/009/class_bug.xml b/testing/009/class_bug.xml index dc1ff06..5a770bb 100644 --- a/testing/009/class_bug.xml +++ b/testing/009/class_bug.xml @@ -32,7 +32,7 @@ - + Bug diff --git a/testing/009/class_deprecated.xml b/testing/009/class_deprecated.xml index 53a6273..5d44aaf 100644 --- a/testing/009/class_deprecated.xml +++ b/testing/009/class_deprecated.xml @@ -30,7 +30,7 @@ - + Deprecated diff --git a/testing/009/class_reminder.xml b/testing/009/class_reminder.xml index c4f639e..379b3e7 100644 --- a/testing/009/class_reminder.xml +++ b/testing/009/class_reminder.xml @@ -37,7 +37,7 @@ - + Reminder diff --git a/testing/009/class_test.xml b/testing/009/class_test.xml index b9f7f9f..9f1b126 100644 --- a/testing/009/class_test.xml +++ b/testing/009/class_test.xml @@ -37,7 +37,7 @@ - + Test diff --git a/testing/009/class_todo.xml b/testing/009/class_todo.xml index c98fdac..8657d60 100644 --- a/testing/009/class_todo.xml +++ b/testing/009/class_todo.xml @@ -37,7 +37,7 @@ - + Todo diff --git a/testing/011/category_integer_07_arithmetic_08.xml b/testing/011/category_integer_07_arithmetic_08.xml index 12b6b6d..78a8c0e 100644 --- a/testing/011/category_integer_07_arithmetic_08.xml +++ b/testing/011/category_integer_07_arithmetic_08.xml @@ -45,7 +45,7 @@ A category - + Integer(Arithmetic) diff --git a/testing/011/interface_integer.xml b/testing/011/interface_integer.xml index e922dda..429c6a0 100644 --- a/testing/011/interface_integer.xml +++ b/testing/011/interface_integer.xml @@ -16,7 +16,7 @@ - + @@ -80,7 +80,7 @@ - + Integer diff --git a/testing/012_cite.dox b/testing/012_cite.dox index 9bcb2c5..94be5e7 100644 --- a/testing/012_cite.dox +++ b/testing/012_cite.dox @@ -1,7 +1,7 @@ // objective: test the \cite command // check: indexpage.xml // check: citelist.xml -// config: CITE_BIB_FILES = sample.bib +// config: CITE_BIB_FILES = $INPUTDIR/sample.bib /** \mainpage * See \cite knuth79 for more info. */ diff --git a/testing/013/class_t1.xml b/testing/013/class_t1.xml index e0dc3a2..ba91621 100644 --- a/testing/013/class_t1.xml +++ b/testing/013/class_t1.xml @@ -8,7 +8,7 @@ A class - + diff --git a/testing/013/class_t2.xml b/testing/013/class_t2.xml index ca534e6..9df47e2 100644 --- a/testing/013/class_t2.xml +++ b/testing/013/class_t2.xml @@ -8,7 +8,7 @@ class T2 - + diff --git a/testing/013/class_t3.xml b/testing/013/class_t3.xml index 2fba932..dc0cd3f 100644 --- a/testing/013/class_t3.xml +++ b/testing/013/class_t3.xml @@ -8,7 +8,7 @@ class T3 - + diff --git a/testing/013/class_t4.xml b/testing/013/class_t4.xml index 907049f..52955d2 100644 --- a/testing/013/class_t4.xml +++ b/testing/013/class_t4.xml @@ -8,7 +8,7 @@ class T4 - + diff --git a/testing/015/015__cond_8c.xml b/testing/015/015__cond_8c.xml index fb3a06c..43cf335 100644 --- a/testing/015/015__cond_8c.xml +++ b/testing/015/015__cond_8c.xml @@ -14,7 +14,7 @@ - + diff --git a/testing/018/018__def_8c.xml b/testing/018/018__def_8c.xml index 0b30670..8518666 100644 --- a/testing/018/018__def_8c.xml +++ b/testing/018/018__def_8c.xml @@ -40,7 +40,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -92,7 +92,7 @@ - + void @@ -112,7 +112,7 @@ - + diff --git a/testing/021_dontinclude.cpp b/testing/021_dontinclude.cpp index 107991a..eeb95c5 100644 --- a/testing/021_dontinclude.cpp +++ b/testing/021_dontinclude.cpp @@ -1,6 +1,5 @@ // objective: test the \dontinclude, \skip, \until, \skipline, \line commands // check: indexpage.xml -// config: EXAMPLE_PATH = . /*! A test class. */ class Test diff --git a/testing/025/class_test.xml b/testing/025/class_test.xml index f0c7abd..c19341a 100644 --- a/testing/025/class_test.xml +++ b/testing/025/class_test.xml @@ -16,7 +16,7 @@ - + @@ -25,7 +25,7 @@ More details about this class. - + Test diff --git a/testing/025_example.cpp b/testing/025_example.cpp index 39736f8..817a47f 100644 --- a/testing/025_example.cpp +++ b/testing/025_example.cpp @@ -1,7 +1,7 @@ // objective: test the \example command // check: example_test_8cpp-example.xml // check: class_test.xml -// config: EXAMPLE_PATH = . + /** \brief A Test class. * diff --git a/testing/026/class_test.xml b/testing/026/class_test.xml index a332757..582d509 100644 --- a/testing/026/class_test.xml +++ b/testing/026/class_test.xml @@ -41,7 +41,7 @@ A Test class. More details about this class. TA template parameter. - + Test diff --git a/testing/027/struct_car.xml b/testing/027/struct_car.xml index c73ad34..9027597 100644 --- a/testing/027/struct_car.xml +++ b/testing/027/struct_car.xml @@ -18,7 +18,7 @@ - + @@ -68,7 +68,7 @@ - + Car diff --git a/testing/027/struct_object.xml b/testing/027/struct_object.xml index 4047446..e14caa5 100644 --- a/testing/027/struct_object.xml +++ b/testing/027/struct_object.xml @@ -16,7 +16,7 @@ - + @@ -86,7 +86,7 @@ - + Object diff --git a/testing/027/struct_truck.xml b/testing/027/struct_truck.xml index 14ebde2..c5009d4 100644 --- a/testing/027/struct_truck.xml +++ b/testing/027/struct_truck.xml @@ -18,7 +18,7 @@ - + @@ -68,7 +68,7 @@ - + Truck diff --git a/testing/027/struct_vehicle.xml b/testing/027/struct_vehicle.xml index bf480e8..acf10a0 100644 --- a/testing/027/struct_vehicle.xml +++ b/testing/027/struct_vehicle.xml @@ -20,7 +20,7 @@ - + @@ -105,7 +105,7 @@ - + Vehicle diff --git a/testing/029/029__hideinit_8c.xml b/testing/029/029__hideinit_8c.xml index f5db794..4caf092 100644 --- a/testing/029/029__hideinit_8c.xml +++ b/testing/029/029__hideinit_8c.xml @@ -16,7 +16,7 @@ - + int @@ -30,7 +30,7 @@ - + diff --git a/testing/030_htmlinclude.dox b/testing/030_htmlinclude.dox index a3716e6..a8e8af6 100644 --- a/testing/030_htmlinclude.dox +++ b/testing/030_htmlinclude.dox @@ -1,6 +1,5 @@ // objective: test the \htmlinclude command // check: indexpage.xml -// config: EXAMPLE_PATH = . /** \mainpage * Some text. * \htmlinclude sample.html diff --git a/testing/032_include.cpp b/testing/032_include.cpp index 8aae8e9..2eddc57 100644 --- a/testing/032_include.cpp +++ b/testing/032_include.cpp @@ -1,6 +1,5 @@ // objective: test the \include and \includelineno commands // check: indexpage.xml -// config: EXAMPLE_PATH = . /** \mainpage * Some text. diff --git a/testing/035/035__invariant_8c.xml b/testing/035/035__invariant_8c.xml index f1a924d..b3d74bc 100644 --- a/testing/035/035__invariant_8c.xml +++ b/testing/035/035__invariant_8c.xml @@ -33,7 +33,7 @@ - + diff --git a/testing/037/class_receiver.xml b/testing/037/class_receiver.xml index 5c4fde6..edb688a 100644 --- a/testing/037/class_receiver.xml +++ b/testing/037/class_receiver.xml @@ -32,7 +32,7 @@ - + Receiver diff --git a/testing/037/class_sender.xml b/testing/037/class_sender.xml index e58ab88..0f1996d 100644 --- a/testing/037/class_sender.xml +++ b/testing/037/class_sender.xml @@ -32,7 +32,7 @@ - + Sender diff --git a/testing/039/class_test.xml b/testing/039/class_test.xml index 244e88d..2a4796a 100644 --- a/testing/039/class_test.xml +++ b/testing/039/class_test.xml @@ -55,7 +55,7 @@ More details about this class. - + Test diff --git a/testing/041/class_test.xml b/testing/041/class_test.xml index 7068026..57dbe37 100644 --- a/testing/041/class_test.xml +++ b/testing/041/class_test.xml @@ -31,7 +31,7 @@ - + void @@ -49,7 +49,7 @@ - + void @@ -72,7 +72,7 @@ - + @@ -81,7 +81,7 @@ More text. - + Test diff --git a/testing/044/struct_s.xml b/testing/044/struct_s.xml index 2aa62c2..aefd50d 100644 --- a/testing/044/struct_s.xml +++ b/testing/044/struct_s.xml @@ -16,7 +16,7 @@ - + int @@ -30,7 +30,7 @@ - + @@ -46,7 +46,7 @@ - + int @@ -60,7 +60,7 @@ - + @@ -76,7 +76,7 @@ - + int @@ -90,7 +90,7 @@ - + @@ -98,7 +98,7 @@ A struct - + S diff --git a/testing/046/class_test.xml b/testing/046/class_test.xml index 62712d4..9a1bd9c 100644 --- a/testing/046/class_test.xml +++ b/testing/046/class_test.xml @@ -61,7 +61,7 @@ A test class Test::method() - + Test diff --git a/testing/048/048__showinit_8c.xml b/testing/048/048__showinit_8c.xml index 34b2c1c..4cc5717 100644 --- a/testing/048/048__showinit_8c.xml +++ b/testing/048/048__showinit_8c.xml @@ -15,7 +15,7 @@ - + int @@ -30,7 +30,7 @@ - + diff --git a/testing/049_snippet.cpp b/testing/049_snippet.cpp index 614a43c..9c5f18b 100644 --- a/testing/049_snippet.cpp +++ b/testing/049_snippet.cpp @@ -1,6 +1,5 @@ // objective: test the \snippet command // check: indexpage.xml -// config: EXAMPLE_PATH = . /** \mainpage * A bubble sort algorithm diff --git a/testing/050_verbatim.dox b/testing/050_verbatim.dox index 0ff315f..40c75a5 100644 --- a/testing/050_verbatim.dox +++ b/testing/050_verbatim.dox @@ -1,6 +1,5 @@ // objective: test \verbatim and \verbinclude commands // check: indexpage.xml -// config: EXAMPLE_PATH = . /** \mainpage Some normal text. diff --git a/testing/056_latexinclude.dox b/testing/056_latexinclude.dox index 6a8052a..021b2f7 100644 --- a/testing/056_latexinclude.dox +++ b/testing/056_latexinclude.dox @@ -1,6 +1,5 @@ // objective: test the \latexinclude command // check: indexpage.xml -// config: EXAMPLE_PATH = . /** \mainpage * Some text. * \latexinclude sample.tex diff --git a/testing/057/057__caller__graphs_8tcl.xml b/testing/057/057__caller__graphs_8tcl.xml index c3dfb78..1046e30 100644 --- a/testing/057/057__caller__graphs_8tcl.xml +++ b/testing/057/057__caller__graphs_8tcl.xml @@ -24,7 +24,7 @@ - + @@ -37,7 +37,7 @@ - + 1::test3 @@ -51,7 +51,7 @@ - + 2::next @@ -65,7 +65,7 @@ - + inFileB @@ -79,7 +79,7 @@ - + inFileB diff --git a/testing/057/__057__caller__graphs_8tcl.xml b/testing/057/__057__caller__graphs_8tcl.xml index 48ab815..a71e7b5 100644 --- a/testing/057/__057__caller__graphs_8tcl.xml +++ b/testing/057/__057__caller__graphs_8tcl.xml @@ -14,7 +14,7 @@ - + inFileA master diff --git a/testing/057/namespace1.xml b/testing/057/namespace1.xml index 6a40cc4..33d073d 100644 --- a/testing/057/namespace1.xml +++ b/testing/057/namespace1.xml @@ -15,7 +15,7 @@ - + test1 test5 @@ -30,7 +30,7 @@ - + test2 @@ -44,7 +44,7 @@ - + baz @@ -58,7 +58,7 @@ - + bar @@ -72,7 +72,7 @@ - + bar @@ -86,7 +86,7 @@ - + 1::1::bar @@ -100,7 +100,7 @@ - + baz diff --git a/testing/057/namespace1_1_11.xml b/testing/057/namespace1_1_11.xml index 8ff3ce9..e13e261 100644 --- a/testing/057/namespace1_1_11.xml +++ b/testing/057/namespace1_1_11.xml @@ -15,7 +15,7 @@ - + 1::test4 diff --git a/testing/057/namespace1_1_11_1_11.xml b/testing/057/namespace1_1_11_1_11.xml index f7f9716..55b7838 100644 --- a/testing/057/namespace1_1_11_1_11.xml +++ b/testing/057/namespace1_1_11_1_11.xml @@ -14,7 +14,7 @@ - + diff --git a/testing/057/namespace2.xml b/testing/057/namespace2.xml index 0ce04a8..a8a9bc6 100644 --- a/testing/057/namespace2.xml +++ b/testing/057/namespace2.xml @@ -15,7 +15,7 @@ - + 2::2::next next 2::2::2::2::2::next diff --git a/testing/057/namespace2_1_12.xml b/testing/057/namespace2_1_12.xml index af86ebe..a188f00 100644 --- a/testing/057/namespace2_1_12.xml +++ b/testing/057/namespace2_1_12.xml @@ -15,7 +15,7 @@ - + 2::2::2::next 2::next diff --git a/testing/057/namespace2_1_12_1_12.xml b/testing/057/namespace2_1_12_1_12.xml index 0a6d7fa..e83b3fd 100644 --- a/testing/057/namespace2_1_12_1_12.xml +++ b/testing/057/namespace2_1_12_1_12.xml @@ -15,7 +15,7 @@ - + 2::2::2::2::next 2::2::next diff --git a/testing/057/namespace2_1_12_1_12_1_12.xml b/testing/057/namespace2_1_12_1_12_1_12.xml index 461d61e..83c2a73 100644 --- a/testing/057/namespace2_1_12_1_12_1_12.xml +++ b/testing/057/namespace2_1_12_1_12_1_12.xml @@ -15,7 +15,7 @@ - + 2::2::2::2::2::next 2::2::2::next diff --git a/testing/057/namespace2_1_12_1_12_1_12_1_12.xml b/testing/057/namespace2_1_12_1_12_1_12_1_12.xml index 3981ff0..9222625 100644 --- a/testing/057/namespace2_1_12_1_12_1_12_1_12.xml +++ b/testing/057/namespace2_1_12_1_12_1_12_1_12.xml @@ -14,7 +14,7 @@ - + 2::next 2::2::2::2::next diff --git a/testing/057/namespacebar.xml b/testing/057/namespacebar.xml index 85cde41..e16966e 100644 --- a/testing/057/namespacebar.xml +++ b/testing/057/namespacebar.xml @@ -14,7 +14,7 @@ - + baz foo::master @@ -29,7 +29,7 @@ - + bazbaz slave @@ -44,7 +44,7 @@ - + baz diff --git a/testing/057/namespacefoo.xml b/testing/057/namespacefoo.xml index 0d81332..8d0ac75 100644 --- a/testing/057/namespacefoo.xml +++ b/testing/057/namespacefoo.xml @@ -14,7 +14,7 @@ - + bar::slave diff --git a/testing/057_caller_graphs.tcl b/testing/057_caller_graphs.tcl index f6e0e77..464d8aa 100644 --- a/testing/057_caller_graphs.tcl +++ b/testing/057_caller_graphs.tcl @@ -15,7 +15,7 @@ #// config: INLINE_SOURCES = no #// config: REFERENCED_BY_RELATION = yes #// config: REFERENCES_RELATION = yes -#// config: INPUT = 057_caller_graphs.tcl _057_caller_graphs.tcl +#// config: INPUT = $INPUTDIR/057_caller_graphs.tcl $INPUTDIR/_057_caller_graphs.tcl # config: HAVE_DOT = yes # config: CALLER_GRAPH = yes # config: CALL_GRAPH = yes diff --git a/testing/058/058__bracket__recursion_8tcl.xml b/testing/058/058__bracket__recursion_8tcl.xml index dcb60e4..0381b83 100644 --- a/testing/058/058__bracket__recursion_8tcl.xml +++ b/testing/058/058__bracket__recursion_8tcl.xml @@ -15,7 +15,7 @@ - + a b c @@ -51,7 +51,7 @@ - + @@ -64,7 +64,7 @@ - + Invoked @@ -78,7 +78,7 @@ - + Invoked @@ -92,7 +92,7 @@ - + Invoked @@ -106,7 +106,7 @@ - + Invoked @@ -120,7 +120,7 @@ - + Invoked @@ -134,7 +134,7 @@ - + Invoked @@ -148,7 +148,7 @@ - + Invoked @@ -162,7 +162,7 @@ - + Invoked @@ -176,7 +176,7 @@ - + Invoked @@ -190,7 +190,7 @@ - + Invoked @@ -204,7 +204,7 @@ - + Invoked @@ -218,7 +218,7 @@ - + Invoked @@ -232,7 +232,7 @@ - + Invoked @@ -246,7 +246,7 @@ - + Invoked @@ -260,7 +260,7 @@ - + Invoked @@ -274,7 +274,7 @@ - + @@ -287,7 +287,7 @@ - + Invoked @@ -301,7 +301,7 @@ - + Invoked @@ -315,7 +315,7 @@ - + Invoked @@ -329,7 +329,7 @@ - + Invoked @@ -343,7 +343,7 @@ - + Invoked @@ -357,7 +357,7 @@ - + Invoked @@ -371,7 +371,7 @@ - + Invoked diff --git a/testing/059/059__command__catch_8tcl.xml b/testing/059/059__command__catch_8tcl.xml index a12a366..b5e5c96 100644 --- a/testing/059/059__command__catch_8tcl.xml +++ b/testing/059/059__command__catch_8tcl.xml @@ -15,7 +15,7 @@ - + a b c @@ -39,7 +39,7 @@ - + @@ -52,7 +52,7 @@ - + Invoked @@ -66,7 +66,7 @@ - + Invoked @@ -80,7 +80,7 @@ - + Invoked @@ -94,7 +94,7 @@ - + Invoked @@ -108,7 +108,7 @@ - + Invoked @@ -122,7 +122,7 @@ - + Invoked @@ -136,7 +136,7 @@ - + Invoked @@ -150,7 +150,7 @@ - + Invoked @@ -164,7 +164,7 @@ - + Invoked @@ -178,7 +178,7 @@ - + Invoked diff --git a/testing/060/060__command__switch_8tcl.xml b/testing/060/060__command__switch_8tcl.xml index f1792f4..2def3fc 100644 --- a/testing/060/060__command__switch_8tcl.xml +++ b/testing/060/060__command__switch_8tcl.xml @@ -15,7 +15,7 @@ - + a b c @@ -48,7 +48,7 @@ - + @@ -61,7 +61,7 @@ - + Invoked @@ -75,7 +75,7 @@ - + Invoked @@ -89,7 +89,7 @@ - + Invoked @@ -103,7 +103,7 @@ - + Invoked @@ -117,7 +117,7 @@ - + Invoked @@ -131,7 +131,7 @@ - + Invoked @@ -145,7 +145,7 @@ - + Invoked @@ -159,7 +159,7 @@ - + Invoked @@ -173,7 +173,7 @@ - + Invoked @@ -187,7 +187,7 @@ - + Invoked @@ -201,7 +201,7 @@ - + Invoked @@ -215,7 +215,7 @@ - + Invoked @@ -229,7 +229,7 @@ - + Invoked @@ -243,7 +243,7 @@ - + Invoked @@ -257,7 +257,7 @@ - + Invoked @@ -271,7 +271,7 @@ - + Invoked @@ -285,7 +285,7 @@ - + Invoked @@ -299,7 +299,7 @@ - + Invoked @@ -313,7 +313,7 @@ - + Invoked diff --git a/testing/061/class_test.xml b/testing/061/class_test.xml index b233e9c..47e70ac 100644 --- a/testing/061/class_test.xml +++ b/testing/061/class_test.xml @@ -15,7 +15,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -43,7 +43,7 @@ - + @@ -51,7 +51,7 @@ - + Test diff --git a/testing/062/namespacen1.xml b/testing/062/namespacen1.xml index a31fc29..408ef87 100644 --- a/testing/062/namespacen1.xml +++ b/testing/062/namespacen1.xml @@ -15,7 +15,7 @@ - + p2 @@ -29,7 +29,7 @@ - + p1 diff --git a/testing/062/namespacen2.xml b/testing/062/namespacen2.xml index 29c4d80..f545576 100644 --- a/testing/062/namespacen2.xml +++ b/testing/062/namespacen2.xml @@ -15,7 +15,7 @@ - + p2 @@ -29,7 +29,7 @@ - + p1 diff --git a/testing/062/namespacen3.xml b/testing/062/namespacen3.xml index bfc1364..f8c2fb5 100644 --- a/testing/062/namespacen3.xml +++ b/testing/062/namespacen3.xml @@ -15,7 +15,7 @@ - + p2 @@ -29,7 +29,7 @@ - + p1 diff --git a/testing/063/namespaceoo_1_1_helpers.xml b/testing/063/namespaceoo_1_1_helpers.xml index 40b4830..e9083dc 100644 --- a/testing/063/namespaceoo_1_1_helpers.xml +++ b/testing/063/namespaceoo_1_1_helpers.xml @@ -15,7 +15,7 @@ - + diff --git a/testing/063/namespaceoo_1_1define.xml b/testing/063/namespaceoo_1_1define.xml index 214b705..69c05d0 100644 --- a/testing/063/namespaceoo_1_1define.xml +++ b/testing/063/namespaceoo_1_1define.xml @@ -15,7 +15,7 @@ - + diff --git a/testing/064/struct_foo.xml b/testing/064/struct_foo.xml index 3765625..d2bed81 100644 --- a/testing/064/struct_foo.xml +++ b/testing/064/struct_foo.xml @@ -97,7 +97,7 @@ - + Foo diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt index cb9479d..af3ddf3 100644 --- a/testing/CMakeLists.txt +++ b/testing/CMakeLists.txt @@ -1,60 +1,9 @@ find_program(XMLLINT NAMES xmllint) find_program(DIFF NAMES diff) -file(GLOB test_files "[0-9][0-9][0-9]_*.*") -foreach(test_file ${test_files}) - if ( ${test_file} MATCHES "([0-9][0-9][0-9])_") - set(test_id ${CMAKE_MATCH_1}) - set(test_out ${CMAKE_BINARY_DIR}/testing/${test_id}) - get_filename_component(test_dirname ${test_file} DIRECTORY) - get_filename_component(test_basename ${test_file} NAME) - set(doxyfile ${test_out}/Doxyfile) +add_custom_target(tests + COMMENT "Running doxygen tests..." + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --all --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing + DEPENDS doxygen +) - # setup the test directory - execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${test_out}) - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${test_out}) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/testing/Doxyfile ${test_out}) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${test_file} ${test_out}) - file(APPEND ${doxyfile} "STRIP_FROM_PATH = ${test_out}\n") - file(APPEND ${doxyfile} "INPUT = ${test_basename}\n") - - # extract config lines from test files - file(STRINGS "${test_basename}" test_file_config REGEX "// [a-z]+: .*") - - # clear the lists - set(test_objective) - set(test_config) - set(test_check) - - # turn the config lines into lists - foreach(line IN LISTS test_file_config) - if ("${line}" MATCHES "//[ ]*([a-zA-Z]+)[ ]*:[ ]*(.*)") - list(APPEND test_${CMAKE_MATCH_1} ${CMAKE_MATCH_2}) - endif() - endforeach() - foreach(line IN LISTS test_config) - # append the config line to Doxyfile - file(APPEND ${doxyfile} "${line}\n") - # in case this is an INPUT line, copy the files to test directory - if ("${line}" MATCHES "INPUT[ ]*=(.*)") - separate_arguments(items UNIX_COMMAND "${CMAKE_MATCH_1}") - foreach(i IN LISTS items) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${test_dirname}/${i} ${test_out}) - endforeach() - endif() - endforeach() - # replace spaces with semicolons so it can be passed as argument - separate_arguments(test_check UNIX_COMMAND "${test_check}") - add_test(NAME test_${test_id} - WORKING_DIRECTORY ${test_out} - COMMAND cmake - -D check=${test_check} - -D dirname=${test_dirname}/${test_id} - -D top=${CMAKE_SOURCE_DIR} - -D doxygen=${EXECUTABLE_OUTPUT_PATH}/doxygen - -D diff=${DIFF} - -D xmllint=${XMLLINT} - -P ${CMAKE_SOURCE_DIR}/testing/test_driver.cmake - ) - endif() -endforeach() diff --git a/testing/Makefile b/testing/Makefile index f40107f..f6beb40 100644 --- a/testing/Makefile +++ b/testing/Makefile @@ -1,3 +1,3 @@ tests: - @perl runtests.pl --doxygen ../bin/doxygen + @python runtests.py --doxygen ../build/bin/doxygen diff --git a/testing/test_driver.cmake b/testing/test_driver.cmake deleted file mode 100644 index ca591c2..0000000 --- a/testing/test_driver.cmake +++ /dev/null @@ -1,29 +0,0 @@ -include(${top}/cmake/version.cmake) - -macro(check_rv) - if (${ARGV0}) - message(FATAL_ERROR "test failed") - endif() -endmacro() - -execute_process( COMMAND ${doxygen} Doxyfile RESULT_VARIABLE rv) -check_rv(${rv}) - -foreach (_check IN LISTS check) - set(xml_file "out_${_check}") - - set(xml_cmd ${xmllint} --format --noblanks --nowarning xml/${_check} --output ${xml_file}) - message(STATUS ${xml_cmd}) - execute_process(COMMAND ${xml_cmd} RESULT_VARIABLE rv) - check_rv(${rv}) - - message(STATUS "CHOMP VOLATILE") - file(READ ${xml_file} OUT_XML) - string(REGEX REPLACE "version=\"${VERSION}\"" "version=\"\"" OUT_WO_VERSION_XML "${OUT_XML}") - file(WRITE ${xml_file} ${OUT_WO_VERSION_XML}) - - set(diff_cmd ${diff} -u ${xml_file} ${dirname}/${_check}) - message(STATUS ${diff_cmd}) - execute_process(COMMAND ${diff_cmd} RESULT_VARIABLE rv) - check_rv(${rv}) -endforeach() -- cgit v0.12