summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Convert: Replace UNCHANGED conversions with new API callStephen Kelly2016-08-271-21/+15
|
* Convert: Replace uses of Convert(NONE)Stephen Kelly2016-08-271-7/+6
| | | | These are equivalent to ConvertToOutputFormat.
* Makefiles: Change AppendCustomCommand API to stringsStephen Kelly2016-08-271-4/+4
| | | | | Avoid the RelativeRoot enum. Supply the HOME_OUTPUT string at each callsite to make the parameter non-defaulted.
* Makefiles: Port CreateCDCommand to string-based APIStephen Kelly2016-08-271-3/+3
|
* fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-231-2/+9
|
* Makefile: Factor out response file checks into common helperBrad King2016-07-201-21/+4
| | | | | | Factor CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_{OBJECTS,LIBRARIES} lookup out into a common helper. Use a separate helper for each because more specific logic may be added to each later.
* Makefile: Factor out WINDOWS_EXPORT_ALL_SYMBOLS helperYury Zhuravlev2016-07-111-42/+1
| | | | | | Factor the implementation out of cmMakefileLibraryTargetGenerator into a helper method in cmMakefileTargetGenerator so it can be re-used elsewhere later.
* use CM_NULLPTRDaniel Pfeifer2016-06-281-4/+4
|
* Merge topic 'link_what_you_use'Brad King2016-06-171-0/+13
|\ | | | | | | | | | | a0902efa Help: Add notes for topic 'link_what_you_use' 96242f80 Add options to run `ldd -u -r` as a "link-what-you-use" tool
| * Add options to run `ldd -u -r` as a "link-what-you-use" toolBill Hoffman2016-06-171-0/+13
| | | | | | | | | | | | | | Create a LINK_WHAT_YOU_USE target property and corresponding CMAKE_LINK_WHAT_YOU_USE variable to enable this behavior. Extend link commands by running `ldd -u -r` to detect shared libraries that are linked but not needed.
* | Add missing braces around statements.Daniel Pfeifer2016-06-101-1/+2
| | | | | | | | | | Apply fixits of clang-tidy's readability-braces-around-statements checker.
* | Run ranlib on archives only if the tool is availableBrad King2016-06-081-1/+4
|/ | | | | | | | | | | | | CMakeFindBinUtils sets CMAKE_RANLIB to `:` if it is not available in order to get a no-op. This does not work on a Windows host build environment that runs commands in `cmd` instead of `sh`. Teach the Ninja and Makefile generators to simply skip the command if it is `:`. This this was already done by the Makefile generator since commit v2.6.0~3161 (BUG: Do not write link script lines that use the ':', 2006-06-18), but only when using a link script. Reported-by: Michael Jäntsch <Michael.Jaentsch@gmx.de>
* Simplify boolean expressionsDaniel Pfeifer2016-06-021-2/+1
| | | | | | Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
* Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-4/+3
| | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* Use enums defined in cmOutputConverter using their fully qualified name.Daniel Pfeifer2016-05-251-41/+43
| | | | | | | | | Mostly automated: values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT" "OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE" "FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree") for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-416/+339
| | | | | | | | | | | | | 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-9/+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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cmCommonTargetGenerator: Adopt AppendOSXVerFlag methodBruce Stephens2016-03-071-34/+0
| | | | | | | Move this method from cmMakefileLibraryTargetGenerator so it can be re-used for the Ninja generator too. Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
* cmGeneratorTarget: Add API for target-relative commands.Stephen Kelly2015-10-261-4/+4
|
* Makefiles: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-8/+11
|
* cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget.Stephen Kelly2015-10-191-2/+2
|
* cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.Stephen Kelly2015-10-191-3/+4
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmLocalGenerator: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-171-6/+6
|
* Use cmGeneratorTarget for property access.Stephen Kelly2015-10-171-7/+7
|
* Use GetName from cmGeneratorTarget.Stephen Kelly2015-10-171-4/+4
|
* cmGeneratorTarget: Move GetTargetVersion from cmTarget.Stephen Kelly2015-10-161-2/+2
|
* Merge topic 'clean-up-cmTarget'Brad King2015-10-161-21/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | 55474e61 cmState: Move GetTargetTypeName from cmTarget. 38df5c36 Remove now-obsolete casts. 4ee2b267 cmGeneratorTarget: Use enum for GetType. eac15298 cmState: Move TargetType enum from cmTarget. 482b3811 cmTarget: Move link type enum out. 2ee1cb85 cmTarget: Move ImportInfoMap out of internal class. a48bcabd cmTarget: Move backtrace member out of internal class. 6694d993 cmTarget: Remove unneeded constructors. 983c00f8 Generators: Use GetType from the cmGeneratorTarget.
| * cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-18/+18
| | | | | | | | | | | | | | 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-12/+12
| |
* | cmLocalUnixMakefileGenerator3: Port AppendCleanCommand to cmGeneratorTarget.Stephen Kelly2015-10-141-1/+1
|/
* cmGeneratorTarget: Move GetSupportDirectory from cmTarget.Stephen Kelly2015-10-121-2/+2
|
* cmGeneratorTarget: Move HasImplibGNUtoMS from cmTarget.Stephen Kelly2015-10-121-1/+1
|
* cmGeneratorTarget: Move GetPDBDirectory from cmTarget.Stephen Kelly2015-10-081-1/+2
|
* cmGeneratorTarget: Move GetDirectory from cmTarget.Stephen Kelly2015-10-081-4/+4
|
* Add support for *.manifest source files with MSVC toolsBrad King2015-09-171-0/+4
| | | | | | | | Classify .manifest sources separately, add dependencies on them, and pass them to the MS manifest tool to merge with linker-generated manifest files. Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
* cmGeneratorTarget: Move GetCompilePDBDirectory from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move GetLinkerLanguage from cmTarget.Stephen Kelly2015-08-051-5/+5
|
* cmGeneratorTarget: Move GetInstallNameDir* from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move NeedRelinkBeforeInstall from cmTarget.Stephen Kelly2015-08-051-2/+2
|
* cmGeneratorTarget: Move HasSOName from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move GetLibraryNames from cmTarget.Stephen Kelly2015-08-051-2/+2
|
* Windows: Optionally generate DLL module definition files automaticallyBill Hoffman2015-07-061-0/+53
| | | | | | | Create target property WINDOWS_EXPORT_ALL_SYMBOLS to automatically generate a module definition file from MS-compatible .obj files and give it to the linker in order to export all symbols from the .dll part of a SHARED library.
* cmMakefileTargetGenerator: Require cmGeneratorTarget.Stephen Kelly2015-06-221-1/+1
|
* Convert: Remove specification of default parameter.Stephen Kelly2015-05-201-1/+1
|
* cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-201-4/+4
|
* Merge topic 'custom-command-multiple-outputs'Brad King2015-03-091-3/+2
|\ | | | | | | | | 66a9c90c Makefile: Fix multiple custom command outputs regression (#15116)
| * Makefile: Fix multiple custom command outputs regression (#15116)Brad King2015-03-071-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit v3.2.0-rc1~272^2~2 (Makefile: Fix rebuild with multiple custom command outputs, 2014-12-05) we changed the generated makefile pattern for multiple outputs from out1: depends... commands... out2: out1 to out1 out2: depends... commands... This was based on the incorrect assumption that make tools would treat this as a combined output rule and run the command(s) exactly once for them. It turns out that instead this new pattern is equivalent to out1: depends... commands... out2: depends... commands... so the commands may be run more than once. Some documents suggest using a "dedicated witness" stamp file: stamp: depends... rm -f stamp touch stamp.tmp commands... mv stamp.tmp stamp out1 out2: stamp However, if the commands fail the error message will refer to the stamp instead of any of the real outputs, which may be confusing to readers. Also, this approach seems to have the same behavior of the original approach that motiviated the above commit: multiple invocations are needed to bring consumers of the outputs up to date. Instead we can return to the original approach but add an explicit touch to each extra output rule: out1: depends... commands... out2: out1 touch -c out2 This causes make tools to recognize that all outputs have changed and therefore to execute any commands that consume them.
* | Makefile: Add progress to link step messagesBrad King2015-02-071-1/+5
|/
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-3/+3
| | | | All compilers hosting CMake support the std class.