Commit Graph

627 Commits

Author SHA1 Message Date
Brad King bccc056ba8 cmake: Advise user to remove CMakeFiles with CMakeCache.txt (#14820) 2014-03-21 08:28:37 -04:00
Jiri Malak 64c2342a8d Watcom: Enable 'WMake Makefiles' generator on Linux 2014-03-17 15:04:05 -04:00
Stephen Kelly af8a1643c1 Remove c_str calls when using stream APIs.
Use an ad-hoc clang tool for matching the calls which should be
ported.
2014-03-11 15:03:50 +01:00
Stephen Kelly 21c573f682 Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
2014-03-11 15:03:50 +01:00
Ben Boeckel 85fc9f26a7 stringapi: Command names 2014-03-08 13:05:39 -05:00
Ben Boeckel 6557382dcf stringapi: Use strings for program paths 2014-03-08 13:05:38 -05:00
Ben Boeckel 1a1b737c99 stringapi: Use strings for generator names 2014-03-08 13:05:38 -05:00
Ben Boeckel 24b5e93de2 stringapi: Use strings for directories 2014-03-08 13:05:38 -05:00
Ben Boeckel f0ad6631ad Directories: Take strings when setting directories 2014-03-08 13:05:35 -05:00
Ben Boeckel 270eb96df0 strings: Remove cmStdString references
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.

The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
2014-03-08 13:05:35 -05:00
Ben Boeckel 3742bb0d32 stringapi: Use strings for variable names
Variable names are always generated by CMake and should never be NULL.
2014-03-08 13:05:28 -05:00
Ben Boeckel ec97ed7d0c stringapi: Use strings for property names
Property names are always generated by CMake and should never be NULL.
2014-03-08 13:05:28 -05:00
Brad King 3504f9b9ff cmake: Fix --check-build-system argument count check (#14784)
This internal option requires two arguments, not just one.  Fix the
argument count required to recognize the option.
2014-03-04 10:12:08 -05:00
Brad King 071005add1 Merge topic 'support-codelite-ide-generator'
0c4e8c70 Add support for codelite IDE project fles
2014-01-13 10:28:37 -05:00
Stephen Kelly a7f393dc49 cmake: Future-proof --find-package mode.
Create cmGeneratorTargets before generating generate-time information.
C++ interfaces for querying build information is increasingly only
available at generate time through the cmGeneratorTarget class.  Ensure
that the required cmGeneratorTarget instances are created.  Use the
cmGlobalGenerator access API to access the relevant cmGeneratorTarget
instead of creating a temporary one on the stack.
2014-01-13 16:09:15 +01:00
Eran Ifrah 0c4e8c70a0 Add support for codelite IDE project fles 2014-01-10 09:20:11 +02:00
Clinton Stimpson 5730710c86 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
2014-01-07 09:27:44 -05:00
Alex Neundorf 644e012863 kate: add project generator for the Kate project plugin
This patch adds an extra generator for KDE's kate text editor,
or better more specifically, the project plugin.

Alex
2013-11-25 10:48:33 -05:00
Brad King 91a021146c Simplify some calls to cmGlobalGenerator::Build
Code paths that look up CMAKE_MAKE_PROGRAM from the cache only to
pass it to Build, which only passes it to GenerateBuildCommand,
no longer need to do so.  GenerateBuildCommand now knows how to
look up CMAKE_MAKE_PROGRAM in the cache when no explicit value
is given, so simply pass 0 now.
2013-11-18 11:30:48 -05:00
Brad King 8904d1410b cmGlobalGenerator: Cleanup GenerateBuildCommand API
All cmGlobalGenerator::GenerateBuildCommand call sites that need to
produce a string now generate "cmake --build" commands.  The remaining
call sites immediately pass the result to cmSystemTools::RunSingleCommand.
Avoid the intermediate string and argument parsing by directly producing a
vector of strings.  Also drop the ignoreErrors argument because no call
sites remain that use it.
2013-11-18 08:26:21 -05:00
Brad King 684063c036 Refactor tool selection for edit_cache (#14544)
Refactor edit_cache tool selection to ask each global generator for its
preference.  Teach the Ninja generator to always use cmake-gui because
Ninja by design cannot run interactive terminal dialogs like ccmake.
Teach the Makefile generator to use cmake-gui when also using an "extra"
generator whose IDE has no terminal to run ccmake, and otherwise fall
back to CMAKE_EDIT_COMMAND selection for normal Makefile build systems.
2013-11-12 08:47:19 -05:00
Brad King d1526f825e Refactor internal resource location APIs and initialization
Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources.
Teach it to compute the locations of cmake, ctest, cpack, ccmake, and
cmake-gui executables, and the location of CMAKE_ROOT.  Provide this
information from static cmSystemTools::Get<resource>() methods.
Refactor code that needs these locations to use the new APIs.

Teach FindCMakeResources to use the OS X system API to lookup the
executable location.  When running from the CMake build tree itself,
leave a file in the tree that FindCMakeResources can use to read the
location of the source tree.  This avoids the need to compile the source
tree location into a binary that may be installed and used without the
source tree.

Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build
tree next to "cmake" and the other tools, as is already done in the
install tree for the application bundle.  This ensures a consistent set
of executables are available in one directory.
2013-11-12 08:23:35 -05:00
Brad King 29071fed2e VS: Add version year to generator names
Rename the Visual Studio >= 10 generators to indicate the version year:

 Visual Studio 10 => Visual Studio 10 2010
 Visual Studio 11 => Visual Studio 11 2012
 Visual Studio 12 => Visual Stduio 12 2013

Report the names with the year to the list of available generators so
that the cmake-gui drop-down shows the years.  When selecting a
generator from the "-G" option or from an existing CMAKE_GENERATOR cache
entry, recognize names without the years for compatibility and map them
to the names with years.

Update the generator names in the cmake-generators.7 manual.
2013-10-28 13:43:14 -04:00
Brad King 7d47c69365 Drop compatibility with CMake < 2.4
Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to
a value lower than 2.4, and generate an error when projects or the user
attempt to do so.  In the error suggest using a CMake 2.8.x release.

Teach cmake_minimum_required to warn about projects that do not require
at least CMake 2.4.  They are not supported by CMake >= 3.0.

Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a
reference to policy CMP0001.
2013-10-23 08:54:31 -04:00
Brad King 61de941ad7 Merge topic 'cmake--build-pipes'
bcd5de7 cmake: Always pass through stdout/stderr in --build mode
2013-10-22 09:07:23 -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 bcd5de775a cmake: Always pass through stdout/stderr in --build mode
Enable the --use-stderr behavior by default and ignore the old option.
Passing through the pipes allows color terminal output and other things
to work as if one ran the native build command directly.
2013-10-18 13:45:27 -04:00
Brad King 53ded59515 Drop unused builtin documentation APIs
Now that all DefineProperty documentation calls have been dropped, drop
the supporting APIs.
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
Brad King 87cc62cab9 Drop "full" documentation output types
We will no longer support full documentation generation from executables
and will instead generate documentation with other tools.  Disable (with
a warning left behind) the command-line options:

 --copyright
 --help-compatcommands
 --help-full
 --help-html
 --help-man

Drop supporting code.  Drop manual sections generation from executables.
Remove internal documentation construction APIs.  Drop unused sections
See Also, Author, Copyright, Compat Commands, Custom Modules.
2013-10-15 14:12:49 -04:00
Brad King 946f0efb7c Drop definition of internal property
The property __CMAKE_DELETE_CACHE_CHANGE_VARS_ is not meant for public
exposure.
2013-10-15 10:47:39 -04:00
Brad King 277bd1db98 Drop CMAKE_STRICT mode
With our modern development workflow it is less likely a property will
be added to C++ code without documentation.  This mode only existed to
support the DocTest which had very limited coverage of the properties
anyway.
2013-10-15 10:47:38 -04:00
Stephen Kelly 509c142a3f message: Add a DEPRECATION mode
By default, the message is not issued. If CMAKE_ERROR_DEPRECATED
is on, the message is fatal. If CMAKE_WARN_DEPRECATED is on, the
message is a warning.
2013-10-08 18:11:22 +02:00
Brad King 1d9af198a8 Merge topic 'split-cmake-E'
c04995b cmake: Split -E command implementation into separate source file
2013-10-07 15:45:15 -04:00
Brad King e00089388c Merge topic 'cleanup-properties'
b78bc33 Cleanup some variable documentation names
bbfff52 Remove redundant cmake::GetIsPropertyDefined method
2013-10-07 15:43:55 -04:00
Brad King c04995b46e cmake: Split -E command implementation into separate source file
Move the cmake::ExecuteCMakeCommand static method and all the static
methods it calls out of the 'cmake' class to a separate 'cmcmd' class.
Build the latter as part of the main cmake executable with cmakemain.cxx
and not in CMakeLib.  Drop unused header includes from "cmake.cxx".

By moving this implementation out of cmake.cxx we avoid carrying it
around in all the executables that use class 'cmake'.  It is needed only
for the main "cmake -E" functionality.
2013-10-03 17:30:28 -04:00
Brad King bbfff5233d Remove redundant cmake::GetIsPropertyDefined method
We already have cmake::IsPropertyDefined for the same reason.
2013-09-17 09:10:31 -04:00
Stephen Kelly 6cf55644ef Generate graphviz files at generate time, not configure time.
The feature needs access to all link libraries. In the future that
will only be possible to calculate at generate-time.

Even when the files were generated at configure time, they were
generated after user code in CMakeLists files were generated. No
policy is needed to handle manipulation of the files from CMake
code, because that was never possible.
2013-08-29 17:18:02 +02:00
Brad King ddfd3b85df Merge topic 'cppcheck-fixes'
a20c819 cmake: Fix resource leak reported by cppcheck
c8adab9 cmcurl: Fix resource leak reported by cppcheck
499531c libarchive: Fix free() order to avoid accessing freed memory
3b849a7 ccmake: Add missing initializers reported by cppcheck
2013-07-16 13:59:30 -04:00
Brad King a20c819f63 cmake: Fix resource leak reported by cppcheck
Return early in cmake::ReportUndefinedPropertyAccesses if there is no
global generator instead of opening a file and leaking the descriptor.

Reported-by: Ömer Fadıl USTA <omerusta@gmail.com>
2013-07-15 10:20:00 -04:00
Stephen Kelly f1fcbe3fde Add Target API to determine if an include is a system include.
The implementation can be modified later so that system includes
can be determined on a per-target basis.
2013-07-02 16:40:02 +02:00
Brad King 8a08ab051a Merge topic 'vs12-generator'
9a76d83 VS12: Find proper MSBuild for VSProjectInSubdir test
4e5cb39 Merge branch 'master' into vs12-generator
78fdbbc FindBoost: Add -vc120 mangling for VS 12
e99d7b1 VS12: Generate flag tables from MSBuild v120 tool files
77ac9b8 VS12: Add Visual Studio 12 generator (#14251)
2013-07-01 09:27:33 -04:00
Brad King 4e5cb398ae Merge branch 'master' into vs12-generator
Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping
the side from 'master'.
2013-06-28 18:29:54 -04:00
Brad King 77ac9b8b9c VS12: Add Visual Studio 12 generator (#14251)
Copy cmGlobalVisualStudio11Generator to cmGlobalVisualStudio12Generator
and update version numbers accordingly.  Add the VS12 enumeration value.
Add module CMakeVS12FindMake to find MSBuild.  Look for MSBuild in its
now-dedicated Windows Registry entry.  Teach the platform module
Windows-MSVC to set MSVC12 and document the variable.  Teach module
InstallRequiredSystemLibraries to look for the VS 12 runtime libraries.

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

Inspired-by: Minmin Gong <minmin.gong@gmail.com>
2013-06-28 18:13:14 -04:00
Alex Neundorf ba0e06f250 automoc: add a global AUTOMOC_TARGETS_FOLDER property
This has been requested, along with a patch, by Shaun Williams
 in http://public.kitware.com/Bug/view.php?id=13788 .
It adds a global property AUTOMOC_TARGETS_FOLDER, which can
be used to group the automoc targets together in a folder e.g.
in Visual Studio.

Alex
2013-06-28 21:40:16 +02:00
Brad King 0bd82cb1a7 Merge topic 'config-dependent-CMAKE_AUTOMOC'
ea4d784 QtAutomoc: Use config-dependent compile definitions and includes.
67f6ceb QtAutomoc: Fix handling of list separator for compile definitions.
2013-06-24 08:47:03 -04:00
Brad King 059be4ba3b Merge topic 'add-whitespace'
2331b57 Add whitespace after colons in error messages.
2013-06-24 08:38:12 -04:00
Brad King c5c94269b6 Merge topic 'doc-E-tar-zip'
ae06f80 cmake: Document "-E tar" support for .zip (#14225)
2013-06-24 08:37:42 -04:00
Stephen Kelly 2331b57bec Add whitespace after colons in error messages. 2013-06-21 16:21:44 +02:00