summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeCPack.cmake16
-rw-r--r--CMakeCPackOptions.cmake.in23
-rw-r--r--CMakeLists.txt5
-rw-r--r--Help/manual/cmake.1.rst37
-rw-r--r--Help/release/dev/cmake-capabilities.rst6
-rw-r--r--Source/CMakeLists.txt9
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/QtDialog/CMakeSetup64.pngbin0 -> 7213 bytes
-rw-r--r--Source/QtIFW/CMake.DeveloperReference.HTML.qs.in21
-rw-r--r--Source/cmake.cxx81
-rw-r--r--Source/cmake.h4
-rw-r--r--Source/cmcmd.cxx12
-rw-r--r--Source/dir.dox7
-rw-r--r--Source/dir.dox.in7
-rw-r--r--Tests/RunCMake/CommandLine/E_capabilities-arg-result.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_capabilities-arg-stderr.txt1
-rw-r--r--Tests/RunCMake/CommandLine/E_capabilities-stdout.txt1
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake2
-rw-r--r--Utilities/Doxygen/CMakeLists.txt92
-rw-r--r--Utilities/Doxygen/DeveloperReference/mainpage.dox8
-rw-r--r--Utilities/Doxygen/authors.txt17
-rwxr-xr-xUtilities/Doxygen/doc_makeall.sh.in248
-rw-r--r--Utilities/Doxygen/doxyfile.in35
23 files changed, 339 insertions, 296 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 34bb6bb..4d7c6fd 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -107,6 +107,14 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
if(SPHINX_QTHELP)
list(APPEND _CPACK_IFW_COMPONENTS_ALL sphinx-qthelp)
endif()
+ if(CMake_BUILD_DEVELOPER_REFERENCE)
+ if(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
+ list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-html)
+ endif()
+ if(CMake_BUILD_DEVELOPER_REFERENCE_QTHELP)
+ list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-developer-reference-qthelp)
+ endif()
+ endif()
set(_CPACK_IFW_COMPONENTS_CONFIGURATION "
# Components
set(CPACK_COMPONENTS_ALL \"${_CPACK_IFW_COMPONENTS_ALL}\")
@@ -122,7 +130,8 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# Components scripts configuration
foreach(_script
CMake
- CMake.Documentation.SphinxHTML)
+ CMake.Documentation.SphinxHTML
+ CMake.DeveloperReference.HTML)
configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/${_script}.qs.in"
"${CMake_BINARY_DIR}/${_script}.qs" @ONLY)
endforeach()
@@ -136,6 +145,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
if(SPHINX_HTML)
set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/html/index.html\", \"@StartMenuDir@/CMake Documentation.lnk\");\n")
endif()
+ if(CMake_BUILD_DEVELOPER_REFERENCE)
+ if(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
+ set(_CPACK_IFW_SHORTCUT_OPTIONAL "${_CPACK_IFW_SHORTCUT_OPTIONAL}component.addOperation(\"CreateShortcut\", \"@TargetDir@/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/developer-reference/html/index.html\", \"@StartMenuDir@/CMake Developer Reference.lnk\");\n")
+ endif()
+ endif()
configure_file("${CMake_SOURCE_DIR}/Source/QtIFW/installscript.qs.in"
"${CMake_BINARY_DIR}/installscript.qs" @ONLY
)
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index 1d61613..d7a33bc 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -175,6 +175,29 @@ if(CPACK_GENERATOR MATCHES "IFW")
set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_NAME "SphinxQtHelp")
set(CPACK_IFW_COMPONENT_SPHINX-QTHELP_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
+ # Developer Reference
+ set(CPACK_COMPONENT_GROUP_DEVELOPERREFERENCE_DISPLAY_NAME "Developer Reference")
+ set(CPACK_COMPONENT_GROUP_DEVELOPERREFERENCE_DESCRIPTION
+ "CMake Reference in different formats (html, qch)")
+ set(CPACK_COMPONENT_GROUP_DEVELOPERREFERENCE_PARENT_GROUP CMake)
+ set(CPACK_IFW_COMPONENT_GROUP_DEVELOPERREFERENCE_PRIORITY 50)
+ set(CPACK_IFW_COMPONENT_GROUP_DEVELOPERREFERENCE_VERSION
+ "@_CPACK_IFW_PACKAGE_VERSION@")
+
+ set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_DISPLAY_NAME "HTML")
+ set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_GROUP DeveloperReference)
+ set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_DISABLED TRUE)
+ set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_NAME "HTML")
+ set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_SCRIPT
+ "@CMake_BINARY_DIR@/CMake.DeveloperReference.HTML.qs")
+ set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-HTML_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
+
+ set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_DISPLAY_NAME "Qt Compressed Help")
+ set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_GROUP DeveloperReference)
+ set(CPACK_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_DISABLED TRUE)
+ set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_NAME "QtHelp")
+ set(CPACK_IFW_COMPONENT_CMAKE-DEVELOPER-REFERENCE-QTHELP_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
+
endif()
if(CPACK_GENERATOR MATCHES "CygwinSource")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae5990e..3aef619 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,6 +93,11 @@ option(CMake_INSTALL_DEPENDENCIES
"Whether to install 3rd-party runtime dependencies" OFF)
mark_as_advanced(CMake_INSTALL_DEPENDENCIES)
+# option to build reference for CMake developers
+option(CMake_BUILD_DEVELOPER_REFERENCE
+ "Build CMake Developer Reference" OFF)
+mark_as_advanced(CMake_BUILD_DEVELOPER_REFERENCE)
+
#-----------------------------------------------------------------------
# a macro to deal with system libraries, implemented as a macro
# simply to improve readability of the main script
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 8f7c336..2ccc6be 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -180,6 +180,43 @@ CMake provides builtin command-line tools through the signature::
Run ``cmake -E`` or ``cmake -E help`` for a summary of commands.
Available commands are:
+``capabilities``
+ Report cmake capabilities in JSON format. The output is a JSON object
+ with the following keys:
+
+ ``version``
+ A JSON object with version information. Keys are:
+
+ ``string``
+ The full version string as displayed by cmake ``--version``.
+ ``major``
+ The major version number in integer form.
+ ``minor``
+ The minor version number in integer form.
+ ``patch``
+ The patch level in integer form.
+ ``suffix``
+ The cmake version suffix string.
+ ``isDirty``
+ A bool that is set if the cmake build is from a dirty tree.
+
+ ``generators``
+ A list available generators. Each generator is a JSON object with the
+ following keys:
+
+ ``name``
+ A string containing the name of the generator.
+ ``toolsetSupport``
+ ``true`` if the generator supports toolsets and ``false`` otherwise.
+ ``platformSupport``
+ ``true`` if the generator supports platforms and ``false`` otherwise.
+ ``extraGenerators``
+ A list of strings with all the extra generators compatible with
+ the generator.
+
+ ``serverMode``
+ ``true`` if cmake supports server-mode and ``false`` otherwise.
+
``chdir <dir> <cmd> [<arg>...]``
Change the current working directory and run a command.
diff --git a/Help/release/dev/cmake-capabilities.rst b/Help/release/dev/cmake-capabilities.rst
new file mode 100644
index 0000000..7abb973
--- /dev/null
+++ b/Help/release/dev/cmake-capabilities.rst
@@ -0,0 +1,6 @@
+cmake-capabilities
+------------------
+
+* :manual:`cmake(1)` gained a ``-E capabilities`` option to provide a
+ machine-readable (JSON) description of the capabilities of the
+ cmake tool (available generators, etc.).
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index cdc8fb1..b68675d 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -50,6 +50,15 @@ if(WIN32)
add_definitions(-DUNICODE -D_UNICODE)
endif()
+# configure the .dox.in file
+if(CMake_BUILD_DEVELOPER_REFERENCE)
+ configure_file(
+ "${CMake_SOURCE_DIR}/Source/dir.dox.in"
+ "${CMake_BINARY_DIR}/Source/dir.dox"
+ @ONLY
+ )
+endif()
+
# configure the .h file
configure_file(
"${CMake_SOURCE_DIR}/Source/cmConfigure.cmake.h.in"
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 8d950fd..ac1ae03 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 6)
-set(CMake_VERSION_PATCH 20160816)
+set(CMake_VERSION_PATCH 20160817)
#set(CMake_VERSION_RC 1)
diff --git a/Source/QtDialog/CMakeSetup64.png b/Source/QtDialog/CMakeSetup64.png
new file mode 100644
index 0000000..43a8cc6
--- /dev/null
+++ b/Source/QtDialog/CMakeSetup64.png
Binary files differ
diff --git a/Source/QtIFW/CMake.DeveloperReference.HTML.qs.in b/Source/QtIFW/CMake.DeveloperReference.HTML.qs.in
new file mode 100644
index 0000000..e3d8554
--- /dev/null
+++ b/Source/QtIFW/CMake.DeveloperReference.HTML.qs.in
@@ -0,0 +1,21 @@
+// Component: CMake.Reference.DoxygenHTML
+
+function Component()
+{
+ // Default constructor
+}
+
+Component.prototype.createOperations = function()
+{
+ // Create shortcut
+ if (installer.value("os") === "win") {
+
+ component.addOperation("CreateShortcut",
+ installer.value("TargetDir") + "/@CMAKE_DOC_DIR@/developer-reference/html/index.html",
+ installer.value("StartMenuDir") + "/CMake Developer Reference.lnk");
+
+ }
+
+ // Call default implementation
+ component.createOperations();
+}
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index b11f4f6..4313d83 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -23,11 +23,15 @@
#include "cmState.h"
#include "cmTest.h"
#include "cmUtils.hxx"
+#include "cmVersionMacros.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmGraphVizWriter.h"
#include "cmVariableWatch.h"
#include <cmsys/SystemInformation.hxx>
+
+#include "cm_jsoncpp_value.h"
+#include "cm_jsoncpp_writer.h"
#endif
#include <cmsys/FStream.hxx>
@@ -110,6 +114,18 @@
#include <list>
+namespace {
+
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+#ifdef CMake_HAVE_CXX_UNORDERED_MAP
+typedef std::unordered_map<std::string, Json::Value> JsonValueMapType;
+#else
+typedef cmsys::hash_map<std::string, Json::Value> JsonValueMapType;
+#endif
+#endif
+
+} // namespace
+
static bool cmakeCheckStampFile(const char* stampName);
static bool cmakeCheckStampList(const char* stampName);
@@ -201,6 +217,68 @@ cmake::~cmake()
delete this->FileComparison;
}
+std::string cmake::ReportCapabilities() const
+{
+ std::string result;
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+ Json::Value obj = Json::objectValue;
+ // Version information:
+ Json::Value version = Json::objectValue;
+ version["string"] = CMake_VERSION;
+ version["major"] = CMake_VERSION_MAJOR;
+ version["minor"] = CMake_VERSION_MINOR;
+ version["suffix"] = CMake_VERSION_SUFFIX;
+ version["isDirty"] = (CMake_VERSION_IS_DIRTY == 1);
+ version["patch"] = CMake_VERSION_PATCH;
+
+ obj["version"] = version;
+
+ // Generators:
+ std::vector<cmake::GeneratorInfo> generatorInfoList;
+ this->GetRegisteredGenerators(generatorInfoList);
+
+ JsonValueMapType generatorMap;
+ for (std::vector<cmake::GeneratorInfo>::const_iterator i =
+ generatorInfoList.begin();
+ i != generatorInfoList.end(); ++i) {
+ if (i->isAlias) { // skip aliases, they are there for compatibility reasons
+ // only
+ continue;
+ }
+
+ if (i->extraName.empty()) {
+ Json::Value gen = Json::objectValue;
+ gen["name"] = i->name;
+ gen["toolsetSupport"] = i->supportsToolset;
+ gen["platformSupport"] = i->supportsPlatform;
+ gen["extraGenerators"] = Json::arrayValue;
+ generatorMap[i->name] = gen;
+ } else {
+ Json::Value& gen = generatorMap[i->baseName];
+ gen["extraGenerators"].append(i->extraName);
+ }
+ }
+
+ Json::Value generators = Json::arrayValue;
+ for (JsonValueMapType::const_iterator i = generatorMap.begin();
+ i != generatorMap.end(); ++i) {
+ generators.append(i->second);
+ }
+ obj["generators"] = generators;
+
+#if defined(HAVE_SERVER_MODE) && HAVE_SERVER_MODE
+ obj["serverMode"] = true;
+#else
+ obj["serverMode"] = false;
+#endif
+ Json::FastWriter writer;
+ result = writer.write(obj);
+#else
+ result = "Not supported";
+#endif
+ return result;
+}
+
void cmake::CleanupCommandsAndMacros()
{
this->CurrentSnapshot = this->State->Reset();
@@ -811,7 +889,8 @@ void cmake::AddDefaultExtraGenerators()
#endif
}
-void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators)
+void cmake::GetRegisteredGenerators(
+ std::vector<GeneratorInfo>& generators) const
{
for (RegisteredGeneratorsVector::const_iterator i = this->Generators.begin(),
e = this->Generators.end();
diff --git a/Source/cmake.h b/Source/cmake.h
index 304a15d..343d371 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -117,6 +117,8 @@ public:
/// Destructor
~cmake();
+ std::string ReportCapabilities() const;
+
static const char* GetCMakeFilesDirectory() { return "/CMakeFiles"; }
static const char* GetCMakeFilesDirectoryPostSlash()
{
@@ -187,7 +189,7 @@ public:
void SetGlobalGenerator(cmGlobalGenerator*);
///! Get the names of the current registered generators
- void GetRegisteredGenerators(std::vector<GeneratorInfo>& generators);
+ void GetRegisteredGenerators(std::vector<GeneratorInfo>& generators) const;
///! Set the name of the selected generator-specific platform.
void SetGeneratorPlatform(std::string const& ts)
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 9d0337a..be023b1 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -60,6 +60,8 @@ void CMakeCommandUsage(const char* program)
errorStream
<< "Usage: " << program << " -E <command> [arguments...]\n"
<< "Available commands: \n"
+ << " capabilities - Report capabilities built into cmake "
+ "in JSON format\n"
<< " chdir dir cmd [args...] - run command in a given directory\n"
<< " compare_files file1 file2 - check if file1 is same as file2\n"
<< " copy <file>... destination - copy files to destination "
@@ -510,6 +512,16 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
}
return 0;
}
+ // capabilities
+ else if (args[1] == "capabilities") {
+ if (args.size() > 2) {
+ std::cerr << "-E capabilities accepts no additional arguments\n";
+ return 1;
+ }
+ cmake cm;
+ std::cout << cm.ReportCapabilities();
+ return 0;
+ }
// Sleep command
else if (args[1] == "sleep" && args.size() > 2) {
diff --git a/Source/dir.dox b/Source/dir.dox
new file mode 100644
index 0000000..66e3de7
--- /dev/null
+++ b/Source/dir.dox
@@ -0,0 +1,7 @@
+/*!
+
+\dir
+
+\brief Root \c ${CMake_SOURCE_DIR}/Source directory
+
+*/
diff --git a/Source/dir.dox.in b/Source/dir.dox.in
new file mode 100644
index 0000000..78cf58d
--- /dev/null
+++ b/Source/dir.dox.in
@@ -0,0 +1,7 @@
+/*!
+
+\dir
+
+\brief Generated \c ${CMake_BINARY_DIR}/Source directory
+
+*/
diff --git a/Tests/RunCMake/CommandLine/E_capabilities-arg-result.txt b/Tests/RunCMake/CommandLine/E_capabilities-arg-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_capabilities-arg-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CommandLine/E_capabilities-arg-stderr.txt b/Tests/RunCMake/CommandLine/E_capabilities-arg-stderr.txt
new file mode 100644
index 0000000..f74cebe
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_capabilities-arg-stderr.txt
@@ -0,0 +1 @@
+^-E capabilities accepts no additional arguments$
diff --git a/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
new file mode 100644
index 0000000..6c5ea44
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/E_capabilities-stdout.txt
@@ -0,0 +1 @@
+^{.*}$
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 077a19d..6ae47a8 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -8,6 +8,8 @@ run_cmake_command(lists-no-file ${CMAKE_COMMAND} nosuchsubdir/CMakeLists.txt)
run_cmake_command(D-no-arg ${CMAKE_COMMAND} -D)
run_cmake_command(U-no-arg ${CMAKE_COMMAND} -U)
run_cmake_command(E-no-arg ${CMAKE_COMMAND} -E)
+run_cmake_command(E_capabilities ${CMAKE_COMMAND} -E capabilities)
+run_cmake_command(E_capabilities-arg ${CMAKE_COMMAND} -E capabilities --extra-arg)
run_cmake_command(E_echo_append ${CMAKE_COMMAND} -E echo_append)
run_cmake_command(E_rename-no-arg ${CMAKE_COMMAND} -E rename)
run_cmake_command(E_touch_nocreate-no-arg ${CMAKE_COMMAND} -E touch_nocreate)
diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index 813e34d..6ebf2b4 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -10,30 +10,96 @@
# See the License for more information.
#=============================================================================
+if(NOT CMake_SOURCE_DIR)
+ set(CMakeDeveloperReference_STANDALONE 1)
+ cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
+ get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
+ get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH)
+ include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake)
+ include(${CMake_SOURCE_DIR}/Source/CMakeVersionCompute.cmake)
+ include(${CMake_SOURCE_DIR}/Source/CMakeInstallDestinations.cmake)
+ unset(CMAKE_DATA_DIR)
+ unset(CMAKE_DATA_DIR CACHE)
+ macro(CMake_OPTIONAL_COMPONENT)
+ set(COMPONENT "")
+ endmacro()
+endif()
+
+project(CMakeDeveloperReference NONE)
+
#
-# Build the documentation
+# Build the reference
#
-include (${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
-if (BUILD_DOCUMENTATION)
+if (CMake_BUILD_DEVELOPER_REFERENCE OR CMakeDeveloperReference_STANDALONE)
+
+ find_package(Doxygen REQUIRED)
+
+ #
+ ## Output formats
+ #
+
+ option(CMake_BUILD_DEVELOPER_REFERENCE_HTML "Build CMake Developer Reference - HTML format" ON)
+ mark_as_advanced(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
+ if(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
+ set(GENERATE_HTML YES)
+ else()
+ set(GENERATE_HTML NO)
+ endif()
+
+ option(CMake_BUILD_DEVELOPER_REFERENCE_QTHELP "Build CMake Developer Reference - QtHelp format" OFF)
+ mark_as_advanced(CMake_BUILD_DEVELOPER_REFERENCE_QTHELP)
+ if(CMake_BUILD_DEVELOPER_REFERENCE_QTHELP)
+ set(GENERATE_QHP YES)
+ find_program(QHELPGENERATOR_EXECUTABLE
+ NAMES qhelpgenerator
+ DOC "qhelpgenerator tool"
+ )
+ if(NOT QHELPGENERATOR_EXECUTABLE)
+ message(FATAL_ERROR "QHELPGENERATOR_EXECUTABLE (qhelpgenerator) not found!")
+ endif()
+ else()
+ set(GENERATE_QHP NO)
+ endif()
#
# Configure the script and the doxyfile, then add target
#
+
+ if(DOXYGEN_DOT_FOUND)
+ set(HAVE_DOT YES)
+ else()
+ set(HAVE_DOT NO)
+ endif()
+
if(NOT DOT_PATH)
- get_filename_component(DOT_PATH ${DOT} PATH)
+ get_filename_component(DOT_PATH ${DOXYGEN_DOT_EXECUTABLE} PATH)
endif()
- configure_file(
- ${CMake_SOURCE_DIR}/Utilities/Doxygen/doxyfile.in
- ${CMake_BINARY_DIR}/Utilities/Doxygen/doxyfile)
+ configure_file(doxyfile.in doxyfile @ONLY)
+
+ add_custom_target(cmake-developer-reference-all
+ ${DOXYGEN_EXECUTABLE} doxyfile
+ WORKING_DIRECTORY ${CMakeDeveloperReference_BINARY_DIR})
+
+ add_custom_target(cmake-developer-reference ALL DEPENDS cmake-developer-reference-all)
- configure_file(
- ${CMake_SOURCE_DIR}/Utilities/Doxygen/doc_makeall.sh.in
- ${CMake_BINARY_DIR}/Utilities/Doxygen/doc_makeall.sh)
+ #
+ # Installation
+ #
- add_custom_target(DoxygenDoc
- ${BASH}
- ${CMake_BINARY_DIR}/Utilities/Doxygen/doc_makeall.sh)
+ if(CMake_BUILD_DEVELOPER_REFERENCE_HTML)
+ CMake_OPTIONAL_COMPONENT(cmake-developer-reference-html)
+ install(DIRECTORY "${CMakeDeveloperReference_BINARY_DIR}/developer-reference/html"
+ DESTINATION ${CMAKE_DOC_DIR}/developer-reference
+ ${COMPONENT})
+ endif()
+
+ if(CMake_BUILD_DEVELOPER_REFERENCE_QTHELP)
+ CMake_OPTIONAL_COMPONENT(cmake-developer-reference-qthelp)
+ install(FILES "${CMakeDeveloperReference_BINARY_DIR}/developer-reference/CMakeDeveloperReference-${CMake_VERSION_MAJOR}${CMake_VERSION_MINOR}${CMake_VERSION_PATCH}.qch"
+ DESTINATION ${CMAKE_DOC_DIR}/developer-reference
+ ${COMPONENT})
+ endif()
endif ()
diff --git a/Utilities/Doxygen/DeveloperReference/mainpage.dox b/Utilities/Doxygen/DeveloperReference/mainpage.dox
new file mode 100644
index 0000000..a37927f
--- /dev/null
+++ b/Utilities/Doxygen/DeveloperReference/mainpage.dox
@@ -0,0 +1,8 @@
+/*!
+
+\mainpage CMake Developer Reference
+
+This manual is intended for reference by developers modifying the CMake
+source tree itself.
+
+*/
diff --git a/Utilities/Doxygen/authors.txt b/Utilities/Doxygen/authors.txt
deleted file mode 100644
index 9ba6cca..0000000
--- a/Utilities/Doxygen/authors.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-andy: Cedilnik, Andy (andy.cedilnik@kitware.com)
-barre: Barre, Sebastien (sebastien.barre@kitware.com)
-berk: Geveci, Berk (berk.geveci@kitware.com)
-bettingf: Bettinger, Franck (bettingf@cs.man.ac.uk)
-biddi: Biddiscombe, John (jbiddiscombe@skippingmouse.co.uk)
-blezek: Blezek, Dan (blezek@crd.ge.com)
-geoff: Cross, Geoffrey (geoff@robots.ox.ac.uk)
-hoffman: Hoffman, Bill (bill.hoffman@kitware.com)
-ibanez: Ibanez, Luis (luis.ibanez@kitware.com)
-iscott: Scott, Ian (ian.m.scott@stud.man.ac.uk)
-king: King, Brad (brad.king@kitware.com)
-lorensen: Lorensen, Bill (lorensen@crd.ge.com)
-martink, lymbdemo: Martin, Ken (ken.martin@kitware.com)
-millerjv: Miller, Jim (millerjv@crd.ge.com)
-perera: Perera, Amitha (perera@cs.rpi.edu)
-starreveld: Starreveld, Yves (ystarrev@julian.uwo.ca)
-will, schroede: Schroeder, Will (will.schroeder@kitware.com)
diff --git a/Utilities/Doxygen/doc_makeall.sh.in b/Utilities/Doxygen/doc_makeall.sh.in
deleted file mode 100755
index fceafdd..0000000
--- a/Utilities/Doxygen/doc_makeall.sh.in
+++ /dev/null
@@ -1,248 +0,0 @@
-# -------------------------------------------------------------------------
-# Doxygen documentation batch
-# modified by S. Barre (Time-stamp: <2003-01-16 14:04:41 barre>
-# -------------------------------------------------------------------------
-
-# Path to several tools (_PROG to avoid the typical GZIP env var pb)
-# Example:
-# DOXYGEN_PROG=@DOXYGEN@ (INCLUDE(${CMAKE_ROOT}/Modules/FindDoxygen.cmake))
-# GZIP_PROG=@GZIP@ (INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake))
-# HHC_PROG=@HHC@ (INCLUDE(${CMAKE_ROOT}/Modules/FindHhc.cmake))
-# MV_PROG=@MV@ (INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake))
-# PERL_PROG=@PERL@ (INCLUDE(${CMAKE_ROOT}/Modules/FindPerl.cmake))
-# RM_PROG=@RM@ (INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake))
-# TAR_PROG=@TAR@ (INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake))
-# WGET_PROG=@WGET@ (INCLUDE(${CMAKE_ROOT}/Modules/FindWget.cmake))
-#
-export DOXYGEN_PROG="@DOXYGEN@" # Doxygen
-export GZIP_PROG="@GZIP@" # gzip (Unix-like 'gzip compressor')
-export GNUPLOT_PROG="@GNUPLOT@" # gnuplot (data plotting program)
-export HHC_PROG="@HTML_HELP_COMPILER@" # HTML Help Compiler
-export MV_PROG="@MV@" # mv (Unix-like 'move/rename files')
-export PERL_PROG="@PERL@" # Perl
-export RM_PROG="@RM@" # rm (Unix-like 'remove files')
-export TAR_PROG="@TAR@" # tar (Unix-like 'archiver')
-export WGET_PROG="@WGET@" # wget (remote file retrieval)
-
-# PROJECT_NAME:
-# Documentation/project name. Used in some of the resulting file names and
-# xrefs to uniquify two or more projects linked together through their
-# Doxygen's tag files. Mandatory for each documentation set.
-# Note: might be the same as the doxyfile's PROJECT_NAME
-# Example:
-# PROJECT_NAME=VTK
-#
-export PROJECT_NAME=CMake
-
-# PATH_TO_VTK_DOX_SCRIPTS:
-# Path to the directory holding the Perl scripts used to produce the VTK doc
-# in Doxygen format. You need the VTK source files or a local copy of
-# these scripts.
-# Example:
-# PATH_TO_VTK_DOX_SCRIPTS=@VTK_SOURCE_DIR@/Utilities/Doxygen
-#
-export PATH_TO_VTK_DOX_SCRIPTS="@VTK_SOURCE_DIR@/Utilities/Doxygen"
-
-# SOURCE_DIR:
-# Source directory. The top directory of the source files.
-# Example:
-# SOURCE_DIR=@VTK_SOURCE_DIR@
-#
-export SOURCE_DIR="@CMake_SOURCE_DIR@"
-
-# REL_PATH_TO_TOP:
-# Relative path from the top directory of the source files to the directory
-# (or top directory) holding the files to document. Useful if several parts
-# of the same source directory should be documented separately.
-# Example:
-# REL_PATH_TO_TOP=.
-# REL_PATH_TO_TOP=framework/src
-#
-# export REL_PATH_TO_TOP=Source
-export REL_PATH_TO_TOP=.
-
-# INTERMEDIATE_DOX_DIR:
-# Directory where the intermediate Doxygen files should be stored (mainly
-# these headers files converted from the VTK format to the Doxygen format).
-# This directory is erased at the end of this script, unless you comment
-# the corresponding line.
-# DOXTEMP might be used to simplify the syntax.
-# Example:
-# DOXTEMP=DOXTEMP=@VTK_BINARY_DIR@/Utilities/Doxygen
-# INTERMEDIATE_DOX_DIR=$DOXTEMP/dox
-#
-export DOXTEMP="@CMake_BINARY_DIR@/Utilities/Doxygen"
-export INTERMEDIATE_DOX_DIR="$DOXTEMP/dox"
-
-# DOXYFILE:
-# Path to the Doxygen configuration file (i.e. doxyfile).
-# Example:
-# DOXYFILE=$DOXTEMP/doxyfile
-#
-export DOXYFILE="$DOXTEMP/doxyfile"
-
-# OUTPUT_DIRECTORY ALLOW_ERASE_OUTPUT_DIRECTORY:
-# Path to the Doxygen output directory (where the resulting doc is stored).
-# Note: should be the same as your doxyfile's OUTPUT_DIRECTORY
-# If ON, allows the output directory to be erased when some advanced output
-# file have been produced (HTML Help, or TAR archive for example).
-# Example:
-# OUTPUT_DIRECTORY=$DOXTEMP/doc
-# ALLOW_ERASE_OUTPUT_DIRECTORY=ON
-#
-export OUTPUT_DIRECTORY="$DOXTEMP/doc"
-export ALLOW_ERASE_OUTPUT_DIRECTORY=ON
-
-# COMPILE_HTML_HELP RESULTING_HTML_HELP_FILE:
-# Compile the CHM (Compressed HTML) HTML Help file, name of the resulting
-# file. If set to ON and name is non-empty these options will actually
-# trigger the HTML-Help compiler to create the CHM. The resulting
-# file (usually index.chm) will be renamed to this name.
-# Note: if ON, the whole $OUTPUT_DIRECTORY will be erased at the end of
-# this script, since this file is considered to be one of the
-# advanced final output, unless ALLOW_ERASE_OUTPUT_DIRECTORY is OFF
-# Note: your doxyfile should be configured to enable HTML Help creation
-# (using GENERATE_HTML = YES, GENERATE_HTMLHELP = YES)
-# Example:
-# COMPILE_HTML_HELP=ON
-# COMPILE_HTML_HELP=@DOCUMENTATION_HTML_HELP@
-# RESULTING_HTML_HELP_FILE=$DOXTEMP/vtk4.chm
-#
-export COMPILE_HTML_HELP=@DOCUMENTATION_HTML_HELP@
-export RESULTING_HTML_HELP_FILE="$DOXTEMP/$PROJECT_NAME.chm"
-
-# CREATE_HTML_TARZ_ARCHIVE RESULTING_HTML_TARZ_ARCHIVE_FILE:
-# Create a compressed (gzip) tar archive of the html directory (located
-# under the OUTPUT_DIRECTORY), and name of the resulting archive file.
-# Note: your doxyfile should be configured to enable HTML creation
-# (using GENERATE_HTML = YES)
-# Example:
-# CREATE_HTML_TARZ_ARCHIVE=ON
-# CREATE_HTML_TARZ_ARCHIVE=@DOCUMENTATION_HTML_TARZ@
-# RESULTING_HTML_TARZ_ARCHIVE_FILE=$DOXTEMP/vtk4-html.tar.gz
-# RESULTING_HTML_TARZ_ARCHIVE_FILE=$DOXTEMP/$PROJECT_NAME-html.tar.gz
-#
-export CREATE_HTML_TARZ_ARCHIVE=@DOCUMENTATION_HTML_TARZ@
-export RESULTING_HTML_TARZ_ARCHIVE_FILE="$DOXTEMP/$PROJECT_NAME-html.tar.gz"
-
-# ----------------------------------------------------------------------------
-# Build the contributors list.
-
-if test "x@VTK_SOURCE_DIR@" != "x" ; then
- if test "x$PERL_PROG" != "xNOTFOUND" ; then
- "$PERL_PROG" "$PATH_TO_VTK_DOX_SCRIPTS/doc_contributors.pl" \
- --authors "$SOURCE_DIR/Utilities/Doxygen/authors.txt" \
- --cachedir "$DOXTEMP/cache" \
- --class_group '^(cm[A-Z0-9][A-Za-z0-9]+)\.(?:c|cpp|cxx|h|fl)$' \
- --files_in '(?:^hints|dummy|README|^Makefile\.borland|\.(?:c|cmake|cpp|cxx|h|html|in|java|fl|pl|py|tcl|txt))$' \
- --files_out '(?:^ChangeLog\.txt)$' \
- --gnuplot_file "$DOXTEMP/contrib/history.plt" \
- --history_img "|lines|$DOXTEMP/contrib/history.png" \
- --history_img "365|lines|$DOXTEMP/contrib/history2y.png" \
- --history_img "180|linespoints|$DOXTEMP/contrib/history6m.png" \
- --history_dir "$DOXTEMP/contrib" \
- --history_max_nb 10 \
- --lines_add 1.0 \
- --lines_rem 0.5 \
- --massive 50 \
- --max_class_nb 10 \
- --max_file_nb 5 \
- --min_class 0.02 \
- --min_file 0.01 \
- --min_contrib 0.05 \
- --min_gcontrib 0.0001 \
- --store "doc_""$PROJECT_NAME""_contributors.dox" \
- --relativeto "$SOURCE_DIR/$REL_PATH_TO_TOP" \
- --to "$INTERMEDIATE_DOX_DIR" \
- "$SOURCE_DIR/$REL_PATH_TO_TOP"
- fi
-
- if test "x$GNUPLOT_PROG" != "xNOTFOUND" ; then
- "$GNUPLOT_PROG" "$DOXTEMP/contrib/history.plt"
- fi
-fi
-
-# ----------------------------------------------------------------------------
-# Create the Doxygen doc.
-
-if test "x$DOXYGEN_PROG" != "xNOTFOUND" ; then
-
- if test "x$RM_PROG" != "xNOTFOUND" ; then
- "$RM_PROG" -fr "$OUTPUT_DIRECTORY"
- fi
-
- "$DOXYGEN_PROG" "$DOXYFILE"
-
- # yes, a second time, to get the contrib, I don't know why
- "$DOXYGEN_PROG" "$DOXYFILE"
-fi
-
-# ----------------------------------------------------------------------------
-# Clean the HTML pages to remove the path to the intermediate Doxygen dir.
-
-if test "x@VTK_SOURCE_DIR@" != "x" ; then
- if test "x$PERL_PROG" != "xNOTFOUND" ; then
- "$PERL_PROG" "$PATH_TO_VTK_DOX_SCRIPTS/doc_rmpath.pl" \
- --verbose \
- --to "$INTERMEDIATE_DOX_DIR" \
- --html "$OUTPUT_DIRECTORY/html"
- fi
-fi
-
-# ----------------------------------------------------------------------------
-# Create the CHM HTML HELP doc.
-
-if test "x$COMPILE_HTML_HELP" == "xON" ; then
- if test "x$RESULTING_HTML_HELP_FILE" != "x" ; then
- cd $OUTPUT_DIRECTORY/html
- if test "x$HHC_PROG" != "xNOTFOUND" ; then
- "$HHC_PROG" index.hhp
- if test "x$MV_PROG" != "xNOTFOUND" ; then
- "$MV_PROG" -f index.chm "$RESULTING_HTML_HELP_FILE"
- fi
- fi
- fi
-fi
-
-# ----------------------------------------------------------------------------
-# Create the compressed tar archive.
-
-if test "x$CREATE_HTML_TARZ_ARCHIVE" == "xON" ; then
- if test "x$RESULTING_HTML_TARZ_ARCHIVE_FILE" != "x" ; then
- cd "$OUTPUT_DIRECTORY"
- if test "x$TAR_PROG" != "xNOTFOUND" ; then
- if test "x$RM_PROG" != "xNOTFOUND" ; then
- "$RM_PROG" -f html.tar
- fi
- "$TAR_PROG" -cf html.tar html
- if test "x$GZIP_PROG" != "xNOTFOUND" ; then
- if test "x$RM_PROG" != "xNOTFOUND" ; then
- "$RM_PROG" -f html.tar.gz
- fi
- "$GZIP_PROG" html.tar
- "$MV_PROG" -f html.tar.gz "$RESULTING_HTML_TARZ_ARCHIVE_FILE"
- fi
- fi
- fi
-fi
-
-# ----------------------------------------------------------------------------
-# Clean-up.
-
-if test "x$RM_PROG" != "xNOTFOUND" ; then
- "$RM_PROG" -fr "$INTERMEDIATE_DOX_DIR"
-
- if test "x$DOWNLOAD_VTK_TAGFILE" == "xON" ; then
- if test "x$VTK_TAGFILE" != "x" ; then
- "$RM_PROG" -f "$VTK_TAGFILE_DEST_DIR/$VTK_TAGFILE"
- fi
- fi
-
- if test "x$COMPILE_HTML_HELP" == "xON" ; then
- if test "x$RESULTING_HTML_HELP_FILE" != "x" ; then
- if test "x$ALLOW_ERASE_OUTPUT_DIRECTORY" == "xON" ; then
- "$RM_PROG" -fr "$OUTPUT_DIRECTORY"
- fi
- fi
- fi
-fi
diff --git a/Utilities/Doxygen/doxyfile.in b/Utilities/Doxygen/doxyfile.in
index 2c131f5..7333340 100644
--- a/Utilities/Doxygen/doxyfile.in
+++ b/Utilities/Doxygen/doxyfile.in
@@ -1,28 +1,30 @@
# -------------------------------------------------------------------------
-# doxyfile for CMake
-# modified by S. Barre (Time-stamp: <2002-02-13 18:24:35 barre>
+# doxyfile for CMakeReference
# -------------------------------------------------------------------------
PROJECT_NAME = CMake
+PROJECT_BRIEF = "Cross-platform Make"
+PROJECT_NUMBER = "@CMake_VERSION@"
+PROJECT_LOGO = "@CMake_SOURCE_DIR@/Source/QtDialog/CMakeSetup64.png"
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = \
- "@CMake_SOURCE_DIR@/Source/" \
- "@CMake_BINARY_DIR@/Source/"
+ "@CMake_SOURCE_DIR@/" \
+ "@CMake_BINARY_DIR@/"
WARN_IF_UNDOCUMENTED = NO
GENERATE_TREEVIEW = NO
GENERATE_TODOLIST = YES
GENERATE_BUGLIST = YES
-GENERATE_HTML = YES
+GENERATE_HTML = @GENERATE_HTML@
GENERATE_HTMLHELP = YES
+GENERATE_QHP = @GENERATE_QHP@
GENERATE_LATEX = NO
GENERATE_MAN = NO
GENERATE_RTF = NO
-HAVE_DOT = YES
-#HAVE_DOT = NO
+HAVE_DOT = @HAVE_DOT@
DOT_PATH = "@DOT_PATH@"
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
@@ -37,20 +39,21 @@ REFERENCES_RELATION = YES
ALLEXTERNALS = NO
-IMAGE_PATH = "@CMake_BINARY_DIR@/Utilities/Doxygen/contrib"
-
-OUTPUT_DIRECTORY = "@CMake_BINARY_DIR@/Utilities/Doxygen/doc"
+OUTPUT_DIRECTORY = "@CMakeDeveloperReference_BINARY_DIR@/developer-reference"
INPUT = \
+ "@CMake_SOURCE_DIR@/Utilities/Doxygen/DeveloperReference" \
"@CMake_SOURCE_DIR@/Source" \
"@CMake_SOURCE_DIR@/Source/CPack" \
"@CMake_SOURCE_DIR@/Source/CPack/IFW" \
+ "@CMake_SOURCE_DIR@/Source/CPack/WiX" \
"@CMake_SOURCE_DIR@/Source/CTest" \
"@CMake_SOURCE_DIR@/Source/CursesDialog" \
- "@CMake_SOURCE_DIR@/Source/MFCDialog" \
+ "@CMake_SOURCE_DIR@/Source/kwsys" \
+ "@CMake_SOURCE_DIR@/Source/QtDialog" \
+ "@CMake_BINARY_DIR@/Source" \
"@CMake_BINARY_DIR@/Source/kwsys" \
- "@CMake_BINARY_DIR@/Source/cmsys" \
- "@CMake_BINARY_DIR@/Utilities/Doxygen/dox/doc_CMake_contributors.dox" \
+ "@CMake_BINARY_DIR@/Source/cmsys"
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
@@ -68,7 +71,7 @@ SORT_MEMBER_DOCS = NO
DISTRIBUTE_GROUP_DOC = YES
TAB_SIZE = 3
-FILE_PATTERNS = *.h *.hxx *.cxx
+FILE_PATTERNS = *.h *.hxx *.cxx *.dox
RECURSIVE = NO
EXCLUDE_PATTERNS =
@@ -82,3 +85,7 @@ MACRO_EXPANSION = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
EXPAND_ONLY_PREDEF = YES
+
+QHP_NAMESPACE = org.cmake.developer-reference.@CMake_VERSION_MAJOR@@CMake_VERSION_MINOR@@CMake_VERSION_PATCH@
+QCH_FILE = ../CMakeDeveloperReference-@CMake_VERSION_MAJOR@@CMake_VERSION_MINOR@@CMake_VERSION_PATCH@.qch
+QHG_LOCATION = "@QHELPGENERATOR_EXECUTABLE@"