summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-2/+2
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-212/+212
| | | | | | | | We now require C++11 support including `override`. Drop use of the old compatibility macro. Convert references as follows: git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' | xargs sed -i 's/CM_OVERRIDE/override/g'
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-24/+18
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-2/+2
|
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+0
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-9/+8
|
* cmGeneratorExpressionNode: add some missing commasBen Boeckel2017-08-031-1/+1
|
* Provide and use CM_FALLTHROUGHDaniel Pfeifer2017-06-031-0/+2
|
* Replace boolean `implib` parameters with enumGregor Jasny2017-04-201-2/+6
| | | | | Named enumeration values are much clearer at call sites and add more type safety.
* Allow OBJECT libraries to be installed, exported, and importedRobert Maynard2017-04-181-16/+27
| | | | | | | | Teach install() and export() to handle the actual object files. Disallow this on Xcode with multiple architectures because it still cannot be cleanly supported there. Co-Author: Brad King <brad.king@kitware.com>
* Genex: Allow TARGET_OBJECTS to be used everywhereRobert Maynard2017-04-181-7/+25
| | | | | | | | | Previously the `TARGET_OBJECTS` generator expression was limited only to use in a buildsystem context so that Xcode's placeholders in object file paths can be evaluated. Lift this restriction so that the expression can at least be used in most settings. Co-Author: Brad King <brad.king@kitware.com>
* Genex: Reject TARGET_OBJECTS on non-object libraries earlierBrad King2017-04-181-9/+8
| | | | | | | | Move the diagnostic that rejects the TARGET_OBJECTS generator expression in non-buildsystem context until after the check for whether the named target is an object library. This order will makes more sense than the previous order once TARGET_OBJECTS is allowed in non-buildsystem context.
* cmGeneratorTarget: Factor out a GetTargetObjectNames methodBrad King2017-04-181-29/+11
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-3/+3
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* cmMakefile: Create an explicit "Object Libraries" source groupBrad King2017-04-111-5/+5
| | | | | The generators should not need special logic to place object library object files in this group.
* Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressionsGregor Jasny2017-03-301-0/+61
| | | | Closes #16733
* Genex: Add `IF` generator expressionColby Pike2017-01-261-0/+22
| | | | | | | | This allows a single condition to be used to choose between two alternatives. Without this the condition must be duplicated with one surrounded by `NOT`. Closes: #15585
* clang-tidy: apply modernize-use-bool-literals fixesDaniel Pfeifer2016-12-121-2/+2
|
* Merge topic 'clang-tidy'Brad King2016-10-201-2/+2
|\ | | | | | | | | | | effa6c83 fix more issues reported by clang-tidy fb461cac silence selected clang-tidy violations
| * silence selected clang-tidy violationsDaniel Pfeifer2016-10-181-2/+2
| |
* | cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
| |
* | cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-9/+9
|/
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+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.
* Genex: Diagnose invalid LINK_ONLY usage instead of crashingBrad King2016-09-051-3/+8
| | | | | | | | When `$<LINK_ONLY:...>` is used outside of linking we may evaluate it without a `dagChecker`. Do not dereference the NULL pointer and issue a diagnostic instead. Closes: #16287
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-5/+31
|
* CMake: don't use else after returnDaniel Pfeifer2016-08-181-2/+4
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-75/+102
|
* Add additional <= and >= comparison operatorsChuck Atkins2016-08-091-0/+40
| | | | | This adds the LESS_EQUAL, GREATER_EQUAL, and associated STR and VERSION equivalents to use the combined <= and >= functionality.
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-1/+1
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* use CM_NULLPTRDaniel Pfeifer2016-06-281-7/+8
|
* Add CM_OVERRIDE to some functionsDaniel Pfeifer2016-06-271-61/+69
| | | | | | | Run clang-tidy's modernize-use-override checker. This checker must have issues in version 3.8. It has way too little matches. And it adds override to destructors. Revert the changes on the destructors and change override to CM_OVERRIDE.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-859/+702
| | | | | | | | | | | | | 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-53/+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.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* Merge topic 'minor-cleanups'Brad King2015-10-281-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 13a37f5f cmMakefile: Fix typo in comment 958508bb cmMakefile: Fix style 91a829c1 Makefiles: Remove unused variable e0213882 cmTarget: Remove obsolete member 0554c2c9 cmTarget: Fix style b22e5d0a Remove some obsolete declarations ce43ed2c Use LocalGenerator when possible d90c9738 Makefiles: Remove some unneeded casts 331023ae Export: Remove unused variable a03f3d0e cmFunctionBlocker: Constify method d50c4220 Xcode: Fix typo in comment 803f1901 Xcode: Remove trailing semicolon
| * Remove some obsolete declarationsStephen Kelly2015-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that cmStandardIncludes.h is included before any platform header in cmGeneratorExpressionEvaluator.h. That file needs to change as a result of removal of the cmMakefile.h header from cmGeneratorExpressionNode.h, affecting the compilation of cmGeneratorExpressionNode.cxx. On AIX we need to include our own headers first to get large file support macros defined consistently within system headers. The old order in this header worked only because it was always included after other headers.
* | cmGeneratorTarget: Move LinkLanguagePropagatesToDependents from cmTargetStephen Kelly2015-10-271-1/+1
| |
* | Genex: use cmGeneratorTarget policy APIStephen Kelly2015-10-271-1/+1
| |
* | cmLocalGenerator: Add GetPolicyStatus APIStephen Kelly2015-10-271-2/+2
|/
* cmGeneratorTarget: Move IsDLLPlatform from cmTarget.Stephen Kelly2015-10-201-1/+1
|
* cmGeneratorTarget: Move IsLinkable from cmTarget.Stephen Kelly2015-10-191-1/+1
|
* cmGeneratorTarget: Access global state through LocalGenerator.Stephen Kelly2015-10-161-2/+2
|
* Merge topic 'genex-consumers-generator-targets'Brad King2015-10-161-43/+37
|\ | | | | | | | | | | c4ae1578 Genex: Port some access API to cmGeneratorTarget. 6d27a3db Genex: Port implementation to cmGeneratorTarget.
| * Genex: Port some access API to cmGeneratorTarget.Stephen Kelly2015-10-151-5/+5
| |
| * Genex: Port implementation to cmGeneratorTarget.Stephen Kelly2015-10-151-44/+38
| |
* | Remove now-obsolete casts.Stephen Kelly2015-10-141-1/+1
| |
* | cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-9/+9
| | | | | | | | | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
* | Generators: Use GetType from the cmGeneratorTarget.Stephen Kelly2015-10-141-1/+1
|/