Commit Graph

44 Commits

Author SHA1 Message Date
David Cole 9082fc8a47 Use full path file names in generate.stamp.list.
The full path file names are important for Visual Studio 10, which
apparently changes the current working directory when running
custom command rules.
2010-06-17 17:12:57 -04:00
Bill Hoffman 268448b891 Teach VS generators to set the MACHINE type correctly. 2009-11-20 11:55:28 -05:00
Brad King bc43b0f2a4 Do not link library dependencies in VS solutions
In VS 8 and greater this commit implements

  add_dependencies(myexe mylib) # depend without linking

by adding the

  LinkLibraryDependencies="false"

option to project files.  Previously the above code would cause myexe to
link to mylib in VS 8 and greater.  This option prevents dependencies
specified only in the solution from being linked.  We already specify
the real link library dependencies in the project files, and any project
depending on this to link would not have worked in Makefile generators.

We were already avoiding this problem in VS 7.1 and below by inserting
intermediate mylib_UTILITY targets.  It was more important for those
versions because if a static library depended on another library the
librarian would copy the dependees into the depender!  This is no longer
the case with VS 8 and above so we do not need that workaround.

See issue #9732.
2009-10-20 16:38:37 -04:00
Brad King 7766473d3e Avoid duplicate ZERO_CHECK in VS solutions
The commit "Avoid non-root copies of root-only targets" moved the check
for root-only targets into cmGlobalGenerator::GetTargetSets to avoid
adding multiple ALL_BUILD targets to the "original" target set.  This
approach did not work for ZERO_CHECK targets though because those are
pulled in by dependency analysis.

Instead we eliminate duplicate ZERO_CHECK targets altogether and refer
to a single one from all solution files.  This cleans up VS 10 project
file references to ZERO_CHECK targets anyway.
2009-10-19 10:47:34 -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 524bb1e36e Simplify VS generator ZERO_CHECK dependency
The VS generators use a ZERO_CHECK target on which all other targets
depend to check whether CMake needs to re-run.  This commit simplifies
the addition of a dependency on the target to all other targets.

We also move addition of dependencies to the beginning of the Generate
step.  This allows the dependency on ZERO_CHECK to be included in the
global inter-target dependency analysis.
2009-09-04 12:37:53 -04:00
Brad King e339f3133f ENH: Separate VS flag table type
Move the cmVS7FlagTable type out of the VS generators and rename it to
cmIDEFlagTable.  It will be useful for other generators.
2009-07-29 11:28:55 -04:00
Bill Hoffman 2488dccf4e BUG: fix location of tmp file to use the full path, caused error on vista not running as admin 2008-04-01 17:39:04 -04:00
Brad King fdf169be3a BUG: Fixes to VS8/VS9 project regeneration rules
- ZERO_CHECK should check all stamps in case
    of parallel build (fixes complex test failure)
  - ZERO_CHECK should not appear when
    CMAKE_SUPPRESS_REGENERATION is on (fixes bug 6490)
2008-03-11 17:25:49 -04:00
David Cole ca2a16c0a2 ENH: Add code to support calling the VS reload macro from Visual Studio 7.1 and 9.0 in addition to 8.0 sp1... Make new macros file with VS 7.1 so that it can be read by 7.1 and later. VS 7.1 does not appear to run the macros while a build is in progress, but does not return any errors either, so for now, the reload macro is not called when using 7.1. If I can figure out how to get 7.1 to execute the macro, I will uncomment the code in cmGlobalVisualStudio71Generator::GetUserMacrosDirectory() to activate executing the macros in VS 7.1, too. 2008-02-15 11:49:58 -05:00
Brad King 5594ad4885 ENH: Updated exporting and importing of targets to support libraries and configurations.
- Created cmExportFileGenerator hierarchy to implement export file generation
  - Installed exports use per-config import files loaded by a central one.
  - Include soname of shared libraries in import information
  - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands
  - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators
  - Import files compute the installation prefix relative to their location when loaded
  - Add mapping of importer configurations to importee configurations
  - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries
  - Scope IMPORTED targets within directories to isolate them
  - Place all properties created by import files in the IMPORTED namespace
  - Document INSTALL(EXPORT) and EXPORT() commands.
  - Document IMPORTED signature of add_executable and add_library
  - Enable finding of imported targets in cmComputeLinkDepends
