summaryrefslogtreecommitdiff
path: root/Source/cmCMakeMinimumRequired.cxx
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* cmCommand refactor: cmCMakeMinimumRequiredGabor Bencze2019-08-201-20/+30
|
* cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-2/+1
| | | | | | | | | | | | | | | | This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value argument instead of a `const char *`. Benefits are: - `std::string` can be passed to `cmMakefile::AddDefinition` directly without the `c_str()` plus string length recomputation fallback. - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at compile time. In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid `std::string::c_str` calls and the `std::string` is passed directly. Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
* Modernize: Enable modernize-raw-string-literal in clang-tidyArtur Ryt2019-04-021-1/+1
|
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-3/+3
| | | | Reduce the number of files relying on `cmake.h`.
* cmake_minimum_required: Tolerate unknown future argumentsBrad King2018-03-261-10/+35
| | | | | | | | | When a `...<max>` version is given that is larger than the running version of CMake, assume that the project is aware of a newer version of CMake and that any unknown arguments are future arguments. This will allow future versions of CMake to add arguments to the command that projects can use without introducing errors in older versions of CMake (back to 3.12).
* cmake_minimum_required: Optionally set policies with version rangeBrad King2018-03-211-6/+21
| | | | | | | | Teach `cmake_minimum_required` and `cmake_policy(VERSION)` to support a version range of the form `<min>[...<max>]`. Define this to mean that version `<min>` is required, but known policies up to those introduced by `<max>` will be set to `NEW`. This will allow projects to easily specify a range of versions for which they have been updated.
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-5/+5
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-0/+6
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-0/+1
|
* Separate compilation for commands included in cmBootstrapCommands1Daniel Pfeifer2016-10-211-0/+1
|
* 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.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-56/+32
| | | | | | | | | | | | | 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-3/+3
| | | | All compilers hosting CMake support the std class.
* cmCMakeMinimumRequired: Use unsigned int for version numbersChristoph Grüninger2014-12-231-8/+8
|
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-2/+2
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* Remove some c_str() calls.Stephen Kelly2014-03-111-2/+2
| | | | | | 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.
* Drop compatibility with CMake < 2.4Brad King2013-10-231-0/+3
| | | | | | | | | | | | 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.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Teach cmake_minimum_required about tweak versionBrad King2010-04-231-6/+13
| | | | | | | | The command now accepts four version components in the format major[.minor[.patch[.tweak]]] This corresponds to the new versioning scheme introduced recently.
* 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.
* Add parentheses around '&&' between '||' for gccBrad King2009-09-111-7/+7
| | | | | | | The GNU compiler warns about possible operator precedence mistakes and asks for explicit parentheses (-Wparentheses). We add the parentheses to silence the warning. This also fixes one real logic error in the find_package() implementation by correcting expression evaluation order.
* ENH: Ignore unknown cmake_minimum_required argsBrad King2009-01-031-5/+21
| | | | | | | When cmake_minimum_required is called with an unknown argument it should not complain about it if the version specified is in the future. This allows the proper error to be shown about the current CMake being too old.
* ENH: Cleanup policy version interface presented to user.Brad King2008-03-241-6/+5
| | | | | | | - In cmake_minimum_required do not set policy version if current CMake is too old - In cmPolicies::ApplyPolicyVersion report error if version is too new or cannot be parsed
* ENH: clean up some policy stuff and interactions with ↵Ken Martin2008-03-071-0/+9
| | | | CMAKE_BACKWARDS_COMPATIBILITY and CMAKE_MINIMUM_REQUIRED
* BUG: change the handling of CMAKE_MINIMUM_REQUIRED and ↵Ken Martin2008-03-061-3/+0
| | | | BACKWARDS_COMPATIBILITY and extend the documentaiton quite a bit
* ENH: Make CMAKE_MINIMUM_REQUIRED command FATAL_ERROR option implicit (always ↵Brad King2008-03-041-15/+2
| | | | on). Accept but ignore the existing option.
* ENH: more policy changesKen Martin2008-03-041-0/+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: unify version stuff, get rid of it out of cmake and cmMakefile and only ↵Bill Hoffman2006-11-291-3/+3
| | | | use cmVersion
* STYLE: some m_ to this-> cleanupKen Martin2006-03-151-5/+6
|
* STYLE: Fix some style issuesAndy Cedilnik2006-03-101-5/+8
|
* ENH: Added FATAL_ERROR option and fixed check to not have floating point ↵Brad King2006-02-141-23/+90
| | | | roundoff problems.
* ENH: Enabling ability for CMAKE_MINIMUM_REQUIRED version to include patch ↵Brad King2005-06-171-1/+11
| | | | level. Submitted by Alexander Neundorf.
* removed redundent includesKen Martin2003-08-101-1/+0
|
* ENH: Added reference to Copyright.txt. Removed old reference to ITK ↵Brad King2002-10-231-3/+3
| | | | copyright. Changed program name to CMake instead of Insight in source file header. Also removed tabs.
* ENH: Renamed cmStringStream to cmOStringStream and added cmIStringStream. ↵Brad King2002-10-101-1/+1
| | | | Removed cmInputStringStream.
* ENH: Added cmStringStream class to wrap std::stringstream or std::strstream ↵Brad King2002-06-191-4/+3
| | | | depending on the platform. The interface is that of std::stringstream, so no "ends" or "rdbuf()->freeze(0)" lines are needed.
* WAR: remove warnings for .NET compilerBill Hoffman2002-04-251-1/+1
|
* BUG: add missing includeBill Hoffman2002-04-181-0/+1
|
* ENH: backwards compatible for VTK 4.0, add cmake version requiresBill Hoffman2002-04-171-0/+45