Commit Graph

18244 Commits

Author SHA1 Message Date
Alex Neundorf f310f67291 find_package: add MODULE mode to use only Find-modules
The new mode differ from default mode in that that it doesn't fallback
to config mode.  The default mode stays unchanged.
2012-02-28 09:58:01 -05:00
Alex Neundorf 7d67dcf52b find_package: improve error message when no Find module is present
Explain exactly why CMake is looking for a package configuration file
and who is expected to provide what:

 CMake Error at CMakeLists.txt:7 (find_package):
  By not providing "Find<pkg>.cmake" in CMAKE_MODULE_PATH the caller
  has asked CMake to find a package configuration file provided by
  "<pkg>", but CMake did not find one.

  Could not find a package configuration file provided by "<pkg>"
  with any of the names:

    <pkg>Config.cmake
    <pkg>-config.cmake

  Add the installation prefix of "<pkg>" to CMAKE_PREFIX_PATH or
  set "<pkg>_DIR" to a directory containing one of the above files.
  If "<pkg>" provides separate development package or SDK be sure
  it has been installed.

The first paragraph explains how CMake is interpreting the intention of
the caller.  This puts the blame or credit at the call site in the
project code where it belongs both when it is a bug and when it is
intentional.  It can be dropped in NO_MODULE mode.

Suggested-by: Brad King <brad.king@kitware.com>
2012-02-28 09:56:49 -05:00
KWSys Robot 26519d591e KWSys Nightly Date Stamp 2012-02-28 00:05:06 -05:00
Alex Neundorf 978d89b99d find_package: rename NoModule to UseFindModules
...positive logic is easier to handle

