Commit Graph

220 Commits

Author SHA1 Message Date
Brad King f47b4f68a9 Drop Visual Studio 7 generator for VS .NET 2002
This generator has been deprecated since CMake 3.3.  Remove it.
2016-03-11 08:53:50 -05:00
Stephen Kelly 7b127c62d4 VS7: Port remaining interface to cmGeneratorTarget 2015-10-27 07:44:22 +01:00
Stephen Kelly 736c2042c6 cmGeneratorTarget: Add GetUtilities API 2015-10-27 07:44:20 +01:00
Stephen Kelly 97b3768898 VS: Port WriteUtilityDepends to cmGeneratorTarget 2015-10-24 09:24:43 +02:00
Stephen Kelly 600af01d41 VS: Port utility depends to cmGeneratorTarget 2015-10-24 09:24:43 +02:00
Stephen Kelly 330bfa8336 VS: Port target depends to cmGeneratorTarget 2015-10-24 09:24:43 +02:00
Stephen Kelly b13e26e278 VS: Port ProjectDepends to cmGeneratorTarget. 2015-10-24 09:24:30 +02:00
Stephen Kelly 8ac8739b2e VS: Port TargetIsFortranOnly to cmGeneratorTarget 2015-10-24 09:19:57 +02:00
Stephen Kelly 84fb579fc8 VS: Port WriteProject to cmGeneratorTarget 2015-10-24 09:19:56 +02:00
Stephen Kelly 1eff421ad0 VS: Port loop to cmGeneratorTarget 2015-10-24 09:19:56 +02:00
Stephen Kelly eac15298a8 cmState: Move TargetType enum from cmTarget.
Mostly automated:

 values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType")
 for i in "${values[@]}"; do     git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
2015-10-15 00:41:39 +02:00
Stephen Kelly 11165525ba cmGeneratorExpression: Port to cmLocalGenerator. 2015-10-12 23:07:46 +02:00
Stephen Kelly bbef3c2da8 cmLocalGenerator: Add current binary directory accessor. 2015-10-10 11:04:39 +02:00
Stephen Kelly 4ab2750c54 cmLocalGenerator: Add GetProjectName method. 2015-10-09 00:00:18 +02:00
Brad King 03bfe71ae0 VS: Refactor target ordering logic
Refactor cmGlobalVisualStudioGenerator::TargetCompare to store the name of
the target that should come first instead of hard-coding "ALL_BUILD".
Update client sites to specify "ALL_BUILD" when ordering for .sln files
and an empty string otherwise (in cases when "ALL_BUILD" should not be
encountered anyway).
2015-09-22 10:25:58 -04:00
Stephen Kelly ff8ac8ee6a cmLocalGenerator: Create from already-constructed cmMakefile.
Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
2015-08-28 18:44:39 +02:00
Stephen Kelly 9b6a743b80 cmLocalGenerator: Remove Parent pointer. 2015-08-28 18:44:38 +02:00
Stephen Kelly 524610f967 Replace 'foo.size() == 0' pattern with foo.empty(). 2015-08-24 20:47:17 +02:00
Stephen Kelly cbe3ee58ca cmMakefile: Add a PropertyKeys accessor. 2015-07-18 18:59:18 +02:00
Stephen Kelly faec4e611d cmComputeTargetDepends: Change API to use cmGeneratorTarget. 2015-07-01 19:46:19 +02:00
Brad King f5690cc57c Merge topic 'move-Feature-API'
f573bd22 cmLocalGenerator: Add Feature API from cmMakefile.
ccbc2259 cmGeneratorTarget: Move Feature API from cmTarget.
2015-06-08 13:54:05 -04:00
Stephen Kelly ccbc225913 cmGeneratorTarget: Move Feature API from cmTarget. 2015-06-06 15:44:16 +02:00
Nils Gladitz cdf2cba3e7 VS: Use cmUuid RFC 4122 compliant hash based UUID generation 2015-06-05 09:17:17 +02:00
Brad King c85367f408 VS: Compute project GUIDs deterministically
Compute deterministic GUIDs that are unique to the build tree by
hashing the path to the build tree with the GUID logical name.
Avoid storing them in the cache, but honor any found there.
This will allow project GUIDs to be reproduced in a fresh build
tree so long as its path is the same as the original, which may
be useful for incremental builds.
2015-06-04 08:40:08 -04:00
Stephen Kelly 3b880a0741 cmLocalGenerator: Require a valid cmState::Snapshot in the ctor.
Refactor the local generator creation API to accept a
cmState::Snapshot.  Adjust MakeLocalGenerator to use the 'current'
snapshot in cases where there is no parent.  Create the snapshot
for subdirectories in cmMakefile::AddSubdirectory.

