Commit Graph

438 Commits

Author SHA1 Message Date
Brad King f309366873 Fix default PDB output directory (#13644)
The ComputePDBOutputDir added by commit 3f60dbf1 (Add
PDB_OUTPUT_DIRECTORY and PDB_NAME target properties, 2012-09-25) falls
back to the current binary directory instead of the target output
directory as before.  When no PDB_OUTPUT_DIRECTORY property is set we
instead should fall back to the target output directory where .pdb files
used to go before the new property was added.
2012-11-02 12:49:44 -04:00
Brad King ed9763136a Optionally skip link dependencies on shared library files
Add target property LINK_DEPENDS_NO_SHARED and initialization variable
CMAKE_LINK_DEPENDS_NO_SHARED to enable this behavior.

Suggested-by: Leif Walsh <leif.walsh@gmail.com>
2012-10-26 08:28:16 -04:00
Brad King 15cc55fe08 Merge topic 'documentation-cleanup'
4ad0233 Remove period at the end of the check message.
50b1ea5 Fix minor typos.
19c3206 Remove unused parameter marker and the unused parameter.
9d462b2 Document that generator expressions can be used in target properties.
daf88c3 Fix punctuation in some variables documentation.
3172cde Fix the layout of the generator expression documentation.
2012-10-01 14:05:44 -04:00
Brad King 7dce31f3d0 Merge topic 'vs-pdb-output'
2ccca05 Run PDBDirectoryAndName test on MSVC and Intel
efc83b3 Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6
b294457 Verify that PDB_(NAME|OUTPUT_DIRECTORY) are honored in test
3f60dbf Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
2012-10-01 14:05:11 -04:00
Stephen Kelly 50b1ea5bed Fix minor typos.
nothe -> note
than -> that
duplicat -> duplicate
directory -> directly
Wipe wipe -> Wipe
2012-09-29 18:44:10 +02:00
Stephen Kelly 19c3206bdc Remove unused parameter marker and the unused parameter. 2012-09-29 18:42:56 +02:00
Stephen Kelly 9d462b22a3 Document that generator expressions can be used in target properties. 2012-09-29 18:42:56 +02:00
Brad King efc83b369b Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6 2012-09-25 15:23:35 -04:00
Yuchen Deng 3f60dbf148 Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
This enables changing the name and output folder of the debug symbol
files produced by MS compilers.

Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
2012-09-25 15:23:35 -04:00
Stephen Kelly 879fd354c1 Revert "Move GenerateTargetManifest to cmGeneratorTarget."
This reverts commit 987e12e2f9.

GenerateTargetManifest is called by the global generator before it
creates the generator targets, so we can't move it to cmGeneratorTarget
yet.
2012-09-20 08:34:30 +02:00
Stephen Kelly 290e92ada8 Move GetIncludeDirectories to cmGeneratorTarget. 2012-09-19 15:32:09 +02:00
Stephen Kelly 9facfd1336 Move GetCreateRuleVariable to cmGeneratorTarget. 2012-09-19 15:31:32 +02:00
Stephen Kelly 78bfee35d5 Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget. 2012-09-19 15:31:29 +02:00
Stephen Kelly 4f5384e75c Move GetLinkInformation to cmGeneratorTarget 2012-09-19 15:30:57 +02:00
Stephen Kelly 987e12e2f9 Move GenerateTargetManifest to cmGeneratorTarget. 2012-09-19 15:30:49 +02:00
Stephen Kelly 91011bd217 cmGeneratorExpression: Port users to two-stage processing
Removing the Process() API and removing the parameters from the
constructor will allow cmGeneratorExpressions to be cached and evaluated
with multiple configs for example, such as when evaluating target
properties.  This requires the creation of a new compiled representation
of cmGeneratorExpression.  The cmListFileBacktrace remains in the
constructor so that we can record where a particular generator
expression appeared in the CMakeLists file.
2012-09-18 17:03:08 -04:00
Brad King 4eaea3c358 add_library: Document POSITION_INDEPENDENT_CODE default (#13479)
The POSITION_INDEPENDENT_CODE property documentation states that its
default value depends on whether SHARED or MODULE is given to the
add_library call.  Since these are options to the add_library command we
should document on the command how they affect the property.

While at it, add a missing space to the POSITION_INDEPENDENT_CODE
property documentation.
2012-08-31 07:36:05 -04:00
Stephen Kelly 325214900b Fix casing of 'Qt' in docs, comments and user-visible strings.
QT (cue-tea) is Apple QuickTime.
Qt (cute) is the C++ framework.
2012-08-28 11:24:55 +02:00
David Cole 56591cb9b4 Merge topic 'pic-docs'
c82fbe0 Fix unfortunate documentation error for PIC feature.
2012-08-24 14:24:01 -04:00
Stephen Kelly c82fbe0c1f Fix unfortunate documentation error for PIC feature.
The wrong variable is documented, and it is not referred to in
the target-specific property.
2012-08-20 22:33:27 +02:00
Stephen Kelly ee949d8871 Remove duplicate 'of' from docs. 2012-08-20 22:26:05 +02:00
Stephen Kelly 389d423177 Add missing whitespace to docs. 2012-08-19 23:31:09 +02:00
Nicolas Despres f8e0a5109f Re-factor framework directory computation. 2012-07-17 14:03:11 +02:00
Nicolas Despres f36c7b0bbe Re-factor Mac OS X content directory computation. 2012-07-17 14:03:11 +02:00
Nicolas Despres 54d9713adb Ninja: Add support for CFBundle.
This patch fixes test CFBundleTest on Darwin.
2012-07-17 14:03:08 +02:00
Stephen Kelly bd34963002 Refactor generation of shared library flags
CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a
variety of purposes that are correlated with shared libraries but not
exclusive to them.  Refactor generation of these flags to use new
purpose-specific platform variables

  CMAKE_<lang>_COMPILE_OPTIONS_DLL
  CMAKE_<lang>_COMPILE_OPTIONS_PIC
  CMAKE_<lang>_COMPILE_OPTIONS_PIE

Activate the DLL flags specifically for shared libraries.  Add a new
POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and
default to true for shared libraries to preserve default behavior.
Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to
allow easy global configuration in projects.

Although the default behavior is unchanged by this refactoring, the new
approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely.  We must
leave it set in case projects reference the value.  Furthermore, if a
project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new
value to be used.  Add policy CMP0018 to handle compatibility with
projects that modify this platform variable.

Add a PositionIndependentCode test on platforms where we can get
meaningful results.
2012-06-12 15:38:48 -04:00
Stephen Kelly bdc6e32d32 Update the docs of IMPORTED_LOCATION_CONFIG to match the code. 2012-05-25 12:22:27 +02:00
Modestas Vainius 1aa52163ef Fix a few typos in NO_SONAME property description. 2012-05-02 15:14:05 -04:00
Modestas Vainius e1409ac59b Support building shared libraries or modules without soname (#13155)
Add a boolean target property NO_SONAME which may be used to disable
soname for the specified shared library or module even if the platform
supports it.  This property should be useful for private shared
libraries or various plugins which live in private directories and have
not been designed to be found or loaded globally.

Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and
hard-coded -install_name flags with a conditional <SONAME_FLAG> which is
expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG
definition as long as soname supports is enabled for the target in
question.  Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in
rules in case third party projects still use it.  Such projects would
not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be
expanded.  Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well.  Since
-install_name is soname on OS X, this should not be a problem if this
variable is expanded only if soname is enabled.

The Ninja generator performs rule variable substitution only once
globally per rule to put its own placeholders.  Final substitution is
performed by ninja at build time.  Therefore we cannot conditionally
replace the soname placeholders on a per-target basis.  Rather than
omitting $SONAME from rules.ninja, simply do not write its contents for
targets which have NO_SONAME.  Since 3 variables are affected by
NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if
soname is enabled.
2012-04-30 11:50:27 -04:00
David Cole fa083753f1 CMake: Clarify SUFFIX target property documentation.
Make it clear that the property applies to libs, modules
and exes, not just libs.
2012-04-02 10:00:27 -04:00
David Cole 31c0bc0219 Merge topic 'object-library'
93d5509 Merge branch 'ninja-object-library' into object-library
821037c Merge branch 'xcode-object-library' into object-library
eb24c99 Merge branch 'object-library' into xcode-object-library
63d1be8 Xcode: Honor $<TARGET_OBJECTS:...> source expressions
020ba38 Merge branch 'object-library' into xcode-object-library
e8ea615 Build object library targets in Xcode
8045e17 Pre-compute object file names before Xcode generation
247a132 Allow txt files as ExtraSources in object library targets
b063599 Add a default source group for object files.
be01f3b Xcode: Re-factor some existing methods into "FromPath" variants
2693dbe Merge branch 'object-library' into ninja-object-library
51997cb Ninja: Honor $<TARGET_OBJECTS:...> source expressions
23ec258 Merge branch 'object-library' into ninja-object-library
61124de Build object library targets in Ninja
f5b06cd Pre-compute object file names before Ninja generation
a2514f1 Simplify cmNinjaTargetGenerator using cmGeneratorTarget
...
2012-03-20 09:34:35 -04:00
Brad King c403f27a2d Add $<TARGET_OBJECTS:...> expression to use an object library
For now do not allow an OBJECT library to reference other object
libraries.  Teach cmTarget::ComputeLinkImplementation to include the
languages of object libraries used by a target.
2012-03-16 10:12:15 -04:00
Brad King b87d7a60a0 Add OBJECT_LIBRARY target type
This library type can compile sources to object files but does not link
or archive them.  It will be useful to reference from executable and
normal library targets for direct inclusion of object files in them.

Diagnose and reject the following as errors:

* An OBJECT library may not be referenced in target_link_libraries.

* An OBJECT library may contain only compiling sources and supporting
  headers and custom commands.  Other source types that are not normally
  ignored are not allowed.

* An OBJECT library may not have PRE_BUILD, PRE_LINK, or POST_BUILD
  commands.

* An OBJECT library may not be installed, exported, or imported.

Some of these cases may be supported in the future but are not for now.

Teach the VS generator that OBJECT_LIBRARY targets are "linkable" just
like STATIC_LIBRARY targets for the LinkLibraryDependencies behavior.
2012-03-13 14:37:32 -04:00
Brad King e8f1d7f031 Merge topic 'doc-Fortran-mod-dir-issue-13034'
54604ee Document Fortran_MODULE_DIRECTORY as OUTPUT only (#13034)
2012-03-13 11:54:58 -04:00
Brad King 1ee4b65a7f Merge topic 'cleanup-object-file-names'
0996f2a Hide Makefile local object info inside local generator
67734be VS: Simplify object name computation
4ae7f36 Remove unused partial OBJECT_FILES property implementation
2012-03-13 11:53:28 -04:00
Brad King 54604ee7e9 Document Fortran_MODULE_DIRECTORY as OUTPUT only (#13034)
CMake does not automatically pass the Fortran module output directory
location to the module search path.  Add a note to the documentation
that the location must also be specified by INCLUDE_DIRECTORIES.
2012-03-12 11:54:54 -04:00
Brad King 51b67366ed Merge branch 'cleanup-object-file-names' into object-library 2012-03-09 15:15:37 -05:00
David Cole 580171185b Merge topic 'target-include-directories'
d662dff Fix shadowed variable warning on dashboard results
f66e735 Fix compiler warning reported on older Borland dashboard.
d90eed4 Fix compiler error reported on older Borland dashboard.
8233636 Update the documentation regarding INCLUDE_DIRECTORIES.
d899eb7 Call ExpandVariablesInString for each target's INCLUDE_DIRECTORIES
c21db87 Make search paths ordered and unique
22021f0 Remove cmMakefile::GetIncludeDirectories
9106b56 Extract and use the INCLUDE_DIRECTORIES target properties.
840509b Keep the INCLUDE_DIRECTORIES target property up to date.
a4d5f7b Add API to get the ordered includes for a target.
8adaee2 CMake: Eliminate cmMakefile::IncludeDirectories
7620932 Remove include flags memoization.
97a5faa Make it safe to call this method without creating duplicates.
edd5303 Refactor GetIncludeFlags to take includes instead of fetching them
2012-03-08 15:13:15 -05:00
David Cole 50f9db9b00 Merge topic 'skip-install-rpath'
635bf50 Add an option to skip RPATH during installation.
2012-03-06 15:27:54 -05:00
Brad King 4ae7f3656b Remove unused partial OBJECT_FILES property implementation
Remove partial implementation added by commit ca0230a3 (check in initial
conv library stuff, 2007-02-16) since it was never finished.  It does
not make sense for multi-configuration generators since no specific
build configuration is processed at CMake time.
2012-03-06 13:20:17 -05:00
Stephen Kelly 635bf50c27 Add an option to skip RPATH during installation. 2012-03-05 22:24:57 +01:00
Stephen Kelly 761c146a4c Add default initializers for WIN32_EXECUTABLE and MACOSX_BUNDLE
This allows downstreams to use

set(CMAKE_WIN32_EXECUTABLE ON)
set(CMAKE_MACOSX_BUNDLE ON)

to create executables with the WIN32_EXECUTABLE and MACOSX_BUNDLE
properties set on by default.
2012-03-05 15:50:55 +01:00
David Cole 881dc35579 Merge topic 'factor-install-type'
573fa3b Factor cmInstallType out of cmTarget::TargetType
2012-03-02 11:47:42 -05:00
Brad King 573fa3bf13 Factor cmInstallType out of cmTarget::TargetType
The purpose of the TargetType enumeration was overloaded for install
type because install rules were once recorded as targets.  Factor the
install types out into their own enumeration.
2012-02-27 13:19:57 -05:00
David Cole 8233636dbe Update the documentation regarding INCLUDE_DIRECTORIES.
It is now a target property and is affected by the use
of the include_directories command.
2012-02-22 15:22:03 -05:00
Stephen Kelly 840509babb Keep the INCLUDE_DIRECTORIES target property up to date.
The directory level property changes need to be added to it.
2012-02-22 06:31:50 -05:00
Stephen Kelly a4d5f7b9b2 Add API to get the ordered includes for a target. 2012-02-22 06:31:49 -05:00
Modestas Vainius d36d29f1f0 various typo and formatting fixes in manual pages (#12975)
The patch fixes the following lintian warnings:

W: cmake-data: manpage-has-errors-from-man usr/share/man/man1/cmakemodules.1.gz 2728: warning: macro `..' not defined
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz overriden overridden
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz overriden overridden
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz explicitely explicitly
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz jave java
W: cmake-data: manpage-has-errors-from-man usr/share/man/man1/cmakeprops.1.gz 1040: warning [p 25, 3.7i]: can't break line
W: cmake: manpage-has-errors-from-man usr/share/man/man1/cmake.1.gz 4233: warning [p 85, 1.3i]: can't break line
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz overriden overridden
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz overriden overridden
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz explicitely explicitly
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz jave java
2012-02-18 16:12:45 +01:00
Eugene Golushkov 9e01aefd24 VS: Add support for WinRT project properties (#12930)
VS_WINRT_EXTENSIONS: Boolean property that correspond to "Enable
Tailored Features" in Visual Studio 11 IDE.

VS_WINRT_REFERENCES: Semicolon-delimited list of *.winmd references to
add to the project, which creates a new <ItemGroup>.
2012-02-03 09:26:24 -05:00
Brad King 7d20619fbe Clarify IMPORTED_ target property documentation
These properties are meant to be set to tell CMake something, not read
to get information from CMake.
2012-01-25 16:26:40 -05:00
Alex Neundorf 96fc5d5d07 automoc: default to strict mode, use CMAKE_AUTOMOC_RELAXED_MODE
automoc now defaults to strict mode, also with Qt4, i.e. it behaves as
the documentation says by default. I also inverted the switch
CMAKE_AUTOMOC_STRICT_MODE to CMAKE_AUTOMOC_RELAXED_MODE.
Docs and test adapted accordingly.

Alex
2011-12-13 22:11:47 +01:00
David Cole d050d6b58b Merge topic 'AutomocIncludedDotMocFileHandling'
2d11951 Merge branch 'master' into AutomocIncludedDotMocFileHandling
1eca18f automoc: add documentation for CMAKE_AUTOMOC_STRICT_MODE
bc278ce automoc: fix line length
62e223e automoc: add variable CMAKE_AUTOMOC_STRICT_MODE, to enable strict parsing
40c5167 automoc: accept even more .moc files in non-strict mode
c207f5d automoc: also accept other files when .moc is included in non-strict mode
9c0df72 automoc: add a StrictParseCppFile(), which is only qmake-compatible
174bf35 automoc: move the code for finding headers into separate function
8507eae automoc: fix handling of included _p.moc files
7ada172 automoc: some more linebreaks for the warnings for better readability
3b93e26 automoc: add extra check whether the header contains Q_PRIVATE_SLOT
4745715 Add a test case for the use of Q_PRIVATE_SLOT.
bde4edb automoc: add special handling for including basename_p.moc, with test
74ab0f6 automoc: move some code from the big parsing loop into separate functions
bc7560e automoc: add test for including a moc_abc_p.cpp file
30fd8e6 automoc: add test for including the moc file from another header
...
2011-12-07 16:47:35 -05:00
David Cole 174ecf51f8 Merge topic 'refactor-versioned-lib-names'
96f65ba cmTarget: Create helper method for versioned library names
2011-12-07 16:46:35 -05:00
David Cole 2d1195123e Merge branch 'master' into AutomocIncludedDotMocFileHandling
Conflicts:
	Source/cmTarget.cxx
2011-12-07 16:29:13 -05:00
David Cole 386cf3c593 Merge topic 'GNU-to-MS'
ae62a1c Test CMAKE_GNUtoMS option in ExportImport on MinGW and MSys
afb00fe Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib
61e8629 Factor makefile generator link rule lookup into helper function
a603250 Load platform files that need to know the ABI when possible
ecd8414 Fortran: Detect pointer size in gfortran on MinGW
2011-12-06 15:07:39 -05:00
Alex Neundorf 1eca18fd52 automoc: add documentation for CMAKE_AUTOMOC_STRICT_MODE
Alex
2011-12-06 20:42:20 +01:00
Brad King 96f65ba68e cmTarget: Create helper method for versioned library names
Replace the duplicate logic for the realName and soName of versioned
shared libraries with calls to a new ComputeVersionedName method.
2011-12-06 14:19:44 -05:00
Brad King afb00fef19 Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib
Teach the Windows-GNU.cmake platform file to look for Visual Studio
tools matching the target ABI.  Add an extra step to the link command
for shared libraries and executables that export symbols and on which a
new GNUtoMS property is set (initialized by the CMAKE_GNUtoMS option).
Tell the GNU linker to output a module definition (.def) file listing
exported symbols in addition to the GNU-format import library (.dll.a).
Pass the .def file to the MS "lib" tool to construct a MS-format DLL
import library (.lib).

Teach the install(TARGETS) command to install the MS import library next
to the GNU one.  Teach the install(EXPORT) and export() command to set
the IMPORTED_IMPLIB property pointing at the import library to use the
import library matching the tools in the importing project.
2011-12-05 18:13:49 -05:00
Brad King 363d3962c4 Factor out target location undefined behavior helper macro
Move CM_LOCATION_UNDEFINED_BEHAVIOR into a dedicated header.  Add a
parameter to describe the action that leads to the undefined target
location.
2011-12-01 15:58:47 -05:00
Aaron Ten Clay a1f976ce0e VS: Add support for three new project properties (#12586)
VS_GLOBAL_PROJECT_TYPES: A string containing UUIDs to embed in the
Visual Studio project file under <ProjectTypes>.

VS_GLOBAL_KEYWORD: Allows specification of a keyword like "ManagedCProj"
instead of the default "Win32Proj", under <Keyword>

VS_DOTNET_REFERENCES: Semicolon-delimited list of .NET references to add
to the project, which creates a new <ItemGroup>.
2011-11-28 11:44:04 -05:00
David Cole 3452dadf89 Merge topic 'AddMocOptionsToAutomoc'
2c648ab add documentation for the AUTOMOC_MOC_OPTIONS property
52719a1 automoc: fix #12541, support moc options
2011-11-08 14:42:51 -05:00
Alex Neundorf 2c648ab7e2 add documentation for the AUTOMOC_MOC_OPTIONS property
Alex
2011-11-01 19:54:04 +01:00
Robert Dailey b0f0b3e440 VS: Add VS_SCC_AUXPATH target property (#12549)
Maps to SccAuxPath tag in VCPROJ files.
2011-11-01 11:29:08 -04:00
Alex Neundorf 52719a1d66 automoc: fix #12541, support moc options
This commit adds a new target property AUTOMOC_MOC_OPTIONS, which
can be set to add extra options for the moc invocations done via automoc.
This is equivalent to the OPTIONS parameter in the qt4_wrap_cpp() macro.

Alex
2011-11-01 14:33:11 +01:00
David Cole 039d1b1fd9 Merge topic 'cmake-link-interface-libraries'
d9cbba7 Initialize LINK_INTERFACE_LIBRARIES target property with a variable
2011-10-25 15:33:48 -04:00
Stephen Kelly d9cbba7c2c Initialize LINK_INTERFACE_LIBRARIES target property with a variable
Define variable CMAKE_LINK_INTERFACE_LIBRARIES to initialize the
value of this property when a target is created.  This allows authors
to write

  set(CMAKE_LINK_INTERFACE_LIBRARIES "")

to disable transitive linking to implementation dependencies of shared
libraries on platforms where it is possible.
2011-10-24 16:09:29 -04:00
Nicolas Despres 3db2973bd2 Refactor TargetTypeNames.
Make it a static method instead of an array. It is safer for the
type checking and if we add a new target type we will be warned to add
a case to the switch.
2011-10-02 18:30:42 +01:00
David Cole 98d5623a7b Merge topic 'effective-platform-name'
64c9b31 Xcode: Add test to demonstrate iOS project in Xcode
59a2265 Xcode: Use EFFECTIVE_PLATFORM_NAME reference in ComputeOutputDir
2011-09-13 14:33:21 -04:00
David Cole 59a2265576 Xcode: Use EFFECTIVE_PLATFORM_NAME reference in ComputeOutputDir
Caveats apply: only valid when not overriding default value for output
dir *and* there is a CMAKE_XCODE_EFFECTIVE_PLATFORMS value.

For now, CMAKE_XCODE_EFFECTIVE_PLATFORMS must be defined in each
project, or in the cache for a build.

Code relying on value of LOCATION and similar properties may not
work if it depends on file existence on disk since CMake will not
evaluate $(EFFECTIVE_PLATFORM_NAME). This feature is only enabled
for making it easier to build Xcode iOS projects where the developer
wants to be able to switch easily between simulator and device builds.
2011-09-12 15:21:00 -04:00
Brad King 5c0c635a09 Fortran: Add support for free- and fixed-form flags
Define a "Fortran_FORMAT" target and source file property.  Initialize
the target property from a "CMAKE_Fortran_FORMAT" variable.  Interpret
values "FIXED" and "FREE" to indicate the source file format.  Append
corresponding flags to the compiler command line.
2011-08-31 10:24:43 -04:00
Alex Neundorf 77a5c6e0d8 Add documentation for AUTOMOC, add initialization via CMAKE_AUTOMOC
Alex
2011-08-16 22:05:33 +02:00
David Cole df9577259c Add support for Visual Studio project-specific globals (#8707)
Thanks to Pau Garcia i Quiles for the inspiration for the patch.
I've tweaked it a bit compared to what's in the bug tracker: this
commit does not allow empty global variable names.

I also added usage of the new feature to an existing test. Although
it has no effect on the resulting Visual Studio projects, you can
verify that the VSResource test produces a non-empty globals section
in the generated .vcproj(x) files.
2011-07-29 10:04:36 -04:00
Brad King d6b2a1a9b3 Merge topic 'effective-platform-name'
74c73d5 Correct KWStyle line too long error
0c030ef Add use of EFFECTIVE_PLATFORM_NAME to generated Xcode projects.
2011-07-26 14:57:41 -04:00
David Cole 0c030ef72c Add use of EFFECTIVE_PLATFORM_NAME to generated Xcode projects.
Facilitates building iOS projects, enabling switching back and forth
between simulator and device builds at development time.
2011-07-18 16:37:06 -04:00
Alex Neundorf 9dbba1b464 Fix #12342: Add APPEND_STRING option to set_property()
set_property() has APPEND, which creates a list. E.g. when
appending to COMPILE_FLAGS a string is needed, not a list.
With the APPEND_STRING option the value is append as string,
not as list.

Alex
2011-07-15 20:57:33 +02:00
Modestas Vainius d66459be8b Documentation: Fix spelling / formatting errors (#12287)
The patch fixes the following problems spotted by lintian:

W: cmake-data: manpage-has-errors-from-man usr/share/man/man1/cmakemodules.1.gz 2641: warning [p 39, 1.5i]: can't break line
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakeprops.1.gz explict explicit
I: cmake: spelling-error-in-binary usr/bin/cmake explict explicit
I: cmake: spelling-error-in-binary usr/bin/cpack explict explicit
I: cmake: spelling-error-in-binary usr/bin/ctest explict explicit
W: cmake: manpage-has-errors-from-man usr/share/man/man1/cmake.1.gz 7300: warning [p 120, 3.3i]: can't break line
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz explict explicit
I: cmake-curses-gui: spelling-error-in-binary usr/bin/ccmake explict explicit
I: cmake-qt-gui: spelling-error-in-binary usr/bin/cmake-gui explict explicit
2011-06-19 18:08:05 -04:00
Brad King 3b6dbf7114 Merge topic 'module-link-interface-issue-11945'
c9d55ae Add parens in cmTarget::ComputeLinkInterface logic
c6a8e4c The link interface of MODULE libraries is empty (#11945)
2011-03-15 14:47:42 -04:00
Brad King c9d55ae5b9 Add parens in cmTarget::ComputeLinkInterface logic
Avoid GCC warning

  warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]

added by commit c6a8e4c7 (The link interface of MODULE libraries is
empty, 2011-03-09).
2011-03-14 15:34:26 -04:00
Brad King c6a8e4c71a The link interface of MODULE libraries is empty (#11945)
MODULE libraries cannot be linked into other libraries and executables
(just like executables without ENABLE_EXPORTS).  Set the MODULE target
link interface to be empty.  This allows such targets to be installed in
an EXPORT set without including all their private implementation
dependencies.
2011-03-09 09:52:46 -05:00
Brad King 5abfb57184 Add target property LINK_SEARCH_START_STATIC to aid static linking
Commit afd7d4ca (Add target property LINK_SEARCH_END_STATIC, 2008-01-31)
defined a property to ensure that static runtime libraries get selected.
Add a property to specify that all libraries whose type is unknown, such
as "-lm", should be assumed static.  Furthermore it assumes that an
option such as "-static" is also used so that no initial -Bstatic is
needed.
2011-03-03 17:12:32 -05:00
Brad King 64d997a78c Merge topic 'fix-11295-support-plugin-bundles-on-mac'
cabc407 CFBundle Test: Add PATHS for finding Rez (#11295)
5457b82 Add support for CFBundle targets on the Mac (#11295)
2011-02-22 14:30:58 -05:00
Brad King 668ce6b1e8 Combine duplicate COMPILE_DEFINITIONS disclaimer 2011-01-17 07:55:48 -05:00
Richard Bateman 5457b8254c Add support for CFBundle targets on the Mac (#11295)
This commit enables building, for example, plugin bundles
to be loaded by web browsers.
2011-01-11 12:54:44 -05:00
Brad King 57344977f5 Document reading LOCATION_<CONFIG> early as undefined (#11671)
Although the LOCATION property is for compatibility with CMake 2.4, the
LOCATION_<CONFIG> property is modern.  However, if a project reads it
and sets location-altering properties later the behavior is undefined.
See parent commit for details.
2011-01-10 12:07:32 -05:00
Brad King 7ffe6d77da Document reading LOCATION early as undefined (#11671)
Reading the LOCATION target property currently locks down the result and
ignores any later changes to properties that affect it.  This may or may
not be expected and may or may not be the behavior in earlier versions
of CMake.  The property is documented as provided only for compatibility
with CMake 2.4 and alternative interfaces are now available for all
originally envisioned use cases.  We want to discourage its use without
outright deprecating it.  Add documentation to explicitly state that
reading the property before other properties are set is undefined.
2011-01-10 10:46:15 -05:00
Brad King 31b0657e7d Merge topic 'custom-command-generator-expressions'
4499d50 Mark CustomCommand test perconfig.out as SYMBOLIC
f0cdb60 Introduce "generator expression" syntax to custom commands (#11209)
4749e4c Record set of targets used in cmGeneratorExpression
ef9e9de Optionally suppress errors in cmGeneratorExpression
45e1953 Factor per-config sample targets out of 'Testing' test
4091bca Factor generator expression docs out of add_test
bfb7288 Record backtrace in cmCustomCommand
2010-12-21 14:03:24 -05:00
Brad King f0cdb6001b Introduce "generator expression" syntax to custom commands (#11209)
Evaluate in the COMMAND arguments of custom commands the generator
expression syntax introduced in commit d2e1f2b4 (Introduce "generator
expressions" to add_test, 2009-08-11).  These expressions have a syntax
like $<TARGET_FILE:mytarget> and are evaluated during build system
generation.  This syntax allows per-configuration target output files to
be referenced in custom command lines.
2010-12-15 14:53:48 -05:00
Brad King f1adcefdf4 Merge topic 'cross-compile-apple-host'
3b7f901 Fix soname in cross-compiled targets with Mac host (#11547)
2010-12-14 14:38:18 -05:00
Brad King b0dffc7e9c Merge topic 'parallel-make-install-of-CMake'
608d6bb Fix parallel "make install" of CMake itself
2010-12-14 14:38:09 -05:00
Brad King 3b7f901494 Fix soname in cross-compiled targets with Mac host (#11547)
The soname generation code was compile-time selected instead of runtime
selected.  The result is that a Mac-compiled cmake used to cross-compile
Mac -> Unix generates an soname of the form libfoo.x.y.so instead of
libfoo.so.x.y as expected.  Instead do a runtime check based on the
target platform.

Inspired-By: George Staikos <staikos@kde.org>
2010-12-09 11:18:25 -05:00
Brad King 608d6bba89 Fix parallel "make install" of CMake itself
Avoid tracing dependencies of GLOBAL_TARGET targets.  The build system
generators are not designed to handle any dependencies that may be
discovered.  Global targets are only generated by CMake and never have
commands that reference targets built in the project anyway.

The exception is when building CMake itself there is a special case to
use the just-built "cmake" binary in the "install" target so that CMake
can replace itself on Windows.  Even in this special case we do not want
to let the "install" target depend on the "cmake" target.  Doing so
breaks cases like "make -j4 install".
2010-12-09 10:12:12 -05:00
Brad King a765c491ad Honor custom command dependencies on imported targets (#10395)
Imported targets do not themselves build, but we can follow dependencies
through them to find real targets.  This allows imported targets to
depend on custom targets that provide the underlying files at build
time.
2010-12-08 12:22:13 -05:00
Brad King 95f149e61f Define LINK_DEPENDS target property (#11406)
Custom Makefile link rules may need to depend on linker scripts.  Define
this property to allow user-specified link-time dependencies.
2010-11-05 09:05:08 -04:00
Brad King abb6e755eb Document ENABLE_EXPORTS behavior on Mac (#11295)
Mention that it is implemented with -bundle-loader on platforms that
need link-time symbol resolution but that do not use DLL import libs.
2010-10-11 08:35:19 -04:00
Brad King 724804600b Merge topic 'document-IMPORTED_NO_SONAME'
8f96818 Document IMPORTED_NO_SONAME target property
2010-09-21 10:37:59 -04:00
Brad King 8f96818a5c Document IMPORTED_NO_SONAME target property
Commit fd37a6ec (Better linker search path computation, 2008-02-21)
added this property but did not document it.  Add the documentation.
2010-09-17 13:28:29 -04:00
Brad King 6580f5de99 Merge topic 'improve-missing-source-file-error'
a6b5ead Report missing source files with context of target
2010-09-14 13:31:10 -04:00
Brad King a6b5ead62f Report missing source files with context of target
Previously we reported only the CMakeLists.txt file in the directory
that adds the target.
2010-09-13 16:17:20 -04:00
Brad King b06fb16684 No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)
Factor out reading of CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE
into cmMakefile::GetConfigurations.  Read the former only in
multi-config generators.
2010-09-08 14:54:49 -04:00
David Cole e6ac0aacf6 Add FOLDER target property, for IDEs (#3796)
This work was started from a patch by Thomas Schiffer.
Thanks, Thomas!

See the newly added documentation of the FOLDER target
property for details.

Also added global properties, USE_FOLDERS and
PREDEFINED_TARGETS_FOLDER. See new docs here, too.

By default, the FOLDER target property is used to organize
targets into folders in IDEs that have support for such
organization.

This commit adds "solution folder" support to the Visual
Studio generators. Currently works with versions 7 through
10.

Also, use the new FOLDER property in the ExternalProject
test and in the CMake project itself.
2010-09-03 13:53:22 -04:00