Commit Graph

584 Commits

Author SHA1 Message Date
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
Daniel Pfeifer f6413400a0 Add cmXMLWriter class to consolidate XML generation
Explicitly track XML generation state (indentation, element closure,
etc.) so that clients can avoid manually/implicitly maintaining it.
2015-05-26 11:09:20 -04:00
Brad King deec97d8ec Revert "Qbs: Add new 'extra' generator for qbs project files"
This reverts commit f85db2f323.

Discussion by the QtCreator community at

  https://bugreports.qt.io/browse/QTCREATORBUG-13695

raises concerns about this particular approach to working with CMake
projects using QtCreator.  Also, the functionality and design of the QBS
extra generator was never discussed on the CMake mailing list or with
QtCreator developers.  There may be better ways to make the two tools
work together.

In order to avoid committing to long-term support of this generator
prior to such discussion taking place, revert it from CMake for now.
We may restore this or use an alternative design based on results of
such discussion.
2015-05-21 09:05:58 -04:00
Brad King 5e0e65c189 Merge topic 'add-GreenHills-MULTI-generator'
66b641f4 Help: Add notes for topic 'add-GreenHills-MULTI-generator'
48004d9d Add a 'Green Hills MULTI' generator on Windows
051d8be1 cmLocalGenerator: Constify some cmTarget and cmGeneratorTarget arguments
2015-04-20 14:02:52 -04:00
Geoff Viola 48004d9dbe Add a 'Green Hills MULTI' generator on Windows
Green Hills MULTI is an IDE for embedded real-time systems.  The IDE's
product page can be found here:

 http://www.ghs.com/products/MULTI_IDE.html

It supports cross compiling on ARM, Intel x86, and other architectures
with various operating systems.  The IDE exists on Linux and Windows
host systems, but CMake will currently only generate the project files
on Windows host systems.
2015-04-20 13:55:40 -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
Brad King 92d6179893 Merge topic 'cmake-cleanups'
07d44d63 cmake: Remove confusing duplication.
ea819b29 cmMakefile: Remove unused method.
6ad86c7f cmMakefile: Remove bad comment.
fca2b542 cmMakefile: Internalize setting of CMakeInstance on Properties.
7bb4e3db cmMakefile: Out-of-line Home directory accessors.
6241253a cmake: Out-of-line Home and Start directory methods.
0ee3ccb3 cmake: Fix variable name bugs.
57dd094e Use vector, not list for cmCommand storage.
6deb43e6 Remove some files which do not need to be in BootstrapCommands.
ecdb1b3b Add some missing includes.
04b307b9 cmake: Simplify CommandExists method.
0f1f324b cmake: Rename oddly named variables.
275185ac cmake: Constify GetCommand method.
c57f086a cmake: Don't lower-case a string needlessly.
23368c9b cmake: Use make_pair instead of Foo::value_type.
14c70b8c cmake: out-of-line try compile state methods.
...
2015-04-13 11:38:20 -04:00
Nils Gladitz a198839a7b CTest: Fix locale used for VCS updates
6a661f0603 fixed the
locale used for message output but at the same time broke the locale
used for filename encodings.

