summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmGeneratorTarget: Constify cmSourceFile* in containers.Stephen Kelly2014-03-131-16/+16
| | | | | Some of them will be used with other APIs which require value_type to be cmSourceFile const*.
* Constify some APIs in generators.Stephen Kelly2014-03-131-5/+6
|
* Generalize cmCustomCommandGenerator to more fieldsBrad King2014-03-121-11/+12
| | | | | | | Until now the cmCustomCommandGenerator was used only to compute the command lines of a custom command. Generalize it to get the comment, working directory, dependencies, and outputs of custom commands. Update use in all generators to support this.
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-20/+19
|
* Merge topic 'msvc-compiler-pdb-files'Brad King2014-02-261-0/+11
|\ | | | | | | | | | | | | | | | | fba51b09 MSVC: Add properties to configure compiler PDB files (#14762) 3737860a cmTarget: Add per-config compilation info 718a9532 cmTarget: Refactor ComputePDBOutputDir interface aae5184c Help: Refactor PDB_NAME and PDB_OUTPUT_DIRECTORY docs b4aac0ca Makefile: Fix per-config linker PDB output directory
| * MSVC: Add properties to configure compiler PDB files (#14762)Brad King2014-02-261-0/+11
| | | | | | | | | | | | | | | | | | | | 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.
* | cmGeneratorTarget: Use a method to access the definition file.Stephen Kelly2014-02-241-3/+3
|/
* cmMakefile: Make FindSourceGroup const.Stephen Kelly2014-01-221-4/+4
| | | | | Return a pointer instead of a reference. This allows making the accessor const with the least impact.
* Merge topic 'minor-cleanups'Brad King2014-01-091-22/+36
|\ | | | | | | | | | | | | | | 531e40b cmTarget: Make GetSourceFiles populate an out-vector parameter. 38de54c cmGeneratorTarget: Add methods to access source file groups. f579fe0 Help: Fix link to MAP_IMPORTED_CONFIG_<CONFIG> 590d238 cmTarget: Handle NO_SYSTEM_FROM_IMPORTED.
| * cmTarget: Make GetSourceFiles populate an out-vector parameter.Stephen Kelly2014-01-091-1/+2
| | | | | | | | | | In a future patch, this will also be populated with extra sources from the linked dependencies.
| * cmGeneratorTarget: Add methods to access source file groups.Stephen Kelly2014-01-091-21/+34
| | | | | | | | | | These methods and others will be able to get a config parameter later to implement the INTERFACE_SOURCES feature.
* | Merge topic 'vs10-include-backslashes'Brad King2014-01-091-1/+3
|\ \ | |/ |/| | | | | c131107 VS: Convert include path to backslashes for VS >= 10
| * VS: Convert include path to backslashes for VS >= 10Brad King2014-01-081-1/+3
| | | | | | | | | | | | | | | | | | | | In VS <= 9 we already convert include paths to use backslashes but the conversion was left out of the VS >= 10 generator. Add the conversion now for consistency. VS 11 and 12 now require it because they mistakenly interpret forward-slash options that happen to occur in paths: http://connect.microsoft.com/VisualStudio/feedback/details/778367
* | Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-1/+1
| | | | | | | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* | Constify handling of target dependencies.Stephen Kelly2013-12-111-1/+1
| |
* | INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.Stephen Kelly2013-11-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | As an INTERFACE_LIBRARY has no direct link dependencies, we can short-circuit in cmGeneratorExpressionEvaluator and in cmGlobalGenerator::CheckLocalGenerators. As they do not generate any output directly, any generate- or install- related code acn also be short-circuited. Many of the local generators already do this. Because only INTERFACE related properties make sense on INTERFACE_LIBRARY targets, avoid setting other properties, for example via defaults.
* | cmTarget: Make custom command accessors API const.Stephen Kelly2013-11-191-3/+3
| | | | | | | | Add specific mutators instead of providing non-const refs.
* | MSVC: Fix encoding of Visual Studio 10+ project files.Clinton Stimpson2013-11-141-2/+4
| | | | | | | | | | Use Windows-1252, which is the same encoding as older Visual Studio project files.
* | Move TraceDependencies to cmGeneratorTarget.Stephen Kelly2013-10-301-2/+3
| |
* | Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-1/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | This target type only contains INTERFACE_* properties, so it can be used as a structural node. The target-specific commands enforce that they may only be used with the INTERFACE keyword when used with INTERFACE_LIBRARY targets. The old-style target properties matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for this target type. The name of the INTERFACE_LIBRARY must match a validity generator expression. The validity is similar to that of an ALIAS target, but with the additional restriction that it may not contain double colons. Double colons will carry the meaning of IMPORTED or ALIAS targets in CMake 2.8.13. An ALIAS target may be created for an INTERFACE library. At this point it can not be exported and does not appear in the buildsystem and project files are not created for them. That may be added as a feature in a later commit. The generators need some changes to handle the INTERFACE_LIBRARY targets returned by cmComputeLinkInterface::GetItems. The Ninja generator does not use that API, so it doesn't require changes related to that.
* VS: Generate ToolsVersion matching each VS versionRobert Maynard2013-08-261-12/+20
| | | | | | The MSBuild version for each Visual Studio generator isn't 4.0. With Visual Studo 2013 the ToolsVersion moved from being tied to the .NET framework and now has its own version number.
* VS10: Add support for assembler code (#11536)Patrick Gansterer2013-08-051-12/+35
| | | | | Use the masm BuildCustomizations, which are part of the Visual Studio installation to allow compilation of asm files.
* VS10: Escape include paths in XML project files (#14331)Brad King2013-08-011-1/+1
| | | | | | Fix generation of the AdditionalIncludeDirectories element content to escape for XML syntax. We already escape content of other elements, this one was simply missing by accident.
* VS10: Honor user-specified /SUBSYSTEM: flag (#14326)Brad King2013-07-311-2/+2
| | | | | | Use the WIN32_EXECUTABLE target property only to set the SubSystem build attribute default. When user-specified flags are later parsed they may then override it.
* Unify the way the flags of a static library are readPatrick Gansterer2013-07-311-8/+5
| | | | | Introduce cmLocalGenerator::GetStaticLibraryFlags() to have a central function for getting the linker flags for a given target.
* Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.Stephen Kelly2013-07-111-2/+3
| | | | Refactor to create AddCompileDefinitions.
* Merge topic 'vs12-generator'Brad King2013-07-011-6/+18
|\ | | | | | | | | | | | | | | | | 9a76d83 VS12: Find proper MSBuild for VSProjectInSubdir test 4e5cb39 Merge branch 'master' into vs12-generator 78fdbbc FindBoost: Add -vc120 mangling for VS 12 e99d7b1 VS12: Generate flag tables from MSBuild v120 tool files 77ac9b8 VS12: Add Visual Studio 12 generator (#14251)
| * Merge branch 'master' into vs12-generatorBrad King2013-06-281-22/+103
| |\ | | | | | | | | | | | | Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping the side from 'master'.
| * | VS12: Generate flag tables from MSBuild v120 tool filesBrad King2013-06-281-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run cmparseMSBuildXML.py on cl.xml, lib.xml, and link.xml to generate our flag tables: python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/cl.xml" > cmVS12CLFlagTable.h python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/lib.xml" > cmVS12LibFlagTable.h python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/link.xml" > cmVS12LinkFlagTable.h Fix up the declaration names at the top of each file. Finally, teach cmVisualStudio10TargetGenerator to select the version of the table matching the version of VS.
* | | Merge topic 'vs-windows-forms'Brad King2013-07-011-8/+45
|\ \ \ | |_|/ |/| | | | | | | | 6c9712c VS: Add Resx configuration to the vcxproj file
| * | VS: Add Resx configuration to the vcxproj fileJonas Andersen2013-06-281-8/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my project group we are using CMake to generate c++/cli winform projects and I noticed the work done in commit 79ec7868 (VS: Add Windows Forms Support, 2013-04-29) was in the right direction for solving some of the problems we were facing. The changes as submitted was breaking some functionality in our projects, so I made some changes that fixes our problems and I believe that it will also work for others. * Resx files did not link correctly with the winform h-file so I added the Resx configuration to the vcxproj file. * I removed the functionality for setting <CLRSupport> true for the project based on if an resx-file is pressent. This is preventing us from using native cpp code. Also this do not address that some projects will need to set other options like clr:pure, clr:safe. This could be implemented as a cmake option, so it is possible to specify exactly what is needed. Existing VSWindowsFormsResx Test project is updated so it will be working with my changes.
* | | Refactor target COMPILE_OPTIONS and COMPILE_FLAGS handlingBrad King2013-06-271-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the cmLocalGenerator GetCompileOptions method with an AddCompileOptions method since all call sites of the former simply append the result to a flags string anyway. Add a "lang" argument to AddCompileOptions and move the CMAKE_<LANG>_FLAGS_REGEX filter into it. Move the call sites in each generator to a location that has both the language and configuration available. In the Makefile generator this also moves the flags from build.make to flags.make where they belong.
* | | Merge topic 'add-whitespace'Brad King2013-06-241-3/+3
|\ \ \ | | | | | | | | | | | | | | | | 2331b57 Add whitespace after colons in error messages.
| * | | Add whitespace after colons in error messages.Stephen Kelly2013-06-211-3/+3
| | | |
* | | | VS: Add support for .NET target framework versionChristian Maaser2013-06-141-0/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Teach CMake to generate the TargetFrameworkVersion XML node as documented at http://msdn.microsoft.com/en-us/library/vstudio/ff770576.aspx from target property VS_DOTNET_TARGET_FRAMEWORK_VERSION.
* | | Merge topic 'target-COMPILE_OPTIONS'Brad King2013-06-031-1/+5
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | 24466f2 Add target_compile_options command. 80ca9c4 Add COMPILE_OPTIONS target property. 7cb2308 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries 47f80d9 cmTarget: Rename struct to be more re-usable. 1319a14 Add <LANG>_COMPILER_ID generator expressions. 3549676 Add cmLocalGenerator::GetCompileOptions. f3ad863 VS6: Rename some variables to correspond to config values.
| * | Add cmLocalGenerator::GetCompileOptions.Stephen Kelly2013-06-021-1/+5
| | | | | | | | | | | | | | | | | | Currently it only adds the contents of the COMPILE_FLAGS target property, but it can be extended to handle a new COMPILE_OPTIONS generator expression enabled property.
* | | Merge topic 'vs-RootNamespace'Brad King2013-06-031-0/+9
|\ \ \ | |/ / |/| | | | | | | | cca955a VS: Add VS_GLOBAL_ROOTNAMESPACE target property
| * | VS: Add VS_GLOBAL_ROOTNAMESPACE target propertyJohn Farrier2013-05-311-0/+9
| | | | | | | | | | | | | | | Add a setting for Visual Studio projects for the root namespace in the "Globals" PropertyGroup section of the project file.
* | | Merge topic 'vs-asm-listing-location'Brad King2013-05-211-3/+2
|\ \ \ | | | | | | | | | | | | | | | | 7e0c45e VS: Allow /Fa to set AssemblerListingLocation (#14153)
| * | | VS: Allow /Fa to set AssemblerListingLocation (#14153)Brad King2013-05-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate the default AssemblerListingLocation through the flag map so that it can be overridden by a user /Fa flag. Also teach the VS 7-9 generators to map /Fa to AssemblerListingLocation. While at it, fix the AssemblerListingLocation default value to have a trailing slash after the configuration name. This ensures it will be treated as a directory and not a file name.
* | | | Merge topic 'vs-windows-forms'Brad King2013-05-211-2/+64
|\ \ \ \ | |/ / / |/| / / | |/ / | | | 79ec786 VS: Add Windows Forms Support
| * | VS: Add Windows Forms SupportJohn Farrier2013-05-161-2/+64
| |/ | | | | | | | | | | | | Add support to maintain designer functionality for Visual Studio C++ Windows Forms projects. Also add a test project showing how to use the CMakeLists.txt file and, when successfully configured, will allow use of the designer for the included form.
* | Merge topic 'doc-improvements'Brad King2013-05-161-0/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7cc2805 Docs: Clarify wording "flag used" => "flag (to|will) be used" 2378a69 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames 56ca34d Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES) 2bab472 VS10: add detailed comment about MIDL processing e619111 Explain distribution of Win9x binary on all Windows versions. 5ca4336 FindwxWidgets: add DOC strings with usual style f57800d Fix spelling and typos (product names) bf019d7 Fix spelling and typos (non-binary) ddac8d3 Fix spelling and typos (affecting binary data / module messages) 86832ce Fix spelling and typos (affecting users)
| * | VS10: add detailed comment about MIDL processingAndreas Mohr2013-05-071-0/+15
| |/
* | VS: Separate compiler and linker PDB files (#11899, #14062)Brad King2013-04-051-8/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MS tools create two types of PDB files as explained here: http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.71%29.aspx http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.80%29.aspx http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.90%29.aspx http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.100%29.aspx One is created by the compiler (/Fd) and the other by the linker (/pdb). The two options should not specify the same file. Split them up. In the VS IDE generators, simply drop ProgramDataBaseFileName to take the VS default "/Fd$(IntDir)vc$(PlatformToolsetVersion).pdb". In the Makefile generators, set "/Fd" on the compile line to be the directory containing object files (with a trailing slash the compiler will add the "vc$(PlatformToolsetVersion).pdb" filename automatically). Drop the /Fd option from the exe link command line and add "/pdb" instead (already done for dll linking). Update these rules for both MSVC and Intel tools. Drop support for PDB_OUTPUT_DIRECTORY and PDB_NAME in STATIC libraries because the generated .pdb files are only from /Fd and not real linker-generated .pdb files. Update documentation to clarify that the PDB_* properties are only for linker .pdb files. This regresses the PDBDirectoryAndName test for STATIC libraries. Since it is not clear at this time what should be done for STATIC library .pdb files, comment out the relevant portion of the test and leave a TODO comment.
* Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)Stephen Kelly2013-03-251-2/+0
| | | | | | | | | | | | | | The API for retrieving per-config COMPILE_DEFINITIONS has long existed because of the COMPILE_DEFINITIONS_<CONFIG> style properties. Ensure that the provided configuration being generated is also used to evaluate the generator expressions in cmTarget::GetCompileDefinitions. Both the generic COMPILE_DEFINITIONS and the config-specific variant need to be evaluated with the requested configuration. This has the side-effect that the COMPILE_DEFINITIONS does not need to be additionally evaluated with no configuration, so the callers can be cleaned up a bit too.
* VS 10: Fix CMAKE_<LANG>_STACK_SIZE implementation (#13968)Brad King2013-03-041-1/+1
| | | | | | | | | Use the /STACK: flag to pass the value through flag parsing so that the generator converts it to the StackReserveSize project file option. The option was accidentally left out by commit 7491f529 (first pass at VS 10, 2009-06-25). Suggested-by: goatboy160@yahoo.com
* Move GetCompileDefinitions to cmTarget.Stephen Kelly2013-01-291-2/+2
|