Commit Graph

3355 Commits

Author SHA1 Message Date
Rolf Eike Beer 813eca6416 CheckSymbolExists: force the compiler to keep the referenced symbol
Otherwise the compiler may optimize out the reference to the symbol as the
previous version was not really using this. This leads to symbols that are
only in a header but not in the given libraries to be reported as present.

This came up on the first try to fix bug 11333 as "gcc -O3" would optimize
out the reference to pthread_create() so the correct library the symbol is in
was not detected.

The new test code was suggested by Brad King.
2012-01-16 20:27:40 +01:00
David Cole 4828b7ba30 Merge topic 'FindRubyFixes'
a9bca05 FindRuby.cmake: add more debug output
3db2c8b FindRuby: add more possible library names (for ubuntu, #12172)
93c55ec FindRuby: fix usage of RUBY_VERSION_MAJOR (#12172)
2012-01-09 14:10:15 -05:00
David Cole 354b3d40d0 Merge topic 'Windows-Intel-Fortran-flags-issue-12642'
35a5838 Intel: Fix Windows per-config Fortran flags (#12642)
2012-01-09 14:09:35 -05:00
David Cole 3323c73381 Merge topic 'GenerateExportHeader-IS_ABSOLUTE-issue-12645'
9f92cdf GenerateExportHeader: Fix wrong use of IS_ABSOLUTE (#12645)
2012-01-09 14:09:27 -05:00
David Cole 13cf995549 Merge topic 'doxygen-version-12648'
85d4d5e FindDoxygen: add DOXYGEN_VERSION variable
2012-01-09 14:09:19 -05:00
David Cole 4fa5a7c845 Merge topic 'CheckCCompilerFlag-issue-12633'
646cf91 CheckCCompilerFlag: Generalize "but not for C" case (#12633)
2012-01-09 14:08:56 -05:00
David Cole 9b2299b8c2 Merge topic 'FindwxWidgets-webview-issue-12636'
d071148 FindwxWidgets: Add webview library (#12636)
2012-01-09 14:08:52 -05:00
David Cole ef58573bb3 Merge topic 'topics/FindCUDA/Find-new-libraries-upto-4.1'
154f537 Added support for curand, cusparse, npp, nvcuenc and nvcuvid libraries.
2012-01-09 14:08:46 -05:00
David Cole d4fe0d0304 Merge topic 'GNUInstallDirs-DebianMultiarch'
43f83d2 GNUInstallDirs: add support for Debian multiarch
2012-01-09 14:08:39 -05:00
Alex Neundorf a9bca052f8 FindRuby.cmake: add more debug output
Alex
2012-01-05 21:58:49 +01:00
Alex Neundorf 3db2c8b9ea FindRuby: add more possible library names (for ubuntu, #12172)
Alex
2012-01-05 21:57:11 +01:00
Alex Neundorf 93c55ec142 FindRuby: fix usage of RUBY_VERSION_MAJOR (#12172)
Alex
2012-01-05 21:53:02 +01:00
Brad King 35a5838779 Intel: Fix Windows per-config Fortran flags (#12642)
Fix typo introduced in commit 66a08c10 (more uniform approach to enable
language, 2004-08-26).  The optimization option should be /O2 for
Release configurations and /O1 for MinSizeRel.

Suggested-by: He Yuqi <yuqi.he@gmail.com>
2012-01-02 13:56:33 -05:00
Michael Wild 9f92cdf24d GenerateExportHeader: Fix wrong use of IS_ABSOLUTE (#12645)
Test content of _GEH_EXPORT_FILE_NAME, not variable name.

Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
2012-01-02 13:27:07 -05:00
Yury G. Kudryashov 85d4d5e6ce FindDoxygen: add DOXYGEN_VERSION variable
Make it possible to write
find_package(DOXYGEN X.Y.Z)
2012-01-02 18:47:19 +01:00
Brad King 646cf91932 CheckCCompilerFlag: Generalize "but not for C" case (#12633)
The "warning: " part is not necessary.  The case can happen on any GNU
compiler, not just an Apple version.
2011-12-22 09:40:32 -05:00
Jason Erb d0711486f9 FindwxWidgets: Add webview library (#12636)
Update for wxWidgets 2.9.3 to include webview component.
2011-12-22 09:29:59 -05:00
James Bigler 154f53738f Added support for curand, cusparse, npp, nvcuenc and nvcuvid libraries.
This addresses Bug 11882 which provided a sample implementation for adding
support for cusparse.  I went ahead and added all the libraries I thought
appropriate.
2011-12-20 14:20:04 -07:00
David Cole 7f8cf4236d Merge topic 'fix-12273-quote-arg-in-findboost'
cdf5224 FindBoost: Quote possibly empty string argument (#12273)
2011-12-20 14:22:05 -05:00
David Cole 7868061a6b Merge topic 'qt4-deploy-module'
3aa5432 Improve component support and output indentation.
2011-12-20 14:21:35 -05:00
David Cole 16dacf3a6a Merge topic 'AutomocFineTuning'
e474dcb automoc: improved warning message in relaxed mode
96fc5d5 automoc: default to strict mode, use CMAKE_AUTOMOC_RELAXED_MODE
2011-12-20 14:20:32 -05:00
David Cole cdf522436f FindBoost: Quote possibly empty string argument (#12273)
Author: Claudio Bley
2011-12-19 10:55:41 -05:00
Mike McQuaid 3aa5432315 Improve component support and output indentation. 2011-12-16 14:31:36 -07:00
David Cole f7be6d616f Merge topic 'GNU-to-MS'
c213eb9 Windows-GNU: Remove extra quotes in GNUtoMS rule variable
2011-12-16 10:15:44 -05:00
David Cole 8f8ee53729 Merge topic 'test-compiler-output-var'
5f6985a Avoid clobbering variable 'OUTPUT' in compiler tests (#12628)
2011-12-16 10:15:20 -05:00
David Cole 65db5b4a99 Merge topic 'osx-dependent-libraries'
5d99343 Do not link private dependent shared libraries on OS X > 10.4
2011-12-16 10:15:07 -05:00
David Cole e44cdb04f1 Merge topic 'hp-shared-libs'
5720e1f HP: Drive shared library linking with compiler front end
2011-12-16 10:14:56 -05:00
David Cole c6c82f9e3e Merge topic 'fix-12480-correct-windres-compiler-when-cross-compiling'
6ddb1e5 Modules: Use "windres" as rc compiler base name for cross-compiles (#12480)
2011-12-16 10:14:42 -05:00
David Cole ac9453c371 Merge topic 'fix-lapack-issues'
b3c42cb FindLAPACK: List thread libs to avoid link errors (#12625)
f603cf2 FindLAPACK: Correct CMAKE_FIND_LIBRARY_SUFFIXES spelling (#12624)
2011-12-16 10:14:17 -05:00
David Cole c68a780dec Merge topic 'qt4-deploy-module'
4e9274e Unset configurations variable when no build type.
2011-12-16 10:13:59 -05:00
David Cole e945df2a7e Merge topic 'CPackRPM-0012608-UserSpecificFileControl'
121c295 CPackRPM fix #0012608 and unoticed related bug
2011-12-16 10:13:33 -05:00
Brad King 5f6985ac86 Avoid clobbering variable 'OUTPUT' in compiler tests (#12628)
Use an obscure name and clean up afterwards.
2011-12-15 08:31:17 -05:00
Brad King 5d9934312d Do not link private dependent shared libraries on OS X > 10.4
The default OS X 10.4 linker incorrectly searches for dependencies of
linked shared libraries only under the -isysroot location.  It fails to
find dependencies of linked shared libraries in cases such as the
ExportImport test.  It produces errors like:

 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic library:
 libtestLib3Imp.dylib
 referenced from: /.../ExportImport/Root/lib/libtestLib3lib.1.2.dylib
 (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: _testLib3Imp
 referenced from libtestLib3lib expected to be defined in
 libtestLib3Imp.dylib

or with CMAKE_SKIP_RPATH off to enable install_name in the Export side:

 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic library:
 /Developer/SDKs/MacOSX10.4u.sdk/.../ExportImport/Export/impl/libtestLib3Imp.dylib
 referenced from: /.../ExportImport/Export/libtestLib3lib.1.2.dylib
 (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:_testLib3Imp
 referenced from libtestLib3lib expected to be defined in
 /.../ExportImport/Export/impl/libtestLib3Imp.dylib

Note how "/Developer/SDKs/MacOSX10.4u.sdk" is prepended to the dependent
library path.

Commit 2cff26fa (Support linking to shared libs with dependent libs,
2008-01-31) and commit 82fcaebe (Pass dependent library search path to
linker on some platforms, 2008-02-01) worked around the problem by
defining platform variable CMAKE_LINK_DEPENDENT_LIBRARY_FILES.  It tells
CMake to link to dependent libraries explicitly by their path thus
telling the linker where to find them.

Unfortunately the workaround had the side effect of linking dependent
libraries and defeats most benefits of LINK_INTERFACE_LIBRARIES.
Fortunately OS X 10.5 and above do not need to find transitive
dependencies at all so we can avoid the workaround on Modern OS X.
2011-12-15 08:14:30 -05:00
Alex Neundorf 43f83d2ee5 GNUInstallDirs: add support for Debian multiarch
This patch makes CMAKE_INSTALL_LIBDIR default to the debian
multiarch dir if present, e.g. lib/i386-linux-gnu/

Alex
2011-12-14 19:24:28 +01:00
Brad King 5720e1f634 HP: Drive shared library linking with compiler front end
Previously we linked C, Fortran, and ASM shared libraries compiled with
the HP compiler using a direct invocation of the linker (ld).  This
behavior was left historically from support for an ancient HP C compiler
that did not know how to create shared libraries.  Fortran shared
libraries need to be linked with the compiler to get the language
runtime library dependencies as is already done for C++.

Update the HP-UX-HP* platform information to use the compiler front end
when linking shared libraries.  This works on modern HP tools and
produces correct behavior.  If there is a need to support older tools
again we can add a special case for them.
2011-12-14 09:32:27 -05:00
David Cole 6ddb1e5b9a Modules: Use "windres" as rc compiler base name for cross-compiles (#12480)
...if it matches "windres", as opposed to being exactly equal to "windres"

Cross-compiling windres compilers are named something like
"i686-w64-mingw32-windres" (for example)
2011-12-13 19:57:00 -05:00
Tim Gallagher b3c42cb012 FindLAPACK: List thread libs to avoid link errors (#12625) 2011-12-13 16:26:33 -05:00
Tim Gallagher f603cf2d36 FindLAPACK: Correct CMAKE_FIND_LIBRARY_SUFFIXES spelling (#12624) 2011-12-13 16:23:54 -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
Mike McQuaid 4e9274e954 Unset configurations variable when no build type. 2011-12-13 09:39:53 -07:00
Eric NOULARD 121c29553f CPackRPM fix #0012608 and unoticed related bug
The User may now specific a list of file that shouldn't be
automatically handled by CPack but specified by the user.
Like %config(noreplace) or specific %attr.
The concerned files/dir lines will be removed from the set
automatically handled by CPack.
2011-12-12 23:11:02 +01:00
Brad King 4cb73c43ac FortranCInterface: Work around mingw32-make trouble with parens
The mingw32-make tool does not handle parenthesis in the path to a
source file consistently.  When CMake is installed in a typical location
like "c:\Program Files (x86)\CMake 2.8\" the mingw32-make tool fails on
the FortranCInterface detection project sometimes with errors like

 >mingw32-make -f CMakeFiles\myfort.dir\build.make CMakeFiles/myfort.dir/my_module.f90.obj
 mingw32-make: *** No rule to make target `x86)/CMake 2.8/share/cmake-2.8/Modules/FortranCInterface/my_module.f90)',
 needed by `CMakeFiles/myfort.dir/my_module.f90.obj'.  Stop.

due to parens in the path to the FortranCInterface source directory.
However, the behavior varies with the file name of build.make:

 >copy CMakeFiles\myfort.dir\build.make CMakeFiles\myfort.dir\build2.make
 >mingw32-make -f CMakeFiles\myfort.dir\build2.make CMakeFiles/myfort.dir/my_module.f90.obj
 [  3%] Building Fortran object CMakeFiles/myfort.dir/my_module.f90.obj

Tested with

 >mingw32-make -v
 GNU Make 3.82
 Built for i386-pc-mingw32

Work around the problem by copying the whole FortranCInterface source
directory in to the project build tree.
2011-12-09 09:40:14 -05:00
Brad King c213eb9cbf Windows-GNU: Remove extra quotes in GNUtoMS rule variable
CMake replaces the <TARGET...> tokens with properly quoted values so we
do not need an extra set of quotes around them.
2011-12-08 13:28:37 -05: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 0ea95b99ce Merge topic 'topics/FindCUDA/Misc-fixes'
aa36082 Miscellaneous fixes.
2011-12-07 16:45:35 -05:00
David Cole c26e28754c Merge topic 'topics/FindCUDA/Multi-dir-clash'
80e279d Make CUDA working directory unique for each target.
2011-12-07 16:45:00 -05:00
David Cole 2d1195123e Merge branch 'master' into AutomocIncludedDotMocFileHandling
Conflicts:
	Source/cmTarget.cxx
2011-12-07 16:29:13 -05:00
David Cole 9f18f64c7c Merge topic 'topics/FindCUDA/Quote-fixes'
c3c7a0c Fixes for handling quotes in args and other places (Fix Bug 11726 and 12099).
2011-12-06 15:08:12 -05:00
David Cole de9dc82779 Merge topic 'topics/FindCUDA/FixCUDAInUNCPath'
83d4eea Add work around for CUDA in UNC paths.
2011-12-06 15:08:03 -05:00
David Cole 35017df53c Merge topic 'topics/FindCUDA/linux-double-build'
aa59544 Reset dependency file list when a dependency disappeared.
2011-12-06 15:07:48 -05:00