Commit Graph

4749 Commits

Author SHA1 Message Date
Stephen Kelly 76552d595d Add compiler target compile options.
For clang, this allows passing -target <triple> to the compiler, and
for qcc, -V<arch> using toolchain files containing something like

 set(triple arm-linux-gnueabihf)
 set(CMAKE_C_COMPILER "/usr/bin/clang")
 set(CMAKE_C_COMPILER_TARGET ${triple})
 set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
 set(CMAKE_CXX_COMPILER_TARGET ${triple})

or

 set(arch gcc_ntoarmv7le)
 set(CMAKE_C_COMPILER /opt/qnx650/host/linux/x86/usr/bin/qcc)
 set(CMAKE_C_COMPILER_TARGET ${arch})
 set(CMAKE_CXX_COMPILER /opt/qnx650/host/linux/x86/usr/bin/QCC)
 set(CMAKE_CXX_COMPILER_TARGET ${arch})

Both clang and qcc are inherently cross compiler( driver)s.

When cross-compiling with clang, use the CMAKE_${lang}_COMPILER_TARGET
as the _CMAKE_TOOLCHAIN_PREFIX to find the appropriate binutils.

When cross-compiling with QNX qcc, use the CMAKE_${lang}_COMPILER_TARGET
to set the appropriate _CMAKE_TOOLCHAIN_PREFIX.
2013-11-19 12:38:53 -05:00
Stephen Kelly f41ecd1db4 CMakeDetermineCompilerId: Look for internal file only on host
The find_file this module uses to locate the compiler id source file
must always look on the host and never in CMAKE_FIND_ROOT_PATH, even
when a toolchain file has

 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Add NO_CMAKE_FIND_ROOT_PATH to the find_file call to avoid rerooting.
2013-11-19 12:36:27 -05:00
Brad King 1da77bf1ee Merge topic 'cleanup-build-commands'
4cce44b Help: Document the CMAKE_MAKE_PROGRAM variable in more detail
558c74d VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators
5229f2d Tests: Do not use an explicit make program for VS generators
72dd738 Tests: Fix MFC test heuristic for empty CMAKE_TEST_MAKEPROGRAM
fd6076d Tests: Pass CMAKE_MAKE_PROGRAM instead of --build-makeprogram
68031ab Tests: Configure SubProject-Stage2 test more robustly
003d10c Tests: Simplify VSExcludeFromDefaultBuild configuration
e47d934 Tests: Simplify VSProjectInSubdir configuration
e965cb1 Tests: Simplify CTest.BuildCommand.ProjectInSubdir configuration
72bf255 Tests: Pass --build-options to every test
4d1d772 ctest: Teach --build-options to allow zero options
96966b5 ctest: Make the --build-makeprogram optional for --build-and-test
91a0211 Simplify some calls to cmGlobalGenerator::Build
123a060 Teach GenerateBuildCommand to find its own make program
5f5c92b VS: Add internal APIs to find MSBuild, devenv/VCExpress, and msdev
4ac75fd Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548)
...
2013-11-19 10:55:39 -05:00
Brad King 8564682136 Merge topic 'doc-ExternalProject-formatting'
01ecd24 ExternalProject: Format module documentation
2013-11-19 09:47:39 -05:00
Brad King 01ecd24fa6 ExternalProject: Format module documentation
Manually revise the .rst format of the documentation.  Use inline
literal quotes appropriately in paragraph text.  Move the :: literal
block openers to the end of the preceding paragraphs.  Convert the
command signature documentation and examples to cmake code-block
directives.
2013-11-19 09:27:08 -05:00
Brad King 558c74d0ab VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators
Drop the "Modules/CMakeVS*FindMake.cmake" files.  Override the
cmGlobalGenerator::FindMakeProgram method for VS generators to use their
internal APIs to locate the build tool.  Set the CMAKE_MAKE_PROGRAM as a
normal variable for use by project code, but do not cache it.  This will
allow CMake and CTest to select the proper tool at build time.
2013-11-18 11:30:50 -05:00
Brad King 4ac75fdfe6 Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548)
Historically these were both added for the Makefile and Visual Studio
generators, respectively.  Later the VS generators started using the
CMAKE_MAKE_PROGRAM cache entry to find the IDE build tool, and the
CMAKE_BUILD_TOOL was simply set as an alias.

