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
Brad King
1f639ee76c
ENH: Added computation of object file names that are almost always short enough to not exceed the filesystem path length limitation. This is useful when a source file from outside the tree is referenced with a long full path. The object file name previously would contain the entire path which when combined with the build output directory could exceed the filesystem limit. Now CMake recognizes this case and replaces enough of the beginning of the full path to the source file with an md5sum of the replaced portion to make the name fit on disk. This addresses bug#4520.
2007-03-16 10:34:25 -04:00
Brad King
01a27cb5b4
STYLE: Fix line-too-long.
2007-03-10 06:56:11 -05:00
Brad King
ade0fb94d8
BUG: Re-enable backward compatibility replacements in user-provided VS6 DSP template files.
2007-03-09 16:26:16 -05:00
Brad King
80e6cade7a
ENH: Implemented use of cmTarget::GetDirectory() in Visual Studio 6 generator. This is an incremental fix for bug#4210.
2007-03-09 16:25:16 -05:00
Bill Hoffman
323860cbdf
ENH: fix crash
2007-02-20 10:52:06 -05:00
Bill Hoffman
1d8e7e9411
BUG: fix for bug 4423 set language fixes
2007-02-20 09:35:21 -05:00
Bill Hoffman
857a54ec54
STYLE: fix warning
2007-02-18 09:31:16 -05:00
Bill Hoffman
ca0230a33e
ENH: check in initial conv library stuff
2007-02-16 16:12:17 -05:00
Bill Hoffman
e537b60ea2
ENH: undo bug fix because of failed test
2007-01-23 11:25:26 -05:00
Bill Hoffman
ef9e460f65
ENH: add link flags for debug/release etc
2007-01-23 10:50:05 -05:00
Brad King
e15249f11e
COMP: Remove unused variable.
2006-10-25 14:03:33 -04:00
Brad King
89f098bc59
BUG: Adjust prebuild/prelink/postbuild script construction to account for ConstructScript no longer producing trailing newlines. This addresses bug#3977.
2006-10-25 12:49:27 -04:00
Brad King
b155f3aa1c
ENH: Adding image version number (major.minor) property to windows binaries. Default is 0.0, but the VERSION target property may change the value. Windows now has first-class support for dll and exe versioning. This addresses bug#1219.
2006-10-16 18:17:14 -04:00
Brad King
dd332a00cc
ENH: Re-implemented command line argument shell quoting to support several platforms with one code base.
2006-09-27 13:43:46 -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
Brad King
87ef95c715
ENH: Made cmLocalVisualStudioGenerator a superclass of cmLocalVisualStudio6Generator. Implemented object file unique naming when multiple sources share the same name.
2006-07-11 13:23:02 -04:00
Ken Martin
7dc8a92246
STYLE: fix line length
2006-05-12 11:56:09 -04:00
Brad King
864c0292d5
BUG: VS6 generator now uses ComputeLinkInformation just like all other generators.
2006-04-19 10:34:41 -04:00
Brad King
7b4adecf98
BUG: Do not require language flags variables. Other generators do not, and it breaks programmable language support (like the Java test).
2006-04-18 11:53:41 -04:00
Brad King
428b4c9244
ENH: Updated VS6 generator to use target.GetFullName() to compute target file names.
2006-04-18 11:45:31 -04:00
Brad King
08289893b8
ENH: Split CMAKE_STANDARD_LIBRARIES into per-language variables CMAKE_<lang>_STANDARD_LIBRARIES. This is needed to get programmable language support working with Visual Studio generators. It makes sense anyway.
2006-04-11 16:55:49 -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
3c8e899102
ENH: add support for per config target LINK_FLAGS
2006-04-03 12:57:51 -04:00
Ken Martin
00d2546664
ENH: removed unused rules from targets for VS
2006-03-23 13:55:09 -05:00
Ken Martin
3d96e52261
STYLE: some m_ to this-> cleanup
2006-03-15 11:02:08 -05:00
Andy Cedilnik
c4156b4531
COMP: Even more global target fixes
2006-02-24 17:35:35 -05:00
Andy Cedilnik
07d0e776ad
BUG: More fixing of support for global target son visual studio
2006-02-24 16:20:44 -05:00
Brad King
7bdec94154
BUG: Add target-level COMPILE_FLAGS to the target not the individual source files. This simplifies the generated files and puts flags in a more logical order (VS6 works, VS7 needs more translation to work).
2006-02-20 14:21:10 -05:00
Brad King
9ba0283870
ENH: If CMAKE_NO_AUTOMATIC_INCLUDE_DIRECTORIES is not set try to approximate in-source build include file behavior in an out-of-source build by adding the build tree directory corresponding to a source tree directory at the beginning of the include path. Also fixed VS6 and VS7 generators to use cmLocalGenerator's computation of include paths. The VS6 generator will now short-path the include directories if the total length is too long in order to try to avoid its truncation limit.
2006-02-18 11:51:23 -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
0748f6ae34
COMP: Removed unused variables.
2006-02-09 19:29:09 -05:00
Brad King
1b5e3f4136
BUG: Fixed generation of cmake re-run rules.
2006-02-09 18:42:58 -05:00
Brad King
c6741363de
ENH: Enabled new WORKING_DIRECTORY option to ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET on VS 6 generator.
2006-02-08 12:01:21 -05:00
Bill Hoffman
347c5f4b46
ENH: add working directory support
2006-02-08 10:58:36 -05:00
Bill Hoffman
07ef88c985
ENH: add COMPILE_FLAGS to targets
2006-01-25 08:38:06 -05:00
Brad King
22c62c9e65
BUG: Sweeping changes to cleanup computation of target names. This should
...
fix many bugs related to target names being computed inconsistently.
- Centralized computation of a target's file name to a method in
cmTarget. Now that global knowledge is always available the
*_CMAKE_PATH cache variables are no longer needed.
- Centralized computation of link library command lines and link
directory search order.
- Moved computation of link directories needed to link CMake targets
to be after evaluation of linking dependencies.
This also removed alot of duplicate code in which each version had its
own bugs.
This commit is surrounded by the tags
CMake-TargetNameCentralization1-pre
and
CMake-TargetNameCentralization1-post
so make the large set of changes easy to identify.
2006-01-13 18:18:32 -05:00
Bill Hoffman
a91947039a
ENH: for all custom commands that can not be given to a target, add them to all targets in the current makefile
2006-01-09 14:40:31 -05:00
Brad King
05e6c3f3ba
BUG: Fixed OUTPUT_NAME feature for VS6 generator. It was not working for Debug builds and was not paying attention to the executable output path.
2005-08-19 17:57:36 -04:00
Bill Hoffman
3d5a724deb
BUG: revert part of patch that set executable debug prefix as it breaks too much stuff
2005-07-13 16:49:51 -04:00
Bill Hoffman
19ae75a934
BUG: try to fix failed test
2005-07-13 16:20:25 -04:00
Bill Hoffman
aa47caab2d
FIX: apply patch from bug# 1965
2005-07-13 11:21:30 -04:00
Ken Martin
369308ca76
ENH: make LOCATION an computed property of the target and get rid of a bunch of const junk
2005-06-22 09:06:46 -04:00
Ken Martin
fbf40e202a
ENH: add first cut at support for exe with same name as lib
2005-06-16 11:48:43 -04:00
Ken Martin
708828dc37
ENH: removed old convert calls
2005-06-10 08:41:47 -04:00
Brad King
15c7d45ecd
BUG: Fixed ordering of multiple commands in a custom target when implemented as custom commands. Also added support to execute pre-build rules first to be consistent with makefile generator.
2005-04-26 11:08:18 -04:00
Ken Martin
345cf04012
ENH: big change that includes immediate subdir support, removing the notion of inherited commands, makefiles no longer read in the parent makefiles but instead inherit thier parent makefiles current settings
2005-03-18 10:41:41 -05:00
Brad King
77e22a7d70
BUG: Replaced previous fix with an implementation of properly formatting the custom build code in the generated file.
2005-03-01 10:05:58 -05:00
Ken Martin
a5501b11f6
FIXTHIS THING: fix the bug
2005-02-28 16:11:21 -05:00
Brad King
397dc1cef5
ENH: Converted some ConvertToRelativeOutputPath calls to ConvertToOptionallyRelativeOutputPath in preparation for making ConvertToRelativeOutputPath always convert. Some of these might be able to be switched back but we will first have to test what paths can be relative in the generate VS project files.
2005-02-24 18:35:36 -05:00
Brad King
77194207ce
BUG: Need proper newline argument to ConstructScript call.
2005-02-24 09:20:34 -05:00
Brad King
39af9ee1e4
ENH: Updated implementation of custom commands. Multiple command lines are now supported effectively allowing entire scripts to be written. Also removed extra variable expansions and cleaned up passing of commands through to the generators. The command and individual arguments are now kept separate all the way until the generator writes them out. This cleans up alot of escaping issues.
2005-02-22 10:32:44 -05:00
Bill Hoffman
712f4b3d01
FIX: fixes bugs 1152 and 1154
2005-02-11 14:13:58 -05:00
Bill Hoffman
36c8f1d157
ENH: put error checking for missing linker languages
2004-10-27 10:53:01 -04:00
Bill Hoffman
7cef36c628
ENH: add the ability to generate custom commands for a language that is not supported by an IDE
2004-10-21 14:34:02 -04:00
Bill Hoffman
309b4caf45
BUG: make sure release flags are replaced
2004-09-27 16:33:42 -04:00
Ken Martin
e735351b3f
BUG: fix crash with vs6
2004-09-24 11:35:16 -04:00
Bill Hoffman
9cca063c7d
fix compilation
2004-09-22 16:44:42 -04:00
Bill Hoffman
692ba48c4e
ENH: major changes to support addition of languages from cmake modules directory.
2004-09-22 14:42:05 -04:00
Bill Hoffman
bedb6e899f
BUG: fix for bug 1041, _MBCS sometimes added for UNIICODE which is bad
2004-09-17 15:57:01 -04:00
Bill Hoffman
b5bdf2cb0a
ENH: add better error reporting for file open failures
2004-09-07 16:55:25 -04:00
Bill Hoffman
b41d447935
ENH: use GetRequiredDefinition instead of GetDefinition and crash
2004-08-11 16:58:09 -04:00
Bill Hoffman
d655b65256
ENH: fix rerun of cmake command
2004-05-21 09:51:44 -04:00
Bill Hoffman
70eaddbf8e
BUG: make sure global generate is done when cmakelist file chagnes, also make sure guids are stored in the cache so the .sln file does not change every time
2004-05-20 16:29:09 -04:00
Bill Hoffman
71b57bc454
BUG: fix for bug 769 CMAKE_STANDARD_LIBRARIES now used in ides
2004-04-23 16:26:21 -04:00
Bill Hoffman
3262bc73d3
ENH: allow verbose makefile flag to remove nologo from all commands so you can see them in visual studio 6
2004-04-23 09:12:57 -04:00
Bill Hoffman
7b576866b7
ENH: add support for static library property STATIC_LIBRARY_FLAGS
2004-04-22 16:58:04 -04:00
Bill Hoffman
4e8b76dc93
BUG 178: make top level cmakelist file a source in ALL_BUILD
2004-04-22 09:44:41 -04:00
Andy Cedilnik
b1a7421840
ENH: Styart working on bundles support and abstract WIN32_EXECUTABLE
2004-02-28 18:59:19 -05:00
Ken Martin
cb2b5a188a
fix for long lines with post build rules
2004-01-05 12:53:03 -05:00
Bill Hoffman
0bdb092a01
ENH: add relative paths to visual studio 6 and 7 project files
2003-12-22 16:21:27 -05:00
Andy Cedilnik
72d8bd1e41
BUG: Fix Bug #445 - Same library in multiple projects can cause problems
2003-12-18 13:17:36 -05:00
Bill Hoffman
eff0a824c4
BUG: hack fix for problem of MS vs 6 and custom target commands
2003-11-03 15:57:56 -05:00
Bill Hoffman
f60e16f8ab
BUG: fix for debug libs not using output path
2003-11-03 11:01:48 -05:00
Andy Cedilnik
368d7f7c18
ENH: Attempt to add debug library postfix for visual studio 6
2003-10-31 16:55:49 -05:00
Bill Hoffman
4d2ca08bc7
ENH: allow UNICODE to be specifed in the cxx flags and if not default to MBCS
2003-10-16 10:32:47 -04:00
Bill Hoffman
dd4e8df29a
BUG: make sure exe output path is used for dep hack stuff
2003-08-28 16:22:46 -04:00
Ken Martin
5824302612
bad evil nasty ken
2003-08-28 16:10:44 -04:00
Ken Martin
2b2a9d73da
fix to executable depends for custom commands
2003-08-28 16:06:06 -04:00