Skip to content

Commit

Permalink
Added missing files and build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed May 31, 2015
1 parent 635d8cf commit 3922817
Show file tree
Hide file tree
Showing 6 changed files with 311 additions and 272 deletions.
51 changes: 51 additions & 0 deletions BUILD.txt
@@ -0,0 +1,51 @@
Doxygen uses cmake (http://www.cmake.org/) to build executables for various platforms.

The first step is to create a build directory where the output should be stored.
Doxygen directory can be fully build outside of the source tree.

The second step is to invoke cmake from within the build directory with the desired generator.

For Linux/Unix systems do the following

mkdir build
cd build
cmake -G "Unix Makefiles" path/to/root/of/doxygen/source/tree
make

This also works for MacOSX, but if XCode is installed you can also generate an XCode project file

cmake -G XCode path/to/root/of/doxygen/source/tree

For Windows one can generate a Visual Studio project using

cmake -G "Visual Studio 12 2013" path\to\root\of\doxygen\source\tree

(this is for Visual Studio 12, there are typically also generators for other versions of
Visual Studio or other compiler environments like MinGW)

Doxygen's cmake configuration provides a number of options:
- build_wizard Build the GUI frontend for doxygen.
- build_app Example showing how to embed doxygen in an application.
- build_xmlparser Example showing how to parse doxygen's XML output.
- build_search Build external search tools (doxysearch and doxyindexer)
- build_doc Build user manual
- use_sqlite3 Add support for sqlite3 output [experimental].
- use_libclang Add support for libclang parsing.
- win_static Link with /MT in stead of /MD on windows

An option can be turned on, by adding -D<option>=ON as a command line option, this can be
done when generating the initial build files, but also afterwards, i.e. to enable building
of the documentation after an initial cmake -G run, do

cmake -Dbuild_doc=ON path/to/root/of/doxygen/source/tree

To turn the option off use

cmake -Dbuild_doc=OFF path/to/root/of/doxygen/source/tree

To see the current value is of the various options, you can run

cmake -L path/to/root/of/doxygen/source/tree

The build target for building the documentation is 'doc' and the build target for
the regression tests is 'tests'
42 changes: 42 additions & 0 deletions cmake/FindXapian.cmake
@@ -0,0 +1,42 @@
# Find Xapian search engine library
#
# XAPIAN_FOUND - system has Xapian
# XAPIAN_INCLUDE_DIR - the Xapian include directory
# XAPIAN_LIBRARIES - the libraries needed to use Xapian
#
# Copyright © 2010 Harald Sitter <apachelogger@ubuntu.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)
# Already in cache, be silent
set(Xapian_FIND_QUIETLY TRUE)
endif(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)

FIND_PATH(XAPIAN_INCLUDE_DIR xapian/version.h)

FIND_LIBRARY(XAPIAN_LIBRARIES NAMES xapian)

IF(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)
SET(XAPIAN_FOUND TRUE)
ELSE(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)
SET(XAPIAN_FOUND FALSE)
ENDIF(XAPIAN_INCLUDE_DIR AND XAPIAN_LIBRARIES)

IF(XAPIAN_FOUND)
IF(NOT Xapian_FIND_QUIETLY)
MESSAGE(STATUS "Found Xapian: ${XAPIAN_LIBRARIES}")
ENDIF(NOT Xapian_FIND_QUIETLY)
ELSE(XAPIAN_FOUND)
IF(Xapian_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Xapian")
ENDIF(Xapian_FIND_REQUIRED)
IF(NOT Xapian_FIND_QUIETLY)
MESSAGE(STATUS "Could not find Xapian")
ENDIF(NOT Xapian_FIND_QUIETLY)
ENDIF(XAPIAN_FOUND)

# show the XAPIAN_INCLUDE_DIR and XAPIAN_LIBRARIES variables only in the advanced view
MARK_AS_ADVANCED(XAPIAN_INCLUDE_DIR XAPIAN_LIBRARIES)

3 changes: 0 additions & 3 deletions testing/Makefile

This file was deleted.

34 changes: 17 additions & 17 deletions testing/README → testing/README.txt
@@ -1,48 +1,48 @@
Doxygen regession test suite
============================

This directory contains a set of regression tests. Each test consists of a
file starting with a 3 digit number and a corresponding directory whose name
has the same 3 digit number. The directory contains one or more reference
files that are compared against the XML output produced by doxygen. If the
result is the same, there is no regression and the test passes. If there is a
This directory contains a set of regression tests. Each test consists of a
file starting with a 3 digit number and a corresponding directory whose name
has the same 3 digit number. The directory contains one or more reference
files that are compared against the XML output produced by doxygen. If the
result is the same, there is no regression and the test passes. If there is a
difference the test fails and the difference (in diff -u format) will be shown.

The runtest.pl script responsible for running the tests takes a number of
The runtest.py script responsible for running the tests takes a number of
optional parameters:
-id n: run test with number n only (the option may be specified
-id n: run test with number n only (the option may be specified
multiple times) default is to run all tests.
-updateref: update the reference files. Should be used in combination
-updateref: update the reference files. Should be used in combination
with -id to update the reference file(s) for the given test.
-all: can be used in combination with -updateref to update the
reference files for all tests.
-doxygen exe: run the specified doxygen executable.
-xmllint exe: run the specified xmllint executable.

The runtest.pl has the following dependenies on 3rd party tools:
- perl to run the script
- python to run the script
- xmllint to normalize the XML output
- diff to show the differences in case a test fails

Each test file can have a number of special comment lines that are extracted by
the runtest.pl script and take the form:
// <identifier>: 'argument'
// <identifier>: 'argument'
Where <identifier> can be one of:
- objective: 'argument' provides the objective for the test (i.e. its purpose)
- check: 'argument' names a file that is generated by doxygen, which should
- check: 'argument' names a file that is generated by doxygen, which should
be compared against the reference.
- config: 'argument' is a line that is added to the default Doxyfile used to
run doxygen on the test file.

Example to run all tests:
perl runtest.pl
python runtest.py

Example to run a test
perl runtest.pl -id 10
python runtest.py -id 10

Example to update the reference files for a test
perl runtest.pl -updateref -id 10
python runtest.py -updateref -id 10

There is also a Makefile, which can be used to run all tests by simply
invoking make.
There is also a CMakeLists.txt, which can be used from the build directory
to run all tests by simply invoking 'make tests'.

0 comments on commit 3922817

Please sign in to comment.