Commit Graph

168 Commits

Author SHA1 Message Date
Bill Hoffman 390117435a Fix KWStyle line length issues. 2010-09-15 16:41:41 -04:00
Brad King 9d21281b7d Fix line-too-long style errors 2010-09-10 14:42:09 -04:00
Brad King fe971d97ca Add STATIC_LIBRARY_FLAGS_<CONFIG> property (#10768)
This is a per-configuration version of STATIC_LIBRARY_FLAGS.
2010-05-28 11:09:10 -04:00
Brad King 7458d465dd Fix LINK_FLAGS_<CONFIG> in VS 6 generator
Add the flags to the link step, not the compile step!
2010-05-28 10:22:19 -04:00
Bill Hoffman 667b1b223f Fix for Bug#10700, COMPILE_DEFINITIONS_MINSIZEREL missing REL part.
Also remove some trailing whitespace.
2010-05-11 09:34:12 -04:00
Brad King b38c2929b0 Create a static library's output dir for VS 6
VS 6 forgets to create the output directory for a static library if it
differs from the intermediate files directory.  We work around this VS
bug by creating a pre-link event on the library target to make the
directory.
2009-10-28 12:19:15 -04:00
Brad King 90b8164e44 Use per-config output dir in VS 6 templates
This commit removes use of configuration-less cmTarget::GetDirectory()
by the VS 6 generator (except for compatibility with user templates).
We replace OUTPUT_DIRECTORY_<CONFIG> tokens in the templates using the
per-configuration result of cmTarget::GetDirectory(config).
2009-10-28 12:18:55 -04:00
Brad King 51ba120844 Remove unused members of local VS 6 generator
The commit "Use target dependency closure for VS 6 solutions" removed
use of the CreatedProjectNames list, so we remove it.
2009-09-30 16:03:09 -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 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 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
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 962bbbec95 BUG: Create an exe's implib output dir for VS 6
VS 6 forgets to create the output directory for an executable's import
library in case the exe dllexport-s symbols.  We work around this VS bug
by creating a pre-link event on the executable target to make the
directory.
2009-06-16 11:57:23 -04:00
Brad King 5129c23cba ENH: Refactor VS 6 build event generation
In cmLocalVisualStudio6Generator 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-16 11:57:18 -04:00
Brad King 708d1cf1ee ENH: Support more preprocessor values in VS6
Previously we rejected all preprocessor definition values containing
spaces for the VS6 IDE generator.  In fact VS6 does support spaces but
not in combination with '"', '$', or ';', and only if we use the sytnax
'-DNAME="value with spaces"' instead of '-D"NAME=value with spaces"'.
Now we support all definition values that do not have one of these
invalid pairs.  See issue #8779.
2009-04-24 11:18:06 -04:00
Brad King 4085454658 ENH: Support preprocessor def values in VS6
The add_definitions() command and COMPILE_DEFINITIONS dir/tgt/src
properties support preprocessor definitions with values.  Previously
values were not supported in the VS6 generator even though the native
tool supports them.  It is only values with spaces that VS6 does not
support.  This enables support and instead complains only for values
with spaces.  See issue #8779.
2009-03-23 14:48:09 -04: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
David Cole 227c86d8cc STYLE: Fix line length style violations. 2008-12-10 10:50:07 -05:00
David Cole 16f35e189e COMP: Fix the ExternalProject test for Visual Studio 6. Visual Studio 6 *.dsp files cannot have hyphens in them. Add utility function GetVS6TargetName to replace hyphens with underscores when generating *.dsp file names. Use the function everywhere necessary in the VS6 generators. And, a workaround: VS6 uses ".\Debug" (for example) as an "$(IntDir)" value - strip any leading ".\" when processing a --config argument in the cmake --build handling code. 2008-12-09 16:07:10 -05:00
Bill Hoffman 97392a754c STYLE: fix link length issues 2008-12-07 19:36:03 -05:00
Bill Hoffman 68cf9e0a0d BUG: fix for bug #8216 2008-12-04 08:57:27 -05:00
Bill Hoffman a50cdcb5a6 BUG: fix for rc and vs6 2008-12-03 15:35:35 -05:00
Bill Hoffman 364ac7e386 BUG: fix empty /D option for vs6, fix for 7580 2008-09-09 13:04:30 -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 21ad82a21b BUG: fix for 6720, source groups on vs6 not working 2008-04-21 18:24:56 -04: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 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 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 18b9e7db6c ENH: Enable CMAKE_<lang>_DEFINE_FLAG for COMPILE_DEFINITIONS property implementation. 2008-01-17 10:00:19 -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
Brad King b94530c7b4 BUG: Need to honor HEADER_FILE_ONLY source file property and exclude the source from the build. 2007-11-20 11:18:04 -05:00
Brad King e5bb99e010 ENH: Removed dependency on Templates/CMakeWindowsSystemConfig.cmake which is no longer used. Also removed the file itself. 2007-11-09 15:08:56 -05:00
Brad King c6092b7e5e BUG: Fixed passing of configuration names to GetRealDependency and ConstructScript. Added GetConfigName helper method to do this. 2007-08-10 13:02:59 -04:00
Brad King ea874415d9 ENH: Moved GetTargetDirectory method up to cmLocalGenerator. This provides a common interface to something that was implemented in most local generators anyway. 2007-08-01 15:25:40 -04:00
Alexander Neundorf 43de8c8628 ENH: add OPTIONAL keyword to ENABLE_LANGUAGE, so it will be possible to do
something like this:

ENABLE_LANGUAGE(ASM-ATT)
IF(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... do assembler stufff
ELSE(CMAKE_ASM-ATT_COMPILER_WORKS)
  ... fallback to generic C/C++
ENDIF(CMAKE_ASM-ATT_COMPILER_WORKS)

Alex
2007-06-28 09:09:26 -04:00
Brad King 35936433e1 ENH: Merging changes from branch CMake-SourceFile2-b between tags
CMake-SourceFile2-bp and CMake-SourceFile2-b-mp1 to trunk.  This
commit is surrounded by tags CMake-SourceFile2-b-mp1-pre and
CMake-SourceFile2-b-mp1-post on the trunk.

The changes re-implement cmSourceFile and the use of it to allow
instances to be created much earlier.  The use of cmSourceFileLocation
allows locating a source file referenced by a user to be much simpler
and more robust.  The two SetName methods are no longer needed so some
duplicate code has been removed.  The strange "SourceName" stuff is
gone.  Code that created cmSourceFile instances on the stack and then
sent them to cmMakefile::AddSource has been simplified and converted
to getting cmSourceFile instances from cmMakefile.  The CPluginAPI has
preserved the old API through a compatibility interface.

Source lists are gone.  Targets now get real instances of cmSourceFile
right away instead of storing a list of strings until the final pass.

TraceVSDependencies has been re-written to avoid the use of
SourceName.  It is now called TraceDependencies since it is not just
for VS.  It is now implemented with a helper object which makes the
code simpler.
2007-06-18 11:59:23 -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 79756b0e67 BUG: don't use non-imported target when cross compiling as commands in custom commands
STYLE: remove now invalid comments, use this->

Alex
2007-05-24 08:43:31 -04:00
Brad King ba7780a3c4 ENH: Fixed INSTALL_FILES and INSTALL_PROGRAMS commands to not create targets. No targets of type cmTarget::INSTALL_FILES or cmTarget::INSTALL_PROGRAMS are created, so we do not need to check for them everywhere anymore. 2007-05-23 15:40:12 -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
Alexander Neundorf e4b5de6377 STYLE: fix line lengths
Alex
2007-05-14 11:23:37 -04:00
Alexander Neundorf 8245f437b6 BUG: fix problem for non-C/CXX languages with Visual Studio, the
dependencies for the custom commands added for java were not handled
correctly. Needs more work.

Alex
2007-05-09 14:41:38 -04:00
Alexander Neundorf 7f11536704 ENH: now target names can be used in add_custom_command() and
add_custom_target() as COMMAND, and cmake will recognize them and replace
them with the actual output path of these executables. Also the dependency
will be added automatically. Test included.
ENH: moved TraceVSDependencies() to the end of GlobalGenerator::Configure(),
so it is done now in one central place

Alex
2007-05-09 08:25:45 -04:00
Brad King af95f61d76 ENH: Created method cmTarget::GetExportMacro to centralize computation of the export symbol name. This removes duplicate code from all the generators. Also enabled the export definition for executable targets with the ENABLE_EXPORTS property set. 2007-03-27 23:13:25 -04:00
Brad King fc7c433463 ENH: Added support for import libraries created by executable and module targets. The module import libraries should never be used but some windows compilers always create them for .dll files since there is no distinction from shared libraries on that platform. The executable import libraries may be used to create modules that when loaded bind to symbols from the executables. This is an enhancement related to bug#4210 though not requested by it explicitly. 2007-03-19 10:00:36 -04:00