Commit Graph

109 Commits

Author SHA1 Message Date
Stephen Kelly 84218e1870 Add automatic uic invocation for Qt.
The source files are already processed by cmQtAutomoc to look for
moc includes, so extend that to also look for ui_ includes and
find corresponding .ui files to process.

This replaces the need to invoke qt4_wrap_ui().

As the ui files are not likely to be part of the SOURCES of the
target, store the options associated with them separately in the
cmMakefile for querying during the autogen run.
2013-10-24 12:30:38 +02:00
Stephen Kelly ff6c401309 cmTarget: Add interface for compatible numeric properties
When using the boost MPL library, one can set a define to increase
the limit of how many variadic elements should be supported. The
default for BOOST_MPL_LIMIT_VECTOR_SIZE is 20:

 http://www.boost.org/doc/libs/1_36_0/libs/mpl/doc/refmanual/limit-vector-size.html

If the foo library requires that to be set to 30, and the independent
bar library requires it to be set to 40, consumers of both need to set
it to 40.

 add_library(foo INTERFACE)
 set_property(TARGET foo PROPERTY INTERFACE_boost_mpl_vector_size 30)
 set_property(TARGET foo PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size)
 target_compile_definitions(foo INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>)

 add_library(bar INTERFACE)
 set_property(TARGET bar PROPERTY INTERFACE_boost_mpl_vector_size 40)
 # Technically the next two lines are redundant, but as foo and bar are
 # independent, they both set these interfaces.
 set_property(TARGET bar PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size)
 target_compile_definitions(bar INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>)

 add_executable(user)
 target_link_libraries(user foo bar)

Because the TARGET_PROPERTY reads the boost_mpl_vector_size property
from the HEAD of the dependency graph (the user target), and because
that property appears in the COMPATIBLE_INTERFACE_NUMBER_MAX of
the dependencies of the user target, the maximum value for it is
chosen for the compile definition, ie, 40.

There are also use-cases for choosing the minimum value of a number.
In Qt, deprecated API can be disabled by version. Setting the
definition QT_DISABLE_DEPRECATED_BEFORE=0 disables no deprecated
API. Setting it to 0x501000 disables API which was deprecated before
Qt 5.1 etc.

If two dependencies require the use of API which was deprecated in
different Qt versions, then COMPATIBLE_INTERFACE_NUMBER_MIN can be
used to ensure that both can compile.
2013-10-24 08:42:05 +02:00
Stephen Kelly b0686fdeda Docs: Fix typo.
dependee -> depender.
2013-10-23 13:33:26 +02:00
Brad King b9fe4b6318 VS: Document VS_GLOBAL_KEYWORD and VS_KEYWORD relationship (#14493)
These two target properties serve the same purpose for different versions
of Visual Studio.  Document the versions covered by each property.

Reported-by: mar.na@t-online.de
2013-10-21 10:07:46 -04:00
Brad King e7ca48f226 Help: Factor out cmake-generator-expressions manual page
Generator expressions are supported in many places and are a distinct
concept worthy of their own manual page.  The old builtin documentation
was previously represented by preprocessor macros to generate it into
each place that supports them.  Factor out the duplicate content into a
dedicated cmake-generator-expressions manual page and reference it from
each original location.
2013-10-16 09:22:38 -04:00
Brad King 97e8650d7b Help: Factor out COMPILE_DEFINITIONS disclaimer duplication
The COMPILE_DEFINITIONS escaping disclaimer was represented in builtin
documentation using a preprocessor macro.  Factor the duplicate content
out into a separate .txt file and include it in each document with the
reStructuredText include directive.
2013-10-16 09:22:38 -04:00
Brad King 30b21860ad Help: Factor out *_OUTPUT_(NAME|DIRECTORY).rst duplication
Portions of these documents contain duplicate content generated from
preprocessor macros in the original builtin documentation source.
Factor the common parts out into .txt files using reStructuredText
include directives and substitutions to avoid duplication.
2013-10-16 09:22:38 -04:00
Brad King 441f2808ec Help: Fix reStructuredText syntax in auto-generated documents 2013-10-15 14:12:49 -04:00
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00