Alex
2012-02-27 16:36:29 -05:00
Alex Neundorf b3f9fe42f9 find_package: print error if an invalid CONFIGS name is used
In commit 41c2895b (Added version support to Config mode of find_package
command, 2008-01-28) the error message was computed but was not
reported.  Add the SetError call to report it.
2012-02-27 16:09:34 -05:00
Brad King 573fa3bf13 Factor cmInstallType out of cmTarget::TargetType
The purpose of the TargetType enumeration was overloaded for install
type because install rules were once recorded as targets.  Factor the
install types out into their own enumeration.
2012-02-27 13:19:57 -05:00
Rolf Eike Beer 7d6db93de9 FindPythonInterp: rework the version detection
There are versions out there that neither understand --version nor -V. Try a
completely different approach: execute a small python script that prints the
version number (and only that) in an easily reusable way using
sys.version_info. This is documented to work since Python 2.0. Use sys.version
for older versions, which is documented to exist since 1.5. If even that
doesn't work then simply assume we are on 1.4.0.
2012-02-27 18:15:01 +01:00
Yury G. Kudryashov 4f6fd961da Drop if(...) check because condition is always true
GetLocation returns std::string::c_str() which is never NULL
2012-02-27 11:59:15 -05:00
Rolf Eike Beer 518f965bba FindImageMagick: fix fail if no components were given
The variable name should be added to the list here, not the content.
2012-02-27 17:25:24 +01:00
Modestas Vainius f5cf8f9897 Tests: Escape metachars before embedding paths into the regex (#12999)
${CMake_SOURCE_DIR} and ${CMake_BINARY_DIR} cannot be embedded into regex
directly. If they contain special regex metacharacters like +, the regex
will break. So just escape such metacharacters with a backslash before
embedding the path into the regex.

The issue affected the following tests: CTestTestConfigFileInBuildDir1 and
CTestTestConfigFileInBuildDir2.
2012-02-27 09:01:10 -05:00
Yury G. Kudryashov a5edfc4fb7 Fix typo in documentation 2012-02-27 08:26:05 -05:00
KWSys Robot 00daeff02b KWSys Nightly Date Stamp 2012-02-27 00:05:06 -05:00
KWSys Robot 08ff8727af KWSys Nightly Date Stamp 2012-02-26 00:05:05 -05:00
Eric NOULARD 2ace3427ac Typo: Add missing ##end for ##module 2012-02-25 23:28:31 +01:00
Eric NOULARD 98d158376e Provide template for CPack Cygwin generator specific variables. 2012-02-25 23:26:41 +01:00
Eric NOULARD c895062180 Update CPack PackageMaker variable doc layout 2012-02-25 23:14:47 +01:00
Eric NOULARD 6ad0f0405b Update CPackConfig template.
Remove variable documentation from the template in order to
avoid multiple location for doc update. Users can now retrieve
CPACK_xxx variable documentation from the command line.
2012-02-25 23:07:07 +01:00
Eric NOULARD 94a269304e Review and update CPack variable documentation.
This concerns all variables common to all CPack generators.
Variables mainly used and/or set in CPack.cmake are documented
therein. C++ built-in variables are documented in
cmCPackDocumentVariables.cxx.
2012-02-25 23:07:07 +01:00
Eric NOULARD b3851f504d Fix CPack Drag and Drop generator documentation layout. 2012-02-25 19:18:52 +01:00
Eric NOULARD 4849e6ac63 Fix layout of the CPack Bundle documentation
CPACK_BUNDLE_STARTUP_SCRIPT was in fact CPACK_BUNDLE_STARTUP_COMMAND in
the C++ code. The doc has been changed accordingly.
2012-02-25 19:05:08 +01:00
Bjoern Ricks 0d2f5c8d6a Fix crash if app bundle executeable couldn't be found
Fix a crash on Mac OS X if a programm can't be found as an
application bundle. CFRelease MUST NOT be called on a
NULL value.

See https://developer.apple.com/library/mac/documentation/CoreFOundation/Reference/CFTypeRef/Reference/reference.html#//apple_ref/doc/c_ref/CFRelease
2012-02-25 18:20:36 +01:00
Rolf Eike Beer 213eb6e6a6 FindHSPELL: set HSPELL_VERSION_STRING
This variable was documented, but never set.
2012-02-25 14:52:19 +01:00
KWSys Robot f3fe73da54 KWSys Nightly Date Stamp 2012-02-25 00:05:05 -05:00
Yury G. Kudryashov b2cbd755c1 Remove unused file cmake.1
This old man page has long been replaced by generated documentation.
2012-02-24 14:52:04 -05:00
Rolf Eike Beer ffdaa4761c FindOpenSceneGraph: give every message() with an explicit level 2012-02-24 20:39:01 +01:00
Yury G. Kudryashov 261491fe17 cmPropertyDefinition::IsChained is const 2012-02-24 23:37:02 +04:00
Christopher Sean Morrison ab9824e14f cmake-mode.el: Make indentation case-insensitive (#12995)
Convert the block open and close matching expressions to be explicitly
insensitive to case.  This way it will not matter whether Emacs is
sensitive to case when evaluating 'string-match'.
2012-02-24 13:22:22 -05:00
Rolf Eike Beer c28e276948 GenerateExportHeader: improve compiler identification
Use CMAKE_<LANG>_COMPILER_VERSION instead of calling the compiler. This macro
predates those useful variables. This also fixes the issue that g++ version
detection was not working if C language was not enabled.
2012-02-24 17:48:02 +01:00
Rolf Eike Beer 4412fc0890 GenerateExportHeader: remove unneeded code
These expressions check for command line arguments unsupported by the compiler.
We don't pass any custom flags here anyway so this isn't needed.
2012-02-24 17:13:22 +01:00
KWSys Robot 2437b40933 KWSys Nightly Date Stamp 2012-02-24 00:05:06 -05:00
Rolf Eike Beer f6ecb900fb Check{C,CXX}CompilerFlag: detect ICC error messages
Patch provided by Christopher Sean Morrison.
2012-02-23 23:08:04 +01:00
Rolf Eike Beer 53d02ea1ea FindPythonLibs: stop scanning when libraries are found 2012-02-23 18:49:06 +01:00
Rolf Eike Beer 91d5a2a386 FindPythonLibs: put debug libraries into PYTHON_LIBRARIES 2012-02-23 18:48:24 +01:00
Rolf Eike Beer aca1121ea6 UseSWIG: clean up string compares 2012-02-23 18:39:23 +01:00
KWSys Robot e8e964f675 KWSys Nightly Date Stamp 2012-02-23 00:05:06 -05:00
Rolf Eike Beer 0110262a2d FindOpenMP: simplify check for enabled languages 2012-02-22 17:47:52 +01:00
Rolf Eike Beer c9c1a17609 FindPythonLibs: get the exact version of the found library (#3080) 2012-02-22 17:20:15 +01:00
Rolf Eike Beer f7723786e7 FindPythonLibs: make the version selection work as for PythonInterp 2012-02-22 17:20:15 +01:00
Rolf Eike Beer bbddaeef7e FindPython{Interp,Libs}: document Python_ADDITIONAL_VERSIONS as input
The current documentation could be read as if that variable is output from the
module, which is nonsense.
2012-02-22 17:20:15 +01:00
KWSys Robot 6a1c5a3569 KWSys Nightly Date Stamp 2012-02-22 00:05:07 -05:00
Stephen Kelly 40efa4db74 Fix documented function signature to match reality.
The function description is already correct.
2012-02-21 23:54:01 +01:00
David Cole 8ef15df700 Merge topic 'HandleTargetsInCMakeRequiredLibraries'
35c48e1 Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES
61cb4ea bootstrap: move while() and endwhile() into the bootstrap build
c9f2886 -don't pull in CheckTypeSize.cmake from the cmake which is being built
628f365 -remove trailing whitespace
2012-02-21 15:58:27 -05:00
David Cole bf6560091d Merge topic 'qt3-find-qtmain'
f506621 Fix paths/hints for finding qtmain.
2012-02-21 15:58:06 -05:00
David Cole 0c00c17938 Merge topic 'update-KWIML'
4cbc21e Merge branch 'upstream-kwiml' into update-KWIML
aabf65a KWIML: Teach ABI.h that MIPS is biendian
2012-02-21 15:57:41 -05:00
David Cole b187a3a816 Merge topic 'doBuildRPM-withSpaceInTree'
6749450 Do not build RPM if path of the build tree contains space
2012-02-21 15:57:30 -05:00
David Cole 7d02020d68 Merge topic 'CPack-dynamicDocSection'
9a8103e Try to fix compile error on Win32-vs70
4da2223 Fix typo in end markup
cfac874 More documentation concerning CPack Components
dee0a38 Put CPack DMG and PackageMaker doc in separate files
b4abcfe Correct copy/paste section name mistake
9717727 Suppress unecessary (now empty) doc sections
7a8f44a Add structure documentation for CPack Bundle generator
b8a274c Add structured documentation for NSIS
a6bce55 Dynamically add documentation section specified in documented script.
2012-02-21 15:57:17 -05:00
David Cole 6c6c266439 Merge topic 'GenerateExportHeader_MinorFix'
54e1f6f GenerateExportHeader: use double quotes around _gcc_version
2012-02-21 15:57:02 -05:00
David Cole 09c16ca488 Merge topic 'improve-findopenmp'
6f573ac FindOpenMP: try the most likely flags first
81228e9 FindOpenMP: do not fail if only C or CXX is enabled (#11910)
2012-02-21 15:56:53 -05:00
David Cole 0b5c086693 Merge topic 'expect-more-versions'
540db7e AllFindModules test: expect more modules to have a version number available
2012-02-21 15:56:43 -05:00
David Cole 115d770b33 Merge topic 'improve-findfreetype'
f58cce0 FindFreetype: support version selection
2012-02-21 15:56:35 -05:00