Commit Graph

37 Commits

Author SHA1 Message Date
Gilles Khouzam 709cebde66 VS: Generate WindowsPhone and WindowsStore application types
Generate the ApplicationType and ApplicationTypeRevision elements in
.vcxproj files.
2014-07-31 14:09:03 -04:00
Brad King c2ef6d238a VS: Refactor handling of "header" sources in VS >= 10
Create a WriteHeaderSource method to handle writing of sources
classified by cmGeneratorTarget as header files.  This will be
useful to add special VS-specific handling for some headers.
2014-07-29 15:06:28 -04:00
Brad King 2df389115e VS: Refactor handling of "extra" sources in VS >= 10
Create a WriteExtraSource method to handle writing of sources not
classified by cmGeneratorTarget for any particular purpose.  This
will be useful to add special VS-specific handling for some sources.
2014-07-29 15:06:26 -04:00
Brad King 143b40051a VS: Convert 'WriteSource' tool argument to std::string 2014-07-29 15:06:24 -04:00
Brad King 1c209ac165 cmIDEOption: Store mapped flag values as a vector<string>
Some FlagMap entries are ;-lists.  Store values as vector<string> so
that individual values may contain ';' characters.  Delay the
construction of the final ;-list until writing to the VS project file.
With this approach the generated file may contain ;-separated values
that contain encoded ';' characters.
2014-07-23 14:18:53 -04:00
Brad King 7a9909db86 VS: Make MS-tool-specific options conditional
Make blocks adding MS-tool-specific options conditional on a
new "MSTools" boolean member of cmVisualStudio10TargetGenerator.
Hard-code the member to true for now to preserve existing behavior.
2014-07-17 13:37:55 -04:00
Martin Mitas 5d8738468f VS: Fix handling of non-preprocessor flags in CMAKE_RC_FLAGS
Teach the VS >= 10 generator to honor flags other than -I and -D
in the CMAKE_RC_FLAGS[_<CONFIG>] variable.  Place them within the
ResourceCompile .vcxproj element under AdditionalOptions.

Also add a rudimentary flag map to map '-n' to 'NullTerminateStrings'.
2014-07-10 14:33:27 -04:00
Brad King 1edaef39f1 VS: Factor MS-tool-specific vcxproj settings into helper
Factor a WriteMSToolConfigurationValues helper method out of the
cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues method
to isolate the configuration settings specific to MS tools.
2014-06-09 11:00:03 -04:00
Brad King ee329d543c VS: Refactor flag table lookup
In cmVisualStudio10TargetGenerator, convert the static functions
currently used to lookup the flag table for each tool into class
methods.  This avoids passing the this->LocalGenerator member and
gives the methods access to other information that may be useful
in the future.
2014-06-09 10:59:48 -04:00
Stephen Kelly 9ad804ac7b cmGeneratorTarget: Constify cmSourceFile* in containers.
Some of them will be used with other APIs which require value_type
to be cmSourceFile const*.
2014-03-13 15:27:23 +01:00
Stephen Kelly c725bb3cbd Constify some APIs in generators. 2014-03-13 15:27:23 +01:00
Ben Boeckel 84fdc9921c stringapi: Pass configuration names as strings 2014-03-08 13:05:36 -05:00
Ben Boeckel 270eb96df0 strings: Remove cmStdString references
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.

