Commit Graph

227 Commits

Author SHA1 Message Date
Brad King a5dd0c9d42 Add option to use a system-installed KWIML
Do not activate it with the general use-system-libs options for now
because KWIML is not commonly distributed or available.
2015-12-18 10:02:28 -05:00
Brad King 036b6ef7c4 Port CMake from cmIML to KWIML
KWIML no longer uses a configured prefix.
2015-12-18 10:02:07 -05:00
Brad King 3b0c074345 bootstrap: Drop unused KWSys header directories
KWSys no longer needs the cmsys/{ios,stl} directories so we no longer
populate them.  We no longer need to create them either.
2015-10-28 15:10:57 -04:00
Stephen Kelly 00f50b006c cmMakeDepend: Inline into header. 2015-10-21 00:39:51 +02:00
Stephen Kelly 488723f5cd cmMakefile: Store container of cmExportBuildFileGenerators.
Set a cmLocalGenerator on each instance at compute time.  That will
soon be needed to access cmGeneratorTarget instances.

If a cmExportBuildFileGenerator is processed early during configure time as a
result of CMP0024 it must be removed from the list to process later at generate
time.
2015-10-14 13:32:09 -04:00
Brad King 0faccb839a bootstrap: Drop unnecessary KWSys platform check
The KWSys Configure.hxx header no longer needs KWSYS_STAT_HAS_ST_MTIM.
Our bootstrap-built CMake does not need to handle nanosecond precision
file times anyway.
2015-10-08 13:27:07 -04:00
Terrell Russell 062473842f bootstrap: Fix spelling of "succeeded" 2015-10-06 10:27:00 -04:00
Brad King 89958fd06e bootstrap: Remove unused KWSys configuration
KWSys has removed support for kwsys_ios, kwsys_stl, and pre-c++98
template compatibility layers.  Drop the bootstrap script checks for
these and configuration of the compatibility headers we no longer use.
2015-09-02 10:31:13 -04:00
Brad King 4e3c7725d0 bootstrap: Do not build Ninja generator
The CMake bootstrap process uses Makefile generators so there is no
need to build the Ninja generators during bootstrap.
2015-08-10 13:26:52 -04:00
Brad King 001f9b3617 Add common base classes to Makefile and Ninja generators
Provide a place to move functionality common to both.
2015-07-09 09:50:05 -04:00
Stephen Kelly 6d7abb6326 cmOutputConverter: Extract from cmLocalGenerator.
The Convert methods never belonged to the local generator concept, so
split them out now.  The cmOutputConverter is cheap to construct and
destroy, so it can be instantiated where needed to perform
conversions.  This will allow further decoupling of cmLocalGenerator
from the configure step.

