summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileExecutableTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* use CM_NULLPTRDaniel Pfeifer2016-06-281-4/+6
|
* Add options to run `ldd -u -r` as a "link-what-you-use" toolBill Hoffman2016-06-171-0/+12
| | | | | | | 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.
* Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-3/+2
| | | | | 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-27/+28
| | | | | | | | | 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-220/+170
| | | | | | | | | | | | | 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-4/+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.
* cmGeneratorTarget: Add API for target-relative commands.Stephen Kelly2015-10-261-3/+3
|
* Makefiles: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-7/+9
|
* cmGeneratorTarget: Copy IsExecutableWithExports from cmTarget.Stephen Kelly2015-10-201-2/+2
|
* cmGeneratorTarget: Copy IsAppBundleOnApple from cmTarget.Stephen Kelly2015-10-191-1/+1
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmLocalGenerator: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-171-4/+4
|
* Use cmGeneratorTarget for property access.Stephen Kelly2015-10-171-3/+3
|
* Use GetName from cmGeneratorTarget.Stephen Kelly2015-10-171-1/+1
|
* cmGeneratorTarget: Move GetTargetVersion from cmTarget.Stephen Kelly2015-10-161-1/+1
|
* cmGeneratorTarget: Move GetSupportDirectory from cmTarget.Stephen Kelly2015-10-121-1/+1
|
* 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-2/+2
|
* 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-1/+1
|
* cmGeneratorTarget: Move NeedRelinkBeforeInstall from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move GetExecutableNames from cmTarget.Stephen Kelly2015-08-051-2/+2
|
* cmMakefileTargetGenerator: Require cmGeneratorTarget.Stephen Kelly2015-06-221-1/+1
|
* cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-201-3/+3
|
* Makefile: Add progress to link step messagesBrad King2015-02-071-1/+5
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-2/+2
| | | | All compilers hosting CMake support the std class.
* Watcom: Use single quote for all file/path items in wlink commandJiri Malak2014-04-081-3/+10
| | | | | | Watcom Linker use single quote if necessary for quoting target name, libraries names and libraries search path. Object names were already fixed.
* Makefile: Generate single-quoted object lists for WatcomJiri Malak2014-03-271-1/+3
| | | | | | | | | | | | | | | | Drop the CMAKE_NO_QUOTED_OBJECTS internal variable from the Makefile generators. The underlying problem is with the Watcom linker, not with WMake. The Watcom linker wants object files to be single-quoted. Add <LINK-RULE>_USE_WATCOM_QUOTE platform information variables to tell the generators to use Watcom-style single quotes for object files on link lines. On Windows, Watcom uses the GetCommandLine API to get the original command-line string and do custom parsing that expects single quotes. On POSIX systems, Watcom approximates the original command line by joining all argv[] entries separated by a single space. Therefore we need to double-quote the single-quoted arguments so that the shell does not consume them and they are available for the parser to see.
* Remove some c_str() calls.Stephen Kelly2014-03-111-20/+20
| | | | | | 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: Use strings in target nameBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-3/+3
|
* Windows: Use response files to specify link libraries for GNU toolsBrad King2014-03-051-1/+13
| | | | | | | | | Work around the command-line-length limit by using an @linklibs.rsp response file to pass the flags for link libraries. This allows very long lists of libraries to be used in addition to the existing support for passing object files via response file. Suggested-by: Peter Keuschnigg <peter.keuschnigg@pmu.ac.at>
* Makefile: Rename linker response file boolean to be more specificBrad King2014-03-051-4/+4
| | | | | Rename local variable useResponseFile to useResponseFileForObjects when it represents CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_OBJECTS.
* Makefile: Factor out some duplicate link libraries generationBrad King2014-03-041-6/+2
| | | | | | | The generators for executable and library targets duplicate the logic to call the OutputLinkLibraries helper on the local generator. Factor it out into a cmMakefileTargetGenerator::CreateLinkLibs method to avoid dpulication.
* MSVC: Add properties to configure compiler PDB files (#14762)Brad King2014-02-261-0/+4
| | | | | | | | | | Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files 2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY properties. Those properties now exclusively handle linker PDB files. Since STATIC libraries do not link their compiler PDB file becomes more important. Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and "COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB file location and pass the value to the MSVC /Fd option.
* Makefile: Fix per-config linker PDB output directoryBrad King2014-02-241-1/+1
| | | | | | Also, now that all call sites of cmTarget::GetPDBName and cmTarget::GetPDBDirectory pass the configuration, make the argument non-optional.
* Merge topic 'fix-compile-OBJECT_DIR'Brad King2014-01-021-7/+5
|\ | | | | | | | | 03f3b4e Replace <OBJECT_DIR> rule placeholder consistently (#14667)
| * Replace <OBJECT_DIR> rule placeholder consistently (#14667)Brad King2014-01-021-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The <OBJECT_DIR> placeholder is supposed to be the base intermediate files directory for the current target. This is how it gets replaced during link line generation. However, during compile line generation we replace it with the directory containing the current object file which may be a subdirectory. Fix replacement of <OBJECT_DIR> in the generated compile lines to be the base intermediate files directory. This was expoxed by commit 42ba1b08 (VS: Separate compiler and linker PDB files, 2013-04-05) when we added a "/Fd<OBJECT_DIR>/" flag to the MSVC compile line in order to match the VS IDE default compiler program database location in the intermediate files directory. For source files in a subdirectory relative to the current target this caused the wrong location to be used for the compiler program database. This becomes particularly important when using precompiled headers. While at it, use the cmTarget::GetSupportDirectory method to compute the intermediate files directory for the current target instead of repeating the logic in a few places.
* | Port some of the generator API to cmGeneratorTarget.Stephen Kelly2013-11-221-3/+3
|/ | | | | | | Just enough to reach the BuildMacContentDirectory method and the NeedRelinkBeforeInstall methods. In the future, those methods can be moved to cmGeneratorTarget.
* Revert "Use --sysroot when cross compiling."Stephen Kelly2013-07-121-16/+0
| | | | | | | This reverts commit de4da665d3205afa239749c41513a315c3831f51. This feature is not yet ready for release. It needs to be merged with the CMAKE_OSX_SYSROOT feature.
* Use --sysroot when cross compiling.Stephen Kelly2013-06-071-0/+16
| | | | | | | | | | As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is introduced, which is never a list. The contents of this variable is passed to supporting compilers as --sysroot. It is also accounted for when processing implicit link directories reported by the compiler, and when generating RPATH information.
* Refactor how bundles and frameworks are supported.Clinton Stimpson2013-05-231-4/+1
| | | | | | | | | | | | | | | | Make handling of directory separators consistent between non-bundle and bundle code. Remove xcode specific flag from cmTarget when getting install_name. Add (more) consistent convenience functions in cmTarget to get directories inside of bundles and frameworks to add files to. This refactor also fixes bug #12263 where frameworks had the wrong install name when SKIP_BUILD_RPATH. Also make install_name for frameworks consistent between Makefile and Xcode generator.
* Merge topic 'ninja-LIBPATH'Brad King2012-10-021-5/+7
|\ | | | | | | | | | | | | 1e47ccb Ninja: add option to enforce usage of response files e31df03 Ninja: move <OBJECTS> in front of the first linker option 8d674e7 Ninja: move -LIBPATH behind -link option
| * Ninja: move -LIBPATH behind -link optionPeter Kümmel2012-10-011-5/+7
| | | | | | | | Don' pass linker option to the compile
* | Merge topic 'vs-pdb-output'Brad King2012-10-011-1/+6
|\ \ | |/ |/| | | | | | | | | | | 2ccca05 Run PDBDirectoryAndName test on MSVC and Intel efc83b3 Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6 b294457 Verify that PDB_(NAME|OUTPUT_DIRECTORY) are honored in test 3f60dbf Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
| * Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)Yuchen Deng2012-09-251-1/+6
| | | | | | | | | | | | | | This enables changing the name and output folder of the debug symbol files produced by MS compilers. Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
* | Port cmLocalGenerator::GetTargetFlags to cmGeneratorTarget.Stephen Kelly2012-09-191-1/+2
| |
* | Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget.Stephen Kelly2012-09-191-1/+1
|/
* Re-factor bundle content copying rules generation.Nicolas Despres2012-07-171-3/+2
|