Commit Graph

260 Commits

Author SHA1 Message Date
David Cole 8952f49803 Fix issue #9042 - correctly this time. Fix failing tests on VS 7, 8 and 9 dashboards. Use ConvertToXMLOutputPathSingle instead of ConvertToOptionallyRelativeOutputPath to handle spaces in the path and double quoting properly. Related to commit trying to fix issue #9042 from yesterday. 2009-12-24 11:40:14 -05:00
David Cole 68ed752b7d Fix issue #9042 - use relative path for pdb file name when CMAKE_USE_RELATIVE_PATHS is on. 2009-12-23 14:17:51 -05:00
Brad King 8c5d817779 Fix .vfproj files with per-source settings
The Intel Fortran plugin to VS defines VFFortranCompilerTool as the
compiler tool.  This commit fixes generated projects to use that tool
for per-source settings instead of VCCLCompilerTool.  We were already
using it for target-wide compiler settings.
2009-12-02 11:49:52 -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 0140d293de Avoid C++ linker language in VS Fortran project
In Visual Studio project files we pass compiler flags to the whole
target based on the linker language, which works for MS tools and
combinations of C and C++.  For the Intel Fortran plugin though the
generated .vfproj files should never contain C or C++ options.

We generate .vfproj files only for targets consisting only of Fortran
code.  Now that the linker language is computed transitively through
linking it is possible that the linker language is C++ for an otherwise
Fortran-only project.  This commit forces Fortran as the linker language
for the purpose of specifying target-wide flags in .vfproj files.

