summaryrefslogtreecommitdiff
path: root/Source/cmAddExecutableCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'cmp0037-conditional-targets'Brad King2017-10-311-31/+3
|\ | | | | | | | | | | | | | | | | | | | | | | ae5f4069 CMP0037: Allow test and package targets when features are not enabled 409527a0 CMP0037: De-duplicate check and message generation a2611d81 Tests: Add RunCMake.CMP0037 case for WARN on reserved targets 103501c4 Tests: Do not enable languages in all cases of RunCMake.CMP0037 2d0b3e6e cmGlobalGenerator: Refactor test and package target conditions Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !1417
| * CMP0037: De-duplicate check and message generationBrad King2017-10-301-31/+3
| |
* | Add support for IMPORTED GLOBAL targets to be aliasedDeniz Bahadir2017-10-261-6/+5
|/ | | | | Issue: #15569 Issue: #17197
* Defer check for sources within a target until generation.Deniz Bahadir2017-10-241-7/+1
| | | | | | | | | | | | | | | The `add_library` and `add_executable` commands can now be called with no source-files and won't generate a warning or error message, as long as source-files will be added later via the `target_sources` command. If during the generation step still no sources are associated with targets created by such calls a useful error message will be generated and generation fails. Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are excluded from this check because we do not need sources for these target types during generation. Fixes: #16872
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-1/+1
|
* clang-tidy: apply performance-faster-string-find fixesDaniel Pfeifer2016-12-121-1/+1
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-0/+10
|
* Separate compilation for commands included in cmBootstrapCommands1Daniel Pfeifer2016-10-211-0/+2
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-3/+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.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-122/+80
| | | | | | | | | | | | | 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.
* 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.
* cmTarget: Implement ALIAS in terms of name mappingStephen Kelly2015-10-271-1/+1
| | | | Remove mapping to cmTarget.
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-151-3/+3
| | | | | | | 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
* Port to static cmPolicies API.Stephen Kelly2015-05-041-2/+1
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-7/+7
| | | | All compilers hosting CMake support the std class.
* 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-12/+12
|/ | | | | | 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.
* cmMakefile: make some methods take const std::string& instead of const char*Rolf Eike Beer2014-01-161-1/+1
| | | | | | | | Most callers already have a std::string, on which they called c_str() to pass it into these methods, which internally converted it back to std::string. Pass a std::string directly to these methods now, avoiding all these conversions. Those methods that only pass in a const char* will get the conversion to std::string now only once.
* CMP0037: Extend policy to reserved names and custom targetsNils Gladitz2013-11-191-2/+5
| | | | | | | | Teach add_custom_target to check the policy too. Extend the policy to disallow reserved target names that we use for builtin targets like "all". Extend the RunCMake.CMP0037 test to cover these cases.
* Disallow invalid target names (#13140)Stephen Kelly2013-11-071-0/+38
| | | | | Exclude Borland and NMake from the CMP0037 test. They do not accept the colon in a target name.
* Add the ALIAS target concept for libraries and executables.Stephen Kelly2013-08-021-0/+72
| | | | | | | | | | | | | | | | | * The ALIAS name must match a validity regex. * Executables and libraries may be aliased. * An ALIAS acts immutable. It can not be used as the lhs of target_link_libraries or other commands. * An ALIAS can be used with add_custom_command, add_custom_target, and add_test in the same way regular targets can. * The target of an ALIAS can be retrieved with the ALIASED_TARGET target property. * An ALIAS does not appear in the generated buildsystem. It is kept separate from cmMakefile::Targets for that reason. * A target may have multiple aliases. * An ALIAS target may not itself have an alias. * An IMPORTED target may not have an alias. * An ALIAS may not be exported or imported.
* Optionally allow IMPORTED targets to be globally visibleBrad King2012-01-251-1/+8
| | | | | | | | | | | | Consider the case motivating commit e01cce28 (Allow add_dependencies() on imported targets, 2010-11-19). An imported target references a file generated at build time by a custom target on which it depends. Had the file been built directly using add_library or add_executable its target name would have been visible globally. Therefore the imported target representing the file should be globally visible also. Teach the IMPORTED signature of add_(executable|library) to accept a new "GLOBAL" option to make the imported target visible globally.
* Move automoc processing from add_executable/library to cmGlobalGeneratorAlex Neundorf2011-08-161-19/+1
| | | | | | | Now automoc is enabled by setting the AUTOMOC target property to true, instead of using the AUTOMOC keyword in add_executable() or add_library() Alex
* Refactor SetupAutomocTarget() so it can be run after creating the targetAlex Neundorf2011-08-161-12/+3
| | | | | | | This makes it easier to move it from InitialPass() to some other location, e.g. FinalPass() or something else. Alex
* Add the cmake module required currently for automocAlex Neundorf2011-08-141-1/+29
| | | | Alex
* 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.
* COMP: Fix shadowed local variable warning.Brad King2008-02-111-0/+2
|
* ENH: Enforce global target name uniqueness.Brad King2008-02-111-16/+8
| | | | | | | | - Error if imported target is involved in conflict - Error for non-imported target conflict unless CMAKE_BACKWARDS_COMPATIBILITY <= 2.4 - Include OUTPUT_NAME property in error message - Update add_executable and add_library command documentation
* ENH: Updated exporting and importing of targets to support libraries and ↵Brad King2008-01-281-4/+52
| | | | | | | | | | | | | | | | | | configurations. - Created cmExportFileGenerator hierarchy to implement export file generation - Installed exports use per-config import files loaded by a central one. - Include soname of shared libraries in import information - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators - Import files compute the installation prefix relative to their location when loaded - Add mapping of importer configurations to importee configurations - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries - Scope IMPORTED targets within directories to isolate them - Place all properties created by import files in the IMPORTED namespace - Document INSTALL(EXPORT) and EXPORT() commands. - Document IMPORTED signature of add_executable and add_library - Enable finding of imported targets in cmComputeLinkDepends
* 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
* COMP: compile fix and remove warningAlexander Neundorf2007-05-221-1/+1
| | | | Alex
* ENH: add the IMPORT keyword to ADD_EXECUTABLE(), which generates anAlexander Neundorf2007-05-221-0/+12
| | | | | | | | | | "imported" executable target. This can then be used e.g. with ADD_CUSTOM_COMMAND() to generate stuff. It adds a second container for "imported" targets, and FindTarget() now takes an additional argument bool useImportedTargets to specify whether you also want to search in the imported targets or only in the "normal" targets. Alex
* ENH: some code cleanupKen Martin2007-03-121-3/+3
|
* ENH: Renamed NOT_IN_ALL to EXCLUDE_FROM_ALL.Brad King2006-10-021-1/+1
|
* ENH: Added NOT_IN_ALL option for ADD_LIBRARY and ADD_EXECUTABLE to avoid ↵Brad King2006-10-021-1/+8
| | | | building the targets by default.
* STYLE: fix line lengthKen Martin2006-05-101-1/+2
|
* STYLE: some m_ to this-> cleanupKen Martin2006-03-151-1/+1
|
* ENH: fix bundles for Mac and XcodeBill Hoffman2006-01-051-23/+0
|
* ENH: better error checking for add library or executable with no source filesKen Martin2005-06-081-0/+6
|
* BUG: If macdir does not end with '/' then add it always, not just when ↵Andy Cedilnik2004-08-241-4/+4
| | | | adding current directory
* ENH: use GetRequiredDefinition instead of GetDefinition and crashBill Hoffman2004-08-111-1/+1
|
* ERR: Replacing hack call to CONFIGURE_FILE command with direct call to ↵Brad King2004-08-051-7/+1
| | | | m_Makefile->ConfigureFile.
* ENH: Unify with other variablesAndy Cedilnik2004-04-231-1/+1
|
* ENH: Improve Mac OSX bundle supportAndy Cedilnik2004-04-081-0/+2
|
* ENH: Styart working on bundles support and abstract WIN32_EXECUTABLEAndy Cedilnik2004-02-281-7/+53
|
* ENH: Moved ExpandListVariables out of individual commands. Argument ↵Brad King2002-12-111-5/+3
| | | | evaluation rules are now very consistent. Double quotes can always be used to create exactly one argument, regardless of contents inside.
* 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.
* removed some includesKen Martin2002-09-271-1/+0
|