Fix the documentation to explain that CMAKE_MAKE_PROGRAM is the modern
variable and that CMAKE_BUILD_TOOL is the compatibility alias, not the
other way around.  Replace uses of CMAKE_BUILD_TOOL with
CMAKE_MAKE_PROGRAM in CMake-provided modules.  Nothing needs to lookup
CMAKE_BUILD_TOOL in the cache, so simply set it as a normal variable.
2013-11-18 08:26:23 -05:00
Nils Gladitz 7621ad6eae CPack: don't write internal variables to CPackConfig.cmake
The internal variables CPACK_ADDCOMP_COMPONENTS,
CPACK_ADDCOMP_STR and CPACK_ADDCOMP_UNAME were being needlessly
exported to CPackConfig.cmake.
Prefixing them with an underscore prevents this.

CPACK_ADDCOMP_STR was particularily problematic since it contains
unescaped quotes.
2013-11-17 11:02:41 +01:00
Brad King 5084cac09f Merge topic 'gp-ld_library_path'
e130b9e GetPrerequisites:  Preserve search path order from caller.
2013-11-14 11:28:34 -05:00
Brad King 3993300ad3 Merge topic 'openmp-cray'
ebf70b0 FindOpenMP: fix detecting compilers that do not need any special flag (#14567)
2013-11-14 11:28:24 -05:00
Brad King 42eaf34168 Merge topic 'configure_file-drop-IMMEDIATE'
15610bb Drop use of configure_file IMMEDIATE option
2013-11-14 11:28:07 -05:00
Clinton Stimpson e130b9ebaa GetPrerequisites: Preserve search path order from caller. 2013-11-14 11:26:23 -05:00
Rolf Eike Beer ebf70b037d FindOpenMP: fix detecting compilers that do not need any special flag (#14567) 2013-11-13 21:41:33 +01:00
Daniele E. Domenichelli 15610bb5b1 Drop use of configure_file IMMEDIATE option
Since commit 7d47c693 (Drop compatibility with CMake < 2.4, 2013-10-08)
we no longer need to use the configure_file IMMEDIATE option to support
compatibility modes less than 2.0.
2013-11-13 10:12:17 -05:00
Brad King 8eb20eeabe ExternalData: Allow local stores without any URL templates
Allow ExternalData_URL_TEMPLATES to be empty if a value for
ExternalData_OBJECT_STORES is provided.  Assume in this use case that
the object stores will already contain all needed objects.  Extend the
Module.ExternalData test to cover this case (all objects in stores).
Extend the RunCMake.ExternalData test to cover the non-failure message
case when stores are provided without URL templates.
2013-11-13 10:03:36 -05:00
Brad King 5473b327c6 Merge topic 'doc-ExternalData-network-path'
f3883f3 ExternalData: Show example network path URL template
ff6818b ExternalData: Format module documentation
2013-11-13 09:58:18 -05:00
Nils Gladitz 096591b96a CPackWiX: Add variables for custom tool extensions and flags 2013-11-12 14:10:01 -05:00
Brad King f3883f366d ExternalData: Show example network path URL template
In the ExternalData_URL_TEMPLATES example, add an entry showing how to
use the "file://" protocol with a network filesystem path.
2013-11-12 11:26:28 -05:00
Brad King ff6818bc0a ExternalData: Format module documentation
Manually revise the .rst format of the documentation.  Use inline
literal quotes appropriately in paragraph text.  Move the :: literal
block openers to the end of the preceding paragraphs.  Convert the
command signature documentation and examples to cmake code-block
directives.
2013-11-12 11:22:07 -05:00
Brad King 177f5e51d2 Merge topic 'osx-no-PackageMaker'
7947981 CPack: Disable OS X PackageMaker by default (#13662)
2013-11-05 11:42:10 -05:00
Brad King 46316a0569 Merge topic 'FindPHP4-no-cache-output'
a06debc FindPHP4: Drop extra content from reported PHP4_INCLUDE_PATH (#14540)
2013-11-05 08:16:57 -05:00
Brad King d94416725e Merge topic 'FindJNI-biarch'
cde56c1 FindJNI: Support biarch installations (#14541)
2013-11-05 08:16:51 -05:00
Brad King 7ccb8fafdb Merge topic 'ninja-deps-intel'
d439083 Ninja: add depfile support for Intel's compiler
2013-11-05 08:16:42 -05:00
Modestas Vainius cde56c1223 FindJNI: Support biarch installations (#14541)
On biarch architecture, CMAKE_SYSTEM_PROCESSOR might be a 64bit one
while the system 32bit one. Take this into consideration while looking
for Java library directory.

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718290
2013-11-04 08:55:02 -05:00
Brad King a06debcde9 FindPHP4: Drop extra content from reported PHP4_INCLUDE_PATH (#14540)
The set() call for this variable left out the CACHE keyword.  It does
not need to be cached anyway, so drop the other CACHE set() signature
arguments.

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722475
Reported-by: Modestas Vainius <modax@debian.org>
Inspired-by: Mathieu Malaterre <malat@debian.org>
2013-11-04 08:51:46 -05:00
Brad King f3698f7c4a Merge topic 'cpack-drag-n-drop-rez'
53d6ebb cpack: For DragNDrop generator, add sysroot option when calling Rez.
193029c cpack: For DragNDrop generator, add sysroot option when calling Rez.
2013-11-04 07:53:25 -05:00
Peter Kümmel d439083287 Ninja: add depfile support for Intel's compiler 2013-11-04 13:29:19 +01:00
Brad King 922876b0c0 Merge branch 'vs12-parallel-cl-FS' into release 2013-11-02 13:41:42 -04:00
Brad King 7947981c2b CPack: Disable OS X PackageMaker by default (#13662)
As mentioned in commit 4693cf84 (Xcode: Detect new default locations of
Xcode 4.3 bits and pieces) PackageMaker was split out of Xcode 4.3 and
above into a separate Auxiliary tools package.  Since Xcode 5.0 or so,
Apple no longer distributes PackageMaker as part of the available
development tools so it can only be obtained from old packages.

Disable the CPACK_BINARY_PACKAGEMAKER option by default as is the case
for most other tool-dependent generators.
2013-11-01 15:41:16 -04:00
Brad King f53878b0d5 FindBoost: Clarify example static libs option (#13663)
State explicitly in the example that it will only find static libraries.
2013-11-01 11:24:06 -04:00
Brad King a42a66547b FindBoost: Refine .rst formatting
Move the '::' starting literal blocks to the end of the preceding
paragraph.  Convert the "Boost CMake" divider to a section header.
2013-11-01 11:24:06 -04:00
Brad King e065decd43 Merge topic 'add-CMAKE_FIND_NO_INSTALL_PREFIX'
fe057ab Allow disabling adding the install prefix to the prefix search path.
2013-11-01 09:40:19 -04:00
Clinton Stimpson 53d6ebb360 cpack: For DragNDrop generator, add sysroot option when calling Rez. 2013-11-01 05:31:07 -06:00
Clinton Stimpson 193029c4aa cpack: For DragNDrop generator, add sysroot option when calling Rez.
Also adding overwrite option (-ov) in case multiple temporary
dmg files are being created.

Fixes bug #14536.
2013-10-31 20:25:12 -06:00
Stephen Kelly fe057ab3cd Allow disabling adding the install prefix to the prefix search path.
In certain scenarios, it is preferable to keep a 'dirty' install prefix
than to clear it, and to expect that content will not be found there.
Add a CMAKE_FIND_NO_INSTALL_PREFIX variable that can be set to disable
searching the install prefix.
2013-10-31 16:40:24 +01:00
Brad King afe6adfaba Merge topic 'external-language-compiler-id'
e65c788 CMakeDetermineCompilerId: Load src from CMAKE_MODULE_PATH (#14481)
2013-10-29 09:45:40 -04:00
Brad King fcbe435c23 Merge topic 'Qt-auto-generators'
9c87d9c Add automatic rcc invocation for Qt.
84218e1 Add automatic uic invocation for Qt.
94a0ca6 Record which files are skipped by automoc.
18fb758 Run the main executable created in the autogen tests.
e485ba1 Rename the QtAutomoc tests to QtAutogen.
7ce65c3 Add extra checks for the AUTOMOC target property.
32771fc Update output messages for generic use.
f371ab5 Rename RunAutomoc to RunAutogen.
85b3d6e Extract an SetupAutoMocTarget method.
ca124a1 Rename the AutomocInfo.cmake file to be more generic.
a342c9f Move some makefile definitions up away from moc-specific code.
98632ef Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER.
63378ba Rename some variables to reflect broader scope.
97f1aa3 Rename method to reflect generic use.
4abb111 Rename local variable to reflect generic use.
03878c9 Move variable set to where it is used.
...
2013-10-28 15:23:09 -04:00
Dragos Carp e65c788767 CMakeDetermineCompilerId: Load src from CMAKE_MODULE_PATH (#14481)
Support new languages using CMAKE_MODULE_PATH.
2013-10-28 08:54:40 -04:00
Brad King 16df2456a4 Merge topic 'enable-language-require-compiler'
3e04946 Require CMAKE_<LANG>_COMPILER to be found as a full path
6007f7c CMakeDetermineCompilerId: Always use compiler detected from IDE
332771c CMakeDetermine*Compiler: Remove temporary cache entry
2013-10-28 08:39:29 -04:00
Brad King e378bc6441 Merge topic 'ninja-use-deps'
eeb4aec Ninja: use deps = gcc/msvc feature
2013-10-28 08:38:40 -04:00
Brad King 3e04946f7b Require CMAKE_<LANG>_COMPILER to be found as a full path
All generators now support detection of the full path to the compiler, so
require it to be so.  This will allow CMake<LANG>Information.cmake and
other logic to assume the full path to the compiler tool is available.

The Makefile generators already rejected CMAKE_<LANG>_COMPILER values
that did not name an existing compiler.  Extend this error message to
all generators, make it occur as early as possible, and improve the
message with advice about how to set the compiler.  If the full path to
the compiler is not known, finish enabling languages with a fatal error
so configuration does not continue.

For now, allow the RC language compiler to not be a full path.  Later we
will need to detect the full path to "rc" under the VS IDE.

Add a RunCMake.CompilerNotFound test to cover failure cases.
Fix the RunCMake.CompilerChange test EmptyCompiler case to work
when configuration does not continue past enable_language.
2013-10-28 08:36:14 -04:00
Brad King 6007f7ca01 CMakeDetermineCompilerId: Always use compiler detected from IDE
When compiler id detection also provides a CMAKE_<LANG>_COMPILER
value, use it unconditionally.  It is known to be the compiler
that is actually in use by IDE builds in VS and Xcode.  Do not
let a stray cache entry try to say otherwise.
2013-10-28 08:36:14 -04:00
Brad King ef13fc4dfc Merge topic 'ctest-p4'
970c823 ctest_update: Add support for Perforce p4 client
2013-10-26 10:29:28 -04:00
Brad King fc15fe75c5 Merge topic 'clang-binutils'
b84f5c2 Find appropriate binutils when cross-compiling with clang
2013-10-26 10:29:12 -04:00
Brad King 86a15dbd28 Merge topic 'QNX-ninja-generator'
02cf77f QNX: Don't attempt to create depfiles
2013-10-26 10:29:06 -04:00
Brad King d36d5d8ffe Merge topic 'python-interp-remove-debug-messages'
49c4699 python: remove debug statements from FindPythonInterp.cmake.
2013-10-26 10:28:44 -04:00
Brad King 2e9e28424c Merge topic 'intel-no-i_dynamic'
f61bcbc Intel: Drop deprecated -i_dynamic flag from Fortran (#14507)
2013-10-26 10:28:38 -04:00
Brad King 5f789db847 Merge topic 'FindCUDA-arm-5.5'
ef02c9e added support for arm cross compilation with CUDA 5.5:
2013-10-26 10:28:22 -04:00
Brad King dfe23300c2 Merge topic 'qt4-svg-dep'
656716d qt4: Fix linking with QtSvg to not include QtXml.
2013-10-26 10:28:15 -04:00
Pedro Navarro 970c82348b ctest_update: Add support for Perforce p4 client
Teach the ctest_update implementation to use the p4 command-line
client to perform updates and extract the list of changes.

Add a CTest.UpdateP4 test like those that exist already for the other
version control tools.  Make the test available when p4 and the p4d
server are found.  During the test launch p4d in the background to
serve a repository from the test directory.  Then direct the client
toward this server for the duration of the test.
2013-10-26 10:24:15 -04:00
Stephen Kelly b84f5c2ef1 Find appropriate binutils when cross-compiling with clang
One way to use clang as a cross-compiler is to create
a symlink named <target>-clang, which is equivalent to
running

 clang -target <target>

Extract the toolchain prefix to find the binutils executables.
2013-10-25 07:01:38 +02:00
Stephen Kelly 02cf77f712 QNX: Don't attempt to create depfiles
The qcc driver can not handle the flags. This makes it possible to use
qcc with the Ninja generator.
2013-10-25 07:00:38 +02:00
Peter Kümmel eeb4aece1c Ninja: use deps = gcc/msvc feature
cmcldeps is now only used for .rc file processing
2013-10-24 19:48:18 +02:00
Brad King 332771c942 CMakeDetermine*Compiler: Remove temporary cache entry
When the user or toolchain file sets CMAKE_<LANG>_COMPILER to a name
without a path we use find_program with CMAKE_<LANG>_COMPILER_WITH_PATH
to search for the tool.  Remove the temporary cache entry afterward to
avoid exposing it to projects.  It is not set by other logic paths so no
one should be using it.
2013-10-24 11:34:07 -04:00
Clinton Stimpson 49c4699d30 python: remove debug statements from FindPythonInterp.cmake. 2013-10-24 08:16:50 -06:00
Brad King f61bcbce1a Intel: Drop deprecated -i_dynamic flag from Fortran (#14507)
The -i_dynamic flag is deprecated and not even listed in the manual for
Intel Composer XE 2013.

Reported-by: Izaak Beekman <zbeekman@gmail.com>
2013-10-24 09:29:43 -04:00
Matt McCormick 0767474070 FindLATEX: Find ps2pdf with MikTeX. 2013-10-24 12:06:31 +00:00
Stephen Kelly 9c87d9cc3e Add automatic rcc invocation for Qt.
This replaces the need to invoke qt4_add_resources by allowing
adding the source .qrc file directly to the target sources.
2013-10-24 12:30:41 +02:00
Stephen Kelly 84218e1870 Add automatic uic invocation for Qt.
The source files are already processed by cmQtAutomoc to look for
moc includes, so extend that to also look for ui_ includes and
find corresponding .ui files to process.

This replaces the need to invoke qt4_wrap_ui().

As the ui files are not likely to be part of the SOURCES of the
target, store the options associated with them separately in the
cmMakefile for querying during the autogen run.
2013-10-24 12:30:38 +02:00
Stephen Kelly 94a0ca604c Record which files are skipped by automoc.
They may not be skipped by autouic.
2013-10-24 11:50:58 +02:00
Stephen Kelly ca124a1515 Rename the AutomocInfo.cmake file to be more generic. 2013-10-24 11:50:57 +02:00
Vladislav Vinogradov ef02c9e449 added support for arm cross compilation with CUDA 5.5:
* added CUDA_TOOLKIT_TARGET_DIR CMake variable that used
  to locate headers and libraries for target platform

* added CUDA_TARGET_CPU_ARCH which is set to ARM for
  arm cross-compilation and is used to add
  --target-cpu-architecture NVCC flag
2013-10-24 10:04:21 +04:00
Clinton Stimpson 656716d794 qt4: Fix linking with QtSvg to not include QtXml.
Fixes issue #14505.
2013-10-23 07:04:02 -06:00
Brad King 7d47c69365 Drop compatibility with CMake < 2.4
Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to
a value lower than 2.4, and generate an error when projects or the user
attempt to do so.  In the error suggest using a CMake 2.8.x release.

Teach cmake_minimum_required to warn about projects that do not require
at least CMake 2.4.  They are not supported by CMake >= 3.0.

Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a
reference to policy CMP0001.
2013-10-23 08:54:31 -04:00
Brad King e48faced66 Merge topic 'FindJava-msg'
c832299 FindJava: fix message output (#14502)
2013-10-23 08:20:22 -04:00
Brad King 7938e589e3 Merge topic 'vs-graceful-empty-compiler'
705ae00 Quote ${CMAKE_<LANG>_COMPILER} while enabling a language
18a2537 CMakeDetermineCompilerId: Do not test vendor without a compiler
2013-10-23 08:20:08 -04:00
Brad King a8cfc21843 Merge topic 'doc-cmake-developer'
e0ce6f0 cmRST: Cross-reference cmake-developer.7 manual and cmRST Doxygen
c1c239b Help: Add documentation format to cmake-developer.7 manual
a06a90f Help: Organize cmake-developer.7 manual Modules section
28f08ba Help: Fix module documentation markup in cmake-developer.7 manual
baaab06 Help: Move Modules/readme.txt content into cmake-developer.7 manual
80a311e Help: Add cmake-developer.7 manual
2013-10-23 08:20:01 -04:00
Rolf Eike Beer c832299e90 FindJava: fix message output (#14502) 2013-10-22 20:51:32 +02:00
Brad King 705ae00491 Quote ${CMAKE_<LANG>_COMPILER} while enabling a language
Even though this variable gets set to CMAKE_<LANG>_COMPILER-NOTFOUND when
the compiler is not found, CMake<LANG>Compiler.cmake gets removed by
cmGlobalGenerator::EnableLanguage so in try compiles the value is empty.
Quote references to the variable in

 Modules/CMake(C|CXX|Fortran)Information.cmake
 Modules/CMakeDetermineCompilerId.cmake

to avoid dropping arguments from commands that expect them.
2013-10-22 14:09:37 -04:00
Brad King 18a253732d CMakeDetermineCompilerId: Do not test vendor without a compiler
If no CMAKE_${lang}_COMPILER is available then do not try to run
it to determine the compiler vendor.
2013-10-22 13:59:56 -04:00
Brad King a06a90f457 Help: Organize cmake-developer.7 manual Modules section
Add "Module Documentation" and "Find Modules" subsections.  Add to
Modules/readme.txt a textual reference to the cmake-developer.7 manual
and, while at it, fix the wiki URL domain.
2013-10-22 10:10:15 -04:00
Kitware Robot baaab068f2 Help: Move Modules/readme.txt content into cmake-developer.7 manual
Move all content from Modules/readme.txt except for the link to the
module maintainers wiki page into "Help/manual/cmake-developer.7.rst".
This produces some invalid reStructuredText markup to be fixed in a
future commit.
2013-10-22 09:51:51 -04:00
Daniele E. Domenichelli 07a2342fbc CheckTypeSize: Add support for C++
Previously if headers required to check the size of a type can be
compiled with C++ compiler only, the check would fail because the C
compiler fails.  As a consequence, HAVE_${VARIABLE} would be set to
false, and ${VARIABLE} will be empty.

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

   CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY]
                                 [LANGUAGE <language>])
2013-10-21 16:39:04 +02:00
Brad King 8fa1ceb136 Merge topic 'vs12-parallel-cl-FS'
216afc8 MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492)
2013-10-21 09:02:09 -04:00
Brad King f040840f9b Merge topic 'vs-intel-compiler'
1b7117a VS 6: Do not try Intel Fortran .vfproj file with msdev
2013-10-20 07:37:38 -04:00
Brad King 1b7117a824 VS 6: Do not try Intel Fortran .vfproj file with msdev
Teach CMakeDetermineCompilerId to skip trying to build a .vfproj
file for Intel Fortran under Visual Studio 6.  The msdev command-line
build produces a popup error dialog that hangs the configuration.
2013-10-19 06:37:22 -04:00
Brad King 216afc8a81 MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492)
In generators such as Ninja that can run multiple "cl" processes that
refer to the same compiler .pdb file (/Fd) at the same time, MSVC from
Visual Studio 2013 complains:

 fatal error C1041: cannot open program database '.../vc120.pdb';
 if multiple CL.EXE write to the same .PDB file, please use /FS

According to "cl /?":

 /FS force to use MSPDBSRV.EXE

Add the flag to compilation lines for this compiler version just after the
/Fd option.
2013-10-18 10:28:28 -04:00
Brad King f6cc3b0744 Merge topic 'vs-intel-compiler'
d14898b Intel: Fix detection of MSVC version simulated by pre-11.0 Fortran
a85e17e Intel: When simulating MSVC, re-use Windows-MSVC (#14476)
af40e8c VS: Detect Intel Fortran compiler id and version
b8522a8 VS: Expose Intel Fortran .vfproj format version to CMake language
2d36c9a CMakeDetermineCompilerId: Fix Intel Fortran compiler id detection
a6fd17c VS: Fix CMAKE_<LANG>_COMPILER detection with Intel toolset (#14471)
2013-10-18 10:01:58 -04:00
Brad King d14898b6dc Intel: Fix detection of MSVC version simulated by pre-11.0 Fortran
The Intel Fortran 10 64-bit compiler incorrectly defines _MSC_VER to its
own version (1020) instead of the underlying MSVC tools version.  Since
we expect the compiler to be used only with VS >= 7 tools, assume MSVC
version 13.0 if _MSC_VER is not greater than 1300.
2013-10-18 09:55:59 -04:00
Brad King a85e17e660 Intel: When simulating MSVC, re-use Windows-MSVC (#14476)
Teach CMake(C|CXX|Fortran)CompilerId* to report the MSVC version
simulated by the Intel compiler, if any.  Refactor the Windows-Intel
platform information helper module to load Windows-MSVC instead of
duplicating the information.  Teach Windows-MSVC to understand when
it is loaded as the simulated Fortran compiler (its preprocessor is
simulated).
2013-10-18 09:55:59 -04:00
Brad King af40e8c312 VS: Detect Intel Fortran compiler id and version
Teach CMakeDetermineCompilerId to use a .vfproj project file to
build the Fortran compiler id source file under the Visual Studio
generators.
2013-10-18 09:55:59 -04:00
Brad King fa8fc51aec Merge topic 'wix-documentation-escapes'
42b4f6c CPackWiX: prevent attribute references in docs from being interpreted
2013-10-17 08:57:41 -04:00
Nils Gladitz 42b4f6cbcf CPackWiX: prevent attribute references in docs from being interpreted 2013-10-16 22:20:10 +02:00
Rolf Eike Beer 51305f52f0 Qt4: make pro files generated for translations easier to read
-use one line for each input file and include directory
-remove duplicate include directories
2013-10-16 20:08:33 +02:00
Vadim Zhukov c6f339ceb8 Add FindBacktrace.cmake module.
It designed to search for implementation of backtrace(3) routine.
Currently it is used in OpenBSD Ports for building Clementine
music player.

A lot of input from brad.king@ and neundorf@.
2013-10-16 10:53:01 -04:00
Brad King 2d36c9ab60 CMakeDetermineCompilerId: Fix Intel Fortran compiler id detection
The Intel Fortran compiler needs the /fpp option to enable C
preprocessing.  Without the option the compiler may warn and ignore
preprocessor lines instead of failing with an error.  Detect the
warning and treat it as failure so that we move on to try /fpp and
detect the correct id.  Without this it works only by luck because
Intel is the first compiler id in our detection source file.
2013-10-16 10:37:48 -04:00
Brad King a6fd17ce50 VS: Fix CMAKE_<LANG>_COMPILER detection with Intel toolset (#14471)
When the platform toolset is from Intel, look for "icl.exe" instead of
"cl.exe".
2013-10-16 10:37:48 -04:00
Brad King 7038a93a7e Modules/readme.txt: Update steps to add module documentation
Replace the old module documentation instructions with steps to add
reStructuredText documentation that will be built by Sphinx.
2013-10-16 09:22:39 -04:00
Kitware Robot a77e308693 CPack: Replace #<type> markup with reStructuredText equivalent
Drop #end and #module.  Convert #section to a subsection header.
Convert #variable to the cmake domain "variable" directive.
Convert #macro to the cmake domain "command" directive.
Perform minor formatting fixes in text near these changes.
2013-10-16 09:22:39 -04:00
Brad King 441f2808ec Help: Fix reStructuredText syntax in auto-generated documents 2013-10-15 14:12:49 -04:00
Brad King c717e2aa8b ExternalProject: Restore documentation indentation level
This module parses its own documentation to extract supported options.
Fix the indentation level to match that expected by the parser.
2013-10-15 14:12:48 -04:00
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Brad King 69fd12583c Merge topic 'wix-extra-sources'
2e6cadd CPackWiX: allow user supplied extra sources, objects and libraries
2013-10-15 09:33:22 -04:00
Brad King 21ccad58fd Merge topic 'FindCUDA-NPP-5.5'
5076218 FindCUDA: Fix NPP library search for CUDA 5.5
2013-10-15 09:32:56 -04:00
Nils Gladitz 2e6cadde13 CPackWiX: allow user supplied extra sources, objects and libraries 2013-10-13 13:16:54 +02:00
Vladislav Vinogradov 50762188e1 FindCUDA: Fix NPP library search for CUDA 5.5
In CUDA 5.5 NPP was divided onto 3 separate libraries: nppc, npps, nppi.
2013-10-11 08:41:45 -04:00
Brad King 2e13c36211 OS X: Encode -F framework search flag in per-language platform variable
Compilers for languages other than C and C++ on OS X may not understand
the -F framework search flag.  Create a new platform information
variable CMAKE_<LANG>_FRAMEWORK_SEARCH_FLAG to hold the flag, and set it
for C and CXX lanugages in the Platform/Darwin module.

Reported-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-10-10 08:33:25 -04:00
Brad King be9d289fce Merge topic 'deprecation-message'
f973737 GenerateExportHeader: Port to use message(DEPRECATION)
f69606d Qt4Macros: Port to use message(DEPRECATION)
509c142 message: Add a DEPRECATION mode
2013-10-09 10:24:16 -04:00
Brad King f33068f615 Merge topic 'blas-windows'
192a918 FindLAPACK: MKL clean up and fix for windows
46c7bca FindBLAS: Fixes for Windows MKL support
2013-10-09 10:23:57 -04:00
Brad King e5f17214a5 Merge topic 'FindGTK2-targets'
7efef02 FindGTK2: Add tests for components and targets in gtk and gtkmm modules
95fc47a FindGTK2: Make pangocairo and cairo optional dependencies
26f790f FindGTK2: Change extra includes -> optional
24e0272 FindGTK2: do not skip target creation if optional dependencies are not found
d5f130c FindGTK2: Refactor _GTK2_ADJUST_LIB_VARS into _GTK2_ADD_TARGET
fffbd72 FindGTK2: Do not add freetype includes if they are not found
b69720d FindGTK2: Add libraries to the GTK2_LIBRARIES variable only when found
425ec40 FindGTK2: Do not link libfreetype
e9f46df FindGTK2: Add config directories only if different from include ones
56a79e1 FindGTK2: Set INTERFACE_COMPILE_DEFINITIONS target property only if not empty
4b47586 FindGTK2: Add check to ensure that target exists
61242cc FindGTK2: Fix gmodule, glibmm, pangoft2, and pangoxft targets
4b876de FindGTK2: Link freetype libs to targets including freetype includes
67e761f FindGTK2: Small cleanup
682eea3 FindGTK2: Do not require the GTK_ prefix in all the internal functions
0bc3763 FindGTK2: Better handling of include directories
...
2013-10-09 10:23:31 -04:00
Brad King 1c1a904328 Merge topic 'FindSDL-path-suffixes'
c5c217c FindSDL: Add path suffixes for <prefix>/include/(SDL|SDL12|SDL11)
2013-10-09 10:23:23 -04:00
Brad King e81b6742f7 Merge topic 'haiku-updates'
54ef2be Haiku: Include files cleanup in cmCTest
38d5555 Haiku: Remove outdated preprocessor checks
1dc61f8 Haiku: Remove use of B_COMMON_DIRECTORY
7ebc1cb Haiku: Several fixes to platform module
2013-10-09 10:23:04 -04:00
Brad King 12a7e2b10c Merge topic 'apple-clang-id'
1763c31 Set policy CMP0025 to NEW while building CMake itself
aa53ee5 Add policy CMP0025 for Apple Clang compiler id compatibility
ab65862 Clang: Add separate "AppleClang" compiler id
2013-10-09 10:21:28 -04:00
Stephen Kelly f973737305 GenerateExportHeader: Port to use message(DEPRECATION) 2013-10-08 18:23:42 +02:00
Stephen Kelly f69606d335 Qt4Macros: Port to use message(DEPRECATION) 2013-10-08 18:23:42 +02:00
Leszek Swirski 192a9182f8 FindLAPACK: MKL clean up and fix for windows 2013-10-08 16:07:43 +01:00
Brad King 5a6c15155c Merge topic 'clang-cl-compiler'
3d8356d Clang: Support Windows variants for GNU and MSVC (#13035, #14458)
51ab85c CMakeDetermineCompilerId: Add notion of "simulated" id/version
be10826 CMakeDetermineCompilerId: Fix local var init
2013-10-08 10:58:56 -04:00
Brad King 5c57fdedb1 Merge topic 'FindGTK2-quiet'
1bbc766 FindGTK2: Search for modules quietly when needed
d9eb277 FindGTK2: Find freetype quietly
675a4d3 FindGTK2: Mark GTK_*_INCLUDE_DIR as advanced
2013-10-08 10:58:30 -04:00
Daniele E. Domenichelli 95fc47aa49 FindGTK2: Make pangocairo and cairo optional dependencies 2013-10-08 10:47:06 -04:00
Daniele E. Domenichelli 26f790f0b6 FindGTK2: Change extra includes -> optional
On some versions they are not required.
2013-10-08 10:46:27 -04:00
Daniele E. Domenichelli 24e0272b23 FindGTK2: do not skip target creation if optional dependencies are not found
On some older GTK2 version gio, giomm and cairomm are not available
2013-10-08 10:30:13 -04:00
Daniele E. Domenichelli d5f130cdf6 FindGTK2: Refactor _GTK2_ADJUST_LIB_VARS into _GTK2_ADD_TARGET
This function avoids creating the targets when the required
dependencies were not found.
Also fix some wrong dependency and some typo.

${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} are
now required for gtkmm component
2013-10-08 10:30:13 -04:00
Daniele E. Domenichelli fffbd7252d FindGTK2: Do not add freetype includes if they are not found
On some older system they are not required
2013-10-08 10:30:13 -04:00
Daniele E. Domenichelli b69720d9ad FindGTK2: Add libraries to the GTK2_LIBRARIES variable only when found
Some libraries (e.g. gio) are not necessary, and often not available
with older GTK2 versions, therefore GTK_LIBRARIES should not contain
GTK2_XXX-NOT_FOUND for these libraries.
2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 425ec4080d FindGTK2: Do not link libfreetype
As discussed on the mailing list, freetype includes used in GTK2
headers libraries do not require to link the library explicitly (even
though it is already linked by GTK2 libraries.

Also remove _GTK2_ADD_TARGET_LIBRARIES no longer used and use
${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
variables instead of ${FREETYPE_INCLUDE_DIRS}
2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli e9f46dfeb2 FindGTK2: Add config directories only if different from include ones 2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 56a79e1f8c FindGTK2: Set INTERFACE_COMPILE_DEFINITIONS target property only if not empty 2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 4b47586a08 FindGTK2: Add check to ensure that target exists 2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 61242ccc8f FindGTK2: Fix gmodule, glibmm, pangoft2, and pangoxft targets 2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 4b876de974 FindGTK2: Link freetype libs to targets including freetype includes 2013-10-08 10:30:11 -04:00
Brad King c5c217c6b5 FindSDL: Add path suffixes for <prefix>/include/(SDL|SDL12|SDL11)
Also add a comment explaining the purpose of the include/SDL* path
suffixes.  As explained in commit 7cb51739 (FindSDL: Restore
accidentally dropped search paths (#13651), 2012-11-05) the include/SDL*
path suffixes are for looking in the ENV{SDLDIR} location.

Inspired-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2013-10-08 10:09:17 -04:00
Leszek Swirski 46c7bcaf96 FindBLAS: Fixes for Windows MKL support 2013-10-08 15:00:12 +01:00
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