2008-01-28 08:38:36 -05:00
Brad King 2625b0498b STYLE: Fixed line-too-long. 2008-01-02 15:55:18 -05:00
Brad King 62ff2befcc BUG: Do not use VSMacros stuff for VS8sp0 because macros do not work in that version. 2008-01-02 15:53:28 -05:00
Bill Hoffman 42bad89fe7 STYLE: fix line len 2007-12-18 08:53:10 -05:00
Bill Hoffman c6089d1642 BUG: fix for bug 5931 add some more flags for the gui 2007-12-17 17:28:23 -05:00
Brad King eee575283d STYLE: Fixed line-too-long. COMP: Fixed warnings about lossy conversions. 2007-11-20 11:10:11 -05:00
Brad King 9f864879b4 ENH: Renamed cmGlobalVisualStudioGenerator::CallVisualStudioReloadMacro method to CallVisualStudioMacro and added arguments to select which macro to call and optionally pass the solution file name. Added option to call to new StopBuild macro. Updated logic for replacing the macro file in user directories when the distributed version is newer. 2007-11-19 13:44:51 -05:00
Brad King bb1fa4c3f0 BUG: Fix exception handling flag translation to be specific to each VS version. This allows /EHa to be handled correctly for VS 2003. 2007-11-16 11:01:23 -05:00
David Cole 867de7fc67 ENH: Add ability to call Visual Studio macros from CMake. Add a CMake Visual Studio macro to reload a solution file automatically if CMake makes changes to .sln files or .vcproj files. Add code to call the macro automatically for any running Visual Studio instances with the .sln file open at the end of the Visual Studio Generate call. Only call the macro if some .sln or .vcproj file changed during Generate. Also, add handling for REG_EXPAND_SZ type to SystemTools::ReadRegistryValue - returned string has environment variable references expanded. 2007-11-16 07:01:58 -05:00
Brad King ea2b389a17 BUG: Converted per-vcproj timestamp to a single directory-level CMakeFiles/generate.stamp file shared by all targets in each directory. This avoids having all targets overwrite each others timestamp check rules and instead has one single rule. 2007-11-12 15:42:37 -05:00
Brad King 34c882a9f8 ENH: Allow VS 7 project Rebuild and Solution Rebuild to work without re-running CMake for every project during the rebuild. 2007-11-10 08:15:13 -05:00
Brad King f9322d188b ENH: Converted vcproj file generation to use cmGeneratedFileStream for atomic replacement. Replaced the vcproj.cmake copy of the file with a simple vcproj.stamp timestamp file to preserve previous rerun-without-reload behavior. 2007-11-09 12:05:03 -05:00
Ken Martin 6cdf032505 ENH: change to make the documentation class more generic, about halfway there, also provides secitons for Variables now 2007-10-22 12:49:09 -04:00
Brad King 27a0677d3e COMP: Fix build for windows-only generators after change to GetSourceFiles signature. 2007-05-28 11:00:26 -04:00
Alexander Neundorf 4878c00905 ENH: add the IMPORT keyword to ADD_EXECUTABLE(), which generates an
"imported" executable target. This can then be used e.g. with
ADD_CUSTOM_COMMAND() to generate stuff. It adds a second container for
"imported" targets, and FindTarget() now takes an additional argument bool
useImportedTargets to specify whether you also want to search in the
imported targets or only in the "normal" targets.

Alex
2007-05-22 10:24:59 -04:00
Ken Martin 8b0c61c322 ENH: added internal target property for the name of the project file 2007-04-10 09:54:01 -04:00
Ken Martin c53b26baf2 ENH: some more cleanup 2007-03-13 15:18:27 -04:00
Brad King fb38af53c0 BUG: Split precompiled header flags into a separate per-global-generator flag map. This is needed because the flag mappings differ across VS IDE versions. This fixes bug#3512 for VS8 where as the previous fix only worked for VS7. 2007-03-12 12:35:11 -04:00
Bill Hoffman b0bc59f709 ENH: commit fix for putting everything in the build on vs 2006-11-09 09:57:23 -05:00
Brad King 9a1d4e92eb BUG: Fix/cleanup custom commands and custom targets. Make empty comment strings work. Fix ZERO_CHECK target always out of date for debugging. Fix Makefile driving of custom commands in a custom target. Fix dependencies on custom targets not in ALL in VS generators. 2006-09-28 16:40:35 -04:00
Brad King 7d2de52c1a ENH: Cleaned up signature of cmMakefile::AddUtilityCommand. It is not valid to have an output from a utility rule and no calls to the method asked for an output anyway. The argument has been removed. 2006-09-28 13:55:26 -04:00
Brad King 2459ceb076 BUG: Centralized generation of command line arguments in escaped form. This addresses bug#3786 for several platforms. 2006-09-21 15:14:06 -04:00
Ken Martin bf0cb4d49a STYLE: fix line length 2006-05-11 11:47:03 -04:00
Brad King bc135b7fc2 BUG: MSVC* variables should be set in IDE generators instead of just NMake. 2006-05-05 20:54:53 -04:00
Brad King d5719f22c1 ENH: Added support for multiple outputs generated by a single custom command. For Visual Studio generators the native tool provides support. For Xcode and Makefile generators a simple trick is used. The first output is considered primary and has the build rule attached. Other outputs simply depend on the first output with no build rule. During cmake_check_build_system CMake detects when a secondary output is missing and removes the primary output to make sure all outputs are regenerated. This approach always builds the custom command at the right time and only once even during parallel builds. 2006-04-11 11:06:19 -04:00
Bill Hoffman 5a2668b326 ENH: add support for win64 for visual studio 2005 ide and nmake, also fix warnings produced by building for win64 2006-03-30 13:49:56 -05:00
Ken Martin 3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Brad King 916ea2bad2 BUG: Avoid adding unused rules to special targets like ALL_BUILD. Make sure project regeneration rules go only in desired targets. 2006-02-14 16:32:20 -05:00
Brad King bd0b829ffb BUG: Fixed generation of VS8 solution file to not be re-written when loaded by VS and to work with msbuild. 2006-02-14 15:35:34 -05:00
Bill Hoffman 347c5f4b46 ENH: add working directory support 2006-02-08 10:58:36 -05:00
Brad King af36d6e2e7 COMP: Fixed unused variable warning. 2005-12-13 18:23:37 -05:00
Brad King 1c7075057f ENH: Added support for parallel builds in VS 8. There is now a special target on which all other targets depend that re-runs CMake if any listfiles have been changed. This addresses bug#2512. 2005-12-13 14:21:28 -05:00
Brad King d952f68738 BUG: Tweak VS8 generator to keep VS8 happy. The .vcproj files need their own GUIDs in a ProjectGUID attribute. The top level .sln file needs a special comment at the top to allow it to be opened with double-click in explorer. 2005-11-22 13:37:42 -05:00
Bill Hoffman 86195caf6a ENH: add support for VCExpress 2005 2004-07-05 12:16:33 -04:00