Commit Graph

4577 Commits

Author SHA1 Message Date
Adrien Destugues 7ebc1cb2ff Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
  need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
  cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
  HAIKU (there is still a number of things we don't do like the
  average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
  what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
  This used to be an Haiku extension to gcc, and is equivalent to
  -shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
  implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
  and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
  pick the right headers and libraries according to the currently
  selected one.
* With the adoption of the package manager, the directory layout was
  changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
  for HAIKU as well. This is the lack of a libm (it is part of the
  implicitly linked in libroot)

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-08 09:54:46 -04:00
Brad King 4340507207 Merge topic 'CheckStructHasMember_CXX'
73d28d2 CheckStructHasMember: Add support for C++
2013-10-08 09:53:37 -04:00
Brad King b7a865c5fe Merge topic 'cxx-flags'
455bad1 Check*CompilerFlag: Add SunStudio 12 regex
6f3ebfe Check*CompilerFlag: make C and CXX modules share most error patterns (#14339)
2013-10-08 09:53:31 -04:00
Daniele E. Domenichelli 73d28d2177 CheckStructHasMember: Add support for C++
Previously if headers required to check if a struct has a member can be
compiled with C++ compiler only, the check would fail because the C
compiler fails.  As a consequence, the result variable would be set to
false, even if the struct has that particular member.

Teach CHECK_STRUCT_HAS_MEMBER to accept a new optional argument LANGUAGE
that allows one to explicitly set the compiler to use.  The new
signature is therefore:

  CHECK_STRUCT_HAS_MEMBER (<struct> <member> <header> <variable>
                           [LANGUAGE <language>])
2013-10-08 09:43:06 -04:00
William Orr 455bad19f6 Check*CompilerFlag: Add SunStudio 12 regex
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-08 09:23:01 -04:00
Daniele E. Domenichelli 67e761fabc FindGTK2: Small cleanup 2013-10-07 20:19:30 -04:00
Daniele E. Domenichelli 682eea3909 FindGTK2: Do not require the GTK_ prefix in all the internal functions
This saves from using string(REGEXP) to create targets
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 0bc3763c9e FindGTK2: Better handling of include directories
Add a method _GTK2_ADD_TARGET_INCLUDE_DIRS to handle it.
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 9905abd150 FindGTK2: Create targets for each library
Methods:
 * _GTK2_ADJUST_LIB_VARS
 * _GTK2_ADD_TARGET_DEPENDS_INTERNAL
 * _GTK2_ADD_TARGET_DEPENDS
are strongly inspired by FindQt4.cmake
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 7af8ad89af FindGTK2: Search for glib-object.h instead of gobject/gobject.h
This is the topmost include file for GObject header files
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli fab6c2deb0 FindGTK2: Populate GTK2_DEFINITIONS before searching for libraries 2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 8d7b070410 FindGTK2: Export GTK2_XXX_FOUND to parent scope in _GTK2_FIND_LIBRARY
Also add a debug message to report if the library was found or not
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 1bbc7662ea FindGTK2: Search for modules quietly when needed 2013-10-07 20:18:06 -04:00
Daniele E. Domenichelli d9eb277631 FindGTK2: Find freetype quietly 2013-10-07 20:18:06 -04:00
Daniele E. Domenichelli 675a4d3897 FindGTK2: Mark GTK_*_INCLUDE_DIR as advanced 2013-10-07 20:18:01 -04:00
Brad King ab65862417 Clang: Add separate "AppleClang" compiler id
Apple distributes their own Clang build with their own version numbers
that differ from upstream Clang.  Use the __apple_build_version__ symbol
to identify the Apple Clang compiler and report the Apple Build Version
as the fourth version component in CMAKE_<LANG>_COMPILER_VERSION.  Add
Compiler/AppleClang-<lang> and Platform/Darwin-AppleClang-<lang> modules
that simply include the upstream equivalents.

Fix comparisons of CMAKE_<LANG>_COMPILER_ID to Clang in CMake's own
source and tests to account for AppleClang.
2013-10-07 20:12:46 -04:00
Brad King fcfd409ad1 Merge topic 'UseJava-jar-manifest'
69aff17 UseJava: Add support for the jar 'm' (Manifest) option
2013-10-07 15:44:43 -04:00
Brad King c76b380181 Merge topic 'deprecation-macro-refactor'
cdf55d5 GEH: Make each element of the deprecation macros overridable.
80d5090 GEH: Use the macro for the deprecation attribute after definiting it.
2013-10-07 15:44:39 -04:00
Brad King da0f373885 Merge topic 'EclipseFixWarningMessage'
5f11b8d Eclipse: add version 4.3 for completeness
2b63734 Eclipse: print different message if CMAKE_ECLIPSE_VERSION is already set
1ff8c21 CMakeFindEclipse: use lowercase for macro calls
2013-10-07 15:44:14 -04:00
Brad King 44e5118ede Merge topic 'openssl-advanced'
864e2a3 FindOpenSSL: mark variables as advanced for MSVC (#14418)
2013-10-07 15:43:46 -04:00
Brad King 0b7a2034a3 Merge topic 'FixTypoInGraphvizDocs'
bbb0d6f CMakeGraphVizOptions.cmake: Fix typo in documentation
2013-10-07 15:43:15 -04:00
Brad King 7069680bad Merge topic 'FindwxWidgets-msvc-x64'
870f91e FindwxWidgets: Look in x64 directories for MSVC (#14393)
2013-10-07 15:42:59 -04:00
Brad King ea574d98ed Merge topic 'vs-compiler-id-tolerate-diagnostics'
8c891f8 VS: Tolerate diagnostic output while detecting cl (#14387)
2013-10-07 15:42:51 -04:00
Brad King e0c7ccb1b3 Merge topic 'deprecate-add_compiler_export_flags'
0f3a666 GenerateExportHeader: Deprecate add_compiler_export_flags function.
2013-10-07 15:42:41 -04:00
Brad King 1c49ecad36 Merge topic 'FindPython_versions'
afd4f7f FindPython*: simplify version selection
2013-10-07 15:42:35 -04:00
Brad King 73170c38d7 Merge topic 'FindLua'
89cfa20 Modules: add FindLua.cmake
2013-10-07 15:42:27 -04:00
Brad King d97fa4b4da Merge topic 'add-find_dependency-macro'
bb501a2 CMakePackageConfigHelpers: Add a find_dependency macro
2013-10-07 15:42:22 -04:00
Brad King 610234a5e8 Merge topic 'FortranCInterface-cross-compile'
d7a65a2 FortranCInterface: Fix cross-compiling Linux to MinGW (#14358)
2013-10-07 15:41:19 -04:00
Brad King 3d8356d486 Clang: Support Windows variants for GNU and MSVC (#13035, #14458)
Teach the compiler identification preprocessor tests to report when
Clang simulates MSVC, and what version.  If not MSVC, assume GNU.

Teach compiler information modules Clang-(C|CXX) to recognize when Clang
simulates MSVC and skip loading the GNU information.

Teach the Windows-MSVC platform information to recognize when it is
loaded as the simulated compiler and use that version information
instead of the real compiler's (different) version scheme.

Add platform modules Windows-Clang-(C|CXX) and support module
Windows-Clang to load either Windows-MSVC or Windows-GNU and wrap
the corresponding information macros.
2013-10-04 13:39:22 -04:00
Brad King 51ab85c398 CMakeDetermineCompilerId: Add notion of "simulated" id/version
Some compilers try to simulate other compilers as a drop-in replacement
supporting all the same command-line options and predefined preprocessor
macros.  In such cases it will be useful to have CMake load the compiler
information files for the simulated compiler instead of duplicating the
information.  Teach CMakeDetermineCompilerId to extract the simulated
compiler id and version when the compiler id detection provides it.
2013-10-04 13:25:06 -04:00
Brad King be10826bf1 CMakeDetermineCompilerId: Fix local var init
Add initialization of the ARCHITECTURE_ID local and fix the
initialization of the COMPILER_ID_TWICE local.
2013-10-04 10:33:16 -04:00
Brad King 1fce189e53 OS X: Search system SDKs for frameworks
In Modules/Platform/Darwin.cmake set CMAKE_SYSTEM_FRAMEWORK_PATH to
include framework directories from inside the system SDK corresponding
to CMAKE_OSX_SYSROOT.

Suggested-by: Sean McBride <sean@rogue-research.com>
2013-09-27 10:18:46 -04:00
Brad King 71c0eb9cd8 Merge topic 'wince-archfam'
0b15ffc MSVC: Fix WinCE arch family preprocessor symbol (#14436)
2013-09-26 08:51:36 -04:00
Patrick Gansterer 8bb3b3d344 VS: Use version-specific subsystem for WinCE compiler id (#14440)
The subsystem must be set to WINDWOSCE for some SDKs to link an
executable. Set it to 9 for VS2005 and to 8 for VS2008, since the
value differs between the different Visual Studio versions.
2013-09-25 08:29:03 -04:00
Patrick Gansterer 0b15ffc73b MSVC: Fix WinCE arch family preprocessor symbol (#14436)
In commit bd827f98 (Use COFF file header header for architecture
detection, 2013-08-05) the MSVC_<lang>_ARCHITECTURE_ID value computed by
CMakeDetermineCompilerId.cmake changed for WinCE architectures to be the
exact architecture read from the PE header.  Fix platform preprocessor
definitions in Modules/Platform/Windows-MSVC.cmake to correspond to the
architecture family (ARM or SHx) instead of the specific architecture.
2013-09-25 05:20:22 +02:00
Patrick Gansterer e63cf5f099 MSVC: Fix version test for linking corelibc on Windows CE (#14420)
In commit 8fcf0ab0 (Add support for new Windows CE compiler, 2013-08-04)
we made corelibc conditional on the MSVC version, but the version value
was incorrect.  Update it to use corelibc for VS 2008 and below.
2013-09-23 17:11:47 -04:00
Simon Levermann 69aff17d38 UseJava: Add support for the jar 'm' (Manifest) option 2013-09-23 14:54:33 +02:00
Stephen Kelly cdf55d5cb4 GEH: Make each element of the deprecation macros overridable.
This way, we can override only FOO_DEPRECATED to silence deprecation
for a library.
2013-09-23 08:04:16 +02:00
Stephen Kelly 80d5090a2c GEH: Use the macro for the deprecation attribute after definiting it.
This way, it is more-easily overridden.
2013-09-23 08:04:13 +02:00
Brad King 0f05961f03 FindHDF5: Fix regression in per-configuration library selection
When FindHDF5 was first added in commit e6734068 (Add HDF5 find
module..., 2009-08-24) it contained a workaround for a bug in
SelectLibraryConfigurations that did not transform lists correctly.
That bug was fixed by commit 5797512c (SelectLibraryConfiguration:
generate correct output when input vars are lists, 2012-07-28).  Then
refactoring in commit 04d4dc33 (SelectLibraryConfigurations: Use
-NOTFOUND instead of copying the vars, 2013-07-08) changed undocumented
behavior on which the original workaround relied.  The result puts
entries like HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND in HDF5_LIBRARIES.

Fix this by dropping the original workaround since the underlying issue
has been fixed anyway.  Use the HDF5_${LIB}_LIBRARY selected by the call
to select_library_configurations directly.
2013-09-19 13:35:01 -04:00
Alex Neundorf 5f11b8de28 Eclipse: add version 4.3 for completeness
This just adds the version number, there are no features
depending on this.

Alex
2013-09-19 00:58:25 +02:00
Alex Neundorf 2b63734b7f Eclipse: print different message if CMAKE_ECLIPSE_VERSION is already set
This fixes #14422.

Alex
2013-09-19 00:53:38 +02:00
Alex Neundorf 1ff8c21734 CMakeFindEclipse: use lowercase for macro calls
Alex
2013-09-19 00:14:13 +02:00
Brad King 40c76c1dc8 Merge topic 'FindPNG-compatibility'
6816044 FindPNG: Honor old PNG_LIBRARY if provided (#14398)
2013-09-17 08:15:32 -04:00
Rolf Eike Beer 864e2a3141 FindOpenSSL: mark variables as advanced for MSVC (#14418) 2013-09-17 08:10:08 +02:00
Brad King 68160448b9 FindPNG: Honor old PNG_LIBRARY if provided (#14398)
In commit 2a797539 (FindPNG: improve library detection, 2013-07-27) we
split the search for PNG into separate PNG_LIBRARY_DEBUG and
PNG_LIBRARY_RELEASE variables.  However, if a project or user sets the
old PNG_LIBRARY value we must honor it instead of searching.

While at it, mark PNG_LIBRARY_RELEASE and PNG_LIBRARY_DEBUG as advanced
and remove a stray debug message.
2013-09-13 11:54:31 -04:00
Brad King ef27fa6760 FindCUDA: Always list custom command outputs in their targets
CMake's intended interface for linking to explicit object files (marked
with EXTERNAL_OBJECT) is that only those listed as target sources should
be linked.  Drop FindCUDA's attempt to hide the .obj files from VS IDE
project files, which depends on VS-version-specific behavior of linking
custom command outputs that happen to be named "*.obj".  CMake puts
external object files in a dedicated source group anyway.
2013-09-13 10:08:43 -04:00
Alex Neundorf bbb0d6faa6 CMakeGraphVizOptions.cmake: Fix typo in documentation
Alex
2013-09-11 21:08:25 +02:00
Brad King 3cd753dfff MSVC: Drop /link from executable link lines with Ninja
In commit fb9f73de (MSVC: Invoke 'link' directly for executables,
2013-04-08) we forgot to remove the /link option handling added by
commit e31df039 (Ninja: move <OBJECTS> in front of the first linker
option, 2012-09-27) to the Platform/Windows-MSVC module.  Drop it now.
2013-09-11 14:34:33 -04:00
Marius Luca 870f91e389 FindwxWidgets: Look in x64 directories for MSVC (#14393)
When compiling the 64 bit version of wxWidgets using nmake the library
folders become vc_x64_lib and vc_x64_dll and can coexist with the win32
version.
2013-09-10 08:41:13 -04:00
Brad King 8c891f86cc VS: Tolerate diagnostic output while detecting cl (#14387)
When the VS IDE build output setting

  Tools -> Options -> Projects and Solutions ->
   Build and Run -> MSBuild project output verbosity

is set to "Diagnostic" the build output contains a " (TaskId:###)"
suffix on the CMAKE_<lang>_COMPILER= line used to extract the compiler
executable location.  Strip this suffix before checking that the
reported location exists.
2013-09-03 14:04:25 -04:00
Stephen Kelly 0f3a66673f GenerateExportHeader: Deprecate add_compiler_export_flags function.
This is made obsolete by the CXX_VISIBILITY_PRESET and
VISIBILITY_INLINES_HIDDEN target properties.
2013-09-02 10:57:55 +02:00
Rolf Eike Beer afd4f7f042 FindPython*: simplify version selection
CMake already provides the version components split into variables, no need to
split them again.
2013-08-31 17:46:44 +02:00
Rolf Eike Beer 89cfa20052 Modules: add FindLua.cmake
This is a version agnostic variant of FindLua50.cmake and FindLua51.cmake.
2013-08-31 17:44:36 +02:00
Stephen Kelly bb501a2a64 CMakePackageConfigHelpers: Add a find_dependency macro
This macro handles the EXACT, REQUIRED and QUIET options
and sets an appropriate NOT_FOUND_MESSAGE for the package
if a dependency is not found.
2013-08-30 13:03:10 +02:00
Brad King 23b88ecd85 Merge topic 'FindImageMagick-hdri'
5803b94 FindImageMagick: Find libraries named with HDRI support (#14348)
2013-08-27 09:03:47 -04:00
Brad King fd09fd78a9 Merge topic 'FindTCL-paths-for-8.6'
141ce01 FindTCL: Add BSD paths for Tcl/Tk 8.6
2013-08-27 09:03:42 -04:00
Brad King 889527aa9c Merge topic 'doc-check-flags'
293ecfe CheckC*CompilerFlag: add documentation what to expect from a positive result
2013-08-26 10:34:23 -04:00
Raphael Kubo da Costa 141ce01062 FindTCL: Add BSD paths for Tcl/Tk 8.6
Follow-up to commit 4a015f77 (OpenBSD: Add paths for Tcl/Tk 8.4/8.5,
2012-12-03): those paths added for OpenBSD also work on other BSDs, some
of which are already using version 8.6 of Tcl/Tk.
2013-08-26 09:12:00 -04:00
Michel Zou d7a65a2f2c FortranCInterface: Fix cross-compiling Linux to MinGW (#14358)
After building the test binary tell find_program to search for it with
the ${CMAKE_EXECUTABLE_SUFFIX} so that the .exe can be found.  Since
find_program is normally used to locate host tools while cross-compiling
it needs this hint to find the target binary.

Suggested-by: Denis Barbier <bouzim@gmail.com>
2013-08-14 19:31:31 -04:00
Brad King 335a1278eb OS X: Do not default to non-existent deployment target SDK
Since commit 95f78e08 (OS X: Search for SDK based on deployment target,
2013-08-02) we select the default OS X SDK path to match the deployment
target.  Fix this behavior in the case that the matching SDK does not
exist and fall back to the SDK for the current host OS X version.
2013-08-14 19:16:42 -04:00
Rolf Eike Beer 6f3ebfed98 Check*CompilerFlag: make C and CXX modules share most error patterns (#14339)
This simplifies maintenance as most patterns will be for both modules and may
be added at a central place.

While at it add error patterns for XL and BCC.
2013-08-13 23:27:10 +02:00
Rolf Eike Beer 293ecfeb79 CheckC*CompilerFlag: add documentation what to expect from a positive result 2013-08-13 21:17:42 +02:00
Eric Bélanger 5803b94a8b FindImageMagick: Find libraries named with HDRI support (#14348)
When ImageMagick is built with HDRI support, the library names get a
HDRI suffix.
2013-08-13 09:26:28 -04:00
Stephen Kelly b33c9844fa Revert "Add compiler target compile options."
This reverts commit 2d9ec1dadf.
2013-08-09 14:28:43 +02:00
Brad King 4408382f19 Merge topic 'wince800'
0416a0e VS11: Add support for Windows CE SDKs
8fcf0ab Add support for new Windows CE compiler
2013-08-08 13:55:07 -04:00
Patrick Gansterer 8fcf0ab020 Add support for new Windows CE compiler
The new compiler versions do not need corelibc.lib as a default
link library and a architecture detection workaround.
2013-08-07 08:26:26 -04:00
Brad King fc657ef4d3 Merge topic 'osx-no-command-line-tools'
03ab170 OS X: Enable command-line build without tools in PATH
2013-08-07 08:21:24 -04:00
Brad King 5b141a7b29 Merge topic 'peheader'
bd827f9 WIN: Use COFF file header header for architecture detection (#14083)
2013-08-06 16:55:15 -04:00
Brad King dba225db33 Merge topic 'vs-cleanup'
c90151b VS: Unify how the name of the generator is specified
3873d29 Fix detection of WinCE SDKs with 64bit verion of CMake
40a4302 VS12: Remove duplicated overload of UseFolderProperty()
b02f09d VS: Replace ArchitectureId with PlatformName
4b15dc8 VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too
60e568c VS10: Do not set the TargetMachine when detecting the compiler
dfbfe6f VS6: Hardcode id_machine_6 for compiler detection
2013-08-06 16:54:54 -04:00
Brad King 03ab170fe0 OS X: Enable command-line build without tools in PATH
Teach modules CMakeDetermineCompiler and CMakeUnixFindMake to ask Xcode
where to find the compiler or make tools, using 'xcrun --find', if none
is found in the PATH.  Teach module Platform/Darwin to add the path to
the SDK to CMAKE_SYSTEM_PREFIX_PATH so that find_* command look there.
Also add the SDK /usr/include directory to the implicit include list in
CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES to suppress explicit -I
options for it.
2013-08-06 09:00:18 -04:00
Patrick Gansterer bd827f98ef WIN: Use COFF file header header for architecture detection (#14083)
Read the machine field from the COFF file header to get the exact
target architecture for ARM and SHx on the Windows platform.
2013-08-05 20:04:44 +02:00
Brad King 1768014dfc Merge topic 'osx-find-sdk-for-deployment-target'
bf5a5bc bootstrap: Do not suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot (#14324)
95f78e0 OS X: Search for SDK based on deployment target (#14324)
2013-08-05 09:54:04 -04:00
Patrick Gansterer b02f09d434 VS: Replace ArchitectureId with PlatformName
Since we do not need the information about the target architecture
we can use the PlatformName only to specify the this information.
This also removes setting of the MSVC_*_ARCHITECTURE_ID variable
which is not required, because this variable gets set by the
compiler detection code in CMAKE_DETERMINE_COMPILER_ID_CHECK().
2013-08-05 13:38:26 +02:00
Patrick Gansterer 4b15dc855d VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too
Move the code which sets CMAKE_VS_PLATFORM_NAME from
cmGlobalVisualStudio8Generator to cmGlobalVisualStudio7Generator.
2013-08-05 13:38:23 +02:00
Patrick Gansterer 60e568cf79 VS10: Do not set the TargetMachine when detecting the compiler
The Microsoft linker is intelligent enough to detect the target
machine type depending on the input files. This allows us to
get the target architecture from the compiler instead of
maintaining the mapping to the platform name.
2013-08-05 13:38:21 +02:00
Patrick Gansterer dfbfe6f166 VS6: Hardcode id_machine_6 for compiler detection
id_machine6 is never set to an other value than x86. So it is
safe to remove the replacements with "x86" directly.
2013-08-05 13:38:19 +02:00
Brad King 95f78e08fe OS X: Search for SDK based on deployment target (#14324)
When available, use CMAKE_OSX_DEPLOYMENT_TARGET instead of the host OS X
version to select the default SDK.  This makes sense because one should
use the SDK matching the deployment target.

Suggested-by: John Ralls <jralls@ceridwen.us>
2013-08-02 14:05:00 -04:00
Daniele E. Domenichelli 73ba4e5030 FindGTK2: Detect pangoft2 and pangoxft libraries 2013-08-01 16:54:32 +02:00
Daniele E. Domenichelli 7ca5958820 FindGTK2: Detect gmodule library 2013-07-31 17:40:07 +02:00
Daniele E. Domenichelli 76c72b9f14 FindGTK2: gthread-2.0 folder does not exist
Partially revert commit 508e8ca024
2013-07-31 17:39:38 +02:00
Brad King e3b6ab92db Merge topic 'static_library_flags'
33e6e0b VS6: Add handling of CMAKE_*_LINKER_FLAGS_<CONFIG> variables
152dfda Add additonal tests for the linker flags
20ed496 Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables
54f7019 Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude
2a43c30 Add support for CMAKE_STATIC_LINKER_FLAGS
14bbf83 Unify the way the flags of a static library are read
2013-07-31 08:49:01 -04:00
Brad King cdfeda60f6 Merge topic 'add-cmake_reset_check_state'
9349d69 Add cmake_reset_check_state() macro
2013-07-31 08:48:29 -04:00
Vadim Zhukov 9349d69abf Add cmake_reset_check_state() macro
It's acknowledged that check state should not generally nest,
so it should be cleared when used, for example, in Find* module.

Also, add optional RESET argument to cmake_push_check_state().
2013-07-31 08:43:22 -04:00
Patrick Gansterer 54f7019fd0 Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude
Add support for CMAKE_STATIC_LINKER_FLAGS_* to
CMakeCommonLanguageInclude.cmake to set the defaults similar
to the other CMAKE_*_LINKER_FLAGS_*.
2013-07-31 08:41:07 -04:00
Brad King 7c3494e9ae Merge topic 'PrintHelperFunctions'
e32ff96 add macros cmake_print_properties() and cmake_print_variables()
2013-07-29 09:55:31 -04:00
Brad King 1b9aa69498 Merge topic 'FindPNG-dbg-rel'
2a79753 FindPNG: improve library detection (#14301)
2013-07-29 09:55:18 -04:00
Brad King 64bb8f4d19 Merge topic 'DocumentGraphvisOptions'
692ecf4 graphvizoptions: add copyright notice
ee32673 Add documentation for the --graphviz support
2013-07-29 09:55:08 -04:00
Brad King 3dace78c2c Merge topic 'minor-cleanups'
b8dc7fa Genex: Disallow LINKER_LANGUAGE only when used on a static library.
c8a10ba cmTarget: Fix iface libraries and languages for static libraries.
f94bdb3 cmTarget: Remove duplicates when printing traces of tll signatures
ff3d5fa Export: Fix typo of LINK_INTERFACE_LIBRARIES.
79a7a81 Docs: Document variables for default visibility values.
6f6391b Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs.
d8cb47f Docs: Trim trailing whitespace in generated doc.
f10e648 Docs: Document existing target property debugging options.
4f4d69f Qt4Macros: Simplify some variable population.
a413a40 Qt4Macros: Remove undefined varible use.
b60a29e Qt4Macros: Remove unneeded generate CONDITION.
e454cba Docs: Document file(GENERATE) CONDITION as optional.
2013-07-29 09:54:34 -04:00
Brad King eaeadfe440 Merge topic 'FindGTK2Debug'
32cf738 FindGTK2: Remove GTK2_SKIP_MARK_AS_ADVANCED option
a874142 FindGTK2: Update local changelog
cd2d9c7 FindGTK2: Append _INCLUDE_DIR to var name in _GTK2_FIND_INCLUDE_DIR
732324f FindGTK2: Append _LIBRARY to var name in _GTK2_FIND_LIBRARY
03bd3d1 FindGTK2: Use GTK_XXX_LIBRARY_DEBUG libraries in debug mode
2013-07-29 09:54:21 -04:00
Daniele E. Domenichelli 32cf738c98 FindGTK2: Remove GTK2_SKIP_MARK_AS_ADVANCED option
Variables are now automatically marked as advanced by
SelectLibraryConfigurations
2013-07-29 09:40:58 -04:00
Daniele E. Domenichelli a874142987 FindGTK2: Update local changelog 2013-07-29 09:40:58 -04:00
Daniele E. Domenichelli cd2d9c739c FindGTK2: Append _INCLUDE_DIR to var name in _GTK2_FIND_INCLUDE_DIR
This is to keep _GTK2_FIND_INCLUDE_DIR and _GTK2_FIND_LIBRARY coherent
after previous commit
2013-07-29 09:40:58 -04:00
Daniele E. Domenichelli 732324f1c8 FindGTK2: Append _LIBRARY to var name in _GTK2_FIND_LIBRARY
This avoids to get the base name using a regexp, in order to use
SelectLibraryConfigurations
2013-07-29 09:40:57 -04:00
Daniele E. Domenichelli 03bd3d12c0 FindGTK2: Use GTK_XXX_LIBRARY_DEBUG libraries in debug mode
If the GTK_XXX_LIBRARY_DEBUG library is available, it is now used when
linking in debug mode XXX.
A new set of variables GTK_XXX_LIBRARY_RELEASE is added and the
original GTK_XXX_LIBRARY uses the optimized/debug syntax.
2013-07-29 09:40:57 -04:00
Rolf Eike Beer 2a7975398f FindPNG: improve library detection (#14301)
-add support for upcoming version 1.7
-improve version selection, use the major and minor of the requested version
 to generate the library suffix list
-support detection of release and debug libraries
2013-07-27 22:35:11 +02:00
Alex Neundorf e32ff9666c add macros cmake_print_properties() and cmake_print_variables()
This patch adds the file CMakePrintHelpers.cmake, which provides
the macros (functions) cmake_print_properties() and cmake_print_variables(),
which are useful e.g. for debugging and make inspecting target (or other)
properties easier.

Alex
2013-07-27 21:37:05 +02:00
Alex Neundorf 692ecf4b7c graphvizoptions: add copyright notice
Alex
2013-07-26 23:32:41 +02:00
Alex Neundorf ee32673c7d Add documentation for the --graphviz support
This patch adds Modules/CMakeGraphVizOptions.cmake, which is used
only for generating documentation for the --graphviz support.

Alex
2013-07-26 22:43:42 +02:00
Brad King 003154f62c Merge topic 'Qt4-INTERFACE_LINK_LIBRARIES'
0f267c0 FindQt4: Populate the INTERFACE_LINK_LIBRARIES of IMPORTED targets.
2013-07-26 09:00:56 -04:00
Brad King 30999f8da2 Merge topic 'doc-check-compiler-flag-override'
3e79d65 Check*CompilerFlag: Document use of CMAKE_REQUIRED_DEFINITIONS (#14309)
2013-07-26 09:00:51 -04:00
Stephen Kelly 4f4d69fcc2 Qt4Macros: Simplify some variable population. 2013-07-26 09:37:12 +02:00
Stephen Kelly a413a40873 Qt4Macros: Remove undefined varible use.
This may have been added in anticipation of processing COMPILE_OPTIONS,
but as moc does not accept them, there is no need for it.
2013-07-26 09:37:12 +02:00
Stephen Kelly b60a29eaa1 Qt4Macros: Remove unneeded generate CONDITION. 2013-07-26 09:24:22 +02:00
Brad King 86f2d83de3 Merge topic 'fix-FindQt4-available-modules'
d57c1c1 FindQt4: Re-add QAxServer to the QT_MODULES.
2013-07-25 08:37:01 -04:00
Brad King 3e79d656da Check*CompilerFlag: Document use of CMAKE_REQUIRED_DEFINITIONS (#14309)
Explain how CMAKE_REQUIRED_DEFINITIONS is set before calling the
check_*_source_compiles macros.
2013-07-25 08:25:15 -04:00
Stephen Kelly 0f267c012b FindQt4: Populate the INTERFACE_LINK_LIBRARIES of IMPORTED targets.
This makes the IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG> properties
obsolete.
2013-07-25 13:55:42 +02:00
Stephen Kelly d57c1c1b9e FindQt4: Re-add QAxServer to the QT_MODULES.
This was removed instead of moved in commit b8af46cb (FindQt4: Don't
fail if certain Qt modules are unavailable.).
2013-07-24 17:59:13 +02:00
Brad King fdbf952684 Merge topic 'FindCuda_more_search_paths'
09f00a6 FindCUDA: Search for libraries in <prefix>/lib/<arch>/nvidida-current.
2013-07-24 11:02:37 -04:00
Brad King 49e8c65b92 Merge topic 'fix-FindQt4-available-modules'
969e7ee FindQt4: Don't use Qt component _FOUND vars before they're defined (#14286)
2013-07-24 11:02:29 -04:00
Stephen Kelly 969e7ee5df FindQt4: Don't use Qt component _FOUND vars before they're defined (#14286)
This fixes a regression introduced by commit b8af46cb (FindQt4: Don't
fail if certain Qt modules are unavailable., 2013-05-23)

The _FOUND variable is set by the _QT4_ADJUST_LIB_VARS macro, so
invoke that unconditionally, and guard only the set_property calls,
as described in the original bug report (#14165).
2013-07-24 10:46:00 -04:00
Brad King fd8746d038 Merge topic 'SelectLibraryConfigurations'
04d4dc3 SelectLibraryConfigurations: Use -NOTFOUND instead of copying the vars
07b44e7 SelectLibraryConfigurations: Do not cache the _LIBRARY variable
2013-07-22 09:48:39 -04:00
Brad King 29859c09af Merge topic 'cpack-wix'
bf23891 CPackWIX: Add support for custom WiX templates
155bb01 CMakeCPack: Provide an upgrade guid for WiX
bfa2e29 CPackWIX: Add option to specify the language(s) of the installer
6e51ea9 CPackWIX: Handle multiple shortcuts in the start menu
6d77e1a CPackWIX: Fix MSI package layout regression from parent
8c0e325 CPackWIX: Handle CPACK_PACKAGE_EXECUTABLES (#13967)
2013-07-22 09:48:32 -04:00
Daniele E. Domenichelli 04d4dc3374 SelectLibraryConfigurations: Use -NOTFOUND instead of copying the vars
If one of the libraries (_DEBUG or _RELEASE) is not set, the value is
set to the value of the other one.  FindQt4, from which the macro is
extracted, sets the values to XXX_LIBRARY_{DEBUG,RELEASE}-NOTFOUND
instead.  In both cases the XXX_LIBRARY is correct, but using NOTFOUND
makes it easier to understand which one is missing.

Update Tests/CMakeOnly/SelectLibraryConfigurations with the new logic.
2013-07-22 09:37:33 -04:00
Robert Maynard 09f00a6371 FindCUDA: Search for libraries in <prefix>/lib/<arch>/nvidida-current.
Ubuntu install the CUDA libraries into a location that is different
than the default location provided by the NVidia installer. So we
teach the FindCUDA package to also find the Ubuntu install location.
2013-07-22 09:16:11 -04:00
Adam J. Weigold bf23891942 CPackWIX: Add support for custom WiX templates
WiX provides a lot of functionality for installers that cannot be
supported (easily) in the default WIX.template.in file.

For most users, the default template should be fine.  However if users
want to produce merge modules, include custom actions, etc, this new
option allows for a hook into how the wxs is produced.
2013-07-19 14:50:43 -04:00
Richard Ulrich bfa2e299ae CPackWIX: Add option to specify the language(s) of the installer
Add option "CPACK_WIX_CULTURES".
2013-07-19 14:50:43 -04:00
Fredrik Axelsson 8c0e32550c CPackWIX: Handle CPACK_PACKAGE_EXECUTABLES (#13967)
Add start menu items including an uninstall shortcut.  Add variable
CPACK_WIX_PROGRAM_MENU_FOLDER to configure folder name.
2013-07-19 10:49:00 -04:00
Jason Spiro 9cdc5e6bc7 MinGW: Find mingw32-make included with Code::Blocks IDE (#14302)
If one installs MinGW using the Code::Blocks IDE installer it goes to a
path like "c:\Program Files\CodeBlocks\MinGW", not "c:\MinGW".  Use the
CodeBlocks registry entry to get the location.

Signed-off-by: Jason Spiro <jasonspiro4@gmail.com>
2013-07-19 07:56:37 -04:00
Brad King 4113f67187 Merge topic 'abi-check-tolerate-COPY_FILE-failure'
4dc4018 Teach compiler ABI check to tolerate try_compile COPY_FILE failure
2013-07-18 10:12:20 -04:00
Brad King 5b3ea27f97 Merge topic 'UseJava-copyright'
53431ea UseJava: Update notice of copyright by Kitware
2013-07-18 10:12:01 -04:00
Brad King 4dc4018553 Teach compiler ABI check to tolerate try_compile COPY_FILE failure
In CMakeDetermineCompilerABI we use try_compile with the COPY_FILE
option to get a copy of the compiled binary used to detect the ABI
information.  We already tolerate the case when compilation fails.
However, when compilation appears to succeed but does not produce the
expected executable the try_compile command immediately reports an error
because the COPY_FILE fails.

Tolerate COPY_FILE failure without stopping the overall configuration
process by using the try_compile COPY_FILE_ERROR option to capture the
error message.  Log the full error to CMakeError.log and simply report
failure to detect the ABI as if compilation had failed.

Teach the RunCMake.Configure test to cover this case and verify that the
messages show up as expected both in stdout and in CMakeError.log.
2013-07-17 15:40:44 -04:00
Brad King af884c490f Merge topic 'osx-fortran-dylib-versions'
1af8c8d OS X: Add Fortran library version flags (#14249)
2cc9f1f OS X: Add copyright notices to Darwin-*-Fortran.cmake
2013-07-17 08:47:24 -04:00
Brad King 4c7106b155 Merge topic 'UseJava-response-file'
177c051 UseJava: Pass sources to javac using response file (#13028)
2013-07-17 08:47:19 -04:00
Brad King 53431ea259 UseJava: Update notice of copyright by Kitware 2013-07-17 08:33:34 -04:00
Brad King 567440ce36 Merge topic 'FindPNG-1.6'
96fa4a2 FindPNG: Add versioned library names for 1.6 (#14289)
2013-07-16 13:59:27 -04:00
Brad King 9c119b829d Merge topic 'obsolete-qt4-macros'
cb7f32f Mark qt4_use_modules and qt4_automoc as obsolete.
2013-07-16 13:59:22 -04:00
Brad King 3573a94d72 Merge topic 'vs-no-indirect-output'
45d2966 VS: Avoid leaking child process output back to IDE (#14266)
2013-07-16 13:59:17 -04:00
Brad King 45d2966dcc VS: Avoid leaking child process output back to IDE (#14266)
The VS IDE sets the environment variable VS_UNICODE_OUTPUT when
executing build rules in order to tell MS tools to report output through
a back door instead of through stdout/stderr.  Unset this variable so
that CMake can capture or properly redirect all output from processes it
runs even when running inside a VS IDE build environment.

This generalizes the special cases fixed by commit 80d045b0 (When
GetPrerequisites.cmake runs dumpbin while running inside the VS IDE...,
2008-05-01) and commit 44aff73d (ExternalProject: Avoid bleed-through
output when logging, 2011-01-06), so drop special handling of
VS_UNICODE_OUTPUT in those instances.
2013-07-16 13:48:10 -04:00
Graham Markall 177c0516ce UseJava: Pass sources to javac using response file (#13028)
The command line string passed to javac can exceed the 8191-character
limit on Windows when there are a large number of files to compile.
To avoid this, the list of sources is written to a file which is then
passed to javac as an argfile.  Spaces in paths are dealt with by
enclosing each file in quotes, and separating files with a newline.
2013-07-16 13:29:00 -04:00
Graham Markall 1af8c8ddae OS X: Add Fortran library version flags (#14249)
The linker flags for setting the compatibility and current versions of
libraries on Darwin are set for the supported Fortran compilers.

Set CMAKE_Fortran_CREATE_SHARED_LIBRARY for the NAG Fortran compiler to
have no space after <SONAME_FLAG> so the NAG compiler can parse the
argument correctly.
2013-07-16 09:27:50 -04:00
Brad King 2cc9f1fd5c OS X: Add copyright notices to Darwin-*-Fortran.cmake 2013-07-16 09:25:06 -04:00
Brad King 96fa4a2e43 FindPNG: Add versioned library names for 1.6 (#14289)
While at it, refactor the versioned library name list generation to
reduce duplication.
2013-07-15 09:52:53 -04:00
Brad King 7fa77b3fb3 Merge topic 'revert-CMAKE_SYSROOT'
0416c94 Revert "Use --sysroot when cross compiling."
2013-07-15 09:33:56 -04:00
Brad King 0d41e9ea35 Merge topic 'doc-ExternalProject-COMMAND-keyword'
93c1165 ExternalProject: Document multiple COMMAND lines
2013-07-15 09:30:55 -04:00
Brad King 3b216d19f8 Merge topic 'CPack-fixGeneratedChangelogFormat'
976e51d CPackRPM make the changelog line conform to expected format
2013-07-15 09:30:45 -04:00
Stephen Kelly cb7f32f5b8 Mark qt4_use_modules and qt4_automoc as obsolete.
The QT_QMAKE_EXECUTABLE has to be passed through the cmake calls because
the executable may not be in the PATH.
2013-07-14 10:05:04 +02:00
Stephen Kelly 0416c94f64 Revert "Use --sysroot when cross compiling."
This reverts commit de4da665d3.

This feature is not yet ready for release. It needs to be
merged with the CMAKE_OSX_SYSROOT feature.
2013-07-12 15:44:38 +02:00
Daniele E. Domenichelli 07b44e7a1f SelectLibraryConfigurations: Do not cache the _LIBRARY variable
SelectLibraryConfigurations module currently cache and mark as advanced
the variable ${basename}_LIBRARY.
${basename}_LIBRARY_RELEASE and ${basename}_LIBRARY_DEBUG are usually
cached, because they often come from find_library().
${basename}_LIBRARY on the other hand is always of type
"optimized;${${basename}_LIBRARY_RELEASE};debug;${${basename}_LIBRARY_DEBUG}"
or just "${basename}_LIBRARY_RELEASE" or "${basename}_LIBRARY_DEBUG" if
only one version of the library is not found, if both have the same
value, or if configuration types are not supported.

Caching and marking as advanced just ${basename}_LIBRARY_RELEASE and
${basename}_LIBRARY_DEBUG is enough, just by modifying these two
variables, the user has enough control on finding the library, and
having 3 variables is redundant and confusing.
2013-07-10 15:06:01 +02:00
Brad King 93c1165705 ExternalProject: Document multiple COMMAND lines
We support multiple commands per external project step by using
the COMMAND keyword.  Document this behavior and show an example.
While at it, document that shell operators and current working
directory behavior is not defined.
2013-07-08 11:55:33 -04:00
Eric NOULARD 976e51d3a9 CPackRPM make the changelog line conform to expected format 2013-07-08 10:32:53 +02:00
Eric NOULARD 1703e069a9 CPackRPM protect '@' character in filename processed in the spec file. 2013-07-05 18:52:36 +02:00
Brad King 3173c93756 Merge topic 'Fortran-explicit-types'
7b5bc2c Fortran: Use explicit type in Fortran 90 check
2013-07-02 09:05:28 -04:00
Brad King 8b23045490 Merge topic 'FindGTK2vd2'
60e4555 FindGTK2: Add GTK2_DEFINITIONS variable
2013-07-02 09:05:05 -04:00
Brad King 31d55ee8ac Merge topic 'FindGTK2vs11'
eb16301 FindGTK2: Do not fail on MSVC11 if vc100 libraries are available
2013-07-02 09:04:12 -04:00
Brad King 7b5bc2c6f0 Fortran: Use explicit type in Fortran 90 check
In CMakeTestFortranCompiler we build a test program using a Fortran 90
construct to check whether the compiler supports the language.  Some
compilers have options to require explicit variable types.  Fix the test
program to use an explicit variable type so it passes under such a
configuration.

Suggested-by: Neil Carlson <neil.n.carlson@gmail.com>
2013-07-01 15:10:08 -04:00
Brad King 8a08ab051a Merge topic 'vs12-generator'
9a76d83 VS12: Find proper MSBuild for VSProjectInSubdir test
4e5cb39 Merge branch 'master' into vs12-generator
78fdbbc FindBoost: Add -vc120 mangling for VS 12
e99d7b1 VS12: Generate flag tables from MSBuild v120 tool files
77ac9b8 VS12: Add Visual Studio 12 generator (#14251)
2013-07-01 09:27:33 -04:00
Brad King 7c92d0dade Merge topic 'CMakeDetermineVSServicePack-vs11'
f449c68 CMakeDetermineVSServicePack: Add VS 11 update 3
2013-07-01 09:20:00 -04:00
Daniele E. Domenichelli 60e4555c89 FindGTK2: Add GTK2_DEFINITIONS variable
According to https://wiki.gnome.org/gtkmm/MSWindows on MSVC the /vd2
flag should be passed to the compiler in order to use gtkmm
2013-06-29 16:44:57 +02:00
Daniele E. Domenichelli eb1630112d FindGTK2: Do not fail on MSVC11 if vc100 libraries are available 2013-06-29 15:27:58 +02:00