Commit Graph

3501 Commits

Author SHA1 Message Date
David Cole ba96356434 Merge topic 'improve-findcurl'
0640ec9 FindCURL: detect version number also for older versions
2012-02-01 14:48:31 -05:00
David Cole 3f7cea092b Merge topic 'improve-findtiff'
815a6a2 FindTIFF: support version selection
2012-02-01 14:47:57 -05:00
David Cole fa6816bd71 Merge topic 'improve-findlua51'
49b69ad FindLua51: add version support
2012-02-01 14:47:15 -05:00
David Cole c8d102eb40 Merge topic 'improve-selectlibraryconfigurations'
1eaf1c9 SelectLibraryConfigurations: do not output identical configurations
2012-02-01 14:46:54 -05:00
David Cole a98f99a820 Merge topic 'improve-findtclsh'
e01fe58 FindTclsh: support version selection
2012-02-01 14:46:23 -05:00
David Cole b7fd024229 Merge topic 'findruby-no-dummy-version'
409aeaf FindRuby: do not blindly set version to 1.8.0
2012-02-01 14:46:15 -05:00
David Cole bbc7259f70 Merge topic 'improve-findpng'
0051506 FindPNG: support version selection
2012-02-01 14:45:55 -05:00
David Cole aa8aed83f2 Merge topic 'improve-findimagemagick'
1562b9c FindImageMagick: make use of more FPHSA features
2012-02-01 14:45:26 -05:00
Rolf Eike Beer 31826b5166 FindPerl{,Libs}: move version detection into FindPerl
If the first attempt of getting the version doesn't succeed, try a second
approach.
2012-02-01 19:31:17 +01:00
Rolf Eike Beer 44d007b659 CheckIncludeFiles: fix status output
CHECK_INCLUDE_FILES("foo.h" HAVE_FOO_H) gave an output like:

  Looking for include files HAVE_FOO_H

After this change it does now what CHECK_INCLUDE_FILE() also does:

  Looking for include files foo.h
