Commit Graph

4205 Commits

Author SHA1 Message Date
Brad King 5ec8a69cac FindBoost: Use PATH_SUFFIXES to look in "Program Files"
The CMake find_path command looks under the proper "Program Files"
directories on Windows with any of the provided PATH_SUFFIXES.  This is
simpler and more robust than directly reading ENV{ProgramFiles}.  Once
Boost_INCLUDE_DIR has been located we already look next to it for the lib
directory anyway, so we do not need special help to find Boost libraries
under "Program Files".
2012-09-27 11:01:11 -04:00
David Cole 8b7a5c6166 FindMPI: Set correct variables for calls to FPHSA
Since FPHSA is called for multiple compiler languages with "MPI_${lang}"
rather than just "MPI", make sure variables for controlling QUIET,
REQUIRED and VERSION are propagated with names prefixed by MPI_${lang}
as well, rather than just MPI.

The find_package call sets up the values of MPI_FIND_REQUIRED and friends,
but these calls to FPHSA need MPI_${lang}_FIND_REQUIRED and friends in
order to function as intended.
2012-09-27 00:41:28 -04:00
Brad King d3260a46be FindBoost: Mark Boost_DIR cache entry as advanced 2012-09-26 11:10:17 -04:00
Brad King 531612d370 FindBoost: Remove extra indentation level
A large portion of the file was still indented for historical reasons.
2012-09-25 17:11:20 -04:00
David Cole 2e489526fa Merge topic 'AutomocUseTargetProperties'
e83cc94 Use the cmGeneratorTarget for the include directories API.
9d8e59d Merge branch 'use-generator-target' into AutomocUseTargetProperties
ea12871 Automoc: also the makefile-COMPILE_DEFINITIONS
894e91a Automoc: do not use DEFINITIONS, but only COMPILE_DEFINITIONS
825d1ab Automoc: fix #13493, use target properties for include dirs
2012-09-25 15:18:43 -04:00
David Cole 021e66a25c Merge topic 'osx-sysroot-cleanup'
df92864 OS X: Ignore MACOSX_DEPLOYMENT_TARGET during Xcode compiler id
e7e613e OS X: Teach deployment target sanity check about SDK names
43b7479 OS X: Further improve default CMAKE_OSX_SYSROOT selection
2690738 OS X: If CMAKE_OSX_SYSROOT is already set do not compute default
7995722 OS X: Simplify selection of CMAKE_OSX_ARCHITECTURES
1786b12 OS X: Allow CMAKE_OSX_SYSROOT to be a logical SDK name
242f673 Tests/Assembler: Use CMAKE_OSX_SYSROOT to generate .s file
a1c032b bootstrap: Suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot
230ea21 OS X: Improve default CMAKE_OSX_SYSROOT selection
a0a0877 OS X: Always generate -isysroot if any SDK is in use
33a60e6 Xcode: Remove unused code reading CMAKE_OSX_SYSROOT_DEFAULT
2012-09-25 15:18:24 -04:00
David Cole 7d03885d21 Merge topic 'ImproveFindSDLxxxModules'
68c6b13 FindSDL: Stay compatible with old input variables
9ed24c5 FindSDL: Remove from find_... calls PATHS that are set by default
38a0f71 FindSDL: Add my copyright tag to all FindSDL_* modules
020d213 FindSDL: Add version support
61a566c FindSDL: Format documentation
22154c7 FindSDL: Update documentation
4541c07 FindSDL: Add version support for FindSDL_ttf
a28c247 FindSDL: Use SDL_TTF prefix for variables
9f5dbf4 FindSDL: Update documentation
d83f80d FindSDL: Add version support for FindSDL_mixer
c10b691 FindSDL: Use SDL_MIXER prefix for variables
03dd6cc FindSDL: Pass SDL_SOUND_LIBRARY to FIND_PACKAGE_HANDLE_STANDARD_ARGS
326beca FindSDL: Use same capitalization for FPHSA as file name
cfe5b87 FindSDL: Version support for FindSDL_sound
776d3fe FindSDL: Format the documentation
a5194e2 FindSDL: Add "cmake_minimum_required" to "try_compile" project
...
2012-09-25 15:18:05 -04:00
David Cole 1dd41e6c3d Merge topic 'DetermineVsServicePack2012'
a722780 CMakeDetermineVSServicePack: Visual Studio 2012 added
2012-09-25 15:17:57 -04:00
David Cole f5513f93bf Merge topic 'clang-PIE'
ada9efd Clang: All versions know about -fPIE (#13550)
6e34aea Clang: Split Compiler/Clang* modules out from GNU (#13550)
2012-09-25 15:17:26 -04:00
David Cole 998a17d098 Merge topic 'file-DOWNLOAD-EXPECTED_HASH'
95a0011 file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=value
2012-09-25 15:17:01 -04:00
Benjamin Eikel 68c6b134d0 FindSDL: Stay compatible with old input variables
Suggested-by: David Cole <david.cole@kitware.com>
2012-09-25 13:56:04 -04:00
Benjamin Eikel 9ed24c5316 FindSDL: Remove from find_... calls PATHS that are set by default
Use PATH_SUFFIXES to add SDL parts to standard paths.
2012-09-25 13:55:51 -04:00
Benjamin Eikel 38a0f71574 FindSDL: Add my copyright tag to all FindSDL_* modules 2012-09-25 13:52:48 -04:00
Benjamin Eikel 020d2131ed FindSDL: Add version support 2012-09-25 13:52:43 -04:00
Benjamin Eikel 61a566c02a FindSDL: Format documentation 2012-09-25 13:52:40 -04:00
Benjamin Eikel 22154c7fc2 FindSDL: Update documentation 2012-09-25 13:52:35 -04:00
Benjamin Eikel 4541c07864 FindSDL: Add version support for FindSDL_ttf 2012-09-25 13:52:30 -04:00
Benjamin Eikel a28c24726b FindSDL: Use SDL_TTF prefix for variables 2012-09-25 13:52:27 -04:00
Benjamin Eikel 9f5dbf4497 FindSDL: Update documentation 2012-09-25 13:52:25 -04:00
Benjamin Eikel d83f80d174 FindSDL: Add version support for FindSDL_mixer 2012-09-25 13:52:22 -04:00
Benjamin Eikel c10b69152c FindSDL: Use SDL_MIXER prefix for variables 2012-09-25 13:52:18 -04:00
Benjamin Eikel 03dd6cc4ff FindSDL: Pass SDL_SOUND_LIBRARY to FIND_PACKAGE_HANDLE_STANDARD_ARGS 2012-09-25 13:52:12 -04:00
Benjamin Eikel 326becad31 FindSDL: Use same capitalization for FPHSA as file name 2012-09-25 13:51:53 -04:00
Benjamin Eikel cfe5b87e8c FindSDL: Version support for FindSDL_sound 2012-09-25 13:51:50 -04:00
Benjamin Eikel 776d3fe325 FindSDL: Format the documentation 2012-09-25 13:51:46 -04:00
Benjamin Eikel a5194e2ffb FindSDL: Add "cmake_minimum_required" to "try_compile" project 2012-09-25 13:51:34 -04:00
Benjamin Eikel 2c3b8255c5 FindSDL: Use SDL_IMAGE prefix for varibales
This makes FindPackageHandleStandardArgs and FeatureSummary work correctly.
Keep old variables for compatibility.
Furthermore, format the documentation.
2012-09-25 13:51:19 -04:00
Benjamin Eikel ef5b439cc1 FindSDL: Use prefix SDL_NET, because it matches the file name.
Add new variables, keep the old ones for compatibility.
Format the documentation header.
2012-09-25 13:51:17 -04:00
Benjamin Eikel 34e1a2ae56 FindSDL: Version support for FindSDL_image 2012-09-25 13:51:14 -04:00
Benjamin Eikel a5796112cb FindSDL: Add version support for FindSDL_net 2012-09-25 13:51:06 -04:00
Nils Gladitz 9ace801578 ctest_update: Tell svn not to prompt interactively (#13024)
While at it, add SVNOptions/CTEST_SVN_OPTIONS configuration settings to
add options to all svn invocations instead of just "svn update".
2012-09-25 13:36:47 -04:00
Brad King df928646ba OS X: Ignore MACOSX_DEPLOYMENT_TARGET during Xcode compiler id
Xcode honors this environment variable if the project file does not set
it.  Hide it from Xcode while building the compiler id project.
2012-09-24 14:44:07 -04:00
Brad King e7e613efbf OS X: Teach deployment target sanity check about SDK names
Since commit 1786b121 (OS X: Allow CMAKE_OSX_SYSROOT to be a logical SDK
name, 2012-09-21) we support names like "macosx" or "macosx10.7" as the
specified value of CMAKE_OSX_SYSROOT.  Extend the SDK name->path
conversion to save the original value and also convert into a temporary
variable for the Xcode generator.  Re-implement the deployment target
sanity check to detect the version from the transformed path.
2012-09-22 07:43:43 -04:00
Philip Lowman a722780498 CMakeDetermineVSServicePack: Visual Studio 2012 added 2012-09-21 23:11:18 -04:00
Brad King 43b74793de OS X: Further improve default CMAKE_OSX_SYSROOT selection
Since commit 230ea218 (OS X: Improve default CMAKE_OSX_SYSROOT
selection, 2012-09-21) we always set CMAKE_OSX_SYSROOT if any SDK is
found in order to support Makefile generator builds with Xcode >= 4.3
without the command-line tools installed.  However, in the basic
POSIX-only case of the Makefile generator with command-line tools and no
CMAKE_OSX_ARCHITECTURES we should not select any SDK by default.
2012-09-21 14:45:54 -04:00
Brad King 2690738458 OS X: If CMAKE_OSX_SYSROOT is already set do not compute default
The default computation logic is non-trivial.  Do not bother with it if
the value is already known.
2012-09-21 14:45:54 -04:00
Brad King 7995722e91 OS X: Simplify selection of CMAKE_OSX_ARCHITECTURES
Incremental changes to the logic over time have led to simply
initializing the cache entry with the environment value.
2012-09-21 14:45:53 -04:00
Brad King 1786b121b4 OS X: Allow CMAKE_OSX_SYSROOT to be a logical SDK name
Xcode supports SDKROOT values that just name an SDK rather than
specifying the full path to it.  Recognize these values and handle them.
For Xcode we just put the value directly in the generated project file.
For Makefile generators we ask xcodebuild to provide the full path to
the named SDK.

Suggested-by: Jason DiCioccio <jd@ods.org>
2012-09-21 13:31:46 -04:00
Brad King 230ea218a7 OS X: Improve default CMAKE_OSX_SYSROOT selection
Simplify the search for OSX_DEVELOPER_ROOT and allow it to fail if no
"/Developer" exists.  When it does exist, always find a MacOSX SDK
inside it to use as the default CMAKE_OSX_SYSROOT.  Otherwise set
CMAKE_OSX_SYSROOT to empty.
2012-09-21 08:59:01 -04:00
Brad King a0a0877a1e OS X: Always generate -isysroot if any SDK is in use
Drop the last use of CMAKE_OSX_SYSROOT_DEFAULT.  Replace internal
platform variable CMAKE_${lang}_HAS_ISYSROOT with a more general
CMAKE_${lang}_SYSROOT_FLAG variable.  If the -isysroot flag exists and
CMAKE_OSX_SYSROOT points to an SDK (not "/") then always add it to
compiler command lines.  This is already done in the Xcode IDE.
2012-09-21 08:53:42 -04:00
Brad King ada9efd3af Clang: All versions know about -fPIE (#13550)
The GNU compiler information file tests for GNU >= 3.4 because earlier
versions do not have the flag.  The version number test is not valid for
Clang compiler versions, but we know Clang supports the flag.
2012-09-19 14:08:45 -04:00
Brad King 6e34aea93c Clang: Split Compiler/Clang* modules out from GNU (#13550)
While Clang presents an almost identical interface to GNU there will be
some differences.  Split the compiler information modules to allow
separate rules for Clang.  Start by loading the GNU rules but leave a
place to add Clang-specific information.
2012-09-19 14:06:28 -04:00
Brad King 8fc88b7eb0 Merge topic 'vs-link-rsp'
5598d9b Ninja: don't expand any rsp files
2012-09-19 13:58:12 -04:00
Brad King d58448544c Merge topic 'ExternalProject-DOWNLOAD_NAME'
8da0fe4 ExternalProject: Add DOWNLOAD_NAME option
2012-09-19 13:58:05 -04:00
Brad King fbe7b3cdfc Merge topic 'vs11-express'
7ee3cee VS11: Add VS 2012 Express support (#13348)
e17f345 VS11: Detect VS 2012 Express for default generator (#13348)
2012-09-19 13:57:53 -04:00
Brad King 816e4ca0eb Merge topic 'osx-clang-target-flags'
011d5a4 OS X: Add platform-specific Clang compiler info files (#13536)
2012-09-19 13:57:38 -04:00
Stephen Kelly 9d8e59db71 Merge branch 'use-generator-target' into AutomocUseTargetProperties 2012-09-19 18:33:11 +02:00
Peter Kuemmel 5598d9b2a0 Ninja: don't expand any rsp files 2012-09-19 11:40:47 -04:00
Brad King 95a0011604 file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=value
Make the EXPECTED_HASH option take only a single value instead of two to
avoid handling sub-keyword arguments.  This is also consistent with
URL_HASH in ExternalProject.
2012-09-19 11:31:36 -04:00
David Cole a24830521b Merge topic 'findsdl-unlimited-main-13262'
adf7058 FindSDL: add SDLMAIN_LIBRARY only once (#13262)
2012-09-18 16:42:57 -04:00
David Cole 024bbad230 Merge topic 'cleanup-TLS-and-SSL-interface'
7369a8f file(DOWNLOAD): Make TLS options behave as documented
131d91a Rename SSL terminology to TLS
2012-09-18 16:42:47 -04:00
David Cole 893d84b221 Merge topic 'ExternalProject-check-hashes'
c266461 Add SSL_VERIFYPEER and CAINFO file options to ExternalProject_Add.
beb8a83 ExternalProject: Generalize URL_MD5 option to URL_HASH
2012-09-18 16:42:39 -04:00
David Cole 9642655c5b Merge topic 'openscenegraph-simplify-fphsa'
248db6c FindOpenSceneGraph: simplify by using more features of FPHSA
2012-09-18 16:42:16 -04:00
David Cole a98881ac8f Merge topic 'NewFindGLEWModule'
fbda7bb Initial version of find module
2012-09-18 16:41:44 -04:00
David Cole 3dea63d04d Merge topic 'topics/FindCUDA/Add-CUDA_HOST_COMPILER'
db207e4 FindCUDA: Added CUDA_HOST_COMPILER variable.
2012-09-18 16:41:20 -04:00
Brad King 8da0fe4b53 ExternalProject: Add DOWNLOAD_NAME option
Some download URLs do not have the filename embedded in the url.
Add an interface to specify the local filename explicitly.

Suggested-by: James Goppert <james.goppert@gmail.com>
2012-09-18 16:06:21 -04:00
Brad King 7ee3cee919 VS11: Add VS 2012 Express support (#13348)
Use the registry entries that vsvars32.bat uses to detect the location of
MSBuild.exe in the framework directory.  Invoke MSBuild with the option

 /p:VisualStudioVersion=$version

so it knows from which VS version to load the system build rules.  Teach
cmGlobalVisualStudio11Generator to set its ExpressEdition member using the
registry.
2012-09-18 14:03:02 -04:00
Brad King 011d5a4b47 OS X: Add platform-specific Clang compiler info files (#13536)
Clang has the same interface as GNU except that we do not need to test
for the deployment target and sysroot flags.  Simply set variables

 CMAKE_${lang}_HAS_ISYSROOT
 CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG

to true because every version of Clang available on OS X supports these
flags.
2012-09-17 15:36:41 -04:00
Rolf Eike Beer adf705863c FindSDL: add SDLMAIN_LIBRARY only once (#13262) 2012-09-17 20:29:29 +02:00
Brad King 131d91a1f9 Rename SSL terminology to TLS
TLS has superseded SSL so rename the recently added file(DOWNLOAD) and
ExternalProject options using the newer terminology.  Drop "CURLOPT"
from names because curl is an implementation detail.
2012-09-14 15:40:09 -04:00
Bill Hoffman c266461084 Add SSL_VERIFYPEER and CAINFO file options to ExternalProject_Add.
This commit adds the ability to turn on and off ssl certificate
authority checking.  It also adds the ability to specify a
certificate authority information file.  This can be done
by setting global cmake variables CMAKE_CURLOPT_CAINFO_FILE
and or CMAKE_CURLOPT_SSL_VERIFYPEER in the project calling
ExternalProject_Add, or by passing those options to individual
ExternalProject_Add calls.
2012-09-12 18:31:52 -04:00
Rolf Eike Beer 248db6c034 FindOpenSceneGraph: simplify by using more features of FPHSA 2012-09-12 21:49:59 +02:00
Brad King 49e1819f0f Merge topic 'FortranCrossCompiling3'
7924aac CMakeDetermineFortranCompiler: add support for cross-compiling (#13379)
2012-09-12 07:51:28 -04:00
Brad King beb8a8309b ExternalProject: Generalize URL_MD5 option to URL_HASH
Add support for SHA algorithms.
2012-09-11 16:00:57 -04:00
Brad King ba72828edd Merge topic 'CPackRPM_handleAttrDirectiveProperly-reloaded'
d8a1dd5 Handles %attr(nnn,-,-) /path/to/file in CPACK_RPM_USER_FILELIST properly.
2012-09-11 15:01:52 -04:00
Brad King 13c36fac62 Merge topic 'include-FPHSA'
ff0d1a8 include FPHSA from current directory in all modules
2012-09-11 15:01:41 -04:00
Brad King 80e7d90a1e Merge topic 'gettext-no-duplicate-FPHSA'
656ab19 FindGettext: remove code duplicating FPHSA checks
2012-09-11 15:01:33 -04:00
Brad King 19fdc456a0 Merge topic 'fix-qt-dbus-on-mac-problem'
5c25df1 FindQt4: Avoid "finding" non-existent library in a .framework
2012-09-11 15:01:29 -04:00
Brad King 53568bd9b5 Merge topic 'findfreetype-13502'
9d91fc6 fix for discovering ft2build.h using FREETYPE_DIR environment var (#13502)
2012-09-11 15:01:25 -04:00
Brad King 047749bfe8 Merge topic 'windows-ce'
28d744c Add WindowsCE platform information files
e7cb805 Add additional architectures to CMakePlatformId.h.in
2012-09-11 15:01:09 -04:00
Alex Neundorf 7924aacbfa CMakeDetermineFortranCompiler: add support for cross-compiling (#13379)
This adds the same support code for cross compiling to
CMakeDetermineFortranCompiler as there is already in the
C and CXX versions of this file.

Alex
2012-09-11 11:20:51 -04:00
Eric NOULARD d8a1dd5865 Handles %attr(nnn,-,-) /path/to/file in CPACK_RPM_USER_FILELIST properly.
This triggered an unknown secondary bug when there is
no ABSOLUTE INSTALL file. This is fixed as well.

This is based on a fix of bug #0013468 from Viktor Dubrovsky.
2012-09-10 22:35:02 +02:00
Rolf Eike Beer ff0d1a8d84 include FPHSA from current directory in all modules 2012-09-09 00:39:47 +02:00
Rolf Eike Beer 656ab19b5c FindGettext: remove code duplicating FPHSA checks 2012-09-08 19:06:44 +02:00
David Cole 5c25df10ac FindQt4: Avoid "finding" non-existent library in a .framework
...if the library file does not exist inside the .framework then do
not allow a library variable to be set to the path to the framework.
Force set it to NOTFOUND instead.
2012-09-06 15:11:54 -04:00
Sergei Nikulov 9d91fc65fa fix for discovering ft2build.h using FREETYPE_DIR environment var (#13502) 2012-09-06 08:57:03 +02:00
Alex Neundorf 894e91a945 Automoc: do not use DEFINITIONS, but only COMPILE_DEFINITIONS
The docs say that this is for cmake 2.4 backwards compatibility only,
so we probably don't need to support it.

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

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

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

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

Furthermore, set CMAKE_${lang}_COMPILER_ID_TEST_FLAGS only when it has a
chance to be used.  Extract _CMAKE_TOOLCHAIN_LOCATION from the compiler
path after running the compiler id step so in the future that step can
help find the path to the compiler.
2012-08-22 15:14:33 -04:00
Brad King e9bc502fb8 Detect Analog VisualDSP++ compiler version with its id
Decode hex digits from __VISUALDSPVERSION__ to compute the version
number components.  Note that the constant encodes decimal digits as hex
digits (never larger than 9).  We represent them as decimal after
extraction.  See documentation at:

  http://download.analog.com/dsp/tools/VisualDSP_45_Update_6_Release_Note_v4.pdf
  http://www.analog.com/static/imported-files/software_manuals/50_asm_man.rev3.1.pdf

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

  _RELEASE
  _RELEASE_MINOR

to compute version number components.  See documentation at:

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

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

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

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

  __PATHCC__
  __PATHCC_MINOR__
  __PATHCC_PATCHLEVEL__

to compute version number components.  See documentation at:

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

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

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

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

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

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

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

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

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

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

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

Run the following shell code:

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

Run the following shell code:

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

Run the following shell code:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

flags for position independent code generation.

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

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

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

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

 HKEY_LOCAL_MACHINE\SOFTWARE\GnuWin32\Bzip2

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

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

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

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

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

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

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

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

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

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

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

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

so use its replacement option which has been supported for several
older versions anyway.
2012-04-24 09:00:37 -04:00