summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS14: Add Visual Studio 14 generator (#14982)Brad King2014-06-251-0/+4
| | | | | | | | | | | | | | | | 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>
* cmake: Fix read-after-free while checking command-line argumentsBrad King2014-06-121-5/+13
| | | | | | | | Since commit v2.8.12~300^2~1 (CLI: Suppress the unused warning if the key value pair is cached, 2013-05-16), cmake::SetCacheArgs saves a cachedValue pointer and may cause the memory to be freed (by setting the cache entry) before reading it again. Fix this by saving the old value in a separate string.
* backtrace: Convert to local paths in IssueMessageBen Boeckel2014-06-051-1/+4
| | | | | This is the only place we care show the FilePath to the user, so defer the expensive relative path calculation until here.
* cmake: remove dummy backtraces for IssueMessageBen Boeckel2014-06-051-1/+1
|
* Allow a toolchain file to specify a generator toolsetBrad King2014-06-041-5/+0
| | | | | | | | | | | | | | | | | | | | Delay use of CMAKE_GENERATOR_TOOLSET until the CMakeSystem.cmake file has been configured and loaded during the first project() or enable_language() command. This gives the toolchain file named by CMAKE_TOOLCHAIN_FILE a chance to set CMAKE_GENERATOR_TOOLSET. This point is still early enough to set the generator toolset prior to the initialization of any languages that might use the toolset. The cmake::GeneratorToolset member variable remains an indication of what was specified by the -T option or loaded from the cache. It does not need to be updated based on the toolchain file setting. The cmMakefile::TryCompile can still pass cmake::GeneratorToolset into the inner instance because the try-compiled project will do platform and language initialization using the CMakeSystem module configured for the outer project. Extend the RunCMake.GeneratorToolset test with cases that use a toolchain file to set CMAKE_GENERATOR_TOOLSET.
* Merge topic 'fix-build-crash-on-bad-generator'Brad King2014-06-041-1/+7
|\ | | | | | | | | 44e2923f cmake: Fix --build crash on bad CMAKE_GENERATOR in cache
| * cmake: Fix --build crash on bad CMAKE_GENERATOR in cacheBrad King2014-06-031-1/+7
| | | | | | | | | | | | | | | | | | | | If we fail to create the generator named by CMAKE_GENERATOR, exit with an error message instead of crashing. While at it, fix the wording of the error message when CMAKE_GENERATOR is not set. Extend the RunCMake.CommandLine test with cases covering the "cmake --build" option when the named directory does not provide a CMakeCache.txt with a valid CMAKE_GENERATOR.
* | Merge topic 'cpack-properties'Brad King2014-05-281-0/+35
|\ \ | | | | | | | | | | | | | | | d0b1d2a6 CPackWiX: Implement CPACK_NEVER_OVERWRITE and CPACK_PERMANENT properties 15a8af21 Add an "installed file" property scope
| * | Add an "installed file" property scopeNils Gladitz2014-05-281-0/+35
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'fix-cache-self-assignment'Brad King2014-05-281-1/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | 1cd37527 cmCacheManager: Avoid cache entry self-assignment 326d15a3 cmake: Tolerate missing HELPSTRING on compiler change
| * | | cmake: Tolerate missing HELPSTRING on compiler changeBrad King2014-05-271-1/+4
| | |/ | |/| | | | | | | | | | | | | Teach cmake::HandleDeleteCacheVariables to tolerate a missing HELPSTRING (NULL pointer) when saving cache entries. In the absence of other bugs this should not be possible, but avoid the crash just in case.
* | | Features: Extend concept to C language.Stephen Kelly2014-05-141-2/+6
| |/ |/| | | | | | | | | | | | | | | | | | | Add properties and variables corresponding to CXX equivalents. Add features for c_function_prototypes (C90), c_restrict (C99), c_variadic_macros (C99) and c_static_assert (C11). This feature set can be extended later. Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader to conditionally represent the c_restrict feature.
* | Features: Make CMAKE_CXX_KNOWN_FEATURES a property.Stephen Kelly2014-05-021-0/+6
| | | | | | | | | | As a 'built-in' variable it imposes a cost on all variable lookups and it is expected to be rarely used.
* | cmake: Print C++ stack trace after INTERNAL_ERROR messagesBrad King2014-04-171-0/+17
| | | | | | | | | | Since an INTERNAL_ERROR is always a bug, it will be useful to have the program stack trace available in the report.
* | Watcom: Use single quote for all file/path items in wlink commandJiri Malak2014-04-081-1/+1
| | | | | | | | | | | | Watcom Linker use single quote if necessary for quoting target name, libraries names and libraries search path. Object names were already fixed.
* | cmake: Advise user to remove CMakeFiles with CMakeCache.txt (#14820)Brad King2014-03-211-4/+4
| |
* | Watcom: Enable 'WMake Makefiles' generator on LinuxJiri Malak2014-03-171-3/+7
| |
* | Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-7/+7
| | | | | | | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* | Remove some c_str() calls.Stephen Kelly2014-03-111-56/+56
| | | | | | | | | | | | 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.
* | stringapi: Command namesBen Boeckel2014-03-081-4/+5
| |
* | stringapi: Use strings for program pathsBen Boeckel2014-03-081-1/+1
| |
* | stringapi: Use strings for generator namesBen Boeckel2014-03-081-7/+9
| |
* | stringapi: Use strings for directoriesBen Boeckel2014-03-081-1/+1
| |
* | Directories: Take strings when setting directoriesBen Boeckel2014-03-081-2/+2
| |
* | strings: Remove cmStdString referencesBen Boeckel2014-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* | stringapi: Use strings for variable namesBen Boeckel2014-03-081-5/+5
| | | | | | | | Variable names are always generated by CMake and should never be NULL.
* | stringapi: Use strings for property namesBen Boeckel2014-03-081-30/+20
|/ | | | Property names are always generated by CMake and should never be NULL.
* cmake: Fix --check-build-system argument count check (#14784)Brad King2014-03-041-1/+1
| | | | | This internal option requires two arguments, not just one. Fix the argument count required to recognize the option.
* Merge topic 'support-codelite-ide-generator'Brad King2014-01-131-0/+3
|\ | | | | | | | | 0c4e8c70 Add support for codelite IDE project fles
| * Add support for codelite IDE project flesEran Ifrah2014-01-101-0/+3
| |
* | cmake: Future-proof --find-package mode.Stephen Kelly2014-01-131-2/+3
|/ | | | | | | | | 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.
* Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-6/+7
| | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* kate: add project generator for the Kate project pluginAlex Neundorf2013-11-251-0/+3
| | | | | | | This patch adds an extra generator for KDE's kate text editor, or better more specifically, the project plugin. Alex
* Simplify some calls to cmGlobalGenerator::BuildBrad King2013-11-181-8/+1
| | | | | | | | 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.
* cmGlobalGenerator: Cleanup GenerateBuildCommand APIBrad King2013-11-181-1/+1
| | | | | | | | | 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.
* Refactor tool selection for edit_cache (#14544)Brad King2013-11-121-32/+0
| | | | | | | | | 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.
* Refactor internal resource location APIs and initializationBrad King2013-11-121-192/+21
| | | | | | | | | | | | | | | | | | | | 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.
* VS: Add version year to generator namesBrad King2013-10-281-4/+4
| | | | | | | | | | | | | | | | 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.
* Drop compatibility with CMake < 2.4Brad King2013-10-231-30/+0
| | | | | | | | | | | | 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.
* Merge topic 'cmake--build-pipes'Brad King2013-10-221-3/+3
|\ | | | | | | | | bcd5de7 cmake: Always pass through stdout/stderr in --build mode
| * cmake: Always pass through stdout/stderr in --build modeBrad King2013-10-181-3/+3
| | | | | | | | | | | | 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.
* | cmSystemTools: Drop old RunCommand methodBrad King2013-10-191-4/+0
|/ | | | | All calls to this method have been replaced by newer infrastructure. Remove it and the supporting cmWin32ProcessExecution class.
* Drop unused builtin documentation APIsBrad King2013-10-161-2/+1
| | | | | Now that all DefineProperty documentation calls have been dropped, drop the supporting APIs.
* Drop builtin property documentationBrad King2013-10-161-202/+0
| | | | | | 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.
* Drop all documentation formatters except UsageBrad King2013-10-161-2/+2
| | | | | | | | 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.
* Drop "full" documentation output typesBrad King2013-10-151-39/+0
| | | | | | | | | | | | | | | | 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.
* Drop definition of internal propertyBrad King2013-10-151-5/+0
| | | | | The property __CMAKE_DELETE_CACHE_CHANGE_VARS_ is not meant for public exposure.
* Drop CMAKE_STRICT modeBrad King2013-10-151-111/+0
| | | | | | | 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.
* message: Add a DEPRECATION modeStephen Kelly2013-10-081-0/+9
| | | | | | 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.
* Merge topic 'split-cmake-E'Brad King2013-10-071-1355/+0
|\ | | | | | | | | c04995b cmake: Split -E command implementation into separate source file