summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Performance: Fix a few more unnecessary vector copies missed in af3fd6fAaron Orenstein2017-08-181-8/+9
|
* IPO: Consider support for each language separatelyBrad King2017-06-141-1/+1
| | | | | | | | | We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and Fortran languages. Do not try to enable support for other languages. Furthermore, each language builds with a different compiler, so check for support by CMake and the compiler for each language independently. Fixes: #16944
* Merge topic '16760-refactor-get-mac-content-directory'Brad King2017-04-211-2/+4
|\ | | | | | | | | | | | | cf320f7c Replace boolean `implib` parameters with enum Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !662
| * Replace boolean `implib` parameters with enumGregor Jasny2017-04-201-2/+4
| | | | | | | | | | Named enumeration values are much clearer at call sites and add more type safety.
* | Drop Visual Studio 7 .NET 2003 generatorBrad King2017-04-191-20/+9
|/ | | | This generator has been deprecated since CMake 3.6. Remove it.
* VS: Teach generators how to mark per-config source filesBrad King2017-04-131-21/+42
| | | | | | | | | | | | | Add internal infrastructure for looping over all sources for all configurations and generating each source with exclusion marks for configurations in which they do not participate. This does not yet make per-config sources available in general but does set up some of the needed infrastructure. Unfortunately doing this cleanly will require major refactoring of both the VS 7-9 generators and the VS 10+ generators (for separate reasons). Instead add some extra internal structures to carry information where we need it.
* VS: List config-specific object library files on link linesBrad King2017-04-131-11/+10
| | | | | | In cases that we need to list object library files on link lines, look up the set of files matching the configuration of each link line.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* VS: Simplify logic collecting object library files as sourcesBrad King2017-04-111-26/+21
| | | | | | Object library files are already included by `GetExternalObjects` and `GetConfigCommonSourceFiles` so we don't need to call `UseObjectLibraries` to get them.
* Merge topic 'ipo-policy-CMP0069'Brad King2017-03-311-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | dfa8263f Implement interprocedural optimization for GNU compilers 1588a577 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION a7575700 Refactoring: s,GetFeatureAsBool,IsIPOEnabled, e05835c3 CheckIPOSupported: Visual Studio and Xcode generators do not support IPO Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com> Merge-request: !568
| * Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATIONRuslan Baratov2017-03-301-0/+3
| | | | | | | | | | | | | | | | | | Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was honored only for the Intel compiler on Linux and otherwise ignored. In order to add support for more compilers incrementally without changing behavior in the future, add a new policy whose NEW behavior enforces the `INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported compilers and otherwise produce an error.
* | VS: Fix OBJECT library support in Intel Fortran projectsChristian Pfeiffer2017-03-281-4/+6
|/ | | | | | | | | The `TargetExt` for `.vfproj` object libraries should be `.lib` to match the `OutputFile` value. Otherwise Visual Fortran raises warnings: TargetPath(...) does not match the Library's OutputFile property value (...)
* Merge topic 'module-def-and-WINDOWS_EXPORT_ALL_SYMBOLS'Brad King2017-03-221-1/+1
|\ | | | | | | | | | | | | | | | | | | | | 075f6454 Support WINDOWS_EXPORT_ALL_SYMBOLS with `.def` files 21c4ec4f cmGlobalVisualStudioGenerator: Simplify __create_def command generation 24361a45 bindexplib: Add support for parsing and integrating `.def` files 845c4824 bindexplib: Add method for parsing and integrating `.def` files 4f90e793 bindexplib: Revise coding style of CMake-specific methods Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !581
| * Support WINDOWS_EXPORT_ALL_SYMBOLS with `.def` filesBrad King2017-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | The `WINDOWS_EXPORT_ALL_SYMBOLS` target property exports all symbols found in object files explicitly given to the linker. However, the linker may also find additional symbols in dependencies and copy them into the linked binary (e.g. from `msvcrt.lib`). Provide a way to export an explicit list of such symbols by adding a `.def` file as a source file. Fixes: #16473
* | fix include order of windows.hDaniel Pfeifer2017-03-141-1/+1
|/ | | | | | Comments that indicate a special include order is necessary because GetCurrentDirectory might get redefined are outdated. Remove those outdated comments and use the normal ordering of includes.
* Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementationBrad King2017-03-091-18/+9
| | | | | | | Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a `.def` file as a source. Only one of these could be used within a single target before anyway.
* Refactor module definition file selectionBrad King2017-03-091-7/+5
| | | | | | Create a `ModuleDefinitionInfo` structure for each configuration of a target to hold corresponding information about the selected module definition file (`.def` source).
* VS: Refactor AdditionalOptions generationBrad King2017-02-151-4/+0
| | | | | | Store unknown flags directly in a flag map entry for `AdditionalOptions` instead of having a separate member for them. This avoids duplicating the output generation logic for the entry.
* VS: Fix quoting of special characters in cmake re-run check commandsBrad King2017-02-061-4/+2
| | | | | | | | | | | | | | | | Fix our calls to `AddCustomCommandToOutput` for adding cmake re-run check commands to disable old-style quoting in favor of the full quoting logic. This is necessary when paths contain special characters like `&` that old-style quoting logic does not handle. This also requires us to expand the `$(SolutionPath)` placeholder explicitly because otherwise its expanded value will no longer be quoted correctly. As a side effect, this fixes the value in VS 10 and above where the placeholder may be undefined when driving the build through MSBuild without the `.sln` file. Reported-by: Steven Cook <sc@harshbutfair.org> Fixes: #16585
* Add generator expression support to per-source COMPILE_FLAGSZsolt Parragi2016-10-281-1/+3
| | | | | | This allows users to specify different genex-based compile flags for each file in a target, e.g. compiling just a single file with `Od/Ox` in release builds on Visual Studio.
* cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-1/+1
| | | | Port dependent code to the change.
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-38/+39
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Convert: Move access to CurrentBinaryDirectory out of loopsStephen Kelly2016-09-191-6/+8
|
* Convert: Avoid START_OUTPUT enum when converting to relative pathsStephen Kelly2016-09-191-5/+5
|
* Convert: Replace Convert(FULL) with equivalentStephen Kelly2016-08-271-2/+2
| | | | | This is more explicit than funnelling everything through the Convert method.
* Convert: Replace UNCHANGED conversions with new API callStephen Kelly2016-08-271-10/+8
|
* VS: Replace FULL/UNCHANGED conversion with equivalentStephen Kelly2016-08-271-2/+2
|
* Windows: Honor WINDOWS_EXPORT_ALL_SYMBOLS for executables with exportsYury Zhuravlev2016-07-111-2/+4
| | | | | For executables with ENABLE_EXPORTS set, export all symbols when instructed to do so by WINDOWS_EXPORT_ALL_SYMBOLS.
* 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|'
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-061-4/+4
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'
* call static cmOutputConverter::GetFortranFormat without objectDaniel Pfeifer2016-06-061-2/+4
|
* Use enums defined in cmOutputConverter using their fully qualified name.Daniel Pfeifer2016-05-251-18/+23
| | | | | | | | | 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-1252/+962
| | | | | | | | | | | | | 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-14/+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.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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>
* Source: Stabilize include orderBrad King2016-04-291-1/+2
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* VS: Map Intel Fortran `/MP` flag for multi-processor compilation (#15990)Brad King2016-03-291-0/+5
|
* VS: Fix WinCE remote debugger tool per-config target nameBrad King2016-03-171-1/+2
| | | | | | | Fix the DebuggerTool RemoteExecutable value added by commit a22f9967 (VS: Optionally generate remote directory for WinCE projects, 2016-02-15) to account for the configuration when computing the target name.
* VS: Optionally generate remote directory for WinCE projectsAndrej Bosik2016-03-151-0/+26
| | | | | | | Teach the VS 2008 and 2005 generators to set the `RemoteDirectory` in `DeploymentTool` and the `RemoteExecutable` in `DebuggerTool`. Use a `DEPLOYMENT_REMOTE_DIRECTORY` target property to specify the value.
* cmLocalVisualStudio7Generator: Fix name of helper functionBrad King2016-03-091-3/+3
| | | | | Rename `cmLVS6G_IsFAT` to `cmLVS7G_IsFAT` since it is for the local VS 7 generator and not VS 6.
* cmGeneratorTarget: Add API for property keysStephen Kelly2015-10-271-5/+6
|
* VS7: Port some implementation details to cmGeneratorTargetStephen Kelly2015-10-271-4/+4
|
* cmGeneratorTarget: Add API for target-relative commands.Stephen Kelly2015-10-261-4/+4
|
* VS: Port interface to cmGeneratorTargetStephen Kelly2015-10-241-2/+2
|
* VS: Port TargetIsFortranOnly to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
|
* VS: Port ImplibDir to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
|
* VS: Port ComputeLongestObjectDirectory to cmGeneratorTargetStephen Kelly2015-10-241-5/+3
|
* VS7: Port to cmGeneratorTargetStephen Kelly2015-10-241-110/+98
|