This commit preserves LC_CTYPE in the presence of LC_ALL.
2015-04-13 08:59:34 -04:00
Stephen Kelly 6deb43e6c8 Remove some files which do not need to be in BootstrapCommands. 2015-04-12 20:09:31 +02:00
Stanislav Ionascu f85db2f323 Qbs: Add new 'extra' generator for qbs project files 2015-03-20 10:25:11 -04: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
Nils Gladitz 53d7daffac CPackWIX: Refactor start menu and desktop shortcut creation. 2015-02-21 12:38:14 +01:00
Nils Gladitz dc0f3fb44f CPackWIX: Explicitly list CPack WIX headers for IDE convenience. 2015-02-20 17:51:55 +01:00
Stephen Kelly cfb8483412 Update comment to match recent dashboard testing. 2015-02-17 19:20:23 +01:00
Brad King 0f870234fe Merge branch 'backport-no-global-setlocale' into no-global-setlocale
Resolve conflict in Source/CMakeLists.txt by taking both changes.
2015-02-06 13:35:21 -05:00
Brad King cd408d93fd Add setlocale() calls around use of libarchive APIs (#14934, #15377)
The libarchive APIs use nl_langinfo(CODESET) for iconv so they need the
locale to be set for LC_CTYPE.  However, the rest of CMake does not
define any behavior for non-ASCII character classification/conversion so
we do not want to setlocale() globally.  Add a RAII class to save, set,
and restore the locale around calls to libarchive APIs.

Inspired-by: Clinton Stimpson <clinton@elemtech.com>
2015-02-06 13:32:57 -05:00
Brad King 0abd3e538e cmake: Use a default CA path when not using system curl
When using system curl, we trust it to be configured with desired CA
certs.  When using our own build of curl, we use os-configured CA certs
on Windows and OS X.  On other systems, try to achieve this by searching
for common CA cert locations.  According to a brief investigation, the
curl packages on popular Linux distros are currently configured as:

* Arch: /etc/ssl/certs/ca-certificates.crt
* Debian with OpenSSL: /etc/ssl/certs
* Debian with GNU TLS: /etc/ssl/certs/ca-certificates.crt
* Debian with NSS: /etc/ssl/certs/ca-certificates.crt
* Fedora: /etc/pki/tls/certs/ca-bundle.crt
* Gentoo with OpenSSL: /etc/ssl/certs
* Gentoo without OpenSSL: /etc/ssl/certs/ca-certificates.crt

Teach CMake and CTest to look for these paths and use them as a CA path
or bundle when no other os-configured or user-specified CAs are
available.
2015-01-23 08:57:32 -05:00
Brad King c0298947ff Merge topic 'cdash_upload_file_mode'
f3e0b6f1 CTestCoverageCollectGCOV: Add module to run gcov
6dd980e0 ctest_submit: Make CDASH_UPLOAD mode arguments more strict
5dc33f89 ctest_submit: Add CDASH_UPLOAD mode to upload files to CDash
2015-01-22 11:16:45 -05:00
Brad King 27c6da933e Add option to build CMake against a system jsoncpp
Create a CMAKE_USE_SYSTEM_JSONCPP option.
2015-01-20 10:37:35 -05:00
Bill Hoffman 5dc33f89b5 ctest_submit: Add CDASH_UPLOAD mode to upload files to CDash
This adds support for the new cdash API where arbitrary files can be
uploaded to the CDash server.  This CDash API communicates via json
files so the json parser jsoncpp was added to the Utilities directory.
2015-01-20 09:33:21 -05:00
Brad King 17cfa09eb2 Merge topic 'cmake-labels-json'
0238d0c3 cmake: Generate an internal 'Labels.json' file next to 'Labels.txt'
bda4f0b6 jsoncpp: Add headers to help CMake include in-source jsoncpp headers
a02fbec5 jsoncpp: Drop doxygen comments that cause Clang warnings
2015-01-20 09:31:59 -05:00
Brad King 0238d0c397 cmake: Generate an internal 'Labels.json' file next to 'Labels.txt'
In each internal target directory we generate a "Labels.txt" file
containing labels for that target and its sources, but it uses an
internal format.  In order to make the list of labels easier to
publish, use a json format and call it "Labels.json".

Since we now use jsoncpp headers, link CMakeLib to the jsoncpp library.
2015-01-20 09:31:11 -05:00
Brad King 3a60c899fc cmake: Teach "-E tar" command a "--mtime=" option
Add an option to set the mtime of entries in a tarball so that one can
create a tarball with a consistent content hash (e.g. MD5) for a given
set of files regardless of their current timestamps on disk.  This will
be useful for submission of tarballs to CDash, which tracks content
hashes to avoid duplication.

Inspired-by: Bill Hoffman <bill.hoffman@kitware.com>
2015-01-19 14:16:19 -05:00
Stephen Kelly 15e42bb27c cmStandardIncludes: Remove obsolete cmOStringStream. 2015-01-11 17:06:04 +01:00
Clinton Stimpson e42da30782 Mach-O: Add Mach-O parser for OS X and iOS.
This parser also supports fat binaries which archive multiple
Mach-O binaries.
2014-12-22 11:32:10 -07:00
Ruslan Baratov e6db4c5a4e file: Add LOCK subcommand to do file and directory locking
Provide options to fail without blocking or to block up to a timeout.
Provide options to specify the scope containing the lock so it can be
released automatically at the end of a function, file, or process.

Extend the RunCMake.file test with cases covering the file(LOCK) command
usage and error cases.
2014-12-03 09:47:44 -05:00
Joseph Snyder 220e81345b CTest: Add Javascript coverage parser
Add a coverage parser for the Blanket.js library using the JSON output of
the mocha.js test runner.

Add a test for the new parser.
2014-10-29 11:27:11 -04:00
Brad King 210230e216 Merge topic 'remove-borland-build'
2db55ffa Remove borland workarounds.
2014-10-21 15:08:03 -04:00
Brad King 4f9fcd356b Merge topic 'ctest-delphi-coverage'
5c31c3e4 CTest: Add code coverage parser for Pascal/Delphi
2014-10-21 15:07:58 -04:00
Joseph Snyder 5c31c3e4eb CTest: Add code coverage parser for Pascal/Delphi
Add a class to parse the HTML output of the Delphi-code-coverage tool

 http://code.google.com/p/delphi-code-coverage/

Add a test for the new parser.
2014-10-21 15:02:20 -04:00
Stephen Kelly 2db55ffa56 Remove borland workarounds.
CMake 3.0 is the last release to require to be able to build with
Borland.
2014-10-15 23:16:44 +02:00
Brad King 858d5a0b3e Fix if() checks of CMAKE_SYSTEM_NAME on Cygwin
The CMAKE_SYSTEM_NAME is "CYGWIN", but we also define a variable
named "CYGWIN" to "1".  Avoid allowing if() to expand the "CYGWIN"
string as a variable.
2014-09-11 21:23:24 +02:00
Nils Gladitz 328e869433 StringUuid: Implement new string(UUID) sub-command. 2014-08-28 15:13:54 +02:00
Brad King 401d82b3db Merge topic 'wix-acl'
975dc871 Help: Add notes for topic 'wix-acl'
12418f5c CPackWIX: Implement CPACK_WIX_ACL (Access Control List) property
2014-08-11 09:54:19 -04:00
Konstantin Podsvirov ebe8d51b11 CPackIFW: Refactor and revise this generator
Split the monolithic cmCPackIFWGenerator source into three parts:
cmCPackIFWGenerator, cmCPackIFWInstaller, and cmCPackIFWPackage
to isolate the implementations somewhat.

Add a COMMON option to the cpack_ifw_configure_component command to make
the data component common to its parent group.

Change the default packaging method to ONE_PACKAGE_PER_COMPONENT.
This is not incompatible because the CPack IFW generator has not
yet been in a release.
2014-08-11 09:40:28 -04:00
Nils Gladitz 12418f5c26 CPackWIX: Implement CPACK_WIX_ACL (Access Control List) property 2014-08-09 15:30:21 +02:00
Daniel Pfeifer f931a18c33 CPack: add generators for .7z and .tar.xz (#13072, #14519) 2014-07-29 09:48:41 -04:00
Konstantin Podsvirov 44850a267d CPack: Add an "IFW" generator for Qt Framework Installer
Add support for packaging with the Qt Framework Installer tools:

 http://qt-project.org/doc/qtinstallerframework/index.html

Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com>
2014-07-28 10:24:03 -04:00
Brad King 65624c39e3 VS14: Add Visual Studio 14 generator (#14982)
Call the generator "Visual Studio 14" without any year because this
version of VS does not provide a year in the product name.

Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator
and update version numbers accordingly.  Add the VS14 enumeration value.
Teach the platform module Windows-MSVC to set MSVC14 and document the
variable.  Teach module InstallRequiredSystemLibraries to look for the VS
14 runtime libraries.

Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and
RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12.

Co-Author: Pawel Stopinski <diokhan@go2.pl>
2014-06-25 14:51:19 -04:00
Joseph Snyder 558c2190e8 CTest: Add Jacoco Coverage functionality
Add the ability to parse the XML output of the Jacoco tool.

Jacoco (www.eclemma.org/jacoco) is a Java coverage tool.
Add and integrate a class for the parser and
include a test which utilizes the new parser.
2014-06-12 10:38:19 -04:00
Joseph Snyder a2822d3089 CTest: Rename coverage implementation for "Python" to "Cobertura"
The coverage.py tool writes out an XML that conforms to the Cobertura
Coverage tool standard.  Rename the cmParsePythonCoverage files to
instead be cmParseCoberturaCoverage.
2014-06-04 14:21:52 +00: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
Stephen Kelly 8ed59fc207 Add target_compile_features command.
This can be used to set the compiler features required by particular
targets. An error is issued at CMake time if the compiler does not
support the required feature. If a language dialect flag is required
by the features used, that will be added automatically.

Base the target_compile_features command on cmTargetPropCommandBase. This
gives us 'free' handling of IMPORTED, ALIAS, INTERFACE, non-compilable
and missing targets.
2014-04-07 18:11:18 +02:00
Stephen Kelly 9407174b1a target_sources: New command to add sources to target. 2014-04-02 23:14:02 +02:00
Adrien Destugues 84603d804c Haiku: Enable CMake builtin ELF editor
Co-Author: Brad King <brad.king@kitware.com>
2014-03-21 08:19:09 -04:00
Jiri Malak 64c2342a8d Watcom: Enable 'WMake Makefiles' generator on Linux 2014-03-17 15:04:05 -04:00
Clinton Stimpson 91fd99b865 Encoding: Provide option to configure CMake to use UTF-8 encoding. 2014-03-14 08:48:18 -06:00
Nils Gladitz 6fcd835c07 CPackWIX: refactor and cleanup
Extract addtional classes and functions which are getting unsightly large.
Use some of the coding conventions more consistently.
2014-02-26 14:15:13 +01:00