summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* WriteCompilerDetectionHeader: Add policy to remove moduleBrad King2020-12-051-0/+1
| | | | | | See justification in the policy documentation. Closes: #17842
* include: refactor call sites of cmMakefile::ReadDependentFileAsit Dhal2020-10-211-5/+16
| | | | Fixes: #16773
* Modules/Documentation: removeBen Boeckel2020-04-221-0/+3
| | | | | | | | | | | | This is an old module from when VTK and other Kitware projects drove the addition of commands and modules into CMake itself. Modern VTK doesn't need this module and it can be ignored. This module is kept around so that the ancient VTK versions which use it are not broken by it. VTK itself stopped using the module in 2012 and the last usage by an example in VTK was removed in 2020. Fixes: #20591
* cmIncludeCommand: add infrastructure for deprecated modulesBen Boeckel2020-04-211-1/+31
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* cmCommand refactor: cmIncludeCommandGabor Bencze2019-08-201-24/+25
|
* cmMakefile: GetModulesFile() accepts std::string paramVitaly Stakhovsky2019-01-211-1/+1
|
* cmMakefile::ReadListFile() accepts std::string argumentVitaly Stakhovsky2019-01-171-2/+1
| | | | Same for cmMakefile::ReadDependentFile(); some cleanup
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-5/+5
| | | | Reduce the number of files relying on `cmake.h`.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-2/+3
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-2/+2
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-1/+1
|
* Remove redundant c_str() callsDaniel Pfeifer2016-10-301-2/+2
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-0/+7
|
* Separate compilation for commands included in cmBootstrapCommands2Daniel Pfeifer2016-10-211-0/+3
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* use empty method to check for emptynessDaniel Pfeifer2016-09-151-1/+1
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-1/+1
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-89/+61
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* cmGlobalGenerator: Compute export() related classes early.Stephen Kelly2015-10-181-1/+0
| | | | Simplify CMP0024 handling.
* cmMakefile: Store container of cmExportBuildFileGenerators.Stephen Kelly2015-10-141-0/+1
| | | | | | | | | 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.
* cmIncludeCommand: Populate the cmGeneratorTargets in deprecated path.Stephen Kelly2015-07-271-0/+1
|
* Merge topic 'refactor-cmPolicies'Brad King2015-05-051-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 013ada80 cmPolicies: Implement PolicyMap in terms of bitset. be6664c2 cmPolicies: Implement abstraction for PolicyMap. de211686 Port to static cmPolicies API. 13981f20 cmPolicies: Make all API static. 23e2bcc8 cmPolicies: Remove unused DefinePolicy method. 5641ba4f cmPolicies: Remove unused cmPolicy class. 3de54497 cmPolicies: Loop over all policies using enum constants. 387aff20 cmPolicies: Trivialize GetPolicyStatus method. dbf680d6 cmPolicies: Use more-direct ID access. 8c204133 cmPolicies: Implement in terms of public API. e3a8c029 cmPolicies: Make private method file-static. cb765af0 cmPolicies: Implement short description access with XMacros. 5df267fa cmPolicies: Implement version check with XMacro. 2235cfeb cmPolicies: Implement id to version with XMacro. 05d84388 cmPolicies: Implement id to string conversion with XMacro. 6eaade8a cmPolicies: Introduce XMacro table for policy data. ...
| * Port to static cmPolicies API.Stephen Kelly2015-05-041-2/+1
| |
* | Port to cmMakefile::GetGlobalGenerator.Stephen Kelly2015-05-031-2/+1
|/
* include: Ask for permission, rather than forgiveness.Stephen Kelly2015-04-271-1/+13
| | | | | | Check that a non-optional file exists before attempting to include it. This makes more sense than relying on an error case deeper within cmListFileCache.
* cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-201-1/+1
|
* cmMakefile: Add wrapper for reading listfiles which have an origin.Stephen Kelly2015-04-181-2/+1
| | | | | | Such files are delegates from other files, and so they set the CMAKE_PARENT_LIST_FILE to the originator. They also may set a policy scope.
* cmMakefile: Remove fullPath parameter from ReadListFile.Stephen Kelly2015-04-181-4/+2
| | | | | | There is no reason for this to be a responsibility of ReadListFile. Additionally, the only user of it already computes it itself.
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-2/+2
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-1/+1
| | | | All compilers hosting CMake support the std class.
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-1/+1
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* Merge topic 'fix_policy_diagnostics'Brad King2014-04-011-3/+3
|\ | | | | | | | | 77b581c2 Policies: omit warnings about unset policies when they are actually set to NEW
| * Policies: omit warnings about unset policies when they are actually set to NEWNils Gladitz2014-03-311-3/+3
| |
* | Remove some c_str() calls.Stephen Kelly2014-03-111-4/+4
|/ | | | | | 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.
* include(): Use lower case and () to refer to the include() command.Stephen Kelly2013-10-181-1/+1
|
* export(): Process the export() command at generate time.Stephen Kelly2013-10-111-0/+1
| | | | | | | | | | | | Make the API for adding targets string based so that it can easily use cmGeneratorTarget. Teach the cmIncludeCommand to generate the exported file at configure-time instead if it is to be include()d. The RunCMake.ExportWithoutLanguage test now needs a dummy header.h file as expected error from export() is now reported after the missing file error.
* CMP0024: Store the fact of included export in global generator.Stephen Kelly2013-10-101-1/+3
| | | | | Storing it in the makefile means that the policy does not trigger when include and export are in differing directories.
* export: Add policy CMP0024 to disallow include() of export filesStephen Kelly2013-10-071-0/+39
| | | | | | | | | | | | | | | | | Currently, export() is executed at configure-time. One problem with this is that certain exported properties like the link interface may not be complete at the point the export() is encountered leading to an incorrect or incomplete exported representation. Additionally, the generated IMPORTED_LOCATION property may even be incorrect if commands following the export() have an effect on it. Another problem is that it requires the C++ implementation of cmake to be capable of computing the exported information at configure time. This is a limitation on the cleanup and maintenance of the code. At some point in the future, this limitation will be dropped and more implementation will be moved from cmTarget to cmGeneratorTarget.
* Fix spelling and typos (non-binary)Andreas Mohr2013-05-071-1/+1
|
* include: Ignore empty string as file name (#13388)Brad King2012-07-101-0/+7
| | | | | | | | | Previously CMake silently accepted the empty string and added a bogus dependency on the current directory. Instead warn about the empty file name and ignore it. We cannot make this an error because there may be existing projects that accidentally depend on the old behavior. Add a RunCMake.include test to cover this case.
* Remove trailing whitespaceAlex Neundorf2011-01-041-8/+8
|
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* ENH: Isolate policy changes in included scriptsBrad King2009-01-221-1/+7
| | | | | | | | Isolation of policy changes inside scripts is important for protecting the including context. This teaches include() and find_package() to imply a cmake_policy(PUSH) and cmake_policy(POP) around the scripts they load, with a NO_POLICY_SCOPE option to disable the behavior. This also creates CMake Policy CMP0011 to provide compatibility. See issue #8192.
* ENH: Improve formatting of include command error message.Brad King2008-03-081-1/+3
|
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-1/+2
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* ENH: merge CMake-CrossCompileBasic to HEADAlexander Neundorf2007-05-171-8/+51
| | | | | | | | | | | | | | | | | | | | | | | | -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
* STYLE: fix line lengthKen Martin2006-05-111-2/+3
|
* STYLE: some m_ to this-> cleanupKen Martin2006-03-151-2/+2
|