2012-02-01 18:14:52 +01:00
Mattias Helsing c4a0bcea77 CPack: Fix NSIS handling of privileged users (#12923)
When using the NSIS generator from CPack the file NSIS.template.in is
used to generate a project.nsi file for NSIS to process.  The file
consists code in the NSIS scripting language.  Among other functions
there is an onInit function the initializes the installer.  The function
(tries to) recognise admin and power users but fails since NSIS
scripting language relative includes the jump from the current command
so +3 means "run the third command after this one", so a failed check
for admin completely skips the check for a power user and goes directly
to "done:".

User permission lookup was added in initial NSIS support by commit
a11b9a4c (Merge from CPack branch, 2006-01-01).  Later commit b1b052fd
(Several changes to for NSIS, 2006-03-01) added a line inside a block
that should be skipped by a jump without updating the jump length.
Update the jump length to correct the behavior.
2012-02-01 08:18:49 -05:00
Philip Lowman c040054746 Findosg: New modules for osgQt and osgPresentation
Added new find modules for osgQt and osgPresentation submitted by
Robert Osfield <robert.osfield@gmail.com>
2012-01-28 17:35:20 -05:00
Rolf Eike Beer 1de14ec56e FindALSA: support version selection 2012-01-28 10:30:11 +01:00
Rolf Eike Beer 8a83853f5f FindGnuplot: add version selection 2012-01-28 10:27:44 +01:00
Rolf Eike Beer 00e30a0a34 FindJasper: fix library name
Spotted by Patrick Spendrin.
2012-01-27 22:37:31 +01:00
Rolf Eike Beer bde7b5aafd FindPythonInterp: try harder to get a version number 2012-01-27 21:15:53 +01:00
Rolf Eike Beer 3cc11c2f42 FindBISON: add a version expression for GNU Bison 1.x 2012-01-27 20:40:55 +01:00
Rolf Eike Beer 0bee3d9539 FindOpenSSL: properly parse the hex version components 2012-01-27 17:51:29 +01:00
Rolf Eike Beer 8e8db31f33 FindPostgreSQL: support version selection 2012-01-26 21:58:34 +01:00
Rolf Eike Beer 9d7a00104f FindLibXml2: detect version when PkgConfig is not used 2012-01-26 18:35:13 +01:00
Rolf Eike Beer 0640ec9476 FindCURL: detect version number also for older versions
Older versions of cURL do not have a curlver.h, but have the version define
directly in curl.h.
2012-01-26 18:25:25 +01:00
Rolf Eike Beer 815a6a2e5c FindTIFF: support version selection 2012-01-26 18:19:31 +01:00
Rolf Eike Beer 49b69add60 FindLua51: add version support 2012-01-26 09:07:53 +01:00
Rolf Eike Beer 1eaf1c9b0f SelectLibraryConfigurations: do not output identical configurations
If the debug and release libraries are the same (which usually means only one
of them was found) do not output the library as "optimized" and "debug", but
just as one plain library. At the end this means that the Find* output of the
avarage (Un*x) user will be much less cluttered.
2012-01-26 09:06:47 +01:00
Rolf Eike Beer e01fe583b8 FindTclsh: support version selection 2012-01-25 18:37:25 +01:00
Rolf Eike Beer 409aeafa25 FindRuby: do not blindly set version to 1.8.0
RUBY_VERSION was always set, even if no RUBY_EXECUTABLE was found. While it
may make sense to assume a default version if we can't execute the binary, it
certainly doesn't make sense to report a version if there is no executable at
all.
2012-01-25 18:33:08 +01:00
Rolf Eike Beer 0051506aa4 FindPNG: support version selection 2012-01-25 18:24:57 +01:00
Rolf Eike Beer 77e6c6fe84 FindGettext: support version selection 2012-01-25 18:02:50 +01:00
David Cole 731f996ce0 Merge topic 'improve-findbzip2'
5b6ca9f FindBZip2: add support for debug libraries (#12867)
40fb005 FindBZip2: add support for version checking
2012-01-25 11:20:00 -05:00
David Cole dc3fb5ac4e Merge topic 'improve-findjasper'
a580a23 FindJasper: support version number
9bf7c4e FindJasper: find debug libraries
2012-01-25 11:19:51 -05:00
David Cole c444cf73dd Merge topic 'flex-version'
0b2e81c FindFLEX: fix version parsing when the executable is quoted
2cf5df3 FindFLEX: fix version parsing for old flex versions
2012-01-25 11:19:38 -05:00
David Cole ddc1eb5ecd Merge topic 'improve-findcurl'
c1b8849 FindCURL: support version selection
2012-01-25 11:19:25 -05:00
David Cole 55e7d4071f Merge topic 'improve-findexpat'
7f81c48 FindEXPAT: support version number
2012-01-25 11:19:09 -05:00
David Cole 1226207a6e Merge topic 'improve-findcups'
be2b108 FindCups: major overhaul
2012-01-25 11:18:55 -05:00
David Cole c8b7f8e365 Merge topic 'improve-findgit'
a803a62 FindGit: support version number
2012-01-25 11:18:41 -05:00
David Cole 8372bd98a9 Merge topic 'improve-findgnutls'
b5719fb FindGnuTLS: partly support version selection
2012-01-25 11:18:29 -05:00
David Cole 825b9dde3d Merge topic 'improve-libxml2'
a5fd391 FindLibXml2: support version selection
2012-01-25 11:18:18 -05:00
David Cole 5ee225dbbd Merge topic 'use-pkgconfig-quiet'
ede3ec5 use pkg_check_modules() quiet in other modules
2012-01-25 11:18:03 -05:00
David Cole f47fea95d7 Merge topic 'find-threads-11333'
3dc6f2b FindThreads: Try pthreads with no special option first (#11333)
2012-01-25 11:17:29 -05:00
David Cole 476679afaf Merge topic 'GetPrerequisites-rpath-OSX'
98d2031 Fix BundleUtilities test failure with space in build path.
36d6641 Fix new BundleUtilities test failure on Mac 10.4.x
0d96dec GetPrerequisites: Add test for @rpath support.
880139a GetPrerequisites: Add support for @rpath on Mac OS X.
9a6b102 GetPrerequisites: Add support for @rpath on Mac OS X.
2012-01-25 11:17:12 -05:00
David Cole ac1c2a00b1 Merge topic 'FPHSA-CONFIG_MODE-doc'
26015ba FindPackageHandleStandardArgs: fix documentation
2012-01-25 11:16:39 -05:00
David Cole 2e69c0534f Merge topic 'FindPkgConfig-REQUIRED-issue-12620'
55c3435 FindPkgConfig: respect REQUIRED (#12620)
2012-01-25 11:16:22 -05:00
David Cole a1c1350a1f Merge topic 'python-version'
aa11536 FindPythonInterp: fix version parsing
0fe4d69 FindPythonInterp: make version selectable
2012-01-25 11:16:01 -05:00
David Cole 9d57dfee6a Merge topic 'openssl-version'
bb2b264 FindOpenSSL: also parse version number define with uppercase letters
7053a00 FindOpenSSL: only try to parse opensslv.h if it exists
44ba7a3 Merge branch 'master' of git://cmake.org/cmake into openssl-version
8e8672c FindOpenSSL: improve version number handling
2012-01-25 11:14:49 -05:00
David Cole c6a33dce36 Merge topic 'FindProtobuf_import_dirs'
27bc9e2 FindProtobuf: Update documentation comment for 2.8.8
84079c9 FindProtobuf: Merge patch that allows extra import dirs
2012-01-25 11:14:38 -05:00
Rolf Eike Beer 5b6ca9fa3f FindBZip2: add support for debug libraries (#12867)
The debug library has a different name on Windows. Make sure both versions
work.

Thanks to Patrick Spendrin for testing this.
2012-01-24 19:12:50 +01:00
Rolf Eike Beer 40fb00512a FindBZip2: add support for version checking 2012-01-24 19:12:46 +01:00
Rolf Eike Beer a580a23635 FindJasper: support version number 2012-01-24 19:08:07 +01:00
Rolf Eike Beer 9bf7c4e7e1 FindJasper: find debug libraries 2012-01-24 19:08:07 +01:00
Rolf Eike Beer 0b2e81c63c FindFLEX: fix version parsing when the executable is quoted 2012-01-23 23:40:17 +01:00
Rolf Eike Beer c1b884965f FindCURL: support version selection 2012-01-23 21:46:56 +01:00
Rolf Eike Beer 7f81c48bdd FindEXPAT: support version number 2012-01-23 20:54:04 +01:00
Rolf Eike Beer be2b108776 FindCups: major overhaul
This introduces CUPS_VERSION_STRING and ports the module over to use FPHSA for
all the benefits that come with it.
2012-01-23 20:31:47 +01:00
Rolf Eike Beer 1562b9c0b9 FindImageMagick: make use of more FPHSA features
This includes version number and printing the first found result if something
was found instead of "TRUE".
2012-01-23 20:13:27 +01:00
Rolf Eike Beer a803a622d0 FindGit: support version number 2012-01-23 20:10:42 +01:00
Rolf Eike Beer b5719fb727 FindGnuTLS: partly support version selection
For the Un*x systems where we use PkgConfig to find the library we can also
use the version returned from there.
2012-01-23 20:07:46 +01:00
Rolf Eike Beer a5fd3915c9 FindLibXml2: support version selection 2012-01-23 20:06:03 +01:00
Rolf Eike Beer ede3ec5a79 use pkg_check_modules() quiet in other modules
Those modules will already print what they found or not using FPHSA, no need
to do this twice.
2012-01-23 20:03:49 +01:00
Eric NOULARD 1629615a10 CPack Documentation extraction from CMake script begins to work
- Enhance extract doc parser. Seems robust now. The legacy
   module documentation parser works as before ignoring
   the new markup.

 - Proof of concept for CPack (generic), CPack RPM and CPack Deb
   generator for macro and variables.
   Try cpack --help-command and cpack --help-variables
2012-01-22 13:31:24 +01:00
Eric NOULARD 83e34dd9e6 Implement simple CMake script comment markup language.
The language is very simple. It use ##<keyword> special comment
which opens a structured documentation block and ##end closes it.
This may be used to extract documentation for macro as 'command'
and 'variables' such that cpack --help-command and --help-variable
does parse builtin modules files (CPack.cmake, CPackComponent.cmake,
...) in order to extract the corresponding doc.
2012-01-22 11:44:05 +01:00
Rolf Eike Beer 3dc6f2bfb3 FindThreads: Try pthreads with no special option first (#11333)
QNX has the phtread stuff in the standard library.  The best way would
IMHO be to check if a program that uses pthread_* can be successfully
linked without specifying any linker option before trying out the
different flags.
2012-01-21 22:24:19 +01:00
Rolf Eike Beer 2cf5df3e58 FindFLEX: fix version parsing for old flex versions 2012-01-20 18:27:43 +01:00
Yury G. Kudryashov 26015baba3 FindPackageHandleStandardArgs: fix documentation
State explicitly what CONFIG_MODE argument does.
2012-01-20 09:09:47 -05:00
Yury G. Kudryashov 55c3435d88 FindPkgConfig: respect REQUIRED (#12620)
find_package(PkgConfig REQUIRED) now fails if pkg-config is not found.
2012-01-20 08:33:51 -05:00
Clinton Stimpson 880139a642 GetPrerequisites: Add support for @rpath on Mac OS X.
Change to consider a library embedded if it is found in a subdirectory relative to the
using executable/library.  Previous commit considered them local.
This case is encountered when @rpath is used with framework libraries, which are inside a directory tree.
2012-01-19 18:10:01 -07:00
Rolf Eike Beer aa11536c38 FindPythonInterp: fix version parsing
On dashmacmini2 the test showed output like this:

-- Found PythonInterp: /usr/bin/python (found version "Unknown option: --
usage: /usr/bin/python [option] ... [-c cmd | file | -] [arg] ...
Try `python -h' for more information.")

On my machine where python outputs "Python 2.7" this worked, but
PYTHON_VERSION_MAJOR, PYTHON_VERSION_MINOR, and PYTHON_VERSION_PATCH were all
set to "2.7".

Add some checks that the version output has the expected form before using it.
2012-01-19 23:59:48 +01:00
Rolf Eike Beer 0fe4d69b6f FindPythonInterp: make version selectable
This allows the developer to tell FindPythonInterp which Python version should
be searched for. This allows the right version to be chosen for a project
without user assistance if there are specific requirements. This is especially
useful as it is common to have major versions 2 and 3 installed in parallel,
which are partly incompatible.
2012-01-18 18:29:16 +01:00
David Cole a6518c30e0 Merge topic 'check_symbol_exists'
6856b4d Merge topic 'link-shared-depend-cycle-issue-12647' into check_symbol_exists
8e1f376 add a test for Check{,CXX}SymbolExists
813eca6 CheckSymbolExists: force the compiler to keep the referenced symbol
2012-01-17 16:25:38 -05:00
David Cole 1120bb6990 Merge topic 'FindMPI-issue-12874'
87737e6 FindMPI: Append MPI C++ library correctly in non-compiler case (#12874)
2012-01-17 16:24:42 -05:00
David Cole dafd511199 Merge topic 'CPackRPM-noFileListedTwice'
ae250d5 CPackRPM flag direcories with %dir in the generated spec file
2012-01-17 16:24:22 -05:00
David Cole f1f66c95ad Merge topic 'ExternalProject-git-cmd-version'
4ac6ba2 ExternalProject: Update copyright year
8cb8ccc ExternalProject: Fix git.cmd version detection
2012-01-17 16:23:16 -05:00
David Cole 4dd47eb6c3 Merge topic 'compiler-version'
0df1942 Detect SGI MIPSpro compiler version with its id
a5e892c Document compiler version macro formats used for detection
d7c6f41 Detect HP compiler version with its id
3dd9fa9 Detect SunPro compiler version with its id
c198730 Detect Watcom compiler version with its id
5899b98 Detect Clang compiler version with its id
b8cfa65 Detect PGI compiler version with its id
6dae666 Detect IBM XL compiler version with its id
4080d55 Detect Borland compiler version with its id
2cc205a Detect Intel compiler version with its id (#11937)
a6d83cc Detect MSVC compiler version with its id
a662855 Detect GNU compiler version with its id (#6251)
fa7141f Add framework to detect compiler version with its id (#12408)
2012-01-17 16:22:53 -05:00
Rolf Eike Beer bb2b264b5e FindOpenSSL: also parse version number define with uppercase letters 2012-01-17 19:07:04 +01:00
Rolf Eike Beer 7053a00f23 FindOpenSSL: only try to parse opensslv.h if it exists 2012-01-17 08:36:50 +01:00
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
Brad King 87737e62e0 FindMPI: Append MPI C++ library correctly in non-compiler case (#12874)
When we have no MPI compiler wrapper and search explicitly for the MPI
C++ library append it correctly to the list of libraries instead of
using a space.

Suggested-by: Mourad Boufarguine <bouffa@gmail.com>
2012-01-16 09:03:08 -05:00
Deborah Pickett ae250d5cfa CPackRPM flag direcories with %dir in the generated spec file
This fix bug #12863 whose symptom was a lot of "warning: File listed twice"
printed out by rpmbuild when processing the spec file.

Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2012-01-13 21:35:41 +01:00
Rolf Eike Beer 8e8672ccdb FindOpenSSL: improve version number handling
First this fixes the bug that e.g. version "1.0.0" was shown as "1..". When
pkg-config was used to find OpenSSL the header file was parsed for the version
number even if pkg-config returned it already. Finally we also include the
patch level (i.e. the letter after the version number) in OPENSSL_VERSION.
2012-01-13 17:24:50 +01:00
Brad King 4ac6ba2bb8 ExternalProject: Update copyright year 2012-01-10 15:02:56 -05:00
Brad King 8cb8ccc571 ExternalProject: Fix git.cmd version detection
When GIT_EXECUTABLE points at ".../Git/cmd/git.cmd" in an msysGit
installation we previously failed to detect the version number in a
subtle case.  The "git.cmd" assumes 'chcp' is in PATH.  It is typically
available at "C:\Windows\System32\chcp.com".  On 64-bit Windows the File
System Redirector maps this location to "C:\Windows\SysWOW64\chcp.com"
for 32-bit processes.  However, some Windows installations fail to
provide chcp.com at this path.  Whenever git.cmd runs in a 32-bit
command shell, as it does under a 32-bit CMake binary, it reports

 'chcp' is not recognized as an internal or external command,
  operable program or batch file.

on stderr.  Capture stderr separately so it does not affect parsing
of the version number.

See also msysGit issue 358:

  http://code.google.com/p/msysgit/issues/detail?id=358

Note that FindGit prefers "git.cmd" over "git.exe" because it sets up
the proper HOME environment variable necessary for Git ssh connections
to work the same as they do from the Git bash prompt.
2012-01-10 15:02:40 -05:00
Brad King 0df1942a72 Detect SGI MIPSpro compiler version with its id
Decode decimal digits from _SGI_COMPILER_VERSION or _COMPILER_VERSION to
compute version number components.  See documentation at:

  http://predef.sourceforge.net/precomp.html
2012-01-10 13:29:39 -05:00
Brad King a5e892ca1f Document compiler version macro formats used for detection
The MSVC, HP, XL, SunPro, Watcom, Borland, and Intel compilers specify
their version number in components encoded in a single integer value.
Document the components that we use to compute version numbers.
2012-01-10 13:24:38 -05:00
Brad King d7c6f410f9 Detect HP compiler version with its id
Decode decimal digits from __HP_cc and __HP_aCC to compute version
number components.  See documentation at:

  http://predef.sourceforge.net/precomp.html
  http://g4u0420c.houston.hp.com/en/14487/preprocess.htm
2012-01-10 13:07:04 -05:00
Brad King 3dd9fa9d6a Detect SunPro compiler version with its id
Decode hex digits from __SUNPRO_C and __SUNPRO_CC to compute the version
number components.  Note that the constant encodes decimal digits as hex
digits (never larger than 9).  We represent them as decimal after
extraction.  See documentation at

  http://predef.sourceforge.net/precomp.html

Although the documented version number format is

  0xVRP where V = Version, R = Revision, P = Patch

it holds only though SunPro C/C++ version 5.9.  Later versions have
a two-digit revision (minor) number so their format is 0xVRRP.
2012-01-10 11:59:14 -05:00
Christian Andersson a04ced3b38 FindPythonLibs: Search for single-user installs on Windows
When cmake searches for Python libs in Windows it searches in:

  [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs

However, the information might not always reside there.  The information
could also reside in:

  [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs

when one installs Python for a single user and not for all users.
2012-01-10 09:58:43 -05: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
Philip Lowman 27bc9e2631 FindProtobuf: Update documentation comment for 2.8.8 2012-01-03 19:47:05 -05: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