Skip to content

Commit 635d8cf

Browse files
author
Dimitri van Heesch
committed
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
1 parent 7bcf8e9 commit 635d8cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+204
-272
lines changed

CMakeLists.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ option(build_search "Build external search tools (doxysearch and doxyindexer)
2121
option(build_doc "Build user manual" OFF)
2222
option(use_sqlite3 "Add support for sqlite3 output [experimental]." OFF)
2323
option(use_libclang "Add support for libclang parsing." OFF)
24-
option(qt_static "Link doxywizard with /MT in stead of /MD on windows" OFF)
24+
option(win_static "Link with /MT in stead of /MD on windows" OFF)
2525

2626
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
2727
include(version)
@@ -36,7 +36,6 @@ if (use_libclang)
3636
find_package(LibClang REQUIRED)
3737
endif()
3838

39-
4039
if (${CMAKE_SYSTEM} MATCHES "Darwin")
4140
set(CMAKE_CXX_FLAGS "-Wno-deprecated-register -mmacosx-version-min=10.5 ${CMAKE_CXX_FLAGS}")
4241
find_library(CORESERVICES_LIB CoreServices)
@@ -81,6 +80,24 @@ if (${CUSTOM_LINK_DIR})
8180
link_directories(${CUSTOM_LINK_DIR})
8281
endif()
8382

83+
if (win_static)
84+
set(CompilerFlags
85+
CMAKE_CXX_FLAGS
86+
CMAKE_CXX_FLAGS_DEBUG
87+
CMAKE_CXX_FLAGS_RELEASE
88+
CMAKE_CXX_FLAGS_MINSIZEREL
89+
CMAKE_CXX_FLAGS_RELWITHDEBINFO
90+
CMAKE_C_FLAGS
91+
CMAKE_C_FLAGS_DEBUG
92+
CMAKE_C_FLAGS_RELEASE
93+
CMAKE_C_FLAGS_MINSIZEREL
94+
CMAKE_C_FLAGS_RELWITHDEBINFO)
95+
foreach(CompilerFlag ${CompilerFlags})
96+
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
97+
endforeach()
98+
endif()
99+
100+
84101
add_subdirectory(libmd5)
85102
add_subdirectory(qtools)
86103
add_subdirectory(vhdlparser)

addon/doxywizard/CMakeLists.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,6 @@ OUTPUT ${GENERATED_SRC_WIZARD}/configdoc.cpp
4141
)
4242
set_source_files_properties(${GENERATED_SRC_WIZARD}/configdoc.cpp PROPERTIES GENERATED 1)
4343

44-
if (qt_static)
45-
set(CompilerFlags
46-
CMAKE_CXX_FLAGS
47-
CMAKE_CXX_FLAGS_DEBUG
48-
CMAKE_CXX_FLAGS_RELEASE
49-
CMAKE_CXX_FLAGS_MINSIZEREL
50-
CMAKE_CXX_FLAGS_RELWITHDEBINFO
51-
CMAKE_C_FLAGS
52-
CMAKE_C_FLAGS_DEBUG
53-
CMAKE_C_FLAGS_RELEASE
54-
CMAKE_C_FLAGS_MINSIZEREL
55-
CMAKE_C_FLAGS_RELWITHDEBINFO)
56-
foreach(CompilerFlag ${CompilerFlags})
57-
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
58-
endforeach()
59-
endif()
60-
6144
FLEX_TARGET(config_doxyw config_doxyw.l ${GENERATED_SRC_WIZARD}/config_doxyw.cpp COMPILE_FLAGS "-Pconfig_doxywYY")
6245