See issue #9719.
2009-10-19 15:21:01 -04:00
Brad King 024d05adad Fix use of module .def files for MS tools
We recognize .def source files and map them to the /DEF:<file> option in
the MSVC tools.  Previously this worked only for shared libraries.  This
commit cleans up the implementation and makes it work for executables
too.  See issue #9613.
2009-09-29 16:39:07 -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 6f010f1c40 Fix .vfproj file version for Intel Fortran 10.1
The commit "Generate proper Intel Fortran project version" replaced the
hard-coded 9.10 value with a runtime registry lookup of the real
version.  Version 10.1 actually uses project file format 9.10, so this
commit switches it back for that version.  See issue #9169.
2009-09-28 10:00:14 -04:00
Bill Hoffman 8e8c9b7242 Bug #9430, recognize the FR flag 2009-09-17 09:18:21 -04:00
Brad King 2006e4a405 Generate proper Intel Fortran project version
The Intel Visual Fortran compiler plugin for MS Visual Studio may be one
of several versions of the Intel compiler.  This commit teaches CMake to
detect the plugin version and set the version number in .vfproj files.
See issue #9169.
2009-09-16 11:44:50 -04:00
Brad King 0e8c7859c8 Silence VS generator for missing CMakeLists.txt
CMake Makefile generators silently ignore missing CMakeLists.txt files
and just treat the source directory as if it had an empty input file.
This will be addressed with a new CMake Policy, but for now we make the
VS generator consistent with the Makefile generator behavior.  The VS
generator will need to handle the OLD behavior of the policy anyway.
2009-09-02 16:07:12 -04:00
Bill Hoffman b590e1dfae ENH: remove code duplication and use cmVisualStudioGeneratorOptions for all versions of vs 7 and greater. 2009-07-28 14:30:15 -04:00
Bill Hoffman 3d1c12b802 ENH: remove INCLUDE_EXTERNAL_MSPROJECT name hack, and use target properties instead, fix VXExternalInclude test for VS10 2009-07-14 14:16:46 -04:00
Bill Hoffman 5c4208f50e ENH: only 5 failing tests for VS 10 2009-07-10 09:12:39 -04:00
Brad King 173448d988 ENH: Pass config to cmTarget::GetLinkerLanguage
This passes the build configuration to most GetLinkerLanguage calls.  In
the future the linker language will account for targets linked in each
configuration.
2009-07-08 13:04:04 -04:00
Brad King a608467180 ENH: Simpler cmTarget::GetLinkerLanguage signature
This method previously required the global generator to be passed, but
that was left from before cmTarget had its Makefile member.  Now the
global generator can be retrieved automatically, so we can drop the
method argument.
2009-07-07 07:44:12 -04:00
Brad King 43669f0ef2 BUG: Avoid cmTarget::GetDirectory for utilities
Since utility targets have no main output files like executables or
libraries, they do not define an output directory.  This removes a call
to cmTarget::GetDirectory from cmLocalVisualStudio{6,7}Generator for
such targets.
2009-07-03 10:33:49 -04:00
Brad King 44021718a6 STYLE: Replace large if() with named boolean
In cmLocalVisualStudio{6,7}Generator this replaces a large if() test
with a re-usable result stored in a boolean variable named accordingly.
2009-07-03 10:33:34 -04:00
Brad King 66189b0b79 ENH: Create exe implib dir in VS pre-link rule
This moves creation of an executable's import library directory in VS
projects from the pre-build step to the pre-link step.  It makes sense
to create the directory at the last moment.
2009-06-16 11:44:19 -04:00
Brad King 764ac9803d ENH: Generalize exe implib dir creation for VS
In VS 7,8,9 executable targets we generate a build event to create the
output directory for the import library in case the executable marks
symbols with dllexport (VS forgets to create this directory).  This
generalizes computation of the custom command line to support future use
with other VS versions.
2009-06-16 11:44:07 -04:00
Brad King f4b3bdc6be BUG: Create an exe's implib output dir for VS
If an executable marks symbols with __declspec(dllexport) then VS
creates an import library for it.  However, it forgets to create the
directory that will contain the import library if it is different from
the location of the executable.  We work around this VS bug by creating
a pre-build event on the executable target to make the directory.
2009-06-15 10:55:21 -04:00
Brad King 4a9dd4aad4 ENH: Refactor VS 7,8,9 build event generation
In cmLocalVisualStudio7Generator we generate pre-build, pre-link, and
post-build events into project files.  This refactors the generation
code for the three event types into a private EventWriter class to avoid
duplicate code.
2009-06-12 15:28:48 -04:00
Bill Hoffman fb24a4c881 STYLE: fix line lenght 2009-03-28 13:02:29 -04:00
Bill Hoffman 17f327b5da BUG: fix for #8686 add some more compiler flags 2009-03-27 12:33:17 -04:00
Bill Hoffman 97ef91d57b BUG: fix for 7845, idl files compile even with headerfile only on 2009-01-27 10:26:55 -05:00
Brad King 3cf9265fa7 ENH: Refactor passing of max length object dir
When computing the maximum length full path to the build directory under
which object files will be placed, pass the actual path instead of just
its length.  This will be useful for error message generation.
2008-12-16 09:14:40 -05:00
Bill Hoffman 749dbcdc6e ENH: make the scc optional 2008-10-27 15:31:03 -04:00
Bill Hoffman 1ed93e0a0e BUG: fix for 7839 and 4524 2008-10-27 13:51:30 -04:00
Bill Hoffman 637418a835 BUG: fix for 4524, add support for target properties to set vs source code control information 2008-10-07 16:23:20 -04:00
Bill Hoffman ecf312ccc8 STYLE: fix line length stuff for KWStyle 2008-10-01 09:04:27 -04:00
Bill Hoffman 771f127fe9 BUG: fix for 7624, vs7 flag table missing /MAP 2008-09-08 17:53:47 -04:00
Bill Hoffman d8837b92ba BUG: fix for 7519 extra closing > in fortran projects 2008-09-03 16:22:55 -04:00
David Cole e1ac9227a0 BUG: Fix issue #5773 - add table entry to map /W0 to WarningLevel="0" 2008-07-31 12:54:09 -04:00
Brad King b73cac6409 BUG: Do not escape make variable references in VS additional options. 2008-06-30 09:57:07 -04:00
Bill Hoffman fefe078e58 BUG: fix for bug 6619 2008-06-17 10:58:03 -04:00
Brad King 10db44a81d COMP: Fix build with concept checking of STL.
- Fix cmSourceGroup to not use std::vector with an incomplete type.
2008-05-16 16:56:41 -04:00
Bill Hoffman 10c91ded4f ENH: add support for Intel Fortran Visual studio IDE 2008-04-30 13:26:04 -04:00
David Cole 8950fca4ce BUG: Fix for issue #6440. Use 0 instead of FALSE for ExceptionHandling with Visual Studio 2005 and later. 2008-04-17 11:16:53 -04:00
Brad King 67834f2d53 BUG: Correct Mac OS X framework behavior
- Place the built library in foo.framework/Versions/A/foo
  - Do not create unused content symlinks (like PrivateHeaders)
  - Do not use VERSION/SOVERSION properties for frameworks
  - Make cmTarget::GetDirectory return by value
  - Remove the foo.framework part from cmTarget::GetDirectory
  - Correct install_name construction and conversion on install
  - Fix MACOSX_PACKAGE_LOCATION under Xcode to use the
    Versions/<version> directory for frameworks
  - Update the Framework test to try these things
