Commit Graph

4867 Commits

Author SHA1 Message Date
Brad King 0d094e3a77 Merge topic 'msvc-compiler-info'
32b7c72 Merge branch 'cmake-platform-info-version' into msvc-compiler-info
f3ddfef Modernize MSVC compiler information files
485a940 VS: Simplify MSVC version reporting
32db033 VS: Remove support for "free" version 2003 tools
2012-08-30 11:06:30 -04:00
Brad King a4c47fe0c7 Merge topic 'cmake-platform-info-version'
e5fee8a Store ABI detection results in compiler information files
3df81b4 Move CMAKE_<LANG>_COMPILER_WORKS to compiler information files
7195aca Make platform information files specific to the CMake version
2012-08-30 11:06:15 -04:00
Brad King 32b7c72623 Merge branch 'cmake-platform-info-version' into msvc-compiler-info
Conflicts:
	Modules/CMakeTestCCompiler.cmake
	Modules/CMakeTestCXXCompiler.cmake
	Modules/Platform/Windows-cl.cmake
2012-08-30 09:45:17 -04:00
Brad King f3ddfef137 Modernize MSVC compiler information files
Remove the old-style "Windows-cl.cmake" and its helper "cl.cmake".  Load
the information through new-style "Platform/Windows-MSVC-<lang>.cmake"
files.  Factor information common to C and CXX into a helper file
"Platform/Windows-MSVC.cmake" loaded from the per-language files.
2012-08-30 09:42:49 -04:00
Brad King 485a940e4c VS: Simplify MSVC version reporting
Teach Windows-cl.cmake to use CMAKE_(C|CXX)_COMPILER_VERSION to set the
"MSVC##" and MSVC_VERSION variables.  It no longer needs the IDE generator
to dictate the version or to detect the version by running the
command-line tool for NMake and Ninja generators.  Drop configuration of
CMakeCPlatform.cmake and CMakeCXXPlatform.cmake from Windows-cl.cmake.in
because all the results it saved are now cheap to compute every time.
2012-08-30 09:42:40 -04:00
Rolf Eike Beer af06482d24 FindFLEX: fix version extraction on Apple
The space in 'flex 2.5.35 Apple(flex-31)' caused the version extraction to
fail. Ignore everything after the first space following the version number.
2012-08-30 15:34:41 +02:00
Stephen Kelly 42bfc5a3e4 Read entire Qt4 qrc file when parsing for depends info.
The qrc file is an xml file, not line based, so the entire 'interesting'
content to parse is not necessarily found by STRINGS and a regexp.
2012-08-30 09:47:42 +02:00
Stephen Kelly 325214900b Fix casing of 'Qt' in docs, comments and user-visible strings.
QT (cue-tea) is Apple QuickTime.
Qt (cute) is the C++ framework.
2012-08-28 11:24:55 +02:00
Peter Kümmel be9afbf453 Find mingw's windres also when Unix Makefiles are used 2012-08-27 16:54:21 +02:00
Peter Kümmel 0af27f1f2a Ninja: also detect /showInclude prefix for icl 2012-08-27 14:49:51 +02:00
Brad King e5fee8a7c2 Store ABI detection results in compiler information files
Drop use of cache entry CMAKE_DETERMINE_<LANG>_ABI_COMPILED and replace
it with variable CMAKE_<LANG>_ABI_COMPILED.  Since the grandparent
commit this test result is specific to the version of CMake.  Store it
in the version-specific compiler information files instead of
CMakeCache.txt so testing can be re-done to meet the requirements of the
current version of CMake even if another version of CMake was already
used to configure the build tree.
2012-08-24 15:15:14 -04:00
David Cole 34a0284603 Merge topic 'ide-compiler-id'
403ead6 Document CMAKE_<LANG>_COMPILER_(ID|VERSION) values
8be51f6 Test variables CMAKE_(C|CXX|Fortran)_COMPILER(|_ID|_VERSION)
ec22a9b Cleanly enable a language in multiple subdirectories
66cb335 VS: Detect the compiler id and tool location
89595d6 VS10: Define CMAKE_VS_PLATFORM_TOOLSET variable
965a69d Xcode: Detect the compiler id and tool location
9a9e1ee CMakeDetermineCompilerId: Prepare to detect IDE compiler id
b8b5c83 Re-order C/C++/Fortran compiler determination logic
2012-08-24 14:25:40 -04:00
David Cole 0a9b51b6bc Merge topic 'more-compiler-versions'
e9bc502 Detect Analog VisualDSP++ compiler version with its id
cca386b Detect Cray compiler version with its id
622d9a7 Detect SDCC compiler version with its id
4ad7fa6 Detect Comeau compiler version with its id
952651c Detect TI compiler version with its id
74c57d9 Detect PathScale compiler version with its id
707aefd Detect Compaq compiler version with its id
2012-08-24 14:25:21 -04:00
David Cole 286f7c9644 Merge topic 'topics/FindCUDA/Add-CUDA_SOURCE_PROPERTY_FORMAT'
787287c Added CUDA_SOURCE_PROPERTY_FORMAT. Allows setting per file format (OBJ or PTX)
2012-08-24 14:24:11 -04:00
David Cole 6dab13c56e Merge topic 'topics/FindCUDA/Fix-g3-again'
a20c41d Replace -g3 with -g for CUDA 4.1 and 4.2 in addition to CUDA < 3.0.
2012-08-24 14:23:21 -04:00
Clinton Stimpson caa9151169 Fix errors detecting Qt4 on Windows 8.
Thanks to Petr Baloun for the patch.
2012-08-24 09:54:31 -06:00
Brad King 3df81b4912 Move CMAKE_<LANG>_COMPILER_WORKS to compiler information files
Since the parent commit this test result is specific to the version of
CMake.  Store it in the version-specific compiler information files
instead of CMakeCache.txt so testing can be re-done to meet the
requirements of the current version of CMake even if another version of
CMake was already used to configure the build tree.
2012-08-24 10:52:23 -04:00
Brad King 7195aca54f Make platform information files specific to the CMake version
At the top of a build tree we configure inside the CMakeFiles directory
files such as "CMakeSystem.cmake" and "CMake<lang>Compiler.cmake" to
save information detected about the system and compilers in use.  The
method of detection and the exact results store varies across CMake
versions as things improve.  This leads to problems when loading files
configured by a different version of CMake.  Previously we ignored such
existing files only if the major.minor part of the CMake version
component changed, and depended on the CMakeCache.txt to tell us the
last version of CMake that wrote the files.  This led to problems if the
user deletes the CMakeCache.txt or we add required information to the
files in a patch-level release of CMake (still a "feature point" release
by modern CMake versioning convention).

Ensure that we always have version-consistent platform information files
by storing them in a subdirectory named with the CMake version.  Every
version of CMake will do its own system and compiler identification
checks even when a build tree has already been configured by another
version of CMake.  Stored results will not clobber those from other
versions of CMake which may be run again on the same tree in the future.
Loaded results will match what the system and language modules expect.

Rename the undocumented variable CMAKE_PLATFORM_ROOT_BIN to
CMAKE_PLATFORM_INFO_DIR to clarify its purpose.  The new variable points
at the version-specific directory while the old variable did not.
2012-08-24 10:52:23 -04:00
Brad King 32db033b27 VS: Remove support for "free" version 2003 tools
Several more recent Visual Studio Express editions are now available and
they support debug builds.  Simplify our VS platform files by removing
support for these old tools.  If anyone still uses them we can restore
support with a more modern way to test for them.
2012-08-23 10:51:27 -04:00
Brad King ca9c287d1a Merge topic 'Qt4Macros-fix-resource-parsing'
3553001 Qt4Macros: Fix recently broken resource file parsing
2012-08-23 10:16:58 -04:00
Brad King 66cb3356f5 VS: Detect the compiler id and tool location
Configure a hand-generated Visual Studio project to build the compiler id
source file since we cannot run the compiler command-line tool directly.
Add a post-build command to print out the full path to the compiler tool.
Parse the full path to the compiler tool from the build output.
2012-08-22 16:35:54 -04:00
Brad King 965a69dcaa Xcode: Detect the compiler id and tool location
Configure a hand-generated Xcode project to build the compiler id source
file since we cannot run the compiler command-line tool directly.  Add a
post-build shell script phase to print out the compiler toolset build
setting.  Run xcodebuild to compile the identification binary.  Parse
the full path to the compiler tool from the xcodebuild output.
2012-08-22 15:14:33 -04:00
Brad King 9a9e1ee98d CMakeDetermineCompilerId: Prepare to detect IDE compiler id
Teach CMAKE_DETERMINE_COMPILER_ID to check for variable
CMAKE_${lang}_COMPILER_ID_TOOL after CMAKE_DETERMINE_COMPILER_ID_BUILD
to use as CMAKE_${lang}_COMPILER since it will not be known until after
the IDE runs.

In CMAKE_DETERMINE_COMPILER_ID_BUILD prepare a cascading "if" so we can
use a generator-specific method to compile the identification source
file.  Leave "if(0)" as a placeholder for now and put the direct
compiler invocation in "else()".  After running the compiler to build
the compiler identification source we file(GLOB) the list of output
files as candidates for extracting the compiler information.  An IDE may
create directories, so exclude exclude directories from this list.
2012-08-22 15:14:33 -04:00
Brad King b8b5c8342a Re-order C/C++/Fortran compiler determination logic
Re-organize CMakeDetermine(C|CXX|Fortran)Compiler.cmake to search for
the compiler command-line tool only under generators for which it makes
sense.  For the Visual Studio generators we do not expect to find the
compiler tool from the environment, nor would we use the result anyway.

Furthermore, set CMAKE_${lang}_COMPILER_ID_TEST_FLAGS only when it has a
chance to be used.  Extract _CMAKE_TOOLCHAIN_LOCATION from the compiler
path after running the compiler id step so in the future that step can
help find the path to the compiler.
2012-08-22 15:14:33 -04:00
Brad King e9bc502fb8 Detect Analog VisualDSP++ compiler version with its id
Decode hex digits from __VISUALDSPVERSION__ 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://download.analog.com/dsp/tools/VisualDSP_45_Update_6_Release_Note_v4.pdf
  http://www.analog.com/static/imported-files/software_manuals/50_asm_man.rev3.1.pdf

Note that __VISUALDSPVERSION__ was introduced in version 4.5.6.
2012-08-22 11:48:07 -04:00
Brad King cca386b0a0 Detect Cray compiler version with its id
Decode decimal digits from

  _RELEASE
  _RELEASE_MINOR

to compute version number components.  See documentation at:

  http://docs.cray.com/books/S-2179-52/html-S-2179-52/zfixed5fvzxnxo.html
  http://sourceforge.net/p/predef/wiki/Compilers/#cray-c
2012-08-22 11:31:33 -04:00
Brad King 622d9a789d Detect SDCC compiler version with its id
Decode decimal digits from SDCC to compute version number components.
See documentation at:

  http://sdcc.sourceforge.net/doc/sdccman.pdf
  http://sourceforge.net/p/predef/wiki/Compilers/#small-device-c-compilerhttpenwikipediaorgwikismall_device_c_compiler
2012-08-22 10:27:09 -04:00
Brad King 4ad7fa6488 Detect Comeau compiler version with its id
Decode decimal digits from __COMO_VERSION__ to compute the version
number components.  See documentation at:

  http://www.comeaucomputing.com/4.0/docs/userman/predefs.html
  http://sourceforge.net/p/predef/wiki/Compilers/#comeau-chttpenwikipediaorgwikicomeau_cc2b2b
2012-08-22 10:17:01 -04:00
Brad King 952651c642 Detect TI compiler version with its id
Decode decimal digits from __TI_COMPILER_VERSION__ to compute version
number components.  See documentation at:

  http://processors.wiki.ti.com/index.php/Refer_to_Compiler_Version_in_Your_Source
  http://www.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=spru187o
  http://sourceforge.net/p/predef/wiki/Compilers/#texas-instruments-cc-compiler
2012-08-22 10:17:01 -04:00
Brad King 74c57d99b4 Detect PathScale compiler version with its id
Decode decimal digits from

  __PATHCC__
  __PATHCC_MINOR__
  __PATHCC_PATCHLEVEL__

to compute version number components.  See documentation at:

  http://www.pathscale.com/docs/UserGuide.pdf
  http://sourceforge.net/p/predef/wiki/Compilers/#ekopathhttpenwikipediaorgwikipathscale
2012-08-22 10:17:01 -04:00
Brad King 707aefd853 Detect Compaq compiler version with its id
Decode decimal digits from __DECC_VER and __DECCXX_VER to compute
version number components.  See documentation at:

  http://www.openvms.compaq.com/commercial/c/docs/5492p024.html#decc_ver_sec
  http://www.tru64unix.compaq.com/cplus/ugu_impl.html#predef_vernum
  http://sourceforge.net/p/predef/wiki/Compilers/#compaq-cchttpwwwopenvmscompaqcomopenvmsbrochuresdeccplus