6346
QT4_WRAP_CPP(doxywizard_MOC

addon/doxywizard/config_doxyw.l

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*
1313
*/
1414

15+
%option never-interactive
1516
%{
1617

1718
/*
@@ -21,6 +22,8 @@
2122
#include "input.h"
2223
#include <QtCore>
2324

25+
#define YY_NO_UNISTD_H 1
26+
2427
#define MAX_INCLUDE_DEPTH 10
2528

2629

cmake/FindIconv.cmake

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,25 @@ if(NOT ICONV_INCLUDE_DIR STREQUAL "ICONV_INCLUDE_DIR-NOTFOUND")
4545
endif()
4646

4747
if(NOT ICONV_IN_GLIBC)
48-
find_library(ICONV_LIBRARY
49-
NAMES iconv
50-
HINTS
51-
${CMAKE_PREFIX_PATH}
52-
${ICONV_DIR}
53-
$ENV{ICONV_DIR}
54-
PATH_SUFFIXES lib64 lib
55-
)
48+
if (CMAKE_CL_64)
49+
find_library(ICONV_LIBRARY
50+
NAMES iconv64
51+
HINTS
52+
${CMAKE_PREFIX_PATH}
53+
${ICONV_DIR}
54+
$ENV{ICONV_DIR}
55+
PATH_SUFFIXES lib64 lib
56+
)
57+
else()
58+
find_library(ICONV_LIBRARY
59+
NAMES iconv
60+
HINTS
61+
${CMAKE_PREFIX_PATH}
62+
${ICONV_DIR}
63+
$ENV{ICONV_DIR}
64+
PATH_SUFFIXES lib64 lib
65+
)
66+
endif()
5667
set(ICONV_TEST ${ICONV_LIBRARY})
5768
else()
5869
set(ICONV_TEST "In glibc")

cmake/version.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
set(doxygen_version_major "1" CACHE STRING "Major")
2-
set(doxygen_version_minor "8" CACHE STRING "Minor")
3-
set(doxygen_version_revision "8" CACHE STRING "Revision")
1+
file (STRINGS "VERSION" VERSION)
2+
#string(REGEX MATCH "([0-9]+).([0-9]+).([0-9]+)" ${doxygen_version_major} ${doxygen_version_minor} ${doxygen_version_revision} )
3+
#set(doxygen_version_major "1" CACHE STRING "Major")
4+
#set(doxygen_version_minor "8" CACHE STRING "Minor")
5+
#set(doxygen_version_revision "9.1" CACHE STRING "Revision")
46
#set(doxygen_version_mmn "-5" CACHE STRING "Mmn")
5-
set(VERSION "${doxygen_version_major}.${doxygen_version_minor}.${doxygen_version_revision}${doxygen_version_mmn}")
7+
#set(VERSION "${doxygen_version_major}.${doxygen_version_minor}.${doxygen_version_revision}${doxygen_version_mmn}")
68
set(ENV{VERSION} "${VERSION}")

src/xmlcode.l

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* written by Weston Thayer
1818
******************************************************************************/
1919

20+
%option never-interactive
2021
%{
2122

2223
#include <stdio.h>
@@ -35,6 +36,7 @@
3536

3637
#define YY_NEVER_INTERACTIVE 1
3738
#define YY_NO_INPUT 1
39+
#define YY_NO_UNISTD_H 1
3840

3941
static CodeOutputInterface * g_code;
4042
static QCString g_curClassName;

src/xmlgen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
986986
FileDef *bodyDef = md->getBodyDef();
987987
if (bodyDef)
988988
{
989-
t << " bodyfile=\"" << bodyDef->absFilePath() << "\"";
989+
t << " bodyfile=\"" << stripFromPath(bodyDef->absFilePath()) << "\"";
990990
}
991991
t << " bodystart=\"" << md->getStartBodyLine() << "\" bodyend=\""
992992
<< md->getEndBodyLine() << "\"";
@@ -1412,7 +1412,7 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti)
14121412
FileDef *bodyDef = cd->getBodyDef();
14131413
if (bodyDef)
14141414
{
1415-
t << " bodyfile=\"" << bodyDef->absFilePath() << "\"";
1415+
t << " bodyfile=\"" << stripFromPath(bodyDef->absFilePath()) << "\"";
14161416
}
14171417
t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
14181418
<< cd->getEndBodyLine() << "\"";

testing/009/class_bug.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</xrefsect>
3333
</para>
3434
</detaileddescription>
35-
<location file="009_bug.cpp" bodystart="15" bodyend="26"/>
35+
<location file="009_bug.cpp" line="16" column="1" bodyfile="009_bug.cpp" bodystart="15" bodyend="26"/>
3636
<listofallmembers>
3737
<member refid="class_bug_1a1f720954dd97cd1203e80501a6eae74c" prot="public" virt="non-virtual">
3838
<scope>Bug</scope>

testing/009/class_deprecated.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</xrefsect>
3131
</para>
3232
</detaileddescription>
33-
<location file="009_bug.cpp" bodystart="29" bodyend="36"/>
33+
<location file="009_bug.cpp" line="30" column="1" bodyfile="009_bug.cpp" bodystart="29" bodyend="36"/>
3434
<listofallmembers>
3535
<member refid="class_deprecated_1a1d5f6803e72c625727e7083d1722dbf9" prot="public" virt="non-virtual">
3636
<scope>Deprecated</scope>

testing/009/class_reminder.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</xrefsect>
3838
</para>
3939
</detaileddescription>
40-
<location file="009_bug.cpp" bodystart="55" bodyend="60"/>
40+
<location file="009_bug.cpp" line="56" column="1" bodyfile="009_bug.cpp" bodystart="55" bodyend="60"/>
4141
<listofallmembers>
4242
<member refid="class_reminder_1a173b5218bb11287b0e86a550d9f0728d" prot="public" virt="non-virtual">
4343
<scope>Reminder</scope>

testing/009/class_test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</xrefsect>
3838
</para>
3939
</detaileddescription>
40-
<location file="009_bug.cpp" bodystart="47" bodyend="52"/>
40+
<location file="009_bug.cpp" line="48" column="1" bodyfile="009_bug.cpp" bodystart="47" bodyend="52"/>
4141
<listofallmembers>
4242
<member refid="class_test_1a9fc54b716f326514a4c5f434137f4fc0" prot="public" virt="non-virtual">
4343
<scope>Test</scope>

testing/009/class_todo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</xrefsect>
3838
</para>
3939
</detaileddescription>
40-
<location file="009_bug.cpp" bodystart="39" bodyend="44"/>
40+
<location file="009_bug.cpp" line="40" column="1" bodyfile="009_bug.cpp" bodystart="39" bodyend="44"/>
4141
<listofallmembers>
4242
<member refid="class_todo_1a9e70ec9176ac4c1b20e011b4daddc9d8" prot="public" virt="non-virtual">
4343
<scope>Todo</scope>

testing/011/category_integer_07_arithmetic_08.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<detaileddescription>
4646
<para>A category </para>
4747
</detaileddescription>
48-
<location file="011_category.m" bodystart="17" bodyend="-1"/>
48+
<location file="011_category.m" line="17" column="1" bodyfile="011_category.m" bodystart="17" bodyend="-1"/>
4949
<listofallmembers>
5050
<member refid="category_integer_07_arithmetic_08_1a12f411c5872ba3bafb8ea7dd1826cf2a" prot="public" virt="virtual">
5151
<scope>Integer(Arithmetic)</scope>

testing/011/interface_integer.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</detaileddescription>
1717
<inbodydescription>
1818
</inbodydescription>
19-
<location file="011_category.m" bodystart="8" bodyend="-1"/>
19+
<location file="011_category.m" line="8" column="1" bodyfile="011_category.m" bodystart="8" bodyend="-1"/>
2020
</memberdef>
2121
</sectiondef>
2222
<sectiondef kind="public-func">
@@ -80,7 +80,7 @@
8080
</childnode>
8181
</node>
8282
</collaborationgraph>
83-
<location file="011_category.m" bodystart="6" bodyend="-1"/>
83+
<location file="011_category.m" line="6" column="1" bodyfile="011_category.m" bodystart="6" bodyend="-1"/>
8484
<listofallmembers>
8585
<member refid="interface_integer_1a35e89216966d8179a1b77f14b8211fda" prot="protected" virt="non-virtual">
8686
<scope>Integer</scope>

testing/012_cite.dox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// objective: test the \cite command
22
// check: indexpage.xml
33
// check: citelist.xml
4-
// config: CITE_BIB_FILES = sample.bib
4+
// config: CITE_BIB_FILES = $INPUTDIR/sample.bib
55
/** \mainpage
66
* See \cite knuth79 for more info.
77
*/

testing/013/class_t1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<detaileddescription>
99
<para>A class </para>
1010
</detaileddescription>
11-
<location file="013_class.h" bodystart="10" bodyend="12"/>
11+
<location file="013_class.h" line="11" column="1" bodyfile="013_class.h" bodystart="10" bodyend="12"/>
1212
<listofallmembers>
1313
</listofallmembers>
1414
</compounddef>

testing/013/class_t2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<detaileddescription>
99
<para>class <ref refid="class_t2" kindref="compound">T2</ref> </para>
1010
</detaileddescription>
11-
<location file="013_class.h" bodystart="14" bodyend="16"/>
11+
<location file="013_class.h" line="15" column="1" bodyfile="013_class.h" bodystart="14" bodyend="16"/>
1212
<listofallmembers>
1313
</listofallmembers>
1414
</compounddef>

testing/013/class_t3.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<detaileddescription>
99
<para>class <ref refid="class_t3" kindref="compound">T3</ref> </para>
1010
</detaileddescription>
11-
<location file="013_class.h" bodystart="18" bodyend="20"/>
11+
<location file="013_class.h" line="19" column="1" bodyfile="013_class.h" bodystart="18" bodyend="20"/>
1212
<listofallmembers>
1313
</listofallmembers>
1414
</compounddef>

testing/013/class_t4.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<detaileddescription>
99
<para>class <ref refid="class_t4" kindref="compound">T4</ref> </para>
1010
</detaileddescription>
11-
<location file="013_class.h" bodystart="22" bodyend="24"/>
11+
<location file="013_class.h" line="23" column="1" bodyfile="013_class.h" bodystart="22" bodyend="24"/>
1212
<listofallmembers>
1313
</listofallmembers>
1414
</compounddef>

testing/015/015__cond_8c.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</detaileddescription>
1515
<inbodydescription>
1616
</inbodydescription>
17-
<location file="015_cond.c" bodystart="20" bodyend="22"/>
17+
<location file="015_cond.c" line="20" column="1" bodyfile="015_cond.c" bodystart="20" bodyend="22"/>
1818
</memberdef>
1919
</sectiondef>
2020
<briefdescription>

testing/018/018__def_8c.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</detaileddescription>
4141
<inbodydescription>
4242
</inbodydescription>
43-
<location file="018_def.c" bodystart="13" bodyend="13"/>
43+
<location file="018_def.c" line="13" column="1" bodyfile="018_def.c" bodystart="13" bodyend="13"/>
4444
</memberdef>
4545
</sectiondef>
4646
<sectiondef kind="typedef">
@@ -56,7 +56,7 @@
5656
</detaileddescription>
5757
<inbodydescription>
5858
</inbodydescription>
59-
<location file="018_def.c" bodystart="12" bodyend="-1"/>
59+
<location file="018_def.c" line="12" column="1" bodyfile="018_def.c" bodystart="12" bodyend="-1"/>
6060
</memberdef>
6161
</sectiondef>
6262
<sectiondef kind="var">
@@ -73,7 +73,7 @@
7373
</detaileddescription>
7474
<inbodydescription>
7575
</inbodydescription>
76-
<location file="018_def.c" bodystart="9" bodyend="-1"/>
76+
<location file="018_def.c" line="9" column="1" bodyfile="018_def.c" bodystart="9" bodyend="-1"/>
7777
</memberdef>
7878
</sectiondef>
7979
<sectiondef kind="func">
@@ -92,7 +92,7 @@
9292
</detaileddescription>
9393
<inbodydescription>
9494
</inbodydescription>
95-
<location file="018_def.c" bodystart="10" bodyend="10"/>
95+
<location file="018_def.c" line="10" column="1" bodyfile="018_def.c" bodystart="10" bodyend="10"/>
9696
</memberdef>
9797
<memberdef kind="function" id="018__def_8c_1a2652ccbfb85efa2df3c70ba6c4628f8d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
9898
<type>void</type>
@@ -112,7 +112,7 @@
112112
</detaileddescription>
113113
<inbodydescription>
114114
</inbodydescription>
115-
<location file="018_def.c" bodystart="11" bodyend="11"/>
115+
<location file="018_def.c" line="11" column="1" bodyfile="018_def.c" bodystart="11" bodyend="11"/>
116116
</memberdef>
117117
</sectiondef>
118118
<briefdescription>

testing/021_dontinclude.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// objective: test the \dontinclude, \skip, \until, \skipline, \line commands
22
// check: indexpage.xml
3-
// config: EXAMPLE_PATH = .
43
/*! A test class. */
54

65
class Test

testing/025/class_test.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</detaileddescription>
1717
<inbodydescription>
1818
</inbodydescription>
19-
<location file="025_example.cpp" bodystart="20" bodyend="20"/>
19+
<location file="025_example.cpp" line="17" column="1" bodyfile="025_example.cpp" bodystart="20" bodyend="20"/>
2020
</memberdef>
2121
</sectiondef>
2222
<briefdescription>
@@ -25,7 +25,7 @@
2525
<detaileddescription>
2626
<para>More details about this class. </para>
2727
</detaileddescription>
28-
<location file="025_example.cpp" bodystart="10" bodyend="18"/>
28+
<location file="025_example.cpp" line="11" column="1" bodyfile="025_example.cpp" bodystart="10" bodyend="18"/>
2929
<listofallmembers>
3030
<member refid="class_test_1a47b775f65718978f1ffcd96376f8ecfa" prot="public" virt="non-virtual">
3131
<scope>Test</scope>

testing/025_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// objective: test the \example command
22
// check: example_test_8cpp-example.xml
33
// check: class_test.xml
4-
// config: EXAMPLE_PATH = .
4+
55

66
/** \brief A Test class.
77
*

testing/026/class_test.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<para>A <ref refid="class_test" kindref="compound">Test</ref> class. More details about this class. <parameterlist kind="templateparam"><parameteritem><parameternamelist><parametername>T</parametername></parameternamelist><parameterdescription><para>A template parameter. </para></parameterdescription></parameteritem></parameterlist>
4242
</para>
4343
</detaileddescription>
44-
<location file="026_exception.cpp" bodystart="8" bodyend="20"/>
44+
<location file="026_exception.cpp" line="9" column="1" bodyfile="026_exception.cpp" bodystart="8" bodyend="20"/>
4545
<listofallmembers>
4646
<member refid="class_test_1abf9d5fbdaa4c23d0a513ee9746060779" prot="public" virt="non-virtual">
4747
<scope>Test</scope>

testing/027/struct_car.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</detaileddescription>
1919
<inbodydescription>
2020
</inbodydescription>
21-
<location file="027_extends.c" bodystart="69" bodyend="-1"/>
21+
<location file="027_extends.c" line="69" column="1" bodyfile="027_extends.c" bodystart="69" bodyend="-1"/>
2222
</memberdef>
2323
</sectiondef>
2424
<briefdescription>
@@ -68,7 +68,7 @@
6868
</childnode>
6969
</node>
7070
</collaborationgraph>
71-
<location file="027_extends.c" bodystart="67" bodyend="70"/>
71+
<location file="027_extends.c" line="68" column="1" bodyfile="027_extends.c" bodystart="67" bodyend="70"/>
7272
<listofallmembers>
7373
<member refid="struct_car_1ab8ff28306286da5a8b14fa9bdccaafaa" prot="protected" virt="non-virtual">
7474
<scope>Car</scope>

0 commit comments

Comments
 (0)