Inherit cmLocalGenerator from cmOutputConverter for the purpose of
source compatibility.
2015-06-06 09:15:55 +02:00
Brad King dd107b30d2 Add option to pass custom flags to sphinx-build (#15545)
Create a SPHINX_FLAGS cache entry that users can populate with
command-line flags for sphinx-build.  Add an option to the
bootstrap script to populate it up front.

Suggested-by: Felix Geyer <debfx@ubuntu.com>
2015-04-30 09:41:31 -04:00
Brad King 6064b9072c bootstrap: Fix SPHINX_{MAN,HTML,QTHELP} cache entry type
These cache entries should be generated with type BOOL, not FILEPATH.
2015-04-30 09:22:43 -04:00
Brad King 62c5e6f1a1 Merge topic 'introduce-cmState'
f081c5bd cmState: Move CacheEntryType enum from cmCacheManager.
f71fdf0e cmMakefile: Remove unused CacheManager accessor.
ff7169a0 Port to cmState.
a6b1ad13 Introduce cmState class.
2015-04-13 11:45:02 -04:00
Stephen Kelly a6b1ad1309 Introduce cmState class.
At this point, it is an interface to the cache.  It will be extended
to be a universal interface for access to and manipulation of
configuration-time data (defintions, properties on targets,
directories, source files etc).

This will allow porting all command implementations away
from the cmMakefile and cmTarget classes, and result in something
more-purely related to configuration-time processing of cmake
commands.  That should serve at least the following goals:

 * Split the CMake implementation more definitively into three
   stages: Configuration, computation and generation, and be able to
   implement each optimally for memory access patterns etc.
 * Make better IDE integration possible by making more configuration
   data available.
 * Make it possiblte to use a smaller library than CMakeLib.a in
   cpack and ctest, resulting in smaller executables.
 * Make it possible to run the configure step multiple times in
   the same CMake run (#14539).

Manage its lifetime in the cmake class, and add a convenience accessor
to cmMakefile.
2015-04-13 11:44:14 -04:00
Stephen Kelly 6deb43e6c8 Remove some files which do not need to be in BootstrapCommands. 2015-04-12 20:09:31 +02:00
Stephen Kelly 082b6a9d78 Genex: Split cmGeneratorExpressionContext into own file. 2015-03-11 00:12:56 +01:00
Stephen Kelly 9df1f0fce1 Genex: Split cmGeneratorExpressionNode into own file. 2015-03-11 00:12:56 +01:00
Brad King 1eb192905d Merge topic 'private-FindJsonCpp'
a41d621d bootstrap: Add --(no-)system-jsoncpp options
a5768442 FindJsonCpp: Drop new module due to upstream jsoncpp providing package
2015-02-23 10:26:30 -05:00
Brad King a41d621d30 bootstrap: Add --(no-)system-jsoncpp options
Provide bootstrap-time control for using a system JsonCpp library.
2015-02-20 08:28:03 -05:00
Brad King f3c0c61403 Merge topic 'bootstrap-sphinx-qthelp'
85fd62ee bootstrap: Add --sphinx-qthelp option to enable qthelp doc generation
2015-02-11 09:59:24 -05:00
Nuno Sucena Almeida 85fd62ee91 bootstrap: Add --sphinx-qthelp option to enable qthelp doc generation 2015-02-10 10:03:10 -05:00
Brad King 69ac6d2755 bootstrap: Enable color Makefile output
Build the needed infrastructure during bootstrap in order to allow
"cmake -E cmake_echo_color" to be used unconditionally during
generation.
2015-02-05 16:44:56 -05:00
Brad King b5a467262b Merge topic 'drop-ancient-workarounds'
0f7bdd61 Remove VS 6 special case.
5e92c826 Remove some obsolete stuff.
15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream.
931e055d Port all cmOStringStream to std::ostringstream.
f194a009 Remove unused cmIStringStream class.
3ec1bb15 cmStandardIncludes: Remove std namespace hack.
bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack.
28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler.
837a8a63 cmStandardIncludes: Drop Comeau-related workaround.
4030ddfd Remove Borland-related undef.
17d6a6fd cmStandardIncludes: Remove comment about Borland.
26fb5011 Drop SGI as a CMake host compiler.
2015-01-12 08:57:39 -05:00
Stephen Kelly 5e92c82655 Remove some obsolete stuff.
We don't need to run compiler tests for ansi-for etc anymore. All
supported compilers support the features tested here.
2015-01-11 17:06:04 +01:00
Stephen Kelly 15e42bb27c cmStandardIncludes: Remove obsolete cmOStringStream. 2015-01-11 17:06:04 +01:00
Stephen Kelly 4c69ec6f12 SolarisStudio: Use alternative standard library to build CMake.
SolarisStudio ships a very old RogueWave standard library
implementation (libCstd) and uses it by default for backward compatibility.
The macros defined when building the system libCstd need to be the same as
the macros defined when using it for binary compatibility reasons etc.  The
SolarisStudio compiler driver adds macros such as _RWSTD_NO_MEMBER_TEMPLATES and
_RWSTD_NO_CLASS_PARTIAL_SPEC etc. These macros disable certain APIs in the
standard library headers.

Although the compiler supports the features 'member templates' and 'partial
template specialization', the standard library does not provide APIs which
rely on those features.  This means that std::vector::insert in libCStd does
not accept a pair of iterators from a different type of container, because
that requires member templates, and reverse_iterator<const T> can not
be constructed from a reverse_iterator<T> because that requires partial
specialization (or at least the _RWSTD_NO_CLASS_PARTIAL_SPEC define) and
member templates.

This causes many problems while building CMake using SolarisStudio, which
have not been well understood until now.  The problems are usually
attributed to compiler limitations, while actually the problem is in
the standard library, as in commit v3.0.0-rc1~99^2~1 (Help: Document non-use
of std::set::insert., 2014-01-24) and commit 107dcac3 (Fix compilation with
the Oracle / Sun compiler (#15318), 2014-12-12).

SolarisStudio 12.3 and earlier also ships a version of stlport which may be
used instead of libCstd by specifying -library=stlport4

 https://docs.oracle.com/cd/E18659_01/html/821-1383/bkakg.html

SolarisStudio 12.4 ships a version of libstdc++ from GCC 4.8.2 which may be
used by specifying -std=c++03 or -std=c++11 etc

 http://docs.oracle.com/cd/E37069_01/html/E37075/bkamw.html#OSSCPgnaof

Use these more-capable standard library implementations when building cmake.
This will allow more use of 'normal' C++ (such as std::vector::insert), and cause
fewer surprises resulting from dashboards using SolarisStudio.

Because cmake is not a library linked against by 3rd parties and does not have
external dependencies, issues related to mixing code using libCStd and libstdc++
do not apply.
2015-01-11 17:00:55 +01:00
Brad King 44c6db6eb1 bootstrap: Fix syntax for Solaris 10 shell (#15317)
In commit v3.1.0-rc2~7^2 (Workaround for short jump tables on PA-RISC,
2014-11-04) we added use of shell syntax not supported on the Solaris
shell.  Avoid using the '!' operator.

Reported-by: Friedrich Haubensak <hsk@imb-jena.de>
2014-12-18 11:08:55 -05:00
Chuck Atkins 04f442f755 Workaround for short jump tables on PA-RISC.
The PA-RISC architecture requires special options for GCC to prevent
linker errors when libraries reach a certain size and / or complexity.
See http://mraw.org/blog/2007/10/10/Linking_on_hppa and gcc
documentation on -mlong-calls.
2014-11-10 10:26:30 -05:00
Brad King a87e8056ac Merge topic 'bootstrap-cmake-locations'
6650b0fa bootstrap: Fix "make test" and "make package" targets (#14989)
bc151757 bootstrap: Clarify name of configured source directory
2014-06-27 09:42:50 -04:00
Brad King 6650b0fa43 bootstrap: Fix "make test" and "make package" targets (#14989)
Since commit v3.0.0-rc1~374^2 (Refactor internal resource location APIs
and initialization, 2013-11-07) a bootstrap-built "cmake" tries to
reference "ctest" and "cpack" executables next to itself, which never
exist.  Teach cmSystemTools::FindCMakeResources, when bootstrap-built,
to refer to the "ctest" and "cpack" executables in the location where
they will be built after "make".
2014-06-25 13:37:46 -04:00
Brad King bc1517579d bootstrap: Clarify name of configured source directory
Rename CMAKE_ROOT_DIR to CMAKE_BOOTSTRAP_SOURCE_DIR to clarify both that
it is only for bootstrap and that it refers to the source directory.
2014-06-25 13:37:46 -04:00
Nils Gladitz 15a8af21e8 Add an "installed file" property scope
Teach set_property and get_property an "INSTALL" property type to be
associated with install-tree file paths.  Make the properties available
to CPack for use during packaging.  Add a "prop_inst" Sphinx domain
object type for documentation of such properties.
2014-05-28 12:28:18 -04:00
Rolf Eike Beer f347fd12f3 CompileFlags: Add -AA +hpxstd98 on HP-UX 11.11 with aCC
These flags are needed to enable support for C++98.  Also teach the
'bootstrap' script to add them if necessary.
2014-05-06 13:23:58 -04:00
Rolf Eike Beer be53734d3c CompileFlags: Add -AA +hpxstd98 on HP-UX 11.11 with aCC
These flags are needed to enable support for C++98.  Also teach the
'bootstrap' script to add them if necessary.
2014-04-04 13:31:28 -04:00
Clinton Stimpson 98383f802a Unicode: check encoding of files given to configure_file.
UTF-16 and UTF-32 files are rejected.
2014-03-17 14:01:55 -06:00
Brad King 7cbab17871 Change version scheme to use only two components for feature levels
Historically CMake used three version components for the feature level.
We released new features while incrementing only the third version
component.  Since commit v2.8.2~105^2~4 (New version scheme to support
branchy workflow, 2010-04-23) we used the fourth version component for
bug-fix releases and the development date:

 <major>.<minor>.<patch>[.<tweak>][-rc<n>] = Release
 <major>.<minor>.<patch>.<date>[-<id>]     = Development

This solidified use of three components for the feature level, and was
necessary to continue releasing 2.x versions because:

* Some existing projects performed floating-point comparisons of
  ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} to 2.x numbers
  so ``x`` could never be higher than 9.

* Version 2.9.<date> was used briefly in post-2.8.0 development in
  CVS prior to the transition to Git, so using it in releases may
  have caused confusion.

Now that we are moving to 3.x versions, these two restrictions go away.
Therefore we now change to use only two components for the feature
level and use the scheme:

 <major>.<minor>.<patch>[-rc<n>] = Release
 <major>.<minor>.<date>[-<id>]   = Development
2014-02-19 09:30:13 -05:00
Brad King 418a155be7 Merge topic 'cmake-devel-version-macro'
9bcc1b21 Export: Fix internal CMake version test logic
d2059d25 cmVersion: Fix CMake_VERSION_ENCODE for date in patch level
28805109 cmStandardIncludes: Include cmIML/INT.h for portable integer types
2014-02-11 09:16:09 -05:00
Brad King 28805109bc cmStandardIncludes: Include cmIML/INT.h for portable integer types
Also teach the bootstrap script to configure the needed headers.
2014-02-10 15:31:40 -05:00
Stephen Kelly 23d3d38a31 CMakeLists: Generate the cmCommands.cxx file.
Define the list of commands in the CMakeLists.txt file. List the
sources in the CMakeLib target, but mark them as HEADER_FILE_ONLY.
This has the effect that IDEs will show the files, though they
will not be built again.

Add a cmCommandsForBootstrap.cxx file for bootstrapping purposes.

Rename the cmExportLibraryDependencies file to match the common
pattern.
2014-02-09 22:02:37 +01:00
Rolf Eike Beer b22a0f15de bootstrap: improve ld flag for Linux/HPPA builds
Follow up commit ca63bb10 (bootstrap: try better workaround for builds
on Linux/HPPA, 2013-09-12) with an improved ld flag.

Suggested-by: Guy Martin
2014-01-15 10:06:07 -05:00
Brad King 2ba2c435f6 bootstrap: Add KWSys Encoding and FStream
Run the KWSYS_STL_HAS_WSTRING platform test and configure the result.
Configure the Encoding and FStream header files and build the sources.
On Windows, build EncodingC.c with KWSYS_ENCODING_DEFAULT_CODEPAGE=CP_ACP.
2013-11-25 12:46:09 -05:00
Brad King 993b685676 bootstrap: Parse Copyright.txt instead of duplicating notice
Use 'grep' to extract the copyright notice from Copyright.txt instead of
duplicating it in the bootstrap script.
2013-11-12 16:22:52 -05:00
Brad King 1093deebd0 Shorten CMake version used in install destinations
Since commit c9a5f34b (Cleanup use of CMake version in install
destinations, 2013-09-26) we use the full CMake version in default
install destinations.  For rapidly changing versions of the form

 <major>.<minor>.<patch>.<date>-g<commit>[-dirty]

used by developers this is too granular.  Instead use just

 <major>.<minor>.<patch>

as the version for default install destinations.  This will still
be granular enough for unique directories in releases.

On Cygwin continue to use the full ${CMake_VERSION} as was the case
prior to the above-mentioned commit.
2013-10-25 09:01:37 -04:00
Brad King 6384f1683a Merge topic 'remove-cmake-i-wizard'
a8226e9 cmake: Drop support for "-i" wizard mode
2013-10-22 09:07:14 -04:00
Brad King 765d783972 cmSystemTools: Drop old RunCommand method
All calls to this method have been replaced by newer infrastructure.
Remove it and the supporting cmWin32ProcessExecution class.
2013-10-19 07:25:43 -04:00
Brad King a8226e91d7 cmake: Drop support for "-i" wizard mode
Tell users to pass cache values with the -D option on the command line
or use cmake-gui or ccmake.
2013-10-18 13:32:39 -04:00
Brad King bfe07aa97e Build Help documentation during CMake build using Sphinx
Add a Utilities/Sphinx directory to hold CMake build code to run the
Sphinx (sphinx-doc.org) documentation generation tool.  Create a
CMakeLists.txt file there capable of building either as a subdirectory
of the main CMake build, or as a standalone documentation build.

Add cache options SPHINX_MAN and SPHINX_HTML to select output formats
and SPHINX_EXECUTABLE to specify the sphinx-build executable.  Add
bootstrap options --sphix-man and --sphinx-html to select output formats
and --sphinx-build=<sb> to specify the sphinx-build executable.

Create a "conf.py.in" file to configure_file into "conf.py" to tell
sphinx-build how to build our documents.  Create a "cmake.py" Sphinx
extension module defining:

* The "cmake-module" directive used in Help/module/*.rst files to
  scan .rst markup from the corresponding Modules/*.cmake file.

* A Sphinx domain called "cmake" defining documentation object types
  for CMake Help/<type> directories: command, generator, manual,
  module, policy, prop_*, and variable.  Add a "role" for each type
  to perform cross-references.  Teach the roles to treat "<XYZ>"
  as placeholders instead of explicit targets if not preceded by
  a space.  Add cmake domain directives to define command and
  variable objects explicitly in .rst file content.  This will
  allow modules to define their own commands and variables and
  have them indexed and linkable.

* A Sphinx document transform that converts Help/<type>/*.rst documents
  into cmake domain objects of the corresponding <type> and adds index
  entries for them.  This will automatically index all CMake documentation
  objects and provide cross-reference targets for them with no special
  markup in the .rst files.
2013-10-16 09:22:37 -04:00
Brad King 399e9c46d8 Drop builtin property documentation
Drop all DefineProperty calls for non-chained properties.  Drop the
documentation from the chained ones.  The documentation for all
properties is now in Help/prop_*/*.rst files.
2013-10-16 09:22:36 -04:00
Brad King 80a3273b5e Drop all documentation formatters except Usage
We now need only the Usage formatter to support command-line options
that print basic usage, and the supporting indented=>preformatted markup
processor to support CMake message formatting.  Drop all other
documentation formatters and move the remaining code up into the top
cmDocumentationFormatter class.
2013-10-16 09:22:35 -04:00