summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Improve string find: prefer character overloads.Daniel Pfeifer2016-05-241-4/+4
| | | | | Apply fix-its from clang-tidy's performance-faster-string-find checker. Ignore findings in kwsys.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-537/+370
| | | | | | | | | | | | | 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-36/+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.
* Merge topic 'clang-format-prep'Brad King2016-05-091-0/+22
|\ | | | | | | | | | | | | afca3735 Help clang-format wrap after braces on long initializer lists 85425a3e Move comments off of class access specifier lines 64b55203 Isolate formatted streaming blocks with clang-format off/on
| * Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix export file variable pollutionMatthew Woehlke2016-05-051-0/+3
|/ | | | | | | Add missing unset of scratch variables to generated export file for case that the file was already included. We already unset these when parsing the file normally, but the multiple inclusion case was leaving them around.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix export of STATIC library PRIVATE non-target dependenciesBrad King2016-02-171-0/+21
| | | | | | | | | | | | | | | | | | | In commit v3.5.0-rc1~43^2 (Fix export of STATIC library PRIVATE dependencies with CMP0022 NEW, 2016-01-15) we taught target_link_libraries to generate `$<LINK_ONLY:$<TARGET_NAME:dep>>` in INTERFACE_LINK_LIBRARIES instead of `$<LINK_ONLY:dep>` so that `dep` can be recognized as a target name and updated during export. However, this approach does not work when `dep` is just a plain library name and not a target because `$<TARGET_NAME:...>` requires the name of a reachable target. Since we do not know during target_link_libraries whether the name will correspond to a reachable target or not, we cannot inject the `$<TARGET_NAME:...>` expression. Revert this change and solve the original problem instead by teaching the export logic to recognize and update target names directly in `$<LINK_ONLY:...>` expressions. Reported-by: Ben Boeckel <ben.boeckel@kitware.com>
* Export: Use existing IsDLLPlatform porcelainStephen Kelly2015-10-271-4/+1
|
* Use cmLocalGenerator at generate-time.Stephen Kelly2015-10-241-6/+6
|
* Access policy status from cmGeneratorTarget at generate time.Stephen Kelly2015-10-201-6/+4
|
* cmGeneratorTarget: Copy IsExecutableWithExports from cmTarget.Stephen Kelly2015-10-201-1/+1
|
* cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget.Stephen Kelly2015-10-191-1/+1
|
* cmGeneratorTarget: Copy IsAppBundleOnApple from cmTarget.Stephen Kelly2015-10-191-1/+1
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.Stephen Kelly2015-10-191-1/+1
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmGeneratorTarget: Move IsLinkable from cmTarget.Stephen Kelly2015-10-191-1/+1
|
* cmGeneratorTarget: Move GetExportName from cmTarget.Stephen Kelly2015-10-181-6/+5
|
* Export: Port internal API to cmGeneratorTarget.Stephen Kelly2015-10-181-4/+4
|
* Export: Port internal utility to cmGeneratorTarget.Stephen Kelly2015-10-181-1/+1
|
* Export: Port some API to cmGlobalGenerator.Stephen Kelly2015-10-181-1/+0
|
* Export: Port interface to cmGeneratorTarget.Stephen Kelly2015-10-181-35/+34
|
* cmExportSet: Store a cmGeneratorTarget.Stephen Kelly2015-10-181-8/+4
| | | | Set the member at compute time from the stored name.
* 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
* cmGeneratorExpression: Port interface to cmGeneratorTarget.Stephen Kelly2015-10-121-1/+1
|
* cmGeneratorExpression: Port to cmLocalGenerator.Stephen Kelly2015-10-121-1/+1
|
* cmComputeLinkInformation: Port data interface to cmGeneratorTarget.Stephen Kelly2015-10-121-6/+7
|
* Merge topic 'use-generator-target'Brad King2015-10-121-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1c1c2a12 cmGeneratorTarget: Port ExpandLinkItems away from cmTarget. c66084f5 cmGeneratorTarget: Port GetImportLinkInterface away from cmTarget. 83c29e39 cmGeneratorTarget: Port ComputeLinkImplementationLibraries away from cmTarget. 19882554 cmGeneratorTarget: Port handleSystemIncludesDep away from cmTarget. c1f687b1 cmGeneratorTarget: Port GetLinkImplementationLibrariesInternal. a6e1f05c cmGeneratorTarget: Port ComputeLinkInterface away from cmTarget. 654002fe cmGeneratorTarget: Port ComputeLinkInterfaceLibraries away from cmTarget. 922c8901 cmGeneratorTarget: Port GetLinkInterface away from cmTarget. eaa5b9cb cmGeneratorTarget: Port cmTargetCollectLinkLanguages away from cmTarget. f539da12 cmGeneratorTarget: Port GetLinkInterfaceLibraries away from cmTarget. 1c5d70f9 cmGeneratorTarget: Port processILibs away from cmTarget. 064c2488 cmComputeLinkDepends: Port some API to cmGeneratorTarget. 3e428fdc cmGeneratorTarget: Move IsImportedSharedLibWithoutSOName from cmTarget. 110fd2fb cmGeneratorTarget: Move GetOutputTargetType from cmTarget. e7391699 cmGeneratorTarget: Move HasMacOSXRpathInstallNameDir from cmTarget. c5718217 cmGeneratorTarget: Move HaveInstallTreeRPATH from cmTarget. ...
| * cmGeneratorTarget: Port GetLinkInterface away from cmTarget.Stephen Kelly2015-10-101-2/+2
| |
* | cmLocalGenerator: Add Home directory accessors.Stephen Kelly2015-10-081-2/+4
| | | | | | | | Reduce reasons for cmLocalGenerator to have a cmMakefile.
* | export: Port internal method to cmGeneratorTarget.Stephen Kelly2015-10-081-12/+14
|/
* cmExportFileGenerator: Evaluate genex with cmGeneratorTarget.Stephen Kelly2015-10-051-6/+8
|
* cmGeneratorTarget: Move GetLinkInterface from cmTarget.Stephen Kelly2015-08-261-5/+3
|
* cmTarget: Move link interface libraries struct out.Stephen Kelly2015-08-261-2/+2
|
* cmGeneratorTarget: Move GetInstallNameDir* from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move HasSOName from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move GetLinkInformation from cmTargetStephen Kelly2015-08-051-1/+1
|
* Export: Port more API to cmGeneratorTarget.Stephen Kelly2015-08-051-6/+7
|
* cmGeneratorTarget: Move GetSOName from cmTarget..Stephen Kelly2015-08-051-1/+1
|
* Port some of the cmExportFileGenerator API to cmGeneratorTarget.Stephen Kelly2015-07-271-16/+21
| | | | | Enough to make it more possible to move GetLinkInterface to cmGeneratorTarget.
* Export: Escape exported property values when writing CMake language filesBrad King2015-06-241-3/+21
| | | | | | | | When writing export files, correctly encode property values that contain characters special to the CMake language parser. We must ensure that they parse correctly when loaded on the consuming side. Reported-by: Dan Liew <dan@su-root.co.uk>
* Port to static cmPolicies API.Stephen Kelly2015-05-041-4/+2
|
* Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
|
* Allow export of targets with INTERFACE_SOURCES.Stephen Kelly2015-02-101-43/+93
| | | | | | Use the same rules for paths in source and binary dirs in installed INTERFACE_SOURCES as are used for INTERFACE_INCLUDE_DIRECTORIES.
* Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-7/+7
| | | | | | | | All compilers hosting CMake support the std class.
* | Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-5/+1
|/
* cmExportFileGenerator: Make SetImportLinkProperty a templateBrad King2014-06-231-4/+4
| | | | | Allow the vector of property entries to have any element type that can convert to std::string.
* genex: remove the need for backtracesBen Boeckel2014-06-051-2/+1
| | | | | Rather than making dummy backtraces and passing them around, just make backtraces optional.
* CMP0052: Make the warning message more informative.Stephen Kelly2014-04-171-1/+4
| | | | | Print the reason for the offending entry in the INTERFACE_INCLUDE_DIRECTORIES.
* CMP0052: Do not warn when include dir is not in source or build treeBrad King2014-04-161-4/+6
| | | | | | | When the policy was added by commit 783bce29 (Export: Disallow exported interface includes in src/build tree, 2014-03-31) it accidentally left a code path that would warn when the include dir is in the install tree but *not* in the source or build tree. Fix that.