summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* CPack: don't use else after returnDaniel Pfeifer2016-08-181-1/+2
|
* Merge topic 'compat-CPACK_INSTALL_CMAKE_PROJECTS-subdirectory'Brad King2016-07-201-1/+2
|\ | | | | | | | | 57534990 CPack: Add compatibility for incorrect CPACK_INSTALL_CMAKE_PROJECTS value
| * CPack: Add compatibility for incorrect CPACK_INSTALL_CMAKE_PROJECTS valueBrad King2016-07-191-1/+2
| | | | | | | | | | | | | | | | | | | | Since commit v3.6.0-rc1~339^2 (CPack: Fix CPACK_INSTALL_CMAKE_PROJECTS SubDirectory (4th) option, 2016-02-18) we now honor the "Directory" option of this variable. Prior to that commit the value was not used so projects may have used a placeholder value like `.` instead of `/`. Treat `.` the same as `/` to restore compatibility with such projects. Fixes #16205.
* | Use better KWSys SystemTools::GetEnv and HasEnv signaturesDāvis Mosāns2016-07-181-4/+4
| |
* | 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-10/+12
|/
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-799/+574
| | | | | | | | | | | | | 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-38/+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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* CPack: Fix CPACK_INSTALL_CMAKE_PROJECTS SubDirectory (4th) optionDaniel Wirtz2016-02-181-2/+1
|
* cmState: Initialize default definitions immediately.Stephen Kelly2015-10-131-0/+1
| | | | Don't leave this as cmMakefile responsibility.
* CPack: Remove needless cmLocalGenerator creation.Stephen Kelly2015-10-051-3/+0
|
* CPack: allow packaging of empty directoriesDomen Vrankar2015-09-281-1/+9
|
* Revert topic 'cpack-package-empty-dirs'Brad King2015-09-251-4/+0
| | | | | | | | | The changes in commit 47b060ae (CPackDeb: allow empty directories in component packages, 2015-09-21), commit b58de9fe (CPack: allow packaging of empty directories, 2015-09-21), and commit b761e90d (CPack: remove accidental changes, 2015-09-22) regressed packaging of CMake itself. Revert the changes until they can be revised and rebased on other changes that make additional fixes.
* CPack: remove accidental changesDomen Vrankar2015-09-231-1/+0
| | | | | Remove changes accidentally included in commit b58de9fe (CPack: allow packaging of empty directories, 2015-09-22).
* CPack: allow packaging of empty directoriesDomen Vrankar2015-09-221-0/+5
|
* cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-281-2/+3
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* cmGlobalGenerator: Remove MakeLocalGenerator method.Stephen Kelly2015-08-281-1/+1
| | | | Inline implementation to callers.
* cmGlobalGenerator: Require a snapshot to create a local generator.Stephen Kelly2015-08-281-1/+2
|
* cmGlobalGenerator: Require a cmake instance in ctor.Stephen Kelly2015-05-271-2/+1
| | | | It is required anyway, so this makes it explicit.
* Merge topic 'refactor-cmLocalGenerator'Brad King2015-05-191-0/+2
|\ | | | | | | | | | | | | | | | | fa9eb814 cmLocalGenerator: Remove redundant path access. 1933f3d1 cmLocalGenerator: Remove redundant path conversions. 9e4b6cc2 cmState: Store computed relative paths to to current directories. 991f5e49 cmState::Snapshot: Store components for current directories. 57bdc1a2 cmState: Compute and store directory components.
| * cmState: Compute and store directory components.Stephen Kelly2015-05-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to duplicate these in all cmLocalGenerators. Rename the symbols according to current conventions. Add explicit calls to Set{Source,Binary}Directory with empty strings in order to trigger the population of the components containers with the current working directory in cmLocalGenerator. Having directories set to empty is a special case in CMake, which is relied on for the `if(CMAKE_BINARY_DIR)` condition at the end of CMakeDetermineSystem.cmake.
* | cmGlobalGenerator: Add NVI wrapper to create local generator.Stephen Kelly2015-05-161-1/+1
|/
* cmSystemTools: Teach RunSingleCommand to separate stdout and stderrBrad King2015-04-201-2/+3
| | | | | | | Extend the RunSingleCommand signature to capture stdout and stderr separately. Allow both to be captured to the same std::string to preserve existing behavior. Update all call sites to do this so that this refactoring does not introduce functional changes.
* cmMakefile: Remove always-null first parameter to ReadListFile.Stephen Kelly2015-04-181-4/+4
|
* CPack: Read the config listfile in the normal way.Stephen Kelly2015-04-181-1/+1
| | | | | | | | | | | | | This is a unique function call in CMake, and it was likely a programming error when introduced. All other similar calls to ReadListFile use a null first paramter. The effect of this patch is to no-longer define CMAKE_PARENT_LIST_FILE to the config file itself while evaluating it. The ReadListFile method also no longer hits a condition that it uses CollapseFullPath on the input file. However, as cpack does not set the StartDirectory anyway, this has no effect. See bug 15522.
* CPack: Fix single component packagingRaffi Enficiaud2015-04-161-2/+2
| | | | | | Refine logic added in commit 0ffd3534 (CPack single component packaging, 2015-04-02). Component packaging should be enabled if either at least one component or one group is set and should not require both.
* CPack single component packagingDomen Vrankar2015-04-051-1/+4
| | | | | | | | RPM, DEB and archive packages were not created in cases when CPACK_<generator>_COMPONENT_INSTALL was set to ON and a single component existed. Patch also changes CPackRPM test to implicitly test for this case.
* CPack: Fix make tool selection during preinstall (#15483)Brad King2015-03-311-15/+8
| | | | | | | | The CMAKE_MAKE_PROGRAM selected by CMake while configuring the project should also be used to drive the "preinstall" target during packaging. Teach CPack to use "cmake --build" instead of constructing the build command line itself. The "cmake --build" command already knows how to select the proper make tool.
* cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for NinjaGregor Jasny2015-02-261-1/+1
| | | | | | | | | The Ninja build system does not support a in-file verbositiy switch. Instead teach 'cmake --build' to extract the CMAKE_VERBOSE_MAKEFILE setting and pass it as an optional '-v' argument to Ninja. This can serve as a reasonable fallback. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* cmStandardIncludes: Remove list include.Stephen Kelly2015-02-061-0/+1
| | | | Include it only where used.
* CPack: Fix packaging of source tarballs with symbolic linksBill Hoffman2015-01-301-0/+12
| | | | | | When staging the package installation, if the first file in a directory happens to be a symbolic link, make sure we create the directory before trying to create the link.
* Replace 'foo.length() > 0' 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.
* CPack invalid CMake generatorDomen Vrankar2015-01-021-0/+8
| | | | | | Case where CPACK_CMAKE_GENERATOR value is non existent or or contains multiple words that were not quoted was not handled and produced a segmentation fault.
* Remove some unneeded c_str calls.Stephen Kelly2014-11-231-6/+6
|
* 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.
* Fix used value warning.Bill Hoffman2014-08-051-2/+1
| | | | | packageFileName no longer has only one value in this function. Move the declaration into the loop and remove its initial and unused asignment.
* cmCPackGenerator: Avoid crash on undefined CMAKE_MAKE_PROGRAMBrad King2014-06-251-2/+2
| | | | | | | | | | | Since commit 6557382d (stringapi: Use strings for program paths, 2014-02-24), cmGlobalGenerator::GenerateBuildCommand takes the make program path as a std::string. Fix the lookup in cmCPackGenerator::InstallProjectViaInstallCMakeProjects to use GetSafeDefinition for CMAKE_MAKE_PROGRAM to avoid possible construction of std::string from a NULL. Reported-by: Richard Wirth <richard@califax.de>
* Add an "installed file" property scopeNils Gladitz2014-05-281-0/+8
| | | | | | | Teach set_property and get_property an "INSTALL" property type to be associated with install-tree file paths. Make the properties available to CPack for use during packaging. Add a "prop_inst" Sphinx domain object type for documentation of such properties.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-16/+16
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* 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.
* stringapi: Prevent a NULL dereference in WiXBen Boeckel2014-03-081-1/+1
|
* stringapi: Miscellaneous char* parametersBen Boeckel2014-03-081-1/+1
|
* stringapi: Pass strings as install directories in CPackBen Boeckel2014-03-081-9/+9
|
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-3/+4
|
* stringapi: Use strings in CPack generator parametersBen Boeckel2014-03-081-5/+7
| | | | | | Most of these are turned into strings in the body of the method (multiple times in some cases). Accept strings to simplify the API and keep string construction down.
* stringapi: Use strings for variable namesBen Boeckel2014-03-081-9/+5
| | | | Variable names are always generated by CMake and should never be NULL.
* CPackWIX: Allow Windows Installer property customizationNils Gladitz2014-03-011-0/+6
|