Skip to content

Commit

Permalink
Further cmake changes
Browse files Browse the repository at this point in the history
- made static build option for all windows targets
- made wizard flex interactive
- add 64bit support for libiconv on windows build
- updated test mechanism
  • Loading branch information
Dimitri van Heesch committed May 31, 2015
1 parent 7bcf8e9 commit 635d8cf
Show file tree
Hide file tree
Showing 69 changed files with 204 additions and 272 deletions.
21 changes: 19 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
17 changes: 0 additions & 17 deletions addon/doxywizard/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions addon/doxywizard/config_doxyw.l
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
*/

%option never-interactive
%{

/*
Expand All @@ -21,6 +22,8 @@
#include "input.h"
#include <QtCore>

#define YY_NO_UNISTD_H 1

#define MAX_INCLUDE_DEPTH 10


Expand Down
27 changes: 19 additions & 8 deletions cmake/FindIconv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
10 changes: 6 additions & 4 deletions cmake/version.cmake
Original file line number Diff line number Diff line change
@@ -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}")
2 changes: 2 additions & 0 deletions src/xmlcode.l
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* written by Weston Thayer
******************************************************************************/

%option never-interactive
%{

#include <stdio.h>
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/xmlgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() << "\"";
Expand Down Expand Up @@ -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() << "\"";
Expand Down
2 changes: 1 addition & 1 deletion testing/009/class_bug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</xrefsect>
</para>
</detaileddescription>
<location file="009_bug.cpp" bodystart="15" bodyend="26"/>
<location file="009_bug.cpp" line="16" column="1" bodyfile="009_bug.cpp" bodystart="15" bodyend="26"/>
<listofallmembers>
<member refid="class_bug_1a1f720954dd97cd1203e80501a6eae74c" prot="public" virt="non-virtual">
<scope>Bug</scope>
Expand Down
2 changes: 1 addition & 1 deletion testing/009/class_deprecated.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</xrefsect>
</para>
</detaileddescription>
<location file="009_bug.cpp" bodystart="29" bodyend="36"/>
<location file="009_bug.cpp" line="30" column="1" bodyfile="009_bug.cpp" bodystart="29" bodyend="36"/>
<listofallmembers>
<member refid="class_deprecated_1a1d5f6803e72c625727e7083d1722dbf9" prot="public" virt="non-virtual">
<scope>Deprecated</scope>
Expand Down
2 changes: 1 addition & 1 deletion testing/009/class_reminder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</xrefsect>
</para>
</detaileddescription>
<location file="009_bug.cpp" bodystart="55" bodyend="60"/>
<location file="009_bug.cpp" line="56" column="1" bodyfile="009_bug.cpp" bodystart="55" bodyend="60"/>
<listofallmembers>
<member refid="class_reminder_1a173b5218bb11287b0e86a550d9f0728d" prot="public" virt="non-virtual">
<scope>Reminder</scope>
Expand Down
2 changes: 1 addition & 1 deletion testing/009/class_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</xrefsect>
</para>
</detaileddescription>
<location file="009_bug.cpp" bodystart="47" bodyend="52"/>
<location file="009_bug.cpp" line="48" column="1" bodyfile="009_bug.cpp" bodystart="47" bodyend="52"/>
<listofallmembers>
<member refid="class_test_1a9fc54b716f326514a4c5f434137f4fc0" prot="public" virt="non-virtual">
<scope>Test</scope>
Expand Down
2 changes: 1 addition & 1 deletion testing/009/class_todo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</xrefsect>
</para>
</detaileddescription>
<location file="009_bug.cpp" bodystart="39" bodyend="44"/>
<location file="009_bug.cpp" line="40" column="1" bodyfile="009_bug.cpp" bodystart="39" bodyend="44"/>
<listofallmembers>
<member refid="class_todo_1a9e70ec9176ac4c1b20e011b4daddc9d8" prot="public" virt="non-virtual">
<scope>Todo</scope>
Expand Down
2 changes: 1 addition & 1 deletion testing/011/category_integer_07_arithmetic_08.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<detaileddescription>
<para>A category </para>
</detaileddescription>
<location file="011_category.m" bodystart="17" bodyend="-1"/>
<location file="011_category.m" line="17" column="1" bodyfile="011_category.m" bodystart="17" bodyend="-1"/>
<listofallmembers>
<member refid="category_integer_07_arithmetic_08_1a12f411c5872ba3bafb8ea7dd1826cf2a" prot="public" virt="virtual">
<scope>Integer(Arithmetic)</scope>
Expand Down
4 changes: 2 additions & 2 deletions testing/011/interface_integer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="011_category.m" bodystart="8" bodyend="-1"/>
<location file="011_category.m" line="8" column="1" bodyfile="011_category.m" bodystart="8" bodyend="-1"/>
</memberdef>
</sectiondef>
<sectiondef kind="public-func">
Expand Down Expand Up @@ -80,7 +80,7 @@
</childnode>
</node>
</collaborationgraph>
<location file="011_category.m" bodystart="6" bodyend="-1"/>
<location file="011_category.m" line="6" column="1" bodyfile="011_category.m" bodystart="6" bodyend="-1"/>
<listofallmembers>
<member refid="interface_integer_1a35e89216966d8179a1b77f14b8211fda" prot="protected" virt="non-virtual">
<scope>Integer</scope>
Expand Down
2 changes: 1 addition & 1 deletion testing/012_cite.dox
Original file line number Diff line number Diff line change
@@ -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.
*/
2 changes: 1 addition & 1 deletion testing/013/class_t1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<detaileddescription>
<para>A class </para>
</detaileddescription>
<location file="013_class.h" bodystart="10" bodyend="12"/>
<location file="013_class.h" line="11" column="1" bodyfile="013_class.h" bodystart="10" bodyend="12"/>
<listofallmembers>
</listofallmembers>
</compounddef>
Expand Down
2 changes: 1 addition & 1 deletion testing/013/class_t2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<detaileddescription>
<para>class <ref refid="class_t2" kindref="compound">T2</ref> </para>
</detaileddescription>
<location file="013_class.h" bodystart="14" bodyend="16"/>
<location file="013_class.h" line="15" column="1" bodyfile="013_class.h" bodystart="14" bodyend="16"/>
<listofallmembers>
</listofallmembers>
</compounddef>
Expand Down
2 changes: 1 addition & 1 deletion testing/013/class_t3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<detaileddescription>
<para>class <ref refid="class_t3" kindref="compound">T3</ref> </para>
</detaileddescription>
<location file="013_class.h" bodystart="18" bodyend="20"/>
<location file="013_class.h" line="19" column="1" bodyfile="013_class.h" bodystart="18" bodyend="20"/>
<listofallmembers>
</listofallmembers>
</compounddef>
Expand Down
2 changes: 1 addition & 1 deletion testing/013/class_t4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<detaileddescription>
<para>class <ref refid="class_t4" kindref="compound">T4</ref> </para>
</detaileddescription>
<location file="013_class.h" bodystart="22" bodyend="24"/>
<location file="013_class.h" line="23" column="1" bodyfile="013_class.h" bodystart="22" bodyend="24"/>
<listofallmembers>
</listofallmembers>
</compounddef>
Expand Down
2 changes: 1 addition & 1 deletion testing/015/015__cond_8c.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="015_cond.c" bodystart="20" bodyend="22"/>
<location file="015_cond.c" line="20" column="1" bodyfile="015_cond.c" bodystart="20" bodyend="22"/>
</memberdef>
</sectiondef>
<briefdescription>
Expand Down
10 changes: 5 additions & 5 deletions testing/018/018__def_8c.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="018_def.c" bodystart="13" bodyend="13"/>
<location file="018_def.c" line="13" column="1" bodyfile="018_def.c" bodystart="13" bodyend="13"/>
</memberdef>
</sectiondef>
<sectiondef kind="typedef">
Expand All @@ -56,7 +56,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="018_def.c" bodystart="12" bodyend="-1"/>
<location file="018_def.c" line="12" column="1" bodyfile="018_def.c" bodystart="12" bodyend="-1"/>
</memberdef>
</sectiondef>
<sectiondef kind="var">
Expand All @@ -73,7 +73,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="018_def.c" bodystart="9" bodyend="-1"/>
<location file="018_def.c" line="9" column="1" bodyfile="018_def.c" bodystart="9" bodyend="-1"/>
</memberdef>
</sectiondef>
<sectiondef kind="func">
Expand All @@ -92,7 +92,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="018_def.c" bodystart="10" bodyend="10"/>
<location file="018_def.c" line="10" column="1" bodyfile="018_def.c" bodystart="10" bodyend="10"/>
</memberdef>
<memberdef kind="function" id="018__def_8c_1a2652ccbfb85efa2df3c70ba6c4628f8d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type>void</type>
Expand All @@ -112,7 +112,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="018_def.c" bodystart="11" bodyend="11"/>
<location file="018_def.c" line="11" column="1" bodyfile="018_def.c" bodystart="11" bodyend="11"/>
</memberdef>
</sectiondef>
<briefdescription>
Expand Down
1 change: 0 additions & 1 deletion testing/021_dontinclude.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// objective: test the \dontinclude, \skip, \until, \skipline, \line commands
// check: indexpage.xml
// config: EXAMPLE_PATH = .
/*! A test class. */

class Test
Expand Down
4 changes: 2 additions & 2 deletions testing/025/class_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="025_example.cpp" bodystart="20" bodyend="20"/>
<location file="025_example.cpp" line="17" column="1" bodyfile="025_example.cpp" bodystart="20" bodyend="20"/>
</memberdef>
</sectiondef>
<briefdescription>
Expand All @@ -25,7 +25,7 @@
<detaileddescription>
<para>More details about this class. </para>
</detaileddescription>
<location file="025_example.cpp" bodystart="10" bodyend="18"/>
<location file="025_example.cpp" line="11" column="1" bodyfile="025_example.cpp" bodystart="10" bodyend="18"/>
<listofallmembers>
<member refid="class_test_1a47b775f65718978f1ffcd96376f8ecfa" prot="public" virt="non-virtual">
<scope>Test</scope>
Expand Down
2 changes: 1 addition & 1 deletion testing/025_example.cpp
Original file line number Diff line number Diff line change
@@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion testing/026/class_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<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>
</para>
</detaileddescription>
<location file="026_exception.cpp" bodystart="8" bodyend="20"/>
<location file="026_exception.cpp" line="9" column="1" bodyfile="026_exception.cpp" bodystart="8" bodyend="20"/>
<listofallmembers>
<member refid="class_test_1abf9d5fbdaa4c23d0a513ee9746060779" prot="public" virt="non-virtual">
<scope>Test</scope>
Expand Down
4 changes: 2 additions & 2 deletions testing/027/struct_car.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="027_extends.c" bodystart="69" bodyend="-1"/>
<location file="027_extends.c" line="69" column="1" bodyfile="027_extends.c" bodystart="69" bodyend="-1"/>
</memberdef>
</sectiondef>
<briefdescription>
Expand Down Expand Up @@ -68,7 +68,7 @@
</childnode>
</node>
</collaborationgraph>
<location file="027_extends.c" bodystart="67" bodyend="70"/>
<location file="027_extends.c" line="68" column="1" bodyfile="027_extends.c" bodystart="67" bodyend="70"/>
<listofallmembers>
<member refid="struct_car_1ab8ff28306286da5a8b14fa9bdccaafaa" prot="protected" virt="non-virtual">
<scope>Car</scope>
Expand Down

0 comments on commit 635d8cf

Please sign in to comment.