The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
2014-03-08 13:05:35 -05:00
Stephen Kelly 50d152035d cmTarget: Make custom command accessors API const.
Add specific mutators instead of providing non-const refs.
2013-11-19 20:40:31 +01:00
Jonas Andersen 6c9712c47b VS: Add Resx configuration to the vcxproj file
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.
2013-06-28 09:23:41 -04:00
John Farrier 79ec7868d0 VS: Add Windows Forms Support
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.
2013-05-16 13:06:44 -04:00
Brad King c65a2ea6a8 VS10: Refactor link options collection
Avoid collecting the link options twice.  Collect them once in a
LinkOptions member and use it from both places.  We already do this for
compiler options with the ClOptions member.
2012-10-26 10:16:45 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King 4248132e59 VS10: Convert paths normally unless forced to relative
Most CMake generators produce relative paths within the build tree and
full paths to files outside the build tree.  Make VS 10 and VS 11
project files consistent with this approach except for paths forced to
be relative to work around a VS 10 bug.
2012-04-27 11:53:40 -04:00
Brad King c2ba6ba4fc VS10: Simplify vcxproj.filter file generation
Remove the duplicate source file classification logic used to generate
the filter files.  Instead record during the main vcxproj file
generation the source files generated for each tool.  Also record
whether or not each source file is converted to a relative path.  Use
the recorded result during filter generation to ensure consistency
between the project file and filter file.
2012-04-27 10:00:00 -04:00
Brad King 4f2d9d2da5 VS10: Refactor custom commands to use WriteSource
All other source file elements are already written through WriteSource.
Refactor custom command source element generation into WriteSource too.
2012-04-27 09:15:03 -04:00
Brad King 328c0f65c2 Simplify cmVisualStudio10TargetGenerator source classification
Combine WriteCLSources and WriteObjSources into a single method.  Use
the cmGeneratorTarget source classification to simplify tool selection
for each source file.  Extend the classification to handle .idl files.
2012-03-19 17:13:41 -04:00
Brad King 62a841b80b Simplify cmVisualStudio10TargetGenerator using cmGeneratorTarget
Use CustomCommands and ModuleDefinitionFile computed in the latter
instead of recomputing them from the original target source files.
2012-03-09 15:16:02 -05:00
Eugene Golushkov 9e01aefd24 VS: Add support for WinRT project properties (#12930)
VS_WINRT_EXTENSIONS: Boolean property that correspond to "Enable
Tailored Features" in Visual Studio 11 IDE.

VS_WINRT_REFERENCES: Semicolon-delimited list of *.winmd references to
add to the project, which creates a new <ItemGroup>.
2012-02-03 09:26:24 -05:00
Aaron Ten Clay a1f976ce0e VS: Add support for three new project properties (#12586)
VS_GLOBAL_PROJECT_TYPES: A string containing UUIDs to embed in the
Visual Studio project file under <ProjectTypes>.

VS_GLOBAL_KEYWORD: Allows specification of a keyword like "ManagedCProj"
instead of the default "Win32Proj", under <Keyword>

VS_DOTNET_REFERENCES: Semicolon-delimited list of .NET references to add
to the project, which creates a new <ItemGroup>.
2011-11-28 11:44:04 -05:00
Brad King 448661fbe5 VS10: Skip targets with no linker language (#11230)
In targets with no non-header files the linker language cannot be
determined.  Since the target project file cannot be generated at all in
this case, give up as soon as it is detected.  Otherwise the generation
code may try to run with uninitialized information.
2010-09-30 08:48:38 -04:00
Christoph Watzl 2d9dc9ac65 Fix nested source groups with VS 10 (#9863)
Add intermediate (but empty) source group filters for the container
groups.
2010-06-11 15:44:55 -04:00
Brad King 5484550af6 Detect and set Unicode character set in VS 10
This commit teaches the VS 10 generator to detect the -D_UNICODE option
in preprocessor definitions and set the CharacterSet attribute to the
value 'Unicode'.  This was already done for other VS IDE versions.

See issue #9769
2009-10-23 11:34:37 -04:00
Brad King 50759a9ed3 WIP: VS 10 Win64 generator
See issue #9754.
2009-10-22 08:24:11 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King 4e16813f63 Put custom commands in topological order for VS 10
Visual Studio 10 uses MSBuild to drive the build.  Custom commands
appear in MSBuild files inside CustomBuild elements, which appear inside
ItemGroup elements.  The Outputs and AdditionalInputs elements of each
CustomBuild element are evaluated according to timestamps on disk.

MSBuild does not use inputs/outputs to order CustomBuild steps within a
single ItemGroup or across multiple ItemGroup elements.  Instead we must
put only unrelated CustomBuild elements in a single ItemGroup and order
the item groups from top to bottom using a topological order of the
custom command dependency graph.

This fixes CustomCommand and ExternalProject test failures, so we remove
the expectation of these failures.
2009-09-07 10:12:18 -04:00
Bill Hoffman 11d42b3e8f ENH: almost all tests passing in vs 10, commit fixes preprocess and starts vs external project 2009-07-13 16:58:24 -04:00
Bill Hoffman 28b1912aa3 ENH: add group support and fix borland error 2009-07-11 00:05:20 -04:00
Bill Hoffman 5c4208f50e ENH: only 5 failing tests for VS 10 2009-07-10 09:12:39 -04:00
Bill Hoffman 1d59cc7da6 ENH: add rest of lib check 2009-06-28 09:46:25 -04:00
Bill Hoffman b6d022f853 ENH: add obj file support and remove a warning 2009-06-25 22:53:02 -04:00
Bill Hoffman 7491f52992 ENH: first pass at VS 10, can bootstrap CMake, but many tests still fail 2009-06-25 16:41:57 -04:00