summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'per-source-COMPILE_LANGUAGE-genex-support'Brad King2017-12-141-15/+22
|\ | | | | | | | | | | | | 10f58b27 Genex: Per-source $<COMPILE_LANGUAGE:...> support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1575
| * Genex: Per-source $<COMPILE_LANGUAGE:...> supportMarc Chevrier2017-12-131-15/+22
| | | | | | | | Fixes: #17542
* | cmIDEOptions: use std::string instead of const char*Vitaly Stakhovsky2017-12-091-2/+2
|/ | | | Revise method signatures to save a few c_str() conversions.
* Add generator expression support to per-source COMPILE_DEFINITIONSMarc Chevrier2017-12-051-3/+3
| | | | | | This allows users to specify different genex-based compile definitions for each file in a target. Fixes: #17508
* Merge topic 'src-genex-refactoring'Brad King2017-12-051-3/+2
|\ | | | | | | | | | | | | 6bffc13e Refactor per-source generator expression evaluation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1550
| * Refactor per-source generator expression evaluationMarc Chevrier2017-12-041-3/+2
| | | | | | | | | | | | Prepare to add generator expression support to more source properties. Factor out some duplicated code into a helper to avoid further duplication.
* | Use CM_FALLTHROUGH in Windows-specific codeBrad King2017-12-041-0/+2
|/ | | | | Some cases were missed by earlier sweeps due to not compiling Windows-specific code.
* cmSourceGroup: Return strings from GetName and GetFullNameBrad King2017-11-151-1/+1
|
* VS,Xcode: Add CMakeLists.txt sources without mutating targetsBrad King2017-10-181-46/+54
| | | | | | | | | | | | Rather than injecting `CMakeLists.txt` files into each target's `SOURCES`, teach the generators to add them during generation using dedicated code. This avoids mutating the original targets, and avoids polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific content. This also avoids listing the `CMakeLists.txt` sources in the results of `CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources` test no longer needs a separate case for IDEs.
* VS,Xcode: Fix TARGET_PROPERTY genex in source COMPILE_FLAGS propertyBrad King2017-10-031-1/+1
| | | | | | This already worked in other generators. Also add a test case. Fixes: #17314
* Merge topic 'auto_ptr'Brad King2017-09-271-2/+2
|\ | | | | | | | | | | | | | | f0489856 Retire std::auto_ptr and its macro CM_AUTO_PTR Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com> Merge-request: !1300
| * Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-2/+2
| | | | | | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* | VS: Adapt project parsers to support "ProjectGUID" without curly bracketsFredrik Orderud2017-09-261-1/+4
|/ | | | | | | This is needed to correctly parse Windows Installer "wiproj" projects, that by default contain "ProjectGUID" tags with GUID values without surrounding curly brackets. Otherwise CMake truncates the first & last character from the GUID value for these projects.
* Replace empty-string comparisons with checking against `empty()`.Pavel Solodovnikov2017-09-211-3/+3
|
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-2/+2
|
* MSVC: Add support for ARM64 architectureMinmin Gong2017-09-121-0/+1
| | | | | | Visual Studio 15.4 adds support for this architecture. Fixes: #17213
* 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.