Commit Graph

263 Commits

Author SHA1 Message Date
Daniel Pfeifer
6181a9e00e bootstrap: prefer to use standard flags for C and CXX 2017-05-31 13:06:00 -04:00
Daniel Pfeifer
4edcc3750d bootstrap: prefer Clang over GNU on Darwin 2017-05-22 22:56:55 +02:00
Brad King
67d5593efa Merge topic 'mingw-w64-compile'
9557b403 cmFileCommand: Fix build on mingw-w64
845f5e3c bootstrap: fix build on mingw-w64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !837
2017-05-16 09:52:42 -04:00
Aleksey Chernov
845f5e3c51 bootstrap: fix build on mingw-w64
Define the default code page for EncodingCXX too.
2017-05-15 11:13:07 -04:00
Brad King
836cb52e9a Merge topic 'command-name'
a1218f59 cmCommand: remove unused methods from interface and all implementations
4ba25a82 cmState: separate builtin and scripted commands
a44dab46 cmState: introduce method for adding scripted commands
c734c850 CTest: use new methods for builtin commands
bd14e464 cmCommands: use new methods for builtin commands
58708405 cmState: introduce methods for adding builtin commands
a890ca2f cmakemain: use script role for -P

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !829
2017-05-12 09:13:51 -04:00
Daniel Pfeifer
e1e8f27ff2 bootstrap: fix Bad substitution 2017-05-11 21:53:14 +02:00
Daniel Pfeifer
587084052b cmState: introduce methods for adding builtin commands 2017-05-11 19:49:06 +02:00
Daniel Pfeifer
0c519c7029 bootstrap: Remove leftovers from cmBootstrapCommands 2017-05-09 23:45:29 +02:00
Daniel Pfeifer
9bad0dfcce LexerParser: move to custom directory 2017-04-28 23:10:39 +02:00
Daniel Pfeifer
5d1671324b cmConfigure: provide macros CM_EQ_DELETE and CM_DISABLE_COPY 2017-04-22 10:09:41 +02:00
Ben Boeckel
047a5e4d66 cmWorkingDirectory: add class for changing the workdir 2017-03-06 10:38:20 -05:00
Daniel Pfeifer
67303794f0 Combine all unexpected commands to a single class 2016-11-29 13:53:29 -05:00
Dāvis Mosāns
96103972ea Add cmProcessOutput class to be used for decoding text data
This allows to decode text data we receive from external process which
uses external encoding to our internal encoding.
2016-11-14 21:21:20 +02:00
Brad King
cd8a57ae9b Add option to build CMake against a system librhash
Create a CMAKE_USE_SYSTEM_LIBRHASH option.
2016-11-10 08:29:38 -05:00
Daniel Pfeifer
6c9b3b5c03 cmCommand: implement functions in cxx file 2016-10-21 18:14:51 +02:00
Daniel Pfeifer
8483dab8e1 bootstrap: Sort source files lexicographically 2016-10-21 18:14:51 +02:00
Daniel Pfeifer
4fb70919a5 Create all commands from a single function 2016-10-21 18:14:51 +02:00
Daniel Pfeifer
608afd4f62 Separate compilation for commands included in cmBootstrapCommands2 2016-10-21 18:14:51 +02:00
Daniel Pfeifer
64f9c282f3 Separate compilation for commands included in cmBootstrapCommands1 2016-10-21 18:14:51 +02:00
Stephen Kelly
e0a84904eb cmState: Split auxiliary classes into separate files
Port dependents to the new locations as needed.

