Commit Graph

3217 Commits

Author SHA1 Message Date
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