This means that snapshots are now created at the point of extending the tree,
as appropriate, and independently of the cmLocalGenerator and cmMakefile they
represent the state for.
2015-05-27 09:18:32 -04:00
Stephen Kelly c7b79aa16a cmGlobalGenerator: Require a cmake instance in ctor.
It is required anyway, so this makes it explicit.
2015-05-27 09:18:31 -04:00
Brad King 2f4bb4e9b0 VS: Do not accumulate configurations globally (#15577)
Drop the VS >= 7 generator's global Configurations member and instead
lookup configurations using cmMakefile::GetConfigurations where needed.
This avoids accumulating all CMAKE_CONFIGURATION_TYPES values ever
encountered by a project() or enable_language() command and allows
the final value to be used in each directory.  We don't officially
support per-directory CMAKE_CONFIGURATION_TYPES values but we certainly
should not generate configurations not in the final value in the top
level directory.
2015-05-21 09:06:49 -04:00
Stephen Kelly e435f875ec VS: Move version information to global generator. 2015-05-19 11:02:33 -04:00
Stephen Kelly b5f093f096 VS: Simplify setting of flag table. 2015-05-19 11:02:33 -04:00
Stephen Kelly 34c9ee2ed7 cmLocalGenerator: Require a global generator in the constructor.
Port generator factory methods to pass it.
2015-05-14 20:36:27 +02:00
Robert Goulet a6e4e73da3 VS: Add option to put INSTALL target in .sln default build
Add a CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD variable to control
this behavior.
2015-05-06 10:31:39 -04:00
Stephen Kelly a48aebcb67 cmLocalGenerator: Require a parent in the constructor.
Pass the parent though cmGlobalGenerator::CreateLocalGenerator.

This will make it easy to initialize state scopes independent of
cmMakefile.
2015-04-28 07:50:52 +02:00
Stephen Kelly 32b8f03acc cmMakefile: Port users of GetStart* methods to new names. 2015-04-21 00:15:20 +02:00
Brad King 7b8e7c4ac3 Deprecate Visual Studio 7 generator (.NET 2002)
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2015-04-15 09:21:24 -04:00
Stephen Kelly f081c5bddd cmState: Move CacheEntryType enum from cmCacheManager. 2015-04-13 11:44:16 -04:00
Gregor Jasny ce935ebe50 cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for Ninja
The Ninja build system does not support a in-file verbositiy switch.
Instead teach 'cmake --build' to extract the CMAKE_VERBOSE_MAKEFILE
setting and pass it as an optional '-v' argument to Ninja.  This can
serve as a reasonable fallback.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-26 09:51:11 -05:00
Brad King 987d4a1240 VS: Do not generate a BOM in .sln files
Revert commit v3.2.0-rc1~165^2 (Encoding:  Write Visual Studio solution
file with BOM, 2014-12-26).  The BOM breaks the VS IDE version selector
when loading the .sln from Windows Explorer.
2015-02-24 13:30:50 -05:00
Clinton Stimpson 61cf781a62 Encoding: Write Visual Studio solution file with BOM.
When configured to use UTF-8 internally, add a UTF-8 BOM
to generated .sln files for Visual Studio to correctly
handle them.
Otherwise, some versions of Visual Studio will read them
as ANSI encoded files.
2014-12-26 21:15:29 -07:00
Brad King b97736a23d VS: Implement CMAKE_GENERATOR_PLATFORM for VS >= 8
For VS generator names that do not specify the platform name, read
CMAKE_GENERATOR_PLATFORM to get it.

Extend the RunCMake.GeneratorPlatform test with a case covering
use of the x64 platform when the test generator is a Visual Studio
generator whose name does not specify a platform.
2014-09-05 15:03:56 -04:00
Brad King 68d4280ac4 VS: Refactor internal default platform name selection
Rename the 'PlatformName' member to 'DefaultPlatformName' and make
sure it is only read through a 'GetPlatformName()' call.  This will
allow non-default names to be chosen later.
2014-09-05 14:02:58 -04:00
Brad King a43f44000d VS: Move internal MasmEnabled member up to VS 7 generator
Move the member from cmGlobalVisualStudio10Generator to
cmGlobalVisualStudio7Generator to make it useful for earlier
versions of VS.  Set the member to true only starting with
cmGlobalVisualStudio8Generator since we will not implement
MASM support for versions less than VS 8.
2014-08-20 10:21:12 -04:00
Brad King 848fab9575 cmGlobalVisualStudio7Generator: Remove unused variable 2014-07-22 15:24:57 -04:00
Brad King 6e176e6d9e VS: Delay platform definitions until system name is known
Move the definition of CMAKE_VS_PLATFORM_NAME and other variables that
are not needed by CMakeDetermineSystem out of the AddPlatformDefinitions
method and into a SetSystemName method.  The latter may later use
CMAKE_SYSTEM_NAME to decide what platform-specific definitions to add.
2014-07-17 16:34:21 -04:00
Brad King eeb60102e8 VS: Refactor CMAKE_FORCE_*64 platform definitions
Remove the general infrastructure for these additional platform
definitions and hard-code the only two special cases that used
it.  They are only for historical reasons so no new such cases
should be added.
2014-07-17 16:17:35 -04:00
Brad King cb67509b06 VS: Remove unused parameter of WriteTargetConfigurations
The cmGlobalVisualStudio7Generator::WriteTargetConfigurations
'root' parameter is no longer used, so remove it.
2014-06-13 08:57:34 -04:00
Brad King 790e167718 VS: Fix subproject .sln dependencies on custom targets
Each project listed in a .sln must be marked (or not) as part of the
"default build" for each configuration.  For targets created by the
add_custom_target() command we add them to the default build if they
are not excluded in some way or if another target depends on them.
In the top-level .sln, a custom target is excluded if it is not
created with the ALL option to add_custom_target.  In subdirectory
.sln files, a target may also be excluded if it is not within the
directory and is brought into the solution only due to a dependency
from another target in the solution.

Fix the "IsPartOfDefaultBuild" and "IsDependedOn" methods to check
every target to be included in the .sln for a dependency on the
custom target.  Otherwise transitive dependencies through targets
not in the current subdirectory will not be considered.

Extend the SubProject test with a custom target to cover this case.

Reported-by: William Deurwaarder <William.Deurwaarder@tomtom.com>
Reported-by: Dirk Steenpass <dirk.steenpass@gmail.com>
2014-06-12 11:14:06 -04:00
Brad King 5fba44cf41 VS: Move VS-only API out of cmGlobalGenerator
Move the IsDependedOn method to cmGlobalVisualStudio7Generator
since that is the only caller.
2014-06-12 10:26:35 -04:00
Brad King 177d0ef15e Merge topic 'vs-vcproj-bool-case'
b684ce58 VS: Use lower-case boolean values in VS 7-9 (#14927)
2014-05-29 09:58:43 -04:00
Mark Salisbury b684ce58dd VS: Use lower-case boolean values in VS 7-9 (#14927)
The VS 7-9 IDEs parse .vcproj file boolean values in lower or upper
case.  The .NET XML parsing chokes on anything but "true", "false", "0",
"1".  Teach our generators to use lower-case names since they will work
for both parsers.  Our VS >= 10 flag tables already use lower-case.
2014-05-28 16:32:56 -04:00
Clinton Stimpson ee8cef8725 Encoding: If configured, write Visual Studio project files as UTF-8. 2014-03-14 08:48:42 -06:00