| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
It will be extended to process .ui and .qrc files too.
|
|\
| |
| |
| |
| |
| | |
027a020 Merge branch 'test-property-genex' into generate-modern-style
33055c4 Generate modern-style cmake code.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The commits 9db31162 (Remove CMake-language block-end command
arguments, 2012-08-13) and 77543bde (Convert CMake-language
commands to lower case, 2012-08-13) changed most cmake code
to use lowercase commands and no parameters in termination
commands. However, those changes excluded cmake code generated
in c++ by cmake.
Make a similar style change to code generated by cmake.
|
|/ |
|
|
|
|
| |
Refactor to create AddCompileDefinitions.
|
|
|
|
|
|
|
|
|
|
| |
This has been requested, along with a patch, by Shaun Williams
in http://public.kitware.com/Bug/view.php?id=13788 .
It adds a global property AUTOMOC_TARGETS_FOLDER, which can
be used to group the automoc targets together in a folder e.g.
in Visual Studio.
Alex
|
|\
| |
| |
| |
| |
| | |
ea4d784 QtAutomoc: Use config-dependent compile definitions and includes.
67f6ceb QtAutomoc: Fix handling of list separator for compile definitions.
|
| |
| |
| |
| |
| |
| |
| | |
Instead of always using the includes and defines which are not
config-specific, ensure that the config specific ones can be used.
Task-number: #13589
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Qt 5.1, Qt5::Core has a INTERFACE_QT_MAJOR_VERSION property
of '5', and since CMake 2.8.11, Qt4::QtCore has an
INTERFACE_QT_MAJOR_VERSION of '4'. This was introduced in
commit 4aa10cd6 (FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for
Qt4::QtCore, 2013-03-16), to produce an error if Qt 4 and Qt 5
are erroneously used by the same target. This can also be used
however to determine the Qt major version, and therefore the
particular moc executable to use during automoc steps. This means
that targets in a single buildsystem can use a selection of Qt 4
and Qt 5, and still take advantage of the CMAKE_AUTOMOC feature
without conflicting.
|
|
|
|
|
| |
The variable is provided in the Qt5 config files only for compatibility
with this automoc feature, so use the more-future-proof method instead.
|
|\
| |
| |
| |
| | |
33ed186 automoc: Read target defines unconditionally
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 429e3699 (Process COMPILE_DEFINITIONS as generator expressions
in QtAutomoc., 2013-01-25) introduced a check for the existence of the
COMPILE_DEFINITIONS property on the target before processing it.
At the time, compile definitions from linked targets were added to the
COMPILE_DEFINITIONS property by target_link_libraries. The way such
transitive compile definitions worked was changed in subsequent
commit a1c4905f (Use the link information as a source of compile
definitions and includes., 2013-02-12), so that the COMPILE_DEFINITIONS
property may be empty, despite the fact that there are definitions
which should be used.
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
In VS IDE generators add a pre-build event to perform automoc instead of
using a separate custom target. This reduces the number of targets in the
.sln that need to be loaded by the IDE.
This also works around a VS 11 bug as discussed in issue 13900.
Suggested-by: Hauke Heibel <hauke.heibel@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The API for retrieving per-config COMPILE_DEFINITIONS has long
existed because of the COMPILE_DEFINITIONS_<CONFIG> style
properties. Ensure that the provided configuration being generated
is also used to evaluate the generator expressions
in cmTarget::GetCompileDefinitions.
Both the generic COMPILE_DEFINITIONS and the config-specific
variant need to be evaluated with the requested configuration. This
has the side-effect that the COMPILE_DEFINITIONS does not need to
be additionally evaluated with no configuration, so the callers can
be cleaned up a bit too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 79568f95 (automoc: Add source file to target early to set the
linker language, 2013-02-20) changed automoc initialization to a two
step process. In the first step, the generated source file was added
to the target, which allows the link language to be determined.
However, this bypassed the check for the availability of Qt itself.
At build-time the automoc file could not be generated because the moc
tool was not available to create it.
The solution is to only add the automoc file to the target if Qt is
found.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, GetIncludeDirectories was called before calling
target->AddSourceFile(mocCppSource). Since commit a1c4905f (Use the
link information as a source of compile definitions and
includes., 2013-02-12), the include directories are determined by
the link information.
Valid link information requires that the linker language can be
determined, which depends on the source files languages and the
dependent targets languages. In the case of the no_link_languages
target in the unit test, there are no dependencies and the additional
source file no_link_languages_automoc.cpp is added to the target
at generate-time. That file can be used to determine the linker
language, but it must be added to the target before calling
GetIncludeDirectories.
|
|
|
|
|
|
|
| |
Instead of having an own set of C header extensions, use
cmMakefile::GetHeaderExtensions() (#13904)
Alex
|
|
|
|
| |
Alex
|
|
|
|
| |
Fixes #13493.
|
|
|
|
|
|
|
|
|
| |
This should finally fix #13667 and #13762.
Instead of adding special handling to guess whether implicit include dirs
may have been removed, simply make it possible to query the include dirs
without removing the implicit ones.
Alex
|
|\
| |
| |
| |
| | |
d253657 Automoc: fix regression #13667, broken build in phonon
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On some systems, ${QT_INCLUDE_DIR} is reported by gcc as a builtin
include search dir. Some projects use this information to extend
CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES.
In cmake 2.8.10 now the targets are queried for the include directories
they use. When they return the result, the include dirs contained in
CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES have been removed.
In cmake 2.8.9 and below the INCLUDE_DIRECTORIES directory property
was queried, where this had not been stripped.
So, in those projects which modify the implicit include dirs variable,
on systems where ${QT_INCLUDE_DIR} is reported by gcc, this directory,
e.g. /usr/lib/include/qt/, was not given anymore to moc. This made moc
not find required headers, so the build broke.
Simply giving the full CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES to moc
is no solution either, since moc can't handle some of the headers it
finds then (https://bugreports.qt-project.org/browse/QTBUG-28045).
So now cmake checks CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES, and if this
contains ${QT_INCLUDE_DIR}, and the target reports that it uses
${QT_QTCORE_INCLUDE_DIR} but not ${QT_INCLUDE_DIR}, ${QT_INCLUDE_DIR}
is added to the include dirs given to moc.
Alex
|
|/
|
|
|
|
|
|
|
|
| |
This patch sets the FOLDER target property for the automoc target
to the same value as of the actual target. This organizes the targets
in IDEs with folders better.
Inspired-by: Mike Gelfand
Alex
|
|
|
|
|
|
|
|
|
| |
Now automoc always uses GetRealPath() so symbolic links are always
resolved and it doesn't end up with twice the same file, once with the real
path and once with the symlinked path in some setups where the source dir
can be accessed directly and via a symlink
Alex
|
|
|
|
|
| |
Also, no need to get the include directories from the target
beforehand. The local generator does that for us anyway.
|
|
|
|
| |
Alex
|
|
|
|
|
|
|
| |
The docs say that this is for cmake 2.4 backwards compatibility only,
so we probably don't need to support it.
Alex
|
|
|
|
| |
Alex
|
|
|
|
|
|
|
|
| |
Until now it was only rerun if the compile definitions changed, but
of course it also has to rerun if the include dirs or moc options
change. Strange that I didn't notice this before...
Alex
|
|
|
|
|
|
|
| |
automoc now fails immediately if moc fails, instead of continuing
and letting the build fail later on.
Alex
|
|
|
|
|
|
|
|
|
| |
Older C++ compilers do not provide a standard std::stringstream.
Use our compatibility interfaces instead.
Also avoid std::stringstream(openmode) signature. Our approximate
stringstream implementation provided when the standard one is not
available does not support the openmode argument.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The variables stored in the AutomocInfo.cmake file were not properly
escaped, so when reading them back they could turn into lists, if they
contained double quotes initially.
This patch fixes this by using cmLocalGenerator::EscapeForCMake() to
escape the variables properly.
Alex
|
|
|
|
| |
Alex
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| | |
Conflicts:
Source/cmTarget.cxx
|
| |
| |
| |
| | |
There is no separate SrcTools module anymore.
|
| |\ |
|
| | |\
| | | |
| | | |
| | | |
| | | | |
83d02ee make automoc work when using ccmake via PATH (#12551)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In ccmake, cmake::GetCMakeCommand() returns "/cmake" when ccmake
was started from the PATH, i.e. by simply running "ccmake"
Alex
|
| | |\ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
2c648ab add documentation for the AUTOMOC_MOC_OPTIONS property
52719a1 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
|
| | |\ \ \
| | | |/ /
| | | | |
| | | | |
| | | | |
| | | | | |
1ecc55a Automoc: fix the fix, need to use std::string, not just char* pointer
8c8305f don't crash in automoc with empty COMPILE_DEFINITIONS property
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We need to take a copy of the property values, since the returned
char* pointer is reused by the following GetProperty() calls
Alex
|
| | | |/
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reported by Laszlo Papp:
http://www.cmake.org/pipermail/cmake/2011-October/047089.html
Alex
|
| | | | |
|
| | | | |
|