summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* install(EXPORT): Fix crash on target in another directoryBrad King2016-02-051-3/+5
| | | | | | | | | | | | | | | | Refactoring merged by commit v3.5.0-rc1~299 (Merge topic 'use-generator-target', 2015-10-20) in and around commit v3.5.0-rc1~299^2~13 (cmExportSet: Store a cmGeneratorTarget, 2015-10-17) changed export sets to delay looking up actual targets and stores only their names. However, in InstallCommand::HandleExportMode we need to lookup targets immediately to check them for EXPORT_LINK_INTERFACE_LIBRARIES. The check was accidentally made local to the current directory, so if an export set contains a target from another directory the lookup fails and CMake crashes. Fix the check to look up the target name globally, and tolerate when no target is found just in case. Reported-by: Kelly Thompson <kgt@lanl.gov>
* Merge topic 'fix-install-rules'Brad King2015-11-101-6/+1
|\ | | | | | | | | 9103d8ac Install: Move SetHaveInstallRule to a more-obvious place
| * Install: Move SetHaveInstallRule to a more-obvious placeStephen Kelly2015-11-081-6/+1
| | | | | | | | | | | | | | | | | | | | | | The moved-from location checks for the existence of whether certain generators are needed for any target in a loop, rather than whether the current target has an install rule. This was introduced in commit v3.4.0-rc1~275^2~3 (cmInstallCommand: Move the SetHaveInstallRule invocation., 2015-07-28). Move the SetHaveInstallRule call to a more-obvious place where the cmInstallTargetGenerator is constructed.
* | cmExportSet: Store a cmGeneratorTarget.Stephen Kelly2015-10-181-4/+5
| | | | | | | | Set the member at compute time from the stored name.
* | cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-13/+13
|/ | | | | | | 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
* cmInstallExportGenerator: Require cmLocalGenerator, not cmMakefile.Stephen Kelly2015-08-231-1/+1
|
* cmInstallFilesGenerator: Require cmLocalGenerator, not cmMakefile.Stephen Kelly2015-08-231-1/+1
|
* cmInstallCommand: Store only a targetName, not a cmTarget.Stephen Kelly2015-07-301-1/+2
| | | | Compute the cmTarget at Compute() time.
* cmInstallCommand: Move the SetHaveInstallRule invocation.Stephen Kelly2015-07-301-0/+6
| | | | | Remove the call from cmInstallTargetGenerator because that is to be ported away from cmTarget.
* install: Disallow installing export() result.Stephen Kelly2015-05-141-0/+41
|
* install: Use an intermediate filesVector variable.Stephen Kelly2015-05-141-3/+5
| | | | Reduce noise.
* Merge topic 'refactor-cmPolicies'Brad King2015-05-051-3/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+2
| |
* | Port to cmMakefile::GetGlobalGenerator.Stephen Kelly2015-05-031-17/+15
|/
* cmMakefile: Rename GetCurrent{,Source}Directory.Stephen Kelly2015-04-201-3/+3
| | | | Match the names used in cmake code.
* Merge topic 'join-algorithm'Brad King2015-01-121-13/+2
|\ | | | | | | | | | | | | 55a73e6b Use the cmJoin algorithm where possible. 8dc8d756 cmStandardIncludes: Add a join algorithm for string containers. b5813cee cmInstallCommand: Remove unused variable.
| * Use the cmJoin algorithm where possible.Stephen Kelly2015-01-081-12/+2
| |
| * cmInstallCommand: Remove unused variable.Stephen Kelly2015-01-081-1/+0
| |
* | Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-41/+41
|/ | | | All compilers hosting CMake support the std class.
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-3/+3
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* install(DIRECTORY): Add MESSAGE_NEVER option to avoid output (#13761)Brad King2014-06-241-1/+17
| | | | | | | | | | | | Installing large directories, e.g., the output of a doxygen run, prints one line per file resulting in too much noise in the build output. Add an option to the install(DIRECTORY) command to not print anything upon make install. Extend the RunCMake.install test with cases covering MESSAGE_NEVER behavior of the install(DIRECTORY) command. Suggested-by: Stefan Eilemann <Stefan.Eilemann@epfl.ch>
* install: Add CMAKE_INSTALL_MESSAGE variable (#13761)Brad King2014-06-241-4/+4
| | | | | | | | | Create a variable to allow users to control which installation messages are printed. In particular, provide a "LAZY" setting that prints "Installing" messages but not "Up-to-date" messages. This is desirable for incremental re-installations. Suggested-by: J Decker <d3ck0r@gmail.com>
* install: Thread message level setting through internal APIBrad King2014-06-241-1/+14
| | | | | | | Create a cmInstallGenerator::MessageLevel enumeration for future use in specifying install message verbosity. Thread values of the type through constructors and save the value as a member of cmInstallGenerator. Use only a "MessageDefault" value for now.
* Remove some c_str() calls.Stephen Kelly2014-03-111-38/+38
| | | | | | 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.
* 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.
* install: Support generator expressions in FILES and PROGRAMS modeBrad King2014-02-211-2/+3
| | | | | | | | Teach the install(FILES) and install(PROGRAMS) commands to evaluate generator expressions in the list of files. Extend the ExportImport test to cover installation cases involving generator expressions.
* cmInstallFilesGenerator: Add reference to calling cmMakefileBrad King2014-02-211-6/+10
| | | | | | Add a Makefile member to the cmInstallFilesGenerator class and populate it on construction. This will be useful in a following change to evaluate generator expressions with proper context.
* cmMakefile: make some methods take const std::string& instead of const char*Rolf Eike Beer2014-01-161-2/+2
| | | | | | | | 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.
* INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.Stephen Kelly2013-11-251-1/+2
| | | | | | | | | | | | | As an INTERFACE_LIBRARY has no direct link dependencies, we can short-circuit in cmGeneratorExpressionEvaluator and in cmGlobalGenerator::CheckLocalGenerators. As they do not generate any output directly, any generate- or install- related code acn also be short-circuited. Many of the local generators already do this. Because only INTERFACE related properties make sense on INTERFACE_LIBRARY targets, avoid setting other properties, for example via defaults.
* install: Teach EXPORT option to handle INTERFACE_LIBRARY targetsStephen Kelly2013-10-081-1/+7
|
* Add the ALIAS target concept for libraries and executables.Stephen Kelly2013-08-021-0/+9
| | | | | | | | | | | | | | | | | * 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.
* install: Remove error condition using INCLUDES DESTINATION without EXPORT.Stephen Kelly2013-07-291-7/+0
| | | | | | | | | | | | Commit 650e61f8 (Add a convenient way to add the includes install dir to the INTERFACE., 2013-01-05) introduced an error case for using the install(TARGETS) command with specified INCLUDES DESTINATION, but no specified EXPORT set. It is convenient to use a variable to set the various destinations for different outputs (as KDE does), and some targets such as executables are installed but not exported. This was triggering the error case, but as it is a common case, remove the error.
* Add a convenient way to add the includes install dir to the INTERFACE.Stephen Kelly2013-07-241-0/+24
| | | | | | | Export the INCLUDES DESTINATION without appending to the INTERFACE_INCLUDE_DIRECTORIES of the target itself. That way, a target can be exported multiple times with different INCLUDES DESTINATION without unintended cross-pollution of export sets.
* Export: Generate INTERFACE_LINK_LIBRARIES property on targets.Stephen Kelly2013-07-081-3/+30
| | | | | | | | | | This property is generated only for targets which have recorded policy CMP0022 as NEW, and a compatibility mode is added to additionally export the old interfaces in that case too. If the old interfaces are not exported, the generated export files require CMake 2.8.12. Because the unit tests use a version which is not yet called 2.8.12, temporarily require a lower version.
* exports: Hold an ExportSet pointer in cm*Export*GeneratorYury G. Kudryashov2012-09-281-1/+3
| | | | Get name from this->ExportSet.
* exports: Add cmExportSetMap classYury G. Kudryashov2012-09-281-1/+2
| | | | This is a map<string, cmExportSet *> with overloaded operator[] and destructor.
* exports: Rename cmGlobalGenerator::AddTargetToExport{s,}Yury G. Kudryashov2012-09-281-15/+1
| | | | This function adds target to one export, not to several exports.
* exports: Remove cmTargetExport constructorYury G. Kudryashov2012-09-281-0/+20
| | | | | The constructor was used exactly once. Setting members explicitly makes the code more readable.
* make default install component name configurableAlex Neundorf2012-05-141-13/+20
| | | | | | | | | Until now an unnamed component was always named "Unspecified". Now this name is taken from the new cmake variable CMAKE_INSTALL_DEFAULT_COMPONENT_NAME, which is initialized to "Unspecified". But it can now be set to something project-specific, per directory Alex
* -strip trailing whitespaceAlex Neundorf2012-05-131-22/+22
| | | | Alex
* Add OBJECT_LIBRARY target typeBrad King2012-03-131-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | This library type can compile sources to object files but does not link or archive them. It will be useful to reference from executable and normal library targets for direct inclusion of object files in them. Diagnose and reject the following as errors: * An OBJECT library may not be referenced in target_link_libraries. * An OBJECT library may contain only compiling sources and supporting headers and custom commands. Other source types that are not normally ignored are not allowed. * An OBJECT library may not have PRE_BUILD, PRE_LINK, or POST_BUILD commands. * An OBJECT library may not be installed, exported, or imported. Some of these cases may be supported in the future but are not for now. Teach the VS generator that OBJECT_LIBRARY targets are "linkable" just like STATIC_LIBRARY targets for the LinkLibraryDependencies behavior.
* cmInstallCommand: Fix line length for styleBrad King2012-01-171-9/+9
| | | | | After indentation was fixed by a previous commit some lines became too long. Re-wrap to shorten them.
* cmInstallCommand: Fix indentation errorYury G. Kudryashov2012-01-171-98/+98
| | | | A large block of code was indented 2 spaces less than it should.
* 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: Add install(DIRECTORY) option 'OPTIONAL'Brad King2009-02-241-1/+18
| | | | | | This adds the OPTIONAL option to the install(DIRECTORY) command. It tells the installation rule that it is not an error if the source directory does not exist. See issue #8394.
* ENH: Refactor install(DIRECTORY) argument parsingBrad King2009-02-241-100/+29
| | | | | | We previously used several booleans with at most one set to true at a time to track argument parsing state. This refactors it to use one enumeration.
* STYLE: fix line length stuff for KWStyleBill Hoffman2008-10-011-13/+14
|
* ENH: Further refinement of the CPack components functionality from Doug Gregor.David Cole2008-07-081-16/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Details: ========== - New cpack_add_component, cpack_add_component_group, and cpack_add_install_type "commands" defined as macros in the CPack module. - Documentation for all of the variables and commands in the CPack module. - Added get_cmake_property(... COMPONENTS) to CMake to ask for the names of all components. Used in the CPack module to automatically build component-based installers. (Set CPACK_MONOLITHIC_INSTALL to turn off component-based installation). - A group can declare its PARENT_GROUP, to build an arbitrary hierarchy of groups. - New CPack command cpack_configure_downloads, which creates an installer that downloads only the selected components on-the-fly. Those components marked DOWNLOADED will be separate packages downloaded on-the-fly (or, all packages can be marked as such with the ALL option to cpack_configure_downloads). Individual components are compressed with ZIP at installer-creation time and downloaded/uncompressed by the installer as needed. This feature is only available on Windows with NSIS at the moment. - NSIS installers can install themselves and enable the "Change" button in Add/Remove programs, allowing users to go back and install or remove components. This can be disabled through cpack_configure_downloads, because it's only really useful is most of the application's functionality is in downloaded components. - Bug fix: automatically install everything whose COMPONENT was not specified (it's a hidden, required group) - Bug fix: fixed removal of components when re-running the NSIS installer and unchecking components - Bug fix: NSIS installers now only install/remove the minimal number of files when re-run to update the installation (or by clicking "Change" in Add/Remove programs)
* BUG: Fix implementation of CMP0006 to not override the BUNDLE destination ↵Brad King2008-04-231-1/+1
| | | | with the RUNTIME destination.
* BUG: Fix compatibility with CMake 2.4 for installation of MACOSX_BUNDLE targetsBrad King2008-04-141-1/+47
| | | | | | - Add policy CMP0006 to decide whether to use compatibility - OLD behavior is to fall back to RUNTIME rules - NEW behavior is to produce an error