2012-08-22 10:17:01 -04:00
Brad King 3553001bcc Qt4Macros: Fix recently broken resource file parsing
Commit 4be67837 (read less from version headers into variables,
2012-08-19) switched from file(READ) and string(REGEX MATCHALL) to just
file(STRINGS) to extract the list of resource <file> entries.  However,
the latter extracts entire lines that match the regex, not just the part
that matches the regex, so the subsequent string(REGEX REPLACE) fails to
match and replace anything.  Return to the original parsing logic but
replace file(READ) with file(STRINGS) to load a minimal part of the file
before using string(REGEX MATCHALL) as before.
2012-08-22 08:37:27 -04:00
James Bigler 787287cc46 Added CUDA_SOURCE_PROPERTY_FORMAT. Allows setting per file format (OBJ or PTX)
Added CUDA_SOURCE_PROPERTY_FORMAT that allows users to set the format (OBJ or PTX) on a
per file basis.
2012-08-20 17:33:35 -06:00
James Bigler db207e4065 FindCUDA: Added CUDA_HOST_COMPILER variable.
Added a new CUDA variable for specifying the CUDA_HOST_COMPILER.  This will allow users to
be able to specify which host compiler to use for invoking NVCC with.  By default it will
use the compiler used for host compilation.  This is convenient for when you want to
specify a different compiler than the default compiler.  You end up using the same
compiler for both the NVCC compilation and the host compilation instead of using the
default compiler in the path for NVCC.
2012-08-20 15:14:37 -06:00
David Cole 32710211ad Merge topic 'qt4_use_modules'
1420691 Add new qt4_use_modules function.
2012-08-20 15:42:43 -04:00
David Cole c79dd4d951 Merge topic 'read-less-from-version-headers'
4be6783 read less from version headers into variables
2012-08-20 15:42:34 -04:00
David Cole 19e210af90 Merge topic 'no-regex-escape-space'
637207e do not escape spaces in regular expressions
2012-08-20 15:42:25 -04:00
David Cole 0afaedfb4a Merge topic 'FindGTK2_12306'
ad30210 FindGTK2: Add GTK2_CAIROMMCONFIG_INCLUDE_DIR for cairommconfig.h
2012-08-20 15:42:13 -04:00
David Cole e19f260712 Merge topic 'FindOpenSceneGraph_13094'
dd60ed2 Merge topic 'lib64-cleanup' into FindOpenSceneGraph_13094
224b5de FindOpenSceneGraph: CMake variable OSG_DIR influences detection now too
2012-08-20 15:42:03 -04:00
David Cole 9a4b4f2223 Merge topic 'lib64-cleanup'
cfe4ac4 use PATH_SUFFIXES to simplify find_* calls
b04650e use the find_* functions ENV parameter
2012-08-20 15:41:53 -04:00
David Cole 4097914bbd Merge topic 'fix-13236-mark-vars-as-advanced'
3f9fa5c ProcessorCount: Mark find_program vars as advanced (#13236)
2012-08-20 15:41:44 -04:00
David Cole ba9fde6503 Merge topic 'fix-13315-incorrect-mfc-file-name'
e4e6ea0 InstallRequiredSystemLibraries: Use correct file names (#13315)
2012-08-20 15:41:26 -04:00
David Cole e04245e2d5 Merge topic 'HandleMacFrameworkIncludeDirs_13465'
a3815e6 -fix line length
9110d0e Eclipse on OSX: improve handling of framework include dirs (#13367)
d97b385 Eclipse on OSX: fix handling of framework include dirs (#13464)
2012-08-20 15:41:14 -04:00
David Cole 1239b4881d Merge topic 'qt4-path-search'
35c6ae8 FindQt4: Give precedence to QTDIR environment variable, if set.
5a6a3d4 FindQt4: Give precedence to QTDIR environment variable, if set.
2012-08-20 15:40:36 -04:00
David Cole 321bbed130 Merge topic 'qt4-version-regex'
4a772a1 Fix regex for qt minor version.
2012-08-20 15:40:28 -04:00
David Cole e11e719796 Merge topic 'hg-modules'
91053cd ExternalProject: Add Mercurial (hg) repository support
ea5bfb1 Add FindHg module to find Mercurial
2012-08-20 15:40:19 -04:00
David Cole eb6b8c86bf Merge topic 'relwithdebinfo-consistency'
0ddfc51 Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it.
2012-08-20 15:40:11 -04:00
David Cole 0075e7e033 Merge topic 'deployqt4-destdir'
1e3248c DeployQt4:  Include DESTDIR for some cpack generators.
2012-08-20 15:40:03 -04:00
David Cole c2022eb06d Merge topic 'fphsa-message'
213a9e5 fphsa: clarify message about minimum required version found.
2012-08-20 15:39:53 -04:00
David Cole 14c8096ba8 Merge topic 'more-endif-closing-style-cleanups'
84b49be Remove CMake multiline block-end command arguments
2012-08-20 15:39:26 -04:00
David Cole d4be75be12 Merge topic 'FindX11-duplicate-includes-13316'
dd784dd FindX11: avoid calling list(REMOVE_DUPLICATES) on an empty list
97c338b FindX11: remove duplicates from X11 include path list (#13316)
2012-08-20 15:39:18 -04:00
David Cole 2582994e57 Merge topic 'clang-asm'
7e8471c Recognize Clang ASM support (#13473)
2012-08-20 15:38:51 -04:00
David Cole 5cf828c028 Merge topic 'CheckTypeSize-doc-10579'
c6fed68 CheckTypeSize: add a test for size of struct members
48783b7 CheckTypeSize: show in documentation how to get struct member size (#10579)
2012-08-20 15:38:33 -04:00
Stephen Kelly 1420691b35 Add new qt4_use_modules function. 2012-08-19 23:45:09 +02:00
Rolf Eike Beer 4be6783711 read less from version headers into variables
Instead of reading the whole file using file(READ) and later matching on the
whole file use file(STRINGS ... REGEX) to get only those lines we are
interested in at all. This will make the list much smaller (good for debugging)
and also the regular expressions will need to match on much smaller strings.

Also unset the content variables once they are not used anymore.
2012-08-19 13:54:56 +02:00
Rolf Eike Beer 637207e62a do not escape spaces in regular expressions
The space has no special meaning in regular expressions so it doesn't need to
be escaped.
2012-08-19 11:49:56 +02:00
Philip Lowman ad30210ccf FindGTK2: Add GTK2_CAIROMMCONFIG_INCLUDE_DIR for cairommconfig.h 2012-08-18 17:56:46 -04:00
Philip Lowman dd60ed2f4f Merge topic 'lib64-cleanup' into FindOpenSceneGraph_13094
Resolved a few conflicts due to changes made in 13094 to paths
Conflicts:
	Modules/FindOpenThreads.cmake
	Modules/Findosg_functions.cmake
2012-08-18 17:03:18 -04:00
Philip Lowman 224b5dea78 FindOpenSceneGraph: CMake variable OSG_DIR influences detection now too 2012-08-18 16:46:08 -04:00
David Cole 3f9fa5cc7f ProcessorCount: Mark find_program vars as advanced (#13236)
After each find_program call, mark_as_advanced each find result
variable to avoid polluting the cache with non-advanced variables
2012-08-17 10:56:05 -04:00
David Cole e4e6ea0714 InstallRequiredSystemLibraries: Use correct file names (#13315)
The Spanish language MFC localization dll changed names from
VS 9 to 10. Use the correct file name ending with "esn.dll"
instead of the now non-existent one ending with "esp.dll"

Also, add the existing, but missing from our rules until now,
Russian language module.

Alphabetize the list while we're at it for easier reading in
the future.

We may want to consider adding some file(GLOB code here to
minimize the risk of missing files added in future versions
of VS.
2012-08-17 09:48:24 -04:00
Alex Neundorf d97b38529e Eclipse on OSX: fix handling of framework include dirs (#13464)
On OSX, the output from gcc looks like this:
 /usr/include/c++/4.2.1
 /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64
 /usr/include/c++/4.2.1/backward
 /usr/lib/gcc/i686-apple-darwin10/4.2.1/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.

The "(framework directory)" part needs to be removed so that Eclipse handles it properly

Alex
2012-08-16 23:02:10 +02:00
Clinton Stimpson 35c6ae8877 FindQt4: Give precedence to QTDIR environment variable, if set.
Remove old search paths that aren't needed.

Keep using PATHS instead of HINTS because a Windows machine may have
a different Qt in its PATH and putting QTDIR and the registry entry
ahead of PATH could cause apps to fail when run.
2012-08-16 07:31:17 -06:00
Brad King 91053cdf7b ExternalProject: Add Mercurial (hg) repository support
Add options HG_REPOSITORY and HG_TAG to specify an external project
hosted in a Mercurial repository.  Teach ExternalProject to clone the
repository and update from it.  Extend the ExternalProject test to try a
Mercurial repository when hg is available.
2012-08-16 09:02:34 -04:00
Clinton Stimpson 0ddfc51f6a Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it.
Previously, it was inconsistent in that some platforms/compilers
had this flag for the RelWithDebInfo configuration and some didn't.
This fixes issue #11366.
2012-08-15 20:00:45 -06:00
Clinton Stimpson 1e3248c9d0 DeployQt4: Include DESTDIR for some cpack generators. 2012-08-15 19:36:50 -06:00
Clinton Stimpson 213a9e5a7b fphsa: clarify message about minimum required version found.
Thanks to Dubrovskiy Viacheslav.
2012-08-15 18:23:55 -06:00
Clinton Stimpson 5a6a3d4342 FindQt4: Give precedence to QTDIR environment variable, if set. 2012-08-15 18:20:16 -06:00
Clinton Stimpson 4a772a1686 Fix regex for qt minor version.
Thanks to Dubrovskiy Viacheslav and Sergei Epifanov for patch.
2012-08-15 18:14:40 -06:00
Marcin Wojdyr 84b49be8f0 Remove CMake multiline block-end command arguments
removing arguments omitted in 9db3116226
2012-08-15 16:50:29 -04:00
Rolf Eike Beer dd784dde72 FindX11: avoid calling list(REMOVE_DUPLICATES) on an empty list 2012-08-15 19:28:50 +02:00
Brad King 7e8471ce7b Recognize Clang ASM support (#13473)
Since commit 571dc748 (Recognize Clang C and C++ compilers, 2010-05-17)
we recognize Clang C and C++ support.  Add Compiler/Clang-ASM.cmake to
enable use of Clang for ASM too.  Also teach Assembler test to try Clang
as an assembler.

Suggested-by: Tobias Pape <tobiaspape@gmail.com>
2012-08-15 09:40:20 -04:00
Rolf Eike Beer 48783b71fb CheckTypeSize: show in documentation how to get struct member size (#10579) 2012-08-14 21:14:33 +02:00
Rolf Eike Beer 97c338bac9 FindX11: remove duplicates from X11 include path list (#13316)
Most if not all X11 includes are typically in the same directory, so this
usually returns a huge list with only very few different entries.
2012-08-14 21:13:44 +02:00
Rolf Eike Beer cfe4ac4b41 use PATH_SUFFIXES to simplify find_* calls
Especially remove "lib64" when the given paths are all Unix ones and "lib" is
also explicitely given. In that case CMake will search "lib64" anyway for
platforms where it is known to make sense.
2012-08-14 21:03:23 +02:00
Rolf Eike Beer b04650e163 use the find_* functions ENV parameter
Instead of directly passing $ENV{SOMEVAR} to a find_* call pass in ENV SOMEVAR.
This will make sure the paths will get correctly handled through different
platforms, especially on Windows.

Also fixes one place where paths with windows delimiters (\) were hardcoded to
use forward slashes.
2012-08-14 21:02:58 +02:00
Brad King ea5bfb1d25 Add FindHg module to find Mercurial
Also teach the CMakeOnly.AllFindModules to verify Hg version detection.
2012-08-14 10:41:17 -04:00
Brad King d269984e53 GetPrerequisites: Mark file_cmd as advanced cache entry
This internal implementation detail should not pollute the main
cache view of projects that include GetPrerequisites.
2012-08-14 09:02:08 -04:00
Brad King 6c2c483ef9 Remove trailing TAB from NSIS.template.in
This was missed by commit 7bbaa428 (Remove trailing whitespace from most
CMake and C/C++ code, 2012-08-13) which only removed trailing spaces,
not TABs.
2012-08-14 08:05:41 -04:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King be9db98946 Merge topic 'watcom-compiler-version'
af42ae4 Watcom: Simplify compiler version detection (#11866)
2012-08-13 14:18:28 -04:00
David Cole e0f7d7fe5a Merge topic 'CPackRPM-fixRelocatablePrefix'
822c1ea Do not include directories which are part of the package install prefix.
2012-08-13 13:28:36 -04:00
David Cole 1f793ab6ba Merge topic 'fix-typo-13456'
67f11cf FindSelfPackers: fix typo (#13456)
2012-08-13 13:28:25 -04:00
David Cole 396bc28477 Merge topic 'doc_fixes'
76d6c59 Clean up documentation formatting so that it is rendered properly in HTML.
2012-08-13 13:28:16 -04:00
David Cole 0d28661999 Merge topic 'select-compiler'
7e58e5b Prefer generic system compilers by default for C, C++, and Fortran
796e337 Factor common code out of CMakeDetermine(ASM|C|CXX|Fortran)Compiler
b708f1a CMakeDetermine(C|CXX)Compiler: Consider Clang compilers
2012-08-13 13:27:57 -04:00
David Cole 4bdbdfbfef Merge topic 'directory-typo'
6c8722f Fix typo direcotry -> directory (and similar) [#13444]
2012-08-13 13:27:48 -04:00
David Cole 92b11383d9 Merge topic 'SelectLibraryConfiguration-multi-lib-per-var2'
5797512 SelectLibraryConfiguration: generate correct output when input vars are lists
2012-08-13 13:27:39 -04:00
David Cole 11a9ea35de Merge topic 'FindOpenSSL-improve'
3cfb68d FindOpenSSL: remove leftover comment
fc798ed FindOpenSSL: cleanup path hints
c78a7d1 FindOpenSSL: let CMake handle environment variable HINTS
7464519 FindOpenSSL: use SelectLibraryConfigurations
4b793ad FindOpenSSL: find cross-compiled OpenSSL from MinGW (#13431)
2012-08-13 13:27:31 -04:00
David Cole 1b9684562b Merge topic 'EclipseAddSupportForJuno'
53cc102 Eclipse: improve (fix ?) version detection on OSX
bcccddc Eclipse: add support for the 4.2 Juno release (#13367)
2012-08-13 13:27:07 -04:00
David Cole 85f843a7b4 Merge topic 'mixed-lib-to-lib64'
af80da3 remove lib64 Unix paths if the respective lib path is also given
733726e find_library: Fix mixed lib->lib64 (non-)conversion cases (#13419)
54add62 find_library: Simplify lib->lib<arch> expansion
6ca2f82 find_library: Refactor lib->lib64 conversion
1fe4b82 find_library: Add test covering lib->lib64 cases
2012-08-13 13:26:57 -04:00
Brad King af42ae4f81 Watcom: Simplify compiler version detection (#11866)
Since commit c198730b (Detect Watcom compiler version with its id,
2011-12-07) the CMAKE_(C|CXX)_COMPILER_VERSION variables are set for the
Watcom compiler.  Use these in Windows-wcl386.cmake to set the old
WATCOM1* version variables.  This avoids using the old EXECUTE_PROCESS
command which failed due to extra quotes anyway.
2012-08-13 08:19:23 -04:00
Andy Piper 822c1eaf9e Do not include directories which are part of the package install prefix.
This fix bug #0013451. The bug prevents theorerically relocatable RPM package
to be installed properly.
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2012-08-07 19:15:19 +02:00
Rolf Eike Beer 67f11cf1e9 FindSelfPackers: fix typo (#13456)
Correction by Modestas Vainius.
2012-08-04 14:44:38 +02:00
Zack Galbreath 76d6c59358 Clean up documentation formatting so that it is rendered properly in HTML. 2012-08-03 14:52:32 -04:00
Brad King 7e58e5bb68 Prefer generic system compilers by default for C, C++, and Fortran
Teach CMake to prefer the system default compiler automatically when no
compiler is specified.  By default use "cc" for C, "CC" for C++, and
"f95" for Fortran.  Load a new Platform/<os>-<lang>.cmake module to
allow each platform to specify for each language its system compiler
name(s) and/or exclude certain names.

Create Platform/(CYGWIN|Darwin|Linux|Windows)-CXX.cmake modules to
specify "c++" as the system C++ compiler name for these platforms.  On
systems that use case-insensitive filesystems exclude C++ compiler names
that are distinguished from C compiler names only by case.

This will change the default compiler selection for existing build
scripts that do not specify a compiler when run on machines with
separate system and GNU compilers both installed in the PATH.  We do not
make this change in default behavior lightly.  However:

(1) If a given build really needs specific compilers one should specify
    them explicitly e.g. by setting CC, CXX, and FC in the environment.

(2) The motivating case is to prefer the system Clang on newer OS X
    systems over the older GNU compilers typically also installed.  On
    such systems the names "cc" and "c++" link to Clang.  This is the
    first platform known to CMake on which "c++" is not a GNU compiler.
    The old behavior selected "gcc" for C and "c++" C++ and therefore
    chooses GNU for C and Clang for C++ by default.  The new behavior
    selects GNU or Clang consistently for both languages on older or
    newer OS X systems, respectively.

(3) Other than the motivating OS X case the conditions under which the
    behavior changes do not tend to exist in default OS installations.
    They typically occur only on non-GNU systems with manually-installed
    GNU compilers.

(4) The consequences of the new behavior are not dire.  At worst the
    project fails to compile with the system compiler when it previously
    worked with the non-system GNU compiler.  Such failure is easy to
    work around (see #1).

In short this change creates a more sensible default behavior everywhere
and fixes poor default behavior on a widely-used platform at the cost of
a modest change in behavior in less-common conditions.
2012-08-02 13:26:01 -04:00
Brad King 796e33734d Factor common code out of CMakeDetermine(ASM|C|CXX|Fortran)Compiler
The compiler candidate list selection and search code for C, C++, ASM,
and Fortran languages was duplicated across four modules.  To look for
compilers adjacent to already-enabled languages the C and CXX modules
each used _CMAKE_USER_(C|CXX)_COMPILER_PATH and the ASM module used
_CMAKE_TOOLCHAIN_LOCATION.  Since commit 4debb7ac (Bias Fortran compiler
search with C/C++ compilers, 2009-09-09) CMake prefers Fortran compilers
matching the vendor and directory of an enabled C or C++ compiler.

Factor out the common functionality among the four languages into a new
CMakeDetermineCompiler module.  Generalize the Fortran implementation so
that all languages may each use the vendor and directory of the other
languages that have already been enabled.  For now do not list any
vendor-specific names for C, C++, or ASM so that only the directory
preference is used for these languages (existing behavior).
2012-08-02 11:33:18 -04:00
Brad King b708f1a2b9 CMakeDetermine(C|CXX)Compiler: Consider Clang compilers
Look for "clang" or "clang++" compiler executables so Clang will be used
when it is the only compiler available.  Prefer them last to avoid
changing compiler default preferences for existing scripts.
2012-07-31 14:30:30 -04:00
Rolf Eike Beer 6c8722fab5 Fix typo direcotry -> directory (and similar) [#13444] 2012-07-30 08:08:33 +02:00
Rolf Eike Beer 5797512cec SelectLibraryConfiguration: generate correct output when input vars are lists
In case that any of the input variables that hold the library names contains
more than just a single library the "debug" or "optimized" keywords were only
prepended to the first item, making all other libs appear in all
configurations. Just treat both input variables as lists.

Thanks to Philipp Berger <newsletters@philippberger.de> for pointing me at
this.
2012-07-29 17:45:53 +02:00
Rolf Eike Beer 3cfb68d93e FindOpenSSL: remove leftover comment 2012-07-29 17:03:36 +02:00
Rolf Eike Beer fc798ed64f FindOpenSSL: cleanup path hints
-only use Windows-specific paths on Windows
-recode the contents of $ENV{PROGRAMFILES} to be a valid CMake path before
 using it
2012-07-29 17:02:00 +02:00
Rolf Eike Beer c78a7d11dd FindOpenSSL: let CMake handle environment variable HINTS
This will automatically make sure the paths will get recoded to proper separators on Windows
2012-07-29 16:53:39 +02:00
Rolf Eike Beer 7464519304 FindOpenSSL: use SelectLibraryConfigurations 2012-07-29 16:53:39 +02:00
Rolf Eike Beer 4b793ad196 FindOpenSSL: find cross-compiled OpenSSL from MinGW (#13431)
Suggested-by: Dominik Schmidt <dev@dominik-schmidt.de>
2012-07-29 16:53:39 +02:00
Alex Neundorf 53cc1026bc Eclipse: improve (fix ?) version detection on OSX
This is probably related to a framework installation I guess.
This is part of the patch in #13367 from Nicholas Yue.

Alex
2012-07-28 11:58:04 +02:00
Alex Neundorf bcccddc7e9 Eclipse: add support for the 4.2 Juno release (#13367)
Thanks for the path to Nicholas Yue.

Alex
2012-07-28 11:40:08 +02:00
Rolf Eike Beer af80da349b remove lib64 Unix paths if the respective lib path is also given
If FIND_LIBRARY_USE_LIB64_PATHS is set both will be searched anyway.
2012-07-21 10:15:52 +02:00
Alexey Ozeritsky 79a4e2bbdd Fixed: FindLAPACK does not find MKL 10.3 when using gcc 4.x 2012-07-18 11:17:45 +04:00
David Cole 58f5e77d6a Merge topic 'ninja-rspfile-link-libraries'
4bb94c9 Ninja: sysconf() is declared in unistd.h
bb36759 Ninja: enable response file support on Mac (length 262144)
3a2c8e8 Ninja: disable work around when linking with mingw
3856e66 Ninja: error on missing rspfile_content
8c1e35c Ninja: remove some unused default arguments
7f647cf Ninja: also write link libraries to rsp file
2012-07-12 16:00:42 -04:00
David Cole b1f6e688eb Merge topic 'aix-gnu-asm'
7755283 Add ASM platform information for GNU compiler on AIX (#13390)
2012-07-12 16:00:31 -04:00
David Cole 457041e5b3 Merge topic 'aix-GNU-shared-libs'
767a7ad AIX-GNU: Link shared libs with -brtl,-bnoipath (#13352)
2012-07-12 16:00:05 -04:00
David Cole 4b39302407 Merge topic 'deploy-qt4-workaround-bug-13258'
374b9b9 DeployQt4: workaround bug 13258 where ARGV1 is leaked into a sub function.
2012-07-12 15:59:43 -04:00
Peter Kümmel 3a2c8e8e66 Ninja: disable work around when linking with mingw
The work around is only needed by older GCCs (only testet 4.4/4.7)
Ninja is very new so chances are high that there is also a new mingw.

Use slashes in link rsp file, because ar.exe can't handle \.
2012-07-11 08:55:00 +02:00
Brad King 7755283e89 Add ASM platform information for GNU compiler on AIX (#13390)
Among other flags this sets RPATH flags correctly so that CMake knows
how to treat CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH for the ASM language.
This is the GNU compiler equivalent to commit a0bab7ae (Add ASM platform
information for XL compiler on AIX, 2011-03-02), made for XL.
2012-07-10 15:18:55 -04:00
Brad King 767a7ad9da AIX-GNU: Link shared libs with -brtl,-bnoipath (#13352)
We already use these flags with the XL toolchain.  Use them for GNU too.
2012-07-09 17:18:41 -04:00
David Cole cdc00f0f7e Merge topic 'getprerequisites-pie-executables'
ac7a193 GetPrerequisites.cmake: detect executables built with the -pie linker flag.
2012-07-09 14:23:38 -04:00
David Cole b636728e39 Merge topic 'CPack-honorCPACK_XXX-valuesInScriptFile'
05a8630 Do not provide defaul value for CPACK_PACKAGE_DIRECTORY if found in config.
2012-07-09 14:23:28 -04:00
David Cole 6d75da5f38 Merge topic 'FindBoostNotFoundBug'
ca90709 FindBoost: Future proof to 1.56
accd042 FindBoost: Fix bug where Boost_FOUND could be false when version specified
2012-07-09 14:23:09 -04:00
David Cole 88c31c9017 Merge topic 'EclipseFixIncludeDirDetectionMinGW'
d7bc8dd Eclipse: fix #13313, always set LANG to C, also if unset
2012-07-09 14:22:20 -04:00
Clinton Stimpson 374b9b9e74 DeployQt4: workaround bug 13258 where ARGV1 is leaked into a sub function. 2012-07-09 10:18:45 -06:00
Clinton Stimpson ac7a193951 GetPrerequisites.cmake: detect executables built with the -pie linker flag. 2012-07-05 12:49:40 -06:00
Eric NOULARD 05a8630ee6 Do not provide defaul value for CPACK_PACKAGE_DIRECTORY if found in config.
This fixes bug #0012906.
2012-07-04 23:08:32 +02:00
Philip Lowman ca90709fd6 FindBoost: Future proof to 1.56 2012-06-30 03:40:37 -04:00
Philip Lowman accd0428f4 FindBoost: Fix bug where Boost_FOUND could be false when version specified
Fixes a problem where when specifying a version number without the REQUIRED
parameter, Boost_FOUND would be true on the first configure but false on
subsequent configures.
2012-06-30 03:33:56 -04:00
Alex Neundorf d7bc8dd6ea Eclipse: fix #13313, always set LANG to C, also if unset
Otherwise include dir detection does not work with MinGW on french systems.

Alex
2012-06-25 23:09:27 +02:00
Rolf Eike Beer 304562e7b5 FindJava: improve version matching (#12878) 2012-06-25 18:53:53 +02:00
David Cole 4042b50caa Merge topic 'CMakeDetermineCCompiler-clear-init'
b9ccaf5 CMakeDetermineCCompiler: Fix typo "_CXX_" -> "_C_" (#13330)
2012-06-21 11:55:34 -04:00
David Cole fd8fc2791b Merge topic 'qt4-macros'
0331a5a Qt4Macros: add some quotes to prevent damage from spaces in the paths
f46903b Qt4Macros: improve basename extraction in QT4_ADD_DBUS_INTERFACES
aa841ae FindQt4: extend documentation
2012-06-21 11:55:24 -04:00
David Cole 14576fc096 Merge topic 'find-devil-doc-formatting'
af988e8 FindDevIL: clean up documentation formatting
2012-06-21 11:54:25 -04:00
David Cole 3948cb4fe4 Merge topic 'use-string-to-cmake-path'
3505e68 replace open coded versions of file(TO_CMAKE_PATH)
2012-06-21 11:54:14 -04:00
David Cole 934f553f85 Merge topic 'no-explicit-usr-search'
e93ac6f do not explicitely specify /usr and /usr/local as search paths
2012-06-21 11:54:02 -04:00
Brad King b9ccaf5f79 CMakeDetermineCCompiler: Fix typo "_CXX_" -> "_C_" (#13330)
Initialize CMAKE_C_COMPILER_INIT before using it, rather than
CMAKE_CXX_COMPILER_INIT.
2012-06-20 15:38:53 -04:00
Rolf Eike Beer 0331a5adde Qt4Macros: add some quotes to prevent damage from spaces in the paths 2012-06-20 18:31:38 +02:00
Rolf Eike Beer f46903b4b2 Qt4Macros: improve basename extraction in QT4_ADD_DBUS_INTERFACES
-convert the filename to lowercase before the extraction, this allows this to
 work even if the filename as uppercase ".XML" extension
-use get_filename_component(... NAME) to strip the path
2012-06-20 18:31:37 +02:00
Rolf Eike Beer aa841ae3f3 FindQt4: extend documentation
-refer to AUTOMOC from QT4_AUTOMOC
-mention how source file properties influence QT4_ADD_DBUS_INTERFACE
2012-06-20 18:31:37 +02:00
Rolf Eike Beer af988e868c FindDevIL: clean up documentation formatting 2012-06-19 21:09:42 +02:00
Rolf Eike Beer 3505e68466 replace open coded versions of file(TO_CMAKE_PATH) 2012-06-19 21:08:44 +02:00
Rolf Eike Beer e93ac6fbfe do not explicitely specify /usr and /usr/local as search paths
If not explicitely excluded these paths are searched automatically anyway.
2012-06-19 21:06:27 +02:00
Rolf Eike Beer 188b96b100 fix some typos 2012-06-19 21:05:14 +02:00
David Cole 3f8c9073f9 Merge topic 'CPackDeb-docUpdate'
5ac6ca0 CPackDeb add missing documentation for some CPACK_DEBIAN_xx variables.
2012-06-19 14:43:20 -04:00
David Cole d3a61d1e0f Merge topic 'FindBullet-LinearMath_Debug'
4393b3b FindBullet: Add missing math library name (#13309)
2012-06-19 14:42:51 -04:00
David Cole 565744bd3d Merge topic 'ninja-cldeps'
eb410e8 Ninja: disable cldeps for bcc32, it's too old, and ninja would also not build
5ead31d Ninja: try work around for bcc32 bug
1333b57 Ninja: build server fixes
9081e3a remove warning about unused parameter
f430bea Ninja: maybe this fixes the bcc32 build
f2c1288 Ninja: msvc6 for-scoping
44b9bbc Ninja: build with old msvc versions
57156a5 Ninja: build server fixes
f1abdce Ninja: some bytes of the rc files couldn't be piped correctly
2de963d Ninja: don't remove space between command and parameters
50b6f33 Ninja: build cmcldeps with mingw
c05653e Ninja: try to make GetProcessId visible
ab245ff Ninja: but cl supports /nologo ...
bf58e9a Ninja: no /nologo option in old rc.exe
2fb07fc Ninja: Eclipse and KDevelop fixes for ninja
518c065 Ninja: don't pollute build dir with preprocessed rc files
...
2012-06-19 14:42:41 -04:00
Eric NOULARD 5ac6ca083f CPackDeb add missing documentation for some CPACK_DEBIAN_xx variables.
Inspired-By: Doug Linden <linderd@iinet.net.au>
2012-06-19 14:32:16 -04:00
James Bigler a20c41d032 Replace -g3 with -g for CUDA 4.1 and 4.2 in addition to CUDA < 3.0.
CUDA 4.1 reintroduced the bug where -g3 breaks compilation.  This
wasn't fixed until CUDA 5.0, so both CUDA 4.1 and 4.2 have this bug.
2012-06-19 10:04:51 -06:00
Jonathan Klein 4393b3bb43 FindBullet: Add missing math library name (#13309)
Add "LinearMath_Debug" to the list of names to search for
BULLET_MATH_LIBRARY_DEBUG.  The _Debug name is present in all other
lines already.  Now the script manages to find all debug&release
libraries on my system.
2012-06-18 08:29:41 -04:00
David Cole a7ae34a97f Merge topic 'RemoveASMDebugOutput'
0b343cb ASM compiler detection: remove debug output (#13270)
2012-06-14 16:28:44 -04:00
Alex Neundorf 0b343cb71e ASM compiler detection: remove debug output (#13270)
This must have been left in accidentially.

Alex
2012-06-12 22:27:34 +02:00
David Cole c95d1baa19 Merge topic 'position-independent-targets'
bd34963 Refactor generation of shared library flags
55d7aa4 Add platform variable for flags specific to shared libraries
31d7a0f Add platform variables for position independent code flags
2012-06-12 16:01:04 -04:00
David Cole c6f6929e31 Merge topic 'UseJava-13281'
5593d57 UseJava: fix find_jar() called with multiple files (#13281)
2012-06-12 16:00:49 -04:00
David Cole e21bcdc6c6 Merge topic 'FindBZip2-GnuWin32-registry'
7c912af FindBZip2: Search locations in GnuWin32 registry
2012-06-12 15:58:29 -04:00
David Cole d6483cb542 Merge topic 'FindPythonLibs-13216'
9d145b0 FindPythonLibs: honor EXACT version specification (#13216)
2012-06-12 15:58:18 -04:00
David Cole a8fa345ea2 Merge topic 'CPackRPM-emptyPerComponentREQUIRES'
7321c94 CPackRPM: avoid leakage of RPM directive from one component to another.
2012-06-12 15:58:03 -04:00
Stephen Kelly 55d7aa4c44 Add platform variable for flags specific to shared libraries
Store in CMAKE_${lang}_COMPILE_OPTIONS_DLL flags from
CMAKE_SHARED_LIBRARY_${lang}_FLAGS that are truly exclusive to shared
libraries.
2012-06-12 15:38:48 -04:00
Stephen Kelly 31d7a0f2e3 Add platform variables for position independent code flags
Store in new platform variables

  CMAKE_${lang}_COMPILE_OPTIONS_PIC
  CMAKE_${lang}_COMPILE_OPTIONS_PIE

flags for position independent code generation.

In almost all cases, this means duplication of the
CMAKE_SHARED_LIBRARY_${lang}_FLAGS for the _PIC case and using the
assumed pie equivalent for the _PIE case.  Note that the GNU compiler
has supported -fPIE since 3.4 and that there is no -fPIC on GNU for
Windows or Cygwin.

There is a possibility that the _PIE variables are not correct.
However, as there is no backwards compatibility to be concerned about
(as the POSITION_INDEPENDENT_CODE property is not used anywhere yet),
the current state suffices.
2012-06-12 15:37:53 -04:00
Peter Kuemmel 7553a3799a Ninja: fix ModuleNoticies test 2012-06-09 12:38:12 +02:00
Peter Kuemmel 8b27a94f28 Ninja: don't set cmcldeps vars to empty string when they are not defined 2012-06-09 12:10:52 +02:00
Peter Kuemmel 64c5752d93 Ninja: add copyright and description 2012-06-09 10:43:23 +02:00
Peter Kuemmel 0412e5c933 Ninja: assume cmcldeps in the same dir as cmake 2012-06-09 09:06:01 +02:00
Peter Kuemmel 941afa571c Ninja: allow spaces in source path
And make /showIncude prefix visible for all build rules
2012-06-08 22:59:18 +02:00
Peter Kuemmel 033a687acd Ninja: add wrapper for cl to extract dependencies
cmcldeps wraps cl and adds /showInclude before calling cl.
It parses the output of cl for used headers, drops system
headers and writes them to a GCC like dependency file.

cmcldeps uses ATM ninja code for process handling,
but could be ported later to SystemTools.

TODO: Why needs ninja multiple calls in the BuildDepends test?
2012-06-08 17:42:11 +02:00
Rolf Eike Beer 5593d5718e UseJava: fix find_jar() called with multiple files (#13281) 2012-06-08 17:35:32 +02:00
Brad King 7c912af2d0 FindBZip2: Search locations in GnuWin32 registry
The GnuWin32 "bzip2" installer stores in the registry key

 HKEY_LOCAL_MACHINE\SOFTWARE\GnuWin32\Bzip2

an "InstallPath" value.  Use this entry as a search location.
2012-06-05 16:01:54 -04:00
Rolf Eike Beer 9d145b0998 FindPythonLibs: honor EXACT version specification (#13216) 2012-06-05 21:00:24 +02:00
David Cole 7687d557dc Merge topic 'Ninja-EXPORT_COMPILE_COMMANDS'
3545645 Exclude the CompileCommandOutput test on WIN32.
fbaddf4 Escape the source file to be compiled if required.
db839be Make the CMAKE_EXPORT_COMPILE_COMMANDS option work with Ninja.
8778357 Add newline to the output.
2c04bc0 Move the EscapeJSON method to a sharable location.
2012-06-05 14:21:36 -04:00
David Cole 364b62747b Merge topic 'moduleLibLzma'
ee26019 Add FindLibLZMA Module
2012-06-05 14:21:18 -04:00
David Cole 9f933ffb3a Merge topic 'fix-13261-allow-variable-overrides'
8b2fb33 Mac: Add guards to CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE defaults
2012-06-05 14:21:09 -04:00
David Cole b0a8bc364d Merge topic 'qt4-phonon-backend'
ad7c80c Added conditional for the phonon backend plugin.
2012-06-05 14:20:47 -04:00
Eric NOULARD 7321c94e59 CPackRPM: avoid leakage of RPM directive from one component to another.
Fixes #0013248
Inspired-By: Sergei Golubchik
2012-06-05 10:20:43 +02:00
Stephen Kelly db839bec7d Make the CMAKE_EXPORT_COMPILE_COMMANDS option work with Ninja. 2012-06-04 23:42:37 +02:00
Mario Bensi ee26019bd4 Add FindLibLZMA Module 2012-05-31 09:10:38 -04:00
Charlie Sharpsteen 8b2fb3310b Mac: Add guards to CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE defaults
The default for `CMAKE_FIND_FRAMEWORK`, defined in `Darwin.cmake` and
`Darwin-icc.cmake`, is now guarded so that it will not override command line
arguments passed by users.

Similarly for `CMAKE_FIND_APPBUNDLE`
2012-05-31 08:10:17 -04:00
Kurtis Nusbaum ad7c80cd9f Added conditional for the phonon backend plugin.
If on APPLE, the phonon backend plugin is set to phonon_qt7. If on WIN32, the phonon backend plugin is set to phonon_ds9. I did not add any for generic UNIXes as they could have a whole host of things. A more comprehensive script would actually attempt to detect which phonon plugins were installed. However, this is a simple fix for now that will work for most people.
2012-05-29 14:56:07 -06:00
Tobias Bieniek 9ce67d3001 Qt4Macros: Added support for generated resource files
Using the QT4_ADD_RESOURCES() macro required the resource file to exist
already for dependency scanning.  This prevented the use of resource
files that are generated by cmake because it needs the file before
resolving the dependency.  This patch adds support for generated
resource files by not scanning the resource file for dependencies if it
doesn't exist yet.  The add_custom_command() to generate the resource
file should add the dependencies on the files used by the resource file.
2012-05-29 13:07:40 -04:00
David Cole 116a62c07e Merge topic 'HandleEmptySIZEOF_VOID_P'
14b213c add test for #13241: empty SIZEOF_VOIDP in write_basic_package_version_file
00ae36f write_basic_package_version_file() now works with unset CMAKE_SIZEOF_VOID_P
2012-05-24 13:39:00 -04:00
David Cole 8d83d20f2d Merge topic 'FindPythonLibs-doc-cache-vars'
c5c9af5 FindPythonLibs: Document cache variables (#13240)
2012-05-24 13:38:51 -04:00
David Cole 68d1774327 Merge topic 'ExternalProject-Ninja-superbuild'
c9097c7 ExternalProject: Fix 'make' builds with Ninja (#13159)
2012-05-24 13:38:25 -04:00
David Cole 59bdb879e8 Merge topic 'MakeDefaultInstallComponentNameConfigurable'
b71e731 -add docs for ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}
7ced073 make default install component name configurable
b6fba35 -strip trailing whitespace
2012-05-24 13:37:54 -04:00
Alex Neundorf 00ae36fdff write_basic_package_version_file() now works with unset CMAKE_SIZEOF_VOID_P
This fixes #13241.
If CMAKE_SIZEOF_VOID_P is not set, either in the installed or in the
using project, don't check for it.

Alex
2012-05-23 20:46:48 +02:00
Zack Galbreath c5c9af5a73 FindPythonLibs: Document cache variables (#13240)
Add information on how to change which install of Python is found
by CMake.
2012-05-22 14:21:00 -04:00
Matt McCormick c9097c74b6 ExternalProject: Fix 'make' builds with Ninja (#13159)
Fix the build command when Ninja is the CMake Generator, but the
external project is created for a project that does not use CMake but
does use "make".
2012-05-21 18:57:11 -04:00
David Cole 3e595b9ee5 Merge topic 'FindwxWidgets-OpenBSD'
16ee197 FindwxWidgets: Do not use -isystem on OpenBSD (#13219)
2012-05-17 14:59:28 -04:00
David Cole d6ec477b52 Merge topic 'FeatureSummaryNicerFormatting'
b1d7c4b FeatureSummary.cmake: nicer formatting
2012-05-17 14:59:07 -04:00
David Cole 8f635d0268 Merge topic 'vs11-arm-generator'
5af93bb VS11: Fix ARM architecture hint typo (#13077)
0fa3d09 VS11: Add ARM architecture generator (#13077)
2012-05-17 14:58:41 -04:00
Alex Neundorf 7ced0732e8 make default install component name configurable
Until now an unnamed component was always named "Unspecified".
Now this name is taken from the new cmake variable CMAKE_INSTALL_DEFAULT_COMPONENT_NAME,
which is initialized to "Unspecified". But it can now be set to something
project-specific, per directory

Alex
2012-05-14 22:19:12 +02:00
Anthony J. Bentley 16ee19731e FindwxWidgets: Do not use -isystem on OpenBSD (#13219)
Set wxWidgets_INCLUDE_DIRS_NO_SYSTEM on OpenBSD in addition to Apple to
prevent UsewxWidgets.cmake from using the include_directories SYSTEM
option.
2012-05-14 16:01:35 -04:00
Alex Neundorf b6fba35411 -strip trailing whitespace
Alex
2012-05-13 17:38:31 +02:00
Alex Neundorf b1d7c4b1d2 FeatureSummary.cmake: nicer formatting
Alex
2012-05-13 14:37:51 +02:00
Brad King 5af93bb987 VS11: Fix ARM architecture hint typo (#13077) 2012-05-10 07:08:09 -04:00
Minmin Gong 0fa3d09369 VS11: Add ARM architecture generator (#13077) 2012-05-09 09:12:13 -04:00
Stephen Kelly 37a28ffa36 Fix the number variable comparison when Qt is not found. 2012-05-03 17:40:04 +02:00
David Faure 1dfe15c431 Abort FindQt4.cmake if Qt 5 is found. 2012-05-03 16:47:07 +02:00
David Cole 8df7aa54f0 Merge topic 'module-no-soname'
fdb3f87 Test NO_SONAME property (#13155)
e1409ac Support building shared libraries or modules without soname (#13155)
2012-05-01 14:09:59 -04:00
David Cole d05e12bc16 Merge topic 'intel-Windows-RTC1'
dd08062 Intel: On Windows use /RTC1 instead of deprecated /GZ (#13174)
2012-05-01 14:09:44 -04:00
David Cole 99f6055fe4 Merge topic 'fix-12564-avoid-git-re-clones'
08db81e ExternalProject: Avoid repeated git clone operations (#12564)
d14c024 ExternalProject: Refactor repeated code into function (#12564)
987c017 ExternalProject: Avoid unnecessary git clones (#12564)
2012-05-01 14:09:34 -04:00
David Cole 203be17fd0 Merge topic 'more-Intel-warnings'
f621ead Check{C,CXX}CompilerFlag: catch more Intel warning types (#12576)
2012-05-01 14:09:03 -04:00
Modestas Vainius e1409ac59b Support building shared libraries or modules without soname (#13155)
Add a boolean target property NO_SONAME which may be used to disable
soname for the specified shared library or module even if the platform
supports it.  This property should be useful for private shared
libraries or various plugins which live in private directories and have
not been designed to be found or loaded globally.

Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and
hard-coded -install_name flags with a conditional <SONAME_FLAG> which is
expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG
definition as long as soname supports is enabled for the target in
question.  Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in
rules in case third party projects still use it.  Such projects would
not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be
expanded.  Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well.  Since
-install_name is soname on OS X, this should not be a problem if this
variable is expanded only if soname is enabled.

The Ninja generator performs rule variable substitution only once
globally per rule to put its own placeholders.  Final substitution is
performed by ninja at build time.  Therefore we cannot conditionally
replace the soname placeholders on a per-target basis.  Rather than
omitting $SONAME from rules.ninja, simply do not write its contents for
targets which have NO_SONAME.  Since 3 variables are affected by
NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if
soname is enabled.
2012-04-30 11:50:27 -04:00
Brad King dd08062ac2 Intel: On Windows use /RTC1 instead of deprecated /GZ (#13174) 2012-04-30 08:29:47 -04:00
David Cole 08db81e008 ExternalProject: Avoid repeated git clone operations (#12564)
By tracking a stamp file within the git clone script itself.

Avoids a 2nd git clone operation after switching from Debug
to Release builds in Visual Studio, or vice-versa.
2012-04-28 15:02:17 -04:00
David Cole d14c02434a ExternalProject: Refactor repeated code into function (#12564)
Add "private/internal-use-only" function _ep_get_step_stampfile
to get the name of the stamp file for a given step.

The functionality provided by this commit should be identical
to its parent commit.
2012-04-28 14:54:04 -04:00
Rolf Eike Beer f621ead8b7 Check{C,CXX}CompilerFlag: catch more Intel warning types (#12576)
Patch provided by Szilárd Páll.
2012-04-27 00:52:55 +02:00
David Cole 987c017f6b ExternalProject: Avoid unnecessary git clones (#12564)
In the case of git, only track the repository in the
repository info dependency tracking file. Not the tag.

The download step should only re-run if the repository changes.
The download step should NOT re-run if the tag changes.

The update step is an 'always' re-running step, and so should
already re-run, unless it's been eliminated by use of

  UPDATE_COMMAND ""
2012-04-25 17:30:18 -04:00
David Cole 8bb46ee787 Merge topic 'intel-Windows-EHsc'
4f80896 Intel: On Windows use /EHsc instead of deprecated /GX (#13163)
2012-04-25 14:07:00 -04:00
David Cole 419f561b2f Merge topic 'fix-9946-uninstall-before-install'
fe58b67 Added CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL
2012-04-25 14:06:29 -04:00
David Cole 4b4a98d722 Merge topic 'fix-ExternalProject-COMMAND-niggly'
64818c1 ExternalProject: Add missing COMMAND keyword
2012-04-25 14:06:10 -04:00
David Cole d2230cdb5e Merge topic 'fix-13085-add-nsis-preinstall-hook'
aa8acea CPack/NSIS: Add CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS (#13085)
2012-04-25 14:05:52 -04:00
David Cole 44e2bdc7a5 Merge topic 'CPack-fixManPage-typo'
94b24ad Fix CPack RPM man page typo detected by lintian.
2012-04-25 14:05:19 -04:00
David Cole 82c579de45 Merge topic 'fix-usejava-typo-13135'
8bdd449 UseJava: fix typo in variable name (#13135)
2012-04-25 14:02:32 -04:00
David Cole 65a4926326 Merge topic 'fix-pkgconfig-13125'
3ea850a FindPkgConfig.cmake: fix documented output variable not set (#13125,#13132)
2012-04-25 14:01:51 -04:00
David Cole 14be8dd264 Merge topic 'dev/fix-python3-findmodule'
4bdec58 Search for other ABIFLAGS builds of Python
6a46f5c Don't put legacy variables back into the cache
2012-04-25 14:00:41 -04:00
Brad King 4f80896e6c Intel: On Windows use /EHsc instead of deprecated /GX (#13163)
Use of the deprecated option with Intel 2011 produces

 icl: command line remark #10010: option '/GX' is deprecated and will
 be removed in a future release. See '/help deprecated'

so use its replacement option which has been supported for several
older versions anyway.
2012-04-24 09:00:37 -04:00
Patrick Gansterer fe58b67e24 Added CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL
If CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL is set to ON the NSIS installer will look for a previous installed version and ask the user about uninstall.
2012-04-22 11:30:34 -04:00
David Cole 64818c1077 ExternalProject: Add missing COMMAND keyword
Commit f67139ae added running a verify script in between running
the download and extract scripts. Since then, it has always been
missing the COMMAND keyword added in this commit.

It worked anyway (semi-accidentally) by running a command line like:

  cmake -P script1.cmake cmake -P script2.cmake

CMake, when running -P scripts on the command line, runs them in order,
and apparently ignores spurious arguments in between (the middle "cmake"
in the above example) and so, all appeared to work as intended.

This commit adds the missing keyword and the commands that run are
now two separate sequential cmake invocations like:

  cmake -P script1.cmake
  cmake -P script2.cmake

...which was the original intent of commit f67139ae
2012-04-22 09:10:01 -04:00
David Cole aa8acea398 CPack/NSIS: Add CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS (#13085)
Allows custom NSIS commands to run prior to any installation
actions. Projects that need to run an uninstaller first,
especially one from a non-NSIS previous revision of a project
that is NOW using CPack and NSIS, may do so by putting custom
NSIS commands into this variable.

Inspired-by: David Golub
2012-04-21 11:36:25 -04:00
Modestas Vainius 94b24ad88d Fix CPack RPM man page typo detected by lintian.
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2012-04-20 20:41:18 +02:00
Rolf Eike Beer 8bdd44958b UseJava: fix typo in variable name (#13135)
As Dave Abrahams pointed out CMAKE_CURRENT_SOURCE_PATH is wrong, it's of
course CMAKE_CURRENT_SOURCE_DIR.

Also wrap the path in quotes so the example would even work if the source path
has spaces.
2012-04-16 22:41:49 +02:00
Rolf Eike Beer 3ea850a502 FindPkgConfig.cmake: fix documented output variable not set (#13125,#13132)
The real fix is from Yury G. Kudryashov while I added the surrounding cleanups.
An additional hint to really get this fixed came from Rex Dieter.
2012-04-15 08:39:51 +02:00
David Cole 194545643a Merge topic 'check_include_files_output'
5adb6b7 CheckIncludeFiles: Shorten check description message
2012-04-10 15:19:51 -04:00
David Cole 23dcf6ecd0 Merge topic 'new-boost-versions'
63d4960 FindBoost: add support for 1.49 and 1.50
2012-04-10 15:19:42 -04:00
David Cole 104f7cc00a Merge topic 'osx-search-paths'
6190415 OS X: Mark find_program results as advanced
d9edf46 OS X: Use correct extra path when searching for applicaton bundles (#13066)
98b9a7f OS X: Use OSX_DEVELOPER_ROOT for app search path (#13066)
2012-04-10 15:19:31 -04:00
David Cole 082fba0662 Merge topic 'CPackNSIS-smallDocTypoFix'
fcf265f CPackNSIS: Rewrite variable documentation to make it more readable.
8fe0da5 Fix some doc typo and add an undocumented var.
2012-04-10 15:19:22 -04:00
Brad King 5adb6b7a34 CheckIncludeFiles: Shorten check description message
Since commit 44d007b6 (CheckIncludeFiles: fix status output, 2012-02-01)
check_include_files reports the list of files tested instead of the name
of the variable storing the result.  Some projects incrementally test
and concatenate very long lists leading to long messages that do not
provide much information.  Users report confusion especially when the
lines wrap.

For lists of more than two files produce messages of the format

 Looing for N include files first.h, ..., last.h

where N is the list length and "..." is literal.  Leave the log file
entries and cache entry description unchanged as they should have the
full detail of the check performed.
2012-04-09 15:57:02 -04:00
Rolf Eike Beer 63d4960aef FindBoost: add support for 1.49 and 1.50
Boost 1.49 has already be released. Add this and the next to come version
number to the search list.
2012-04-07 10:21:02 +02:00
David Cole 6190415436 OS X: Mark find_program results as advanced
Avoid cluttering the gui with variables nearly nobody needs
to see.
2012-04-06 11:15:39 -04:00
David Cole d9edf46760 OS X: Use correct extra path when searching for applicaton bundles (#13066)
The parent commit added a search path relative to OSX_DEVELOPER_ROOT.
But with Xcode 4.3 the nested Applications folder is in a different
relative location compared to that root. This commit makes the intent
of the previous commit work with older and newer Xcode directory layouts.

Furthermore, it only adds paths that exist to the search path.
2012-04-06 11:14:37 -04:00
David Cole fcf265fe1a CPackNSIS: Rewrite variable documentation to make it more readable.
And avoid parsing problems at the first "."
2012-04-05 16:13:24 -04:00
David Cole ff575b229d Merge topic 'dev/granular-test-targets-ninja'
d5318e0 Create granular targets for Ninja generators too
2012-04-03 15:59:02 -04:00
David Cole a6100082b9 Merge topic 'CPackPM-fixAmazonLinux'
3a0c60d Override topdir from rpm command line seems necessary on Amazon linux.
2012-04-03 15:58:33 -04:00
Ben Boeckel d5318e00cb Create granular targets for Ninja generators too 2012-03-29 13:46:15 -04:00
Ben Boeckel 4bdec581b3 Search for other ABIFLAGS builds of Python
Starting with Python3, standard Python installs may have additional ABI
flags attached to include directories and library names. As of 3.2, the
following flags are in the configure file:

    d -> --with-debug
    m -> --with-pymalloc
    u -> --with-wide-unicode

Python 3.3 seems to no longer have --with-wide-unicode. Hopefully Python
will ensure that the possible flags always show up in a stable order.
The 'd' flag is ignored since the debug library is considered separate.

There is still the problem where ABI flags cannot be specified in
find_package since the letters confuse the version comparator.
2012-03-27 16:37:50 -04:00
Ben Boeckel 6a46f5ce80 Don't put legacy variables back into the cache
If PYTHON_INCLUDE_PATH is put into the cache, then it will always
override whatever might be found and PYTHON_INCLUDE_DIR is never given a
chance to find something different. It being marked as INTERNAL also
means that it cannot be changed without editing CMakeCache.txt directly.

Basically, the scenario is that if the Python version is changed, then
deleting PYTHON_INCLUDE_DIR doesn't work because any cached
PYTHON_INCLUDE_PATH variable is set before find_path is even called. Any
build tree using a previous version will still need either manual
removal of PYTHON_INCLUDE_PATH or a complete reconfigure, but in the
future changing the Python version can be accomplished by deleting
PYTHON_INCLUDE_DIR and reconfiguring with the new version.
2012-03-27 16:21:06 -04:00
David Cole a3b7caaf5f Merge topic 'AutomocProperCMakeEscaping_13018'
9b32475 automoc: add define to test which caused bug #13018
2066511 automoc: fix #13018, proper cmake escaping to avoid false rebuilds
c652812 make cmLocalGenerator::EscapeForCMake() static
2012-03-27 15:56:31 -04:00
David Cole ef309e94cb Merge topic 'ninja-generator'
6b5614f Ninja: Substitute <OBJECT> and <CMAKE_C_COMPILER> in depfile flags
2012-03-27 15:56:13 -04:00
Tom Hughes 3a0c60d3bf Override topdir from rpm command line seems necessary on Amazon linux.
This modification should be harmless on other distro.
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2012-03-27 21:43:35 +02:00
Eric NOULARD 8fe0da5981 Fix some doc typo and add an undocumented var. 2012-03-27 07:55:02 +02:00
Alex Neundorf 2066511ca9 automoc: fix #13018, proper cmake escaping to avoid false rebuilds
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
2012-03-26 21:45:27 +02:00
Kashif Rasul 98b9a7f6ff OS X: Use OSX_DEVELOPER_ROOT for app search path (#13066)
Since commit 4693cf84 (Xcode: Detect new default locations of Xcode 4.3
bits and pieces) Darwin.cmake detects the developer application
directory instead of hard-coding /Developer.  Replace the hard-coded
path in CMAKE_SYSTEM_APPBUNDLE_PATH using the computed result.
2012-03-26 09:28:56 -04:00
Peter Collingbourne 6b5614f164 Ninja: Substitute <OBJECT> and <CMAKE_C_COMPILER> in depfile flags
Patch by Amine Khaldi!

Also, start using the -MT flag to set a target name for depfiles.
This works around a bug observed in distcc, as explained in the
comment.  Based on a patch by Alexander Usov.
2012-03-26 04:46:12 +01:00
David Cole a407291c5d Merge topic 'MinorFixForEcos'
1ab4b3e guard eCos.cmake against multiple inclusion (#12987)
2012-03-21 13:28:09 -04:00
David Cole 44495fa78c Merge topic 'UseRealPathWhenFindingEclipse'
00af40b Eclipse: fix #13036, make version detection work with symlinks
2012-03-21 13:27:58 -04:00
David Cole f8a10245e3 Merge topic 'findmpi_look_in_implicit_dirs'
2f9ad7c Fix FindMPI for the intel compiler on linux by looking in implict directories.
2012-03-21 13:27:22 -04:00
David Cole 349ea3f6e6 Merge topic 'ImprovedCOMPONENTSSupportInFindPackage2'
6d100f9 find_package: Test rejection of required+optional components
d81d83c add macro check_required_components() to configure_package_config_file()
b15c0b4 FPHSA(): add HANDLE_COMPONENTS option
34108cd find_package: add documentation for OPTIONAL_COMPONENTS
cdabde8 FPHSA(): add missing "]" to documentation
f2e0a18 find_package: add OPTIONAL_COMPONENTS keyword
2012-03-21 13:26:46 -04:00
Alex Neundorf 1ab4b3e123 guard eCos.cmake against multiple inclusion (#12987)
Alex
2012-03-20 22:13:47 +01:00
Alex Neundorf 00af40b29b Eclipse: fix #13036, make version detection work with symlinks
This patch uses get_filename_component(REALPATH) so symlinks in the path
to Eclipse are resolved, which makes the version detection work in such cases.

Alex
2012-03-20 22:06:38 +01:00
Bill Hoffman 2f9ad7c6e6 Fix FindMPI for the intel compiler on linux by looking in implict directories.
Use the CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES to look for libraries
that are in the -showme output from mpi<lang> programs. This is because
some libraries reported by -showme are found there, and FindMPI will
fail if they are not found.
2012-03-20 15:18:53 -04:00
Brad King bfc8d137c5 Merge topic 'fix-12621-xcode43'
0f4dfa6 CPack: Use real path to PackageMaker to find its version file (#12621)
4693cf8 Xcode: Detect new default locations of Xcode 4.3 bits and pieces (#12621)
2012-03-19 14:41:43 -04:00
Alex Neundorf d81d83c218 add macro check_required_components() to configure_package_config_file()
As discussed on cmake-developers, this patch adds a macro
check_required_components() to the file configured via
configure_package_config_file(), so for proper handling
of components in Config.cmake files users can simply call

check_required_components(PackageName)

and this will do the right thing.

Alex
2012-03-19 10:53:36 -04:00
Alex Neundorf b15c0b418b FPHSA(): add HANDLE_COMPONENTS option
if the HANDLE_COMPONENTS is used, FPHSA() now also checks all required COMPONENTS,
i.e. all elements from <name>_FIND_COMPONENTS for which <name>_FIND_REQUIRED_<comp>
is true, and sets <name>_FOUND only to true if all have been found.
As discussed on cmake-developers.

Alex
2012-03-19 10:53:36 -04:00
Alex Neundorf 34108cd3b3 find_package: add documentation for OPTIONAL_COMPONENTS
This patch adds documentation for OPTIONAL_COMPONENTS to cmFindPackage.cxx,
and also extends Modules/readme.txt significantly with regard to how
components should be handled.

Alex
2012-03-19 10:53:36 -04:00
Alex Neundorf cdabde82c2 FPHSA(): add missing "]" to documentation
Alex
2012-03-19 10:53:36 -04:00
Brad King 572994bd9f Merge topic 'ninja-generator'
8485208 Ninja: shell escape $(CMAKE_SOURCE_DIR) and $(CMAKE_BINARY_DIR)
df84767 Ninja: add support for OBJECT_OUTPUTS, fix PrecompiledHeader test case
48eb7fc Ninja: Avoid using 'this' in member initializers
bba37dd Ninja: Fix for PDB files with spaces in the path.
ac800f4 Ninja: Constify use of cmCustomCommand
9a0d5a8 Ninja: add /DEF: flag to linker call
d40eebd Ninja: Add a cache option CMAKE_ENABLE_NINJA to enable the ninja generator.
8c63433 Ninja: Add friend struct so it can access the private ConvertToNinjaPath.
dbe3dce Ninja: add .def file support
f1bb08f Ninja: ensure the output dir exists at compile time
7a6b5f4 Ninja: Remove an unnecessary variable
80ff210 Ninja: Use cmSystemTools::ExpandListArgument to split compile/link commands
d2731a3 Ninja: Add a missed license header
eabc9b0 Ninja: CMake: Adapt Ninja generator for per-target include dirs
bada88e Merge branch 'target-include-directories' into ninja-generator
54bd175 Ninja: windows msvc: create for each target a .pdb file
...
2012-03-19 09:29:06 -04:00
Brad King 6452aea231 Merge topic 'ExactVersionModeForVersionFile'
e390f87 WriteBasicConfigVersionFile: add test for ExactVersion mode
5d18223 write_basic_package_version_file: add ExactVersion mode
1c69cd8 write_basic_package_version_file(): improve documentation
2012-03-13 11:54:33 -04:00
Brad King ffdb8e2b6a Merge topic 'FindCxxTest-version-4-issue-13022'
a556137 FindCxxTest: Add support for CxxTest 4 (#13022)
2012-03-13 11:52:54 -04:00
Alex Neundorf 5d18223917 write_basic_package_version_file: add ExactVersion mode
This mode is for packages which consider themselves only compatible if
exactly the same version is requested. The tweak version is ignored.

Alex
2012-03-10 16:10:52 +01:00
Alex Neundorf 1c69cd8feb write_basic_package_version_file(): improve documentation
add notes when which mode should be used

Alex
2012-03-10 16:09:17 +01:00
David Cole 4693cf8492 Xcode: Detect new default locations of Xcode 4.3 bits and pieces (#12621)
Xcode 4.3 installs into "/Applications" by default, from the Mac App Store.

Also, the paths to the available SDKs changed: they are now within the
Xcode.app bundle.

PackageMaker is installed as a separate program, and may be installed
anywhere. It is not installed with Xcode 4.3 by default anymore.
Download the "Auxiliary Tools for Xcode" to get PackageMaker.
Put PackageMaker inside the Xcode.app bundle, in its nested Applications
folder, or put it alongside Xcode in "/Applications" and CMake will find
it.

Update references to "find" paths: add new possible locations for finding
Xcode.app and PackageMaker.app. Prefer the most recent version's locations
first, but keep the old locations as fallback search paths, too.

Thanks to all the contributors who provided and tested out various patches
for fixing this issue. Especially, but by no means limited to:
Francisco Requena Espí, Jamie Kirkpatrick and drfrogsplat.
2012-03-08 22:43:19 -05:00
David Cole 36ce6e01f8 Merge topic 'qt4-deploy'
2c601c1 DeployQt4: Add path to Qt dlls on Windows.
2012-03-08 15:14:40 -05:00
David Cole da43d8fa8d Merge topic 'MakingConfigFilesEasier_ConfigureMacro'
6973e2d wrap write_basic_config_version_file as write_basic_package_version_file()
204f5d4 add CMakePackageConfigHelpers: configure_package_config_file()
2012-03-08 15:14:12 -05:00
David Cole 9f6c38253a Merge topic 'CPackNSIS-addMissingDoc'
d4719a8 Add some missing CPACK_NSIS_xxx doc and move some to common CPack section.
2012-03-08 15:13:51 -05:00
Clinton Stimpson 2c601c100b DeployQt4: Add path to Qt dlls on Windows. 2012-03-07 11:43:27 -07:00
Alex Neundorf 6973e2d5a8 wrap write_basic_config_version_file as write_basic_package_version_file()
So the name fits better with configure_package_config_file(), as
discussed on the mailing list. Adapt the documentation accordingly.

Alex
2012-03-07 11:23:18 -05:00
Alex Neundorf 204f5d443c add CMakePackageConfigHelpers: configure_package_config_file()
The function configure_package_config_file() may be used instead of
configure_file() for generating the Config.cmake files for installation,
they help to make those files relocatable.

Alex
2012-03-07 11:23:11 -05:00
Droscy a556137608 FindCxxTest: Add support for CxxTest 4 (#13022)
In CxxTest version 4 the Perl generator has been deleted and the
Python generator is installed without the ".py" extension.
2012-03-07 07:59:45 -05:00
Eric NOULARD d4719a8d36 Add some missing CPACK_NSIS_xxx doc and move some to common CPack section. 2012-03-06 23:23:08 +01:00
David Cole 50f9db9b00 Merge topic 'skip-install-rpath'
635bf50 Add an option to skip RPATH during installation.
2012-03-06 15:27:54 -05:00
David Cole 5aa0f24350 Merge topic 'improve-findqt3'
678c24d FindQt3: fix detection of Qt3 include directory
91a1670 FindQt3: let FPHSA handle the version selection
9dae4d6 FindQt3: fix version extraction for versions with letters
2cd898d FindQt3: fix warning when Qt3 is not found
2012-03-06 15:26:31 -05:00
David Cole b22f2f18c1 Merge topic 'qt4-deploy'
4689eed reflect that the QtAutomoc depends on QtGui
ab9661c Remove QtGui dependency in Qt4Deploy test and verify QtSql existance.
52e8279 Fix for Qt4Deploy on some test machines.
672e3bb Add test for DeployQt4.cmake
4853e1e Fix plugin installation issues.
35cbf23 Ensure libs are passed to BundleUtilities.
0ac1535 Fix bad plugin paths.
a2123e8 Fix mismatched arguments.
fc6f340 Don't use QT_LIBRARIES_PLUGINS by default.
2012-03-06 15:25:02 -05:00
Stephen Kelly 635bf50c27 Add an option to skip RPATH during installation. 2012-03-05 22:24:57 +01:00
Rolf Eike Beer 678c24d230 FindQt3: fix detection of Qt3 include directory
The include directory is likely not inside ../bin
2012-03-02 18:08:37 +01:00
Rolf Eike Beer 91a1670f47 FindQt3: let FPHSA handle the version selection 2012-03-02 18:08:37 +01:00
Rolf Eike Beer 9dae4d65d7 FindQt3: fix version extraction for versions with letters 2012-03-02 18:08:37 +01:00
David Cole be0bb04be3 Merge topic 'document-missing-versions'
95f5094 document when version detection will not work
2012-03-02 11:49:08 -05:00
David Cole 0eb520f47c Merge topic 'fix-FindPackageMode-symlink'
0b86388 CMakeFindPackageMode: fix 32/64bit detection if 'file' is a symlink
2012-03-02 11:47:59 -05:00
David Cole fc495b79da Merge topic 'findpythoninterp-version-detection'
7d6db93 FindPythonInterp: rework the version detection
2012-03-02 11:47:31 -05:00
David Cole b930798042 Merge topic 'fix-findimagemagick-no-components'
518f965 FindImageMagick: fix fail if no components were given
2012-03-02 11:47:11 -05:00
David Cole 6c36bbd442 Merge topic 'CPack-fixPackageMaker-doc'
2ace342 Typo: Add missing ##end for ##module
c895062 Update CPack PackageMaker variable doc layout
2012-03-02 11:46:40 -05:00
David Cole e95a2f8f94 Merge topic 'CPack-cygwinGeneratorDoc'
98d1583 Provide template for CPack Cygwin generator specific variables.
2012-03-02 11:46:31 -05:00
David Cole c79a57b0ac Merge topic 'CPack-updateCommonDoc'
6ad0f04 Update CPackConfig template.
94a2693 Review and update CPack variable documentation.
2012-03-02 11:46:23 -05:00
David Cole 54225c0706 Merge topic 'CPack-fixCPackDMG-docLayout'
b3851f5 Fix CPack Drag and Drop generator documentation layout.
2012-03-02 11:46:09 -05:00
David Cole e4fb3e3212 Merge topic 'CPack-fixCPackBundleDocLayout'
4849e6a Fix layout of the CPack Bundle documentation
2012-03-02 11:46:00 -05:00
David Cole 4a97a2b913 Merge topic 'fix-findhspell-version'
213eb6e FindHSPELL: set HSPELL_VERSION_STRING
2012-03-02 11:45:39 -05:00
David Cole 391f4113e0 Merge topic 'improve-findopenscenegraph'
ffdaa47 FindOpenSceneGraph: give every message() with an explicit level
2012-03-02 11:45:21 -05:00
David Cole ccd502ad44 Merge topic 'improve-generateexportheader'
c28e276 GenerateExportHeader: improve compiler identification
4412fc0 GenerateExportHeader: remove unneeded code
2012-03-02 11:44:58 -05:00
David Cole d2213c5b23 Merge topic 'icc-compiler-flags'
f6ecb90 Check{C,CXX}CompilerFlag: detect ICC error messages
2012-03-02 11:44:47 -05:00
David Cole 5264292a26 Merge topic 'improve-findpythonlibs'
53d02ea FindPythonLibs: stop scanning when libraries are found
91d5a2a FindPythonLibs: put debug libraries into PYTHON_LIBRARIES
c9c1a17 FindPythonLibs: get the exact version of the found library (#3080)
f772378 FindPythonLibs: make the version selection work as for PythonInterp
bbddaee FindPython{Interp,Libs}: document Python_ADDITIONAL_VERSIONS as input
2012-03-02 11:44:37 -05:00
David Cole d284bd7843 Merge topic 'cleanup-useswig'
aca1121 UseSWIG: clean up string compares
2012-03-02 11:44:26 -05:00
David Cole fe8fbc6b48 Merge topic 'simplify-findopenmp'
0110262 FindOpenMP: simplify check for enabled languages
2012-03-02 11:44:15 -05:00
David Cole 973eba57f9 Merge topic 'fix-generate_export_header-docs'
40efa4d Fix documented function signature to match reality.
2012-03-02 11:44:05 -05:00
David Cole ad2de3a0c5 Merge topic 'add-Embarcadero-support'
bdbbf76 Recognize Embarcadero compiler (#12604)
3f78ced Rename Modules/Platform/Windows-{Borland => Embarcadero}.cmake
2012-03-02 11:43:48 -05:00
Rolf Eike Beer 2cd898d54b FindQt3: fix warning when Qt3 is not found
-- Could NOT find Qt3 (missing:  QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
CreateProcess failed QT_MOC_EXECUTABLE-NOTFOUND -v
CreateProcess failed QT_UIC_EXECUTABLE-NOTFOUND -version
2012-03-02 17:02:03 +01:00
Rolf Eike Beer 95f50940cc document when version detection will not work 2012-02-29 18:46:47 +01:00
Yury G. Kudryashov 0b8638821e CMakeFindPackageMode: fix 32/64bit detection if 'file' is a symlink 2012-02-28 12:59:01 -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
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
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 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
Rolf Eike Beer 213eb6e6a6 FindHSPELL: set HSPELL_VERSION_STRING
This variable was documented, but never set.
2012-02-25 14:52:19 +01:00
Rolf Eike Beer ffdaa4761c FindOpenSceneGraph: give every message() with an explicit level 2012-02-24 20:39:01 +01: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
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
Mike McQuaid 4853e1effd Fix plugin installation issues. 2012-02-23 21:01:45 +00: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
David Cole bada88e8e4 Merge branch 'target-include-directories' into ninja-generator 2012-02-22 16:21:48 -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
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 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 115d770b33 Merge topic 'improve-findfreetype'
f58cce0 FindFreetype: support version selection
2012-02-21 15:56:35 -05:00
David Cole 751e492840 Merge topic 'fix-typos-12975'
7ec2ebd fix the same typos as found by Debian in other places, too
d36d29f various typo and formatting fixes in manual pages (#12975)
2012-02-21 15:56:13 -05:00
David Cole 7d4074e1f8 Merge topic 'improve-findpkgconfig'
2750115 FindPkgConfig: support version selection of pkg-config itself
2012-02-21 15:56:03 -05:00
David Cole 40d2da09c5 Merge topic 'improve-findlibxslt'
70697a8 FindLibXslt: support version selection
2012-02-21 15:55:34 -05:00
David Cole 7023f610d4 Merge topic 'improve-findruby'
854e762 FindRuby: clean up querying variables from Ruby
2012-02-21 15:55:26 -05:00
David Cole d39acfa105 Merge topic 'findblas-bugs'
4585e57 FindBLAS/FindLAPACK: Work with MKL version 10.3 (#12924, #12925)
2012-02-21 15:55:11 -05:00
David Cole ee9fd3d3d3 Merge topic 'FindX11_SearchXxf86vm'
b295162 fix #6976: FindX11 also searches for X11_Xxf86vm_LIB
2012-02-21 15:54:40 -05:00
David Cole 1b1eb9740b Merge topic 'fix_fortran_dir_two_dirs'
087bea3 Allow two cmake_add_fortran_subdirectory calls in the same project.
2012-02-21 15:54:29 -05:00
David Cole e17f270b7a Merge topic 'improve-findglut'
14dadbd FindGLUT: honor REQUIRED (#12466)
2012-02-21 15:54:19 -05:00
David Cole d84233a70d Merge topic 'findperllibs-windows'
10dfec3 FindPerlLibs: properly detect libperl on Windows (#12224)
2012-02-21 15:53:50 -05:00
David Cole 27431d2886 Merge topic 'FindGetTextFixMultipleTargets'
3b48822 FindGetText: fix multiple targets with the same name problem (CMP0002)
2012-02-21 15:53:31 -05:00
Alex Neundorf 35c48e1270 Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES
Add the function cmake_expand_imported_targets() to expand imported
targets in a list of libraries into their on-disk file names for a
particular configuration.  Adapt the implementation from KDE's
HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES which has been in
use for over 2 years.  Call the function from all the Check*.cmake
macros to handle imported targets named in CMAKE_REQUIRED_LIBRARIES.

Alex
2012-02-21 15:38:15 -05:00
Alex Neundorf 628f365140 -remove trailing whitespace
Alex
2012-02-21 15:33:31 -05:00
Mike McQuaid 35cbf23c95 Ensure libs are passed to BundleUtilities. 2012-02-21 17:13:59 +00:00
Mike McQuaid 0ac15353e0 Fix bad plugin paths. 2012-02-21 17:13:09 +00:00
Mike McQuaid a2123e8f3e Fix mismatched arguments. 2012-02-21 17:12:32 +00:00
Mike McQuaid fc6f340137 Don't use QT_LIBRARIES_PLUGINS by default.
A lot of the libraries won't be found by default so will spit out
all sorts of errors. Don't kill QT_LIBRARIES_PLUGINS altogether as
it is sometimes useful.
2012-02-21 17:12:32 +00:00
Clinton Stimpson f5066217db Fix paths/hints for finding qtmain. 2012-02-20 13:02:11 -07:00
Brad King bdbbf763d6 Recognize Embarcadero compiler (#12604)
The Borland compiler was re-branded as CodeGear during 2007-2009 and
since 2009 is the Embarcadero compiler.  They offer predefined macros:

  http://docwiki.embarcadero.com/RADStudio/en/Predefined_Macros

and distinguish themselves by __CODEGEARC__ and __CODEGEARC_VERSION__.

Version 6.30 (C++Builder XE) changed the meaning of some flags:

  http://docwiki.embarcadero.com/RADStudio/en/C%2B%2B_Compiler_Option_Changes_for_XE

Teach Embarcadero compiler information files to generate build rules
with flags matching the compiler version.  Leave the flags unchanged
for old Borland versions.  Always set the BORLAND toolchain indicator
for compatibility with existing projects that test it.  Also set the
EMBARCADERO indicator for newer toolchains.
2012-02-20 10:09:44 -05:00
Eric NOULARD 4da2223ab7 Fix typo in end markup 2012-02-18 23:13:45 +01:00
Eric NOULARD cfac874b77 More documentation concerning CPack Components 2012-02-18 23:10:14 +01:00
Eric NOULARD dee0a38648 Put CPack DMG and PackageMaker doc in separate files 2012-02-18 22:33:10 +01:00
Eric NOULARD b4abcfecbe Correct copy/paste section name mistake 2012-02-18 22:31:43 +01:00
Eric NOULARD 7a8f44a2d6 Add structure documentation for CPack Bundle generator 2012-02-18 22:14:45 +01:00
Eric NOULARD b8a274c091 Add structured documentation for NSIS 2012-02-18 22:10:19 +01:00
Eric NOULARD a6bce55aef Dynamically add documentation section specified in documented script.
Modify CPackDeb and CPackRPM as an example
2012-02-18 22:07:39 +01:00
Alex Neundorf 54e1f6f5a5 GenerateExportHeader: use double quotes around _gcc_version
The GenerateExportHeaders test was failing on one machine, the version
could not be determined there, so the _gcc_version was empty,
so the first argument to if() was empty, so it complained:
http://open.cdash.org/testDetails.php?test=135623436&build=2016288
Use double quotes to turn the non-existant first argument into an empty
string.

Alex
2012-02-18 20:58:19 +01:00
Rolf Eike Beer 6f573ac9ee FindOpenMP: try the most likely flags first
Since we know which compiler we have we can test those OpenMP flags first that
are likely to be correct. This doesn't make any difference for GNU compilers,
but it should avoid useless try_compiles and output cluttering for all others.
2012-02-18 16:52:50 +01:00
Rolf Eike Beer 7ec2ebdbcf fix the same typos as found by Debian in other places, too 2012-02-18 16:13:34 +01:00
Modestas Vainius d36d29f1f0 various typo and formatting fixes in manual pages (#12975)
The patch fixes the following lintian warnings:

W: cmake-data: manpage-has-errors-from-man usr/share/man/man1/cmakemodules.1.gz 2728: warning: macro `..' not defined
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz overriden overridden
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz overriden overridden
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz explicitely explicitly
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakemodules.1.gz jave java
W: cmake-data: manpage-has-errors-from-man usr/share/man/man1/cmakeprops.1.gz 1040: warning [p 25, 3.7i]: can't break line
W: cmake: manpage-has-errors-from-man usr/share/man/man1/cmake.1.gz 4233: warning [p 85, 1.3i]: can't break line
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz overriden overridden
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz overriden overridden
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz explicitely explicitly
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz jave java
2012-02-18 16:12:45 +01:00
Rolf Eike Beer 27501155c7 FindPkgConfig: support version selection of pkg-config itself 2012-02-18 11:57:38 +01:00
Peter Kuemmel f999a59afe Ninja: don't define MSVC_IDE when using the ninja generator
Thanks to Oscar Fuentes
2012-02-18 11:24:41 +01:00
Brad King 3f78ced7c2 Rename Modules/Platform/Windows-{Borland => Embarcadero}.cmake
The Borland compiler is now the Embarcadero compiler.  Rename the shared
platform information file to reflect this.  This does not change the
interface, as old versions are still "Borland", but will allow new
versions released by Embarcadero to be supported cleanly.
2012-02-17 17:04:19 -05:00
Rolf Eike Beer f58cce031e FindFreetype: support version selection 2012-02-17 18:31:23 +01:00
Rolf Eike Beer 70697a85a0 FindLibXslt: support version selection 2012-02-17 18:17:12 +01:00
Rolf Eike Beer 854e76237c FindRuby: clean up querying variables from Ruby
Newer Ruby versions (from 1.9 onward) seem to warn if you query Config::CONFIG
and print a warning to use RbConfig instead. RbConfig seems to also work in
older versions, at least in 1.8. Use a macro to query RbConfig first and only
if that doesn't give anything fall back to Config.
2012-02-17 18:06:07 +01:00
Alexey Ozeritsky 4585e573b8 FindBLAS/FindLAPACK: Work with MKL version 10.3 (#12924, #12925) 2012-02-16 18:03:08 -05:00
Alex Neundorf b2951624dc fix #6976: FindX11 also searches for X11_Xxf86vm_LIB
This contains a change, which changes the behaviour a bit:
now X11_xf86vmode_FOUND is only set to TRUE and the include directory
is added to X11_INCLUDE_DIR, if additionally to X11_xf86vmode_INCLUDE_PATH
also X11_Xxf86vm_LIB has been found.
I hope this doesn't cause regressions somewhere.

Alex
2012-02-16 09:36:27 +01:00
Bill Hoffman 087bea35c1 Allow two cmake_add_fortran_subdirectory calls in the same project.
Configure the build_mingw.cmake.in  config_mingw.cmake.in files
into the binary directory of the directory being built, not the
top level binary directory for the project.
2012-02-15 22:42:31 -05:00
Rolf Eike Beer 14dadbde80 FindGLUT: honor REQUIRED (#12466) 2012-02-15 21:54:51 +01:00
Rolf Eike Beer 10dfec3bb6 FindPerlLibs: properly detect libperl on Windows (#12224)
This also cleans up a bunch of things on the way:
-when perl was queried for paths they were not converted to CMake style on
 Windows.
-the result when perl was queried for the perl library name was ignored since
 it was expanded with the possible paths, which is not a valid input for
 find_library(). If perl returns a library name we now will look only for this
 name and not for the default names and use the default names only when the
 executable does not give us a hint.
-get rid of 2 variables that were only used at one place and directly put the
 values in the call to find_library() and find_path().

Inspired by Jeff Trull
2012-02-14 22:18:44 +01:00
David Cole 65a7a0a17f Merge topic 'asn_java_exec'
18e8d2f java: Add CMAKE_JAVA_JAR_ENTRY_POINT optional variable.
525bb92 java: Add CMAKE_JAVA_TARGET_OUTPUT_DIR optional variable.
17a8e16 java: Factor jar output path.
2012-02-14 16:17:36 -05:00
David Cole fae411d9f6 Merge topic 'open64-compiler-flags'
9b4e4c9 Improve checks for Open64 and g++ incompatible flags (#12119)
2012-02-14 16:17:25 -05:00
David Cole 4d278e4905 Merge topic 'alsa_prefix_include_fix'
11cf52e FindALSA: Fix version detection after last commit
815485e FindALSA: Fix incorrect include path detection
2012-02-14 16:17:15 -05:00
David Cole 16447fa92f Merge topic 'sdl-fphsa'
a6de8a5 FindSDL*: use FPHSA (#12467)
2012-02-14 16:16:57 -05:00
David Cole c69a20573e Merge topic 'cmake_add_fortran_subdirectory'
1e16406 CMakeAddFortranSubdirectory: Add NO_EXTERNAL_INSTALL option
6f6891b CMakeAddFortranSubdirectory: Always parse arguments
48a09f8 CMakeAddFortranSubdirectory: Make IMPORTED targets GLOBAL
067c1f4 VSGNUFortran: Disable test in special cases
bd69e1c VSGNUFortran: Add special case for SunPro Fortran runtime library
414a780 CMakeAddFortranSubdirectory: Validate gfortran architecture
7e0d9f1 CMakeAddFortranSubdirectory: Find gfortran in PATH
d6b0312 CMakeAddFortranSubdirectory: Fix documentation format and typos
e4ae038 CMakeAddFortranSubdirectory: Allow full paths to directories
538c345 Add CMakeAddFortranSubdirectory to use MinGW gfortran in VS
3c6af5f Merge branch 'add-CheckLanguage-module' into CMakeAddFortranSubdirectory
2012-02-14 16:16:15 -05:00
David Cole d3d79c8b80 Merge topic 'qt4-translation-includes'
7a6d279 FindQt4: Add include directories for lupdate.
2012-02-14 16:16:03 -05:00
David Cole 073b39f445 Merge topic 'qt4-warning-clarification'
cbdfcc6 FindQt4: clarify warning message about incorrect Qt installation.
2012-02-14 16:15:50 -05:00
David Cole 322de4279d Merge topic 'PGI-recognise-pgfortran'
bb5f48f detect "pgfortran" as PGI Fortran compiler (#12425)
2012-02-14 16:15:38 -05:00
David Cole 885d9ea0b6 Merge topic 'findx11-xmu'
c008141 FindX11: also search for Xmu (#12447)
2012-02-14 16:15:26 -05:00
David Cole 4fd339c831 Merge topic 'add-CheckLanguage-module'
5db99e8 Add CheckLanguage module
2012-02-14 16:15:14 -05:00
David Cole 4f9c114dfa Merge topic 'ImproveCPackDoc-reloaded'
d4b77eb Avoid discovering system infos for documentation. Adding some path is enough.
9002f73 Fix non existent std::string::clear on VS6
02ccb32 Create getDocumentedModulesListInDir which may be used in other context.
24fbc28 Add missing section markup for CPackComponent
bafd8a9 Example of builtin variable documentation (i.e. only used in C++ source code).
543f1ad Make the load of script documentation more efficient and dynamic.
cdbd1a9 Fix another compiler warning due to a typo
52c53de Really avoid compiler warning about unused vars
37f90ed Calm down compiler warning about unused var
7c82b7f Fix potential bad memory access, thanks to Eike
62b589b Suppress unused var, beautify code, avoid 1 extra newline.
751713f Update bash completion file in order to handle new CPack doc options.
1629615 CPack Documentation extraction from CMake script begins to work
83e34dd Implement simple CMake script comment markup language.
c6a0169 CPack begin the implementation of --help-command* and --help-variables*
2012-02-14 16:14:56 -05:00
Eric NOULARD 24fbc28e5f Add missing section markup for CPackComponent 2012-02-14 16:05:23 -05:00
Eric NOULARD 543f1adfa4 Make the load of script documentation more efficient and dynamic.
CPack help will be searched in any CPack*.cmake file located
near to CPack.cmake file. The script files is parsed iff
the first line begin with ##section. Moreover the documentation
section name is specified on the remaining part of the line
minus the space immediately following ##section.
2012-02-14 16:05:23 -05:00
Nicolas Despres 18e8d2f0cc java: Add CMAKE_JAVA_JAR_ENTRY_POINT optional variable.
Thanks to Matthieu Carpentier.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-02-13 13:28:28 +01:00
Nicolas Despres 525bb92a3d java: Add CMAKE_JAVA_TARGET_OUTPUT_DIR optional variable.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-02-13 13:28:13 +01:00
Nicolas Despres 17a8e16cd2 java: Factor jar output path.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-02-13 13:27:48 +01:00
Alex Neundorf 3b48822803 FindGetText: fix multiple targets with the same name problem (CMP0002)
The functions in FindGettext create a custom target. If the functions
are called multiple times, multiple times the same target is created.
This works only if CMP0002 is set to OLD.
With this patch there is only one central target created, and each
invocation of the function creates a target with a unique name and
make the central target depend on this one.

Alex
2012-02-12 18:57:28 +01:00
Matthias Kretz 9b4e4c92ae Improve checks for Open64 and g++ incompatible flags (#12119) 2012-02-12 10:42:54 +01:00
Philip Lowman 11cf52ebce FindALSA: Fix version detection after last commit
Also, removed detection of header file from <PREFIX>/include.
Can't find any example in alsa source code where the library headers
were installed outside of <PREFIX>/include/alsa.
2012-02-11 20:37:48 -05:00
Philip Lowman 815485e933 FindALSA: Fix incorrect include path detection
This fixes a bug where the alsa include path was being detected
incorrectly (e.g. /usr/local/include/alsa instead of /usr/local/include)
2012-02-11 18:51:22 -05:00
Rolf Eike Beer a6de8a5882 FindSDL*: use FPHSA (#12467) 2012-02-11 17:19:00 +01:00
Brad King 1e16406dc9 CMakeAddFortranSubdirectory: Add NO_EXTERNAL_INSTALL option
We do not yet support "make install" in the external project case.
Document this explicitly in the interface.  Require the caller to use an
option to "disable" the unsupported behavior.  This will allow us to add
the behavior by default in the future without clobbering existing
projects that handle the installation themselves.
2012-02-09 08:38:56 -05:00
Brad King 6f6891b337 CMakeAddFortranSubdirectory: Always parse arguments
Parse arguments even in add_subdirectory() mode to validate them.
2012-02-09 08:38:56 -05:00
Bill Hoffman 48a09f82cc CMakeAddFortranSubdirectory: Make IMPORTED targets GLOBAL
cmake_add_fortran_directory uses imported targets when using the
mingw fortran compiler. This change makes those targets global
in scope so they act just like the real targets that exist when
a fortran compiler exists and regular add_subdirectory is used.
2012-02-09 08:38:52 -05:00
Brad King 414a780d1c CMakeAddFortranSubdirectory: Validate gfortran architecture
Verify that MINGW_GFORTRAN not only points to a MinGW gfortran but also
one that compiles for the target architecture.  This prevents using a
32-bit gfortran in a 64-bit MSVC build.
2012-02-09 08:34:14 -05:00
Brad King 7e0d9f15d6 CMakeAddFortranSubdirectory: Find gfortran in PATH
In the find_program(MINGW_GFORTRAN) call use the PATHS option for
hard-coded guesses instead of HINTS.  This allows the user environment
to override the guesses and corrects usage of the command options.
2012-02-09 08:34:14 -05:00
Brad King d6b031283a CMakeAddFortranSubdirectory: Fix documentation format and typos
Indent the function signature correctly.  Fix some typos.  Fix the
copyright year.
2012-02-09 08:34:06 -05:00
Brad King e4ae038f5d CMakeAddFortranSubdirectory: Allow full paths to directories
Fix the implementation to allow full paths with spaces.  Change the
interpretation of relative paths to be with respect to the current binary
directory.  This matches the convention used in ExternalProject.  Test
both full and relative paths in the VSGNUFortran test.
2012-02-09 08:34:06 -05:00
Bill Hoffman 538c3452ad Add CMakeAddFortranSubdirectory to use MinGW gfortran in VS
This patch adds a new module that allows for easy integration of MinGW
gfortran and the Visual Studio compiler. It is done in a function called
cmake_add_fortran_subdirectory. The patch also includes a test for this
feature.
2012-02-09 08:33:57 -05:00
Clinton Stimpson 7a6d2796e6 FindQt4: Add include directories for lupdate.
Fixes bug #12644.
Thanks Bernd Lörwald for partial patch.
2012-02-08 19:01:29 -07:00
Clinton Stimpson cbdfcc6515 FindQt4: clarify warning message about incorrect Qt installation.
Fixes bug #12915.
Thanks Laurent Rineau and Brad King for input.
2012-02-08 18:40:55 -07:00
Rolf Eike Beer bb5f48fe99 detect "pgfortran" as PGI Fortran compiler (#12425)
See http://www.pgroup.com/doc/pgiug.pdf, page xviii.
2012-02-08 20:26:27 +01:00
Rolf Eike Beer c008141eee FindX11: also search for Xmu (#12447) 2012-02-08 20:15:20 +01:00
Rolf Eike Beer 81228e9d1d FindOpenMP: do not fail if only C or CXX is enabled (#11910)
Inspired-By: Raymond Wan
2012-02-08 19:01:08 +01:00
Brad King 5db99e8708 Add CheckLanguage module
Define a "check_language(<lang>)" macro to test whether <lang> can be
enabled.  Cache the result in CMAKE_<lang>_COMPILER.  Add a test case
covering expected results.
2012-02-08 10:48:34 -05:00
David Cole 986981ea03 Merge topic 'lang-enable-order-issue-12929'
7495845 Fix CXX/Fortran MODULE flags when enabled before C (#12929)
2012-02-07 15:35:11 -05:00
David Cole 38e6757cd3 Merge topic 'improve-libarchive'
9e25b12 FindLibArchive: support version selection
2012-02-07 15:34:20 -05:00
David Cole aab8510c25 Merge topic 'perl-version'
31826b5 FindPerl{,Libs}: move version detection into FindPerl
2012-02-07 15:34:02 -05:00
David Cole c41020e873 Merge topic 'check_include_files_output'
44d007b CheckIncludeFiles: fix status output
2012-02-07 15:33:51 -05:00
David Cole 6c7a622279 Merge topic 'nsis-user-perm-issue-12923'
c4a0bce CPack: Fix NSIS handling of privileged users (#12923)
2012-02-07 15:33:01 -05:00
Brad King 749584509e Fix CXX/Fortran MODULE flags when enabled before C (#12929)
If CXX or Fortran is enabled before C then the values of

  CMAKE_SHARED_MODULE_C_FLAGS
  CMAKE_SHARED_MODULE_CREATE_C_FLAGS

may not be available.  On platforms where MODULE library (plugin) creation
is the same as SHARED library creation initialize the MODULE creation
flags from the SHARED creation flags of the matching language instead of
assuming that C has been enabled first.

Teach the COnly and CxxOnly tests to build MODULE libraries.  The latter
covers this specific case.
2012-02-03 15:45:13 -05:00
Peter Collingbourne 6dd410c2b9 Ninja: Add the Ninja generator 2012-02-02 23:40:21 +00:00
Peter Collingbourne 7eb8d9036c Provide dependency file flags to generator
Causes compiler modules (currently only GNU) to set a
CMAKE_DEPFILE_FLAGS_${lang} variable, which communicates to
the generator the flags required to cause the compiler to create
dependency files.
2012-02-02 23:36:49 +00:00
Rolf Eike Beer 9e25b12701 FindLibArchive: support version selection 2012-02-01 21:49:04 +01:00
David Cole 0a11d33066 Merge topic 'improve-findgettext'
77e6c6f FindGettext: support version selection
2012-02-01 14:51:27 -05:00
David Cole cf4c0f335d Merge topic 'Findosg_qt_and_presentation'
c040054 Findosg: New modules for osgQt and osgPresentation
2012-02-01 14:51:17 -05:00
David Cole 19d437f2ca Merge topic 'improve-findalsa'
1de14ec FindALSA: support version selection
2012-02-01 14:50:57 -05:00
David Cole e3abd669a2 Merge topic 'improve-findgnuplot'
8a83853 FindGnuplot: add version selection
2012-02-01 14:50:34 -05:00
David Cole 28088aa045 Merge topic 'fix-jasper-debug'
00e30a0 FindJasper: fix library name
2012-02-01 14:50:21 -05:00
David Cole 29cddc60cd Merge topic 'more-python-version'
bde7b5a FindPythonInterp: try harder to get a version number
2012-02-01 14:50:03 -05:00
David Cole 79b7fe9d5e Merge topic 'more-bison-version'
3cc11c2 FindBISON: add a version expression for GNU Bison 1.x
2012-02-01 14:49:39 -05:00
David Cole a3982c15e4 Merge topic 'fix-openssl-version'
0bee3d9 FindOpenSSL: properly parse the hex version components
2012-02-01 14:49:21 -05:00
David Cole 94af99d388 Merge topic 'improve-findpostgresql'
8e8db31 FindPostgreSQL: support version selection
2012-02-01 14:49:00 -05:00
David Cole 9603ee9115 Merge topic 'improve-libxml2'
9d7a001 FindLibXml2: detect version when PkgConfig is not used
2012-02-01 14:48:47 -05:00
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
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
Philip Lowman 84079c92ca FindProtobuf: Merge patch that allows extra import dirs
Added support for additional import paths during protoc invocation
time to the PROTOBUF_GENERATE_CPP public macro via a new
PROTOBUF_IMPORT_DIRS optional variable.

Patch courtesy of Miroslav Kes <mkes@ra.rockwell.com>
2011-12-18 18:02:48 -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
Brad King c198730b45 Detect Watcom compiler version with its id
Decode decimal digits from __WATCOMC__ to compute the version number
components.  See documentation at:

  http://predef.sourceforge.net/precomp.html
2011-12-07 09:39:50 -05:00
Brad King 5899b988d5 Detect Clang compiler version with its id
Decode decimal digits from

  __clang_major__
  __clang_minor__
  __clang_patchlevel__

to compute version number components.  See documentation at:

  http://clang.llvm.org/docs/LanguageExtensions.html#builtinmacros
  http://predef.sourceforge.net/precomp.html
2011-12-07 09:39:49 -05:00
Brad King b8cfa656ce Detect PGI compiler version with its id
Decode decimal digits from

  __PGIC__
  __PGIC_MINOR__
  __PGIC_PATCHLEVEL__

to compute version number components.
2011-12-07 09:39:48 -05:00
Brad King 6dae6660fc Detect IBM XL compiler version with its id
Decode decimal digits from __IBMC__ and __IBMCPP__ to compute version
number components.  See documentation at:

  http://predef.sourceforge.net/precomp.html
  http://publib.boulder.ibm.com/infocenter/comphelp/v111v131/topic/com.ibm.xlc111.aix.doc/compiler_ref/xlmacros.html
  http://publib.boulder.ibm.com/infocenter/comphelp/v111v131/topic/com.ibm.xlcpp111.aix.doc/compiler_ref/xlmacros.html
2011-12-07 09:39:47 -05:00
Brad King 4080d5510e Detect Borland compiler version with its id
Decode hex digits from __BORLANDC__ 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
  http://docwiki.embarcadero.com/RADStudio/en/Predefined_Macros
2011-12-07 09:39:46 -05:00
Brad King 2cc205a0fb Detect Intel compiler version with its id (#11937)
Decode decimal digits from

  __INTEL_COMPILER
  __INTEL_COMPILER_BUILD_DATE

to compute the version number components.  See documentation at:

  http://predef.sourceforge.net/precomp.html
  http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/compiler_f/bldaps_for/common/bldaps_use_presym.htm
2011-12-07 09:39:45 -05:00
Brad King a6d83ccea9 Detect MSVC compiler version with its id
Decode decimal digits from _MSC_VER, _MSC_FULL_VER, and _MSC_BUILD to
compute the version number components.  See documentation at:

  http://msdn.microsoft.com/en-us/library/b0084kay.aspx
  http://predef.sourceforge.net/precomp.html
2011-12-07 08:59:53 -05:00
Brad King a66285583d Detect GNU compiler version with its id (#6251)
Decode decimal digits from

  __GNUC__
  __GNUC_MINOR__
  __GNUC_PATCHLEVEL__

to compute version components.  See documentation at

  http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
  http://predef.sourceforge.net/precomp.html
2011-12-07 08:59:52 -05:00
Brad King fa7141f5ad Add framework to detect compiler version with its id (#12408)
Teach CMakePlatformId.h to construct an "INFO:compiler_version[]" string
literal from macros COMPILER_VERSION_(MAJOR|MINOR|PATCH|TWEAK) to be
defined in CMake(C|CXX)CompilerId.(c|cpp) for each compiler.  Provide
conversion macros DEC() and HEX() to decode decimal or hex digits from
integer values.  Parse the version out of the compiler id binary along
with the other INFO values already present.

Store the result in variable CMAKE_<LANG>_COMPILER_VERSION in the format
"major[.minor[.patch[.tweak]]]".  Save the value persistently in
CMake(C|CXX)Compiler.cmake in the build tree.  Document the variable for
internal use since we do not set it everywhere yet.

Report the compiler version on the compiler id result line e.g.

  The C compiler identification is GNU 4.5.2

Report CMAKE_(C|CXX)_COMPILER_(ID|VERSION) in SystemInformation test.
2011-12-07 08:59:51 -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
David Cole 386cf3c593 Merge topic 'GNU-to-MS'
ae62a1c Test CMAKE_GNUtoMS option in ExportImport on MinGW and MSys
afb00fe Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib
61e8629 Factor makefile generator link rule lookup into helper function
a603250 Load platform files that need to know the ABI when possible
ecd8414 Fortran: Detect pointer size in gfortran on MinGW
2011-12-06 15:07:39 -05:00
David Cole b8c0dd48b0 Merge topic 'CUDAv3.2PathChanges'
8930938 Added support for CUDA_PATH which is present in the CUDA toolkit 3.2 onward.
2011-12-06 15:07:27 -05:00
David Cole cc35c8fad3 Merge topic 'findlapack-0012477-new'
f44f053 FindLAPACK: Fix linking to static LAPACK on Unix (#12477)
2011-12-06 15:06:52 -05:00
David Cole 4c84aa7346 Merge topic 'TinyCC-compiler'
0efe602 TinyCC: Add default compilation flags (#12605)
ec636e2 TinyCC: Add compiler info for shared libs on Linux (#12605)
1f49d72 Recognize the Tiny C Compiler (#12605)
2011-12-06 15:06:34 -05:00
James Bigler aa36082a2b Miscellaneous fixes. 2011-12-05 19:04:48 -07:00
James Bigler 80e279d37c Make CUDA working directory unique for each target.
This allows you to have more than source file with the same name but different
directories.  The intermediate and configuration files are now in this same directory.
2011-12-05 19:00:00 -07:00
James Bigler c3c7a0cfb8 Fixes for handling quotes in args and other places (Fix Bug 11726 and 12099). 2011-12-05 17:16:05 -07:00
James Bigler 83d4eeadac Add work around for CUDA in UNC paths.
Nvcc can emit '/path' instead of '//path' which can cause a lot of grief later.  We test
to see if the file exists, if it doesn't then we see if the file exists with '/'
prepended.  Files that don't exist won't be added to the list.
2011-12-05 16:54:06 -07:00
James Bigler aa59544078 Reset dependency file list when a dependency disappeared.
Fix a long outstanding bug when a file in the dependency list wasn't found.  This bug
wouldn't reset the dependencies, so the makefile would still want the missing file when
building.  The work around was to configure twice, but this is no longer necessary.
2011-12-05 16:29:28 -07:00
Brad King afb00fef19 Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib
Teach the Windows-GNU.cmake platform file to look for Visual Studio
tools matching the target ABI.  Add an extra step to the link command
for shared libraries and executables that export symbols and on which a
new GNUtoMS property is set (initialized by the CMAKE_GNUtoMS option).
Tell the GNU linker to output a module definition (.def) file listing
exported symbols in addition to the GNU-format import library (.dll.a).
Pass the .def file to the MS "lib" tool to construct a MS-format DLL
import library (.lib).

Teach the install(TARGETS) command to install the MS import library next
to the GNU one.  Teach the install(EXPORT) and export() command to set
the IMPORTED_IMPLIB property pointing at the import library to use the
import library matching the tools in the importing project.
2011-12-05 18:13:49 -05:00
James Bigler 8930938351 Added support for CUDA_PATH which is present in the CUDA toolkit 3.2 onward.
This required changing how the paths were used.  I now use the PATH_SUFFIXES parameter
instead of putting the whole path in the command.
2011-12-05 16:04:00 -07:00
Brad King a603250a13 Load platform files that need to know the ABI when possible
Load platform files named in CMAKE_<lang>_ABI_FILES for each language
once the ABI sizeof(void*) is known.  During the first configuration
this is after the test for working compiler and ABI detection checks.
During later configurations the ABI information is immediately available
because it has been saved in CMake<lang>Compiler.cmake.
2011-12-05 16:35:42 -05:00
Brad King ecd8414757 Fortran: Detect pointer size in gfortran on MinGW
Use __SIZEOF_POINTER__ which the GNU Fortran compiler defines at least
on 64-bit MinGW.  Assume default size 4 on MinGW if gfortran does not
define the size.
2011-12-05 16:32:29 -05:00
Alexey Ozeritsky f44f053a52 FindLAPACK: Fix linking to static LAPACK on Unix (#12477) 2011-12-05 11:41:52 -05:00
Mathieu Malaterre 0efe602c59 TinyCC: Add default compilation flags (#12605) 2011-12-05 08:59:50 -05:00
Pierre-Francois Laquerre 9b07c19f92 Fix path quoting in Qt4 macros
Adding VERBATIM to the ADD_CUSTOM_COMMAND calls in the qt4 macros
ensures that paths are properly quoted when passed to the shell.
This fixes issues when building projects that contained paths with
special characters (according to /bin/sh), such as parentheses or
spaces.
2011-12-03 17:51:24 -07:00
Alex Neundorf 62e223e8fa automoc: add variable CMAKE_AUTOMOC_STRICT_MODE, to enable strict parsing
Alex
2011-12-02 22:08:06 +01:00
Brad King ec636e299f TinyCC: Add compiler info for shared libs on Linux (#12605)
Use the "-shared" option to link shared libraries.  The compiler does
not support "-Wl," or "-rpath" but does know how to pass "-soname"
through to the linker.
2011-12-02 10:23:48 -05:00
Brad King 1f49d725ab Recognize the Tiny C Compiler (#12605)
See compiler home page here:

  http://tinycc.org/
  http://bellard.org/tcc/

Use the id "TinyCC" as it appears in their online documentation.
2011-12-02 10:08:34 -05:00
David Cole 9401da8084 Merge topic 'FindZLIB-use-ZLIB_ROOT'
985dee4 FindZLIB: Search under ZLIB_ROOT if it is set
2011-12-01 14:03:36 -05:00
David Cole 333fd1131c Merge topic 'useqt4-fix-declarative'
3cd08ce Qt4: Fix dependencies of QtDeclartive.
2011-12-01 14:03:03 -05:00
David Cole 9c288d6c2b Merge topic 'automoc_qt5'
a828623 moc is now part of the Qt5Core module
b8c8cab Merge remote-tracking branch 'origin/master' into automoc_qt5
2011-12-01 14:02:21 -05:00
Brad King 985dee4f54 FindZLIB: Search under ZLIB_ROOT if it is set
Perform multiple separate searches in order.  If ZLIB_ROOT is set search
it exclusively so it takes precedence over CMAKE_PREFIX_PATH.  This
allows a user to provide -DZLIB_ROOT=/path/to/zlib/prefix on the CMake
command line to tell it exactly where to find zlib.  Otherwise fall back
to a normal search.

Inspired-by: Andreas Schneider <asn@cryptomilk.org>
2011-11-30 13:18:07 -05:00
Clinton Stimpson 3cd08ce048 Qt4: Fix dependencies of QtDeclartive. 2011-11-29 09:02:40 -07:00
Stephen Kelly a8286235a3 moc is now part of the Qt5Core module
There is no separate SrcTools module anymore.
2011-11-26 15:15:33 +01:00
David Cole 7b1b13c8f0 Merge topic 'EclipseImprovedSourceProject'
982b766 Eclipse: use new variable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
1110e45 Eclipse: create links to subprojects also in the source-project (#12579)
2011-11-22 16:23:56 -05:00
David Cole f4e266f41f Merge topic 'FindPNG_Provide_PNG_INCLUDE_DIRS_Variable'
df0f302 FindPNG: provide PNG_INCLUDE_DIRS, as the readme.txt says (#11312)
2011-11-22 16:23:36 -05:00
David Cole e9547efa96 Merge topic 'FindBISON-version-regex'
20cb5ed FindBISON: Fix matching output of "bison --version"
f30f9a5 FindBISON: Fix bison++ version parsing to avoid "Offending entry"
2011-11-22 16:23:31 -05:00
David Cole e8fc3bc8d0 Merge topic 'FixGettextPoProcessingWithMultipleDots'
65dde30 FindGettext: two more fixes for files with multiple dots
e48fcff -make GETTEXT_PROCESS_PO_FILES() work with files with multiple dots
ecb4459 Strip trailing whitespace
2011-11-22 16:23:14 -05:00
Clinton Stimpson 9a6b102205 GetPrerequisites: Add support for @rpath on Mac OS X.
Handle @rpath much like other Unixes, by doing a find_file with the given directories.

Also, consider a library to be local if it is found in the same directory or a subdirectory relative to the user
executable/library.  Previously, it was local only if found in the same directory.
This case is encountered when @rpath is used with framework libraries, which are inside a directory tree.
2011-11-21 16:45:49 -07:00
Alex Neundorf 982b766f29 Eclipse: use new variable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
Previously ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT was used, but the
new name CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT is more in line with
the general naming conventions in cmake, and, more importantly IMO,
in cmake-gui it now appears right next to the other eclipse-related
variables, which all start with CMAKE_ECLIPSE_.

A warning is printed if the old variable is TRUE and the new one isn't,
so users should notice that they have to enable the new one.

Alex
2011-11-19 11:18:51 +01:00
Alex Neundorf df0f302485 FindPNG: provide PNG_INCLUDE_DIRS, as the readme.txt says (#11312)
Also improve the documentation a bit.

Alex
2011-11-18 19:20:07 +01:00
Rolf Eike Beer 20cb5edbca FindBISON: Fix matching output of "bison --version"
The output may contain semicolons, which will confuse the IF() because of
missing quoting.
2011-11-18 10:47:28 -05:00
Alex Neundorf 65dde30ddd FindGettext: two more fixes for files with multiple dots
Another patch by Albert Astals Cid for dealing with translation files
with multiple dots.

Alex
2011-11-16 20:53:59 +01:00
David Cole a9e686d68b Merge topic 'qt4-deploy-module'
b688f11 Check QtCore without warning.
2011-11-15 14:39:38 -05:00
David Cole 6fbba223f4 Merge topic 'FindBoost-vs11-issue-12568'
1c4ba48 FindBoost: Use MSVC11 to find Boost on Windows (#12568)
2011-11-15 14:39:03 -05:00
David Cole 1e055d374e Merge topic 'automoc_qt5'
bafe5cc Fix style.
74b9392 Update comments and method names to not be Qt4 specific.
812dab0 Don't assume the existence of QT_MAJOR_VERSION.
2011-11-15 14:39:00 -05:00
David Cole f1197ff0da Merge topic 'fix-11213-vs10-mfc-support'
537020f Tests: Nudge MFC test to pass on VS 6 dashboards (#11213)
51f442e VS11: Update InstallRequiredSystemLibraries.cmake for VS11 (#11213)
d85ab7a Tests: Add environment logging to the MFC test (#11213)
011694c VS10: Use expected values for UseOfMfc (#11213)
a2e6d24 Tests: Fix MFC test to work with VS 10 and later (#11213)
2011-11-15 14:38:56 -05:00
Alex Neundorf e48fcfffa3 -make GETTEXT_PROCESS_PO_FILES() work with files with multiple dots
Patch by Albert Astals Cid.
E.g. plasma_package_org.kde.activityswitcher.po will now be installed
correctly as plasma_package_org.kde.activityswitcher.mo, and not as
plasma_package_org.mo.

This is kind-of related to #12282

Alex
2011-11-15 18:49:47 +01:00
Alex Neundorf ecb4459e31 Strip trailing whitespace
Alex
2011-11-15 18:48:38 +01:00
Mike McQuaid b688f114c9 Check QtCore without warning.
When debug and release versions of QtCore were available it printed
a warning. This has been fixed.
2011-11-14 10:00:08 -07:00
Ondrej Balaz f30f9a500c FindBISON: Fix bison++ version parsing to avoid "Offending entry"
I've just found out that use of FindBISON.cmake shipped with CMake 2.8
on system where bison++ is default bison executable (e.g. Debian Linux)
will result in corrupted CMakeCache.txt file and parse error due to
"Offending entry"

As FindBISON.cmake logic used to obtain installed bison executable
version is tailored to match only the message used in GNU Bison it fails
on absolutely different Bison++ version message and whole version
message including \n characters is stored into BISON_VERSION which is
then dumped into CMakeCache.txt, so everything after first \n character
makes "Offending entry".
2011-11-11 16:50:23 -05:00
Stephen Kelly b8c8cab242 Merge remote-tracking branch 'origin/master' into automoc_qt5 2011-11-10 15:46:13 +01:00
Mateusz Loskot 1c4ba48e44 FindBoost: Use MSVC11 to find Boost on Windows (#12568)
While at it, add recent Boost versions.
2011-11-10 08:03:17 -05:00
Stephen Kelly 812dab067e Don't assume the existence of QT_MAJOR_VERSION.
Also handle Qt5SrcTools_MAJOR_VERSION.
2011-11-09 23:20:20 +01:00
Dan Kegel 0e721e5129 Modules: Add XRes to FindX11.cmake 2011-11-09 06:22:32 -05:00
David Cole 51f442e603 VS11: Update InstallRequiredSystemLibraries.cmake for VS11 (#11213)
Should fix the newly added MFC test on VS11 dashboards.
2011-11-08 15:22:40 -05:00
David Cole 437deb3356 Merge topic 'CPackRPM-fix12556'
9066886 CPackRPM fix #12556 and enhance documentation
2011-11-08 14:43:52 -05:00
David Cole 3452dadf89 Merge topic 'AddMocOptionsToAutomoc'
2c648ab add documentation for the AUTOMOC_MOC_OPTIONS property
52719a1 automoc: fix #12541, support moc options
2011-11-08 14:42:51 -05:00
Eric NOULARD 9066886f9b CPackRPM fix #12556 and enhance documentation
Inspired-By: Chip Christian
2011-11-05 11:40:47 +01:00
David Cole a39c195bc5 Merge topic 'qt4-deploy-module'
467ee36 Check plugin variables are defined before warning.
4571ea6 Don't resolve directories; are never relative.
9cfc920 Match fixup_qt4_executable with documentation.
2011-11-01 14:26:43 -04:00
David Cole 09dfcfb6cb Merge topic 'CPackRPM-perComponentHeader'
e20c59a CPackRPM support component specific variables for spec files
2011-11-01 14:26:31 -04:00
Mike McQuaid 467ee36840 Check plugin variables are defined before warning. 2011-11-01 13:54:35 -04:00
Mike McQuaid 4571ea6e4d Don't resolve directories; are never relative. 2011-11-01 13:54:34 -04:00
Mike McQuaid 9cfc920973 Match fixup_qt4_executable with documentation. 2011-11-01 13:54:34 -04:00
Alex Neundorf 52719a1d66 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
2011-11-01 14:33:11 +01:00
Eric NOULARD e20c59ae50 CPackRPM support component specific variables for spec files
This is a modified version of a user patch
Inspired-By: informant
2011-10-30 20:13:20 +01:00
Alex Neundorf fe6d9c1a44 FindLibXslt: also search libexslt and xsltproc
merging some changes FindLibXslt.cmake from KDE

Alex
2011-10-25 23:03:17 +02:00
David Cole bd216ef63a Merge topic 'some-documentation-fixes'
ceff6ec ccmake: Factor toggle key help instructions.
19da106 ccmake: Document '/' key.
fd63219 ccmake: Align 'g' and 'q' key instructions.
bfb0ed4 Usage: Add missing exepath argument in get_prerequisites documentation.
de51264 Usage: Print help, version and copyright options in usage information.
9ae0604 Usage: Document all options printing the version number.
3353d84 Usage: Document all options printing usage information.
1b612ca Usage: Document -j|--parallel option in help message.
6be15ed Doxygen: Remove dependency on VTK when building doxygen.
a92f14f Doxygen: Fix warnings.
faede37 Doxygen: Generate call graph and relationships.
dd13ecd Doxygen: Improve code documentation.
d0b3a7f Fix typo.
d3d7e45 Remove trailing white-spaces.
2011-10-25 15:34:26 -04:00
David Cole 4701843974 Merge topic 'SourceGroupsForEclipse'
66bd543 Eclipse: fix #12417, don't create wrong src pathentries
70de8bd Eclipse: detect number of CPUs, set CMAKE_ECLIPSE_MAKE_ARGUMENTS accordigly
117f2b8 Eclipse: add Build and Clean targets to targets
c3f30bd Eclipse: move code for generating links to targets into separate function
cef6bd9 Eclipse: move code for generating links to projects into separate function
b6d4de7 Eclipse: add virtual folder for each target
2011-10-25 15:34:23 -04:00
David Cole 5576655f36 Merge topic 'fix-12490-shorten-gcov-filenames'
2f309cb CTest: Add COVERAGE_EXTRA_FLAGS cache variable (#12490)
2011-10-25 15:34:16 -04:00
David Cole e1902dd145 Merge topic 'qt4-deploy-module'
0618045 Add DeployQt4 module.
cf4b529 Add QT_LIBRARIES_PLUGINS variable to UseQt4.
2011-10-25 15:33:56 -04:00
Nicolas Despres bfb0ed4293 Usage: Add missing exepath argument in get_prerequisites documentation. 2011-10-23 22:18:14 +02:00
Alex Neundorf 70de8bd5ae Eclipse: detect number of CPUs, set CMAKE_ECLIPSE_MAKE_ARGUMENTS accordigly
Using the new module ProcessorCount.cmake now the number of CPUs is
detected, and if it is bigger than 1, make -jX is set accordingly.

Alex
2011-10-23 14:33:25 +02:00
David Cole 2f309cba45 CTest: Add COVERAGE_EXTRA_FLAGS cache variable (#12490)
COVERAGE_EXTRA_FLAGS is a space separated value of extra flags
that will be passed to gcov when ctest's coverage handler invokes
gcov to do coverage analysis.

Map to CoverageExtraFlags in the CTest ini file. Use default value
of "-l" to match the coverage handler's earlier behavior from ctest
2.8.4 and earlier. The fix for related issue #11717 had added a " -p"
which was the cause of both #12415 and #12490. Here, we revert that
change to the default value, so -p is no longer there by default.
The people that care to add -p may do so in their own build trees
by appending " -p" to the new cache variable COVERAGE_EXTRA_FLAGS.
2011-10-22 11:01:58 -04:00
David Cole 049d2bc77d Merge topic 'DetectEclipseVersion'
dcd2459 Eclipse: better message when Eclipse version could not be determined
b4b2fc3 Eclipse: don't create VirtualFolders if not supported
5b200e3 Detect whether the current Eclipse version supports VirtualFolders
4974ec9 Eclipse generator: detect Eclipse version
2011-10-18 15:04:22 -04:00
David Cole c818589113 Merge topic 'FindProtoBuf_doc_clarify'
a481d84 FindProtoBuf: Documented limitation of the public macro
2011-10-18 15:03:43 -04:00
David Cole 02e99d9851 Merge topic 'FindRubyOnOpenBSD'
d2b1ce6 Find Ruby on OpenBSD when installed from ports (#12507)
ba5a8bc Remove trailing whitespace
2011-10-18 15:02:53 -04:00
David Cole 91e970ce5b Merge topic 'DetectMasmCompilerId'
cf93d63 fix #12465: detect the masm compiler ID ("MSVC")
2011-10-18 15:02:30 -04:00
Alex Neundorf dcd245913c Eclipse: better message when Eclipse version could not be determined
Alex
2011-10-15 21:04:23 +02:00
Alex Neundorf 4974ec90a4 Eclipse generator: detect Eclipse version
Try to detect the eclipse version and put it in the cache.

Alex
2011-10-15 18:43:27 +02:00
Philip Lowman a481d84ff7 FindProtoBuf: Documented limitation of the public macro 2011-10-12 23:44:40 -04:00
Alex Neundorf d2b1ce6af0 Find Ruby on OpenBSD when installed from ports (#12507)
The ruby library on OpenBSD is named rubyXY, not ruby X.y.
Find that too.

Alex
2011-10-12 23:05:52 +02:00
Alex Neundorf ba5a8bcf5d Remove trailing whitespace
Alex
2011-10-12 23:05:30 +02:00
David Cole 3ece15b8f9 Merge topic 'HandleCMAKE_CXX_COMPILER_ARG1InEclipse'
3df49dc fix #12392: handle CMAKE_CXX_COMPILER_ARG1 for Eclipse projects
2011-10-11 14:45:09 -04:00
David Cole bb28c9f3bf Merge topic 'qt_dbus_interface_args'
648c454 Add features from KDE for arguments to qdbusxml2cpp.
2011-10-11 14:44:48 -04:00
Alex Neundorf cf93d63c0a fix #12465: detect the masm compiler ID ("MSVC")
Alex
2011-10-06 17:57:32 +02:00
Mike McQuaid 06180459cc Add DeployQt4 module.
Add a module that gives better support to BundleUtilities to handle
Qt plugins and deploy Qt applications.
2011-10-03 11:01:48 -06:00
Mike McQuaid cf4b52980d Add QT_LIBRARIES_PLUGINS variable to UseQt4. 2011-10-03 11:01:39 -06:00
Alex Neundorf 3df49dc7b1 fix #12392: handle CMAKE_CXX_COMPILER_ARG1 for Eclipse projects
CMAKE_CXX/C_COMPILER_ARG1 have to be used for finding the include
dirs and builtin macros, so Eclipse can do code completion

Alex
2011-10-01 19:09:24 +02:00
David Cole c4ef30e3dd Merge topic 'PkgConfigTypoFix'
9cbbea3 Fix typo in UsePkgConfig.cmake
2011-09-30 15:57:24 -04:00
David Cole 449aef3efb Merge topic 'vs11-generator'
3b5256e Teach our tests about special cases for VS 11
3d5632e Add Visual Studio 11 generator for x86 and x64 tools
2011-09-30 15:57:17 -04:00
Rolf Eike Beer 9cbbea31d3 Fix typo in UsePkgConfig.cmake 2011-09-29 19:43:44 +02:00
Brad King 89bdc3e213 Merge topic 'FindBulletLibRenames'
6f935d7 FindBullet: Also search for _Debug postfixed library names
2011-09-26 11:24:46 -04:00
Brad King 3d5632ed59 Add Visual Studio 11 generator for x86 and x64 tools 2011-09-23 10:10:01 -04:00
Philip Lowman 6f935d7f55 FindBullet: Also search for _Debug postfixed library names 2011-09-22 23:31:37 -04:00
Alex Neundorf 59ccf38554 Minor improvements to the UsePkgConfig.cmake docs
Alex
2011-09-22 14:47:18 +02:00
Alex Neundorf ad11118ebf Remove trailing whitespace
Alex
2011-09-22 14:39:19 +02:00
David Cole 26e5b0ea82 Merge topic 'revert-fix-for-11333'
98c49a4 Revert "FindThreads: Try pthreads with no special option first (#11333)"
2011-09-21 17:29:39 -04:00
David Cole ac623ce2fe Merge topic 'CPackRPM-per-component-script'
cc26a06 CPackRPM authorize per-component pre/post-[un]install scripts (#0012063)
2011-09-21 17:29:30 -04:00
David Cole 253e370c9e Merge topic 'generate-export-header'
41e2b1d Make add_compiler_export_flags a function again.
6a10deb Made ADD_COMPILER_EXPORT_FLAGS into a macro.
2d1acfe Don't warn when nothing to do in visibility function.
d679568 Just code style changes.
2011-09-21 17:29:23 -04:00
David Cole 682a989fdb Merge topic 'CPackDeb-fakeroot'
49da3bd CPackDeb fix #10325 automagically use fakeroot for DEB if fakeroot is found
2011-09-21 17:29:16 -04:00
David Cole 98c49a4a25 Revert "FindThreads: Try pthreads with no special option first (#11333)"
This reverts commit fd61be7140.
2011-09-20 18:40:22 -04:00
David Cole d622088b2b Merge topic 'MinorFeatureSummaryFixes'
0ba9853 Don't warn when setting a property multiple times to the same value #12464
b7ac63e Fix typos in FeatureSummary.cmake (#12462)
2011-09-20 14:42:21 -04:00
David Cole f628f12799 Merge topic 'CheckForFlexHeader'
ae331e1 FindFLEX.cmake: also search the include dir
2011-09-20 14:42:16 -04:00
David Cole bef996852e Merge topic 'FortranCInterface-VS'
67fcc83 Simplify IntelVSImplicitPath detection project
a7ce26d Move IntelVSImplicitPath project to better location
539a822 Enable Fortran tests for IDE builds.
555f589 For VS Intel Fortran IDE builds, add a check to find the Fortran library PATH.
71402eb FortranCInterface: Compile separate Fortran lib in VerifyC[XX]
2011-09-20 14:41:56 -04:00
Eric NOULARD cc26a0614a CPackRPM authorize per-component pre/post-[un]install scripts (#0012063)
Merged patch from Chip Christian previously based on the one from winfriedd
with some small pruning editing by commiter
2011-09-20 20:21:01 +02:00
Marcus D. Hanwell 41e2b1d824 Make add_compiler_export_flags a function again.
Making this a macro had unintended issues on (among others) Windows
compilers. Moving it back to being a function using PARENT_SCOPE still
satisfies the use case where we simply want to obtain the extra flags.
2011-09-20 00:16:16 -04:00
Marcus D. Hanwell 6a10deb670 Made ADD_COMPILER_EXPORT_FLAGS into a macro.
It adds to the CMAKE_CXX_FLAGS (as before), or populates the supplied
optional argument with the CXX_FLAGS for symbol import/export.
2011-09-19 16:42:42 -04:00
Marcus D. Hanwell 2d1acfe359 Don't warn when nothing to do in visibility function. 2011-09-19 14:55:19 -04:00
Marcus D. Hanwell d6795685ae Just code style changes. 2011-09-19 14:04:42 -04:00
Alex Neundorf 0ba98533d0 Don't warn when setting a property multiple times to the same value #12464
Patch by Yury Kudryashov

Alex
2011-09-18 12:51:05 +02:00
Alex Neundorf b7ac63e1c1 Fix typos in FeatureSummary.cmake (#12462)
Patch by Yury Kudrashov

Alex
2011-09-18 12:46:29 +02:00
Alex Neundorf ae331e1864 FindFLEX.cmake: also search the include dir
FindFLEX.cmake already searched for the library, but
not for the include dir. Do that too.

Alex
2011-09-17 14:27:24 +02:00
Brad King 67fcc838d9 Simplify IntelVSImplicitPath detection project
Use the ENV{LIB} variable directly instead of parsing the output of the
whole environment from "set".  Store the output in a .cmake script and
include it from CMakeDetermineCompilerABI instead of using file(READ).
2011-09-14 14:06:02 -04:00
Brad King a7ce26d837 Move IntelVSImplicitPath project to better location
This project is not part of the FortranCInterface module.  Make it a
sibling instead of a child directory.
2011-09-14 13:49:40 -04:00
David Cole 21e03c4c44 Merge topic 'CPackDeb-remove-stray-paren'
85fd794 remove stray brace in CPackDeb documentation
2011-09-13 14:33:12 -04:00
Rolf Eike Beer 85fd794a19 remove stray brace in CPackDeb documentation 2011-09-12 11:47:31 -04:00
Bill Hoffman 555f589a5a For VS Intel Fortran IDE builds, add a check to find the Fortran library PATH.
To use VS C and Fotran in the same solution, it is required that VS be
able to find the Fortran run time libraries as they will be implicitly
linked by any Fortran library used by VS C programs.  This adds a check
into CMakeDetermineCompilerABI using a try-compile to find the correct
PATH.
2011-09-08 17:42:49 -04:00
Eric NOULARD 59204e1126 CPack fix #12449 doc mispelled
CPACK_INSTALL_DIRECTORIES-->CPACK_INSTALLED_DIRECTORIESœ
2011-09-08 22:00:34 +02:00
Brad King 71402eb252 FortranCInterface: Compile separate Fortran lib in VerifyC[XX]
The Intel Fortran plugin for Visual Studio requires Fortran source files
to be compiled in a separate target from C and C++ code.  Compile the
VerifyFortran.f source file in a separate library and link the main
VerifyFortanC executable to it.
2011-09-08 14:56:48 -04:00
David Cole c80cbad152 Merge topic 'CPackRPM-includeDir'
f9e5277 CPackRPM fix #12305, include directories in RPM package
2011-09-07 15:38:50 -04:00
David Cole de62fd1b6d Merge topic 'CPackRPM-fix12366'
b0f6a97 CPack  fix #12366 components RPM packages have the same package name
2011-09-07 15:38:27 -04:00
David Cole 54730d7604 Merge topic 'generate_export_header'
dbd776d Don't put what some compilers consider junk at the end of the line.
93d8d19 Add some more unit tests.
2011-09-07 15:38:00 -04:00
David Cole 4558e6eeee Merge topic 'vs-compiler-id'
38aab37 Set CMAKE_<lang>_COMPILER_ID for VS generators
2011-09-07 15:37:37 -04:00
David Cole d9ad72542a Merge topic 'fortran-format'
90efed6 Xcode: Honor Fortran_FORMAT target and source file property
5c0c635 Fortran: Add support for free- and fixed-form flags
47a0c75 VS: Map Fortran free- and fixed-format flags to IDE options
d6e2a06 VS: Map per-source Fortran flags to IDE options
2011-09-07 15:37:27 -04:00
David Cole a239fb6c16 Merge topic 'FindLAPACK_FindBLAS'
0cc8f05 FindBLAS/LAPACK fixes
145de0a FindBLAS/LAPACK fixes
2011-09-07 15:36:52 -04:00
David Cole 56ce5dec8b Merge topic 'asn_java_add_more_java_archives'
e01b98e Modules: Add support for more java archives in add_jar().
2011-09-07 15:36:41 -04:00
David Cole 5686515b6f Merge topic 'FindPythonInterp-Refactoring'
1c2508a Use FIND_PACKAGE_HANDLE_STANDARD_ARGS second mode
d179500 Update documentation of FindPythonInterp.cmake
4fd1e28 Determine python version
20980ef Search for the installed python interpreter first
2011-09-07 15:36:18 -04:00
David Cole accdb855c2 Merge topic 'fix-message-details'
cd81da3 FindPackageMessage: Eliminate new lines using REGEX REPLACE
0ae78b7 FindPackageMessage: Eliminate new lines in cache entries
2011-09-07 15:35:54 -04:00
Eric NOULARD 49da3bdb2d CPackDeb fix #10325 automagically use fakeroot for DEB if fakeroot is found 2011-09-05 22:43:45 +02:00
Eric NOULARD f9e5277941 CPackRPM fix #12305, include directories in RPM package 2011-09-05 22:15:31 +02:00
Stephen Kelly 648c454454 Add features from KDE for arguments to qdbusxml2cpp. 2011-09-05 21:59:13 +02:00
Eric NOULARD b0f6a97587 CPack fix #12366 components RPM packages have the same package name
fix based on the patch provided by winfriedd
2011-09-05 20:22:00 +02:00
Stephen Kelly dbd776dde7 Don't put what some compilers consider junk at the end of the line. 2011-09-04 22:06:02 +02:00
David Cole cd81da30f7 FindPackageMessage: Eliminate new lines using REGEX REPLACE
Re-fix problem exposed by recent commit to FindPythonInterp.
If the find "details" has new lines in it, then replace them
with the empty string so that the string may be saved as a
cache entry that can be re-read next time CMake runs.

Use REGEX REPLACE, and replace with an empty string, eliminating
the problem characters, so that we may easily extend this to
include additional problem characters in the future if necessary.
2011-09-02 14:37:49 -04:00
Brad King 38aab37962 Set CMAKE_<lang>_COMPILER_ID for VS generators
Currently the VS generators do not support Intel C/C++ .icproj files and
the MS tools do not include a Fortran compiler.  Therefore we can always
set the C and CXX compiler IDs to "MSVC" and the Fortran ID to "Intel".

This fixes a regression in support for the Intel Fortran compiler under
the VS plugin introduced by commit cd43636c (Modernize Intel compiler
info on Windows, 2010-12-16).  The commit moved the compiler information
into platform files that only load when the proper compiler id is set.
It worked for the NMake Makefiles generator but not for the VS IDE
generator because it did not set the compiler id.
2011-09-02 08:56:01 -04:00
David Cole f6dce05bef Merge topic 'qt4-find-uitools-mingw-cross'
a67be31 qt4: also find QtUiTools when cross compiling with mingw.
2011-09-01 15:14:30 -04:00
David Cole 1aa42978a5 Merge topic 'bg-link-fixes'
5993891 Fixed link bugs in BlueGeneP build.
2011-09-01 15:14:26 -04:00
David Cole a9c96a725e Merge topic 'xl-CreateExportList-fix'
d169762 Fix XL compilers on non-AIX machines.
2011-09-01 15:14:22 -04:00
David Cole 5c51a7bdf3 Merge topic 'boost-cmake-path-suffixes'
7da796d FindBoost: Call find_package with NO_MODULE first
2011-09-01 15:14:15 -04:00
David Cole 482a235bff Merge topic 'generate_export_header'
6a6393c Don't use a variable name that might be used in other files.
5ca8c56 Fix up verbatim code sections of the dox.
75596e6 Don't start a line with a dash(-)
826374a Remove blank line at the start of the file.
8b9b8e1 Add documentation about the prefix and no_deprecated options.
51bc63a Fix the feature of using a specific prefix for macros.
3449f6b Add quotes in case cmake is installed in a prefix with a space.
36d28f2 Fix Compiler id variable name.
99b2aab Disable the tests for Watcom.
7ac0ab1 Quote paths in case there is a space in one of them.
89108b9 Look for errors reported by PGI too.
e0cc024 Add missing NO_EXPORT macro variant.
1b031d1 More consistency in the macro options.
03d60c7 Try to make the macros do almost nothing for Watcom.
6adeda9 Possibly fix configuration test on AIX.
e253348 Possibly fix test on HPUX.
32eff0c Test for too-old-intel compilers.
42154ec Fix up the regex command for Intel.
a147a06 Add some settings for non-truncation of test output.
bf73e75 Hopefully add version extraction for Intel.
aa4f0b6 Fix the version extraction regex for clang.
a493d1a Test the correct cxx variable.
b6ee2ee Comment the test assertion for now
a9a8b9e Exclude win32 from hidden visibility checks.
afae7a9 Start testing expected values for compiler flags.
1ae3365 Exclude PGI from exports and deprecated.
f426496 Exclude cygwin from the hidden visibility feature.
f84c7db Don't enable deprecated on old GCC
9672b33 Don't enable deprecated on HP.
10d8c44 Disable testing of deprecated macros.
97392a7d Fixup forgotten part of aed84517c9
2aeab4f Borland can't do deprecated.
c41c68b Try to error on deprecated on Intel and SunCC.
aed8451 Test for deprecated attribute before declspec.
c448b09 Perform the -Werror test only once.
fb88c6e Add some messaging output to make remaining issues findable.
01e9e98 Test -Werror instead of enabling it per compiler.
9aab2aa Expect the tests to pass if hidden visibilty is not enabled.
856bdb3 Don't change the expected build result based on the platform.
df4615e Add the COMPILER_HAS_DEPRECATED only if it has a declspec variant
78a6e1c Exclude the XL compiler from the hidden-visibility test.
e1f7ee3 Test for compiler features, instead of for specific platforms.
9554e10 Split the deprecated available check from setting macro values.
1590d5f Don't export methods on already exported classes.
750b67c Don't use hidden visibility on non-mingw windows either.
1f3be45 Make sure the hidden visibility variables never get set on MINGW.
399f415 Only set the deprecated attribute if hidden visibilty is enabled.
1c6b41b Remember to surround the other deprecated test in the Borland check.
3f7e036 Export deprecated free methods too.
7fa5592 Add some debug output to narrow down deprecation test issues
7924c1d Another attempt at fixing Borland.
50460ea Fix off-by-not in test for Borland.
b443459 Use the correct project name compiletest not compilefail
fc3772e Another attempt to fix the tests on Borland.
bab4a22 Disable all export macros on Borland.
cff9493 Only set the COMPILER_HAS_HIDDEN_VISIBILITY if GCC >= 4.2
af443b8 Set the CMAKE_RUNTIME_OUTPUT_DIRECTORY for windows builds.
61726f8 Only run the failure tests with gcc >= 4.2
002ddf2 Fix typo and tests failing as a result.
4443037 Fix tests with clang.
ffaa127 Test expected no-op instead of aborting the build.
6aca0e2 Short-circuit the tests on unsupported compilers.
d123bce Add some debug output.
3574b75 Simplify the compiler feature check
c7a937b Simplify. We already know we have hidden visibility at this point.
3b188c8 Test for features, not specific compilers.
4718233 Remove the fatal_warnings option which is no longer used.
b19911e Add missing licence header.
706ed2b Add a newline at the end of the file.
8963716 Add a newline at the end of the file.
def0a54 Handle the case where the user changes the DEFINE_SYMBOL property.
3088070 Add the GenerateExportMacro with unit tests.
2011-09-01 15:14:01 -04:00
Todd Gamblin 7da796d1fd FindBoost: Call find_package with NO_MODULE first
FindBoost now attempts to find Boost using find_package(Boost NO_MODULE)
before it does a module mode search.

User can now set any of these to Boost's install prefix to detect it in module
or config mode:

- Boost_DIR  for consistency with other CMake modules
- BOOST_ROOT or BOOSTROOT for adherence to boost convention
2011-09-01 15:00:21 -04:00
Alexey Ozeritsky 0cc8f05ce5 FindBLAS/LAPACK fixes
fixed: CMAKE_FIND_LIBRRAY_SUFFIXES misprint
 added: ATLAS vendor to FindLAPACK module
2011-09-01 10:54:48 +04:00
Alexey Ozeritsky 145de0a058 FindBLAS/LAPACK fixes
fixed: saving/changing/restoring CMAKE_FIND_LIBRARY_SUFFIXES variable.
fixed: BLA_VENDORs "Apple" (Accelerate Framework) and
      "NAS" (vecLib Framework) fail as 'cblas_dgemm_' doesn't exist.
fixed: improve "Generic" detection on Ubuntu (and I assume Debian)
      (work with libblas3gf and liblapack3gf packages).
2011-08-31 22:10:13 +04:00
Brad King 5c0c635a09 Fortran: Add support for free- and fixed-form flags
Define a "Fortran_FORMAT" target and source file property.  Initialize
the target property from a "CMAKE_Fortran_FORMAT" variable.  Interpret
values "FIXED" and "FREE" to indicate the source file format.  Append
corresponding flags to the compiler command line.
2011-08-31 10:24:43 -04:00
Clinton Stimpson a67be31784 qt4: also find QtUiTools when cross compiling with mingw. 2011-08-29 08:23:44 -06:00
Andreas Schneider e01b98ee4d Modules: Add support for more java archives in add_jar(). 2011-08-29 08:51:45 +02:00
Todd Gamblin 5993891e8d Fixed link bugs in BlueGeneP build.
- Build wasn't properly using -soname linker args, so installed libraries
  could depend on relative paths from the build directory.
- Consolidated GNU linker args to one place in the BlueGeneP-base platform
  file, since ld is used by both XL and GNU toolchains on BlueGene.
2011-08-28 22:08:11 -07:00
Todd Gamblin d1697625f8 Fix XL compilers on non-AIX machines.
Linking broken on non-AIX machines when using XL compilers due to those
machines not using the CreateExportList tool.  Made use of this tool
conditional on finding it.
2011-08-28 22:04:41 -07:00
David Faure 6a6393c905 Don't use a variable name that might be used in other files.
myDir is also used in the Grantlee config file, so if Grantlee
was found, this call failed.
2011-08-27 09:44:52 +02:00
Stephen Kelly 356cef2198 Make the formatting of feature_summary output a little better. 2011-08-27 09:26:26 +02:00
David Cole 28cba226b3 Merge topic 'UsingCMakeLikePkgConfig2'
59238dc Fix --find-package mode on Cygwin, where enable_language(RC) is called
98472e4 Require the current cmake version in --find-package mode
a6ccf3c Use $(CXXFLAGS) and $(LDFLAGS) in the --find-package test Makefile
4386918 Fix line length
7d69310 Only enable the test when using GNU make
3011149 Make the test harder by always having a space in the include dirs
ab57ff6 Make the --find-package test harder
626fc71 Much improved test, should now be executed on all UNIXes
ec6982d Disable any STATUS output in --find-package mode
e552ae7 Dont check for -isysroot and -mmacosx-version on OSX in --find-package mode
e589589 Rename helper macros print_compile_flags() to set_compile_flags_var()
aecfc1f Fix test on OpenBSD with BSD make
6bb4ca3 The makefile for the test was kindof wrong
fd15b5e Only run the test if we are using a makefile generator under UNIX
9fc87c6 Add a test for the new --find-package mode
d3ae0ff Improve documentation for --find-package mode
bf07375 Add a cmake.m4 for using cmake in autoconf projects instead of pkgconfig
b0e3578 Use the file-utility to test for 64bit if there is no /usr/lib64
53edfb2 Better support for lib64 and Debian multiarch
b8fdaa1 Fix copyright notice in new CMakeFindPackageMode.cmake
7690edf Replace cmake::GetScriptMode() with GetWorkingMode()
e4f603b Implement find-package mode of cmake
a91d662 Add find-package mode, which does nothing yet
b976e70 Make clLocalGenerator::GetTargetFlags() public
2011-08-25 15:40:49 -04:00
David Cole f5115f91d9 Merge topic 'fix-11333-use-correct-thread-flags'
6b3993b CheckSymbolExists: Use IMMEDIATE flag for configure_file (#11333)
fd61be7 FindThreads: Try pthreads with no special option first (#11333)
2011-08-25 15:40:40 -04:00
David Cole 39f0fa725e Merge topic 'AutomocForQt'
920a046 QtAutomoc: Eliminate compiler warning
b00463f QtAutomoc test: Pass QT_QMAKE_EXECUTABLE
e78ce44 Fix automoc with VS builds: apply patch from Bill
71165e9 Silence warning in automoc: use long instead of int
1879bcc Fix build: use std::ios::out|ios::trunc instead of std::ios_base::out
678e124 Only enable the automoc test after checking that Qt4 works
71c29d1 Fix bootstrap test with automoc
afb3edc Fix warnings
add30e9 Fix build: non-void function must return a value
7e6d845 Automoc.cmake is not needed anymore
2963d0b Fix logic which decides when to execute automoc test
77a5c6e Add documentation for AUTOMOC, add initialization via CMAKE_AUTOMOC
bf8ef77 Add a test for automoc
d045fd4 Nicer progress message for the automoc target
50cd6ce Move automoc processing from add_executable/library to cmGlobalGenerator
cbaac2a Remove trailing whitespace
c27607b Refactor SetupAutomocTarget() so it can be run after creating the target
24d9b7d Remove trailing whitespace
58b7fe6 Use cout instead of printf()
72caf4d Add the generated automoc.cpp file to the cleaned files
ddb517d Color output when running moc
9303295 Initialize verbose based onb the env.var.
ace1215 Move code for parsing a cpp-file from the big loop to separate function
735a5bb Fix line lengths
83b730c Add AUTOMOC to the add_library() command
126c6ea Add the cmake module required currently for automoc
de91feb Remove the need to check for .h/.cxx during buildtime
d65689a Add actual automoc code from automoc
d1c0a5f Start implementing skeleton for automoc in cmake
a65011b Start work on automoc: add empty cmQtAutomoc class
2011-08-25 15:40:29 -04:00
David Cole 2c4dbd12e3 Merge topic 'fix_vcexpress_2010'
3ca1df8 Use MSBuild when devenv is not around, since VCExpress seems broken.
2011-08-25 15:39:43 -04:00
David Cole c672c728f2 Merge topic 'FixOptionalEnableAsm'
cd70f00 Fix #12358: make optionally enabling ASM work again
2011-08-25 15:39:33 -04:00
David Cole d2b90e4c68 Merge topic 'FindLAPACK_FindBLAS'
cfad24a fixed: search of ATLAS library for C/C++-only projects
d5e6030 ACML-GPU supportede
af4c58b ACML-GPU supported
91b76e2 gotoblas supported
66a4bd0 fixed: search of acml libraries
2011-08-25 15:39:00 -04:00
Stephen Kelly 5ca8c565bc Fix up verbatim code sections of the dox. 2011-08-25 20:39:01 +02:00
Stephen Kelly 75596e62f9 Don't start a line with a dash(-)
That is a special character in cmake dox.
2011-08-25 20:39:00 +02:00
Stephen Kelly 826374a45a Remove blank line at the start of the file.
A blank line excludes the file from documentation processing.
2011-08-25 20:39:00 +02:00
Stephen Kelly 8b9b8e1676 Add documentation about the prefix and no_deprecated options. 2011-08-25 18:56:13 +02:00
Stephen Kelly 51bc63a7cb Fix the feature of using a specific prefix for macros. 2011-08-25 18:51:37 +02:00
Stephen Kelly 3449f6b88c Add quotes in case cmake is installed in a prefix with a space. 2011-08-25 18:30:26 +02:00
David Cole 0ae78b76d5 FindPackageMessage: Eliminate new lines in cache entries
Fix problem exposed by recent commit to FindPythonInterp.
If the find "details" has new lines in it, then replace them
with literal "\n" two character sequences so that the string
may be saved as a cache entry that can be re-read next time
CMake runs.
2011-08-24 14:06:51 -04:00
Stephen Kelly 89108b99ec Look for errors reported by PGI too. 2011-08-24 19:43:04 +02:00
Stephen Kelly e0cc024dc9 Add missing NO_EXPORT macro variant. 2011-08-23 23:26:43 +02:00
Stephen Kelly 1b031d1a3f More consistency in the macro options. 2011-08-23 23:21:29 +02:00
Stephen Kelly 03d60c7d81 Try to make the macros do almost nothing for Watcom. 2011-08-23 20:07:42 +02:00
Stephen Kelly 6adeda9f55 Possibly fix configuration test on AIX. 2011-08-23 19:58:42 +02:00
Stephen Kelly 32eff0caec Test for too-old-intel compilers. 2011-08-23 19:49:39 +02:00
Björn Ricks 1c2508a569 Use FIND_PACKAGE_HANDLE_STANDARD_ARGS second mode
Using the second mode of FIND_PACKAGE_HANDLE_STANDARD_ARGS allows for
checking the version number. Now a user can require a minimum version of
the python interpreter with find_package(PythonInterp VERSION)
2011-08-23 09:52:35 +02:00
Björn Ricks d179500295 Update documentation of FindPythonInterp.cmake
Document new variables and update also comments in cmake code to explain
the current behaviour of FindPythonInterp.cmake module
2011-08-23 09:52:28 +02:00
Björn Ricks 4fd1e28495 Determine python version
Use PYTHON_EXECUTABLE to determine PYTHON_VERSION_STRING,
PYTHON_VERSION_MINOR, PYTHON_VERSION_MAJOR and PYTHON_VERSION_PATCH
2011-08-23 09:52:02 +02:00
Björn Ricks 20980ef56a Search for the installed python interpreter first
The old approach to determine the python executeable chooses the newest
version from _Python_VERSIONS if no additonal versions are passed.
With python it is possible to install different versions side-by-side.
Therefore a user can install e.g. python 2.5 and 2.7. Python 2.7 maybe
only installed for testing new features and 2.5 for building and running
his software. Thus the default installation for the user would be python
2.5 and then returning PYTHON_EXECUTEABLE python2.7 would be wrong. The
new approuch searches first for the the default python executable e.g.
/usr/bin/python on unix and if it can't be found _Python_VERSIONS is
used.
2011-08-23 09:51:23 +02:00
Alex Neundorf 59238dc2de Fix --find-package mode on Cygwin, where enable_language(RC) is called
In --find-package mode we can't enable a language, since a lot of
stuff has not been set up, e.g. which make tool to use.
So disable enable_language() in this mode.

Alex
2011-08-22 21:53:22 +02:00
David Cole 6b3993b0bf CheckSymbolExists: Use IMMEDIATE flag for configure_file (#11333)
The test "complex" sets the variable CMAKE_BACKWARDS_COMPATIBILITY
to 1.4. When that variable is set, configure_file does not default
to IMMEDIATE mode processing. And so, the output file likely does
not exist yet by the time the next line in the CMakeLists.txt file
is processed. When that next line is "try_compile" on that file,
this is a problem.

Fix the problem by explicitly using IMMEDIATE in the configure_file
call.

This problem was quite mysterious, as it only showed up on the
"complex" test, when the previous commit introduced a CheckSymbolExists
call into the FindThreads module. Which is not even explicitly included
in the "complex" test... FindThreads gets included indirectly only
as a side effect of setting CMAKE_BACKWARDS_COMPATIBILITY to 1.4 and
even then it's included indirectly by auto-inclusion of
CMakeBackwardCompatibilityC.cmake...

Wow. Just wow.
2011-08-22 15:50:03 -04:00
Alex Neundorf 98472e45c8 Require the current cmake version in --find-package mode
This fixes the problem that otherwise Platforms/CYGWIN.cmake doesn't
know whether it should set WIN32 or not.
Now it uses always the current behaviour.

Alex
2011-08-22 21:23:55 +02:00
Rolf Eike Beer fd61be7140 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.
2011-08-20 14:36:34 -04:00
Bill Hoffman 3ca1df8e59 Use MSBuild when devenv is not around, since VCExpress seems broken.
To support Intel Fortran, CMake started using devenv and VCExpress
for build tools with VS2010.  However, VCExpress does not always work.
This change makes CMake use MSBuild when devenv is not found. This should
be OK, since Intel Fortran can not be used with VCExpress.
2011-08-18 12:18:30 -04:00
Alex Neundorf cd70f00ea4 Fix #12358: make optionally enabling ASM work again
Alex
2011-08-17 01:00:28 +02:00
Alex Neundorf 7e6d84568c Automoc.cmake is not needed anymore
(actually I thought I had already removed it again)

Alex
2011-08-17 00:04:47 +02:00
David Cole f0d46582c3 Merge topic 'FindGetTextImprovements'
bebb2bc Support REQUIRED in FindGettext.cmake (using FPHSA.cmake)
431c8eb Add macros GETTEXT_PROCESS_POT() and GETTEXT_PROCESS_PO_FILES()
2011-08-16 17:03:12 -04:00
David Cole 829ce746ca Merge topic 'fix-12323-more-paths-in-finddcmtk'
0167cea Add more find_path locations for DCMTK header files (#12323)
2011-08-16 17:03:09 -04:00
David Cole bdedae4b95 Merge topic 'fix-clang-flag-check-issue-12394'
ed6be50 Fix CHECK_(C|CXX)_COMPILER_FLAG for Clang (#12394)
2011-08-16 17:03:05 -04:00
David Cole 674be27a7f Merge topic 'WriteConfigVersionFile_2TemplateFiles'
c9761de Improve documentation for WriteBasicConfigVersionFile.cmake
208bb90 Set UNSUITABLE instead of not COMPATIBLE
bb03c2d Really fix copyright notice
d50a61a Fix copyright notice
4ba09bc Add some tests for write_basic_config_version_file()
02b1e4b Add example to documentation
d216a67 Provide macro write_basic_config_version_file()
2011-08-16 17:03:00 -04:00
David Cole b16de67e8f Merge topic 'FindX11ImprovementsFromKDE'
6899e58 Also search for libxkbfile, XSync and SM include dir
fe6bb7a Remove trailing whitespace
2011-08-16 17:02:30 -04:00
David Cole e9a943bab2 Merge topic 'fix-12054-eliminate-findjava-noise'
f462369 remove extra output message from FindJava.cmake
2011-08-16 17:02:11 -04:00
David Cole dfb307fef5 Merge topic 'fix-old-VisualAge-Fortran'
ad542d8 XL: Fix old VisualAge branding of Fortran compiler
2011-08-16 17:01:47 -04:00
David Cole 39743b9060 Merge topic 'hdf5-module-12316-fix'
ad218e4 Added HDF5 high level Fortran bindings to available components.
2011-08-16 17:01:39 -04:00
Stephen Kelly 1ae3365e9f Exclude PGI from exports and deprecated. 2011-08-16 01:21:59 +02:00
Stephen Kelly f426496055 Exclude cygwin from the hidden visibility feature. 2011-08-16 01:19:37 +02:00
Stephen Kelly f84c7db592 Don't enable deprecated on old GCC
Hopefully a fix for
http://www.cdash.org/CDash/testDetails.php?test=109688480&build=1432057
2011-08-16 01:17:26 +02:00
Stephen Kelly 9672b332b1 Don't enable deprecated on HP. 2011-08-16 01:13:10 +02:00
Alex Neundorf e552ae7cfd Dont check for -isysroot and -mmacosx-version on OSX in --find-package mode
Alex
2011-08-16 00:30:51 +02:00
Alex Neundorf e589589ab1 Rename helper macros print_compile_flags() to set_compile_flags_var()
The same for print_link_flags(), it is now set_link_flags_var().
Both macros don't print anything anymore, this was only in the
beginning.

Alex
2011-08-16 00:22:17 +02:00
Alexey Ozeritsky cfad24a36b fixed: search of ATLAS library for C/C++-only projects 2011-08-15 17:54:28 +04:00
Alex Neundorf 126c6ead77 Add the cmake module required currently for automoc
Alex
2011-08-14 15:58:00 +02:00
Stephen Kelly 97392a7dd3 Fixup forgotten part of aed84517c9 2011-08-14 15:37:24 +02:00
Stephen Kelly 2aeab4f973 Borland can't do deprecated. 2011-08-13 23:49:17 +02:00
Stephen Kelly aed84517c9 Test for deprecated attribute before declspec.
The attribute seems more common, and some compilers seem to silently
ignore the declspec.
2011-08-13 22:58:15 +02:00
Alexey Ozeritsky d5e603026b ACML-GPU supportede 2011-08-13 18:50:57 +04:00
Alexey Ozeritsky af4c58b3bd ACML-GPU supported 2011-08-13 17:03:58 +04:00
Stephen Kelly df4615e338 Add the COMPILER_HAS_DEPRECATED only if it has a declspec variant
_check_cxx_compiler_attribute does it in the alternative.
2011-08-12 00:23:00 +02:00
Stephen Kelly 78a6e1c122 Exclude the XL compiler from the hidden-visibility test. 2011-08-12 00:18:43 +02:00
Alex Neundorf d3ae0fff7d Improve documentation for --find-package mode
Alex
2011-08-11 22:43:45 +02:00
Alex Neundorf bf07375264 Add a cmake.m4 for using cmake in autoconf projects instead of pkgconfig
This file has been written today from scratch by Matthias Kretz
and it BSD-licensed.

Alex
2011-08-11 22:43:33 +02:00
Stephen Kelly e1f7ee3de7 Test for compiler features, instead of for specific platforms. 2011-08-11 19:06:23 +02:00
Stephen Kelly 9554e1013e Split the deprecated available check from setting macro values. 2011-08-11 18:17:12 +02:00
Stephen Kelly 750b67c5a1 Don't use hidden visibility on non-mingw windows either. 2011-08-11 10:53:58 +02:00
Stephen Kelly 1f3be45048 Make sure the hidden visibility variables never get set on MINGW. 2011-08-11 10:39:51 +02:00
Stephen Kelly 399f415b15 Only set the deprecated attribute if hidden visibilty is enabled.
This is what is tested in the unit test. If it makes sense, another
option can be added later.
2011-08-11 10:28:50 +02:00
Alexey Ozeritsky 91b76e2ab9 gotoblas supported 2011-08-11 12:23:49 +04:00
Alexey Ozeritsky 66a4bd0cfb fixed: search of acml libraries 2011-08-11 12:18:39 +04:00
Stephen Kelly 7fa559232e Add some debug output to narrow down deprecation test issues
Particularly Borland and VS7.0 seem to still be failing.
2011-08-10 23:57:04 +02:00
Stephen Kelly 7924c1d6a8 Another attempt at fixing Borland.
Apparently it still needs to be exported, but only declspec(deprecated)
does not work.
2011-08-10 22:19:39 +02:00
Stephen Kelly 50460ea9de Fix off-by-not in test for Borland. 2011-08-10 21:53:58 +02:00
Stephen Kelly fc3772edc9 Another attempt to fix the tests on Borland. 2011-08-10 21:43:16 +02:00
Stephen Kelly bab4a22036 Disable all export macros on Borland. 2011-08-10 21:28:42 +02:00
Stephen Kelly cff9493598 Only set the COMPILER_HAS_HIDDEN_VISIBILITY if GCC >= 4.2
Hearsay has it that before that version it didn't work properly.

Hopefully this will fix more dashboard builds.
2011-08-10 21:14:46 +02:00
Stephen Kelly d123bce1eb Add some debug output.
Hopefully this shows up in continuous test output.
2011-08-10 10:36:24 +02:00
Stephen Kelly 3574b75916 Simplify the compiler feature check 2011-08-10 10:36:23 +02:00
Stephen Kelly c7a937b712 Simplify. We already know we have hidden visibility at this point. 2011-08-10 10:28:15 +02:00
Stephen Kelly 3b188c833b Test for features, not specific compilers. 2011-08-10 10:26:16 +02:00
Stephen Kelly 4718233a37 Remove the fatal_warnings option which is no longer used. 2011-08-10 10:24:36 +02:00
Alex Neundorf bebb2bcd23 Support REQUIRED in FindGettext.cmake (using FPHSA.cmake)
Alex
2011-08-10 02:35:58 +02:00
Alex Neundorf 431c8eb44c Add macros GETTEXT_PROCESS_POT() and GETTEXT_PROCESS_PO_FILES()
These macros (functions actually) can be used to process pot and
po files. Patch prepared by Raphael Kubo da Costa.

Alex
2011-08-10 02:28:26 +02:00
David Cole 0167ceaf98 Add more find_path locations for DCMTK header files (#12323) 2011-08-09 15:15:53 -04:00
Stephen Kelly b19911ecab Add missing licence header. 2011-08-09 19:03:45 +02:00
Alex Neundorf b0e357824c Use the file-utility to test for 64bit if there is no /usr/lib64
Alex
2011-08-09 16:32:45 +02:00
Alex Neundorf 53edfb206b Better support for lib64 and Debian multiarch
If CMAKE_SIZEOF_VOID_P is not set from the outside, it checks for the
existance of /usr/lib64, and if it exists, SIZEOF_VOID_P is set to 8.

For multiarch, if this is debian and
CMAKE_${LANGUAGE}_LANGUAGE_ARCHITECTURE has not been set, it globs
for the files in /lib, and uses the first one which matches
CMAKE_LIBRARY_ARCHITECTURE_REGEX.

Alex
2011-08-09 16:32:45 +02:00
Alex Neundorf b8fdaa1d66 Fix copyright notice in new CMakeFindPackageMode.cmake
Alex
2011-08-09 16:32:45 +02:00
Brad King ed6be501de Fix CHECK_(C|CXX)_COMPILER_FLAG for Clang (#12394)
This compiler warns and returns 0 for unrecognized flags.  We fix the
compiler flag check macros by looking for a warning in the output.
2011-08-08 12:53:17 -04:00
Stephen Kelly def0a54e0a Handle the case where the user changes the DEFINE_SYMBOL property.
This eases porting of KDE code.
2011-08-08 02:08:10 +02:00
Stephen Kelly 30880707c0 Add the GenerateExportMacro with unit tests.
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>
2011-08-07 18:33:47 +02:00
Alex Neundorf c9761de7ad Improve documentation for WriteBasicConfigVersionFile.cmake
Alex
2011-08-05 23:01:07 +02:00
Alex Neundorf 208bb9009b Set UNSUITABLE instead of not COMPATIBLE
Alex
2011-08-05 22:42:57 +02:00
Alex Neundorf 6899e58fa0 Also search for libxkbfile, XSync and SM include dir
Alex
2011-08-03 22:33:18 +02:00
Alex Neundorf fe6bb7af2a Remove trailing whitespace
Alex
2011-08-03 22:32:28 +02:00
Rolf Eike Beer f46236949e remove extra output message from FindJava.cmake
FPHSA already prints out the version number. And this line was printed on
every subsequent CMake run.
2011-08-03 09:40:10 -04:00
Brad King ad542d821d XL: Fix old VisualAge branding of Fortran compiler
Commit 6d434ee6 (Split XL compiler information files, 2009-09-30)
added Platform/AIX-(XL|VisualAge)-(C|CXX|Fortran).cmake modules
to support the old and new compiler branding for all languages.
Add the "AIX-VisualAge-Fortran" combination that was left out
accidentally.
2011-08-02 17:26:29 -04:00
David Cole 80ef23d83f Merge topic 'CodeBlocksIncludeDirsAndDefines'
e2e8c0a Also put builtin include dirs into CodeBlocks project file
92c0dc5 Remove useless line of code
a5683f8 Patch by Campbell Barton: puts definitions into C::B project file
2011-08-02 15:11:58 -04:00
David Cole 6a11727154 Merge topic 'FindGIFAndFreetypeCleanupAndEnhancements'
81a70c6 Add basic version check for giflib
2462f65 FindGif: add giflib4 as one more name for the library under Windows
f97620e FindGIF/FindFreetype.cmake: remove standard search paths from find-calls
7c38523 Strip trailing whitespace
2011-08-02 15:11:53 -04:00
David Cole 737be8f6f6 Merge topic 'FindPostgresqlImprovements'
825c457 FindPostgreSQL: fix PATH_SUFFIXES, better output for FPHSA
e159bb5 Mark the results from find() as advanced
da1bdaf Use FPHSA(), remove unnecessary stuff and don't recommend link_directories()
217d068 More PATH_SUFFIXES for finding Postgresql and also search catalog/pg_type.h
2011-08-02 15:11:45 -04:00
David Cole bd54141d5d Merge topic 'fix-11866-add-watcom-sys-libs'
ff59716 Watcom: Use correct args for execute_process call (#11866)
80769cd Add Watcom support to InstallRequiredSystemLibraries (#11866)
2011-08-02 15:11:35 -04:00
David Cole ab24bdeecc Merge topic 'cpack-nsis-multi-installs'
e6d2bcf CPack/NSIS: Fix reinstall and multiple install issues when using components.
2011-08-02 15:10:47 -04:00
David Cole b01167161c Merge topic 'fix-12245-add-wlib--c-flag'
a0974ae Watcom: Add -c flag to wlib calls (#12245)
2011-08-02 15:10:21 -04:00
David Cole 7ef2f53d02 Merge topic 'qt4-use-check-cxx-symbol'
de30173 Remove C compiler requirement from FindQt4.cmake
2011-08-02 15:10:05 -04:00
David Cole 996eb50364 Merge topic 'RemoveDebugOutput'
6b71bf8 Remove debug output from CheckSymbolExists
2011-08-02 15:10:01 -04:00
David Cole be3ac14ac7 Merge topic 'add-flag-detection-regex'
b7f3f7c Add fail regex to detect supported warning flags correctly.
2011-08-02 15:09:49 -04:00
David Cole 2c7b38afa6 Merge topic 'FeatureSummaryImprovements'
b62349c FeatureSummary.cmake: update documentation
f366cf8 FeatureSummary.cmake: cosmetics
f407bb5 FeatureSummary.cmake: only higher TYPEs can override previous TYPEs
02d47ab FeatureSummary.cmake: error out when a REQUIRED package is missing
91a1527 FeatureSummary.cmake: add INCLUDE_QUIET_PACKAGES keyword
0671a02 FeatureSummary.cmake: remove "comment" field
aae13f4 Extend FeatureSummary: add PURPOSE of package and TYPE
2011-08-02 15:09:41 -04:00
Will Dicharry ad218e435d Added HDF5 high level Fortran bindings to available components. 2011-08-02 10:48:14 -06:00
Alex Neundorf e2e8c0a412 Also put builtin include dirs into CodeBlocks project file
Refactor code from CMakeFindEclipseCDT4.cmake so it can be used
alkso for CodeBlocks, and move it into new file
CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake.

Alex
2011-08-02 01:46:39 +02:00
Alex Neundorf 81a70c6ad2 Add basic version check for giflib
This is used e.g. in KDE, there on Solaris an old version of giflib
was found (version 3), which could be detected by checking for the
UserData member variable:
http://websvn.kde.org/?view=revision&revision=545738

Alex
2011-08-02 00:30:58 +02:00
Alex Neundorf bb03c2dd3a Really fix copyright notice
Alex
2011-08-01 23:57:32 +02:00
Alex Neundorf d50a61a1ae Fix copyright notice
Alex
2011-08-01 23:44:17 +02:00
Alex Neundorf 4ba09bc6a2 Add some tests for write_basic_config_version_file()
Alex
2011-08-01 23:29:27 +02:00
Alex Neundorf 02b1e4b96a Add example to documentation
Alex
2011-08-01 23:03:47 +02:00
Alex Neundorf d216a67e4a Provide macro write_basic_config_version_file()
This macro can be used to generate basic version files which can be
installed along a Config.cmake file to provide versioning support.

This (3rd try) is implemented using a macro, which maps
the COMPATIBILITY mode to a filename and configure_file()s the
resulting file.

Alex
2011-08-01 22:59:18 +02:00
Alex Neundorf 825c45739d FindPostgreSQL: fix PATH_SUFFIXES, better output for FPHSA
Alex
2011-08-01 22:32:21 +02:00
Alex Neundorf e159bb5bf8 Mark the results from find() as advanced
Alex
2011-08-01 22:32:18 +02:00
Alex Neundorf da1bdaf16a Use FPHSA(), remove unnecessary stuff and don't recommend link_directories()
-don't recommend using link_directories()
-don't do the extra if(EXISTS) checks, since the code is already inside a if(PostgreSQL_FOUND)

Alex
2011-08-01 22:30:47 +02:00
Alex Neundorf 217d068b6d More PATH_SUFFIXES for finding Postgresql and also search catalog/pg_type.h
Patch from Jaroslaw Staniek, reviewed by Andrew Maclean

Alex
2011-08-01 22:30:20 +02:00
David Cole ff59716351 Watcom: Use correct args for execute_process call (#11866)
I botched an exec_program to execute_process translation on Friday.
RESULT_VARIABLE is the correct argument to execute_process.
2011-08-01 15:29:13 -04:00
Alex Neundorf 6b71bf8876 Remove debug output from CheckSymbolExists
...which shouldn't have been committed.

Alex
2011-07-29 23:27:28 +02:00
Clinton Stimpson e6d2bcfde2 CPack/NSIS: Fix reinstall and multiple install issues when using components.
Fix NSIS template to more thoroughly use CPACK_PACKAGE_INSTALL_REGISTRY_KEY.
This allows different versions of software to have a separate sections in the
registry to keep track of things (installed components, and uninstall stuff).

Change default of CPACK_PACKAGE_INSTALL_REGISTRY_KEY to follow the value of
CPACK_PACKAGE_INSTALL_DIRECTORY so if an installation overwrites another installation,
the proper registry entries are more likely to be overwritten.

Fix CPack/NSIS generator to not insert code in the NSIS template to skip installation
of already installed components.  This enables a repair like behavior and also enables
installing patch releases on top of an older installation.
2011-07-29 12:23:22 -06:00
David Cole a0974ae2e6 Watcom: Add -c flag to wlib calls (#12245)
Allows wlib to generate proper exports if two routines have
the same spelling, but different case (like Scale and scale).

Thanks to J Decker for the patch.
2011-07-29 13:52:23 -04:00
David Cole 80769cdd1e Add Watcom support to InstallRequiredSystemLibraries (#11866)
Also adds code to determine the version of the Watcom compiler
in use.

Thanks to J Decker for the patch.
2011-07-29 13:28:54 -04:00
Clinton Stimpson de30173d5b Remove C compiler requirement from FindQt4.cmake
Use the new check_cxx_symbol_exists instead of check_symbol_exists.
Also remove a debug message from CheckSymbolExists.cmake.
2011-07-28 12:15:46 -06:00
David Cole b7f3f7cdb6 Add fail regex to detect supported warning flags correctly.
On Apple's gcc, the compiler emits a warning such as "warning: command
line option "-Wno-deprecated" is valid for C++/ObjC++ but not for C"
when it is passed that flag on its command line.

When testing for that flag with a plain C file, we should report that
the flag is unsupported for C files. The new FAIL_REGEX option added
here produces this behavior.
2011-07-27 15:01:50 -04:00
Alex Neundorf 2462f65085 FindGif: add giflib4 as one more name for the library under Windows
Alex
2011-07-27 20:40:39 +02:00
Alex Neundorf f97620e733 FindGIF/FindFreetype.cmake: remove standard search paths from find-calls
In both files find_path() and find_library() are called with multiple
additional search PATHS which are already anyway part of the default
search dirs, so it should be safe to remove them.

Alex
2011-07-27 20:34:09 +02:00
Alex Neundorf 7c38523470 Strip trailing whitespace
Alex
2011-07-27 20:32:59 +02:00
Brad King 5047a52d1c Merge topic 'search-for-aspell'
bb3a438 Search for the ASPELL executable
2011-07-26 14:57:53 -04:00
Brad King df7a95629c Merge topic 'qt4-apple-framework-fix'
702538e Qt4: Fix reference of undefined variable when detecting frameworks on Mac OS X
2011-07-26 14:57:48 -04:00
Brad King c2b2968825 Merge topic 'cross-qt4-find-includes'
0ae8a34 Add qt4/QtCore to help find Qt headers when cross-compiling.
2011-07-26 14:57:44 -04:00
Brad King a234b3a4fc Merge topic 'CheckCXXSymbolExists'
757a6a0 Add CheckCXXSymbolExists.cmake, so this can be used also for C++
2011-07-26 14:57:19 -04:00
Brad King ccd4c8b202 Merge topic 'PushCheckState'
d64ba0b Fix copyright notice test
1325260 Add macros cmake_push/pop_check_state() as discussed on the list.
2011-07-26 14:57:05 -04:00
Brad King 0cfd25681c Merge topic 'qt4-no-build-type'
5a2b208 Add -DQT_NO_DEBUG if no build type is specified so Qt plugins will work.
2011-07-26 14:56:30 -04:00
Brad King e25c0d046a Merge topic 'FindSubversion-non-interactive-issue-12304'
0c6e852 FindSubversion: Invoke svn non-interactively (#12304)
2011-07-26 14:56:00 -04:00
Brad King 7453581c78 Merge topic 'FindMPI-try-regular-compiler'
8756e77 Fix issues with removing try_compile input file.
e00d2c4 Try regular compiler when no MPI compiler.
2011-07-26 14:55:48 -04:00
Brad King 4a18c30a42 Merge topic 'vs-ia64'
aed92cc Add VisualStudio 9 and 10 generators for Itanium platform
d44c68f VS: Factor Find64BitTools out of Win64 generator to parent
2011-07-26 14:54:56 -04:00
Brad King 2b16232d45 Merge topic 'asn_java_support'
1417a55 Java: Fix documentation format and indentation
0b7627d Java: Use set_property/get_property for target variables.
b01a505 Java: Create correct jar archive dependencies.
f99c312 Java: Added some dependency magic to avoid recompilations.
f3233ba Java: Create java_class_filelist only if it does't exist.
a22ed3d Tests: Check for the new Java exeutable variables.
c177c8e Tests: Java tests should test UseJava.cmake
5c2106c Modules: Added CMake Java support.
a4b6275 FindJava: Find missing java development executables.
2011-07-26 14:54:33 -04:00
Clinton Stimpson 702538eaa3 Qt4: Fix reference of undefined variable when detecting frameworks on Mac OS X 2011-07-25 12:30:30 -06:00
Arnaud Gelas bb3a4381bb Search for the ASPELL executable 2011-07-22 17:04:27 -04:00
Clinton Stimpson 0ae8a3405b Add qt4/QtCore to help find Qt headers when cross-compiling. 2011-07-22 13:38:36 -06:00
Alex Neundorf b62349cc60 FeatureSummary.cmake: update documentation
Alex
2011-07-17 21:23:13 +02:00
Alex Neundorf f366cf8a86 FeatureSummary.cmake: cosmetics
-move the compat function to the bottom of the file
-make all except one endif() empty

Alex
2011-07-17 20:47:11 +02:00
Alex Neundorf f407bb5da2 FeatureSummary.cmake: only higher TYPEs can override previous TYPEs
This way e.g. a REQUIRED cannot become OPTIONAL, only the other way round

Alex
2011-07-17 20:41:09 +02:00
Alex Neundorf 02d47abe58 FeatureSummary.cmake: error out when a REQUIRED package is missing
Alex
2011-07-17 20:26:49 +02:00
Alex Neundorf 91a1527735 FeatureSummary.cmake: add INCLUDE_QUIET_PACKAGES keyword
Now found packages are not stored in ENABLED/DISABLED_FEATURES
anymore, but always in PACKAGES_FOUND/NOT_FOUND.
ENABLED/DISABLED_FEATURES is now only used via
ADD_FEATURE_INFO(), e.g. for stuff set via option().

Alex
2011-07-17 17:48:00 +02:00
Alex Neundorf 0671a02920 FeatureSummary.cmake: remove "comment" field
What was given as comment to set_package_info(), now goes into
the PURPOSE field. It was not clear what the comment should contain,
with the PURPOSE this is much clearer now.

Alex
2011-07-17 16:03:38 +02:00
Alex Neundorf aae13f4c8e Extend FeatureSummary: add PURPOSE of package and TYPE
With the PURPOSE a project can state what the package in question
is used for in the project (as opposed to describing what the package
does in general).
TYPE can be one of OPTIONAL (default)
                   RUNTIME - not needed for building, only at runtime
                   RECOMMENDED - as OPTIONAL, but you should really have it
                   REQUIRED - cmake will fail if one of these is not found

This can be set using the new function set_package_properties()

Alex
2011-07-17 15:57:50 +02:00
Alex Neundorf 757a6a091c Add CheckCXXSymbolExists.cmake, so this can be used also for C++
This commit splits check_symbol_exists() so that the actual
implementation can be also used by check_cxx_symbol_exists()

Alex
2011-07-08 21:09:32 +02:00
Alex Neundorf d64ba0b8b4 Fix copyright notice test
Alex
2011-07-07 22:26:07 +02:00
Alex Neundorf 1325260a66 Add macros cmake_push/pop_check_state() as discussed on the list.
This patch adds two macros cmake_push_check_state() and
cmake_pop_check_state(), which can be used to save and restore
the contents of the CMAKE_REQUIRED_xxx variables.

Alex
2011-07-07 22:09:44 +02:00
Alex Neundorf e4f603b698 Implement find-package mode of cmake
In find-package mode, cmake executes Modules/CMakeFindPackage.cmake,
which calls find_package(), and this is then evaluated in cmake.cxx,
which prints an appropriate message to stdout, so it can be used
e.g. in a normal Makefile:

$ /opt/cmake-HEAD/bin/cmake --find-package -DNAME=JPEG
 -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=EXIST
JPEG found.
$ /opt/cmake-HEAD/bin/cmake --find-package -DNAME=JPEG
 -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=COMPILE

$ /opt/cmake-HEAD/bin/cmake --find-package -DNAME=JPEG
 -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=LINK
-rdynamic -ljpeg

Alex
2011-07-02 23:14:28 +02:00
Brad King d2430b2ffd Merge topic 'revert-fixbug_0004147'
fc04531 Revert "Add a new function SWIG_GET_WRAPPER_DEPENDENCIES to UseSWIG.cmake"
2011-06-28 16:27:06 -04:00
Brad King fc045318f8 Revert "Add a new function SWIG_GET_WRAPPER_DEPENDENCIES to UseSWIG.cmake"
This reverts commit 1088b0278e.

Wrapper dependency scanning (fix for #4147) does not work at CMake
configuration time if an input file is provided by a custom command
(regression #12307).  Revert to original behavior until a solution is
found.
2011-06-27 13:36:01 -04:00
Brad King 4ccf44bcb2 Merge topic 'use_devenv_forvs2010'
8555c2b Look for VCExpress as a possible build tool as well as devenv.
ed0075b Use relative paths for custom command inputs.
38368d5 Revert "With very long file names, VS 2010 was unable to compile files."
8cd66dc Use devenv instead of msbuild for vs2010.
2011-06-24 17:32:03 -04:00
Aaron C. Meadows 0c6e8524fe FindSubversion: Invoke svn non-interactively (#12304)
Otherwise Subversion_WC_LOG hangs if credentials are not set.
2011-06-24 15:41:43 -04:00
Clinton Stimpson 5a2b208617 Add -DQT_NO_DEBUG if no build type is specified so Qt plugins will work. 2011-06-23 10:08:28 -06:00
Todd Gamblin 8756e77fb4 Fix issues with removing try_compile input file.
- Don't remove input file
- Put output in ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}
- Remove try_compile variable from the cache after using
2011-06-21 14:02:01 -07:00
Bill Hoffman 8cd66dc0d2 Use devenv instead of msbuild for vs2010. 2011-06-21 15:58:11 -04:00
Todd Gamblin e00d2c4d51 Try regular compiler when no MPI compiler.
If FindMPI can't interrogate any of the available compilers, it attempts to compile simple MPI
programs with CMAKE_${lang}_COMPILER.  If this works, it uses that as MPI_${lang}_COMPILER.

This allows MPI to be discovered on Cray XT/XE systems, where modules are used and cc, CC, and ftn
compilers *are* MPI compilers.
2011-06-21 10:14:01 -07:00
Brad King ddd6e8ed55 Merge topic 'FindJNI-Fedora-issue-12276'
93fc629 FindJNI: Search in Fedora arch-specific JVM location (#12276)
2011-06-20 15:14:07 -04:00
Brad King 26c449d1d9 Merge topic '11279_vs10sp1_and_improvements'
effb6bb Detect VS 2010 SP1, faster and more robust detection
2011-06-20 15:13:57 -04:00
Brad King 2822bd184d Merge topic 'doc-spelling-formatting-issue-12287'
d66459b Documentation: Fix spelling / formatting errors (#12287)
2011-06-20 15:13:37 -04:00
Brad King 25b0b777f6 Merge topic 'FindBoost_bugfixes_060911'
974374a FindBoost: Also search for 1.46.1
f26d1cf FindBoost: Fixes #12188
2011-06-20 15:13:25 -04:00
Brad King 2ae5a43fa7 Merge topic 'FindSWIG-find_program-NAMES-issue-12280'
03809b1 FindSWIG: Use NAMES in find_program directives (#12280)
2011-06-20 15:12:55 -04:00
Andreas Schneider 1417a55754 Java: Fix documentation format and indentation 2011-06-20 10:01:50 -04:00
Andreas Schneider 0b7627df0a Java: Use set_property/get_property for target variables. 2011-06-20 10:00:11 -04:00
Matej Hribernik aed92ccea6 Add VisualStudio 9 and 10 generators for Itanium platform 2011-06-20 08:31:13 -04:00
Modestas Vainius d66459be8b Documentation: Fix spelling / formatting errors (#12287)
The patch fixes the following problems spotted by lintian:

W: cmake-data: manpage-has-errors-from-man usr/share/man/man1/cmakemodules.1.gz 2641: warning [p 39, 1.5i]: can't break line
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakeprops.1.gz explict explicit
I: cmake: spelling-error-in-binary usr/bin/cmake explict explicit
I: cmake: spelling-error-in-binary usr/bin/cpack explict explicit
I: cmake: spelling-error-in-binary usr/bin/ctest explict explicit
W: cmake: manpage-has-errors-from-man usr/share/man/man1/cmake.1.gz 7300: warning [p 120, 3.3i]: can't break line
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz explict explicit
I: cmake-curses-gui: spelling-error-in-binary usr/bin/ccmake explict explicit
I: cmake-qt-gui: spelling-error-in-binary usr/bin/cmake-gui explict explicit
2011-06-19 18:08:05 -04:00
Julien Malik 03809b1442 FindSWIG: Use NAMES in find_program directives (#12280)
Without this, regular swig (not 2.0) executable is not found
automatically.

Commit 55b7c87e (Add support for new swig 2.0 application, 2011-03-28)
added support for finding swig 2.0 at the (accidental) expense of not
finding 1.x.  Fix this regression.
2011-06-16 16:10:16 -04:00
Christoph Höger 93fc629adc FindJNI: Search in Fedora arch-specific JVM location (#12276) 2011-06-15 13:18:14 -04:00
Philip Lowman effb6bbfd7 Detect VS 2010 SP1, faster and more robust detection
Patch from Aaron C. Meadows
Adds support for detecting VS 2010 SP1
Also improves performance using CMAKE_CXX_COMPILER if it is available
and for robustness falls back using try_compile() and try_run()
2011-06-15 08:33:40 -04:00
Brad King cc746a6eb7 Merge topic 'library-multiarch-issue-12037'
1ed19bc multiarch: Set CMAKE_LIBRARY_ARCHITECTURE_REGEX for Linux|Hurd|kFreeBSD
52a6ed2 Test find_package multiarch support (#12037)
b41ad3b Teach find_(library|package) about Linux multiarch (#12037)
2011-06-14 13:23:51 -04:00
Brad King 9c569bea2d Merge topic '10997_PROTOBDUF_GENERATE_CPP_returns_wrong_path'
3982603 10997: PROTOBUF_GENERATE_CPP now supports proto files outside current dir
2011-06-14 13:23:43 -04:00
Brad King 414c35ebb2 Merge topic 'qt4-import-targets-mac'
e7f05d9 Add imported targets support for frameworks on Mac.
2011-06-14 13:23:37 -04:00
Brad King a652af77ce Merge topic 'qt4-useqt-module-deps'
5f983d1 Qt4: complete module dependencies in UseQt4.cmake
2011-06-14 13:23:33 -04:00
Brad King 0373e08f15 Merge topic 'gnu-isystem-flag-issue-12258'
33f5a83 GNU: Fix CMAKE_INCLUDE_SYSTEM_FLAG_<lang> value (#12258)
2011-06-14 13:23:28 -04:00
Philip Lowman 3982603c65 10997: PROTOBUF_GENERATE_CPP now supports proto files outside current dir 2011-06-14 09:25:16 -04:00
Clinton Stimpson 5f983d1706 Qt4: complete module dependencies in UseQt4.cmake 2011-06-13 17:37:26 -06:00
Clinton Stimpson e7f05d9759 Add imported targets support for frameworks on Mac. 2011-06-13 17:21:41 -06:00
Brad King 33f5a83a5d GNU: Fix CMAKE_INCLUDE_SYSTEM_FLAG_<lang> value (#12258)
Fix typo introduced by commit e28c16b4 (Split GNU compiler information
files, 2009-12-02).

Reported-by: Campbell Barton <ideasman42@gmail.com>
Suggested-by: Michael Hertling <mhertling@online.de>
2011-06-13 17:54:36 -04:00
Modestas Vainius 1ed19bcb25 multiarch: Set CMAKE_LIBRARY_ARCHITECTURE_REGEX for Linux|Hurd|kFreeBSD
* Fix linux CMAKE_LIBRARY_ARCHITECTURE_REGEX to support armel-linux-gnueabi.
* Add CMAKE_LIBRARY_ARCHITECTURE_REGEX on kFreeBSD.
* Add CMAKE_LIBRARY_ARCHITECTURE_REGEX on GNU (Hurd).

Also regex is improved to support quadlets.  Even if I have not seen this
in the wild yet, reportedly they are possible.
2011-06-13 11:12:23 -04:00
Eric NOULARD 2af80c76ee Add some more Specs file tag handling. 2011-06-12 12:49:44 +02:00
Eric NOULARD 05720c75c1 CPackRPM: Enhance documentation 2011-06-12 12:12:24 +02:00
Philip Lowman 974374a9cd FindBoost: Also search for 1.46.1 2011-06-09 23:23:41 -04:00
Philip Lowman f26d1cf154 FindBoost: Fixes #12188
Workaround an issue where users wanted to use Boost_LIBRARIES with the
install() command and debug/optimized keywords were interfering.  Now
debug/optimized keywords are removed if the release & debug library
are the same.
2011-06-09 23:20:18 -04:00
Brad King b41ad3b399 Teach find_(library|package) about Linux multiarch (#12037)
Implement support for multiarch as specified here:

  http://wiki.debian.org/Multiarch
  https://wiki.ubuntu.com/MultiarchSpec

Detect the <arch> part of <prefix>/lib/<arch> from the implicit library
search path from each compiler to set CMAKE_<lang>_LIBRARY_ARCHITECTURE.
Define CMAKE_LIBRARY_ARCHITECTURE using one of these values (they should
all be the same).  Teach the find_library and find_package commands to
search <prefix>/lib/<arch> whenever they would search <prefix>/lib.
2011-06-08 10:04:44 -04:00
Brad King 40792a1a15 Merge topic 'fix-12034-fixup-bundle-with-non-dotapp-exe'
51e16c0 BundleUtilities: Avoid test on Watcom dashboards (#12034)
41f962a Revert "BundleUtilities: Run test on Windows if either MSVC or dumpbin was found."
e17135e BundleUtilities: Add rpath to loadable modules in test.
8064044 BundleUtilities: Print reason for not loading module.so
f3de459 BundleUtilities: Run test on Windows if either MSVC or dumpbin was found.
900bf98 BundleUtilities: Disable running test on Windows unless using MSVC.
fa4dc08 BundleUtilities: Fix issues with custom target DEPENDS in test (#12034)
e40b79e BundleUtilities: Fix test when using xcode (#12034)
b68d3dc BundleUtilities: Fix regex to extract dependents from ldd (#12034)
7ac7b43 BundleUtilities: Work w/ non .app exes on Mac (#12034)
2011-06-07 14:06:09 -04:00
Brad King 43d3048582 Merge topic 'fix-BundleUtilities-cryptic-error-message'
8f0667c BundleUtilities: Avoid a cryptic and unhelpful error message
2011-06-07 14:05:57 -04:00
David Cole 8f0667c113 BundleUtilities: Avoid a cryptic and unhelpful error message
When the path to "resolved_embedded_item" was shorter than
the path to the bundle being fixed up, fixup_bundle would
fail with a cmake error like:

  "string end index: 110 is out of range 0 - 85"

Detect when the path of resolved_embedded_item is too short
to be embedded in the bundle, and report the proper error
message, so the poor developer reading it has a snowball's
chance of actually fixing the issue.
2011-06-02 11:55:09 -04:00
Brad King 87b8b3c0a0 Merge topic 'XL-Fortran-moddir-issue-12246'
3bb8566 XL: Place Fortran modules with -qmoddir= flag (#12246)
2011-06-02 11:29:22 -04:00
Brad King e164bb1e76 Merge topic '12128_FindProtobuf_module_behavior_under_Windows_is_annoying'
517837f Fix , to - in Copyright message so it passes CMake.ModuleNotices test
162f3fb Merge branch 'master' of git://public.kitware.com/cmake into 12128_FindProtobuf_module_behavior_under_Windows_is_annoying
ca000a0 FindProtobuf: Better MSVC support, Searching for protobuf lite
2011-06-02 11:28:59 -04:00
Brad King 18c703db66 Merge topic 'hdf5-module-bug-fix'
e38216c Remove unnecessary mark_as_advanced from FindHDF5.
93ba19e FindHDF5 ensures good link lines when libraries are duplicated.
0584701 Fix for bug 11752, mixed debug and release libraries.
4e12284 Use HDF5_FOUND to control autoconf and CMake built FindHDF5.
2ba826e Use CMAKE_CURRENT_LIST_DIR to locate FindPackageHandleStandardArgs.
3978f32 Add logic for CMake built HDF5 install.
063ac87 HDF5 high level library is a find COMPONENT now.
34ea179 Modified the FindHDF5.cmake file to locate the Fortran bindings.
2011-06-02 11:28:50 -04:00
Brad King 3bb8566868 XL: Place Fortran modules with -qmoddir= flag (#12246)
Suggested-by: Luis Kornblueh <luis.kornblueh@zmaw.de>
2011-06-01 12:00:48 -04:00
Clinton Stimpson b68d3dc1b5 BundleUtilities: Fix regex to extract dependents from ldd (#12034)
This regex works with spaces in the path.
2011-05-31 13:12:28 -04:00
Clinton Stimpson 7ac7b437b8 BundleUtilities: Work w/ non .app exes on Mac (#12034)
Also add a test of BundleUtilities including an exe,
some shared libs, a plugin, and a framework-style lib.

This test presently runs (and this functionality works)
on Linux, Mac and Windows.

For now, the framework-style lib is built as a plain old
shared lib because there is another yet-unresolved issue
with local frameworks without rpaths on the Mac.
2011-05-27 16:11:43 -04:00
Philip Lowman 517837fb47 Fix , to - in Copyright message so it passes CMake.ModuleNotices test 2011-05-26 02:21:58 -04:00
Philip Lowman 162f3fb413 Merge branch 'master' of git://public.kitware.com/cmake into 12128_FindProtobuf_module_behavior_under_Windows_is_annoying 2011-05-25 22:10:19 -04:00
Philip Lowman ca000a0948 FindProtobuf: Better MSVC support, Searching for protobuf lite
Add support for finding debug libraries
Add support for searching Google provided MSVC project dir structure for libs
Add support for finding Protobuf "Lite" libraries
2011-05-25 22:01:49 -04:00
Will Dicharry e38216c6e9 Remove unnecessary mark_as_advanced from FindHDF5. 2011-05-25 13:19:26 -06:00
Will Dicharry 93ba19e070 FindHDF5 ensures good link lines when libraries are duplicated.
Duplicates must be removed from the beginning of the link libraries
to ensure unresolved symbols can be found.
2011-05-25 12:53:28 -06:00
Will Dicharry 0584701ae4 Fix for bug 11752, mixed debug and release libraries. 2011-05-25 12:38:54 -06:00
Will Dicharry 4e12284424 Use HDF5_FOUND to control autoconf and CMake built FindHDF5. 2011-05-25 12:34:21 -06:00
Will Dicharry 2ba826e060 Use CMAKE_CURRENT_LIST_DIR to locate FindPackageHandleStandardArgs. 2011-05-24 12:53:49 -06:00
Brad King e51bbc14f6 Merge topic 'output-compile-lines'
cdc2b41 Fix CompileCommandOutput test build on Windows
7039d1f Fix CompileCommandOutput test for Make tools not supporting spaces
4268e3d run_compile_commands: Cast istream::get() result to char
c45c60b run_compile_commands: Avoid extra stl vector conversion
7c5be51 run_compile_commands: Avoid shadow in std::map<>::at workaround
169bb05 Provide std::map<>::at for use in run_compile_commands
4e2185c Make std::map usage more portable in language=>flags/defines maps
a7e7a04 Fix run_compile_commands build on Apple GCC 3.3
c9174c0 Fix signed/unsigned comparison in EscapeJSON
8346a28 Only offer the compile command output feature on unix systems
0e6b05f Adds a test for the compile command line output.
5674844 make compile command output optional
fe07b05 implement cxx command output
65c0c24 cache flags and defines
3f064ef refactor flags and defines
2011-05-24 14:48:14 -04:00
Brad King 14a6bda1a2 Merge topic 'CPackRPM-fixForAIX'
db45b10 CPack  make RPM work on AIX. fix #0012183 merge patch from Pasi Valminen
2011-05-24 14:34:46 -04:00
Brad King 1605784f47 Merge topic 'absoft-fortran-compiler'
8bd3e51 Absoft: Enable FortranCInterface check in Fortran test
d7b376b Absoft: Detect implicit link libraries on Linux and Mac
ac5b999 Add Absoft Fortran compiler id and basic flags
2011-05-24 14:34:40 -04:00
Eric NOULARD db45b10ff7 CPack make RPM work on AIX. fix #0012183 merge patch from Pasi Valminen 2011-05-21 12:34:37 +02:00
Brad King d7b376b3a7 Absoft: Detect implicit link libraries on Linux and Mac
Use the "-X -v" flag to the Absoft front-end to pass "-v" to the gcc it
invokes under the hood.  Teach CMakeParseImplicitLinkInfo to exclude
linker version lines from consideration as link lines.  Fix parsing of
Sun's linker search path option "-Y..." to avoid conflict with the Mac
linker option "-Y<num>".
2011-05-20 08:57:51 -04:00
Brad King ac5b999fff Add Absoft Fortran compiler id and basic flags
Identification at preprocessing time depends on definition of __ABSOFT__
to be added in service pack V11.1.2 of the compiler.
2011-05-20 08:53:36 -04:00
Will Dicharry 3978f3221f Add logic for CMake built HDF5 install.
The find module calls find_package( HDF5 QUIET NO_MODULE ). If that succeeds,
the find module variables are set based on the imported target locations.
2011-05-16 15:41:18 -06:00
Will Dicharry 063ac873ce HDF5 high level library is a find COMPONENT now.
The HDF5 high level library was originally hard coded as a dependency when the C
bindings are desired. The high level API is now requested as a COMPONENT.
2011-05-16 15:36:47 -06:00
Tim Gallagher 34ea179013 Modified the FindHDF5.cmake file to locate the Fortran bindings. 2011-05-16 15:35:57 -06:00
Manuel Klimek 8346a28a0a Only offer the compile command output feature on unix systems 2011-05-16 10:42:10 -04:00
Brad King 0bfabf967f OpenBSD: Use 'arch -s' for host processor (#12143)
On OpenBSD 'uname -p' returns a long descriptive name for the processor.
Use 'arch -s' instead to get a short cpu name.

Suggested-by: Stuart Henderson
2011-05-02 10:33:18 -04:00
Brad King aebf98b4f1 Merge topic 'multilingual-FindMPI'
a55da06 Added backward compatibility for input as well as output vars.
a32a633 FindMPI: Fix documentation formatting
706b73e FindMPI: Handle multiple languages
2011-04-26 14:25:10 -04:00
Manuel Klimek 5674844de4 make compile command output optional 2011-04-25 13:27:58 -04:00
Todd Gamblin a55da06948 Added backward compatibility for input as well as output vars.
Users can now supply MPI_COMPILER, MPI_INCLUDE_PATH, MPI_LIBRARY,
and others as with the old FindMPI.  These are mapped to their
respective equivalents for C and CXX.  Fortran is not touched, as
there was no Fortran support in the old FindMPI.
2011-04-24 18:55:23 +09:00
Brad King 2b44534950 Merge topic 'FindITK-passthru'
aa170c2 FindITK: Use passthru find_package config mode for messages
2011-04-19 14:08:20 -04:00
Brad King 4d2d9d44e6 Merge topic 'add-svn-trust-cert-to-ExternalProject'
12a3699 ExternalProject: Always use --non-interactive with svn
3a5a402 ExternalProject: Add SVN_TRUST_CERT argument
2011-04-19 14:08:18 -04:00
Brad King aa170c20f7 FindITK: Use passthru find_package config mode for messages
The custom error message that mentions PREFIX/lib/InsightToolkit is not
accurate for ITKv4.  Just use the more generic message that find_package
generates by default.  This module is now almost a no-op but exists to
tell find_package to look for the InsightToolkit name as well as ITK.
2011-04-18 14:11:54 -04:00
David Cole 12a3699372 ExternalProject: Always use --non-interactive with svn
The previous commit added --non-interactive as a "side effect"
of turning on SVN_TRUST_CERT. While reviewing that commit, we
decided all ExternalProject svn usage should be non-interactive.

That way, if there's any sort of problem, svn will return an
error right away rather than hang forever waiting for input...
2011-04-18 11:34:00 -04:00
Eric NOULARD d3fd945900 CPackRPM Fix #12096: handle absolute install path with component install 2011-04-17 17:12:38 +02:00
Brad King 051a2200da Merge topic 'fixbug_0011782'
0378396 UseSWIG.cmake did not support multiple modules and parallel builds
2011-04-12 14:44:16 -04:00
Brad King 65a05b8ff0 Merge topic 'fixbug_0011676'
5f76833 Add support for Java on HP
2011-04-12 14:44:13 -04:00
Brad King dff009626d Merge topic 'fixbug_0011215'
c088536 UseSWIG.cmake does not expand $(OutDir)
2011-04-12 14:44:09 -04:00
Brad King bc888800f5 Merge topic 'fixbug_0011183'
a59d198 Add support for java on fedora
2011-04-12 14:43:59 -04:00
Brad King 0a340142aa Merge topic 'fixbug_0010242'
4f35488 Add support for FindJava on HP-UX and alpha
2011-04-12 14:43:57 -04:00
Brad King 6ae7b5bb83 Merge topic 'fixbug_0004147'
1088b02 Add a new function SWIG_GET_WRAPPER_DEPENDENCIES to UseSWIG.cmake
2011-04-12 14:43:51 -04:00
Brad King f464eb203e Merge topic 'fixbug0011843'
55b7c87 Add support for new swig 2.0 application
2011-04-12 14:43:48 -04:00
Brad King 445611e53e Merge topic 'refine-XL-rules'
d468a2c XL: Avoid copying archives into shared libraries that link them
2011-04-12 14:43:39 -04:00
Brad King c53119641f Merge topic 'refine-XL-compiler-information'
2f3eee7 XL: Consolidate compiler flag information
3a40c7f XL: Set C++ and Fortran flags consistently with C
2011-04-12 14:43:34 -04:00
David Cole 3a5a402a53 ExternalProject: Add SVN_TRUST_CERT argument
Which adds --non-interactive and --trust-server-cert to the svn
checkout and update command lines. This allows ExternalProject
clients to pull from an https:// based svn server even though
the server may not have a valid or trusted certificate.

Caveat emptor: I would NOT recommend using this except as a
short-term work-around. Rather, the server should have a valid,
trusted certificate, or the client should be using "http" instead
of "https".
2011-04-11 16:34:58 -04:00
Mathieu Malaterre 4f35488fe9 Add support for FindJava on HP-UX and alpha
This commit fixes BUG: 0010242. It now properly inspect specific directory
on hp-ux and alpha implementation of the JRE
2011-04-08 15:19:28 +02:00
Mathieu Malaterre 0378396e68 UseSWIG.cmake did not support multiple modules and parallel builds
This commit fixes BUG: 0011782. UseSWIG would be using the same variable
to declare module information. The problem would only be noticed in parallel builds
Fix this variable declaration by properly resetting it.
2011-04-08 15:17:33 +02:00
Mathieu Malaterre 55b7c87ef2 Add support for new swig 2.0 application
This commit fixes BUG: 0011843. It now properly discover if swig2.0
is in the PATH
2011-04-08 15:15:58 +02:00
Mathieu Malaterre c088536518 UseSWIG.cmake does not expand $(OutDir)
This commit fixes BUG: 0011215 by properly expanding $(OutDir)
Instead of creating the output directory using file(MAKE_DIRECTORY)
we use cmake -E to create the directory at execution time
2011-04-08 15:13:57 +02:00
Mathieu Malaterre a59d198aa3 Add support for java on fedora
This commit fixes BUG: 0011183 by adding new paths used on fedora,
specifically: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0
2011-04-08 15:12:23 +02:00
Mathieu Malaterre 5f7683317a Add support for Java on HP
This commit fixes Bug: 0011676 by adding support for version
numbering of JRE used on HP: 1.6.0.06-jinteg_20_jan_2010_05_50-b00
2011-04-08 15:10:48 +02:00
Mathieu Malaterre 1088b0278e Add a new function SWIG_GET_WRAPPER_DEPENDENCIES to UseSWIG.cmake
This commit fixes BUG: 0004147 it directly uses swig executable
to compute a list of dependencies directly from the .i files
to make sure to rebuild the swig module any of its direct dep.
is touched
2011-04-08 15:07:40 +02:00
Brad King d468a2c2cb XL: Avoid copying archives into shared libraries that link them
The XL toolchain supports shared object files stored in archives.  Since
CMake lists libraries on link lines by full path it is common for a
shared library link line to contain the path to an archive file.

When linking a shared library the compiler front-end by default runs
CreateExportList to construct the list of symbols to be exported.
Unfortunately it passes all files found on the command line to the tool
so archive and library files get processed along with the object files.
The tool returns a list of all symbols in all objects, archives, and
libraries on the command line.  This causes the linker to copy every
object file out of every archive into the shared library whether they
are dependencies of the original object files or not.

Work around this problem by running CreateExportList ourselves with just
the original object files intended for inclusion in the shared library.
Then pass the list it produces on the link line to prevent the compiler
front-end from constructing its own.  This tells the linker to export
only the symbols provided by the original source files of the shared
library.
2011-04-08 08:41:36 -04:00
Brad King 2f3eee7490 XL: Consolidate compiler flag information
Factor duplicate information out of Compiler/XL-<lang>.cmake modules
into a macro in a new Compiler/XL.cmake module.  Invoke it from the
per-language files to produce the original settings.
2011-04-07 17:09:05 -04:00
Brad King 3a40c7faa4 XL: Set C++ and Fortran flags consistently with C
Since commit e1729238 (Add initial XL C compiler flags for safer builds,
2009-09-30) CMake sets the initial XL C flags to include "-qthreaded"
and "-qhalt=e".  Do the same for C++ and Fortran with this toolchain.
2011-04-07 17:07:23 -04:00
Rolf Eike Beer 0dafc0a8ed FindZLIB: print library instead of include directory
Before:

-- Found ZLIB: /usr/include (found version "1.2.3")

After:

-- Found ZLIB: /usr/lib/libz.so (found version "1.2.3")
2011-04-07 12:38:43 -04:00
Brad King ca10dc4786 Merge topic 'BuiltinIncludeDirFixesForEclipse'
6a38cab Don't skip the last builtin include dir for the Eclipse project file
4371147 Fix parsing include dirs and builtin macros for CXX-only projects
2011-04-05 14:28:49 -04:00
Brad King fc6addccfd Merge topic 'ModularizeCPack-dot-CMake'
4bb7940 Split CPack.cmake in more manageable parts
2011-04-05 14:28:43 -04:00
Brad King c3c19c7cb7 Merge topic 'module-armadillo'
2d56f0a Corrected copyright format in FindArmadillo.cmake
1942f58 Add new module Armadillo
2011-04-05 14:28:33 -04:00
Brad King 3b16aa622e Merge topic 'linux-lib64-handling'
126c993 Fix #11964 Handle lib64 library on Linux
2011-04-05 14:28:23 -04:00
Brad King e252320793 Merge topic 'module-readme'
ede46d9 Modules: Add comment and copyright notice validation to readme.txt
2011-04-05 14:28:17 -04:00
Brad King 485b50c357 Merge topic 'asn_openssl_fixes'
112f1dd FindOpenSSL: Use find_package_handle_standard_args for version check.
a091ba6 FindOpenSSL: Fixed crypto und ssl variable names.
a164649 FindOpenSSL: We should only use hints to find OpenSSL.
0fb5142 FindOpenSSL: Added support for pkg-config.
2011-04-05 14:28:14 -04:00
Brad King a2907bfb84 Merge topic 'fixbug_0010316'
b4c3ff7 This commit fixes bug #0010316
2011-04-05 14:28:09 -04:00
Eric NOULARD 4bb79402e8 Split CPack.cmake in more manageable parts
Put NSIS, Bundle and Component related MACROs in separate files.
This does not implies functional changes, concerning the way
CPack is used.
2011-04-04 20:18:27 +02:00
Oliver Buchtala b01a50567a Java: Create correct jar archive dependencies.
The command generating the jar file depends on java_class_filelist which
is generated by another command.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2011-04-04 11:50:04 +02:00
Oliver Buchtala f99c3120c9 Java: Added some dependency magic to avoid recompilations.
Compile java sources within a custom_command using automatically checked
file dependencies and create java_class_filelist after java compile.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2011-04-04 11:50:04 +02:00
Oliver Buchtala f3233ba521 Java: Create java_class_filelist only if it does't exist.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2011-04-04 11:49:58 +02:00
Alex Neundorf 6a38cab2de Don't skip the last builtin include dir for the Eclipse project file
The regex was slightly wrong, it excluded the last line, so e.g.
/usr/include/ didn't end up in the .cproject file.

Thanks to Shash Chatterjee for the patch.

Alex
2011-04-03 18:07:27 +02:00
Alex Neundorf 4371147ef4 Fix parsing include dirs and builtin macros for CXX-only projects
Alex
2011-04-03 18:00:35 +02:00
Clement Creusot 2d56f0adb2 Corrected copyright format in FindArmadillo.cmake 2011-04-01 19:59:35 +01:00
Brad King ede46d9d91 Modules: Add comment and copyright notice validation to readme.txt
Document for module authors how to format the copyright notice and
test it.  Also provide a hint for previewing the module documentation
formatting.
2011-04-01 13:46:36 -04:00
Clement Creusot 1942f583b3 Add new module Armadillo 2011-04-01 16:56:32 +01:00
Eric NOULARD 126c993d03 Fix #11964 Handle lib64 library on Linux
The AMD64 ABI document http://www.x86-64.org/documentation/abi.pdf
does specify that 64bits binary libraries should end up in <prefix>/lib64
and 32bits ones in <prefix>/lib. All but debian based distros do so,
and some like OpenSUSE even enforce the rule when packaging with RPM
and refuse to build the RPM if this is not the case.
After some discussion (see the bug notes) we cannot do that behind
the scene and the current fix supposes that the user shall use
the CMAKE_INSTALL_LIBDIR variables content in its INSTALL rules if
he wants to put the lib in the right place. CMAKE_INSTALL_LIBDIR
shall have the appropriate value depending on the Linux distribution
found and 32/64bitness of the host.
The cross-compiling case (even 32bits compile on a 64bits host)
is not handled.
2011-03-31 14:45:48 -04:00
Brad King cddbe63d79 Merge topic 'fix12006-brokenPackageName'
33391c6 CPackDeb: Fix #12006 broken package names
2011-03-31 13:23:16 -04:00
Brad King 62130ba9c4 Merge topic 'gnu-install-dirs-issue-3976'
c2bf48e GNUInstallDirs: Propagate DATAROOTDIR changes to dependent defaults
11431c6 GNUInstallDirs: Simplify and clarify documentation
a262fe0 Add GNUInstallDirs module to define GNU layout (#3976)
2011-03-31 13:23:07 -04:00
Brad King e54e38fadf Merge topic 'fix-FortranCInterface-for-Cray-7.3.2'
d0203fb FortranCInterface: Fix mangling detection with Cray Fortran >= 7.3.2
2011-03-31 13:22:38 -04:00
Andreas Schneider 112f1dd7e3 FindOpenSSL: Use find_package_handle_standard_args for version check. 2011-03-31 08:43:24 -04:00
Andreas Schneider a091ba61ce FindOpenSSL: Fixed crypto und ssl variable names. 2011-03-31 08:43:24 -04:00
Andreas Schneider a164649f9d FindOpenSSL: We should only use hints to find OpenSSL. 2011-03-31 08:43:16 -04:00
Andreas Schneider 5c2106c71e Modules: Added CMake Java support.
This provides:
    find_jar
    add_jar
    install_jar
    install_jni_symlink
    create_javadoc
2011-03-29 11:54:42 +02:00
Andreas Schneider a4b6275eb7 FindJava: Find missing java development executables. 2011-03-29 11:54:41 +02:00
Andreas Schneider 0fb5142e40 FindOpenSSL: Added support for pkg-config. 2011-03-28 18:31:16 +02:00
Mathieu Malaterre b4c3ff7ce8 This commit fixes bug #0010316 2011-03-28 17:53:46 +02:00
Brad King d0203fb567 FortranCInterface: Fix mangling detection with Cray Fortran >= 7.3.2
The Cray Fortran compiler started using module init symbols in version 7.3.2.
Starting in commit 71287734 (Teach FortranC interface for Intel, PGI, and gcc
4.2, 2009-08-05) we provide C versions of the module init symbols so that the
detection executable can link when the C versions of the module-mangled symbols
are picked up.

If no C module-mangled symbol matches then we cannot let the C module init
symbol appear because it will be duplicated by the Fortran copy that provides
the module-mangled symbol.  This was first handled for the PathScale compiler
in commit 21faaa5d (FortranCInterface: Fix PathScale detection, 2010-01-22) and
commit 46858720 (FortranCInterface: Fix PathScale detection again, 2010-02-16).
Handle it now for the Cray compiler too.
2011-03-24 16:06:58 -04:00
Martin Konrad 33391c697f CPackDeb: Fix #12006 broken package names
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2011-03-24 09:25:58 +01:00
Brad King c2bf48ef57 GNUInstallDirs: Propagate DATAROOTDIR changes to dependent defaults 2011-03-23 14:39:05 -04:00
Brad King 4344e83fcf Merge topic 'asn_check_proto'
93c56a7 Tests: Added test for check_prototype_definition.
4f252ab Modules: Added CheckPrototypeDefinition module.
2011-03-22 14:45:51 -04:00
Brad King 1c3233a850 Merge topic 'include-flags-response-file'
86cb17b Pass include directories with response files to GNU on Windows
9a0b9bc Optionally pass include directories with response files
6e8a67f Generate target-wide flags before individual build rules
d099546 Factor old-style -D flags out from -I flag generation
2011-03-22 14:45:44 -04:00
Brad King 3ae23330ee Merge topic 'FindBLAS-acml-search-improvement'
ac475c4 ACML search improvement
2011-03-22 14:45:30 -04:00
David Cole e6c2701002 ProcessorCount: Use ERROR_QUIET with execute_process (#11302)
Also, comment out all "debugging" calls to message() that helped
us interpret the output on other platforms when running on the
dashboard clients.

Using ERROR_QUIET avoids unnecessary stderr output while calling
external tools to determine the processor count. If there's an
error parsing the output, we set the count to 0 anyhow.

Also, the test will fail on a CMake dashboard run if the count
comes back equal to 0.

Now that the code is "done"-ish, remove the debugging output.
Expect no output on stdout or stderr when calling the
ProcessorCount function from now on.
2011-03-18 14:28:24 -04:00
Andreas Schneider 4f252abea5 Modules: Added CheckPrototypeDefinition module.
This check if the function exists and the prototype we want to use is
correct. There are still functions which have different prototypes on
different UNIX systems.
2011-03-18 14:03:35 -04:00
Brad King 86cb17b18d Pass include directories with response files to GNU on Windows
The GNU 4.x toolchain on MinGW (and therefore MSYS) allows compiler
options to be passed via response files.  Use this to pass include
directory -I options.  This allows the include file search path to be
very long despite shell and mingw32-make command line length limits.
2011-03-17 17:56:14 -04:00
Brad King a32a633225 FindMPI: Fix documentation formatting
Adjust whitespace to make the output of "--help-module FindMPI" look
good.  Also separate the comment containing the copyright and license
notice so it does not appear in the documentation.
2011-03-16 10:11:33 -04:00
Alexey Ozeritsky ac475c4126 ACML search improvement 2011-03-15 15:07:40 -04:00
Todd Gamblin 706b73e848 FindMPI: Handle multiple languages
Adds support for:

- MPI_<lang>_COMPILER and other useful variables for C, CXX, Fortran
- Better compiler interrogation (handles mvapich)
- Supports specifying an MPI compiler name directly on the command line
  without and absolute path, e.g.: cmake -D MPI_CXX_COMPILER=mpixlC
- Better compiler name searching tries to match MPI compiler to regular
  CMAKE_<lang>_COMPILER_ID, if it's available.

Gets rid of:

- MPI_LIBRARY, MPI_EXTRA_LIBRARY cache variables.  These and other old
  vars are still exported for backward compatibility, but they're not
  cached.
2011-03-15 15:07:34 -04:00
David Cole 6dd74d5a59 ProcessorCount: Add support for remaining platforms (#11302)
Including AIX, cygwin, FreeBSD, HPUX, IRIX, OpenBSD and Sun.
2011-03-15 15:07:31 -04:00
David Cole 3430955d5f Add ProcessorCount support for QNX via pidin. (#11302)
Thanks to Rolf Eike Beer <eike@sf-mail.de> for the code snippet
parsing the pidin output.
2011-03-15 15:07:30 -04:00
David Cole 4d6418f683 If getconf returns empty output, try cpuinfo. (#11302)
Also, add message output (temporarily) for gathering data
on all the dashboard machines. After the test runs on the
overnight dashboards tonight, I'll comment out the message
output and commit/push again.
2011-03-15 15:07:30 -04:00
David Cole 9cc8ad99c9 Add correct module notice header.
Fixes failing ModuleNotices test.
2011-03-15 15:07:30 -04:00
Michael Wild abbaa123aa Add module ProcessorCount.cmake (#11302)
Credit goes to David Cole ( http://www.kitware.com/blog/home/post/63 ).

Also add a script-based test of the new module.

Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
2011-03-15 15:07:30 -04:00
Brad King 9349de14c7 Merge topic 'CPackRPM-TestWithMoreTraces'
ade04de Remove debbuging typo
a201028 CPack try to please SUSE 64 bits and install lib in lib64 and not lib.
7ebbcf1 CPackRPM  non matching ENDIF
0e07b42 CPackRPM even more trace in debug mode or in case of failure
564b731 CPackRPM  add more trace output in order to help failing diagnostics
2011-03-15 14:47:38 -04:00
Brad King 0e4b5caa81 Merge topic 'CPackDeb-ComponentSupport'
bf7066c CPackDeb  add Component Support to DEB generator fix #0011655
2011-03-15 14:47:35 -04:00
Brad King f8f6c5f899 Merge topic 'qt4-paramfile-speed'
ae587e4 Speed up creation of parameters file for moc custom command.
2011-03-15 14:47:30 -04:00
Brad King b035e638c0 Merge topic 'qt4-cross-compile-no-default'
46f64bd When cross compiling, don't double-root paths when using find_*.
2011-03-15 14:47:25 -04:00
M. Konrad bf7066c6ce CPackDeb add Component Support to DEB generator fix #0011655
Contribution by Martin Konrad
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2011-03-11 08:47:15 +01:00
Clinton Stimpson ae587e49a6 Speed up creation of parameters file for moc custom command.
Thanks A. Saratow for patch.
2011-03-10 14:45:45 -07:00
Markus Rathgeb 46f64bd9e7 When cross compiling, don't double-root paths when using find_*. 2011-03-10 14:17:13 -07:00
Eric NOULARD 7ebbcf19de CPackRPM non matching ENDIF 2011-03-10 18:32:47 +01:00
Eric NOULARD 0e07b425ca CPackRPM even more trace in debug mode or in case of failure 2011-03-10 18:20:16 +01:00
Eric NOULARD 564b7311f4 CPackRPM add more trace output in order to help failing diagnostics 2011-03-10 09:48:46 +01:00
David Cole 971a735ba2 InstallRequiredSystemLibraries: Read reg values with get_filename_component
64-bit CMake can now find the VC redist folder.

See this thread on the CMake mailing list for the original report:
http://www.cmake.org/pipermail/cmake/2011-March/043342.html

Thanks to J. Decker for the suggested fix.
2011-03-09 18:03:11 -05:00
Brad King 036aab093b Merge topic 'ReworkedAsmSupport'
b3ce420 Do not bother enabling C++ in Assembler test
80f6a34 Teach Assembler test to generate main.s at build time
1dafa74 Fix Assembler test to parse C flags string before using
4139a73 -only enable the asm test for the Intel compiler if we are under UNIX
1f6c6b1 -use CMAKE_C_FLAGS when generating the assembler file
d0f71e2 Add ASM platform information for HP compiler on HP
bd580be Merge branch 'hp-compiler-info' into ReworkedAsmSupport
a0bab7a Add ASM platform information for XL compiler on AIX
c03b610 Merge branch 'aix-xl-platform-info' into ReworkedAsmSupport
c623008 Initialize ASM rpath flags for executables with those for shared libs
17c658f Add support for the Intel compiler used for ASM under Windows
4258b24 Add more regex for gcc, always print the ASM compiler ID
9071b8b Add temporary debug output for compiler ID detection for ASM
48f7199 It's ELSEIF(), not ELSIF()
d103c75 Fix bad comparison in the detect assembler-code
20fe0be Only try assembler support for Makefile-based generators
8614470 Use a regexp instead a lot of ORs for checking the compiler ID
cf88092 The Assembler test now tests ASM for GNU, Intel, HP, XL and SunPro
66614a8 Add assemble- and preprocess commands for HP
78f7c59 Fix the default CMAKE_ASM_COMPILE_OBJECT, make XL-ASM use it
7456461 Change the default rules so they fit better to the new ASM handling
5542d58 Set the HP asm file suffix
f745220 Add support for ASm for the HP compiler.
00735d4 Add suport for ASM for the IBM XL compiler
d3e9e8a Add support for ASM for the SunPro compiler
64e66eb Actually use CMAKE_ASM_COMPILER for asm, instead of CMAKE_C_COMPILER
38f92bf Add ASM support for the Intel compiler
4b40d42 Rework the way assembler is handled, use the C/CXX compiler by default
2011-03-08 14:22:38 -05:00
Brad King 831fef8167 Merge topic 'improve-ExternalProject-file-name-recognition'
7f10b13 ExternalProject: Extract file names from more urls
2011-03-08 14:22:35 -05:00
Brad King 8a8234df05 Merge topic 'aix-xl-platform-info'
d30dcf1 Move RPATH flags to AIX per-compiler information files
89ea7a3 Factor AIX and XL compiler flags into common module
2011-03-08 14:22:13 -05:00
David Cole 7f10b137e1 ExternalProject: Extract file names from more urls
Notably, downloads from sourceforge.net and gitweb snapshots.
2011-03-04 17:09:41 -05:00
Brad King d0f71e2545 Add ASM platform information for HP compiler on HP
Among other flags this sets RPATH flags correctly so that CMake knows
how to treat CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH for the ASM language.
2011-03-02 17:49:17 -05:00
Brad King bd580be526 Merge branch 'hp-compiler-info' into ReworkedAsmSupport 2011-03-02 17:40:55 -05:00
Brad King 5f0a25955f Factor HP compiler flags into per-platform/per-compiler files
Move HP flags out of Platform/HP-UX.cmake into platform-specific
compiler information files "Platform/HP-UX-HP-<lang>.cmake".  Factor
common values into "Platform/HP-UX-HP.cmake" and load it from the
per-language files.
2011-03-02 17:24:36 -05:00
Brad King a0bab7ae69 Add ASM platform information for XL compiler on AIX
Among other flags this sets RPATH flags correctly so that CMake knows
how to treat CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH for the ASM language.
2011-03-02 13:48:04 -05:00
Brad King c03b610c0a Merge branch 'aix-xl-platform-info' into ReworkedAsmSupport 2011-03-02 13:47:11 -05:00
Brad King c623008376 Initialize ASM rpath flags for executables with those for shared libs
Since the flags for executables are almost always the same as those for
shared libraries each language information file just uses the latter for
the former by default.  This reduces duplication in the compiler and
platform flag information files.
2011-03-02 13:44:13 -05:00
Brad King d30dcf18b9 Move RPATH flags to AIX per-compiler information files
Move RPATH flags out of Platform/AIX.cmake into platform-specific
compiler information files Platform/AIX-XL and Platform/AIX-GNU.
The flags need to be set for each compiler of each language.
2011-03-02 11:21:54 -05:00
Brad King 89ea7a3d3c Factor AIX and XL compiler flags into common module
Factor duplicate flag information from Platform/AIX-XL-*.cmake into
Platform/AIX-XL.cmake and load it from the original files.
2011-03-02 11:20:50 -05:00
Alex Neundorf 17c658f819 Add support for the Intel compiler used for ASM under Windows
Alex
2011-03-02 16:46:25 +01:00
Alex Neundorf 4258b24134 Add more regex for gcc, always print the ASM compiler ID
Now gcc is also recognized via "Free Software Foundation"

Alex
2011-03-01 22:58:26 +01:00
Alex Neundorf 9071b8b87f Add temporary debug output for compiler ID detection for ASM
Alex
2011-03-01 21:41:02 +01:00
Alex Neundorf 48f7199df0 It's ELSEIF(), not ELSIF()
Alex
2011-03-01 21:39:19 +01:00
Brad King bb745612bc Merge topic 'doc-typo-fixes'
7c5e412 Documentation: Fix a few typos (#11883)
2011-03-01 15:30:32 -05:00
Brad King 79037a818e Merge topic 'qt4-setversion-regression-43cb9b8'
6b9bc54 Fix regression in 43cb9b8.
2011-03-01 15:30:17 -05:00
Alex Neundorf d103c751fa Fix bad comparison in the detect assembler-code
(there was a if("${CMAKE_C_COMPILER}") instead of if(CMAKE_C_COMPILER) )

Alex
2011-03-01 21:28:54 +01:00
Brad King 11431c67c6 GNUInstallDirs: Simplify and clarify documentation 2011-02-28 15:15:01 -05:00
Nikita Krupen'ko a262fe0917 Add GNUInstallDirs module to define GNU layout (#3976)
Provide CMAKE_INSTALL_* variables to help install files according
to the GNU standard layout:

  http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
2011-02-28 15:15:01 -05:00
Brad King 307bdadadc Merge topic 'mingw-module-definition'
6c4b249 Fix Fortran test .def file symbol mangling
7616216 Pass .def files directly to MinGW tools (#9997)
2011-02-24 08:30:26 -05:00
Clinton Stimpson 6b9bc54566 Fix regression in 43cb9b8.
Put back some code for setting the QT_VERSION_* variables that wasn't supposed to be removed.
2011-02-23 17:13:49 -07:00
Alex Neundorf 66614a868d Add assemble- and preprocess commands for HP
Also restore HP-C.cmake, I had accidentially overwritten it with HP-ASM.cmake

Alex
2011-02-23 21:30:21 +01:00
Alex Neundorf 78f7c592eb Fix the default CMAKE_ASM_COMPILE_OBJECT, make XL-ASM use it
Alex
2011-02-23 21:29:05 +01:00
Alex Neundorf 7456461588 Change the default rules so they fit better to the new ASM handling
CMAKE_ASM_COMPILE_OBJECT is now so that it fits for GNU, Intel, HP and Sun
ASM_ATT had to be adjusted. Also adjusted the default
CMAKE_ASM_LINK_EXECUTABLE

Alex
2011-02-23 21:21:41 +01:00
Alex Neundorf 5542d58014 Set the HP asm file suffix
Alex
2011-02-23 21:18:55 +01:00
Alex Neundorf f745220a32 Add support for ASm for the HP compiler.
Alex
2011-02-23 21:16:44 +01:00
Alex Neundorf 00735d4055 Add suport for ASM for the IBM XL compiler
Alex
2011-02-23 21:16:22 +01:00
Alex Neundorf d3e9e8a078 Add support for ASM for the SunPro compiler
Alex
2011-02-23 21:16:00 +01:00
Alex Neundorf 64e66ebdc8 Actually use CMAKE_ASM_COMPILER for asm, instead of CMAKE_C_COMPILER
Alex
2011-02-23 21:15:41 +01:00
Alex Neundorf 38f92bfbe1 Add ASM support for the Intel compiler
Alex
2011-02-23 21:15:18 +01:00
Brad King 761621645c Pass .def files directly to MinGW tools (#9997)
Commit 6a61a8a5 (Honor module .def files with MinGW tools, 2011-02-21)
set CMAKE_LINK_DEF_FILE_FLAG to "-Wl," to enable passing .def files to
the linker on MinGW.  However, older GNU tools in the MSYS shell do not
know how to translate "-Wl,/c/..." to "c:/..." and complain that the
file does not exist.  Instead set the flag to just "" which tells CMake
it can pass the file through the front-end with no special flag.
2011-02-23 11:04:17 -05:00
Modestas Vainius 7c5e412c4a Documentation: Fix a few typos (#11883)
W: cmake: manpage-has-errors-from-man usr/share/man/man1/cmake.1.gz 10029: warning [p 158, 13.5i]: can't break line
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz informations information
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz dependant dependent
I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz prefered preferred
I: cmake: spelling-error-in-binary ./usr/bin/cmake prefered preferred
I: cmake: spelling-error-in-binary ./usr/bin/cpack prefered preferred
I: cmake: spelling-error-in-binary ./usr/bin/ctest prefered preferred
I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakepolicies.1.gz prefered preferred
I: cmake-curses-gui: spelling-error-in-binary ./usr/bin/ccmake prefered preferred
I: cmake-qt-gui: spelling-error-in-binary ./usr/bin/cmake-gui prefered preferred
2011-02-22 17:24:51 -05:00
Brad King 62f816adde Merge topic 'qt4-fphsa'
7a1027a When checking find_package() components, special case qtmain.
4c1c358 FindQt4: Include builtin FindPackageHandleStandardArgs directly
43cb9b8 Change to use fphsa to check required variables and version.
2011-02-22 14:36:33 -05:00
Brad King 521d244531 Merge topic 'mingw-module-definition'
6a61a8a Honor module .def files with MinGW tools (#9997)
2011-02-22 14:33:04 -05:00
Brad King 59cfdd5c77 Merge topic 'qt4-macfind'
4167be0 Fix issues with find_path() for QtCore include dir on Mac.  Fixes 11868.
2011-02-22 14:33:00 -05:00
Brad King c5f27110ab Merge topic 'init-LDFLAGS-issue-11840'
3b77516 Fix linker flag initialization from LDFLAGS (#11840)
2011-02-22 14:32:22 -05:00
Brad King 15ff343d23 Merge topic 'fix-4564-make-test-alias'
816c9d1 CTest: Add alias for make test target (#4564)
2011-02-22 14:31:50 -05:00
Brad King 11f55fff8f Merge topic 'fix-10723-non-dev-xcode'
d421a43 Strip trailing space from xcode-select output (#10723)
2011-02-22 14:31:45 -05:00
Brad King 6e450ed7f0 Merge topic 'mpif77-workaround-o-c-order'
93f230e Pass -o after -c for Fortran to avoid mpif77 ordering bug
2011-02-22 14:31:40 -05:00
Brad King e0d0e879cf Merge topic 'fix-10150-mark-timeout-advanced'
b5e3692 CTest: Mark DART_TESTING_TIMEOUT as advanced (#10150)
2011-02-22 14:31:21 -05:00
Brad King 6a61a8a538 Honor module .def files with MinGW tools (#9997)
Since commit 024d05ad (Fix use of module .def files for MS tools,
2009-09-29) module .def files work for any platform that sets
CMAKE_LINK_DEF_FILE_FLAG correctly.  Set it in the Windows-GNU platform
information file to enable support with MinGW tools.  Also enable the
test added by commit 0db2c850 (Test use of module .def files for MS
tools, 2009-09-29) for MinGW and MSYS generators.
2011-02-21 14:34:54 -05:00
Clinton Stimpson 4167be052f Fix issues with find_path() for QtCore include dir on Mac. Fixes 11868. 2011-02-19 15:30:02 -07:00
Brad King 6720f97d3b Merge topic 'copyright-FindPerlLibs'
bff5772 FindPerlLibs: Add notice of copyright
2011-02-14 16:34:39 -05:00
Brad King 3b77516862 Fix linker flag initialization from LDFLAGS (#11840)
When initializing CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS from LDFLAGS
and CMAKE_(EXE|SHARED|MODULE)_LINKER_FLAGS_INIT quote the whole string
in case both are set.

Reported-by: Daniel R. Gomez <gomez@teragram.com>
2011-02-11 08:54:38 -05:00
Andreas Schneider bff5772084 FindPerlLibs: Add notice of copyright
I'm the original author of this module. See bug #7898.
2011-02-10 13:46:35 -05:00
Clinton Stimpson 7a1027a1b6 When checking find_package() components, special case qtmain.
Its just a library on Windows only.
Fixes bug #11791.
2011-02-04 09:01:55 -05:00
David Cole 816c9d1aa1 CTest: Add alias for make test target (#4564)
Clients may define CTEST_TEST_TARGET_ALIAS in a project's
initial cache to get a target of another name that executes
the same underlying command as "make test"
2011-02-01 15:39:02 -05:00
David Cole d421a433a8 Strip trailing space from xcode-select output (#10723)
Otherwise, subsequent use of the output does not work
as intended.
2011-02-01 14:16:30 -05:00
Brad King 93f230e408 Pass -o after -c for Fortran to avoid mpif77 ordering bug
When running

  $ mpif77 -c example.f -o example.f.o

mpif77 recognizes -o and produces example.f.o, but when running

  $ mpif77 -o example.f.o -c example.f

the -o option is ignored and the object file is example.o.  Performing
the same experiment on the underlying compiler tool or with the mpicc
and mpiCC wrappers does not exhibit this behavior, so the issue appears
to be specific to mpif77.

Reported-by: Zhen Wang <zwang26@emory.edu>
2011-01-31 16:24:12 -05:00
Alex Neundorf 4b40d4297a Rework the way assembler is handled, use the C/CXX compiler by default
This commit changes the way how the assembler support works in cmake.
The language "ASM" now always uses the C/Cxx compiler instead
of the assembler directly. This fixes #8392, assembler files are
not preprocessed.
If one wants to use the assembler directly, the specific
assembler "dialect" has to be enabled. I.e. to get as/gas,
you have to use now ASM-ATT, the same way for ASM_MASM and ASM_NASM.

Implemented this now for gcc.
SunStudio, IBM, HP and Intel still todo.

Alex
2011-01-30 21:03:37 +01:00
Brad King 7c4e57c821 Merge topic 'FixParsingCompilerNameWithVersionNumber'
5883c51 Fix parsing of compiler name with a version number
bd57bc5 Strip trailing whitespace.
2011-01-28 14:17:21 -05:00
David Cole b5e3692299 CTest: Mark DART_TESTING_TIMEOUT as advanced (#10150)
Also, split a long line into two. And alphabetize the
variables mentioned in the mark_as_advanced call.
2011-01-28 06:32:27 -05:00
Brad King 182eb7c7ef Merge topic 'dev/strict-mode'
dd2f814 Merge branch 'dev/add_test-working-directory' into dev/strict-mode
949d32c Unwatch manual variables upon removal in cmake-gui
3939032 Unwatch manual variables upon removal in ccmake
8354413 Add method to unwatch a manual variable
8ed3c85 Give a better message for unused variables
729db48 Fix ArgumentExpansion test expected results
89c2544 Checking for a definition is a usage
5625dee Don't output to stderr in the GUI
ad25a96 Merge branch 'ImprovedDotSupport2' into dev/strict-mode
c128abe Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-mode
9bcaff0 Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
544d0c3 Fix expected output for WarnUninitialized test
4e3bea4 Update expected messages to new format
8e8c9e4 Don't check at destruction for usage
668e005 Use cmake::IssueMessage for warnings
88cd4c1 Use 'CMake Warning' versus 'warning' for CDash
3c3b98d Initialize the class before setting warn flags
cf8b15a Ignore files under the CMakeFiles directory
fd50f06 Don't check for unused vars at configure time
447a04c Don't warn during configure when doing everything
b97ee21 Check for unused variables at the end of generate
c18c977 When checking for variables, specify a reason
3f1121f Use a long int since Line is a long as well
2507f93 Change the failure case string to 'Unexpected'
fe390a2 Add 'ArgumentExpansion' test
8dbb209 Wrong boolean value for CLI warnings
d4ee998 Hard-code the --no-warn-unused-cli flag
a267b99 Fix line lengths
82ed104 Flag that the directories have been set
5aa535b Add argument to arg parsing to not set directories
367e5c3 Revert "Revert "When calling CMake, set the args and the cache""
ab5d4e4 Revert "When calling CMake, set the args and the cache"
9b90040 When calling CMake, set the args and the cache
fe56002 Fix long lines for KWStyle
5d30cfc Set a watch on variables added through the gui
33c63b1 Add a method to put a watch for variables
535253f Initialize the warning variables earlier
cbb286c Fix the path detection to work for top-level
62be1f7 Initialize the usage stack earlier
c6e7fab Factor out the checks for unused variables
5e41ba8 When using the API, check for Add vs. Remove
dee1976 Fix typo in VariableUnusedViaUnset test
f231ce5 Remove old false positive avoidance code
a117e02 Revert "Add test for unused warnings at the end of scope"
2c82f2b Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage
6d7d449 Ignore CLI warnings for ABI determination
7740a73 Only return local keys that are defined
bef3aee Use the API so that warnings can be tracked
05cb0f4 Check for unused variables in the dtor
91c4c99 Add test for unused warnings at the end of scope
ca90f67 Fix detection of unused variables when setting
f7438ca Add test for unused detection via setting it
995cfb0 Don't warn if the variable wasn't defined
aefc91d Add test for usage checks via unset
a8e97f8 Remove VarRemoved code since it's been superceded
59463ef Rework CheckVariableForUnused usage
f117423 Fix line lengths to be no more than 78
e49a935 Improve unused warning logic
e01e40c Mark ARGC, ARGV*, and ARGN as used
a17aff7 Ignore CMAKE_MATCH_* variables for usage
02a114d Add method to allow variables to be marked as used
a0b0d23 CMAKE_DO_TRY_COMPILE is no longer used
ae3eff3 Fix the path used for ignoring system warnings
056b441 Fix missing case for usage of a variable
980e048 Factor out checks for unused variables
83acb0a Remove now unused variables
3801463 Use built-ins for readability and maintainability
8b52015 Push the initialize and unused states when copying
439877f Be consistent with single and double quotes
4cf1706 Add documentation for check-system-vars
b74777f Fix the spelling of the flag for warn-unused-vars
b948120 Change logic of flag to turn off cli unused checks
f047a17 Add test for uninitialized variables
75bda38 Add tests for unused command line variables
300fc15 Fix detection of system files
d784e6a Run the unused variables check on the final pass
9efc057 VariableWatch is not available when bootstrapping
2e78224 Add a missing comma to the warning message
7499700 Add a flag to warn about system files
fff9f6d Rename flags again and use variablewatch for cli
786e269 Add warn-unused to the Qt interface
636e6c4 Default to marking things as used
4ff0340 Rename find-unused to warn-unused
d7999e9 Rename strict-mode to warn-uninitialized
e141bc9 Detect unused variables
d3e8eb5 Add flags to detect unused variables
f332e14 Complete strict-mode checks for uninitialized vars
52f9637 Add method to get the local scope variables
f794d58 Make --strict-mode option, and integrate with cmake-gui
48b5b85 Add a warning when variables are used uninitialized.
cd626ea For macros make sure the FilePath points to a valid pointer in the args.
2011-01-27 15:34:07 -05:00