Test the first argument directly for matching 'EXACT'. The error
check in its previous position was incorrect and would only trigger
with a version of '0' or similar.
During cross-compiling the toolchain file may use CMakeForceCompiler to
force a compiler setting. When using the Xcode generator try to convert
it to a full path by searching the PATH as is done for the Makefile
generators.
Add the 'SDL' path suffix to the FindSDL_*.cmake modules. Add a comment
explaining the purpose of suffixes as in commit v3.0.0-rc1~540^2
(FindSDL: Add path suffixes for <prefix>/include/..., 2013-10-08).
Inspired-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Commit v3.0.0-rc1~71^2~9 (Qt4: Use IMPORTED executable names with
custom commands., 2014-01-24) erroneusly changed this command to
use the wrong target.
b633b263 CPackWiX: Fix test to build with expected config
191f25e2 stringapi: Prevent a NULL dereference in WiX
219d6ad6 speedup: Avoid excess iterator dereferences
caaad357 speedup: Cache strings for comparisons
7abf4e31 stringapi: Use strings for dependency information
94fc63e2 stringapi: Use strings for cache iterator values
85fc9f26 stringapi: Command names
6557382d stringapi: Use strings for program paths
1a1b737c stringapi: Use strings for generator names
24b5e93d stringapi: Use strings for directories
11ed3e2c stringapi: Add string overload for the Def struct
b3bf31a5 stringapi: Miscellaneous char* parameters
5af95c39 typo: Match argument name with the header
2b17626e stringapi: Pass strings as install directories in CPack
3def29da stringapi: Use strings for feature arguments
acb116e3 stringapi: Return a string reference for the configuration
...
489b1c23 Windows: Use response files to specify link libraries for GNU tools
745caae6 Makefile: Rename linker response file boolean to be more specific
5e8e4d0f cmLocalGenerator: Add response file option to OutputLinkLibraries
b9aa5041 cmLocalGenerator: Simplify GetIncludeFlags output formatting
971653b7 cmLocalGenerator: Add format option to ConvertToLinkReference
0c0ef9e7 cmLocalGenerator: Add format option to ConvertToIncludeReference
02bebd60 cmLocalGenerator: Add format option to ConvertToOutputForExisting
c8751709 Makefile: Factor out some duplicate link libraries generation
If a package is requested with an EXACT version, that doesn't imply
that dependencies must be found EXACTly too.
Extend the macro to allow specifying that a dependency must be found
by EXACT version instead.
Work around the command-line-length limit by using an @linklibs.rsp
response file to pass the flags for link libraries. This allows
very long lists of libraries to be used in addition to the existing
support for passing object files via response file.
Suggested-by: Peter Keuschnigg <peter.keuschnigg@pmu.ac.at>
The parent commit taught FindPythonLibs to try to find PythonInterp
unconditionally. Some projects may want the libraries of a specific
version even when the corresponding interpreter is not available. Drop
the internal use of FindPythonInterp and just use the versions from it
if it happens to have been found by the project first. That will allow
projects to get a consistent version when they want both but not
otherwise force them to find the interpreter.
In InstallRequiredSystemLibraries the version number for RTDLL can be
calculated from the compiler version. This will support current and
future OW versions without updating the module again.
For example it is now possible to do:
feature_summary(WHAT ENABLED_FEATURES
DISABLED_FEATURES)
That produces an output like:
--
-- The following features have been enabled:
* Feature1
* Feature2
-- The following features have been disabled:
* Feature2
Skipping the lists that are empty.
Without this patch this would require to do:
message(STATUS "")
feature_summary(WHAT ENABLED_FEATURES
DESCRIPTION "The following features have been enabled:")
feature_summary(WHAT DISABLED_FEATURES
DESCRIPTION "The following features have been disabled:")
And empty lists would not be skipped.
The behaviour when WHAT has a single argument (ALL or any option) is
unchanged.
When possible, get consistent version of the Python interpreter, headers path,
and library.
Now find_package(PythonLibs) internally calls find_package(PythonInterp
QUIET) and uses the resulting PYTHON_VERSION_MAJOR and
PYTHON_VERSION_MINOR to prefer these versions when looking for the
header path and library. The Python_ADDITIONAL_VERSIONS variable has
priority over the interpreter version.
Co-Author: Adam Wolf
Co-Author: Gert Wollny <gw.fossdev@gmail.com>
Create each DLL import library by passing "option implib=..." to the
linker for its SHARED library. This works even when there are no
symbols to be exported. Leave the option out for MODULE libraries
because we do not need an import library for them. For executables,
retain the separate invocation of wlib because we want an import
library only when the ENABLE_EXPORTS property is set, and in that
case the project should provide symbols.
Suggested-by: J Decker <d3ck0r@gmail.com>
Now it only links with the Qt libraries specified by the user,
instead of automatically including all dependencies.
Fixes#14750 and thanks to Orion Poplawski.
Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files
2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY
properties. Those properties now exclusively handle linker PDB files.
Since STATIC libraries do not link their compiler PDB file becomes more
important. Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and
"COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB
file location and pass the value to the MSVC /Fd option.
If there is no ARGV1, that is fine; version will be made empty, and no
version will be passed to find_package().
This is relevant when find_dependency is invoked multiple times,
sometimes with a version specified and sometimes without.
find_dependency(dep1 3.4)
find_dependency(dep2) # version still set to 3.4.
Teach ExternalProject_Add a new BUILD_ALWAYS option to skip using
the build step stamp file and execute the step on every build.
Extend the BuildDepends test with a case to cover this option.
When building boost with an alternate namespace the libraries generated
will have a different naming convention. This is often done to ensure
no symbol conflicts with external libraries built against a different
version of boost. If the namespace used is "myprivateboost::" instead
of "boost::" then the libraries built will be named myprivateboost_foo
instead of boost_foo. Add an option to specify a custom namespace used
to alter the library names that get searched for.
Create platform information modules Platform/Darwin-Intel-(C|CXX).cmake
and helper module Platform/Darwin-Intel.cmake. Teach existing module
Platform/Darwin-Intel-Fortran.cmake to use the helper too. Move
information from Platform/Darwin-icc.cmake into these files and drop
information already in Platform/Darwin.cmake to avoid duplication.
Some distributions place boost_mpi next to the MPI libraries against
which it was built instead of next to the other Boost libraries. If
find_package(MPI) has already been run prior to find_package(Boost) then
MPI_CXX_LIBRARIES or MPI_C_LIBRARIES may be set to the location of the
MPI libraries. Teach FindBoost.cmake to look there for boost_mpi and
boost_mpi_python after looking next to the other Boost libraries but
not consider the location to be Boost_LIBRARY_DIR.
In CMakeGraphVizOptions.cmake, allow the options GRAPHVIZ_GENERATE_PER_TARGET
and GRAPHVIZ_GENERATE_DEPENDERS to enable the generation of per target graphs
and subgraphs respectively. Both options are TRUE per default to maintain
current behavior.
In commit v2.8.5~176^2~2 (FindOpenSSL: We should only use hints to find
OpenSSL, 2011-03-28) values for HINTS and PATHS of find_* calls were
computed everywhere but only used on Windows. Use them everywhere.
Set a global property in the find_package implementation. Track and
reset that property in the find_dependency macro. Read the property
in FeatureSummary when determining whether to print output.
This means that packages which are found only as dependencies are not
listed by FeatureSummary, but if a project uses find_package elsewhere
directly, then it will be listed by FeatureSummary.
Suggested-by: Alex Merry
http://thread.gmane.org/gmane.comp.kde.devel.frameworks/10640
4271a4ed Help: Add information about INTERFACE_AUTOUIC_OPTIONS.
7935f4de Help: Note that AUTOMOC consumes the defines and includes from targets.
2739a6f9 Help: Move Qt tool invocation information to a generic cmake-qt manual.
dd72b19f Find{Java,JNI}: Use /usr/libexec/java_home on OS X
70560ee1 FindJNI: Overhaul finding JDK libraries and headers on OS X
fcd66a7f Find{Java,JNI}: Consider JAVA_HOME before ENV{JAVA_HOME}
4b3614b2 Find{Java,JNI}: Use ENV{JAVA_HOME} first when set
41d2f2c4 write_basic_package_version_file: use PROJECT_VERSION
7e142c5a project: Manage VERSION variables
16d040c9 project: Add optional LANGUAGES keyword
00007dcc Help: Format project command and variable documentation
Add an introduction about the use of different package types, and the
ability to use Qt 4 and 5 versions together in a single buildsystem.
Add a section about automatic linking of the qtmain.lib library and
how to disable it.
If no JAVA_HOME or ENV{JAVA_HOME} is set then try running this
tool to get the system default Java home.
Suggested-by: Larry Shaffer <larrys@dakotacarto.com>
Drop the hard-coded framework paths and "-framework JavaJM" on APPLE.
Save and restore the value of CMAKE_FIND_FRAMEWORK. Use its value to
choose and order between a normal search for jvm&jawt and a framework
search for JavaVM. When JAVA_HOME is set explicitly by the user then
force a normal search by setting CMAKE_FIND_FRAMEWORK to NEVER. Once
the library is found, set CMAKE_FIND_FRAMEWORK to help find_path locate
the matching headers (framework v. normal).
Add a helper module CMakeFindJavaCommon shared between FindJava
and FindJNI to select a JAVA_HOME value. Prefer a CMake variable
or cache entry first, then an environment variable.
Commit 321e348e (QtAutogen: Use Qt 4 IMPORTED targets to find
executable locations., 2014-01-24) attempted to fix this problem,
but only solved it for a particular ordering of find_package for
Qt 4 and Qt 5.
Add a test to ensure that it works with both orderings.
f7ae1d8a QtAutogen: Short-circut some logic when moc is not available.
4b989d5f QtAutogen: Separate source file processing from AUTOMOC.
c48d877d QtAutogen: Make some methods appropriately file-static.
394e86df QtAutogen: Fix autouic target options in the presence of a config.
964d7f2a QtAutogen: Remove unused variables.
0d934efd QtAutogen: Remove read of SKIP_AUTOUIC target property.
321e348e QtAutogen: Use Qt 4 IMPORTED targets to find executable locations.
e96683b0 Qt4: Use IMPORTED executable names with custom commands.
e6182f5d Qt4: Create IMPORTED executable targets for all Qt executables.
Finding Qt 5 can overwrite the QT_MOC_EXECUTABLE variable with the
moc from Qt 5. Use the IMPORTED target with the explicit version in
the name to avoid that.
a432b93b file DOWNLOAD: Display the curl result status when a hash mismatch occurs.
1cb9ef81 file DOWNLOAD: Test non-zero return status.
f73f0fb3 file DOWNLOAD: Add test for bad hash.
b5e2265f ExternalProject: Reattempt download when verification fails.
Introduce policy CMP0047 to control resetting the id for
compatibility.
De-duplicate content in the QNX platform file by including the GNU
one. QNX is a form of GNU platform.
Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables. They
are populated again later by the Compiler/GNU.cmake file anyway.
Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC
compiler id is in use, and the language is CXX. Use the QNX
recommended flag for QCC instead of the gcc compatible -x flag.
Populate new module files to handle system includes and depfiles
when using the QCC compiler.
Remove code which unsets the system include and depfiles related
variables. When a GNU driver is used instead of the QCC one, the
appropriate flags will be used. These variables were previously
cleared for lowest-common-denominator compatibility with both
drivers.
In commit 2412d9bc (Use 'uname -m' for processor on Cygwin, 2010-09-21)
it was pointed out that POSIX requires 'uname -m' but not 'uname -p':
http://www.opengroup.org/onlinepubs/9699919799/utilities/uname.html
On OS X x86_64, 'uname -p' returns i386 while 'uname -m' returns x86_64.
Since the latter is the POSIX-compliant option trust its value.
However, on OS X ppc, 'uname -m' returns 'Power Macintosh' so add a
special-case to convert that to 'powerpc'.
When downloading an URL with ExternalProject, reattempt the download three
times if the file hash verification fails.
The re-attempt is limited to non-local URL's. The same download CMake script
is re-used after removing any file that resulted from the previous download
attempt. Up to three re-attempts are performed.
When not installing in /usr (i.e. /usr/local) on Debian/Ubuntu, the
multiarch path is not in ldconfig path, and therefore libraries cannot
be found, unless the user manually modifies the files in
/etc/ld.so.conf.d, in order to include /usr/local/lib/<arch>.
This patch fixes this issue by using "lib/<arch>" only if the user is
installing the software in /usr, and uses "lib" in all the other cases.
Remove independent doc listing for Qt4ConfigurationSettings, Qt4Macros
and UseQt4. These are implementation details.
Recommend the use of IMPORTED targets.
Remove references to the UseQt4 file, which is obsolete in light of
the IMPORTED targets.
Add documentation for automatic tool invocation and options.
Remove reference to variables which should not be needed in modern
implementations.
Commit 5bb53f6b (cmTarget: Deprecate COMPILE_DEFINITIONS_ properties
with a policy., 2013-12-30) deprecated the config-specific
COMPILE_DEFINITIONS_* properties in favour of using generator
expressions.
Set the directory property in UseQt4.cmake to match the
INTERFACE_COMPILE_DEFINITIONS on the Qt4::QtCore and Qt5::Core
IMPORTED targets. Setting QT_NO_DEBUG is sufficient because qglobal.h
sets the corresponding QT_DEBUG definition if required.
73e9340 get_target_property: Error on non-existent target.
ab9f58f FindQt4: Ensure target exists before calling get_target_property.
37ebeb9 FindQt4: Fix use of get_target_property to use actual target name.
6aabb6a Genex: Use case-sensitive comparison for COMPILER_ID.
5bb53f6 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
There are many style errors in these files. This patch fixes only
the syntactical errors.
The script which ported these to rst tripped on some incorrectly
formatted blocks in the original input documentation. Use a new
script to find problematic code (and then fix them manually):
#!/usr/bin/env python
import os
rootDir = '.'
def checkFile(fname):
f = open(fname)
lines = f.readlines()
started = False
counter = 0
for l in lines:
if "#" in l:
started = True
elif started:
return
lin = l.find("(")
if lin != -1 and l.find(")", lin) == -1 and \
not "(To distribute this file outside of CMake, substitute the full" in l:
for lp in lines[counter+1:]:
if lp == "# ::\n":
print "\n\n######### " + fname + "\n\n"
print ''.join(lines[max(counter-2, 0):counter+6])
break
elif lp == "#\n" :
continue
break
counter += 1
for dirName, subdirList, fileList in os.walk(rootDir):
for fname in fileList:
checkFile(os.path.join(dirName, fname))
There is not really any need to. Downstreams can either rely on it
being provided by CMake, or copy and distribute it.
Change the documented include for the find_dependency macro.