Leave behind a cmState.h include in cmListFileCache to reduce noise. It
is removed in a following commit.
2016-10-19 15:40:59 +02:00
Brad King
188c762f8a Merge topic 'extract-computed-target-properties'
cef59bb8 cmTarget: Implement GetProperty in terms of cmState::Snapshot
0d57b07a cmTarget: Group code for checking written properties together
c3fb0d95 cmTarget: Move sanity checks and computed property access to callers
fa9dbc56 cmGeneratorTarget: Implement cmTargetPropertyComputer interface
848ae2a6 cmTargetPropertyComputer: Template some methods on the Target
a0a720e6 cm{,Generator}Target: Add global generator accessors
637e3f3e cmTargetPropertyComputer: Unify whitelist handling from cmTarget
05251e6d cmTargetPropertyComputer: Move whitelist check from cmTarget
fbf1721c cmTargetPropertyComputer: Extract into new files
390a7d86 cmTargetPropertyComputer: Implement GetProperty without cmMakefile
e32a6bdd cmListFileBacktrace: Add a method to retrieve the Bottom of a snapshot
7863fba1 cmTarget: Extract GetLocation method
8096682e cmTarget: Extract GetSources method
7d57c1a2 cmTarget: Extract location computation methods
a55cac4b cmTarget: Split property computation into separate class
705fcf52 cmTarget: Move IMPORTED check to callers
...
2016-10-17 10:15:21 -04:00
Stephen Kelly
bdddd4234e cmRulePlaceholderExpander: Extract from cmLocalGenerator
Implement cmLocalGenerator::ExpandRuleVariables in terms of the new
class for source compatibility and to reduce diff noise in this commit.
2016-10-15 11:25:12 +02:00
Stephen Kelly
fbf1721c94 cmTargetPropertyComputer: Extract into new files 2016-10-15 11:14:21 +02:00
Stephen Kelly
5b361fdda0 cmLinkLineComputer: Extract from cmLocalGenerator
CMake has several classes which have too many responsibilities.
cmLocalGenerator is one of them.  Start to extract the link line
computation.  Create generator-specific implementations of the interface
to account for generator-specific behavior.

Unfortunately MSVC60 has different behavior to everything else and CMake
still generates makefiles for it.  Isolate it with MSVC60-specific
names.
2016-10-10 20:38:53 +02:00
Brad King
ec0bf63823 bootstrap: Add options to enable/disable server mode explicitly 2016-09-29 13:55:15 -04:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Stephen Kelly
421012a330 cmMessenger: Extract from cmake class
This way messages can be issued independent of the cmake instance.

It is now possible to make DisplayMessage a virtual interface and
override it to handle messages in the cmake-gui or future IDE
interaction interfaces.
2016-08-25 09:47:27 -04:00
Brad King
7ec32a00d7 bootstrap: Add support for MSYS2
Bootstrapping under MSYS2 is the same as under MSYS/MinGW except that
`uname` reports `MSYS...` instead of `MINGW...`.
2016-07-20 09:17:08 -04:00
Dāvis Mosāns
e9849d35aa bootstrap: Add check for ext/stdio_filebuf.h needed by KWSys 2016-07-20 09:09:10 -04:00
Brad King
b5ec5b0901 Avoid using KWSys auto_ptr by adopting it ourselves
Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to
our own implementation adopted from the KWSys auto_ptr implementation.
Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers
that do not warn about it.

Automate the client site conversions:

    git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \
      's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
2016-06-29 09:47:58 -04:00
Daniel Pfeifer
b4b73f56a2 cxx features: add check for nullptr 2016-06-27 23:24:39 +02:00
Daniel Pfeifer
5286110d6f cxx features: add check for override 2016-06-27 10:37:41 -04:00
Nicolas BUNEL
18bfbc972f Add option to control 'bin' directory of CMake's own installation (#16076)
Add a `CMAKE_BIN_DIR` cache entry to CMake's own build configuration.
Add a `--bindir` option to the `bootstrap` script to set it.
2016-06-01 11:12:36 -04:00
Brad King
7a37afa7e7 bootstrap: Add option to build with system liblzma (#15916) 2016-01-13 14:28:02 -05:00
Brad King
64dd52422b Merge topic 'install-xdgdata-dir'
76566621 QtDialog: Add option to control XDG file install destination
2016-01-07 13:28:21 -05:00
Niels Ole Salscheider
7656662148 QtDialog: Add option to control XDG file install destination
Create a `CMAKE_XDGDATA_DIR` option and add a corresponding flag to the
`bootstrap` script.  This is needed for multiarch layouts where the
prefix is `/usr/${host}` but where architecture-independent files (like
the XDG-specific ones) are installed to `/usr/share`.
2015-12-21 10:23:48 -05:00
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