2008-04-08 00:06:47 -04:00
Brad King 8605551920 ENH: Improve speed of manifest tool on VS8 and VS9.
- Detect filesystem type where target will be linked
  - Use FAT32 workaround only when fs is FAT or FAT32
2008-03-31 10:59:02 -04:00
Bill Hoffman 47d12c273c BUG: fix for 6619 2008-03-27 22:00:16 -04:00
Bill Hoffman 260de3ca3e BUG: fix for bug 6660 2008-03-27 21:54:49 -04:00
Bill Hoffman 7b93585960 BUG: fix for bug 6661 2008-03-27 21:51:32 -04:00
Bill Hoffman 8a83f09637 ENH: fix for bug 3218 dependant projects are written out automatically if they are in the project. Also fix bug 5829, remove hard coded CMAKE_CONFIGURATION_TYPES from vs 7 generator 2008-01-30 12:04:38 -05:00
Brad King 6066e92ba2 BUG: cmTarget instances should not be copied. Removed pass-by-value arguments from cmLocalVisualStudio7Generator::WriteGroup and cmLocalVisualStudio6Generator::WriteGroup. Updated cmTarget to make this easier to find. 2008-01-29 17:30:34 -05:00
Brad King ffac622a85 ENH: Add cmTarget::GetLinkInformation method to allow several places in the generators to share link information while only computing it once per configuration for a target. Use it to simplify the chrpath feature. 2008-01-29 15:07:33 -05:00
Brad King 96fd5909d9 ENH: Implement linking with paths to library files instead of -L and -l separation. See bug #3832
- This is purely an implementation improvement.  No interface has changed.
  - Create cmComputeLinkInformation class
  - Move and re-implement logic from:
      cmLocalGenerator::ComputeLinkInformation
      cmOrderLinkDirectories
  - Link libraries to targets with their full path (if it is known)
  - Dirs specified with link_directories command still added with -L
  - Make link type specific to library names without paths
    (name libfoo.a without path becomes -Wl,-Bstatic -lfoo)
  - Make directory ordering specific to a runtime path computation feature
    (look for conflicting SONAMEs instead of library names)
  - Implement proper rpath support on HP-UX and AIX.
2008-01-22 09:13:04 -05:00
Brad King 433099ecdd ENH: Converted cmMakefile DefineFlags added by ADD_DEFINITIONS command into a COMPILE_DEFINITIONS directory property. 2008-01-17 19:29:43 -05:00
Brad King 80c2be45e0 ENH: Renamed <CONFIG>_COMPILE_DEFINITIONS to COMPILE_DEFINITIONS_<CONFIG> for better documentation clarity. 2008-01-15 21:02:00 -05:00
Brad King 8262ccfd4e ENH: Create COMPILE_DEFINITIONS property for targets and source files. Create <config>_COMPILE_DEFINITIONS property as per-configuration version. Add Preprocess test to test the feature. Document limitations on Xcode and VS6 generators. 2008-01-14 09:20:58 -05:00