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--Modules/FindCUDA.cmake32
-rw-r--r--Modules/FindCUDA/run_nvcc.cmake17
-rw-r--r--Source/CMakeLists.txt9
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.h2
-rw-r--r--Source/QtDialog/CMakeSetup64.pngbin0 -> 7213 bytes
-rw-r--r--Source/QtIFW/CMake.DeveloperReference.HTML.qs.in21
-rw-r--r--Source/cmCacheManager.h1
-rw-r--r--Source/cmGhsMultiTargetGenerator.h4
-rw-r--r--Source/cmState.cxx9
-rw-r--r--Source/cmState.h14
-rw-r--r--Source/cmSystemTools.h5
-rw-r--r--Source/cmTarget.cxx12
-rw-r--r--Source/cmTarget.h21
-rw-r--r--Source/cmTest.cxx6
-rw-r--r--Source/cmTest.h7
-rw-r--r--Source/cmTestGenerator.cxx8
-rw-r--r--Source/cmTestGenerator.h8
-rw-r--r--Source/cmUuid.cxx4
-rw-r--r--Source/cmUuid.h5
-rw-r--r--Source/cmVariableWatch.cxx2
-rw-r--r--Source/cmVariableWatch.h6
-rw-r--r--Source/cmVersion.cxx2
-rw-r--r--Source/cmVersion.h2
-rw-r--r--Source/cmXMLParser.cxx6
-rw-r--r--Source/cmXMLParser.h4
-rw-r--r--Source/cmXMLSafe.cxx2
-rw-r--r--Source/cmXMLSafe.h2
-rw-r--r--Source/cmXMLWriter.cxx2
-rw-r--r--Source/cmXMLWriter.h2
-rw-r--r--Source/cmake.cxx81
-rw-r--r--Source/cmake.h4
-rw-r--r--Source/cmcldeps.cxx1
-rw-r--r--Source/cmcmd.cxx12
-rw-r--r--Source/dir.dox7
-rw-r--r--Source/dir.dox.in7
-rw-r--r--Tests/CMakeLib/run_compile_commands.cxx8
-rw-r--r--Tests/CMakeLib/testSystemTools.cxx3
-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
52 files changed, 473 insertions, 359 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/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 78b716d..317a9cd 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -730,7 +730,7 @@ else()
endif()
# Set the user list of include dir to nothing to initialize it.
-set (CUDA_NVCC_INCLUDE_ARGS_USER "")
+set (CUDA_NVCC_INCLUDE_DIRS_USER "")
set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext )
@@ -1025,7 +1025,7 @@ find_package_handle_standard_args(CUDA
# Add include directories to pass to the nvcc command.
macro(CUDA_INCLUDE_DIRECTORIES)
foreach(dir ${ARGN})
- list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER -I${dir})
+ list(APPEND CUDA_NVCC_INCLUDE_DIRS_USER ${dir})
endforeach()
endmacro()
@@ -1249,17 +1249,15 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
endif()
# Initialize our list of includes with the user ones followed by the CUDA system ones.
- set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}")
- # Get the include directories for this directory and use them for our nvcc command.
- # Remove duplicate entries which may be present since include_directories
- # in CMake >= 2.8.8 does not remove them.
- get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
- list(REMOVE_DUPLICATES CUDA_NVCC_INCLUDE_DIRECTORIES)
- if(CUDA_NVCC_INCLUDE_DIRECTORIES)
- foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES})
- list(APPEND CUDA_NVCC_INCLUDE_ARGS -I${dir})
- endforeach()
- endif()
+ set(CUDA_NVCC_INCLUDE_DIRS ${CUDA_NVCC_INCLUDE_DIRS_USER} "${CUDA_INCLUDE_DIRS}")
+ # Append the include directories for this target via generator expression, which is
+ # expanded by the FILE(GENERATE) call below. This generator expression captures all
+ # include dirs set by the user, whether via directory properties or target properties
+ list(APPEND CUDA_NVCC_INCLUDE_DIRS "$<TARGET_PROPERTY:${cuda_target},INCLUDE_DIRECTORIES>")
+
+ # Do the same thing with compile definitions
+ set(CUDA_NVCC_COMPILE_DEFINITIONS "$<TARGET_PROPERTY:${cuda_target},COMPILE_DEFINITIONS>")
+
# Reset these variables
set(CUDA_WRAP_OPTION_NVCC_FLAGS)
@@ -1349,14 +1347,6 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
string(REGEX REPLACE "[-]+std=c\\+\\+11" "" _cuda_host_flags "${_cuda_host_flags}")
endif()
- # Get the list of definitions from the directory property
- get_directory_property(CUDA_NVCC_DEFINITIONS COMPILE_DEFINITIONS)
- if(CUDA_NVCC_DEFINITIONS)
- foreach(_definition ${CUDA_NVCC_DEFINITIONS})
- list(APPEND nvcc_flags "-D${_definition}")
- endforeach()
- endif()
-
if(_cuda_build_shared_libs)
list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS")
endif()
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index ff1f515..28cc1e9 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -73,10 +73,25 @@ set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@") # path
set(CUDA_NVCC_FLAGS @CUDA_NVCC_FLAGS@ ;; @CUDA_WRAP_OPTION_NVCC_FLAGS@) # list
@CUDA_NVCC_FLAGS_CONFIG@
set(nvcc_flags @nvcc_flags@) # list
-set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@") # list (needs to be in quotes to handle spaces properly).
+set(CUDA_NVCC_INCLUDE_DIRS "@CUDA_NVCC_INCLUDE_DIRS@") # list (needs to be in quotes to handle spaces properly).
+set(CUDA_NVCC_COMPILE_DEFINITIONS "@CUDA_NVCC_COMPILE_DEFINITIONS@") # list (needs to be in quotes to handle spaces properly).
set(format_flag "@format_flag@") # string
set(cuda_language_flag @cuda_language_flag@) # list
+# Clean up list of include directories and add -I flags
+list(REMOVE_DUPLICATES CUDA_NVCC_INCLUDE_DIRS)
+set(CUDA_NVCC_INCLUDE_ARGS)
+foreach(dir ${CUDA_NVCC_INCLUDE_DIRS})
+ # Extra quotes are added around each flag to help nvcc parse out flags with spaces.
+ list(APPEND CUDA_NVCC_INCLUDE_ARGS "-I${dir}")
+endforeach()
+
+# Clean up list of compile definitions, add -D flags, and append to nvcc_flags
+list(REMOVE_DUPLICATES CUDA_NVCC_COMPILE_DEFINITIONS)
+foreach(def ${CUDA_NVCC_COMPILE_DEFINITIONS})
+ list(APPEND nvcc_flags "-D${def}")
+endforeach()
+
if(build_cubin AND NOT generated_cubin_file)
message(FATAL_ERROR "You must specify generated_cubin_file on the command line")
endif()
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/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h
index 8ed3902..c9c8238 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.h
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h
@@ -14,6 +14,8 @@
#include "cmCursesLabelWidget.h"
+class cmake;
+
class cmCursesCacheEntryComposite
{
public:
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/cmCacheManager.h b/Source/cmCacheManager.h
index 2331867..14e0f0a 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -17,6 +17,7 @@
#include "cmPropertyMap.h"
#include "cmState.h"
+class cmake;
class cmMarkAsAdvancedCommand;
/** \class cmCacheManager
diff --git a/Source/cmGhsMultiTargetGenerator.h b/Source/cmGhsMultiTargetGenerator.h
index 92a1109..118cae6 100644
--- a/Source/cmGhsMultiTargetGenerator.h
+++ b/Source/cmGhsMultiTargetGenerator.h
@@ -16,13 +16,13 @@
#include "cmTarget.h"
+class cmCustomCommand;
class cmGeneratedFileStream;
+class cmGeneratorTarget;
class cmGlobalGhsMultiGenerator;
class cmLocalGhsMultiGenerator;
class cmMakefile;
class cmSourceFile;
-class cmGeneratedFileStream;
-class cmCustomCommand;
class cmGhsMultiTargetGenerator
{
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 0470508..d4eb90a 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -15,10 +15,19 @@
#include "cmCacheManager.h"
#include "cmCommand.h"
#include "cmDefinitions.h"
+#include "cmListFileCache.h"
+#include "cmSystemTools.h"
+#include "cmTypeMacro.h"
#include "cmVersion.h"
#include "cmake.h"
+#include <algorithm>
#include <assert.h>
+#include <cmsys/RegularExpression.hxx>
+#include <iterator>
+#include <stdio.h>
+#include <string.h>
+#include <utility>
struct cmState::SnapshotDataType
{
diff --git a/Source/cmState.h b/Source/cmState.h
index e5f9917..9ab4213 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -12,19 +12,25 @@
#ifndef cmState_h
#define cmState_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
#include "cmAlgorithms.h"
+#include "cmDefinitions.h"
#include "cmLinkedTree.h"
#include "cmPolicies.h"
+#include "cmProperty.h"
#include "cmPropertyDefinitionMap.h"
#include "cmPropertyMap.h"
-class cmake;
+#include <map>
+#include <set>
+#include <string>
+#include <vector>
+
+class cmCacheManager;
class cmCommand;
-class cmDefinitions;
class cmListFileBacktrace;
-class cmCacheManager;
+class cmPropertyDefinition;
class cmState
{
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index d0a28e1..3c1a9f4 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -12,10 +12,13 @@
#ifndef cmSystemTools_h
#define cmSystemTools_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
#include <cmsys/Process.h>
#include <cmsys/SystemTools.hxx>
+#include <stddef.h>
+#include <string>
+#include <vector>
class cmSystemToolsFileTime;
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 8476538..5681885 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -12,21 +12,25 @@
#include "cmTarget.h"
#include "cmAlgorithms.h"
-#include "cmComputeLinkInformation.h"
#include "cmGeneratorExpression.h"
-#include "cmGeneratorExpressionDAGChecker.h"
+#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmListFileCache.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
+#include "cmProperty.h"
#include "cmSourceFile.h"
+#include "cmSourceFileLocation.h"
+#include "cmSystemTools.h"
#include "cmake.h"
+
+#include <algorithm>
#include <assert.h>
#include <cmsys/RegularExpression.hxx>
-#include <errno.h>
#include <map>
#include <set>
-#include <stdlib.h> // required for atof
+#include <sstream>
+#include <string.h>
#if defined(CMake_HAVE_CXX_UNORDERED_SET)
#include <unordered_set>
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 209a729..fc30166 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -12,14 +12,23 @@
#ifndef cmTarget_h
#define cmTarget_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+#include "cmAlgorithms.h"
#include "cmCustomCommand.h"
#include "cmListFileCache.h"
#include "cmPolicies.h"
#include "cmPropertyMap.h"
+#include "cmState.h"
+#include "cmTargetLinkLibraryType.h"
+
+#include <iosfwd>
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
-#include <cm_auto_ptr.hxx>
#if defined(CMAKE_BUILD_WITH_CMAKE)
#ifdef CMake_HAVE_CXX_UNORDERED_MAP
#include <unordered_map>
@@ -28,16 +37,10 @@
#endif
#endif
-class cmake;
class cmMakefile;
class cmSourceFile;
-class cmGlobalGenerator;
-class cmListFileBacktrace;
-class cmTarget;
-class cmGeneratorTarget;
-class cmTargetTraceDependencies;
-
class cmTargetInternals;
+
class cmTargetInternalPointer
{
public:
diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx
index 0658e95..790a3f8 100644
--- a/Source/cmTest.cxx
+++ b/Source/cmTest.cxx
@@ -11,10 +11,10 @@
============================================================================*/
#include "cmTest.h"
-#include "cmSystemTools.h"
-
#include "cmMakefile.h"
-#include "cmake.h"
+#include "cmProperty.h"
+#include "cmState.h"
+#include "cmSystemTools.h"
cmTest::cmTest(cmMakefile* mf)
: Backtrace(mf->GetBacktrace())
diff --git a/Source/cmTest.h b/Source/cmTest.h
index db68008..ce3867c 100644
--- a/Source/cmTest.h
+++ b/Source/cmTest.h
@@ -12,11 +12,14 @@
#ifndef cmTest_h
#define cmTest_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
-#include "cmCustomCommand.h"
#include "cmListFileCache.h"
#include "cmPropertyMap.h"
+
+#include <string>
+#include <vector>
+
class cmMakefile;
/** \class cmTest
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx
index 462edf9..cfc174e 100644
--- a/Source/cmTestGenerator.cxx
+++ b/Source/cmTestGenerator.cxx
@@ -12,11 +12,19 @@
#include "cmTestGenerator.h"
#include "cmGeneratorExpression.h"
+#include "cmGeneratorTarget.h"
#include "cmLocalGenerator.h"
#include "cmOutputConverter.h"
+#include "cmProperty.h"
+#include "cmPropertyMap.h"
+#include "cmState.h"
#include "cmSystemTools.h"
#include "cmTest.h"
+#include <map>
+#include <ostream>
+#include <utility>
+
cmTestGenerator::cmTestGenerator(
cmTest* test, std::vector<std::string> const& configurations)
: cmScriptGenerator("CTEST_CONFIGURATION_TYPE", configurations)
diff --git a/Source/cmTestGenerator.h b/Source/cmTestGenerator.h
index 66d590e..44574e7 100644
--- a/Source/cmTestGenerator.h
+++ b/Source/cmTestGenerator.h
@@ -12,10 +12,16 @@
#ifndef cmTestGenerator_h
#define cmTestGenerator_h
+#include <cmConfigure.h> // IWYU pragma: keep
+
#include "cmScriptGenerator.h"
-class cmTest;
+#include <iosfwd>
+#include <string>
+#include <vector>
+
class cmLocalGenerator;
+class cmTest;
/** \class cmTestGenerator
* \brief Support class for generating install scripts.
diff --git a/Source/cmUuid.cxx b/Source/cmUuid.cxx
index 6d09bdf..7bfc109 100644
--- a/Source/cmUuid.cxx
+++ b/Source/cmUuid.cxx
@@ -11,10 +11,10 @@
============================================================================*/
#include "cmUuid.h"
-#include <string.h>
-
#include "cm_sha2.h"
+
#include <cmsys/MD5.h>
+#include <string.h>
cmUuid::cmUuid()
{
diff --git a/Source/cmUuid.h b/Source/cmUuid.h
index 2bd7ec5..f01230c 100644
--- a/Source/cmUuid.h
+++ b/Source/cmUuid.h
@@ -12,7 +12,10 @@
#ifndef cmUuid_h
#define cmUuid_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
+#include <vector>
/** \class cmUuid
* \brief Utility class to generate UUIDs as defined by RFC4122
diff --git a/Source/cmVariableWatch.cxx b/Source/cmVariableWatch.cxx
index 56e2770..ce700db 100644
--- a/Source/cmVariableWatch.cxx
+++ b/Source/cmVariableWatch.cxx
@@ -13,7 +13,9 @@
#include "cmAlgorithms.h"
+#include <algorithm>
#include <cm_auto_ptr.hxx>
+#include <utility>
static const char* const cmVariableWatchAccessStrings[] = {
"READ_ACCESS", "UNKNOWN_READ_ACCESS", "UNKNOWN_DEFINED_ACCESS",
diff --git a/Source/cmVariableWatch.h b/Source/cmVariableWatch.h
index 5ddb907..88b3d1c 100644
--- a/Source/cmVariableWatch.h
+++ b/Source/cmVariableWatch.h
@@ -12,7 +12,11 @@
#ifndef cmVariableWatch_h
#define cmVariableWatch_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <map>
+#include <string>
+#include <vector>
class cmMakefile;
diff --git a/Source/cmVersion.cxx b/Source/cmVersion.cxx
index 4c2e4ce..88cae0b 100644
--- a/Source/cmVersion.cxx
+++ b/Source/cmVersion.cxx
@@ -11,7 +11,7 @@
============================================================================*/
#include "cmVersion.h"
-#include "cmVersionMacros.h"
+#include "cmVersionConfig.h"
unsigned int cmVersion::GetMajorVersion()
{
diff --git a/Source/cmVersion.h b/Source/cmVersion.h
index 46fd5a6..20e4c8c 100644
--- a/Source/cmVersion.h
+++ b/Source/cmVersion.h
@@ -12,7 +12,7 @@
#ifndef cmVersion_h
#define cmVersion_h
-#include "cmStandardIncludes.h"
+#include <cm_kwiml.h>
/** \class cmVersion
* \brief Helper class for providing CMake and CTest version information.
diff --git a/Source/cmXMLParser.cxx b/Source/cmXMLParser.cxx
index 85d47b6..7c53a3d 100644
--- a/Source/cmXMLParser.cxx
+++ b/Source/cmXMLParser.cxx
@@ -11,10 +11,12 @@
============================================================================*/
#include "cmXMLParser.h"
-#include <cmsys/FStream.hxx>
-
#include <cm_expat.h>
+#include <cmsys/FStream.hxx>
#include <ctype.h>
+#include <iostream>
+#include <sstream>
+#include <string.h>
cmXMLParser::cmXMLParser()
{
diff --git a/Source/cmXMLParser.h b/Source/cmXMLParser.h
index 6aae81d..319b295 100644
--- a/Source/cmXMLParser.h
+++ b/Source/cmXMLParser.h
@@ -12,7 +12,9 @@
#ifndef cmXMLParser_h
#define cmXMLParser_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
+
+#include <string>
extern "C" {
void cmXMLParserStartElement(void*, const char*, const char**);
diff --git a/Source/cmXMLSafe.cxx b/Source/cmXMLSafe.cxx
index f899f57..8575181 100644
--- a/Source/cmXMLSafe.cxx
+++ b/Source/cmXMLSafe.cxx
@@ -13,9 +13,7 @@
#include "cm_utf8.h"
-#include <iostream>
#include <sstream>
-
#include <stdio.h>
#include <string.h>
diff --git a/Source/cmXMLSafe.h b/Source/cmXMLSafe.h
index 11ced13..a187437 100644
--- a/Source/cmXMLSafe.h
+++ b/Source/cmXMLSafe.h
@@ -12,7 +12,7 @@
#ifndef cmXMLSafe_h
#define cmXMLSafe_h
-#include <cmsys/Configure.hxx>
+#include <cmConfigure.h> // IWYU pragma: keep
#include <iosfwd>
#include <string>
diff --git a/Source/cmXMLWriter.cxx b/Source/cmXMLWriter.cxx
index e2dce93d..eda5bef 100644
--- a/Source/cmXMLWriter.cxx
+++ b/Source/cmXMLWriter.cxx
@@ -11,8 +11,6 @@
============================================================================*/
#include "cmXMLWriter.h"
-#include "cmXMLSafe.h"
-
#include <cassert>
#include <cmsys/FStream.hxx>
diff --git a/Source/cmXMLWriter.h b/Source/cmXMLWriter.h
index 8a88dd4..c303963 100644
--- a/Source/cmXMLWriter.h
+++ b/Source/cmXMLWriter.h
@@ -12,7 +12,7 @@
#ifndef cmXMLWiter_h
#define cmXMLWiter_h
-#include "cmStandardIncludes.h"
+#include <cmConfigure.h> // IWYU pragma: keep
#include "cmXMLSafe.h"
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 08f0a6e..9e338e8 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);
@@ -202,6 +218,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();
@@ -812,7 +890,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/cmcldeps.cxx b/Source/cmcldeps.cxx
index 44f71f1..167d60a 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -21,6 +21,7 @@
#include <cmSystemTools.h>
#include <cmsys/Encoding.hxx>
+#include <algorithm>
#include <sstream>
#include <windows.h>
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/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx
index b811c7f..502ffe7 100644
--- a/Tests/CMakeLib/run_compile_commands.cxx
+++ b/Tests/CMakeLib/run_compile_commands.cxx
@@ -1,5 +1,13 @@
#include "cmSystemTools.h"
+#include <fstream>
+#include <iostream>
+#include <map>
+#include <stdlib.h>
+#include <string>
+#include <utility>
+#include <vector>
+
class CompileCommandParser
{
public:
diff --git a/Tests/CMakeLib/testSystemTools.cxx b/Tests/CMakeLib/testSystemTools.cxx
index fe958bd..8e8d4c4 100644
--- a/Tests/CMakeLib/testSystemTools.cxx
+++ b/Tests/CMakeLib/testSystemTools.cxx
@@ -11,6 +11,9 @@
============================================================================*/
#include "cmSystemTools.h"
+#include <iostream>
+#include <string>
+
#define cmPassed(m) std::cout << "Passed: " << m << "\n"
#define cmFailed(m) \
std::cout << "FAILED: " << m << "\n"; \
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@"