Imported Upstream version 2.8.7

ci/unstable
Modestas Vainius 13 years ago
parent 09772af5e4
commit d0eb81feeb

2
.gitattributes vendored

@ -1,4 +1,5 @@
.gitattributes export-ignore .gitattributes export-ignore
.hooks* export-ignore
bootstrap crlf=input bootstrap crlf=input
configure crlf=input configure crlf=input
@ -7,6 +8,7 @@ configure crlf=input
*.sh.in crlf=input *.sh.in crlf=input
*.bat -crlf *.bat -crlf
*.bat.in -crlf
*.dsp -crlf *.dsp -crlf
*.dsptemplate -crlf *.dsptemplate -crlf
*.dsw -crlf *.dsw -crlf

@ -0,0 +1,18 @@
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# Loaded by .git/hooks/(pre-commit|commit-msg|prepare-commit-msg)
# during git commit after local hooks have been installed.
hooks_chain_pre_commit="Utilities/Git/pre-commit"
hooks_chain_commit_msg="Utilities/Git/commit-msg"
hooks_chain_prepare_commit_msg="Utilities/Git/prepare-commit-msg"

@ -213,6 +213,12 @@ ENDMACRO(CMAKE_SET_TARGET_FOLDER)
# Simply to improve readability of the main script. # Simply to improve readability of the main script.
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
MACRO (CMAKE_BUILD_UTILITIES) MACRO (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Create the KWIML library for CMake.
SET(KWIML cmIML)
SET(KWIML_HEADER_ROOT ${CMake_BINARY_DIR}/Utilities)
ADD_SUBDIRECTORY(Utilities/KWIML)
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Create the kwsys library for CMake. # Create the kwsys library for CMake.
SET(KWSYS_NAMESPACE cmsys) SET(KWSYS_NAMESPACE cmsys)
@ -231,11 +237,13 @@ MACRO (CMAKE_BUILD_UTILITIES)
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}_c "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}_c "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}EncodeExecutable "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}EncodeExecutable "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}ProcessFwd9x "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}ProcessFwd9x "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}") if(BUILD_TESTING)
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}")
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}")
endif()
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Setup third-party libraries. # Setup third-party libraries.
@ -416,9 +424,9 @@ ENDIF()
# The CMake version number. # The CMake version number.
SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 8) SET(CMake_VERSION_MINOR 8)
SET(CMake_VERSION_PATCH 5) SET(CMake_VERSION_PATCH 7)
SET(CMake_VERSION_TWEAK 0) SET(CMake_VERSION_TWEAK 0)
#SET(CMake_VERSION_RC 3) #SET(CMake_VERSION_RC 2)
# Releases define a tweak level. # Releases define a tweak level.
IF(DEFINED CMake_VERSION_TWEAK) IF(DEFINED CMake_VERSION_TWEAK)
@ -598,7 +606,9 @@ ADD_SUBDIRECTORY(Source)
ADD_SUBDIRECTORY(Utilities) ADD_SUBDIRECTORY(Utilities)
ADD_SUBDIRECTORY(Tests) ADD_SUBDIRECTORY(Tests)
CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests") if(BUILD_TESTING)
CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests")
endif()
CMAKE_SET_TARGET_FOLDER(cmw9xcom "Utilities/Win9xCompat") CMAKE_SET_TARGET_FOLDER(cmw9xcom "Utilities/Win9xCompat")
CMAKE_SET_TARGET_FOLDER(documentation "Documentation") CMAKE_SET_TARGET_FOLDER(documentation "Documentation")

@ -42,6 +42,12 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
"warning:.*is.*misused, please use.*" "warning:.*is.*misused, please use.*"
"CMakeSetupManifest.xml.*manifest authoring warning.*Unrecognized Element" "CMakeSetupManifest.xml.*manifest authoring warning.*Unrecognized Element"
"cc-3968 CC: WARNING File.*" # "implicit" truncation by static_cast "cc-3968 CC: WARNING File.*" # "implicit" truncation by static_cast
"ld: warning: directory not found for option .-(F|L)"
"warning.*This version of Mac OS X is unsupported"
# Ignore clang's summary warning, assuming prior text has matched some
# other warning expression:
"[0-9,]+ warnings? generated."
) )
IF(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode") IF(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode")

@ -1,3 +1,756 @@
Changes in CMake 2.8.7 (since 2.8.7-rc2)
--------------------------------------------
None
Changes in CMake 2.8.7-rc2 (since 2.8.7-rc1)
--------------------------------------------
Alex Neundorf (5):
automoc: default to strict mode, use CMAKE_AUTOMOC_RELAXED_MODE
automoc: improved warning message in relaxed mode
Remove trailing whitespace
Add comment about one more problem of the C depency scanner.
fix #12262: dependency scanning for ASM files
Bill Hoffman (1):
Fix the case where cmake --build failed with two project cmds in one file.
Brad King (11):
KWSys: Correctly handle empty environment variables
FortranCInterface: Work around mingw32-make trouble with parens
Xcode: Create separate rerun dependencies for subprojects (#12616)
Fix Intel Fortran .vfproj files for VS 10
HP: Drive shared library linking with compiler front end
Follow all dependencies of shared library private dependencies
Do not link private dependent shared libraries on OS X > 10.4
Avoid clobbering variable 'OUTPUT' in compiler tests (#12628)
Fix and simplify Fortran test compiler compatibility check
CTest: Recognize Intel errors without space before colon (#12627)
Windows-GNU: Remove extra quotes in GNUtoMS rule variable
David Cole (4):
Release: Increase timeout for slow-testing cygwin build
Modules: Use "windres" as rc compiler base name for cross-compiles (#12480)
Tests: Only really run MFC test if we can build MFC apps (#11213)
FindBoost: Quote possibly empty string argument (#12273)
Eric NOULARD (1):
CPackRPM fix #0012608 and unoticed related bug
Johan Fänge (1):
CMake: Fix progress reporting for custom targets (#12441)
Mike McQuaid (2):
Unset configurations variable when no build type.
Improve component support and output indentation.
Raphael Kubo da Costa (2):
Remove the apparently outdated README in Source/QtDialog.
QtDialog: Set Ctrl+Q as the shortcut for quitting the program.
Tim Gallagher (2):
FindLAPACK: Correct CMAKE_FIND_LIBRARY_SUFFIXES spelling (#12624)
FindLAPACK: List thread libs to avoid link errors (#12625)
Valat Sébastien (1):
CTest: Do not get CDash version without drop site (#12618)
Changes in CMake 2.8.7-rc1 (since 2.8.6)
----------------------------------------
Aaron Ten Clay (1):
VS: Add support for three new project properties (#12586)
Alex Neundorf (60):
fix #12392: handle CMAKE_CXX_COMPILER_ARG1 for Eclipse projects
fix #12262: use the C dependency scanner also for ASM files
fix #12465: detect the masm compiler ID ("MSVC")
Silence make on OpenBSD in FindPackageModeTest(#12508)
Remove trailing whitespace
Find Ruby on OpenBSD when installed from ports (#12507)
Eclipse generator: detect Eclipse version
Detect whether the current Eclipse version supports VirtualFolders
Eclipse: don't create VirtualFolders if not supported
Eclipse: better message when Eclipse version could not be determined
automoc:run moc on the header if the source file contains include "foo.moc"
Add copyright notices
automoc: always run moc on the cpp file if there is a foo.moc included
Eclipse: add virtual folder for each target
Eclipse: move code for generating links to projects into separate function
Eclipse: move code for generating links to targets into separate function
Eclipse: add Build and Clean targets to targets
Eclipse: detect number of CPUs, set CMAKE_ECLIPSE_MAKE_ARGUMENTS accordigly
Eclipse: fix #12417, don't create wrong src pathentries
FindLibXslt: also search libexslt and xsltproc
don't crash in automoc with empty COMPILE_DEFINITIONS property
Automoc: fix the fix, need to use std::string, not just char* pointer
automoc: fix #12541, support moc options
add documentation for the AUTOMOC_MOC_OPTIONS property
Eclipse: warn if CMAKE_BINARY_DIR is subdir of CMAKE_SOURCE_DIR
Eclipse: make targets work from any directory
Eclipse: quote the build dir (to make it work with spaces)
make automoc work when using ccmake via PATH (#12551)
Strip trailing whitespace
-make GETTEXT_PROCESS_PO_FILES() work with files with multiple dots
FindGettext: two more fixes for files with multiple dots
FindPNG: provide PNG_INCLUDE_DIRS, as the readme.txt says (#11312)
Eclipse: create links to subprojects also in the source-project (#12579)
Eclipse: use new variable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
install(EXPORT): Enforce existence of imported target files
Remove trailing whitespace
cmake-gui: add completion for the names when adding cache entries
automoc: stricter checking for what file is included
automoc: rework the checking for the matching header, to give better warnings
automoc: handle the case when the developer includes the wrong mocfile
automoc: add more test cases
automoc: improved diagnostics
automoc: minor optimization
automoc: another runtime optimization
Automoc: modified handling of included .moc files
automoc: add a test for including both abc.moc and moc_abc.cpp
automoc: add test for including the moc file from another header
automoc: add test for including a moc_abc_p.cpp file
automoc: move some code from the big parsing loop into separate functions
automoc: add special handling for including basename_p.moc, with test
automoc: add extra check whether the header contains Q_PRIVATE_SLOT
automoc: some more linebreaks for the warnings for better readability
automoc: fix handling of included _p.moc files
automoc: move the code for finding headers into separate function
automoc: add a StrictParseCppFile(), which is only qmake-compatible
automoc: also accept other files when .moc is included in non-strict mode
automoc: accept even more .moc files in non-strict mode
automoc: add variable CMAKE_AUTOMOC_STRICT_MODE, to enable strict parsing
automoc: fix line length
automoc: add documentation for CMAKE_AUTOMOC_STRICT_MODE
Alexey Ozeritsky (1):
FindLAPACK: Fix linking to static LAPACK on Unix (#12477)
Bernhard Walle (1):
Source/cmCTest.cxx: Add missing newline (#12538)
Brad King (65):
Refactor find_* command final path list computation
Constify XCode generator getters to match cmGlobalGenerator
Fix line-too-long style violations
KWSys: Fix Doxygen warnings
Add pre-commit|commit-msg|prepare-commit-msg hook placeholders
pre-commit: Reject changes to KWSys through Git
Fix CTest.UpdateSVN with Subversion 1.7 (#12535)
Teach CTest.UpdateSVN to detect svn add --depth before using it
KWSys: Address Intel compiler remarks
Fix linking to OS X Frameworks named with spaces (#12550)
Watcom: Use shortpath to CMake if full path has parens (#12548)
KWSys: Remove trailing whitespace in SystemTools.cxx
KWSys: Fix wrong spelling of __INTEL_COMPILER
Update main Copyright.txt year range for 2011
KWIML: The Kitware Information Macro Library
Configure KWIML inside CMake as cmIML
KWIML: Avoid redefining _CRT_SECURE_NO_DEPRECATE in test.h
KWIML: Suppress printf/scanf format warnings in test
KWIML: No INT_SCN*8 on SunPro compiler
KWIML: No INT_SCN*8 on Intel for Windows
KWIML: Create test output dir for Xcode
Order VS local generator Version ivar values consistently
Enumerate VS11 version explicitly in local generators
KWIML: Test header inclusion after system headers
KWIML: Ignore _LONGLONG on MS compiler
KWIML: Teach ABI.h about PGI compiler
KWIML: Avoid MSVC linker warning about not using C++ runtime
Factor Compute(File|String)MD5 into cmCryptoHash helper
Add file(MD5) command to compute cryptographic hash
Import sha2 implementation 1.0 from Aaron D. Gifford
Import sha2 implementation 1.1 from Aaron D. Gifford
sha2: Use KWIML fixed-size integer types and endian-ness
sha2: Build as part of CMakeLib
Add file(SHA*) commands to compute cryptographic hashes
sha2: Use "static const" instead of "const static" declarations
cmCryptoHash: Provide factory "New" method
Add string(MD5) and string(SHA*) commands to compute hashes
sha2: Use KWIML fixed-size integer constant macros
sha2: Suppress Borland warnings in third-party code
Disable file() and string() hash commands during bootstrap
sha2: Wrap long lines in third-party declarations
Fix CMake.File hash test for CRLF checkouts
cmCryptoHash: Add virtual destructor
sha2: Cast safe conversions to smaller integer types
sha2: Suppress -Wcast-align warning from Clang
sha2: Zero entire SHA_CTX structure during cleanup
target_link_libraries: Add missing space in documentation
target_link_libraries: Simplify argument processing state tests
install(EXPORT): Improve target import failure message format
Remove trailing whitespace from cmLocalGenerator
bootstrap: Include cmNewLineStyle in build
cmNewLineStyle: Remove trailing comma in enum
cmNewLineStyle: Use cmStandardIncludes.h
Provide std::ios_base typedef on GCC < 3
FindZLIB: Search under ZLIB_ROOT if it is set
Factor out target location undefined behavior helper macro
export(): Document undefined behavior of location properties
Recognize the Tiny C Compiler (#12605)
TinyCC: Add compiler info for shared libs on Linux (#12605)
Fortran: Detect pointer size in gfortran on MinGW
Load platform files that need to know the ABI when possible
Factor makefile generator link rule lookup into helper function
Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib
Test CMAKE_GNUtoMS option in ExportImport on MinGW and MSys
cmTarget: Create helper method for versioned library names
Clinton Stimpson (2):
Fix XML safety issue with adding preprocessor defines in CodeBlocks project.
Qt4: Fix dependencies of QtDeclartive.
Dan Kegel (1):
Modules: Add XRes to FindX11.cmake
David Cole (17):
Begin post-2.8.6 development
CTest: Fix crash when variables are not defined
VS11: Fix comment generated at the top of *.sln files
CTest: Add COVERAGE_EXTRA_FLAGS cache variable (#12490)
CTest: Clear custom vectors before populating (#12383)
Tests: Add the MFC test (#11213)
Tests: Avoid MFC test automatically for VCExpress builds (#11213)
Tests: Fix MFC test w/ Make-based generators (#11213)
Tests: Fix MFC test for old vs6 dashboards (#11213)
Tests: Avoid MFC test automatically for Watcom WMake builds (#11213)
Tests: Fix MFC test to work with VS 10 and later (#11213)
VS10: Use expected values for UseOfMfc (#11213)
Tests: Add environment logging to the MFC test (#11213)
VS11: Update InstallRequiredSystemLibraries.cmake for VS11 (#11213)
Tests: Nudge MFC test to pass on VS 6 dashboards (#11213)
VS: Use "call " keyword with .cmd and .bat file custom commands (#12445)
CTest: Disallow problem chars in build and site names (#11792)
Eric NOULARD (3):
CPackRPM support component specific variables for spec files
Fix old reference to CMAKE_MAKE_PROGRAM inside CMAKE_BUILD_TOOL doc.
CPackRPM fix #12556 and enhance documentation
James Bigler (6):
Added support for CUDA_PATH which is present in the CUDA toolkit 3.2 onward.
Reset dependency file list when a dependency disappeared.
Add work around for CUDA in UNC paths.
Fixes for handling quotes in args and other places (Fix Bug 11726 and 12099).
Make CUDA working directory unique for each target.
Miscellaneous fixes.
Jean-Christophe Fillion-Robin (1):
CTest: Look for CTestConfig.cmake in build dir first, then source dir
Johan Bjork (1):
Xcode: Avoid spewing the environment on every script run (#12522)
Mateusz Loskot (1):
FindBoost: Use MSVC11 to find Boost on Windows (#12568)
Mathieu Malaterre (1):
TinyCC: Add default compilation flags (#12605)
Mike McQuaid (6):
Add QT_LIBRARIES_PLUGINS variable to UseQt4.
Add DeployQt4 module.
Match fixup_qt4_executable with documentation.
Don't resolve directories; are never relative.
Check plugin variables are defined before warning.
Check QtCore without warning.
Nicolas Despres (17):
Refactor TargetTypeNames.
Add const versions of some getters.
Constify many getters of cmGlobalGenerator.
Remove trailing white-spaces.
Fix typo.
Doxygen: Improve code documentation.
Doxygen: Generate call graph and relationships.
Doxygen: Fix warnings.
Doxygen: Remove dependency on VTK when building doxygen.
Usage: Document -j|--parallel option in help message.
Usage: Document all options printing usage information.
Usage: Document all options printing the version number.
Usage: Print help, version and copyright options in usage information.
Usage: Add missing exepath argument in get_prerequisites documentation.
ccmake: Align 'g' and 'q' key instructions.
ccmake: Document '/' key.
ccmake: Factor toggle key help instructions.
Niels Dekker (1):
Fix CMAKE_VERBOSE_MAKEFILE for VS10 vcxproj files (#12504)
Ondrej Balaz (1):
FindBISON: Fix bison++ version parsing to avoid "Offending entry"
Peter Collingbourne (4):
Make cmLocalGenerator::ConvertToLinkReference virtual
Introduce a cmLocalGenerator::ConvertToIncludeReference function
Introduce a cmGlobalGenerator::ResolveLanguageCompiler function
Fix configuration-dependent flag lookup in cmLocalGenerator::GetTargetFlags
Peter Kuemmel (1):
Add NEWLINE_STYLE option to configure_file (#3957)
Philip Lowman (1):
FindProtoBuf: Documented limitation of the public macro
Pierre-Francois Laquerre (1):
Fix path quoting in Qt4 macros
Robert Dailey (1):
VS: Add VS_SCC_AUXPATH target property (#12549)
Rolf Eike Beer (4):
libarchive: fix typo in CheckFileOffsetBits.cmake
Tell people that link_directories() is not what they are searching for
FindBISON: Fix matching output of "bison --version"
Tests: ExternalProject: Remove unnecessary 'svn --version' call
Stephen Kelly (13):
Add features from KDE for arguments to qdbusxml2cpp.
Remove unused define.
Build each library only once instead of once for each test.
Initialize LINK_INTERFACE_LIBRARIES target property with a variable
Also run moc automatically with Qt5.
Fix typo.
Don't assume the existence of QT_MAJOR_VERSION.
Update comments and method names to not be Qt4 specific.
Fix style.
target_link_libraries: Trim trailing whitespace
target_link_libraries: Add LINK_(PUBLIC|PRIVATE) options
moc is now part of the Qt5Core module
Add a test case for the use of Q_PRIVATE_SLOT.
Changes in CMake 2.8.6 (since 2.8.6-rc4)
----------------------------------------
Alex Neundorf (5):
Remove trailing whitespace
Minor improvements to the UsePkgConfig.cmake docs
Remove trailing whitespace
Improve behaviour of --find-package mode with try_run/try_compile
Use makefile->IssueMessage() for better error messages
Bill Hoffman (2):
Use version 11.0 for 12.x and 9.10 for 10.x intel versions to fix 12.1 vsIDE.
Also, check for 11.x as an intel fortran version.
Brad King (2):
Add Visual Studio 11 generator for x86 and x64 tools
Teach our tests about special cases for VS 11
David Cole (1):
CTestCustom.cmake: Ignore clang's summary warning
Philip Lowman (1):
FindBullet: Also search for _Debug postfixed library names
Raphael Kubo da Costa (1):
Fix typo in set_target_properties' documentation.
Rolf Eike Beer (1):
Fix typo in UsePkgConfig.cmake
Changes in CMake 2.8.6-rc4 (since 2.8.6-rc3)
--------------------------------------------
Alex Neundorf (3):
FindFLEX.cmake: also search the include dir
Fix typos in FeatureSummary.cmake (#12462)
Don't warn when setting a property multiple times to the same value #12464
Bill Hoffman (2):
For VS Intel Fortran IDE builds, add a check to find the Fortran library PATH.
Enable Fortran tests for IDE builds.
Brad King (5):
FortranCInterface: Compile separate Fortran lib in VerifyC[XX]
Move IntelVSImplicitPath project to better location
Simplify IntelVSImplicitPath detection project
libarchive: Fix ssize_t detection with mingwrt 3.20
Make file(DOWNLOAD) fail on http error
David Cole (8):
Tests: Add a KWStyle test, equivalent to the make StyleCheck target
KWStyle Test: Activate by default if KWStyle is found
Xcode: Use EFFECTIVE_PLATFORM_NAME reference in ComputeOutputDir
Xcode: Add test to demonstrate iOS project in Xcode
CMake: Reference test targets only when BUILD_TESTING is ON
Tests: Add the more modern Mac64 nightly build
Release Scripts: Use Qt 4.7.4 on dashmacmini5 (#12460)
Revert "FindThreads: Try pthreads with no special option first (#11333)"
Eric NOULARD (4):
CPack fix #12449 doc mispelled
CPack fix template too
CPackDeb fix #10325 automagically use fakeroot for DEB if fakeroot is found
CPackRPM authorize per-component pre/post-[un]install scripts (#0012063)
Marcus D. Hanwell (4):
Just code style changes.
Don't warn when nothing to do in visibility function.
Made ADD_COMPILER_EXPORT_FLAGS into a macro.
Make add_compiler_export_flags a function again.
Rolf Eike Beer (1):
remove stray brace in CPackDeb documentation
Changes in CMake 2.8.6-rc3 (since 2.8.6-rc2)
--------------------------------------------
Alexey Ozeritsky (2):
FindBLAS/LAPACK fixes
FindBLAS/LAPACK fixes
Andreas Schneider (1):
Modules: Add support for more java archives in add_jar().
Björn Ricks (4):
Search for the installed python interpreter first
Determine python version
Update documentation of FindPythonInterp.cmake
Use FIND_PACKAGE_HANDLE_STANDARD_ARGS second mode
Brad King (5):
VS: Map per-source Fortran flags to IDE options
VS: Map Fortran free- and fixed-format flags to IDE options
Fortran: Add support for free- and fixed-form flags
Xcode: Honor Fortran_FORMAT target and source file property
Set CMAKE_<lang>_COMPILER_ID for VS generators
David Cole (8):
KWSys: Remove always-true dir_only parameter
KWSys: Add symlinks to directories as files (#12284)
FindPackageMessage: Eliminate new lines in cache entries
FindPackageMessage: Eliminate new lines using REGEX REPLACE
CMake: Add SaveCache at the end of successful Generate calls
Suppress Qt warning for dashmacmini5 builds
Suppress Qt warning for dashmacmini5 builds
Tests: Look for "Illegal" or "SegFault" in the output
Eric NOULARD (2):
CPack fix #12366 components RPM packages have the same package name
CPackRPM fix #12305, include directories in RPM package
Johan Björk (5):
Xcode: No spaces in makefile target names (#12370)
CMake: Write symlinks to directories as files in archives (#12284)
CPack: Do not recurse through directory symlinks (#12284)
Xcode: Do not emit the ZERO_CHECK target more than once
Xcode: Honor -g0 to disable debugging (#12377)
Johannes Stallkamp (1):
CTest: Fixed valgrind output parsing (#12260)
Matt McCormick (1):
CMake: Remove documentation for -E build (#12446)
Stephen Kelly (2):
Add some more unit tests.
Don't put what some compilers consider junk at the end of the line.
Thomas Jarosch (3):
CTest: Fix memory leaks on error
Fix file() command descriptor leak on error
ccmake: Fix off-by-one memory access error
Changes in CMake 2.8.6-rc2 (since 2.8.6-rc1)
--------------------------------------------
Brad King (2):
KWSys: Add hash function for std::string
KWSys: Fix std::string hash function for Borland
Clinton Stimpson (1):
qt4: also find QtUiTools when cross compiling with mingw.
David Cole (3):
Xcode4: Requires more quoting of single quote char
cmake.m4: Use modern signature of install(FILES ...)
CMake Release Scripts: Changes for next release candidate...
David Faure (1):
Don't use a variable name that might be used in other files.
Stephen Kelly (73):
Create moc files in the current binary dir, not the top level.
Make the formatting of feature_summary output a little better.
Add the GenerateExportMacro with unit tests.
Handle the case where the user changes the DEFINE_SYMBOL property.
Add a newline at the end of the file.
Add a newline at the end of the file.
Add missing licence header.
Remove the fatal_warnings option which is no longer used.
Test for features, not specific compilers.
Simplify. We already know we have hidden visibility at this point.
Simplify the compiler feature check
Add some debug output.
Short-circuit the tests on unsupported compilers.
Test expected no-op instead of aborting the build.
Fix tests with clang.
Fix typo and tests failing as a result.
Only run the failure tests with gcc >= 4.2
Set the CMAKE_RUNTIME_OUTPUT_DIRECTORY for windows builds.
Only set the COMPILER_HAS_HIDDEN_VISIBILITY if GCC >= 4.2
Disable all export macros on Borland.
Another attempt to fix the tests on Borland.
Use the correct project name compiletest not compilefail
Fix off-by-not in test for Borland.
Another attempt at fixing Borland.
Add some debug output to narrow down deprecation test issues
Export deprecated free methods too.
Remember to surround the other deprecated test in the Borland check.
Only set the deprecated attribute if hidden visibilty is enabled.
Make sure the hidden visibility variables never get set on MINGW.
Don't use hidden visibility on non-mingw windows either.
Don't export methods on already exported classes.
Split the deprecated available check from setting macro values.
Test for compiler features, instead of for specific platforms.
Exclude the XL compiler from the hidden-visibility test.
Add the COMPILER_HAS_DEPRECATED only if it has a declspec variant
Don't change the expected build result based on the platform.
Expect the tests to pass if hidden visibilty is not enabled.
Test -Werror instead of enabling it per compiler.
Add some messaging output to make remaining issues findable.
Perform the -Werror test only once.
Test for deprecated attribute before declspec.
Try to error on deprecated on Intel and SunCC.
Borland can't do deprecated.
Fixup forgotten part of aed84517c942a4c40f493fcf997cdf6a047349f8
Disable testing of deprecated macros.
Don't enable deprecated on HP.
Don't enable deprecated on old GCC
Exclude cygwin from the hidden visibility feature.
Exclude PGI from exports and deprecated.
Start testing expected values for compiler flags.
Exclude win32 from hidden visibility checks.
Comment the test assertion for now
Test the correct cxx variable.
Fix the version extraction regex for clang.
Hopefully add version extraction for Intel.
Add some settings for non-truncation of test output.
Fix up the regex command for Intel.
Test for too-old-intel compilers.
Possibly fix test on HPUX.
Possibly fix configuration test on AIX.
Try to make the macros do almost nothing for Watcom.
More consistency in the macro options.
Add missing NO_EXPORT macro variant.
Look for errors reported by PGI too.
Quote paths in case there is a space in one of them.
Disable the tests for Watcom.
Fix Compiler id variable name.
Add quotes in case cmake is installed in a prefix with a space.
Fix the feature of using a specific prefix for macros.
Add documentation about the prefix and no_deprecated options.
Remove blank line at the start of the file.
Don't start a line with a dash(-)
Fix up verbatim code sections of the dox.
Todd Gamblin (3):
FindBoost: Call find_package with NO_MODULE first
Fix XL compilers on non-AIX machines.
Fixed link bugs in BlueGeneP build.
Changes in CMake 2.8.6-rc1 (since 2.8.5)
--------------------------------------------
Aaron C. Meadows (1):
FindSubversion: Invoke svn non-interactively (#12304)
Alex Neundorf (92):
Add a switch to disable a find_package() call completely
Add documentation for the CMAKE_DISABLE_FIND_PACKAGE_<Name> switch
Add a basic test for CMAKE_DISABLE_FIND_PACKAGE_<package>
Add macros cmake_push/pop_check_state() as discussed on the list.
Fix copyright notice test
Add CheckCXXSymbolExists.cmake, so this can be used also for C++
Minor fix to try_compile() docs (#12333)
Fix #12342: Add APPEND_STRING option to set_property()
Extend FeatureSummary: add PURPOSE of package and TYPE
FeatureSummary.cmake: remove "comment" field
FeatureSummary.cmake: add INCLUDE_QUIET_PACKAGES keyword
FeatureSummary.cmake: error out when a REQUIRED package is missing
FeatureSummary.cmake: only higher TYPEs can override previous TYPEs
FeatureSummary.cmake: cosmetics
FeatureSummary.cmake: update documentation
Remove debug output from CheckSymbolExists
Don't put files from CMAKE_ROOT into CodeBlocks projects (#12110)
More PATH_SUFFIXES for finding Postgresql and also search catalog/pg_type.h
Use FPHSA(), remove unnecessary stuff and don't recommend link_directories()
Mark the results from find() as advanced
FindPostgreSQL: fix PATH_SUFFIXES, better output for FPHSA
Strip trailing whitespace
FindGIF/FindFreetype.cmake: remove standard search paths from find-calls
FindGif: add giflib4 as one more name for the library under Windows
Add basic version check for giflib
Patch by Campbell Barton: puts definitions into C::B project file
Remove useless line of code
Also put builtin include dirs into CodeBlocks project file
Remove trailing whitespace
Also search for libxkbfile, XSync and SM include dir
Provide macro write_basic_config_version_file()
Add example to documentation
Add some tests for write_basic_config_version_file()
Fix copyright notice
Really fix copyright notice
Set UNSUITABLE instead of not COMPATIBLE
Improve documentation for WriteBasicConfigVersionFile.cmake
Add macros GETTEXT_PROCESS_POT() and GETTEXT_PROCESS_PO_FILES()
Support REQUIRED in FindGettext.cmake (using FPHSA.cmake)
Fix #12358: make optionally enabling ASM work again
Start work on automoc: add empty cmQtAutomoc class
Start implementing skeleton for automoc in cmake
Add actual automoc code from automoc
Remove the need to check for .h/.cxx during buildtime
Add the cmake module required currently for automoc
Add AUTOMOC to the add_library() command
Fix line lengths
Move code for parsing a cpp-file from the big loop to separate function
Initialize verbose based onb the env.var.
Color output when running moc
Add the generated automoc.cpp file to the cleaned files
Use cout instead of printf()
Remove trailing whitespace
Refactor SetupAutomocTarget() so it can be run after creating the target
Remove trailing whitespace
Move automoc processing from add_executable/library to cmGlobalGenerator
Nicer progress message for the automoc target
Add a test for automoc
Add documentation for AUTOMOC, add initialization via CMAKE_AUTOMOC
Fix logic which decides when to execute automoc test
Automoc.cmake is not needed anymore
Fix build: non-void function must return a value
Fix warnings
Fix bootstrap test with automoc
Only enable the automoc test after checking that Qt4 works
Fix build: use std::ios::out|ios::trunc instead of std::ios_base::out
Silence warning in automoc: use long instead of int
Fix automoc with VS builds: apply patch from Bill
Make clLocalGenerator::GetTargetFlags() public
Add find-package mode, which does nothing yet
Implement find-package mode of cmake
Replace cmake::GetScriptMode() with GetWorkingMode()
Fix copyright notice in new CMakeFindPackageMode.cmake
Better support for lib64 and Debian multiarch
Use the file-utility to test for 64bit if there is no /usr/lib64
Add a cmake.m4 for using cmake in autoconf projects instead of pkgconfig
Improve documentation for --find-package mode
Add a test for the new --find-package mode
Only run the test if we are using a makefile generator under UNIX
The makefile for the test was kindof wrong
Fix test on OpenBSD with BSD make
Rename helper macros print_compile_flags() to set_compile_flags_var()
Dont check for -isysroot and -mmacosx-version on OSX in --find-package mode
Disable any STATUS output in --find-package mode
Much improved test, should now be executed on all UNIXes
Make the --find-package test harder
Make the test harder by always having a space in the include dirs
Only enable the test when using GNU make
Fix line length
Use $(CXXFLAGS) and $(LDFLAGS) in the --find-package test Makefile
Require the current cmake version in --find-package mode
Fix --find-package mode on Cygwin, where enable_language(RC) is called
Alexey Ozeritsky (5):
fixed: search of acml libraries
gotoblas supported
ACML-GPU supported
ACML-GPU supportede
fixed: search of ATLAS library for C/C++-only projects
Andreas Schneider (6):
FindJava: Find missing java development executables.
Modules: Added CMake Java support.
Tests: Java tests should test UseJava.cmake
Tests: Check for the new Java exeutable variables.
Java: Use set_property/get_property for target variables.
Java: Fix documentation format and indentation
Arnaud Gelas (1):
Search for the ASPELL executable
Bill Hoffman (5):
Only pay for unused variable checking if it is on.
Initial support for Intel Fortran VS2010.
Fix custom commands in VS2010 Fortran projects using CFG_INTDIR and test.
Use MSBuild when devenv is not around, since VCExpress seems broken.
Fix for bug #12413, nmake did not handle targets with + in the name.
Brad King (13):
MinGW: Remove old workaround and use native echo (#12283)
Document caveat of custom commands in multiple targets (#12311)
cmSystemTools: Remove trailing whitespace
RunSingleCommand: Fix indentation
RunSingleCommand: Avoid assignment in condition
Documentation: WIN32 not defined on Cygwin (#12334)
KWSys: Simplify SystemTools::GetTime implementation (#12261)
KWSys: Avoid conversion warning in SystemTools::GetTime
KWSys: Fix using long long and __int64 with hash_(set|map)
KWSys: __int64 and long long may be same type in specialization
XL: Fix old VisualAge branding of Fortran compiler
Do not crash when an imported target depends on a missing target
Fix CHECK_(C|CXX)_COMPILER_FLAG for Clang (#12394)
Clinton Stimpson (5):
Add -DQT_NO_DEBUG if no build type is specified so Qt plugins will work.
Add qt4/QtCore to help find Qt headers when cross-compiling.
Qt4: Fix reference of undefined variable when detecting frameworks on Mac OS X
Remove C compiler requirement from FindQt4.cmake
CPack/NSIS: Fix reinstall and multiple install issues when using components.
David Cole (26):
Begin post-2.8.5 development
Fix Architecture test to work with Xcode 4
Fix BuildDepends test to work with Xcode 4
Base architecture choice logic on Xcode version
Use correct default multiple architecture values in test
Add use of EFFECTIVE_PLATFORM_NAME to generated Xcode projects.
Correct KWStyle line too long error
Add fail regex to detect supported warning flags correctly.
Add support for Visual Studio project-specific globals (#8707)
Fix machine-specific UpdateGIT test failures
Ensure libgmp-10.dll is in the PATH for CMakeTestAllGenerators
Watcom: Add -c flag to wlib calls (#12245)
Add Watcom support to InstallRequiredSystemLibraries (#11866)
Watcom: Use correct args for execute_process call (#11866)
CTest: print failed tests in index order (#11746)
Fix line too long style violation
Documentation: Fix comments in the source code (#10941)
Add more find_path locations for DCMTK header files (#12323)
VS9: Add include_directories to midl command lines
KWSys: Remove translation path for "/tmp_mnt/" (#10595)
VS10: Avoid unnecessary rebuilds for custom commands
QtAutomoc test: Pass QT_QMAKE_EXECUTABLE
QtAutomoc: Eliminate compiler warning
CheckSymbolExists: Use IMMEDIATE flag for configure_file (#11333)
Xcode: Suppress same-old warning again.
Xcode: Save object id values in CMakeCache.txt (#11690)
Johan Björk (5):
Xcode: Remove PREBINDING attribute for Xcode 4 and above
RunSingleCommand: Replace verbose boolean with enum
RunSingleCommand: Add a OUTPUT_NORMAL flag.
Xcode: Quote ',' in Xcode string values (#12259)
Xcode: Rearrange CMakeReRun to enable parallel builds
Matej Hribernik (2):
VS: Factor Find64BitTools out of Win64 generator to parent
Add VisualStudio 9 and 10 generators for Itanium platform
Modestas Vainius (1):
multiarch: Treat lib/<arch> as implicit link dir (#12326)
Oliver Buchtala (3):
Java: Create java_class_filelist only if it does't exist.
Java: Added some dependency magic to avoid recompilations.
Java: Create correct jar archive dependencies.
Rolf Eike Beer (2):
remove extra output message from FindJava.cmake
FindThreads: Try pthreads with no special option first (#11333)
Steven Velez (1):
VS10: Add SCC support
Todd Gamblin (2):
Try regular compiler when no MPI compiler.
Fix issues with removing try_compile input file.
Will Dicharry (1):
Added HDF5 high level Fortran bindings to available components.
Changes in CMake 2.8.5 (since 2.8.5-rc3) Changes in CMake 2.8.5 (since 2.8.5-rc3)
-------------------------------------------- --------------------------------------------
Brad King (1): Brad King (1):

@ -1,5 +1,5 @@
CMake - Cross Platform Makefile Generator CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

@ -0,0 +1,16 @@
set(AM_SOURCES "@_moc_files@" )
set(AM_HEADERS "@_moc_headers@" )
set(AM_MOC_COMPILE_DEFINITIONS "@_moc_compile_defs@")
set(AM_MOC_DEFINITIONS "@_moc_defs@")
set(AM_MOC_INCLUDES "@_moc_incs@")
set(AM_MOC_OPTIONS "@_moc_options@")
set(AM_CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE@")
set(AM_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/")
set(AM_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/")
set(AM_QT_MOC_EXECUTABLE "@QT_MOC_EXECUTABLE@")
set(AM_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@/")
set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/")
set(AM_QT_VERSION_MAJOR "@QT_VERSION_MAJOR@" )
set(AM_Qt5Core_VERSION_MAJOR "@Qt5Core_VERSION_MAJOR@" )
set(AM_TARGET_NAME "@_moc_target_name@")
set(AM_RELAXED_MODE "@_moc_relaxed_mode@")

@ -0,0 +1,26 @@
# This is a basic version file for the Config-mode of find_package().
# It is used by WriteBasicConfigVersionFile.cmake as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "@CVF_VERSION@")
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

@ -0,0 +1,41 @@
# This is a basic version file for the Config-mode of find_package().
# It is used by WriteBasicConfigVersionFile.cmake as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
# but only if the requested major version is the same as the current one.
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "@CVF_VERSION@")
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
if("@CVF_VERSION@" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
else()
set(CVF_VERSION_MAJOR "@CVF_VERSION@")
endif()
if("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "${CVF_VERSION_MAJOR}")
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
set(PACKAGE_VERSION_COMPATIBLE FALSE)
endif()
if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

@ -33,7 +33,7 @@ IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
IF(NOT _INCLUDED_FILE) IF(NOT _INCLUDED_FILE)
IF("ASM${ASM_DIALECT}" STREQUAL "ASM") IF("ASM${ASM_DIALECT}" STREQUAL "ASM")
MESSAGE(FATAL_ERROR "Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}") MESSAGE(STATUS "Warning: Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}")
ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM") ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM")
INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
ENDIF(NOT _INCLUDED_FILE) ENDIF(NOT _INCLUDED_FILE)

@ -48,6 +48,9 @@
#elif defined(__TI_COMPILER_VERSION__) #elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI_DSP" # define COMPILER_ID "TI_DSP"
#elif defined(__TINYC__)
# define COMPILER_ID "TinyCC"
#elif defined(__SCO_VERSION__) #elif defined(__SCO_VERSION__)
# define COMPILER_ID "SCO" # define COMPILER_ID "SCO"

@ -68,6 +68,12 @@ IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE) ENDIF (NOT _INCLUDED_FILE)
IF(CMAKE_C_SIZEOF_DATA_PTR)
FOREACH(f ${CMAKE_C_ABI_FILES})
INCLUDE(${f})
ENDFOREACH()
UNSET(CMAKE_C_ABI_FILES)
ENDIF()
# This should be included before the _INIT variables are # This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables # used to initialize the cache. Since the rule variables

@ -67,6 +67,12 @@ IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE) ENDIF (NOT _INCLUDED_FILE)
IF(CMAKE_CXX_SIZEOF_DATA_PTR)
FOREACH(f ${CMAKE_CXX_ABI_FILES})
INCLUDE(${f})
ENDFOREACH()
UNSET(CMAKE_CXX_ABI_FILES)
ENDIF()
# This should be included before the _INIT variables are # This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables # used to initialize the cache. Since the rule variables

@ -107,6 +107,10 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XL "-qversion") SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XL "-qversion")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XL "XL C") SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XL "XL C")
LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS MSVC )
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_MSVC "/?")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_MSVC "Microsoft")
LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP ) LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP )
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h") SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments") SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments")

@ -105,10 +105,7 @@ ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_C_COMPILER_ID_RUN 1) SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_PLATFORM_ID "Windows") SET(CMAKE_C_PLATFORM_ID "Windows")
SET(CMAKE_C_COMPILER_ID "MSVC")
# TODO: Set the compiler id. It is probably MSVC but
# the user may be using an integrated Intel compiler.
# SET(CMAKE_C_COMPILER_ID "MSVC")
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_C_COMPILER_ID_RUN) IF(NOT CMAKE_C_COMPILER_ID_RUN)

@ -117,10 +117,7 @@ ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_CXX_COMPILER_ID_RUN 1) SET(CMAKE_CXX_COMPILER_ID_RUN 1)
SET(CMAKE_CXX_PLATFORM_ID "Windows") SET(CMAKE_CXX_PLATFORM_ID "Windows")
SET(CMAKE_CXX_COMPILER_ID "MSVC")
# TODO: Set the compiler id. It is probably MSVC but
# the user may be using an integrated Intel compiler.
# SET(CMAKE_CXX_COMPILER_ID "MSVC")
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_CXX_COMPILER_ID_RUN) IF(NOT CMAKE_CXX_COMPILER_ID_RUN)
SET(CMAKE_CXX_COMPILER_ID_RUN 1) SET(CMAKE_CXX_COMPILER_ID_RUN 1)

@ -57,6 +57,8 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
IF(ABI_SIZEOF_DPTR) IF(ABI_SIZEOF_DPTR)
SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE) SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
ELSEIF(CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT)
SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT}" PARENT_SCOPE)
ENDIF(ABI_SIZEOF_DPTR) ENDIF(ABI_SIZEOF_DPTR)
IF(ABI_NAME) IF(ABI_NAME)
@ -83,6 +85,29 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n") "Parsed ${lang} implicit link information from above output:\n${log}\n\n")
ENDIF() ENDIF()
# for VS IDE Intel Fortran we have to figure out the
# implicit link path for the fortran run time using
# a try-compile
IF("${lang}" MATCHES "Fortran"
AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
SET(_desc "Determine Intel Fortran Compiler Implicit Link Path")
MESSAGE(STATUS "${_desc}")
# Build a sample project which reports symbols.
TRY_COMPILE(IFORT_LIB_PATH_COMPILED
${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath
${CMAKE_ROOT}/Modules/IntelVSImplicitPath
IntelFortranImplicit
CMAKE_FLAGS
"-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
OUTPUT_VARIABLE _output)
FILE(WRITE
"${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.txt"
"${_output}")
INCLUDE(${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.cmake OPTIONAL)
SET(_desc "Determine Intel Fortran Compiler Implicit Link Path -- done")
MESSAGE(STATUS "${_desc}")
ENDIF()
SET(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE) SET(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE)
SET(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE) SET(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)

@ -146,10 +146,7 @@ MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER)
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_Fortran_COMPILER_ID_RUN 1) SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
SET(CMAKE_Fortran_PLATFORM_ID "Windows") SET(CMAKE_Fortran_PLATFORM_ID "Windows")
SET(CMAKE_Fortran_COMPILER_ID "Intel")
# TODO: Set the compiler id. It is probably MSVC but
# the user may be using an integrated Intel compiler.
# SET(CMAKE_Fortran_COMPILER_ID "MSVC")
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_Fortran_COMPILER_ID_RUN) IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)

@ -0,0 +1,120 @@
#=============================================================================
# Copyright 2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# This file is included by CMakeFindEclipseCDT4.cmake and CMakeFindCodeBlocks.cmake
# The Eclipse and the CodeBlocks generators need to know the standard include path
# so that they can find the headers at runtime and parsing etc. works better
# This is done here by actually running gcc with the options so it prints its
# system include directories, which are parsed then and stored in the cache.
MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines)
SET(${_resultIncludeDirs})
SET(_gccOutput)
FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" )
IF (${_lang} STREQUAL "c++")
SET(_compilerExecutable "${CMAKE_CXX_COMPILER}")
SET(_arg1 "${CMAKE_CXX_COMPILER_ARG1}")
ELSE ()
SET(_compilerExecutable "${CMAKE_C_COMPILER}")
SET(_arg1 "${CMAKE_C_COMPILER_ARG1}")
ENDIF ()
EXECUTE_PROCESS(COMMAND ${_compilerExecutable} ${_arg1} -v -E -x ${_lang} -dD dummy
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
ERROR_VARIABLE _gccOutput
OUTPUT_VARIABLE _gccStdout )
FILE(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
# First find the system include dirs:
IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" )
# split the output into lines and then remove leading and trailing spaces from each of them:
STRING(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}")
FOREACH(nextLine ${_includeLines})
STRING(STRIP "${nextLine}" _includePath)
LIST(APPEND ${_resultIncludeDirs} "${_includePath}")
ENDFOREACH(nextLine)
ENDIF()
# now find the builtin macros:
STRING(REGEX MATCHALL "#define[^\n]+\n" _defineLines "${_gccStdout}")
# A few example lines which the regexp below has to match properly:
# #define MAX(a,b) ((a) > (b) ? (a) : (b))
# #define __fastcall __attribute__((__fastcall__))
# #define FOO (23)
# #define __UINTMAX_TYPE__ long long unsigned int
# #define __UINTMAX_TYPE__ long long unsigned int
# #define __i386__ 1
FOREACH(nextLine ${_defineLines})
STRING(REGEX MATCH "^#define +([A-Za-z_][A-Za-z0-9_]*)(\\([^\\)]+\\))? +(.+) *$" _dummy "${nextLine}")
SET(_name "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
STRING(STRIP "${CMAKE_MATCH_3}" _value)
#MESSAGE(STATUS "m1: -${CMAKE_MATCH_1}- m2: -${CMAKE_MATCH_2}- m3: -${CMAKE_MATCH_3}-")
LIST(APPEND ${_resultDefines} "${_name}")
IF(_value)
LIST(APPEND ${_resultDefines} "${_value}")
ELSE()
LIST(APPEND ${_resultDefines} " ")
ENDIF()
ENDFOREACH(nextLine)
ENDMACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang)
# Save the current LC_ALL, LC_MESSAGES, and LANG environment variables and set them
# to "C" that way GCC's "search starts here" text is in English and we can grok it.
SET(_orig_lc_all $ENV{LC_ALL})
SET(_orig_lc_messages $ENV{LC_MESSAGES})
SET(_orig_lang $ENV{LANG})
IF(_orig_lc_all)
SET(ENV{LC_ALL} C)
ENDIF()
IF(_orig_lc_messages)
SET(ENV{LC_MESSAGES} C)
ENDIF()
IF(_orig_lang)
SET(ENV{LANG} C)
ENDIF()
# Now check for C, works for gcc and Intel compiler at least
IF (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS)
IF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines)
SET(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
SET(CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
ENDIF ()
ENDIF ()
# And now the same for C++
IF (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS)
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines)
SET(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
SET(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros")
ENDIF ()
ENDIF ()
# Restore original LC_ALL, LC_MESSAGES, and LANG
IF(_orig_lc_all)
SET(ENV{LC_ALL} ${_orig_lc_all})
ENDIF()
IF(_orig_lc_messages)
SET(ENV{LC_MESSAGES} ${_orig_lc_messages})
ENDIF()
IF(_orig_lang)
SET(ENV{LANG} ${_orig_lang})
ENDIF()

@ -21,3 +21,5 @@ IF(CMAKE_CODEBLOCKS_EXECUTABLE)
SET(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_CODEBLOCKS_EXECUTABLE} <PROJECT_FILE>" ) SET(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_CODEBLOCKS_EXECUTABLE} <PROJECT_FILE>" )
ENDIF(CMAKE_CODEBLOCKS_EXECUTABLE) ENDIF(CMAKE_CODEBLOCKS_EXECUTABLE)
# Determine builtin macros and include dirs:
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)

@ -17,112 +17,61 @@
FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable") FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable")
# This variable is used by the Eclipse generator and appended to the make invocation commands. FUNCTION(_FIND_ECLIPSE_VERSION)
SET(CMAKE_ECLIPSE_MAKE_ARGUMENTS "" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds") # This code is in a function so the variables used here have only local scope
IF(CMAKE_ECLIPSE_EXECUTABLE)
# This variable is used by the Eclipse generator in out-of-source builds only. GET_FILENAME_COMPONENT(_ECLIPSE_DIR "${CMAKE_ECLIPSE_EXECUTABLE}" PATH)
SET(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR") FILE(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/features/org.eclipse.platform*")
MARK_AS_ADVANCED(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT) IF("${_ECLIPSE_FEATURE_DIR}" MATCHES ".+org.eclipse.platform_([0-9]+\\.[0-9]+).+")
SET(_ECLIPSE_VERSION ${CMAKE_MATCH_1})
# The Eclipse generator needs to know the standard include path
# so that Eclipse ca find the headers at runtime and parsing etc. works better
# This is done here by actually running gcc with the options so it prints its
# system include directories, which are parsed then and stored in the cache.
MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines)
SET(${_resultIncludeDirs})
SET(_gccOutput)
FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" )
IF (${_lang} STREQUAL "c++")
SET(_compilerExecutable "${CMAKE_CXX_COMPILER}")
ELSE (${_lang} STREQUAL "c++")
SET(_compilerExecutable "${CMAKE_C_COMPILER}")
ENDIF (${_lang} STREQUAL "c++")
EXECUTE_PROCESS(COMMAND ${_compilerExecutable} -v -E -x ${_lang} -dD dummy
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
ERROR_VARIABLE _gccOutput
OUTPUT_VARIABLE _gccStdout )
FILE(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
# First find the system include dirs:
IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" )
# split the output into lines and then remove leading and trailing spaces from each of them:
STRING(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}")
FOREACH(nextLine ${_includeLines})
STRING(STRIP "${nextLine}" _includePath)
LIST(APPEND ${_resultIncludeDirs} "${_includePath}")
ENDFOREACH(nextLine)
ENDIF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" )
# now find the builtin macros:
STRING(REGEX MATCHALL "#define[^\n]+\n" _defineLines "${_gccStdout}")
# A few example lines which the regexp below has to match properly:
# #define MAX(a,b) ((a) > (b) ? (a) : (b))
# #define __fastcall __attribute__((__fastcall__))
# #define FOO (23)
# #define __UINTMAX_TYPE__ long long unsigned int
# #define __UINTMAX_TYPE__ long long unsigned int
# #define __i386__ 1
FOREACH(nextLine ${_defineLines})
STRING(REGEX MATCH "^#define +([A-Za-z_][A-Za-z0-9_]*)(\\([^\\)]+\\))? +(.+) *$" _dummy "${nextLine}")
SET(_name "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
STRING(STRIP "${CMAKE_MATCH_3}" _value)
#MESSAGE(STATUS "m1: -${CMAKE_MATCH_1}- m2: -${CMAKE_MATCH_2}- m3: -${CMAKE_MATCH_3}-")
LIST(APPEND ${_resultDefines} "${_name}")
IF(_value)
LIST(APPEND ${_resultDefines} "${_value}")
ELSE()
LIST(APPEND ${_resultDefines} " ")
ENDIF() ENDIF()
ENDFOREACH(nextLine) ENDIF()
# Set up a map with the names of the Eclipse releases:
SET(_ECLIPSE_VERSION_NAME_ "Unknown" )
SET(_ECLIPSE_VERSION_NAME_3.2 "Callisto" )
SET(_ECLIPSE_VERSION_NAME_3.3 "Europa" )
SET(_ECLIPSE_VERSION_NAME_3.4 "Ganymede" )
SET(_ECLIPSE_VERSION_NAME_3.5 "Galileo" )
SET(_ECLIPSE_VERSION_NAME_3.6 "Helios" )
SET(_ECLIPSE_VERSION_NAME_3.7 "Indigo" )
IF(_ECLIPSE_VERSION)
MESSAGE(STATUS "Found Eclipse version ${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}})")
ELSE()
SET(_ECLIPSE_VERSION "3.6" )
MESSAGE(STATUS "Could not determine Eclipse version, assuming at least ${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}}). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.")
ENDIF()
SET(CMAKE_ECLIPSE_VERSION "${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}})" CACHE STRING "The version of Eclipse. If Eclipse has not been found, 3.6 (Helios) is assumed.")
SET_PROPERTY(CACHE CMAKE_ECLIPSE_VERSION PROPERTY STRINGS "3.2 (${_ECLIPSE_VERSION_NAME_3.2})"
"3.3 (${_ECLIPSE_VERSION_NAME_3.3})"
"3.4 (${_ECLIPSE_VERSION_NAME_3.4})"
"3.5 (${_ECLIPSE_VERSION_NAME_3.5})"
"3.6 (${_ECLIPSE_VERSION_NAME_3.6})"
"3.7 (${_ECLIPSE_VERSION_NAME_3.7})")
ENDFUNCTION()
_FIND_ECLIPSE_VERSION()
# Try to find out how many CPUs we have and set the -j argument for make accordingly
SET(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS "")
INCLUDE(ProcessorCount)
PROCESSORCOUNT(_CMAKE_ECLIPSE_PROCESSOR_COUNT)
# Only set -j if we are under UNIX and if the make-tool used actually has "make" in the name
# (we may also get here in the future e.g. for ninja)
IF("${_CMAKE_ECLIPSE_PROCESSOR_COUNT}" GREATER 1 AND UNIX AND "${CMAKE_MAKE_PROGRAM}" MATCHES make)
SET(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS "-j${_CMAKE_ECLIPSE_PROCESSOR_COUNT}")
ENDIF()
ENDMACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang) # This variable is used by the Eclipse generator and appended to the make invocation commands.
SET(CMAKE_ECLIPSE_MAKE_ARGUMENTS "${_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
# Save the current LC_ALL, LC_MESSAGES, and LANG environment variables and set them
# to "C" that way GCC's "search starts here" text is in English and we can grok it.
SET(_orig_lc_all $ENV{LC_ALL})
SET(_orig_lc_messages $ENV{LC_MESSAGES})
SET(_orig_lang $ENV{LANG})
IF(_orig_lc_all)
SET(ENV{LC_ALL} C)
ENDIF(_orig_lc_all)
IF(_orig_lc_messages)
SET(ENV{LC_MESSAGES} C)
ENDIF(_orig_lc_messages)
IF(_orig_lang)
SET(ENV{LANG} C)
ENDIF(_orig_lang)
# Now check for C, works for gcc and Intel compiler at least
IF (NOT CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS)
IF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines)
SET(CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
SET(CMAKE_ECLIPSE_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
ENDIF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel)
ENDIF (NOT CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS)
# And now the same for C++ # This variable is used by the Eclipse generator in out-of-source builds only.
IF (NOT CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS) SET(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel) MARK_AS_ADVANCED(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines)
SET(CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
SET(CMAKE_ECLIPSE_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros")
ENDIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel)
ENDIF (NOT CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS)
# Restore original LC_ALL, LC_MESSAGES, and LANG # Determine builtin macros and include dirs:
IF(_orig_lc_all) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)
SET(ENV{LC_ALL} ${_orig_lc_all})
ENDIF(_orig_lc_all)
IF(_orig_lc_messages)
SET(ENV{LC_MESSAGES} ${_orig_lc_messages})
ENDIF(_orig_lc_messages)
IF(_orig_lang)
SET(ENV{LANG} ${_orig_lang})
ENDIF(_orig_lang)

@ -0,0 +1,187 @@
# This file is executed by cmake when invoked with --find-package.
# It expects that the following variables are set using -D:
# NAME = name of the package
# COMPILER_ID = the CMake compiler ID for which the result is, i.e. GNU/Intel/Clang/MSVC, etc.
# LANGUAGE = language for which the result will be used, i.e. C/CXX/Fortan/ASM
# MODE = EXIST : only check for existance of the given package
# COMPILE : print the flags needed for compiling an object file which uses the given package
# LINK : print the flags needed for linking when using the given package
# QUIET = if TRUE, don't print anything
#=============================================================================
# Copyright 2006-2011 Alexander Neundorf, <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(NOT NAME)
message(FATAL_ERROR "Name of the package to be searched not specified. Set the CMake variable NAME, e.g. -DNAME=JPEG .")
endif()
if(NOT COMPILER_ID)
message(FATAL_ERROR "COMPILER_ID argument not specified. In doubt, use GNU.")
endif()
if(NOT LANGUAGE)
message(FATAL_ERROR "LANGUAGE argument not specified. Use C, CXX or Fortran.")
endif()
if(NOT MODE)
message(FATAL_ERROR "MODE argument not specified. Use either EXIST, COMPILE or LINK.")
endif()
# require the current version. If we don't do this, Platforms/CYGWIN.cmake complains because
# it doesn't know whether it should set WIN32 or not:
cmake_minimum_required(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} )
macro(ENABLE_LANGUAGE)
# disable the enable_language() command, otherwise --find-package breaks on Windows.
# On Windows, enable_language(RC) is called in the platform files unconditionally.
# But in --find-package mode, we don't want (and can't) enable any language.
endmacro()
include(CMakeDetermineSystem)
# short-cut some tests on Darwin, see Darwin-GNU.cmake:
if("${CMAKE_SYSTEM_NAME}" MATCHES Darwin AND "${COMPILER_ID}" MATCHES GNU)
set(${CMAKE_${LANGUAGE}_HAS_ISYSROOT} 0 )
set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "")
endif()
# Also load the system specific file, which sets up e.g. the search paths.
# This makes the FIND_XXX() calls work much better
include(CMakeSystemSpecificInformation)
if(UNIX)
# try to guess whether we have a 64bit system, if it has not been set
# from the outside
if(NOT CMAKE_SIZEOF_VOID_P)
set(CMAKE_SIZEOF_VOID_P 4)
if(EXISTS /usr/lib64)
set(CMAKE_SIZEOF_VOID_P 8)
else()
# use the file utility to check whether itself is 64 bit:
find_program(FILE_EXECUTABLE file)
if(FILE_EXECUTABLE)
execute_process(COMMAND "${FILE_EXECUTABLE}" "${FILE_EXECUTABLE}" OUTPUT_VARIABLE fileOutput ERROR_QUIET)
if("${fileOutput}" MATCHES "64-bit")
set(CMAKE_SIZEOF_VOID_P 8)
endif()
endif()
endif()
endif()
# guess Debian multiarch if it has not been set:
if(EXISTS /etc/debian_version)
if(NOT CMAKE_${LANGUAGE}_LANGUAGE_ARCHITECTURE )
file(GLOB filesInLib RELATIVE /lib /lib/*-linux-gnu* )
foreach(file ${filesInLib})
if("${file}" MATCHES "${CMAKE_LIBRARY_ARCHITECTURE_REGEX}")
set(CMAKE_${LANGUAGE}_LANGUAGE_ARCHITECTURE ${file})
break()
endif()
endforeach()
endif()
endif()
endif()
set(CMAKE_${LANGUAGE}_COMPILER "dummy")
set(CMAKE_${LANGUAGE}_COMPILER_ID "${COMPILER_ID}")
include(CMake${LANGUAGE}Information)
function(set_compile_flags_var _packageName)
string(TOUPPER "${_packageName}" PACKAGE_NAME)
# Check the following variables:
# FOO_INCLUDE_DIRS
# Foo_INCLUDE_DIRS
# FOO_INCLUDES
# Foo_INCLUDES
# FOO_INCLUDE_DIR
# Foo_INCLUDE_DIR
set(includes)
if(DEFINED ${_packageName}_INCLUDE_DIRS)
set(includes ${_packageName}_INCLUDE_DIRS)
elseif(DEFINED ${PACKAGE_NAME}_INCLUDE_DIRS)
set(includes ${PACKAGE_NAME}_INCLUDE_DIRS)
elseif(DEFINED ${_packageName}_INCLUDES)
set(includes ${_packageName}_INCLUDES)
elseif(DEFINED ${PACKAGE_NAME}_INCLUDES)
set(includes ${PACKAGE_NAME}_INCLUDES)
elseif(DEFINED ${_packageName}_INCLUDE_DIR)
set(includes ${_packageName}_INCLUDE_DIR)
elseif(DEFINED ${PACKAGE_NAME}_INCLUDE_DIR)
set(includes ${PACKAGE_NAME}_INCLUDE_DIR)
endif()
set(PACKAGE_INCLUDE_DIRS "${${includes}}" PARENT_SCOPE)
# Check the following variables:
# FOO_DEFINITIONS
# Foo_DEFINITIONS
set(definitions)
if(DEFINED ${_packageName}_DEFINITIONS)
set(definitions ${_packageName}_DEFINITIONS)
elseif(DEFINED ${PACKAGE_NAME}_DEFINITIONS)
set(definitions ${PACKAGE_NAME}_DEFINITIONS)
endif()
set(PACKAGE_DEFINITIONS "${${definitions}}" )
endfunction()
function(set_link_flags_var _packageName)
string(TOUPPER "${_packageName}" PACKAGE_NAME)
# Check the following variables:
# FOO_LIBRARIES
# Foo_LIBRARIES
# FOO_LIBS
# Foo_LIBS
set(libs)
if(DEFINED ${_packageName}_LIBRARIES)
set(libs ${_packageName}_LIBRARIES)
elseif(DEFINED ${PACKAGE_NAME}_LIBRARIES)
set(libs ${PACKAGE_NAME}_LIBRARIES)
elseif(DEFINED ${_packageName}_LIBS)
set(libs ${_packageName}_LIBS)
elseif(DEFINED ${PACKAGE_NAME}_LIBS)
set(libs ${PACKAGE_NAME}_LIBS)
endif()
set(PACKAGE_LIBRARIES "${${libs}}" PARENT_SCOPE )
endfunction()
find_package("${NAME}" QUIET)
set(PACKAGE_FOUND FALSE)
string(TOUPPER "${NAME}" UPPERCASE_NAME)
if(${NAME}_FOUND OR ${UPPERCASE_NAME}_FOUND)
set(PACKAGE_FOUND TRUE)
if("${MODE}" STREQUAL "EXIST")
# do nothing
elseif("${MODE}" STREQUAL "COMPILE")
set_compile_flags_var(${NAME})
elseif("${MODE}" STREQUAL "LINK")
set_link_flags_var(${NAME})
else("${MODE}" STREQUAL "LINK")
message(FATAL_ERROR "Invalid mode argument ${MODE} given.")
endif()
endif()
set(PACKAGE_QUIET ${SILENT} )

@ -15,6 +15,11 @@
PRINT *, 'INFO:sizeof_dptr[4]' PRINT *, 'INFO:sizeof_dptr[4]'
#elif defined(_M_IX86) #elif defined(_M_IX86)
PRINT *, 'INFO:sizeof_dptr[4]' PRINT *, 'INFO:sizeof_dptr[4]'
#elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 8
PRINT *, 'INFO:sizeof_dptr[8]'
#elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 4
PRINT *, 'INFO:sizeof_dptr[4]'
#endif #endif
#if 0 #if 0

@ -44,6 +44,12 @@ IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE) ENDIF (NOT _INCLUDED_FILE)
IF(CMAKE_Fortran_SIZEOF_DATA_PTR)
FOREACH(f ${CMAKE_Fortran_ABI_FILES})
INCLUDE(${f})
ENDFOREACH()
UNSET(CMAKE_Fortran_ABI_FILES)
ENDIF()
# This should be included before the _INIT variables are # This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables # used to initialize the cache. Since the rule variables

@ -73,7 +73,7 @@ function(GetDefaultWindowsPrefixBase var)
# the architecture of the targets being built to choose the right # the architecture of the targets being built to choose the right
# default value for CMAKE_INSTALL_PREFIX. # default value for CMAKE_INSTALL_PREFIX.
# #
if("${CMAKE_GENERATOR}" MATCHES "Win64") if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
set(arch_hint "x64") set(arch_hint "x64")
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(arch_hint "x64") set(arch_hint "x64")

@ -0,0 +1,61 @@
# This module defines two macros:
# CMAKE_PUSH_CHECK_STATE()
# and
# CMAKE_POP_CHECK_STATE()
# These two macros can be used to save and restore the state of the variables
# CMAKE_REQUIRED_FLAGS, CMAKE_REQUIRED_DEFINITIONS, CMAKE_REQUIRED_LIBRARIES
# and CMAKE_REQUIRED_INCLUDES used by the various Check-files coming with CMake,
# like e.g. check_function_exists() etc.
# The variable contents are pushed on a stack, pushing multiple times is supported.
# This is useful e.g. when executing such tests in a Find-module, where they have to be set,
# but after the Find-module has been executed they should have the same value
# as they had before.
#
# Usage:
# cmake_push_check_state()
# set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF)
# check_function_exists(...)
# cmake_pop_check_state()
#=============================================================================
# Copyright 2006-2011 Alexander Neundorf, <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
MACRO(CMAKE_PUSH_CHECK_STATE)
IF(NOT DEFINED _CMAKE_PUSH_CHECK_STATE_COUNTER)
SET(_CMAKE_PUSH_CHECK_STATE_COUNTER 0)
ENDIF()
MATH(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}+1")
SET(_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_INCLUDES})
SET(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
SET(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_LIBRARIES})
SET(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_FLAGS})
ENDMACRO(CMAKE_PUSH_CHECK_STATE)
MACRO(CMAKE_POP_CHECK_STATE)
# don't pop more than we pushed
IF("${_CMAKE_PUSH_CHECK_STATE_COUNTER}" GREATER "0")
SET(CMAKE_REQUIRED_INCLUDES ${_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
SET(CMAKE_REQUIRED_DEFINITIONS ${_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
SET(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
SET(CMAKE_REQUIRED_FLAGS ${_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
MATH(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}-1")
ENDIF()
ENDMACRO(CMAKE_POP_CHECK_STATE)

@ -20,6 +20,9 @@
# make sure we don't use CMAKE_BASE_NAME from somewhere else # make sure we don't use CMAKE_BASE_NAME from somewhere else
SET(CMAKE_BASE_NAME) SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
IF("${CMAKE_BASE_NAME}" MATCHES "windres")
SET(CMAKE_BASE_NAME "windres")
ENDIF()
SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)

@ -18,8 +18,18 @@
# because otherwise there would have to be a separate assembler source file # because otherwise there would have to be a separate assembler source file
# for each assembler on every architecture. # for each assembler on every architecture.
SET(_ASM_COMPILER_WORKS 0)
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER) IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 1 CACHE INTERNAL "") SET(_ASM_COMPILER_WORKS 1)
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER) ENDIF()
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 0 CACHE INTERNAL "")
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER) # when using generic "ASM" support, we must have detected the compiler ID, fail otherwise:
IF("ASM${ASM_DIALECT}" STREQUAL "ASM")
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
SET(_ASM_COMPILER_WORKS 0)
ENDIF()
ENDIF()
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS ${_ASM_COMPILER_WORKS} CACHE INTERNAL "")

@ -35,7 +35,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
"{ (void)argv; return argc-1;}\n") "{ (void)argv; return argc-1;}\n")
TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR} TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
OUTPUT_VARIABLE OUTPUT) OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT)
SET(C_TEST_WAS_RUN 1) SET(C_TEST_WAS_RUN 1)
ENDIF(NOT CMAKE_C_COMPILER_WORKS) ENDIF(NOT CMAKE_C_COMPILER_WORKS)
@ -43,7 +43,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
PrintTestCompilerStatus("C" " -- broken") PrintTestCompilerStatus("C" " -- broken")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the C compiler works failed with " "Determining if the C compiler works failed with "
"the following output:\n${OUTPUT}\n\n") "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n")
# if the compiler is broken make sure to remove the platform file # if the compiler is broken make sure to remove the platform file
# since Windows-cl configures both c/cxx files both need to be removed # since Windows-cl configures both c/cxx files both need to be removed
# when c or c++ fails # when c or c++ fails
@ -51,14 +51,14 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake ) FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" " MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
"is not able to compile a simple test program.\nIt fails " "is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n" "with the following output:\n ${__CMAKE_C_COMPILER_OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.") "CMake will not be able to correctly generate this project.")
ELSE(NOT CMAKE_C_COMPILER_WORKS) ELSE(NOT CMAKE_C_COMPILER_WORKS)
IF(C_TEST_WAS_RUN) IF(C_TEST_WAS_RUN)
PrintTestCompilerStatus("C" " -- works") PrintTestCompilerStatus("C" " -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C compiler works passed with " "Determining if the C compiler works passed with "
"the following output:\n${OUTPUT}\n\n") "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n")
ENDIF(C_TEST_WAS_RUN) ENDIF(C_TEST_WAS_RUN)
SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "") SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
@ -76,5 +76,12 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS)
) )
INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake) INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake)
ENDIF(CMAKE_C_COMPILER_FORCED) ENDIF(CMAKE_C_COMPILER_FORCED)
IF(CMAKE_C_SIZEOF_DATA_PTR)
FOREACH(f ${CMAKE_C_ABI_FILES})
INCLUDE(${f})
ENDFOREACH()
UNSET(CMAKE_C_ABI_FILES)
ENDIF()
ENDIF(NOT CMAKE_C_COMPILER_WORKS) ENDIF(NOT CMAKE_C_COMPILER_WORKS)
UNSET(__CMAKE_C_COMPILER_OUTPUT)

@ -28,7 +28,7 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
"int main(){return 0;}\n") "int main(){return 0;}\n")
TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR} TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
OUTPUT_VARIABLE OUTPUT) OUTPUT_VARIABLE __CMAKE_CXX_COMPILER_OUTPUT)
SET(CXX_TEST_WAS_RUN 1) SET(CXX_TEST_WAS_RUN 1)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS) ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
@ -41,17 +41,17 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake ) FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler works failed with " "Determining if the CXX compiler works failed with "
"the following output:\n${OUTPUT}\n\n") "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" " MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
"is not able to compile a simple test program.\nIt fails " "is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n" "with the following output:\n ${__CMAKE_CXX_COMPILER_OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.") "CMake will not be able to correctly generate this project.")
ELSE(NOT CMAKE_CXX_COMPILER_WORKS) ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
IF(CXX_TEST_WAS_RUN) IF(CXX_TEST_WAS_RUN)
PrintTestCompilerStatus("CXX" " -- works") PrintTestCompilerStatus("CXX" " -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler works passed with " "Determining if the CXX compiler works passed with "
"the following output:\n${OUTPUT}\n\n") "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
ENDIF(CXX_TEST_WAS_RUN) ENDIF(CXX_TEST_WAS_RUN)
SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "") SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
@ -69,4 +69,12 @@ ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
) )
INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake) INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake)
ENDIF(CMAKE_CXX_COMPILER_FORCED) ENDIF(CMAKE_CXX_COMPILER_FORCED)
IF(CMAKE_CXX_SIZEOF_DATA_PTR)
FOREACH(f ${CMAKE_CXX_ABI_FILES})
INCLUDE(${f})
ENDFOREACH()
UNSET(CMAKE_CXX_ABI_FILES)
ENDIF()
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS) ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
UNSET(__CMAKE_CXX_COMPILER_OUTPUT)

@ -92,4 +92,10 @@ ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
) )
INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake) INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake)
ENDIF(CMAKE_Fortran_COMPILER_FORCED) ENDIF(CMAKE_Fortran_COMPILER_FORCED)
IF(CMAKE_Fortran_SIZEOF_DATA_PTR)
FOREACH(f ${CMAKE_Fortran_ABI_FILES})
INCLUDE(${f})
ENDFOREACH()
UNSET(CMAKE_Fortran_ABI_FILES)
ENDIF()
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS) ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)

@ -0,0 +1 @@
VERSION=__WATCOMC__

@ -12,14 +12,11 @@
# (To distribute this file outside of CMake, substitute the full # (To distribute this file outside of CMake, substitute the full
# License text for the above reference.) # License text for the above reference.)
# VCExpress does not support cross compiling, which is necessary for Win CE # Look for devenv as a build program. We need to use this to support
SET( _CMAKE_MAKE_PROGRAM_NAMES devenv) # Intel Fortran integration into VS. MSBuild can not be used for that case
IF(NOT CMAKE_CROSSCOMPILING) # since Intel Fortran uses the older devenv file format.
SET( _CMAKE_MAKE_PROGRAM_NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} VCExpress)
ENDIF(NOT CMAKE_CROSSCOMPILING)
FIND_PROGRAM(CMAKE_MAKE_PROGRAM FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} NAMES devenv
HINTS HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;EnvironmentDirectory] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;EnvironmentDirectory]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup;Dbghelp_path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup;Dbghelp_path]
@ -34,6 +31,24 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
"/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/" "/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/"
"/Program Files/Microsoft Visual Studio 10/Common7/IDE/" "/Program Files/Microsoft Visual Studio 10/Common7/IDE/"
) )
# if devenv is not found, then use MSBuild.
# it is expected that if devenv is not found, then we are
# dealing with Visual Studio Express. VCExpress has random
# failures when being run as a command line build tool which
# causes the compiler checks and try-compile stuff to fail. MSbuild
# is a better choice for this. However, VCExpress does not support
# cross compiling needed for Win CE.
IF(NOT CMAKE_CROSSCOMPILING)
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES MSBuild
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;ProductDir]
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0;CLR Version]/")
ENDIF()
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC10 1) SET(MSVC10 1)
SET(MSVC_VERSION 1600) SET(MSVC_VERSION 1600)

@ -0,0 +1,54 @@
#=============================================================================
# Copyright 2007-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Look for devenv as a build program. We need to use this to support
# Intel Fortran integration into VS. MSBuild can not be used for that case
# since Intel Fortran uses the older devenv file format.
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES devenv
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;EnvironmentDirectory]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup;Dbghelp_path]
"$ENV{ProgramFiles}/Microsoft Visual Studio 11.0/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio11.0/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio 11/Common7/IDE"
"$ENV{ProgramFiles}/Microsoft Visual Studio11/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11.0/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11.0/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 11/Common7/IDE"
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio11/Common7/IDE"
"/Program Files/Microsoft Visual Studio 11.0/Common7/IDE/"
"/Program Files/Microsoft Visual Studio 11/Common7/IDE/"
)
# if devenv is not found, then use MSBuild.
# it is expected that if devenv is not found, then we are
# dealing with Visual Studio Express. VCExpress has random
# failures when being run as a command line build tool which
# causes the compiler checks and try-compile stuff to fail. MSbuild
# is a better choice for this. However, VCExpress does not support
# cross compiling needed for Win CE.
IF(NOT CMAKE_CROSSCOMPILING)
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES MSBuild
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir]
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
"c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\11.0;CLR Version]/")
ENDIF()
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
SET(MSVC11 1)
SET(MSVC_VERSION 1700)

@ -215,7 +215,7 @@
# #
# CPACK_INSTALL_COMMANDS - Extra commands to install components. # CPACK_INSTALL_COMMANDS - Extra commands to install components.
# #
# CPACK_INSTALL_DIRECTORIES - Extra directories to install. # CPACK_INSTALLED_DIRECTORIES - Extra directories to install.
# #
#============================================================================= #=============================================================================
@ -322,7 +322,7 @@ cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME
cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY
"${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
"${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
cpack_set_if_not_set(CPACK_PACKAGE_DEFAULT_LOCATION "/") cpack_set_if_not_set(CPACK_PACKAGE_DEFAULT_LOCATION "/")
cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true") cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true")

@ -20,7 +20,7 @@
# Mandatory : YES # Mandatory : YES
# Default : CPACK_PACKAGE_VERSION # Default : CPACK_PACKAGE_VERSION
# The debian package version # The debian package version
# CPACK_DEBIAN_PACKAGE_ARCHITECTURE) # CPACK_DEBIAN_PACKAGE_ARCHITECTURE
# Mandatory : YES # Mandatory : YES
# Default : Output of dpkg --print-architecture (or i386 if dpkg is not found) # Default : Output of dpkg --print-architecture (or i386 if dpkg is not found)
# The debian package architecture # The debian package architecture
@ -133,6 +133,11 @@ IF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
ENDIF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS) ENDIF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
FIND_PROGRAM(FAKEROOT_EXECUTABLE fakeroot)
IF(FAKEROOT_EXECUTABLE)
SET(CPACK_DEBIAN_FAKEROOT_EXECUTABLE ${FAKEROOT_EXECUTABLE})
ENDIF(FAKEROOT_EXECUTABLE)
IF(CPACK_DEBIAN_PACKAGE_SHLIBDEPS) IF(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
# dpkg-shlibdeps is a Debian utility for generating dependency list # dpkg-shlibdeps is a Debian utility for generating dependency list
FIND_PROGRAM(SHLIBDEPS_EXECUTABLE dpkg-shlibdeps) FIND_PROGRAM(SHLIBDEPS_EXECUTABLE dpkg-shlibdeps)

@ -4,7 +4,12 @@
# used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration # used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration
# #
# However CPackRPM has specific features which are controlled by # However CPackRPM has specific features which are controlled by
# the specifics CPACK_RPM_XXX variables. # the specifics CPACK_RPM_XXX variables. CPackRPM is a component aware
# generator so when CPACK_RPM_COMPONENT_INSTALL is ON some more
# CPACK_RPM_<ComponentName>_XXXX variables may be used in order
# to have component specific values. Note however that <componentName>
# refers to the **grouping name**. This may be either a component name
# or a component GROUP name.
# Usually those vars correspond to RPM spec file entities, one may find # Usually those vars correspond to RPM spec file entities, one may find
# information about spec files here http://www.rpm.org/wiki/Docs. # information about spec files here http://www.rpm.org/wiki/Docs.
# You'll find a detailed usage of CPackRPM on the wiki: # You'll find a detailed usage of CPackRPM on the wiki:
@ -98,9 +103,11 @@
# If CPACK_SET_DESTDIR is set then you will get a warning message # If CPACK_SET_DESTDIR is set then you will get a warning message
# but if there is file installed with absolute path you'll get # but if there is file installed with absolute path you'll get
# unexpected behavior. # unexpected behavior.
# CPACK_RPM_SPEC_INSTALL_POST # CPACK_RPM_SPEC_INSTALL_POST [deprecated]
# Mandatory : NO # Mandatory : NO
# Default : - # Default : -
# This way of specifying post-install script is deprecated use
# CPACK_RPM_POST_INSTALL_SCRIPT_FILE
# May be used to set an RPM post-install command inside the spec file. # May be used to set an RPM post-install command inside the spec file.
# For example setting it to "/bin/true" may be used to prevent # For example setting it to "/bin/true" may be used to prevent
# rpmbuild to strip binaries. # rpmbuild to strip binaries.
@ -132,25 +139,42 @@
# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE # CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
# Mandatory : NO # Mandatory : NO
# Default : - # Default : -
# May be used to embbed a pre (un)installation script in the spec file. # May be used to embed a pre (un)installation script in the spec file.
# The refered script file(s) will be read and directly # The refered script file(s) will be read and directly
# put after the %pre or %preun section # put after the %pre or %preun section
# If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for
# each component can be overriden with
# CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE and
# CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE
# One may verify which scriptlet has been included with # One may verify which scriptlet has been included with
# rpm -qp --scripts package.rpm # rpm -qp --scripts package.rpm
# CPACK_RPM_POST_INSTALL_SCRIPT_FILE # CPACK_RPM_POST_INSTALL_SCRIPT_FILE
# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE # CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
# Mandatory : NO # Mandatory : NO
# Default : - # Default : -
# May be used to embbed a post (un)installation script in the spec file. # May be used to embed a post (un)installation script in the spec file.
# The refered script file(s) will be read and directly # The refered script file(s) will be read and directly
# put after the %post or %postun section # put after the %post or %postun section
# If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for
# each component can be overriden with
# CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE and
# CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE
# One may verify which scriptlet has been included with # One may verify which scriptlet has been included with
# rpm -qp --scripts package.rpm # rpm -qp --scripts package.rpm
# CPACK_RPM_USER_FILELIST
# CPACK_RPM_<COMPONENT>_USER_FILELIST
# Mandatory : NO
# Default : -
# May be used to explicitely specify %(<directive>) file line
# in the spec file. Like %config(noreplace) or any other directive
# that be found in the %files section. Since CPackRPM is generating
# the list of files (and directories) the user specified files of
# the CPACK_RPM_<COMPONENT>_USER_FILELIST list will be removed from the generated list.
# CPACK_RPM_CHANGELOG_FILE # CPACK_RPM_CHANGELOG_FILE
# Mandatory : NO # Mandatory : NO
# Default : - # Default : -
# May be used to embbed a changelog in the spec file. # May be used to embed a changelog in the spec file.
# The refered file will be read and directly put after the %changelog # The refered file will be read and directly put after the %changelog
# section. # section.
#============================================================================= #=============================================================================
@ -237,6 +261,17 @@ IF(ALIEN_EXECUTABLE)
MESSAGE(STATUS "alien found, we may be on a Debian based distro.") MESSAGE(STATUS "alien found, we may be on a Debian based distro.")
ENDIF(ALIEN_EXECUTABLE) ENDIF(ALIEN_EXECUTABLE)
# Are we packaging components ?
IF(CPACK_RPM_PACKAGE_COMPONENT)
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
ELSE(CPACK_RPM_PACKAGE_COMPONENT)
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
# #
# Use user-defined RPM specific variables value # Use user-defined RPM specific variables value
# or generate reasonable default value from # or generate reasonable default value from
@ -369,9 +404,33 @@ if(CPACK_RPM_PACKAGE_RELOCATABLE)
endif(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON")) endif(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
endif(CPACK_RPM_PACKAGE_RELOCATABLE) endif(CPACK_RPM_PACKAGE_RELOCATABLE)
# check if additional fields for RPM spec header are given # Check if additional fields for RPM spec header are given
# There may be some COMPONENT specific variables as well
FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV) FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
IF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}) IF(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: processing ${_RPM_SPEC_HEADER}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
if(CPACK_RPM_PACKAGE_COMPONENT)
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER})
IF(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: using CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}})
else()
IF(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER} not defined")
message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
else()
IF(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
IF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
STRING(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH) STRING(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH)
MATH(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1") MATH(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1")
STRING(SUBSTRING ${_RPM_SPEC_HEADER} 1 ${_PACKAGE_HEADER_STRLENGTH} _PACKAGE_HEADER_TAIL) STRING(SUBSTRING ${_RPM_SPEC_HEADER} 1 ${_PACKAGE_HEADER_STRLENGTH} _PACKAGE_HEADER_TAIL)
@ -379,10 +438,10 @@ FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
STRING(SUBSTRING ${_RPM_SPEC_HEADER} 0 1 _PACKAGE_HEADER_NAME) STRING(SUBSTRING ${_RPM_SPEC_HEADER} 0 1 _PACKAGE_HEADER_NAME)
SET(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}") SET(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}")
IF(CPACK_RPM_PACKAGE_DEBUG) IF(CPACK_RPM_PACKAGE_DEBUG)
MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}}") MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG) ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}}") SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}) ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
ENDFOREACH(_RPM_SPEC_HEADER) ENDFOREACH(_RPM_SPEC_HEADER)
# CPACK_RPM_SPEC_INSTALL_POST # CPACK_RPM_SPEC_INSTALL_POST
@ -396,47 +455,99 @@ IF(CPACK_RPM_SPEC_INSTALL_POST)
SET(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}") SET(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}")
ENDIF(CPACK_RPM_SPEC_INSTALL_POST) ENDIF(CPACK_RPM_SPEC_INSTALL_POST)
# CPACK_RPM_POST_INSTALL_SCRIPT_FILE # CPACK_RPM_POST_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE)
# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE # CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE)
# May be used to embbed a post (un)installation script in the spec file. # May be used to embed a post (un)installation script in the spec file.
# The refered script file(s) will be read and directly # The refered script file(s) will be read and directly
# put after the %post or %postun section # put after the %post or %postun section
if(CPACK_RPM_POST_INSTALL_SCRIPT_FILE) if(CPACK_RPM_PACKAGE_COMPONENT)
if(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}) if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_INSTALL_SCRIPT_FILE)
file(READ ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_POSTINSTALL) set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_INSTALL_SCRIPT_FILE})
else(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}) else()
message("CPackRPM:Warning: CPACK_RPM_POST_INSTALL_SCRIPT_FILE <${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}> does not exists - ignoring") set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
endif(EXISTS ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE}) endif()
endif(CPACK_RPM_POST_INSTALL_SCRIPT_FILE) if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE)
set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE})
if(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE) else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE)
if(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
file(READ ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_POSTUNINSTALL) endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_POST_UNINSTALL_SCRIPT_FILE)
else(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) else(CPACK_RPM_PACKAGE_COMPONENT)
message("CPackRPM:Warning: CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}> does not exists - ignoring") set(CPACK_RPM_POST_INSTALL_READ_FILE ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
endif(EXISTS ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE}) set(CPACK_RPM_POST_UNINSTALL_READ_FILE ${CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE})
endif(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE) endif(CPACK_RPM_PACKAGE_COMPONENT)
# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE # Handle post-install file if it has been specified
# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE if(CPACK_RPM_POST_INSTALL_READ_FILE)
if(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE})
file(READ ${CPACK_RPM_POST_INSTALL_READ_FILE} CPACK_RPM_SPEC_POSTINSTALL)
else(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE})
message("CPackRPM:Warning: CPACK_RPM_POST_INSTALL_SCRIPT_FILE <${CPACK_RPM_POST_INSTALL_READ_FILE}> does not exists - ignoring")
endif(EXISTS ${CPACK_RPM_POST_INSTALL_READ_FILE})
else(CPACK_RPM_POST_INSTALL_READ_FILE)
# reset SPEC var value if no post install file has been specified
# (either globally or component-wise)
set(CPACK_RPM_SPEC_POSTINSTALL "")
endif(CPACK_RPM_POST_INSTALL_READ_FILE)
# Handle post-uninstall file if it has been specified
if(CPACK_RPM_POST_UNINSTALL_READ_FILE)
if(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE})
file(READ ${CPACK_RPM_POST_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_POSTUNINSTALL)
else(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE})
message("CPackRPM:Warning: CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_POST_UNINSTALL_READ_FILE}> does not exists - ignoring")
endif(EXISTS ${CPACK_RPM_POST_UNINSTALL_READ_FILE})
else(CPACK_RPM_POST_UNINSTALL_READ_FILE)
# reset SPEC var value if no post uninstall file has been specified
# (either globally or component-wise)
set(CPACK_RPM_SPEC_POSTUNINSTALL "")
endif(CPACK_RPM_POST_UNINSTALL_READ_FILE)
# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE)
# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE)
# May be used to embed a pre (un)installation script in the spec file. # May be used to embed a pre (un)installation script in the spec file.
# The refered script file(s) will be read and directly # The refered script file(s) will be read and directly
# put after the %pre or %preun section # put after the %pre or %preun section
if(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE) if(CPACK_RPM_PACKAGE_COMPONENT)
if(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}) if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE)
file(READ ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_PREINSTALL) set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE})
else(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}) else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE)
message("CPackRPM:Warning: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}> does not exists - ignoring") set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
endif(EXISTS ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE}) endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_INSTALL_SCRIPT_FILE)
endif(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE) if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE)
set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE})
if(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE) else(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE)
if(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
file(READ ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE} CPACK_RPM_SPEC_PREUNINSTALL) endif(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PRE_UNINSTALL_SCRIPT_FILE)
else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) else(CPACK_RPM_PACKAGE_COMPONENT)
message("CPackRPM:Warning: CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}> does not exists - ignoring") set(CPACK_RPM_PRE_INSTALL_READ_FILE ${CPACK_RPM_PRE_INSTALL_SCRIPT_FILE})
endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE}) set(CPACK_RPM_PRE_UNINSTALL_READ_FILE ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
endif(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE) endif(CPACK_RPM_PACKAGE_COMPONENT)
# Handle pre-install file if it has been specified
if(CPACK_RPM_PRE_INSTALL_READ_FILE)
if(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE})
file(READ ${CPACK_RPM_PRE_INSTALL_READ_FILE} CPACK_RPM_SPEC_PREINSTALL)
else(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE})
message("CPackRPM:Warning: CPACK_RPM_PRE_INSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_INSTALL_READ_FILE}> does not exists - ignoring")
endif(EXISTS ${CPACK_RPM_PRE_INSTALL_READ_FILE})
else(CPACK_RPM_PRE_INSTALL_READ_FILE)
# reset SPEC var value if no pre-install file has been specified
# (either globally or component-wise)
set(CPACK_RPM_SPEC_PREINSTALL "")
endif(CPACK_RPM_PRE_INSTALL_READ_FILE)
# Handle pre-uninstall file if it has been specified
if(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
if(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE})
file(READ ${CPACK_RPM_PRE_UNINSTALL_READ_FILE} CPACK_RPM_SPEC_PREUNINSTALL)
else(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE})
message("CPackRPM:Warning: CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE <${CPACK_RPM_PRE_UNINSTALL_READ_FILE}> does not exists - ignoring")
endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_READ_FILE})
else(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
# reset SPEC var value if no pre-uninstall file has been specified
# (either globally or component-wise)
set(CPACK_RPM_SPEC_PREUNINSTALL "")
endif(CPACK_RPM_PRE_UNINSTALL_READ_FILE)
# CPACK_RPM_CHANGELOG_FILE # CPACK_RPM_CHANGELOG_FILE
# May be used to embed a changelog in the spec file. # May be used to embed a changelog in the spec file.
@ -478,46 +589,103 @@ SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
#STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") #STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
# Are we packaging components ?
IF(CPACK_RPM_PACKAGE_COMPONENT)
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
ELSE(CPACK_RPM_PACKAGE_COMPONENT)
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
# Use files tree to construct files command (spec file) # Use files tree to construct files command (spec file)
# We should not forget to include symlinks (thus -o -type l) # We should not forget to include symlinks (thus -o -type l)
# We should include directory as well (thus -type d)
# but not the main local dir "." (thus -a -not -name ".")
# We must remove the './' due to the local search and escape the # We must remove the './' due to the local search and escape the
# file name by enclosing it between double quotes (thus the sed) # file name by enclosing it between double quotes (thus the sed)
# Then we must authorize any man pages extension (adding * at the end) # Then we must authorize any man pages extension (adding * at the end)
# because rpmbuild may automatically compress those files # because rpmbuild may automatically compress those files
EXECUTE_PROCESS(COMMAND find . -type f -o -type l EXECUTE_PROCESS(COMMAND find . -type f -o -type l -o (-type d -a -not -name ".")
COMMAND sed s:.*/man.*/.*:&*: COMMAND sed s:.*/man.*/.*:&*:
COMMAND sed s/\\.\\\(.*\\\)/\"\\1\"/ COMMAND sed s/\\.\\\(.*\\\)/\"\\1\"/
WORKING_DIRECTORY "${WDIR}" WORKING_DIRECTORY "${WDIR}"
OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES) OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
# In component case, replace CPACK_ABSOLUTE_DESTINATION_FILES # In component case, put CPACK_ABSOLUTE_DESTINATION_FILES_<COMPONENT>
# with the content of CPACK_ABSOLUTE_DESTINATION_FILES_<COMPONENT> # into CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL
# This must be done BEFORE the CPACK_ABSOLUTE_DESTINATION_FILES handling # otherwise, put CPACK_ABSOLUTE_DESTINATION_FILES
# This must be done BEFORE the CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL handling
if(CPACK_RPM_PACKAGE_COMPONENT) if(CPACK_RPM_PACKAGE_COMPONENT)
if(CPACK_ABSOLUTE_DESTINATION_FILES) if(CPACK_ABSOLUTE_DESTINATION_FILES)
set(COMPONENT_FILES_TAG "CPACK_ABSOLUTE_DESTINATION_FILES_${CPACK_RPM_PACKAGE_COMPONENT}") set(COMPONENT_FILES_TAG "CPACK_ABSOLUTE_DESTINATION_FILES_${CPACK_RPM_PACKAGE_COMPONENT}")
set(CPACK_ABSOLUTE_DESTINATION_FILES "${${COMPONENT_FILES_TAG}}") set(CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL "${${COMPONENT_FILES_TAG}}")
if(CPACK_RPM_PACKAGE_DEBUG) if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling Absolute Destination Files ${CPACK_ABSOLUTE_DESTINATION_FILES}") message("CPackRPM:Debug: Handling Absolute Destination Files: <${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL}>")
message("CPackRPM:Debug: in component = ${CPACK_RPM_PACKAGE_COMPONENT}") message("CPackRPM:Debug: in component = ${CPACK_RPM_PACKAGE_COMPONENT}")
endif(CPACK_RPM_PACKAGE_DEBUG) endif(CPACK_RPM_PACKAGE_DEBUG)
endif() endif()
else()
if(CPACK_ABSOLUTE_DESTINATION_FILES)
set(CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL "${CPACK_ABSOLUTE_DESTINATION_FILES}")
endif()
endif()
# In component case, set CPACK_RPM_USER_FILELIST_INTERNAL with CPACK_RPM_<COMPONENT>_USER_FILELIST.
if(CPACK_RPM_PACKAGE_COMPONENT)
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_FILELIST)
set(CPACK_RPM_USER_FILELIST_INTERNAL ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_FILELIST})
if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling User Filelist: <${CPACK_RPM_USER_FILELIST_INTERNAL}>")
message("CPackRPM:Debug: in component = ${CPACK_RPM_PACKAGE_COMPONENT}")
endif(CPACK_RPM_PACKAGE_DEBUG)
else()
set(CPACK_RPM_USER_FILELIST_INTERNAL "")
endif()
else()
if(CPACK_RPM_USER_FILELIST)
set(CPACK_RPM_USER_FILELIST_INTERNAL "${CPACK_RPM_USER_FILELIST}")
else()
set(CPACK_RPM_USER_FILELIST_INTERNAL "")
endif()
endif()
# Handle user specified file line list in CPACK_RPM_USER_FILELIST_INTERNAL
# Remove those files from CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL
# or CPACK_RPM_INSTALL_FILES,
# hence it must be done before these auto-generated lists are processed.
if(CPACK_RPM_USER_FILELIST_INTERNAL)
IF(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling User Filelist: <${CPACK_RPM_USER_FILELIST_INTERNAL}>")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
# Create CMake list from CPACK_RPM_INSTALL_FILES
string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST)
string(REPLACE "\n" ";" CPACK_RPM_INSTALL_FILES_LIST
"${CPACK_RPM_INSTALL_FILES_LIST}")
string(REPLACE "\"" "" CPACK_RPM_INSTALL_FILES_LIST
"${CPACK_RPM_INSTALL_FILES_LIST}")
set(CPACK_RPM_USER_INSTALL_FILES "")
foreach(F IN LISTS CPACK_RPM_USER_FILELIST_INTERNAL)
string(REGEX REPLACE "%[A-Za-z\(\)]* " "" F_PATH ${F})
string(REGEX MATCH "%[A-Za-z\(\)]*" F_PREFIX ${F})
if(F_PREFIX)
set(F_PREFIX "${F_PREFIX} ")
endif()
# Rebuild the user list file
set(CPACK_RPM_USER_INSTALL_FILES "${CPACK_RPM_USER_INSTALL_FILES}${F_PREFIX}\"${F_PATH}\"\n")
# Remove from CPACK_RPM_INSTALL_FILES and CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL
list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${F_PATH})
list(REMOVE_ITEM CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL ${F_PATH})
endforeach()
# Rebuild CPACK_RPM_INSTALL_FILES
set(CPACK_RPM_INSTALL_FILES "")
foreach(F IN LISTS CPACK_RPM_INSTALL_FILES_LIST)
set(CPACK_RPM_INSTALL_FILES "${CPACK_RPM_INSTALL_FILES}\"${F}\"\n")
endforeach(F)
else()
set(CPACK_RPM_USER_INSTALL_FILES "")
endif() endif()
if (CPACK_ABSOLUTE_DESTINATION_FILES) if (CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
IF(CPACK_RPM_PACKAGE_DEBUG) IF(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling Absolute Destination Files: ${CPACK_ABSOLUTE_DESTINATION_FILES}") message("CPackRPM:Debug: Handling Absolute Destination Files: ${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG) ENDIF(CPACK_RPM_PACKAGE_DEBUG)
# Remove trailing space # Remove trailing space
string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST) string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST)
@ -526,7 +694,7 @@ if (CPACK_ABSOLUTE_DESTINATION_FILES)
# Remove unecessary quotes # Remove unecessary quotes
string(REPLACE "\"" "" CPACK_RPM_INSTALL_FILES_LIST "${CPACK_RPM_INSTALL_FILES_LIST}") string(REPLACE "\"" "" CPACK_RPM_INSTALL_FILES_LIST "${CPACK_RPM_INSTALL_FILES_LIST}")
# Remove ABSOLUTE install file from INSTALL FILE LIST # Remove ABSOLUTE install file from INSTALL FILE LIST
list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${CPACK_ABSOLUTE_DESTINATION_FILES}) list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL})
# Rebuild INSTALL_FILES # Rebuild INSTALL_FILES
set(CPACK_RPM_INSTALL_FILES "") set(CPACK_RPM_INSTALL_FILES "")
foreach(F IN LISTS CPACK_RPM_INSTALL_FILES_LIST) foreach(F IN LISTS CPACK_RPM_INSTALL_FILES_LIST)
@ -534,14 +702,17 @@ if (CPACK_ABSOLUTE_DESTINATION_FILES)
endforeach(F) endforeach(F)
# Build ABSOLUTE_INSTALL_FILES # Build ABSOLUTE_INSTALL_FILES
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "") set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "")
foreach(F IN LISTS CPACK_ABSOLUTE_DESTINATION_FILES) foreach(F IN LISTS CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "${CPACK_RPM_ABSOLUTE_INSTALL_FILES}%config \"${F}\"\n") set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "${CPACK_RPM_ABSOLUTE_INSTALL_FILES}%config \"${F}\"\n")
endforeach(F) endforeach(F)
IF(CPACK_RPM_PACKAGE_DEBUG) IF(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: CPACK_RPM_ABSOLUTE_INSTALL_FILES=${CPACK_RPM_ABSOLUTE_INSTALL_FILES}") message("CPackRPM:Debug: CPACK_RPM_ABSOLUTE_INSTALL_FILES=${CPACK_RPM_ABSOLUTE_INSTALL_FILES}")
message("CPackRPM:Debug: CPACK_RPM_INSTALL_FILES=${CPACK_RPM_INSTALL_FILES}") message("CPackRPM:Debug: CPACK_RPM_INSTALL_FILES=${CPACK_RPM_INSTALL_FILES}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG) ENDIF(CPACK_RPM_PACKAGE_DEBUG)
endif(CPACK_ABSOLUTE_DESTINATION_FILES) else()
# reset vars in order to avoid leakage of value(s) from one component to another
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "")
endif(CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
# The name of the final spec file to be used by rpmbuild # The name of the final spec file to be used by rpmbuild
SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec") SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec")
@ -569,7 +740,7 @@ IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY
"# -*- rpm-spec -*- "# -*- rpm-spec -*-
BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH\@ BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH\@
Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@ Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@
Name: \@CPACK_RPM_PACKAGE_NAME\@ Name: \@CPACK_RPM_PACKAGE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_NAME\@
Version: \@CPACK_RPM_PACKAGE_VERSION\@ Version: \@CPACK_RPM_PACKAGE_VERSION\@
Release: \@CPACK_RPM_PACKAGE_RELEASE\@ Release: \@CPACK_RPM_PACKAGE_RELEASE\@
License: \@CPACK_RPM_PACKAGE_LICENSE\@ License: \@CPACK_RPM_PACKAGE_LICENSE\@
@ -631,6 +802,7 @@ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
%defattr(-,root,root,-) %defattr(-,root,root,-)
${CPACK_RPM_INSTALL_FILES} ${CPACK_RPM_INSTALL_FILES}
${CPACK_RPM_ABSOLUTE_INSTALL_FILES} ${CPACK_RPM_ABSOLUTE_INSTALL_FILES}
${CPACK_RPM_USER_INSTALL_FILES}
%changelog %changelog
\@CPACK_RPM_SPEC_CHANGELOG\@ \@CPACK_RPM_SPEC_CHANGELOG\@

@ -189,6 +189,8 @@ IF(BUILD_TESTING)
FIND_PROGRAM(COVERAGE_COMMAND gcov DOC FIND_PROGRAM(COVERAGE_COMMAND gcov DOC
"Path to the coverage program that CTest uses for performing coverage inspection" "Path to the coverage program that CTest uses for performing coverage inspection"
) )
SET(COVERAGE_EXTRA_FLAGS "-l" CACHE STRING
"Extra command line flags to pass to the coverage tool")
# set the site name # set the site name
SITE_NAME(SITE) SITE_NAME(SITE)
@ -257,6 +259,7 @@ IF(BUILD_TESTING)
BZRCOMMAND BZRCOMMAND
BZR_UPDATE_OPTIONS BZR_UPDATE_OPTIONS
COVERAGE_COMMAND COVERAGE_COMMAND
COVERAGE_EXTRA_FLAGS
CTEST_SUBMIT_RETRY_DELAY CTEST_SUBMIT_RETRY_DELAY
CTEST_SUBMIT_RETRY_COUNT CTEST_SUBMIT_RETRY_COUNT
CVSCOMMAND CVSCOMMAND

@ -27,7 +27,10 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT} CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT}
# Some compilers do not fail with a bad flag # Some compilers do not fail with a bad flag
FAIL_REGEX "warning: command line option .* is valid for .* but not for C"
# Apple gcc
FAIL_REGEX "unrecognized .*option" # GNU FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "[Uu]nknown option" # HP FAIL_REGEX "[Uu]nknown option" # HP
@ -36,4 +39,3 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
) )
SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
ENDMACRO (CHECK_C_COMPILER_FLAG) ENDMACRO (CHECK_C_COMPILER_FLAG)

@ -28,11 +28,14 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT} CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}
# Some compilers do not fail with a bad flag # Some compilers do not fail with a bad flag
FAIL_REGEX "unrecognized .*option" # GNU FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "[Uu]nknown option" # HP FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL FAIL_REGEX "command option .* is not recognized" # XL
FAIL_REGEX "not supported in this configuration; ignored" # AIX
FAIL_REGEX "File with unknown suffix passed to linker" # PGI
) )
SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
ENDMACRO (CHECK_CXX_COMPILER_FLAG) ENDMACRO (CHECK_CXX_COMPILER_FLAG)

@ -0,0 +1,42 @@
# - Check if a symbol exists as a function, variable, or macro in C++
# CHECK_CXX_SYMBOL_EXISTS(<symbol> <files> <variable>)
#
# Check that the <symbol> is available after including given header
# <files> and store the result in a <variable>. Specify the list
# of files in one argument as a semicolon-separated list.
# CHECK_CXX_SYMBOL_EXISTS() can be used to check in C++ files, as opposed
# to CHECK_SYMBOL_EXISTS(), which works only for C.
#
# If the header files define the symbol as a macro it is considered
# available and assumed to work. If the header files declare the
# symbol as a function or variable then the symbol must also be
# available for linking. If the symbol is a type or enum value
# it will not be recognized (consider using CheckTypeSize or
# CheckCSourceCompiles).
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
# Copyright 2003-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
INCLUDE(CheckSymbolExists)
MACRO(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
_CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
ENDMACRO(CHECK_CXX_SYMBOL_EXISTS)

@ -11,6 +11,8 @@
# available for linking. If the symbol is a type or enum value # available for linking. If the symbol is a type or enum value
# it will not be recognized (consider using CheckTypeSize or # it will not be recognized (consider using CheckTypeSize or
# CheckCSourceCompiles). # CheckCSourceCompiles).
# If the check needs to be done in C++, consider using CHECK_CXX_SYMBOL_EXISTS(),
# which does the same as CHECK_SYMBOL_EXISTS(), but in C++.
# #
# The following variables may be set before calling this macro to # The following variables may be set before calling this macro to
# modify the way the check is run: # modify the way the check is run:
@ -34,6 +36,10 @@
# License text for the above reference.) # License text for the above reference.)
MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
_CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
ENDMACRO(CHECK_SYMBOL_EXISTS)
MACRO(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$") IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n") SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
SET(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS}) SET(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
@ -57,12 +63,12 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\nvoid cmakeRequireSymbol(int dummy,...){(void)dummy;}\nint main()\n{\n#ifndef ${SYMBOL}\n cmakeRequireSymbol(0,&${SYMBOL});\n#endif\n return 0;\n}\n") "${CMAKE_CONFIGURABLE_FILE_CONTENT}\nvoid cmakeRequireSymbol(int dummy,...){(void)dummy;}\nint main()\n{\n#ifndef ${SYMBOL}\n cmakeRequireSymbol(0,&${SYMBOL});\n#endif\n return 0;\n}\n")
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" @ONLY) "${SOURCEFILE}" @ONLY IMMEDIATE)
MESSAGE(STATUS "Looking for ${SYMBOL}") MESSAGE(STATUS "Looking for ${SYMBOL}")
TRY_COMPILE(${VARIABLE} TRY_COMPILE(${VARIABLE}
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c "${SOURCEFILE}"
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS} -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
@ -75,7 +81,7 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the ${SYMBOL} " "Determining if the ${SYMBOL} "
"exist passed with the following output:\n" "exist passed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c:\n" "${OUTPUT}\nFile ${SOURCEFILE}:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
ELSE(${VARIABLE}) ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${SYMBOL} - not found.") MESSAGE(STATUS "Looking for ${SYMBOL} - not found.")
@ -83,8 +89,8 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the ${SYMBOL} " "Determining if the ${SYMBOL} "
"exist failed with the following output:\n" "exist failed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c:\n" "${OUTPUT}\nFile ${SOURCEFILE}:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
ENDIF(${VARIABLE}) ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_SYMBOL_EXISTS) ENDMACRO(_CHECK_SYMBOL_EXISTS)

@ -6,3 +6,5 @@ SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=") SET(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=")
SET(CMAKE_Fortran_MODPATH_FLAG "-p") SET(CMAKE_Fortran_MODPATH_FLAG "-p")
SET(CMAKE_Fortran_VERBOSE_FLAG "-v") SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree")

@ -2,3 +2,5 @@ set(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_MODOUT_FLAG -em) set(CMAKE_Fortran_MODOUT_FLAG -em)
set(CMAKE_Fortran_MODDIR_FLAG -J) set(CMAKE_Fortran_MODDIR_FLAG -J)
set(CMAKE_Fortran_MODDIR_DEFAULT .) set(CMAKE_Fortran_MODDIR_DEFAULT .)
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-f fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-f free")

@ -5,3 +5,5 @@ set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
set(CMAKE_Fortran_MODDIR_FLAG "-fmod=") set(CMAKE_Fortran_MODDIR_FLAG "-fmod=")
set(CMAKE_Fortran_VERBOSE_FLAG "-v") set(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")

@ -1,6 +1,9 @@
include(Compiler/GNU) include(Compiler/GNU)
__compiler_gnu(Fortran) __compiler_gnu(Fortran)
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
# No -DNDEBUG for Fortran. # No -DNDEBUG for Fortran.
SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")

@ -1 +1,3 @@
SET(CMAKE_Fortran_VERBOSE_FLAG "-v") SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "+source=fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "+source=free")

@ -5,3 +5,5 @@ SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET(CMAKE_Fortran_MODDIR_FLAG "-module ") SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
SET(CMAKE_Fortran_VERBOSE_FLAG "-v") SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")

@ -1 +1,3 @@
SET(CMAKE_Fortran_VERBOSE_FLAG "-v") SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixedform")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-freeform")

@ -30,3 +30,5 @@ endif()
set(CMAKE_Fortran_MODDIR_FLAG "-mdir ") set(CMAKE_Fortran_MODDIR_FLAG "-mdir ")
set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-PIC") set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-PIC")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")

@ -1,6 +1,9 @@
include(Compiler/PGI) include(Compiler/PGI)
__compiler_pgi(Fortran) __compiler_pgi(Fortran)
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform")
SET(CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT} -Mpreprocess -Kieee") SET(CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT} -Mpreprocess -Kieee")
SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "${CMAKE_Fortran_FLAGS_DEBUG_INIT} -Mbounds") SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "${CMAKE_Fortran_FLAGS_DEBUG_INIT} -Mbounds")

@ -2,3 +2,5 @@ include(Compiler/PathScale)
__compiler_pathscale(Fortran) __compiler_pathscale(Fortran)
SET(CMAKE_Fortran_MODDIR_FLAG "-module ") SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixedform")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-freeform")

@ -1,4 +1,6 @@
SET(CMAKE_Fortran_VERBOSE_FLAG "-v") SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC") SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G") SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G")

@ -0,0 +1,8 @@
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
# no optimization in tcc:
SET (CMAKE_C_FLAGS_INIT "")
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG")
SET (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g")

@ -1,6 +1,9 @@
include(Compiler/XL) include(Compiler/XL)
__compiler_xl(Fortran) __compiler_xl(Fortran)
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-qfixed") # [=<right_margin>]
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-qfree") # [=f90|ibm]
SET(CMAKE_Fortran_MODDIR_FLAG "-qmoddir=") SET(CMAKE_Fortran_MODDIR_FLAG "-qmoddir=")
SET(CMAKE_Fortran_DEFINE_FLAG "-WF,-D") SET(CMAKE_Fortran_DEFINE_FLAG "-WF,-D")

@ -35,14 +35,19 @@ macro(__compiler_xl lang)
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
# The compiler front-end passes all object files, archive files, and shared # CMAKE_XL_CreateExportList is part of the AIX XL compilers but not the linux ones.
# library files named on the command line to CreateExportList to create a # If we found the tool, we'll use it to create exports, otherwise stick with the regular
# list of all symbols to be exported from the shared library. This causes # create shared library compile line.
# all archive members to be copied into the shared library whether they are if (CMAKE_XL_CreateExportList)
# needed or not. Instead we run the tool ourselves to pass only the object # The compiler front-end passes all object files, archive files, and shared
# files so that we export only the symbols actually provided by the sources. # library files named on the command line to CreateExportList to create a
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY # list of all symbols to be exported from the shared library. This causes
"${CMAKE_XL_CreateExportList} <OBJECT_DIR>/objects.exp <OBJECTS>" # all archive members to be copied into the shared library whether they are
"<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" # needed or not. Instead we run the tool ourselves to pass only the object
) # files so that we export only the symbols actually provided by the sources.
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
"${CMAKE_XL_CreateExportList} <OBJECT_DIR>/objects.exp <OBJECTS>"
"<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>"
)
endif()
endmacro() endmacro()

@ -59,14 +59,17 @@ UpdateType: @UPDATE_TYPE@
# Compiler info # Compiler info
Compiler: @CMAKE_CXX_COMPILER@ Compiler: @CMAKE_CXX_COMPILER@
# Dynamic analysis and coverage # Dynamic analysis (MemCheck)
PurifyCommand: @PURIFYCOMMAND@ PurifyCommand: @PURIFYCOMMAND@
ValgrindCommand: @VALGRIND_COMMAND@ ValgrindCommand: @VALGRIND_COMMAND@
ValgrindCommandOptions: @VALGRIND_COMMAND_OPTIONS@ ValgrindCommandOptions: @VALGRIND_COMMAND_OPTIONS@
MemoryCheckCommand: @MEMORYCHECK_COMMAND@ MemoryCheckCommand: @MEMORYCHECK_COMMAND@
MemoryCheckCommandOptions: @MEMORYCHECK_COMMAND_OPTIONS@ MemoryCheckCommandOptions: @MEMORYCHECK_COMMAND_OPTIONS@
MemoryCheckSuppressionFile: @MEMORYCHECK_SUPPRESSIONS_FILE@ MemoryCheckSuppressionFile: @MEMORYCHECK_SUPPRESSIONS_FILE@
# Coverage
CoverageCommand: @COVERAGE_COMMAND@ CoverageCommand: @COVERAGE_COMMAND@
CoverageExtraFlags: @COVERAGE_EXTRA_FLAGS@
# Cluster commands # Cluster commands
SlurmBatchCommand: @SLURM_SBATCH_COMMAND@ SlurmBatchCommand: @SLURM_SBATCH_COMMAND@

@ -0,0 +1,285 @@
# - Functions to help assemble a standalone Qt4 executable.
# A collection of CMake utility functions useful for deploying
# Qt4 executables.
#
# The following functions are provided by this module:
# write_qt4_conf
# resolve_qt4_paths
# fixup_qt4_executable
# install_qt4_plugin_path
# install_qt4_plugin
# install_qt4_executable
# Requires CMake 2.6 or greater because it uses function and
# PARENT_SCOPE. Also depends on BundleUtilities.cmake.
#
# WRITE_QT4_CONF(<qt_conf_dir> <qt_conf_contents>)
# Writes a qt.conf file with the <qt_conf_contents> into <qt_conf_dir>.
#
# RESOLVE_QT4_PATHS(<paths_var> [<executable_path>])
# Loop through <paths_var> list and if any don't exist resolve them
# relative to the <executable_path> (if supplied) or the CMAKE_INSTALL_PREFIX.
#
# FIXUP_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
# Copies Qt plugins, writes a Qt configuration file (if needed) and fixes up a
# Qt4 executable using BundleUtilities so it is standalone and can be
# drag-and-drop copied to another machine as long as all of the system
# libraries are compatible.
#
# <executable> should point to the executable to be fixed-up.
#
# <qtplugins> should contain a list of the names or paths of any Qt plugins
# to be installed.
#
# <libs> will be passed to BundleUtilities and should be a list of any already
# installed plugins, libraries or executables to also be fixed-up.
#
# <dirs> will be passed to BundleUtilities and should contain and directories
# to be searched to find library dependencies.
#
# <plugins_dir> allows an custom plugins directory to be used.
#
# <request_qt_conf> will force a qt.conf file to be written even if not needed.
#
# INSTALL_QT4_PLUGIN_PATH(plugin executable copy installed_plugin_path_var <plugins_dir> <component> <configurations>)
# Install (or copy) a resolved <plugin> to the default plugins directory
# (or <plugins_dir>) relative to <executable> and store the result in
# <installed_plugin_path_var>.
#
# If <copy> is set to TRUE then the plugins will be copied rather than
# installed. This is to allow this module to be used at CMake time rather than
# install time.
#
# If <component> is set then anything installed will use this COMPONENT.
#
# INSTALL_QT4_PLUGIN(plugin executable copy installed_plugin_path_var <plugins_dir> <component>)
# Install (or copy) an unresolved <plugin> to the default plugins directory
# (or <plugins_dir>) relative to <executable> and store the result in
# <installed_plugin_path_var>. See documentation of INSTALL_QT4_PLUGIN_PATH.
#
# INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>])
# Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up
# a Qt4 executable using BundleUtilities so it is standalone and can be
# drag-and-drop copied to another machine as long as all of the system
# libraries are compatible. The executable will be fixed-up at install time.
# <component> is the COMPONENT used for bundle fixup and plugin installation.
# See documentation of FIXUP_QT4_BUNDLE.
#=============================================================================
# Copyright 2011 Mike McQuaid <mike@mikemcquaid.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# The functions defined in this file depend on the fixup_bundle function
# (and others) found in BundleUtilities.cmake
include(BundleUtilities)
set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
function(write_qt4_conf qt_conf_dir qt_conf_contents)
set(qt_conf_path "${qt_conf_dir}/qt.conf")
message(STATUS "Writing ${qt_conf_path}")
file(WRITE "${qt_conf_path}" "${qt_conf_contents}")
endfunction()
function(resolve_qt4_paths paths_var)
set(executable_path ${ARGV1})
set(paths_resolved)
foreach(path ${${paths_var}})
if(EXISTS "${path}")
list(APPEND paths_resolved "${path}")
else()
if(${executable_path})
list(APPEND paths_resolved "${executable_path}/${path}")
else()
list(APPEND paths_resolved "\${CMAKE_INSTALL_PREFIX}/${path}")
endif()
endif()
endforeach()
set(${paths_var} ${paths_resolved} PARENT_SCOPE)
endfunction()
function(fixup_qt4_executable executable)
set(qtplugins ${ARGV1})
set(libs ${ARGV2})
set(dirs ${ARGV3})
set(plugins_dir ${ARGV4})
set(request_qt_conf ${ARGV5})
message(STATUS "fixup_qt4_executable")
message(STATUS " executable='${executable}'")
message(STATUS " qtplugins='${qtplugins}'")
message(STATUS " libs='${libs}'")
message(STATUS " dirs='${dirs}'")
message(STATUS " plugins_dir='${plugins_dir}'")
message(STATUS " request_qt_conf='${request_qt_conf}'")
if(QT_LIBRARY_DIR)
list(APPEND dirs "${QT_LIBRARY_DIR}")
endif()
if(APPLE)
set(qt_conf_dir "${executable}/Contents/Resources")
set(executable_path "${executable}")
set(write_qt_conf TRUE)
else()
get_filename_component(executable_path "${executable}" PATH)
if(NOT executable_path)
set(executable_path ".")
endif()
set(qt_conf_dir "${executable_path}")
set(write_qt_conf ${request_qt_conf})
endif()
foreach(plugin ${qtplugins})
set(installed_plugin_path "")
install_qt4_plugin("${plugin}" "${plugins_dir}" "${executable}" 1 installed_plugin_path)
list(APPEND libs ${installed_plugin_path})
endforeach()
foreach(lib ${libs})
if(NOT EXISTS "${lib}")
message(FATAL_ERROR "Library does not exist: ${lib}")
endif()
endforeach()
resolve_qt4_paths(libs "${executable_path}")
if(write_qt_conf)
set(qt_conf_contents "[Paths]\nPlugins = ${plugins_dir}")
write_qt4_conf("${qt_conf_dir}" "${qt_conf_contents}")
endif()
fixup_bundle("${executable}" "${libs}" "${dirs}")
endfunction()
function(install_qt4_plugin_path plugin executable copy installed_plugin_path_var)
set(plugins_dir ${ARGV4})
set(component ${ARGV5})
set(configurations ${ARGV6})
if(EXISTS "${plugin}")
if(plugins_dir)
set(plugins_dir "${plugins_dir}")
else()
if(APPLE)
set(plugins_dir "PlugIns")
else()
set(plugins_dir "plugins")
endif()
endif()
if(APPLE)
set(plugins_path "${executable}/Contents/${plugins_dir}")
else()
get_filename_component(executable_path "${executable}" PATH)
if(NOT executable_path)
set(executable_path ".")
endif()
set(plugins_path "${executable_path}/${plugins_dir}")
endif()
set(plugin_group "")
get_filename_component(plugin_path "${plugin}" PATH)
get_filename_component(plugin_parent_path "${plugin_path}" PATH)
get_filename_component(plugin_parent_dir_name "${plugin_parent_path}" NAME)
get_filename_component(plugin_name "${plugin}" NAME)
string(TOLOWER "${plugin_parent_dir_name}" plugin_parent_dir_name)
if("${plugin_parent_dir_name}" STREQUAL "plugins")
get_filename_component(plugin_group "${plugin_path}" NAME)
set(${plugin_group_var} "${plugin_group}")
endif()
set(plugins_path "${plugins_path}/${plugin_group}")
if(${copy})
file(MAKE_DIRECTORY "${plugins_path}")
file(COPY "${plugin}" DESTINATION "${plugins_path}")
else()
if(configurations AND (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE))
set(configurations CONFIGURATIONS ${configurations})
else()
unset(configurations)
endif()
install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
endif()
set(${installed_plugin_path_var} ${${installed_path_var}} "${plugins_path}/${plugin_name}" PARENT_SCOPE)
endif()
endfunction()
function(install_qt4_plugin plugin executable copy installed_plugin_path_var)
set(plugins_dir ${ARGV4})
set(component ${ARGV5})
if(EXISTS "${plugin}")
install_qt4_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
else()
if(QT_IS_STATIC)
string(TOUPPER "QT_${plugin}_LIBRARY" plugin_var)
else()
string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
endif()
set(plugin_release_var "${plugin_var}_RELEASE")
set(plugin_debug_var "${plugin_var}_DEBUG")
set(plugin_release "${${plugin_release_var}}")
set(plugin_debug "${${plugin_debug_var}}")
if(DEFINED "${plugin_release_var}" AND DEFINED "${plugin_debug_var}" AND NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}")
message(WARNING "Qt plugin \"${plugin}\" not recognized or found.")
endif()
install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Debug")
endif()
set(installed_plugin_path_var "${installed_plugin_path_var}" PARENT_SCOPE)
endfunction()
function(install_qt4_executable executable)
set(qtplugins ${ARGV1})
set(libs ${ARGV2})
set(dirs ${ARGV3})
set(plugins_dir ${ARGV4})
set(request_qt_conf ${ARGV5})
set(component ${ARGV6})
if(QT_LIBRARY_DIR)
list(APPEND dirs "${QT_LIBRARY_DIR}")
endif()
if(component)
set(component COMPONENT ${component})
else()
unset(component)
endif()
get_filename_component(executable_absolute "${executable}" ABSOLUTE)
if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}")
gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_RELEASE}" qtcore_type)
elseif(EXISTS "${QT_QTCORE_LIBRARY_DEBUG}")
gp_file_type("${executable_absolute}" "${QT_QTCORE_LIBRARY_DEBUG}" qtcore_type)
endif()
if(qtcore_type STREQUAL "system")
set(qt_plugins_dir "")
endif()
if(NOT qtplugins AND QT_LIBRARIES_PLUGINS)
set(qtplugins "${QT_LIBRARIES_PLUGINS}")
endif()
foreach(plugin ${qtplugins})
set(installed_plugin_paths "")
install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
list(APPEND libs ${installed_plugin_paths})
endforeach()
resolve_qt4_paths(libs)
install(CODE
"INCLUDE(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\")
SET(BU_CHMOD_BUNDLE_ITEMS TRUE)
FIXUP_QT4_EXECUTABLE(\"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
${component}
)
endfunction()

@ -1,44 +1,57 @@
# - Macros for generating a summary of enabled/disabled features # - Macros for generating a summary of enabled/disabled features
# #
# This module provides the macros feature_summary(), set_package_info() and # This module provides the macros feature_summary(), set_package_properties() and
# add_feature_info(). # add_feature_info().
# For compatiblity it also still provides set_feature_info(), # For compatibility it also still provides set_package_info(), set_feature_info(),
# print_enabled_features() and print_disabled_features. # print_enabled_features() and print_disabled_features().
# #
# These macros can be used to generate a summary of enabled and disabled # These macros can be used to generate a summary of enabled and disabled
# packages and/or feature for a build tree: # packages and/or feature for a build tree:
# #
# -- Enabled features: # -- The following OPTIONAL packages have been found:
# LibXml2 (required version >= 2.4) , XML processing library. , <http://xmlsoft.org> # LibXml2 (required version >= 2.4) , XML processing library. , <http://xmlsoft.org>
# * Enables HTML-import in MyWordProcessor
# * Enables odt-export in MyWordProcessor
# PNG , A PNG image library. , <http://www.libpng.org/pub/png/> # PNG , A PNG image library. , <http://www.libpng.org/pub/png/>
# -- Disabled features: # * Enables saving screenshots
# -- The following OPTIONAL packages have not been found:
# Lua51 , The Lua scripting language. , <http://www.lua.org> # Lua51 , The Lua scripting language. , <http://www.lua.org>
# * Enables macros in MyWordProcessor
# Foo , Foo provides cool stuff. # Foo , Foo provides cool stuff.
# #
# #
# FEATURE_SUMMARY( [FILENAME <file>] # FEATURE_SUMMARY( [FILENAME <file>]
# [APPEND] # [APPEND]
# [VAR <variable_name>] # [VAR <variable_name>]
# [INCLUDE_QUIET_PACKAGES]
# [FATAL_ON_MISSING_REQUIRED_PACKAGES]
# [DESCRIPTION "Found packages:"] # [DESCRIPTION "Found packages:"]
# WHAT (ALL | PACKAGES_FOUND | PACKAGES_NOT_FOUND # WHAT (ALL | PACKAGES_FOUND | PACKAGES_NOT_FOUND
# | ENABLED_FEATURES | DISABLED_FEATURES] # | ENABLED_FEATURES | DISABLED_FEATURES]
# ) # )
# #
# The FEATURE_SUMMARY() macro can be used to print information about enabled # The FEATURE_SUMMARY() macro can be used to print information about enabled
# or disabled features or packages of a project. # or disabled packages or features of a project.
# By default, only the names of the features/packages will be printed and their # By default, only the names of the features/packages will be printed and their
# required version when one was specified. Use SET_FEATURE_INFO() to add more # required version when one was specified. Use SET_PACKAGE_PROPERTIES() to add more
# useful information, like e.g. a download URL for the respective package. # useful information, like e.g. a download URL for the respective package or their
# purpose in the project.
# #
# The WHAT option is the only mandatory option. Here you specify what information # The WHAT option is the only mandatory option. Here you specify what information
# will be printed: # will be printed:
# ENABLED_FEATURES: the list of all features and packages which are enabled, # ALL: print everything
# excluding the QUIET packages # ENABLED_FEATURES: the list of all features which are enabled
# DISABLED_FEATURES: the list of all features and packages which are disabled, # DISABLED_FEATURES: the list of all features which are disabled
# excluding the QUIET packages
# PACKAGES_FOUND: the list of all packages which have been found # PACKAGES_FOUND: the list of all packages which have been found
# PACKAGES_NOT_FOUND: the list of all packages which have not been found # PACKAGES_NOT_FOUND: the list of all packages which have not been found
# ALL: this will give all packages which have or have not been found # OPTIONAL_PACKAGES_FOUND: only those packages which have been found which have the type OPTIONAL
# OPTIONAL_PACKAGES_NOT_FOUND: only those packages which have not been found which have the type OPTIONAL
# RECOMMENDED_PACKAGES_FOUND: only those packages which have been found which have the type RECOMMENDED
# RECOMMENDED_PACKAGES_NOT_FOUND: only those packages which have not been found which have the type RECOMMENDED
# REQUIRED_PACKAGES_FOUND: only those packages which have been found which have the type REQUIRED
# REQUIRED_PACKAGES_NOT_FOUND: only those packages which have not been found which have the type REQUIRED
# RUNTIME_PACKAGES_FOUND: only those packages which have been found which have the type RUNTIME
# RUNTIME_PACKAGES_NOT_FOUND: only those packages which have not been found which have the type RUNTIME
# #
# If a FILENAME is given, the information is printed into this file. If APPEND # If a FILENAME is given, the information is printed into this file. If APPEND
# is used, it is appended to this file, otherwise the file is overwritten if # is used, it is appended to this file, otherwise the file is overwritten if
@ -48,19 +61,29 @@
# If FILENAME is not used, the information is printed to the terminal. # If FILENAME is not used, the information is printed to the terminal.
# Using the DESCRIPTION option a description or headline can be set which will # Using the DESCRIPTION option a description or headline can be set which will
# be printed above the actual content. # be printed above the actual content.
# If INCLUDE_QUIET_PACKAGES is given, packages which have been searched with find_package(... QUIET) will
# also be listed. By default they are skipped.
# If FATAL_ON_MISSING_REQUIRED_PACKAGES is given, CMake will abort if a package which is marked as REQUIRED
# has not been found.
# #
# Example 1, append everything to a file: # Example 1, append everything to a file:
# feature_summary(WHAT ALL # feature_summary(WHAT ALL
# FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND) # FILENAME ${CMAKE_BINARY_DIR}/all.log APPEND)
# #
# Example 2, print the enabled features into the variable enabledFeaturesText: # Example 2, print the enabled features into the variable enabledFeaturesText, including QUIET packages:
# feature_summary(WHAT ENABLED_FEATURES # feature_summary(WHAT ENABLED_FEATURES
# INCLUDE_QUIET_PACKAGES
# DESCRIPTION "Enabled Features:" # DESCRIPTION "Enabled Features:"
# VAR enabledFeaturesText) # VAR enabledFeaturesText)
# message(STATUS "${enabledFeaturesText}") # message(STATUS "${enabledFeaturesText}")
# #
# #
# SET_PACKAGE_INFO(<name> <description> [<url> [<comment>] ] ) # SET_PACKAGE_PROPERTIES(<name> PROPERTIES [ URL <url> ]
# [ DESCRIPTION <description> ]
# [ TYPE (RUNTIME|OPTIONAL|RECOMMENDED|REQUIRED) ]
# [ PURPOSE <purpose> ]
# )
#
# Use this macro to set up information about the named package, which can # Use this macro to set up information about the named package, which can
# then be displayed via FEATURE_SUMMARY(). # then be displayed via FEATURE_SUMMARY().
# This can be done either directly in the Find-module or in the project # This can be done either directly in the Find-module or in the project
@ -68,15 +91,52 @@
# The features for which information can be set are added automatically by the # The features for which information can be set are added automatically by the
# find_package() command. # find_package() command.
# #
# URL: this should be the homepage of the package, or something similar. Ideally this is set
# already directly in the Find-module.
#
# DESCRIPTION: A short description what that package is, at most one sentence.
# Ideally this is set already directly in the Find-module.
#
# TYPE: What type of dependency has the using project on that package. Default is OPTIONAL.
# In this case it is a package which can be used by the project when available at buildtime,
# but it also work without. RECOMMENDED is similar to OPTIONAL, i.e. the project will build
# if the package is not present, but the functionality of the resulting binaries will be severly
# limited. If a REQUIRED package is not available at buildtime, the project may not even build. This
# can be combined with the FATAL_ON_MISSING_REQUIRED_PACKAGES argument for feature_summary().
# Last, a RUNTIME package is a package which is actually not used at all during the build, but
# which is required for actually running the resulting binaries. So if such a package is missing,
# the project can still be built, but it may not work later on. If set_package_properties() is called
# multiple times for the same package with different TYPEs, the TYPE is only changed to higher
# TYPEs ( RUNTIME < OPTIONAL < RECOMMENDED < REQUIRED ), lower TYPEs are ignored.
# The TYPE property is project-specific, so it cannot be set by the Find-module, but must be set in the project.
#
# PURPOSE: This describes which features this package enables in the project, i.e. it tells the user
# what functionality he gets in the resulting binaries.
# If set_package_properties() is called multiple times for a package, all PURPOSE properties are appended
# to a list of purposes of the package in the project.
# As the TYPE property, also the PURPOSE property
# is project-specific, so it cannot be set by the Find-module, but must be set in the project.
#
#
# Example for setting the info for a package: # Example for setting the info for a package:
# find_package(LibXml2) # find_package(LibXml2)
# set_package_info(LibXml2 "XML processing library." "http://xmlsoft.org/") # set_package_properties(LibXml2 PROPERTIES DESCRIPTION "A XML processing library."
# URL "http://xmlsoft.org/")
# #
# set_package_properties(LibXml2 PROPERTIES TYPE RECOMMENDED
# PURPOSE "Enables HTML-import in MyWordProcessor")
# ...
# set_package_properties(LibXml2 PROPERTIES TYPE OPTIONAL
# PURPOSE "Enables odt-export in MyWordProcessor")
#
# find_package(DBUS)
# set_package_properties(DBUS PROPERTIES TYPE RUNTIME
# PURPOSE "Necessary to disable the screensaver during a presentation" )
# #
# ADD_FEATURE_INFO(<name> <enabled> <description>) # ADD_FEATURE_INFO(<name> <enabled> <description>)
# Use this macro to add information about a feature with the given <name>. # Use this macro to add information about a feature with the given <name>.
# <enabled> contains whether this feature is enabled or not, <description> # <enabled> contains whether this feature is enabled or not, <description>
# is a text descibing the feature. # is a text describing the feature.
# The information can be displayed using feature_summary() for ENABLED_FEATURES # The information can be displayed using feature_summary() for ENABLED_FEATURES
# and DISABLED_FEATURES respectively. # and DISABLED_FEATURES respectively.
# #
@ -87,14 +147,22 @@
# #
# The following macros are provided for compatibility with previous CMake versions: # The following macros are provided for compatibility with previous CMake versions:
# #
# SET_PACKAGE_INFO(<name> <description> [<url> [<purpose>] ] )
# Use this macro to set up information about the named package, which can
# then be displayed via FEATURE_SUMMARY().
# This can be done either directly in the Find-module or in the project
# which uses the module after the FIND_PACKAGE() call.
# The features for which information can be set are added automatically by the
# find_package() command.
#
# PRINT_ENABLED_FEATURES() # PRINT_ENABLED_FEATURES()
# Does the same as FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:") # Does the same as FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
# #
# PRINT_DISABLED_FEATURES() # PRINT_DISABLED_FEATURES()
# Does the same as FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:") # Does the same as FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
# #
# SET_FEATURE_INFO(<name> <description> [<url> [<comment>] ] ) # SET_FEATURE_INFO(<name> <description> [<url>] )
# Does the same as SET_PACKAGE_INFO(<name> <description> <url> <comment> ) # Does the same as SET_PACKAGE_INFO(<name> <description> <url> )
#============================================================================= #=============================================================================
# Copyright 2007-2009 Kitware, Inc. # Copyright 2007-2009 Kitware, Inc.
@ -123,64 +191,149 @@ FUNCTION(ADD_FEATURE_INFO _name _enabled _desc)
ENDFUNCTION(ADD_FEATURE_INFO) ENDFUNCTION(ADD_FEATURE_INFO)
FUNCTION(SET_FEATURE_INFO)
SET_PACKAGE_INFO(${ARGN})
ENDFUNCTION(SET_FEATURE_INFO)
FUNCTION(SET_PACKAGE_PROPERTIES _name _props)
IF(NOT "${_props}" STREQUAL "PROPERTIES")
MESSAGE(FATAL_ERROR "PROPERTIES keyword is missing in SET_PACKAGE_PROPERTIES() call.")
ENDIF()
FUNCTION(SET_PACKAGE_INFO _name _desc) SET(options ) # none
SET(_url "${ARGV2}") SET(oneValueArgs DESCRIPTION URL TYPE PURPOSE )
SET(_comment "${ARGV3}") SET(multiValueArgs ) # none
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
IF(_url MATCHES ".+") CMAKE_PARSE_ARGUMENTS(_SPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_url}" )
ENDIF(_url MATCHES ".+") IF(_SPP_UNPARSED_ARGUMENTS)
IF(_comment MATCHES ".+") MESSAGE(FATAL_ERROR "Unknown keywords given to SET_PACKAGE_PROPERTIES(): \"${_SPP_UNPARSED_ARGUMENTS}\"")
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_COMMENT "${_comment}" ) ENDIF()
ENDIF(_comment MATCHES ".+")
ENDFUNCTION(SET_PACKAGE_INFO) IF(_SPP_DESCRIPTION)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION)
IF(_info AND NOT "${_info}" STREQUAL "${_SPP_DESCRIPTION}")
MESSAGE(STATUS "Warning: Property DESCRIPTION for package ${_name} already set to \"${_info}\", overriding it with \"${_SPP_DESCRIPTION}\"")
ENDIF()
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_SPP_DESCRIPTION}" )
ENDIF()
IF(_SPP_URL)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_name}_URL)
IF(_info AND NOT "${_info}" STREQUAL "${_SPP_URL}")
MESSAGE(STATUS "Warning: Property URL already set to \"${_info}\", overriding it with \"${_SPP_URL}\"")
ENDIF()
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_SPP_URL}" )
ENDIF()
# handle the PURPOSE: use APPEND, since there can be multiple purposes for one package inside a project
IF(_SPP_PURPOSE)
SET_PROPERTY(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_SPP_PURPOSE}" )
ENDIF()
# handle the TYPE
IF(NOT _SPP_TYPE)
SET(_SPP_TYPE OPTIONAL)
ENDIF()
# List the supported types, according to their priority
SET(validTypes "RUNTIME" "OPTIONAL" "RECOMMENDED" "REQUIRED" )
LIST(FIND validTypes ${_SPP_TYPE} _typeIndexInList)
IF("${_typeIndexInList}" STREQUAL "-1" )
MESSAGE(FATAL_ERROR "Bad package property type ${_SPP_TYPE} used in SET_PACKAGE_PROPERTIES(). "
"Valid types are OPTIONAL, RECOMMENDED, REQUIRED and RUNTIME." )
ENDIF()
GET_PROPERTY(_previousType GLOBAL PROPERTY _CMAKE_${_name}_TYPE)
LIST(FIND validTypes "${_previousType}" _prevTypeIndexInList)
# make sure a previously set TYPE is not overridden with a lower new TYPE:
IF("${_typeIndexInList}" GREATER "${_prevTypeIndexInList}")
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_TYPE "${_SPP_TYPE}" )
ENDIF()
ENDFUNCTION(SET_PACKAGE_PROPERTIES)
FUNCTION(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
SET(_type "ANY")
IF("${_property}" MATCHES "REQUIRED_")
SET(_type "REQUIRED")
ELSEIF("${_property}" MATCHES "RECOMMENDED_")
SET(_type "RECOMMENDED")
ELSEIF("${_property}" MATCHES "RUNTIME_")
SET(_type "RUNTIME")
ELSEIF("${_property}" MATCHES "OPTIONAL_")
SET(_type "OPTIONAL")
ENDIF()
IF("${_property}" MATCHES "PACKAGES_FOUND")
SET(_property "PACKAGES_FOUND")
ELSEIF("${_property}" MATCHES "PACKAGES_NOT_FOUND")
SET(_property "PACKAGES_NOT_FOUND")
ENDIF()
FUNCTION(_FS_GET_FEATURE_SUMMARY _property _var)
SET(_currentFeatureText "") SET(_currentFeatureText "")
GET_PROPERTY(_EnabledFeatures GLOBAL PROPERTY ${_property}) GET_PROPERTY(_EnabledFeatures GLOBAL PROPERTY ${_property})
FOREACH(_currentFeature ${_EnabledFeatures}) FOREACH(_currentFeature ${_EnabledFeatures})
SET(_currentFeatureText "${_currentFeatureText}\n${_currentFeature}")
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_REQUIRED_VERSION)
IF(_info)
SET(_currentFeatureText "${_currentFeatureText} (required version ${_info})")
ENDIF(_info)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_DESCRIPTION)
IF(_info)
SET(_currentFeatureText "${_currentFeatureText} , ${_info}")
ENDIF(_info)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_URL)
IF(_info)
SET(_currentFeatureText "${_currentFeatureText} , <${_info}>")
ENDIF(_info)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_COMMENT)
IF(_info)
SET(_currentFeatureText "${_currentFeatureText} , ${_info}")
ENDIF(_info)
ENDFOREACH(_currentFeature)
SET(${_var} "${_currentFeatureText}" PARENT_SCOPE)
ENDFUNCTION(_FS_GET_FEATURE_SUMMARY)
# does this package belong to the type we currently want to list ?
GET_PROPERTY(_currentType GLOBAL PROPERTY _CMAKE_${_currentFeature}_TYPE)
IF(NOT _currentType)
SET(_currentType OPTIONAL)
ENDIF()
FUNCTION(PRINT_ENABLED_FEATURES) IF("${_type}" STREQUAL ANY OR "${_type}" STREQUAL "${_currentType}")
FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
ENDFUNCTION(PRINT_ENABLED_FEATURES)
# check whether the current feature/package should be in the output depending on whether it was QUIET or not
SET(includeThisOne TRUE)
# skip QUIET packages, except if they are REQUIRED or INCLUDE_QUIET_PACKAGES has been set
IF((NOT "${_currentType}" STREQUAL "REQUIRED") AND NOT _includeQuiet)
GET_PROPERTY(_isQuiet GLOBAL PROPERTY _CMAKE_${_currentFeature}_QUIET)
IF(_isQuiet)
SET(includeThisOne FALSE)
ENDIF()
ENDIF()
FUNCTION(PRINT_DISABLED_FEATURES) IF(includeThisOne)
FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
ENDFUNCTION(PRINT_DISABLED_FEATURES) SET(_currentFeatureText "${_currentFeatureText}\n * ${_currentFeature}")
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_REQUIRED_VERSION)
IF(_info)
SET(_currentFeatureText "${_currentFeatureText} (required version ${_info})")
ENDIF(_info)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_DESCRIPTION)
IF(_info)
SET(_currentFeatureText "${_currentFeatureText} , ${_info}")
ENDIF(_info)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_URL)
IF(_info)
SET(_currentFeatureText "${_currentFeatureText} , <${_info}>")
ENDIF(_info)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_PURPOSE)
FOREACH(_purpose ${_info})
SET(_currentFeatureText "${_currentFeatureText}\n * ${_purpose}")
ENDFOREACH()
ENDIF(includeThisOne)
ENDIF("${_type}" STREQUAL ANY OR "${_type}" STREQUAL "${_currentType}")
ENDFOREACH(_currentFeature)
SET(${_var} "${_currentFeatureText}" PARENT_SCOPE)
ENDFUNCTION(_FS_GET_FEATURE_SUMMARY)
FUNCTION(FEATURE_SUMMARY) FUNCTION(FEATURE_SUMMARY)
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...) # CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
SET(options APPEND) SET(options APPEND INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
SET(oneValueArgs FILENAME VAR DESCRIPTION WHAT) SET(oneValueArgs FILENAME VAR DESCRIPTION WHAT)
SET(multiValueArgs ) # none SET(multiValueArgs ) # none
@ -188,27 +341,70 @@ FUNCTION(FEATURE_SUMMARY)
IF(_FS_UNPARSED_ARGUMENTS) IF(_FS_UNPARSED_ARGUMENTS)
MESSAGE(FATAL_ERROR "Unknown keywords given to FEATURE_SUMMARY(): \"${_FS_UNPARSED_ARGUMENTS}\"") MESSAGE(FATAL_ERROR "Unknown keywords given to FEATURE_SUMMARY(): \"${_FS_UNPARSED_ARGUMENTS}\"")
ENDIF(_FS_UNPARSED_ARGUMENTS) ENDIF()
IF(NOT _FS_WHAT) IF(NOT _FS_WHAT)
MESSAGE(FATAL_ERROR "The call to FEATURE_SUMMAY() doesn't set the required WHAT argument.") MESSAGE(FATAL_ERROR "The call to FEATURE_SUMMARY() doesn't set the required WHAT argument.")
ENDIF(NOT _FS_WHAT) ENDIF()
IF( "${_FS_WHAT}" STREQUAL "ENABLED_FEATURES" SET(validWhatParts "ENABLED_FEATURES"
OR "${_FS_WHAT}" STREQUAL "DISABLED_FEATURES" "DISABLED_FEATURES"
OR "${_FS_WHAT}" STREQUAL "PACKAGES_FOUND" "PACKAGES_FOUND"
OR "${_FS_WHAT}" STREQUAL "PACKAGES_NOT_FOUND") "PACKAGES_NOT_FOUND"
_FS_GET_FEATURE_SUMMARY( ${_FS_WHAT} _featureSummary) "OPTIONAL_PACKAGES_FOUND"
"OPTIONAL_PACKAGES_NOT_FOUND"
"RECOMMENDED_PACKAGES_FOUND"
"RECOMMENDED_PACKAGES_NOT_FOUND"
"REQUIRED_PACKAGES_FOUND"
"REQUIRED_PACKAGES_NOT_FOUND"
"RUNTIME_PACKAGES_FOUND"
"RUNTIME_PACKAGES_NOT_FOUND")
LIST(FIND validWhatParts "${_FS_WHAT}" indexInList)
IF(NOT "${indexInList}" STREQUAL "-1")
_FS_GET_FEATURE_SUMMARY( ${_FS_WHAT} _featureSummary ${_FS_INCLUDE_QUIET_PACKAGES} )
SET(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n") SET(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n")
IF (("${_FS_WHAT}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND") AND _featureSummary)
SET(requiredPackagesNotFound TRUE)
ENDIF()
ELSEIF("${_FS_WHAT}" STREQUAL "ALL") ELSEIF("${_FS_WHAT}" STREQUAL "ALL")
_FS_GET_FEATURE_SUMMARY( PACKAGES_FOUND _tmp1)
_FS_GET_FEATURE_SUMMARY( PACKAGES_NOT_FOUND _tmp2) SET(allWhatParts "ENABLED_FEATURES"
SET(_featureSummary "${_tmp1}${_tmp2}") "RUNTIME_PACKAGES_FOUND"
IF(_FS_DESCRIPTION) "OPTIONAL_PACKAGES_FOUND"
SET(_fullText "${_FS_DESCRIPTION}${_tmp1}${_tmp2}\n") "RECOMMENDED_PACKAGES_FOUND"
ELSE(_FS_DESCRIPTION) "REQUIRED_PACKAGES_FOUND"
SET(_fullText "-- Found the following packages:${_tmp1}\n-- Did not find the following packages:${_tmp2}\n")
ENDIF(_FS_DESCRIPTION) "DISABLED_FEATURES"
"RUNTIME_PACKAGES_NOT_FOUND"
"OPTIONAL_PACKAGES_NOT_FOUND"
"RECOMMENDED_PACKAGES_NOT_FOUND"
"REQUIRED_PACKAGES_NOT_FOUND"
)
SET(title_ENABLED_FEATURES "The following features have been enabled:")
SET(title_DISABLED_FEATURES "The following features have been disabled:")
SET(title_OPTIONAL_PACKAGES_FOUND "The following OPTIONAL packages have been found:")
SET(title_OPTIONAL_PACKAGES_NOT_FOUND "The following OPTIONAL packages have not been found:")
SET(title_RECOMMENDED_PACKAGES_FOUND "The following RECOMMENDED packages have been found:")
SET(title_RECOMMENDED_PACKAGES_NOT_FOUND "The following RECOMMENDED packages have not been found:")
SET(title_REQUIRED_PACKAGES_FOUND "The following REQUIRED packages have been found:")
SET(title_REQUIRED_PACKAGES_NOT_FOUND "The following REQUIRED packages have not been found:")
SET(title_RUNTIME_PACKAGES_FOUND "The following RUNTIME packages have been found:")
SET(title_RUNTIME_PACKAGES_NOT_FOUND "The following RUNTIME packages have not been found:")
SET(_fullText "${_FS_DESCRIPTION}")
FOREACH(part ${allWhatParts})
SET(_tmp)
_FS_GET_FEATURE_SUMMARY( ${part} _tmp ${_FS_INCLUDE_QUIET_PACKAGES})
IF(_tmp)
SET(_fullText "${_fullText}\n\n-- ${title_${part}}\n${_tmp}")
IF("${part}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND")
SET(requiredPackagesNotFound TRUE)
ENDIF()
ENDIF()
ENDFOREACH()
ELSE() ELSE()
MESSAGE(FATAL_ERROR "The WHAT argument of FEATURE_SUMMARY() is set to ${_FS_WHAT}, which is not a valid value.") MESSAGE(FATAL_ERROR "The WHAT argument of FEATURE_SUMMARY() is set to ${_FS_WHAT}, which is not a valid value.")
ENDIF() ENDIF()
@ -218,16 +414,53 @@ FUNCTION(FEATURE_SUMMARY)
FILE(APPEND "${_FS_FILENAME}" "${_fullText}") FILE(APPEND "${_FS_FILENAME}" "${_fullText}")
ELSE(_FS_APPEND) ELSE(_FS_APPEND)
FILE(WRITE "${_FS_FILENAME}" "${_fullText}") FILE(WRITE "${_FS_FILENAME}" "${_fullText}")
ENDIF(_FS_APPEND) ENDIF()
ELSE(_FS_FILENAME) ELSE(_FS_FILENAME)
IF(NOT _FS_VAR) IF(NOT _FS_VAR)
MESSAGE(STATUS "${_fullText}") MESSAGE(STATUS "${_fullText}")
ENDIF(NOT _FS_VAR) ENDIF()
ENDIF(_FS_FILENAME) ENDIF()
IF(_FS_VAR) IF(_FS_VAR)
SET(${_FS_VAR} "${_fullText}" PARENT_SCOPE) SET(${_FS_VAR} "${_fullText}" PARENT_SCOPE)
ENDIF(_FS_VAR) ENDIF()
IF(requiredPackagesNotFound AND _FS_FATAL_ON_MISSING_REQUIRED_PACKAGES)
MESSAGE(FATAL_ERROR "feature_summary() Error: REQUIRED package(s) are missing, aborting CMake run.")
ENDIF()
ENDFUNCTION(FEATURE_SUMMARY) ENDFUNCTION(FEATURE_SUMMARY)
# The stuff below is only kept for compatibility
FUNCTION(SET_PACKAGE_INFO _name _desc)
SET(_url "${ARGV2}")
SET(_purpose "${ARGV3}")
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
IF(_url MATCHES ".+")
SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_url}" )
ENDIF()
IF(_purpose MATCHES ".+")
SET_PROPERTY(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_purpose}" )
ENDIF()
ENDFUNCTION(SET_PACKAGE_INFO)
FUNCTION(SET_FEATURE_INFO)
SET_PACKAGE_INFO(${ARGN})
ENDFUNCTION(SET_FEATURE_INFO)
FUNCTION(PRINT_ENABLED_FEATURES)
FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
ENDFUNCTION(PRINT_ENABLED_FEATURES)
FUNCTION(PRINT_DISABLED_FEATURES)
FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
ENDFUNCTION(PRINT_DISABLED_FEATURES)

@ -2,6 +2,7 @@
# Once done this will define # Once done this will define
# #
# ASPELL_FOUND - system has ASPELL # ASPELL_FOUND - system has ASPELL
# ASPELL_EXECUTABLE - the ASPELL executable
# ASPELL_INCLUDE_DIR - the ASPELL include directory # ASPELL_INCLUDE_DIR - the ASPELL include directory
# ASPELL_LIBRARIES - The libraries needed to use ASPELL # ASPELL_LIBRARIES - The libraries needed to use ASPELL
# ASPELL_DEFINITIONS - Compiler switches required for using ASPELL # ASPELL_DEFINITIONS - Compiler switches required for using ASPELL
@ -22,11 +23,15 @@
FIND_PATH(ASPELL_INCLUDE_DIR aspell.h ) FIND_PATH(ASPELL_INCLUDE_DIR aspell.h )
FIND_PROGRAM(ASPELL_EXECUTABLE
NAMES aspell
)
FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell) FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell)
# handle the QUIETLY and REQUIRED arguments and set ASPELL_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set ASPELL_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL DEFAULT_MSG ASPELL_LIBRARIES ASPELL_INCLUDE_DIR) FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL DEFAULT_MSG ASPELL_LIBRARIES ASPELL_INCLUDE_DIR ASPELL_EXECUTABLE)
MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES) MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES ASPELL_EXECUTABLE)

@ -67,8 +67,17 @@ IF(BISON_EXECUTABLE)
IF(NOT ${BISON_version_result} EQUAL 0) IF(NOT ${BISON_version_result} EQUAL 0)
MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}") MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
ELSE() ELSE()
STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1" # Bison++
BISON_VERSION "${BISON_version_output}") IF("${BISON_version_output}" MATCHES "^bison\\+\\+")
STRING(REGEX REPLACE "^bison\\+\\+ Version ([^,]+).*" "\\1"
BISON_VERSION "${BISON_version_output}")
# GNU Bison
ELSEIF("${BISON_version_output}" MATCHES "^bison[^+]")
STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
BISON_VERSION "${BISON_version_output}")
ELSE()
SET(BISON_VERSION "unknown")
ENDIF()
ENDIF() ENDIF()
# internal macro # internal macro

@ -22,8 +22,8 @@
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK # BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
########## ##########
### List of vendors (BLA_VENDOR) valid in this module ### List of vendors (BLA_VENDOR) valid in this module
## ATLAS, PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model), ## Goto,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread model, lp64 model),
## Intel( older versions of mkl 32 and 64 bit), ACML,ACML_MP,Apple, NAS, Generic ## Intel( older versions of mkl 32 and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic
# C/CXX should be enabled to use Intel mkl # C/CXX should be enabled to use Intel mkl
#============================================================================= #=============================================================================
@ -42,6 +42,8 @@
include(CheckFunctionExists) include(CheckFunctionExists)
include(CheckFortranFunctionExists) include(CheckFortranFunctionExists)
set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
# Check the language being used # Check the language being used
get_property( _LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES ) get_property( _LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES )
if( _LANGUAGES_ MATCHES Fortran ) if( _LANGUAGES_ MATCHES Fortran )
@ -57,7 +59,7 @@ else()
endif(BLAS_FIND_REQUIRED) endif(BLAS_FIND_REQUIRED)
endif( ) endif( )
macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _threads) macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread)
# This macro checks for the existence of the combination of fortran libraries # This macro checks for the existence of the combination of fortran libraries
# given by _list. If the combination is found, this macro checks (using the # given by _list. If the combination is found, this macro checks (using the
# Check_Fortran_Function_Exists macro) whether can link against that library # Check_Fortran_Function_Exists macro) whether can link against that library
@ -69,41 +71,43 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _threads)
# N.B. _prefix is the prefix applied to the names of all cached variables that # N.B. _prefix is the prefix applied to the names of all cached variables that
# are generated internally and marked advanced by this macro. # are generated internally and marked advanced by this macro.
set(_libdir ${ARGN})
set(_libraries_work TRUE) set(_libraries_work TRUE)
set(${LIBRARIES}) set(${LIBRARIES})
set(_combined_name) set(_combined_name)
if (NOT _libdir)
if (WIN32)
set(_libdir ENV LIB)
elseif (APPLE)
set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH)
else ()
set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH)
endif ()
endif ()
foreach(_library ${_list}) foreach(_library ${_list})
set(_combined_name ${_combined_name}_${_library}) set(_combined_name ${_combined_name}_${_library})
if(_libraries_work) if(_libraries_work)
if ( WIN32 ) if (BLA_STATIC)
if(BLA_STATIC) if (WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll") set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif(BLA_STATIC) endif ( WIN32 )
find_library(${_prefix}_${_library}_LIBRARY if (APPLE)
NAMES ${_library} set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
PATHS ENV LIB else (APPLE)
) set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif ( WIN32 ) endif (APPLE)
else (BLA_STATIC)
if ( APPLE ) if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(BLA_STATIC) # for ubuntu's libblas3gf and liblapack3gf packages
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll") set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
endif(BLA_STATIC) endif ()
endif (BLA_STATIC)
find_library(${_prefix}_${_library}_LIBRARY find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library} NAMES ${_library}
PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH PATHS ${_libdir}
) )
else ( APPLE )
if(BLA_STATIC)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so")
endif(BLA_STATIC)
find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library}
PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
)
endif( APPLE )
mark_as_advanced(${_prefix}_${_library}_LIBRARY) mark_as_advanced(${_prefix}_${_library}_LIBRARY)
set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
@ -139,15 +143,29 @@ else ($ENV{BLA_VENDOR} MATCHES ".+")
endif(NOT BLA_VENDOR) endif(NOT BLA_VENDOR)
endif ($ENV{BLA_VENDOR} MATCHES ".+") endif ($ENV{BLA_VENDOR} MATCHES ".+")
if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
# gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"goto2"
""
)
endif(NOT BLAS_LIBRARIES)
endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES) if(NOT BLAS_LIBRARIES)
# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
check_fortran_libraries( check_fortran_libraries(
BLAS_LIBRARIES BLAS_LIBRARIES
BLAS BLAS
cblas_dgemm dgemm
"" ""
"cblas;f77blas;atlas" "f77blas;atlas"
"" ""
) )
endif(NOT BLAS_LIBRARIES) endif(NOT BLAS_LIBRARIES)
@ -255,15 +273,24 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
#BLAS in acml library? #BLAS in acml library?
if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "ACML_MP" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
# the patch from Chuck Atkins: if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR
if( ((_BLAS_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR ((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR
((_BLAS_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) ) ((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS))
)
# try to find acml in "standard" paths
if( WIN32 ) if( WIN32 )
file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" ) file( GLOB _ACML_ROOT "C:/AMD/acml*/ACML-EULA.txt" )
else() else()
file( GLOB _ACML_ROOT "/opt/acml*/ACML-EULA.txt" ) file( GLOB _ACML_ROOT "/opt/acml*/ACML-EULA.txt" )
endif() endif()
if( WIN32 )
file( GLOB _ACML_GPU_ROOT "C:/AMD/acml*/GPGPUexamples" )
else()
file( GLOB _ACML_GPU_ROOT "/opt/acml*/GPGPUexamples" )
endif()
list(GET _ACML_ROOT 0 _ACML_ROOT)
list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT)
if( _ACML_ROOT ) if( _ACML_ROOT )
get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH ) get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH )
if( SIZEOF_INTEGER EQUAL 8 ) if( SIZEOF_INTEGER EQUAL 8 )
@ -297,7 +324,7 @@ if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "ACML_MP" OR BLA_VENDOR ST
set( _ACML_COMPILER64 "gfortran64" ) set( _ACML_COMPILER64 "gfortran64" )
endif() endif()
if( _BLAS_VENDOR STREQUAL "ACML_MP" ) if( BLA_VENDOR STREQUAL "ACML_MP" )
set(_ACML_MP_LIB_DIRS set(_ACML_MP_LIB_DIRS
"${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib" "${_ACML_ROOT}/${_ACML_COMPILER32}_mp${_ACML_PATH_SUFFIX}/lib"
"${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" ) "${_ACML_ROOT}/${_ACML_COMPILER64}_mp${_ACML_PATH_SUFFIX}/lib" )
@ -307,19 +334,43 @@ if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "ACML_MP" OR BLA_VENDOR ST
"${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" ) "${_ACML_ROOT}/${_ACML_COMPILER64}${_ACML_PATH_SUFFIX}/lib" )
endif() endif()
endif() endif()
elseif(BLAS_${BLA_VENDOR}_LIB_DIRS)
set(_${BLA_VENDOR}_LIB_DIRS ${BLAS_${BLA_VENDOR}_LIB_DIRS})
endif() endif()
if( _BLAS_VENDOR STREQUAL "ACML_MP" ) if( BLA_VENDOR STREQUAL "ACML_MP" )
foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS} ) foreach( BLAS_ACML_MP_LIB_DIRS ${_ACML_MP_LIB_DIRS})
_BLAS_LOCATE_AND_TEST( ${_BLAS_VENDOR} "acml_mp;acml_mv" "" ) check_fortran_libraries (
if( BLAS_${_BLAS_VENDOR}_FOUND ) BLAS_LIBRARIES
BLAS
sgemm
"" "acml_mp;acml_mv" "" ${BLAS_ACML_MP_LIB_DIRS}
)
if( BLAS_LIBRARIES )
break()
endif()
endforeach()
elseif( BLA_VENDOR STREQUAL "ACML_GPU" )
foreach( BLAS_ACML_GPU_LIB_DIRS ${_ACML_GPU_LIB_DIRS})
check_fortran_libraries (
BLAS_LIBRARIES
BLAS
sgemm
"" "acml;acml_mv;CALBLAS" "" ${BLAS_ACML_GPU_LIB_DIRS}
)
if( BLAS_LIBRARIES )
break() break()
endif() endif()
endforeach() endforeach()
else() #if( _BLAS_VENDOR STREQUAL "ACML" ) else() #if( _BLAS_VENDOR STREQUAL "ACML" )
foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} ) foreach( BLAS_ACML_LIB_DIRS ${_ACML_LIB_DIRS} )
_BLAS_LOCATE_AND_TEST( ${_BLAS_VENDOR} "acml;acml_mv" "" ) check_fortran_libraries (
if( BLAS_${_BLAS_VENDOR}_FOUND ) BLAS_LIBRARIES
BLAS
sgemm
"" "acml;acml_mv" "" ${BLAS_ACML_LIB_DIRS}
)
if( BLAS_LIBRARIES )
break() break()
endif() endif()
endforeach() endforeach()
@ -346,6 +397,16 @@ if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "ACML_MP" OR BLA_VENDOR ST
"" ""
) )
endif(NOT BLAS_LIBRARIES) endif(NOT BLAS_LIBRARIES)
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
"acml;acml_mv;CALBLAS"
""
)
endif(NOT BLAS_LIBRARIES)
endif () # ACML endif () # ACML
# Apple BLAS library? # Apple BLAS library?
@ -354,7 +415,7 @@ if(NOT BLAS_LIBRARIES)
check_fortran_libraries( check_fortran_libraries(
BLAS_LIBRARIES BLAS_LIBRARIES
BLAS BLAS
cblas_dgemm dgemm
"" ""
"Accelerate" "Accelerate"
"" ""
@ -367,7 +428,7 @@ if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
check_fortran_libraries( check_fortran_libraries(
BLAS_LIBRARIES BLAS_LIBRARIES
BLAS BLAS
cblas_dgemm dgemm
"" ""
"vecLib" "vecLib"
"" ""
@ -559,3 +620,5 @@ else(BLA_F95)
endif(BLAS_FOUND) endif(BLAS_FOUND)
endif(NOT BLAS_FIND_QUIETLY) endif(NOT BLAS_FIND_QUIETLY)
endif(BLA_F95) endif(BLA_F95)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})

@ -65,7 +65,7 @@
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, # 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1,
# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0, # 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0,
# 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0, # 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0,
# 1.45, 1.45.0, 1.46, 1.46.0, 1.46.1 # 1.45, 1.45.0, 1.46, 1.46.0, 1.46.1, 1.47, 1.47.0, 1.48, 1.48.0
# #
# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should # NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should
# add both 1.x and 1.x.0 as shown above. Official Boost include directories # add both 1.x and 1.x.0 as shown above. Official Boost include directories
@ -92,6 +92,12 @@
# BOOST_ROOT. Defaults to OFF. # BOOST_ROOT. Defaults to OFF.
# [Since CMake 2.8.3] # [Since CMake 2.8.3]
# #
# Boost_NO_BOOST_CMAKE Do not do a find_package call in config mode
# before searching for a regular boost install.
# This will avoid finding boost-cmake installs.
# Defaults to OFF.
# [Since CMake 2.8.6]
#
# Boost_USE_STATIC_RUNTIME If enabled, searches for boost libraries # Boost_USE_STATIC_RUNTIME If enabled, searches for boost libraries
# linked against a static C++ standard library # linked against a static C++ standard library
# ('s' ABI tag). This option should be set to # ('s' ABI tag). This option should be set to
@ -164,13 +170,27 @@
# #
# These last three variables are available also as environment variables: # These last three variables are available also as environment variables:
# Also, note they are completely UPPERCASE. # Also, note they are completely UPPERCASE, except Boost_DIR.
#
# Boost_DIR or The preferred installation prefix for searching for
# BOOST_ROOT or BOOSTROOT Boost. Set this if the module has problems finding
# the proper Boost installation.
# #
# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for # Note that Boost_DIR behaves exactly as <package>_DIR
# Boost. Set this if the module has problems finding # variables are documented to behave in find_package's
# the proper Boost installation. To prevent falling # Config mode. That is, if it is set as a -D argument
# back on the system paths, set Boost_NO_SYSTEM_PATHS # to CMake, it must point to the location of the
# to true. # BoostConfig.cmake or Boost-config.cmake file. If it
# is set as an environment variable, it must point to
# the root of the boost installation. BOOST_ROOT and
# BOOSTROOT, on the other hand, will point to the root
# in either case.
#
# To prevent falling back on the system paths, set
# Boost_NO_SYSTEM_PATHS to true.
#
# To avoid finding boost-cmake installations, set
# Boost_NO_BOOST_CMAKE to true.
# #
# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the # BOOST_INCLUDEDIR Set this to the include directory of Boost, if the
# module has problems finding the proper Boost installation # module has problems finding the proper Boost installation
@ -237,6 +257,43 @@
# (To distribute this file outside of CMake, substitute the full # (To distribute this file outside of CMake, substitute the full
# License text for the above reference.) # License text for the above reference.)
#-------------------------------------------------------------------------------
# Before we go searching, check whether boost-cmake is avaialble, unless the
# user specifically asked NOT to search for boost-cmake.
#
# If Boost_DIR is set, this behaves as any find_package call would. If not,
# it looks at BOOST_ROOT and BOOSTROOT to find Boost.
#
if (NOT Boost_NO_BOOST_CMAKE)
# If Boost_DIR is not set, look for BOOSTROOT and BOOST_ROOT as alternatives,
# since these are more conventional for Boost.
if ("$ENV{Boost_DIR}" STREQUAL "")
if (NOT "$ENV{BOOST_ROOT}" STREQUAL "")
set(ENV{Boost_DIR} $ENV{BOOST_ROOT})
elseif (NOT "$ENV{BOOSTROOT}" STREQUAL "")
set(ENV{Boost_DIR} $ENV{BOOSTROOT})
endif()
endif()
# Do the same find_package call but look specifically for the CMake version.
# Note that args are passed in the Boost_FIND_xxxxx variables, so there is no
# need to delegate them to this find_package call.
find_package(Boost QUIET NO_MODULE)
# If we found boost-cmake, then we're done. Print out what we found.
# Otherwise let the rest of the module try to find it.
if (Boost_FOUND)
message("Boost ${Boost_FIND_VERSION} found.")
if (Boost_FIND_COMPONENTS)
message("Found Boost components:")
message(" ${Boost_FIND_COMPONENTS}")
endif()
return()
endif()
endif()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# FindBoost functions & macros # FindBoost functions & macros
# #
@ -348,7 +405,7 @@ endfunction()
# #
function(_Boost_PREPEND_LIST_WITH_THREADAPI _output) function(_Boost_PREPEND_LIST_WITH_THREADAPI _output)
set(_orig_libnames ${ARGN}) set(_orig_libnames ${ARGN})
string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames ${_orig_libnames}) string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames "${_orig_libnames}")
set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE) set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE)
endfunction() endfunction()
@ -392,7 +449,7 @@ else(Boost_FIND_VERSION_EXACT)
# The user has not requested an exact version. Among known # The user has not requested an exact version. Among known
# versions, find those that are acceptable to the user request. # versions, find those that are acceptable to the user request.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
"1.46.1" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1"
"1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42" "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42"
"1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37"
"1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
@ -516,6 +573,11 @@ else(_boost_IN_CACHE)
_Boost_CHECK_SPELLING(Boost_LIBRARYDIR) _Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
_Boost_CHECK_SPELLING(Boost_INCLUDEDIR) _Boost_CHECK_SPELLING(Boost_INCLUDEDIR)
# If BOOST_ROOT was defined in the environment, use it.
if (NOT BOOST_ROOT AND NOT $ENV{Boost_DIR} STREQUAL "")
set(BOOST_ROOT $ENV{Boost_DIR})
endif()
# If BOOST_ROOT was defined in the environment, use it. # If BOOST_ROOT was defined in the environment, use it.
if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
set(BOOST_ROOT $ENV{BOOST_ROOT}) set(BOOST_ROOT $ENV{BOOST_ROOT})
@ -688,10 +750,12 @@ else(_boost_IN_CACHE)
else() else()
set (_boost_COMPILER "-il") set (_boost_COMPILER "-il")
endif() endif()
elseif (MSVC90) elseif (MSVC11)
set(_boost_COMPILER "-vc90") set(_boost_COMPILER "-vc110")
elseif (MSVC10) elseif (MSVC10)
set(_boost_COMPILER "-vc100") set(_boost_COMPILER "-vc100")
elseif (MSVC90)
set(_boost_COMPILER "-vc90")
elseif (MSVC80) elseif (MSVC80)
set(_boost_COMPILER "-vc80") set(_boost_COMPILER "-vc80")
elseif (MSVC71) elseif (MSVC71)

@ -59,13 +59,13 @@ find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h
# Find the libraries # Find the libraries
_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics) _FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics)
_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_d) _FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_Debug BulletDynamics_d)
_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision) _FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision)
_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_d) _FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_Debug BulletCollision_d)
_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY LinearMath BulletMath) _FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY BulletMath LinearMath)
_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG LinearMath_d BulletMath_d) _FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_d)
_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody) _FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody)
_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_d) _FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d)
# handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if

@ -266,17 +266,17 @@ macro(CUDA_FIND_HELPER_FILE _name _extension)
# processed. Using this variable, we can pull out the current path, and # processed. Using this variable, we can pull out the current path, and
# provide a way to get access to the other files we need local to here. # provide a way to get access to the other files we need local to here.
get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
find_file(CUDA_${_name} ${_full_name} PATHS ${CMAKE_CURRENT_LIST_DIR}/FindCUDA NO_DEFAULT_PATH) set(CUDA_${_name} "${CMAKE_CURRENT_LIST_DIR}/FindCUDA/${_full_name}")
if(NOT CUDA_${_name}) if(NOT EXISTS "${CUDA_${_name}}")
set(error_message "${_full_name} not found in CMAKE_MODULE_PATH") set(error_message "${_full_name} not found in ${CMAKE_CURRENT_LIST_DIR}/FindCUDA")
if(CUDA_FIND_REQUIRED) if(CUDA_FIND_REQUIRED)
message(FATAL_ERROR "${error_message}") message(FATAL_ERROR "${error_message}")
else(CUDA_FIND_REQUIRED) else()
if(NOT CUDA_FIND_QUIETLY) if(NOT CUDA_FIND_QUIETLY)
message(STATUS "${error_message}") message(STATUS "${error_message}")
endif(NOT CUDA_FIND_QUIETLY) endif()
endif(CUDA_FIND_REQUIRED) endif()
endif(NOT CUDA_${_name}) endif()
# Set this variable as internal, so the user isn't bugged with it. # Set this variable as internal, so the user isn't bugged with it.
set(CUDA_${_name} ${CUDA_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE) set(CUDA_${_name} ${CUDA_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE)
endmacro(CUDA_FIND_HELPER_FILE) endmacro(CUDA_FIND_HELPER_FILE)
@ -320,9 +320,9 @@ macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file)
# message("CUDA_NVCC_DEPEND NOT set") # message("CUDA_NVCC_DEPEND NOT set")
# endif() # endif()
if(CUDA_NVCC_DEPEND) if(CUDA_NVCC_DEPEND)
#message("CUDA_NVCC_DEPEND true") #message("CUDA_NVCC_DEPEND found")
foreach(f ${CUDA_NVCC_DEPEND}) foreach(f ${CUDA_NVCC_DEPEND})
#message("searching for ${f}") # message("searching for ${f}")
if(NOT EXISTS ${f}) if(NOT EXISTS ${f})
#message("file ${f} not found") #message("file ${f} not found")
set(CUDA_NVCC_DEPEND_REGENERATE TRUE) set(CUDA_NVCC_DEPEND_REGENERATE TRUE)
@ -339,6 +339,8 @@ macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file)
# output depend on the dependency file itself, which should cause the # output depend on the dependency file itself, which should cause the
# rule to re-run. # rule to re-run.
if(CUDA_NVCC_DEPEND_REGENERATE) if(CUDA_NVCC_DEPEND_REGENERATE)
set(CUDA_NVCC_DEPEND ${dependency_file})
#message("Generating an empty dependency_file: ${dependency_file}")
file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n") file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n")
endif(CUDA_NVCC_DEPEND_REGENERATE) endif(CUDA_NVCC_DEPEND_REGENERATE)
@ -415,13 +417,14 @@ endforeach()
# if they have then clear the cache variables, so that will be detected again. # if they have then clear the cache variables, so that will be detected again.
if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}") if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
unset(CUDA_NVCC_EXECUTABLE CACHE) unset(CUDA_NVCC_EXECUTABLE CACHE)
unset(CUDA_VERSION CACHE)
unset(CUDA_TOOLKIT_INCLUDE CACHE) unset(CUDA_TOOLKIT_INCLUDE CACHE)
unset(CUDA_CUDART_LIBRARY CACHE) unset(CUDA_CUDART_LIBRARY CACHE)
# Make sure you run this before you unset CUDA_VERSION.
if(CUDA_VERSION VERSION_EQUAL "3.0") if(CUDA_VERSION VERSION_EQUAL "3.0")
# This only existed in the 3.0 version of the CUDA toolkit # This only existed in the 3.0 version of the CUDA toolkit
unset(CUDA_CUDARTEMU_LIBRARY CACHE) unset(CUDA_CUDARTEMU_LIBRARY CACHE)
endif() endif()
unset(CUDA_VERSION CACHE)
unset(CUDA_CUDA_LIBRARY CACHE) unset(CUDA_CUDA_LIBRARY CACHE)
unset(CUDA_cublas_LIBRARY CACHE) unset(CUDA_cublas_LIBRARY CACHE)
unset(CUDA_cublasemu_LIBRARY CACHE) unset(CUDA_cublasemu_LIBRARY CACHE)
@ -443,7 +446,10 @@ if(NOT CUDA_TOOLKIT_ROOT_DIR)
# Search in the CUDA_BIN_PATH first. # Search in the CUDA_BIN_PATH first.
find_path(CUDA_TOOLKIT_ROOT_DIR find_path(CUDA_TOOLKIT_ROOT_DIR
NAMES nvcc nvcc.exe NAMES nvcc nvcc.exe
PATHS ENV CUDA_BIN_PATH PATHS
ENV CUDA_PATH
ENV CUDA_BIN_PATH
PATH_SUFFIXES bin bin64
DOC "Toolkit location." DOC "Toolkit location."
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
@ -472,9 +478,10 @@ endif (NOT CUDA_TOOLKIT_ROOT_DIR)
# CUDA_NVCC_EXECUTABLE # CUDA_NVCC_EXECUTABLE
find_program(CUDA_NVCC_EXECUTABLE find_program(CUDA_NVCC_EXECUTABLE
NAMES nvcc NAMES nvcc
PATHS "${CUDA_TOOLKIT_ROOT_DIR}/bin" PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
"${CUDA_TOOLKIT_ROOT_DIR}/bin64" ENV CUDA_PATH
ENV CUDA_BIN_PATH ENV CUDA_BIN_PATH
PATH_SUFFIXES bin bin64
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
# Search default search paths, after we search our own set of paths. # Search default search paths, after we search our own set of paths.
@ -500,8 +507,10 @@ set(CUDA_VERSION_STRING "${CUDA_VERSION}")
# CUDA_TOOLKIT_INCLUDE # CUDA_TOOLKIT_INCLUDE
find_path(CUDA_TOOLKIT_INCLUDE find_path(CUDA_TOOLKIT_INCLUDE
device_functions.h # Header included in toolkit device_functions.h # Header included in toolkit
PATHS "${CUDA_TOOLKIT_ROOT_DIR}/include" PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
ENV CUDA_PATH
ENV CUDA_INC_PATH ENV CUDA_INC_PATH
PATH_SUFFIXES include
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
# Search default search paths, after we search our own set of paths. # Search default search paths, after we search our own set of paths.
@ -516,19 +525,16 @@ macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
if(CMAKE_SIZEOF_VOID_P EQUAL 8) if(CMAKE_SIZEOF_VOID_P EQUAL 8)
# CUDA 3.2+ on Windows moved the library directoryies, so we need the new # CUDA 3.2+ on Windows moved the library directoryies, so we need the new
# and old paths. # and old paths.
set(_cuda_64bit_lib_dir set(_cuda_64bit_lib_dir "lib/x64" "lib64" )
"${CUDA_TOOLKIT_ROOT_DIR}/lib/x64"
"${CUDA_TOOLKIT_ROOT_DIR}/lib64"
)
endif() endif()
# CUDA 3.2+ on Windows moved the library directories, so we need to new # CUDA 3.2+ on Windows moved the library directories, so we need to new
# (lib/Win32) and the old path (lib). # (lib/Win32) and the old path (lib).
find_library(${_var} find_library(${_var}
NAMES ${_names} NAMES ${_names}
PATHS ${_cuda_64bit_lib_dir} PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
"${CUDA_TOOLKIT_ROOT_DIR}/lib/Win32" ENV CUDA_PATH
"${CUDA_TOOLKIT_ROOT_DIR}/lib"
ENV CUDA_LIB_PATH ENV CUDA_LIB_PATH
PATH_SUFFIXES ${_cuda_64bit_lib_dir} "lib/Win32" "lib"
DOC ${_doc} DOC ${_doc}
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
@ -707,7 +713,7 @@ find_package_handle_standard_args(CUDA
# Add include directories to pass to the nvcc command. # Add include directories to pass to the nvcc command.
macro(CUDA_INCLUDE_DIRECTORIES) macro(CUDA_INCLUDE_DIRECTORIES)
foreach(dir ${ARGN}) foreach(dir ${ARGN})
list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER "-I${dir}") list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER -I${dir})
endforeach(dir ${ARGN}) endforeach(dir ${ARGN})
endmacro(CUDA_INCLUDE_DIRECTORIES) endmacro(CUDA_INCLUDE_DIRECTORIES)
@ -736,13 +742,13 @@ macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options)
arg STREQUAL "SHARED" OR arg STREQUAL "SHARED" OR
arg STREQUAL "MODULE" arg STREQUAL "MODULE"
) )
list(APPEND ${_cmake_options} "${arg}") list(APPEND ${_cmake_options} ${arg})
else() else()
if ( _found_options ) if ( _found_options )
list(APPEND ${_options} "${arg}") list(APPEND ${_options} ${arg})
else() else()
# Assume this is a file # Assume this is a file
list(APPEND ${_sources} "${arg}") list(APPEND ${_sources} ${arg})
endif() endif()
endif() endif()
endforeach() endforeach()
@ -808,6 +814,43 @@ function(CUDA_BUILD_SHARED_LIBRARY shared_flag)
set(${shared_flag} ${_cuda_build_shared_libs} PARENT_SCOPE) set(${shared_flag} ${_cuda_build_shared_libs} PARENT_SCOPE)
endfunction() endfunction()
##############################################################################
# Helper to avoid clashes of files with the same basename but different paths.
# This doesn't attempt to do exactly what CMake internals do, which is to only
# add this path when there is a conflict, since by the time a second collision
# in names is detected it's already too late to fix the first one. For
# consistency sake the relative path will be added to all files.
function(CUDA_COMPUTE_BUILD_PATH path build_path)
#message("CUDA_COMPUTE_BUILD_PATH([${path}] ${build_path})")
# Only deal with CMake style paths from here on out
file(TO_CMAKE_PATH "${path}" bpath)
if (IS_ABSOLUTE "${bpath}")
# Absolute paths are generally unnessary, especially if something like
# FILE(GLOB_RECURSE) is used to pick up the files.
file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}")
endif()
# This recipie is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the
# CMake source.
# Remove leading /
string(REGEX REPLACE "^[/]+" "" bpath "${bpath}")
# Avoid absolute paths by removing ':'
string(REPLACE ":" "_" bpath "${bpath}")
# Avoid relative paths that go up the tree
string(REPLACE "../" "__/" bpath "${bpath}")
# Avoid spaces
string(REPLACE " " "_" bpath "${bpath}")
# Strip off the filename. I wait until here to do it, since removin the
# basename can make a path that looked like path/../basename turn into
# path/.. (notice the trailing slash).
get_filename_component(bpath "${bpath}" PATH)
set(${build_path} "${bpath}" PARENT_SCOPE)
#message("${build_path} = ${bpath}")
endfunction()
############################################################################## ##############################################################################
# This helper macro populates the following variables and setups up custom # This helper macro populates the following variables and setups up custom
# commands and targets to invoke the nvcc compiler to generate C or PTX source # commands and targets to invoke the nvcc compiler to generate C or PTX source
@ -890,7 +933,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES) get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
if(CUDA_NVCC_INCLUDE_DIRECTORIES) if(CUDA_NVCC_INCLUDE_DIRECTORIES)
foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES}) foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES})
list(APPEND CUDA_NVCC_INCLUDE_ARGS "-I${dir}") list(APPEND CUDA_NVCC_INCLUDE_ARGS -I${dir})
endforeach() endforeach()
endif() endif()
@ -956,7 +999,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Note that if we ever want CUDA_NVCC_FLAGS_<CONFIG> to be string (instead of a list # Note that if we ever want CUDA_NVCC_FLAGS_<CONFIG> to be string (instead of a list
# like it is currently), we can remove the quotes around the # like it is currently), we can remove the quotes around the
# ${CUDA_NVCC_FLAGS_${config_upper}} variable like the CMAKE_HOST_FLAGS_<CONFIG> variable. # ${CUDA_NVCC_FLAGS_${config_upper}} variable like the CMAKE_HOST_FLAGS_<CONFIG> variable.
set(CUDA_NVCC_FLAGS_CONFIG "${CUDA_NVCC_FLAGS_CONFIG}\nset(CUDA_NVCC_FLAGS_${config_upper} \"${CUDA_NVCC_FLAGS_${config_upper}};;${CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}}\")") set(CUDA_NVCC_FLAGS_CONFIG "${CUDA_NVCC_FLAGS_CONFIG}\nset(CUDA_NVCC_FLAGS_${config_upper} ${CUDA_NVCC_FLAGS_${config_upper}} ;; ${CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}})")
endforeach() endforeach()
if(compile_to_ptx) if(compile_to_ptx)
@ -977,13 +1020,6 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS") list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS")
endif() endif()
# Determine output directory
if(CUDA_GENERATED_OUTPUT_DIR)
set(cuda_compile_output_dir "${CUDA_GENERATED_OUTPUT_DIR}")
else()
set(cuda_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}")
endif()
# Reset the output variable # Reset the output variable
set(_cuda_wrap_generated_files "") set(_cuda_wrap_generated_files "")
@ -994,6 +1030,19 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
get_source_file_property(_is_header ${file} HEADER_FILE_ONLY) get_source_file_property(_is_header ${file} HEADER_FILE_ONLY)
if(${file} MATCHES ".*\\.cu$" AND NOT _is_header) if(${file} MATCHES ".*\\.cu$" AND NOT _is_header)
# Determine output directory
cuda_compute_build_path("${file}" cuda_build_path)
set(cuda_compile_intermediate_directory "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${cuda_target}.dir/${cuda_build_path}")
if(CUDA_GENERATED_OUTPUT_DIR)
set(cuda_compile_output_dir "${CUDA_GENERATED_OUTPUT_DIR}")
else()
if ( compile_to_ptx )
set(cuda_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}")
else()
set(cuda_compile_output_dir "${cuda_compile_intermediate_directory}")
endif()
endif()
# Add a custom target to generate a c or ptx file. ###################### # Add a custom target to generate a c or ptx file. ######################
get_filename_component( basename ${file} NAME ) get_filename_component( basename ${file} NAME )
@ -1013,10 +1062,10 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# argument, so that the ${CMAKE_CFG_INTDIR} gets expanded at run time # argument, so that the ${CMAKE_CFG_INTDIR} gets expanded at run time
# instead of configure time. # instead of configure time.
set(generated_file "${generated_file_path}/${generated_file_basename}") set(generated_file "${generated_file_path}/${generated_file_basename}")
set(cmake_dependency_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${generated_file_basename}.depend") set(cmake_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.depend")
set(NVCC_generated_dependency_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${generated_file_basename}.NVCC-depend") set(NVCC_generated_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.NVCC-depend")
set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt") set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt")
set(custom_target_script "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${generated_file_basename}.cmake") set(custom_target_script "${cuda_compile_intermediate_directory}/${generated_file_basename}.cmake")
# Setup properties for obj files: # Setup properties for obj files:
if( NOT compile_to_ptx ) if( NOT compile_to_ptx )
@ -1096,6 +1145,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
-D "generated_file:STRING=${generated_file}" -D "generated_file:STRING=${generated_file}"
-D "generated_cubin_file:STRING=${generated_cubin_file}" -D "generated_cubin_file:STRING=${generated_cubin_file}"
-P "${custom_target_script}" -P "${custom_target_script}"
WORKING_DIRECTORY "${cuda_compile_intermediate_directory}"
COMMENT "${cuda_build_comment_string}" COMMENT "${cuda_build_comment_string}"
) )

@ -54,13 +54,27 @@ if (${depend_text} MATCHES ".+")
string(REGEX REPLACE "^ +" "" file ${file}) string(REGEX REPLACE "^ +" "" file ${file})
if(NOT IS_DIRECTORY ${file}) # OK, now if we had a UNC path, nvcc has a tendency to only output the first '/'
# instead of '//'. Here we will test to see if the file exists, if it doesn't then
# try to prepend another '/' to the path and test again. If it still fails remove the
# path.
if(NOT EXISTS "${file}")
if (EXISTS "/${file}")
set(file "/${file}")
else()
message(WARNING " Removing non-existant dependency file: ${file}")
set(file "")
endif()
endif()
if(NOT IS_DIRECTORY "${file}")
# If softlinks start to matter, we should change this to REALPATH. For now we need # If softlinks start to matter, we should change this to REALPATH. For now we need
# to flatten paths, because nvcc can generate stuff like /bin/../include instead of # to flatten paths, because nvcc can generate stuff like /bin/../include instead of
# just /include. # just /include.
get_filename_component(file_absolute "${file}" ABSOLUTE) get_filename_component(file_absolute "${file}" ABSOLUTE)
list(APPEND dependency_list "${file_absolute}") list(APPEND dependency_list "${file_absolute}")
endif(NOT IS_DIRECTORY ${file}) endif()
endforeach(file) endforeach(file)

@ -55,25 +55,25 @@ if(NOT generated_file)
endif() endif()
# Set these up as variables to make reading the generated file easier # Set these up as variables to make reading the generated file easier
set(CMAKE_COMMAND "@CMAKE_COMMAND@") set(CMAKE_COMMAND "@CMAKE_COMMAND@") # path
set(source_file "@source_file@") set(source_file "@source_file@") # path
set(NVCC_generated_dependency_file "@NVCC_generated_dependency_file@") set(NVCC_generated_dependency_file "@NVCC_generated_dependency_file@") # path
set(cmake_dependency_file "@cmake_dependency_file@") set(cmake_dependency_file "@cmake_dependency_file@") # path
set(CUDA_make2cmake "@CUDA_make2cmake@") set(CUDA_make2cmake "@CUDA_make2cmake@") # path
set(CUDA_parse_cubin "@CUDA_parse_cubin@") set(CUDA_parse_cubin "@CUDA_parse_cubin@") # path
set(build_cubin @build_cubin@) set(build_cubin @build_cubin@) # bool
# We won't actually use these variables for now, but we need to set this, in # We won't actually use these variables for now, but we need to set this, in
# order to force this file to be run again if it changes. # order to force this file to be run again if it changes.
set(generated_file_path "@generated_file_path@") set(generated_file_path "@generated_file_path@") # path
set(generated_file_internal "@generated_file@") set(generated_file_internal "@generated_file@") # path
set(generated_cubin_file_internal "@generated_cubin_file@") set(generated_cubin_file_internal "@generated_cubin_file@") # path
set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@") set(CUDA_NVCC_EXECUTABLE "@CUDA_NVCC_EXECUTABLE@") # path
set(CUDA_NVCC_FLAGS "@CUDA_NVCC_FLAGS@;;@CUDA_WRAP_OPTION_NVCC_FLAGS@") set(CUDA_NVCC_FLAGS @CUDA_NVCC_FLAGS@ ;; @CUDA_WRAP_OPTION_NVCC_FLAGS@) # list
@CUDA_NVCC_FLAGS_CONFIG@ @CUDA_NVCC_FLAGS_CONFIG@
set(nvcc_flags "@nvcc_flags@") set(nvcc_flags @nvcc_flags@) # list
set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@") set(CUDA_NVCC_INCLUDE_ARGS "@CUDA_NVCC_INCLUDE_ARGS@") # list (needs to be in quotes to handle spaces properly).
set(format_flag "@format_flag@") set(format_flag "@format_flag@") # string
if(build_cubin AND NOT generated_cubin_file) if(build_cubin AND NOT generated_cubin_file)
message(FATAL_ERROR "You must specify generated_cubin_file on the command line") message(FATAL_ERROR "You must specify generated_cubin_file on the command line")

@ -108,8 +108,10 @@ foreach(dir
PATHS PATHS
${DCMTK_DIR}/${dir}/include ${DCMTK_DIR}/${dir}/include
${DCMTK_DIR}/${dir} ${DCMTK_DIR}/${dir}
${DCMTK_DIR}/include/${dir}) ${DCMTK_DIR}/include/${dir}
${DCMTK_DIR}/include/dcmtk/${dir}
${DCMTK_DIR}/${dir}/include/dcmtk/${dir}
)
mark_as_advanced(DCMTK_${dir}_INCLUDE_DIR) mark_as_advanced(DCMTK_${dir}_INCLUDE_DIR)
if(DCMTK_${dir}_INCLUDE_DIR) if(DCMTK_${dir}_INCLUDE_DIR)

@ -5,6 +5,7 @@
# FLEX_EXECUTABLE - the path to the flex executable # FLEX_EXECUTABLE - the path to the flex executable
# FLEX_VERSION - the version of flex # FLEX_VERSION - the version of flex
# FLEX_LIBRARIES - The flex libraries # FLEX_LIBRARIES - The flex libraries
# FLEX_INCLUDE_DIRS - The path to the flex headers
# #
# The minimum required version of flex can be specified using the # The minimum required version of flex can be specified using the
# standard syntax, e.g. FIND_PACKAGE(FLEX 2.5.13) # standard syntax, e.g. FIND_PACKAGE(FLEX 2.5.13)
@ -66,8 +67,14 @@ FIND_PROGRAM(FLEX_EXECUTABLE flex DOC "path to the flex executable")
MARK_AS_ADVANCED(FLEX_EXECUTABLE) MARK_AS_ADVANCED(FLEX_EXECUTABLE)
FIND_LIBRARY(FL_LIBRARY NAMES fl FIND_LIBRARY(FL_LIBRARY NAMES fl
DOC "path to the fl library") DOC "Path to the fl library")
MARK_AS_ADVANCED(FL_LIBRARY)
FIND_PATH(FLEX_INCLUDE_DIR FlexLexer.h
DOC "Path to the flex headers")
MARK_AS_ADVANCED(FL_LIBRARY FLEX_INCLUDE_DIR)
SET(FLEX_INCLUDE_DIRS ${FLEX_INCLUDE_DIR})
SET(FLEX_LIBRARIES ${FL_LIBRARY}) SET(FLEX_LIBRARIES ${FL_LIBRARY})
IF(FLEX_EXECUTABLE) IF(FLEX_EXECUTABLE)

@ -44,13 +44,9 @@
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
HINTS HINTS
$ENV{FREETYPE_DIR} $ENV{FREETYPE_DIR}
PATH_SUFFIXES include
PATHS PATHS
/usr/local/X11R6/include /usr/local/X11R6/include
/usr/local/X11/include /usr/local/X11/include
/usr/X11/include
/sw/include
/opt/local/include
/usr/freeware/include /usr/freeware/include
) )
@ -60,9 +56,6 @@ FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
PATHS PATHS
/usr/local/X11R6/include /usr/local/X11R6/include
/usr/local/X11/include /usr/local/X11/include
/usr/X11/include
/sw/include
/opt/local/include
/usr/freeware/include /usr/freeware/include
PATH_SUFFIXES freetype2 PATH_SUFFIXES freetype2
) )
@ -75,8 +68,6 @@ FIND_LIBRARY(FREETYPE_LIBRARY
PATHS PATHS
/usr/local/X11R6 /usr/local/X11R6
/usr/local/X11 /usr/local/X11
/usr/X11
/sw
/usr/freeware /usr/freeware
) )

@ -1,7 +1,11 @@
# This module defines # This module searches giflib and defines
# GIF_LIBRARIES - libraries to link to in order to use GIF # GIF_LIBRARIES - libraries to link to in order to use GIF
# GIF_FOUND, if false, do not try to link # GIF_FOUND, if false, do not try to link
# GIF_INCLUDE_DIR, where to find the headers # GIF_INCLUDE_DIR, where to find the headers
# GIF_VERSION, reports either version 4 or 3 (for everything before version 4)
#
# The minimum required version of giflib can be specified using the
# standard syntax, e.g. FIND_PACKAGE(GIF 4)
# #
# $GIF_DIR is an environment variable that would # $GIF_DIR is an environment variable that would
# correspond to the ./configure --prefix=$GIF_DIR # correspond to the ./configure --prefix=$GIF_DIR
@ -28,14 +32,11 @@ FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
PATH_SUFFIXES include PATH_SUFFIXES include
PATHS PATHS
~/Library/Frameworks ~/Library/Frameworks
/Library/Frameworks /usr/freeware
/sw/include # Fink
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
/usr/freeware/include
) )
# the gif library can have many names :-/ # the gif library can have many names :-/
SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib) SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib giflib4)
FIND_LIBRARY(GIF_LIBRARY FIND_LIBRARY(GIF_LIBRARY
NAMES ${POTENTIAL_GIF_LIBS} NAMES ${POTENTIAL_GIF_LIBS}
@ -44,23 +45,36 @@ FIND_LIBRARY(GIF_LIBRARY
PATH_SUFFIXES lib64 lib PATH_SUFFIXES lib64 lib
PATHS PATHS
~/Library/Frameworks ~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
/usr/freeware /usr/freeware
) )
# see readme.txt # see readme.txt
SET(GIF_LIBRARIES ${GIF_LIBRARY}) SET(GIF_LIBRARIES ${GIF_LIBRARY})
# Very basic version detection.
# The GIF_LIB_VERSION string in gif_lib.h seems to be unreliable, since it seems
# to be always " Version 2.0, " in versions 3.x of giflib.
# In version 4 the member UserData was added to GifFileType, so we check for this
# one.
# http://giflib.sourcearchive.com/documentation/4.1.4/files.html
IF(GIF_INCLUDE_DIR)
INCLUDE(CMakePushCheckState)
INCLUDE(CheckStructHasMember)
CMAKE_PUSH_CHECK_STATE()
SET(GIF_VERSION 3)
SET(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}")
CHECK_STRUCT_HAS_MEMBER(GifFileType UserData gif_lib.h GIF_GifFileType_UserData )
IF(GIF_GifFileType_UserData)
SET(GIF_VERSION 4)
ENDIF()
CMAKE_POP_CHECK_STATE()
ENDIF()
# handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF DEFAULT_MSG GIF_LIBRARY GIF_INCLUDE_DIR) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF REQUIRED_VARS GIF_LIBRARY GIF_INCLUDE_DIR
VERSION_VAR GIF_VERSION )
MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY) MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY)

@ -11,9 +11,22 @@
# given input po files into the binary output mo file. If the # given input po files into the binary output mo file. If the
# ALL option is used, the translations will also be created when # ALL option is used, the translations will also be created when
# building the default target. # building the default target.
# GETTEXT_PROCESS_POT( <potfile> [ALL] [INSTALL_DESTINATION <destdir>] LANGUAGES <lang1> <lang2> ... )
# Process the given pot file to mo files.
# If INSTALL_DESTINATION is given then automatically install rules will be created,
# the language subdirectory will be taken into account (by default use share/locale/).
# If ALL is specified, the pot file is processed when building the all traget.
# It creates a custom target "potfile".
# GETTEXT_PROCESS_PO_FILES( <lang> [ALL] [INSTALL_DESTINATION <dir>] PO_FILES <po1> <po2> ... )
# Process the given po files to mo files for the given language.
# If INSTALL_DESTINATION is given then automatically install rules will be created,
# the language subdirectory will be taken into account (by default use share/locale/).
# If ALL is specified, the po files are processed when building the all traget.
# It creates a custom target "pofiles".
#============================================================================= #=============================================================================
# Copyright 2007-2009 Kitware, Inc. # Copyright 2007-2009 Kitware, Inc.
# Copyright 2007 Alexander Neundorf <neundorf@kde.org>
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -29,12 +42,18 @@ FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt) FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gettext REQUIRED_VARS GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE)
INCLUDE(CMakeParseArguments)
MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg) MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
# make it a real variable, so we can modify it here # make it a real variable, so we can modify it here
SET(_firstPoFile "${_firstPoFileArg}") SET(_firstPoFile "${_firstPoFileArg}")
SET(_gmoFiles) SET(_gmoFiles)
GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE) GET_FILENAME_COMPONENT(_potName ${_potFile} NAME)
STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE) GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE)
SET(_addToAll) SET(_addToAll)
@ -65,6 +84,80 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
ENDMACRO(GETTEXT_CREATE_TRANSLATIONS ) ENDMACRO(GETTEXT_CREATE_TRANSLATIONS )
FUNCTION(GETTEXT_PROCESS_POT_FILE _potFile)
SET(_gmoFiles)
SET(_options ALL)
SET(_oneValueArgs INSTALL_DESTINATION)
SET(_multiValueArgs LANGUAGES)
CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
GET_FILENAME_COMPONENT(_potName ${_potFile} NAME)
STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE)
FOREACH (_lang ${_parsedArguments_LANGUAGES})
SET(_poFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.po")
SET(_gmoFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo")
ADD_CUSTOM_COMMAND(
OUTPUT "${_poFile}"
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_poFile} ${_absPotFile}
DEPENDS ${_absPotFile}
)
ADD_CUSTOM_COMMAND(
OUTPUT "${_gmoFile}"
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_poFile}
DEPENDS ${_absPotFile} ${_poFile}
)
IF(_parsedArguments_INSTALL_DESTINATION)
INSTALL(FILES ${_gmoFile} DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
ENDIF(_parsedArguments_INSTALL_DESTINATION)
LIST(APPEND _gmoFiles ${_gmoFile})
ENDFOREACH (_lang )
IF(_parsedArguments_ALL)
ADD_CUSTOM_TARGET(potfiles ALL DEPENDS ${_gmoFiles})
ELSE(_parsedArguments_ALL)
ADD_CUSTOM_TARGET(potfiles DEPENDS ${_gmoFiles})
ENDIF(_parsedArguments_ALL)
ENDFUNCTION(GETTEXT_PROCESS_POT_FILE)
FUNCTION(GETTEXT_PROCESS_PO_FILES _lang)
SET(_options ALL)
SET(_oneValueArgs INSTALL_DESTINATION)
SET(_multiValueArgs PO_FILES)
SET(_gmoFiles)
CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
FOREACH(_current_PO_FILE ${_parsedArguments_PO_FILES})
GET_FILENAME_COMPONENT(_name ${_current_PO_FILE} NAME)
STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _basename ${_name})
SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
ADD_CUSTOM_COMMAND(OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${_current_PO_FILE}
)
IF(_parsedArguments_INSTALL_DESTINATION)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES/ RENAME ${_basename}.mo)
ENDIF(_parsedArguments_INSTALL_DESTINATION)
LIST(APPEND _gmoFiles ${_gmoFile})
ENDFOREACH(_current_PO_FILE)
IF(_parsedArguments_ALL)
ADD_CUSTOM_TARGET(pofiles ALL DEPENDS ${_gmoFiles})
ELSE(_parsedArguments_ALL)
ADD_CUSTOM_TARGET(pofiles DEPENDS ${_gmoFiles})
ENDIF(_parsedArguments_ALL)
ENDFUNCTION(GETTEXT_PROCESS_PO_FILES)
IF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE ) IF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
SET(GETTEXT_FOUND TRUE) SET(GETTEXT_FOUND TRUE)
ELSE (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE ) ELSE (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
@ -73,6 +166,3 @@ ELSE (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
MESSAGE(FATAL_ERROR "GetText not found") MESSAGE(FATAL_ERROR "GetText not found")
ENDIF (GetText_REQUIRED) ENDIF (GetText_REQUIRED)
ENDIF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE ) ENDIF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )

@ -10,8 +10,8 @@
# are specified, then the find module will default to finding only the HDF5 C # are specified, then the find module will default to finding only the HDF5 C
# library. If one or more COMPONENTS are specified, the module will attempt to # library. If one or more COMPONENTS are specified, the module will attempt to
# find the language bindings for the specified components. The only valid # find the language bindings for the specified components. The only valid
# components are C, CXX, Fortran, and HL. If the COMPONENTS argument is not # components are C, CXX, Fortran, HL, and Fortran_HL. If the COMPONENTS
# given, the module will attempt to find only the C bindings. # argument is not given, the module will attempt to find only the C bindings.
# #
# On UNIX systems, this module will read the variable HDF5_USE_STATIC_LIBRARIES # On UNIX systems, this module will read the variable HDF5_USE_STATIC_LIBRARIES
# to determine whether or not to prefer a static link to a dynamic link for HDF5 # to determine whether or not to prefer a static link to a dynamic link for HDF5
@ -34,6 +34,8 @@
# HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings # HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings
# HDF5_Fortran_LIBRARIES - Required libraries for the HDF5 Fortran bindings # HDF5_Fortran_LIBRARIES - Required libraries for the HDF5 Fortran bindings
# HDF5_HL_LIBRARIES - Required libraries for the HDF5 high level API # HDF5_HL_LIBRARIES - Required libraries for the HDF5 high level API
# HDF5_Fortran_HL_LIBRARIES - Required libraries for the high level Fortran
# bindings.
# HDF5_LIBRARIES - Required libraries for all requested bindings # HDF5_LIBRARIES - Required libraries for all requested bindings
# HDF5_FOUND - true if HDF5 was found on the system # HDF5_FOUND - true if HDF5 was found on the system
# HDF5_LIBRARY_DIRS - the full set of library directories # HDF5_LIBRARY_DIRS - the full set of library directories
@ -67,6 +69,7 @@ set( HDF5_VALID_COMPONENTS
CXX CXX
Fortran Fortran
HL HL
Fortran_HL
) )
# Validate the list of find components. # Validate the list of find components.
@ -189,6 +192,7 @@ if( NOT HDF5_FOUND )
set( HDF5_CXX_TARGET hdf5_cpp ) set( HDF5_CXX_TARGET hdf5_cpp )
set( HDF5_HL_TARGET hdf5_hl ) set( HDF5_HL_TARGET hdf5_hl )
set( HDF5_Fortran_TARGET hdf5_fortran ) set( HDF5_Fortran_TARGET hdf5_fortran )
set( HDF5_Fortran_HL_TARGET hdf5_hl_fortran )
foreach( _component ${HDF5_LANGUAGE_BINDINGS} ) foreach( _component ${HDF5_LANGUAGE_BINDINGS} )
list( FIND HDF5_VALID_COMPONENTS ${_component} _component_location ) list( FIND HDF5_VALID_COMPONENTS ${_component} _component_location )
get_target_property( _comp_location ${HDF5_${_component}_TARGET} LOCATION ) get_target_property( _comp_location ${HDF5_${_component}_TARGET} LOCATION )
@ -211,7 +215,10 @@ if( NOT HDF5_FOUND )
set( HDF5_C_LIBRARY_NAMES_INIT hdf5 ) set( HDF5_C_LIBRARY_NAMES_INIT hdf5 )
set( HDF5_HL_LIBRARY_NAMES_INIT hdf5_hl ${HDF5_C_LIBRARY_NAMES_INIT} ) set( HDF5_HL_LIBRARY_NAMES_INIT hdf5_hl ${HDF5_C_LIBRARY_NAMES_INIT} )
set( HDF5_CXX_LIBRARY_NAMES_INIT hdf5_cpp ${HDF5_C_LIBRARY_NAMES_INIT} ) set( HDF5_CXX_LIBRARY_NAMES_INIT hdf5_cpp ${HDF5_C_LIBRARY_NAMES_INIT} )
set( HDF5_Fortran_LIBRARY_NAMES_INIT hdf5_fortran ${HDF5_C_LIBRARY_NAMES_INIT} ) set( HDF5_Fortran_LIBRARY_NAMES_INIT hdf5_fortran
${HDF5_C_LIBRARY_NAMES_INIT} )
set( HDF5_Fortran_HL_LIBRARY_NAMES_INIT hdf5hl_fortran
${HDF5_Fortran_LIBRARY_NAMES_INIT} )
foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} ) foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} )
if( HDF5_${LANGUAGE}_COMPILE_LINE ) if( HDF5_${LANGUAGE}_COMPILE_LINE )
@ -222,8 +229,8 @@ if( NOT HDF5_FOUND )
HDF5_${LANGUAGE}_LIBRARY_NAMES HDF5_${LANGUAGE}_LIBRARY_NAMES
) )
# take a guess that the includes may be in the 'include' sibling directory # take a guess that the includes may be in the 'include' sibling
# of a library directory. # directory of a library directory.
foreach( dir ${HDF5_${LANGUAGE}_LIBRARY_DIRS} ) foreach( dir ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
list( APPEND HDF5_${LANGUAGE}_INCLUDE_FLAGS ${dir}/../include ) list( APPEND HDF5_${LANGUAGE}_INCLUDE_FLAGS ${dir}/../include )
endforeach() endforeach()
@ -233,7 +240,7 @@ if( NOT HDF5_FOUND )
list( APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS} ) list( APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS} )
# find the HDF5 include directories # find the HDF5 include directories
if(${LANGUAGE} STREQUAL "Fortran") if(${LANGUAGE} MATCHES "Fortran.*")
set(HDF5_INCLUDE_FILENAME hdf5.mod) set(HDF5_INCLUDE_FILENAME hdf5.mod)
else() else()
set(HDF5_INCLUDE_FILENAME hdf5.h) set(HDF5_INCLUDE_FILENAME hdf5.h)

@ -5,6 +5,8 @@
# #
# Java_JAVA_EXECUTABLE = the full path to the Java runtime # Java_JAVA_EXECUTABLE = the full path to the Java runtime
# Java_JAVAC_EXECUTABLE = the full path to the Java compiler # Java_JAVAC_EXECUTABLE = the full path to the Java compiler
# Java_JAVAH_EXECUTABLE = the full path to the Java header generator
# Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator
# Java_JAR_EXECUTABLE = the full path to the Java archiver # Java_JAR_EXECUTABLE = the full path to the Java archiver
# Java_VERSION_STRING = Version of the package found (java version), eg. 1.6.0_12 # Java_VERSION_STRING = Version of the package found (java version), eg. 1.6.0_12
# Java_VERSION_MAJOR = The major version of the package found. # Java_VERSION_MAJOR = The major version of the package found.
@ -128,11 +130,6 @@ IF(Java_JAVA_EXECUTABLE)
else( ) else( )
set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}.${Java_VERSION_TWEAK}) set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}.${Java_VERSION_TWEAK})
endif( ) endif( )
# display info
#MESSAGE( STATUS "Java version ${Java_VERSION_STRING} configured successfully!" ) # keep me, used for debug
IF(NOT Java_FIND_QUIETLY)
MESSAGE( STATUS "Java version ${Java_VERSION} configured successfully!" )
ENDIF(NOT Java_FIND_QUIETLY)
ENDIF() ENDIF()
ENDIF(Java_JAVA_EXECUTABLE) ENDIF(Java_JAVA_EXECUTABLE)
@ -150,6 +147,18 @@ FIND_PROGRAM(Java_JAVAC_EXECUTABLE
PATHS ${_JAVA_PATHS} PATHS ${_JAVA_PATHS}
) )
FIND_PROGRAM(Java_JAVAH_EXECUTABLE
NAMES javah
HINTS ${_JAVA_HINTS}
PATHS ${_JAVA_PATHS}
)
FIND_PROGRAM(Java_JAVADOC_EXECUTABLE
NAMES javadoc
HINTS ${_JAVA_HINTS}
PATHS ${_JAVA_PATHS}
)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
if(Java_FIND_COMPONENTS) if(Java_FIND_COMPONENTS)
foreach(component ${Java_FIND_COMPONENTS}) foreach(component ${Java_FIND_COMPONENTS})
@ -162,6 +171,7 @@ if(Java_FIND_COMPONENTS)
elseif(component STREQUAL "Development") elseif(component STREQUAL "Development")
find_package_handle_standard_args(Java find_package_handle_standard_args(Java
REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE
Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE
VERSION_VAR Java_VERSION VERSION_VAR Java_VERSION
) )
else() else()
@ -173,6 +183,7 @@ else()
# Check for everything # Check for everything
find_package_handle_standard_args(Java find_package_handle_standard_args(Java
REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE
Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE
VERSION_VAR Java_VERSION VERSION_VAR Java_VERSION
) )
endif() endif()
@ -182,6 +193,8 @@ MARK_AS_ADVANCED(
Java_JAVA_EXECUTABLE Java_JAVA_EXECUTABLE
Java_JAR_EXECUTABLE Java_JAR_EXECUTABLE
Java_JAVAC_EXECUTABLE Java_JAVAC_EXECUTABLE
Java_JAVAH_EXECUTABLE
Java_JAVADOC_EXECUTABLE
) )
# LEGACY # LEGACY

@ -36,6 +36,8 @@
# (To distribute this file outside of CMake, substitute the full # (To distribute this file outside of CMake, substitute the full
# License text for the above reference.) # License text for the above reference.)
set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES) get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
if (NOT _LANGUAGES_ MATCHES Fortran) if (NOT _LANGUAGES_ MATCHES Fortran)
include(CheckFunctionExists) include(CheckFunctionExists)
@ -46,6 +48,8 @@ endif (NOT _LANGUAGES_ MATCHES Fortran)
set(LAPACK_FOUND FALSE) set(LAPACK_FOUND FALSE)
set(LAPACK95_FOUND FALSE) set(LAPACK95_FOUND FALSE)
# TODO: move this stuff to separate module
macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads) macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads)
# This macro checks for the existence of the combination of fortran libraries # This macro checks for the existence of the combination of fortran libraries
# given by _list. If the combination is found, this macro checks (using the # given by _list. If the combination is found, this macro checks (using the
@ -61,38 +65,38 @@ macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas _threads
set(_libraries_work TRUE) set(_libraries_work TRUE)
set(${LIBRARIES}) set(${LIBRARIES})
set(_combined_name) set(_combined_name)
if (NOT _libdir)
if (WIN32)
set(_libdir ENV LIB)
elseif (APPLE)
set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH)
else ()
set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH)
endif ()
endif ()
foreach(_library ${_list}) foreach(_library ${_list})
set(_combined_name ${_combined_name}_${_library}) set(_combined_name ${_combined_name}_${_library})
if(_libraries_work) if(_libraries_work)
IF (WIN32) if (BLA_STATIC)
if(BLA_STATIC) if (WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.dll") set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif(BLA_STATIC) endif ( WIN32 )
find_library(${_prefix}_${_library}_LIBRARY if (APPLE)
NAMES ${_library} set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
PATHS ENV LIB else (APPLE)
) set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ENDIF (WIN32) endif (APPLE)
else (BLA_STATIC)
if(APPLE) if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(BLA_STATIC) # for ubuntu's libblas3gf and liblapack3gf packages
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib") set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .so.3gf)
endif(BLA_STATIC) endif ()
endif (BLA_STATIC)
find_library(${_prefix}_${_library}_LIBRARY find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library} NAMES ${_library}
PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH PATHS ${_libdir}
) )
else(APPLE)
if(BLA_STATIC)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so")
endif(BLA_STATIC)
find_library(${_prefix}_${_library}_LIBRARY
NAMES ${_library}
PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH
)
endif(APPLE)
mark_as_advanced(${_prefix}_${_library}_LIBRARY) mark_as_advanced(${_prefix}_${_library}_LIBRARY)
set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY})
set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) set(_libraries_work ${${_prefix}_${_library}_LIBRARY})
@ -102,7 +106,7 @@ endforeach(_library ${_list})
if(_libraries_work) if(_libraries_work)
# Test this combination of libraries. # Test this combination of libraries.
if(UNIX AND BLA_STATIC) if(UNIX AND BLA_STATIC)
set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group ${${LIBRARIES}} ${_blas};-Wl,--end-group" ${_threads}) set(CMAKE_REQUIRED_LIBRARIES ${_flags} "-Wl,--start-group" ${${LIBRARIES}} ${_blas} "-Wl,--end-group" ${_threads})
else(UNIX AND BLA_STATIC) else(UNIX AND BLA_STATIC)
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads}) set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads})
endif(UNIX AND BLA_STATIC) endif(UNIX AND BLA_STATIC)
@ -119,7 +123,7 @@ if(_libraries_work)
endif(_libraries_work) endif(_libraries_work)
if(_libraries_work) if(_libraries_work)
set(${LIBRARIES} ${${LIBRARIES}} ${_blas}) set(${LIBRARIES} ${${LIBRARIES}} ${_blas} ${_threads})
else(_libraries_work) else(_libraries_work)
set(${LIBRARIES} FALSE) set(${LIBRARIES} FALSE)
endif(_libraries_work) endif(_libraries_work)
@ -148,31 +152,28 @@ if(BLAS_FOUND)
set(BLA_VENDOR "All") set(BLA_VENDOR "All")
endif(NOT BLA_VENDOR) endif(NOT BLA_VENDOR)
endif ($ENV{BLA_VENDOR} MATCHES ".+") endif ($ENV{BLA_VENDOR} MATCHES ".+")
if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
if(NOT LAPACK_LIBRARIES)
check_lapack_libraries(
LAPACK_LIBRARIES
LAPACK
cheev
""
"goto2"
"${BLAS_LIBRARIES}"
""
)
endif(NOT LAPACK_LIBRARIES)
endif (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
#acml lapack #acml lapack
if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All")
if(NOT LAPACK_LIBRARIES) if (BLAS_LIBRARIES MATCHES ".+acml.+")
check_lapack_libraries( set (LAPACK_LIBRARIES ${BLAS_LIBRARIES})
LAPACK_LIBRARIES endif ()
LAPACK endif ()
cheev
""
"acml;acml_mv"
""
""
)
endif(NOT LAPACK_LIBRARIES)
if(NOT LAPACK_LIBRARIES)
check_lapack_libraries(
LAPACK_LIBRARIES
LAPACK
cheev
""
"acml_mp;acml_mv"
""
""
)
endif(NOT LAPACK_LIBRARIES)
endif (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All")
# Apple LAPACK library? # Apple LAPACK library?
if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All")
@ -202,7 +203,9 @@ if (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
endif ( NOT LAPACK_LIBRARIES ) endif ( NOT LAPACK_LIBRARIES )
endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") endif (BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All")
# Generic LAPACK library? # Generic LAPACK library?
if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR STREQUAL "Generic" OR
BLA_VENDOR STREQUAL "ATLAS" OR
BLA_VENDOR STREQUAL "All")
if ( NOT LAPACK_LIBRARIES ) if ( NOT LAPACK_LIBRARIES )
check_lapack_libraries( check_lapack_libraries(
LAPACK_LIBRARIES LAPACK_LIBRARIES
@ -214,7 +217,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
"" ""
) )
endif ( NOT LAPACK_LIBRARIES ) endif ( NOT LAPACK_LIBRARIES )
endif (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") endif ()
#intel lapack #intel lapack
if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX) if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
@ -300,3 +303,5 @@ else(BLA_F95)
endif(LAPACK_FOUND) endif(LAPACK_FOUND)
endif(NOT LAPACK_FIND_QUIETLY) endif(NOT LAPACK_FIND_QUIETLY)
endif(BLA_F95) endif(BLA_F95)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})

@ -5,6 +5,9 @@
# LIBXSLT_INCLUDE_DIR - the LibXslt include directory # LIBXSLT_INCLUDE_DIR - the LibXslt include directory
# LIBXSLT_LIBRARIES - Link these to LibXslt # LIBXSLT_LIBRARIES - Link these to LibXslt
# LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt # LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt
# Additionally, the following two variables are set (but not required for using xslt):
# LIBXSLT_EXSLT_LIBRARIES - Link to these if you need to link against the exslt library
# LIBXSLT_XSLTPROC_EXECUTABLE - Contains the full path to the xsltproc executable if found
#============================================================================= #=============================================================================
# Copyright 2006-2009 Kitware, Inc. # Copyright 2006-2009 Kitware, Inc.
@ -23,7 +26,7 @@
# use pkg-config to get the directories and then use these values # use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls # in the FIND_PATH() and FIND_LIBRARY() calls
FIND_PACKAGE(PkgConfig) FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_LIBXSLT libxslt) PKG_CHECK_MODULES(PC_LIBXSLT QUIET libxslt)
SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER}) SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER})
FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h
@ -38,10 +41,22 @@ FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt
${PC_LIBXSLT_LIBRARY_DIRS} ${PC_LIBXSLT_LIBRARY_DIRS}
) )
FIND_LIBRARY(LIBXSLT_EXSLT_LIBRARY NAMES exslt libexslt
HINTS
${PC_LIBXSLT_LIBDIR}
${PC_LIBXSLT_LIBRARY_DIRS}
)
SET(LIBXSLT_EXSLT_LIBRARIES ${LIBXSLT_EXSLT_LIBRARY} )
FIND_PROGRAM(LIBXSLT_XSLTPROC_EXECUTABLE xsltproc)
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES) MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR
LIBXSLT_LIBRARIES
LIBXSLT_EXSLT_LIBRARY
LIBXSLT_XSLTPROC_EXECUTABLE)

@ -184,8 +184,15 @@ endforeach()
# (Windows implementations) do not have compiler wrappers, so this approach must be used. # (Windows implementations) do not have compiler wrappers, so this approach must be used.
# #
function (interrogate_mpi_compiler lang try_libs) function (interrogate_mpi_compiler lang try_libs)
# if it's already in the cache, don't bother with any of this stuff # MPI_${lang}_NO_INTERROGATE will be set to a compiler name when the *regular* compiler was
if ((NOT MPI_${lang}_INCLUDE_PATH) OR (NOT MPI_${lang}_LIBRARIES)) # discovered to be the MPI compiler. This happens on machines like the Cray XE6 that use
# modules to set cc, CC, and ftn to the MPI compilers. If the user force-sets another MPI
# compiler, MPI_${lang}_COMPILER won't be equal to MPI_${lang}_NO_INTERROGATE, and we'll
# inspect that compiler anew. This allows users to set new compilers w/o rm'ing cache.
string(COMPARE NOTEQUAL "${MPI_${lang}_NO_INTERROGATE}" "${MPI_${lang}_COMPILER}" interrogate)
# If MPI is set already in the cache, don't bother with interrogating the compiler.
if (interrogate AND ((NOT MPI_${lang}_INCLUDE_PATH) OR (NOT MPI_${lang}_LIBRARIES)))
if (MPI_${lang}_COMPILER) if (MPI_${lang}_COMPILER)
# Check whether the -showme:compile option works. This indicates that we have either OpenMPI # Check whether the -showme:compile option works. This indicates that we have either OpenMPI
# or a newer version of LAM-MPI, and implies that -showme:link will also work. # or a newer version of LAM-MPI, and implies that -showme:link will also work.
@ -436,6 +443,47 @@ function (interrogate_mpi_compiler lang try_libs)
endfunction() endfunction()
# This function attempts to compile with the regular compiler, to see if MPI programs
# work with it. This is a last ditch attempt after we've tried interrogating mpicc and
# friends, and after we've tried to find generic libraries. Works on machines like
# Cray XE6, where the modules environment changes what MPI version cc, CC, and ftn use.
function(try_regular_compiler lang success)
set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
if (${lang} STREQUAL Fortran)
set(test_file ${scratch_directory}/cmake_mpi_test.f90)
file(WRITE ${test_file}
"program hello\n"
"include 'mpif.h'\n"
"integer ierror\n"
"call MPI_INIT(ierror)\n"
"call MPI_FINALIZE(ierror)\n"
"end\n")
else()
if (${lang} STREQUAL CXX)
set(test_file ${scratch_directory}/cmake_mpi_test.cpp)
else()
set(test_file ${scratch_directory}/cmake_mpi_test.c)
endif()
file(WRITE ${test_file}
"#include <mpi.h>\n"
"int main(int argc, char **argv) {\n"
" MPI_Init(&argc, &argv);\n"
" MPI_Finalize();\n"
"}\n")
endif()
try_compile(compiler_has_mpi ${scratch_directory} ${test_file})
if (compiler_has_mpi)
set(MPI_${lang}_NO_INTERROGATE ${CMAKE_${lang}_COMPILER} CACHE STRING "Whether to interrogate MPI ${lang} compiler" FORCE)
set(MPI_${lang}_COMPILER ${CMAKE_${lang}_COMPILER} CACHE STRING "MPI ${lang} compiler" FORCE)
set(MPI_${lang}_COMPILE_FLAGS "" CACHE STRING "MPI ${lang} compilation flags" FORCE)
set(MPI_${lang}_INCLUDE_PATH "" CACHE STRING "MPI ${lang} include path" FORCE)
set(MPI_${lang}_LINK_FLAGS "" CACHE STRING "MPI ${lang} linking flags" FORCE)
set(MPI_${lang}_LIBRARIES "" CACHE STRING "MPI ${lang} libraries to link against" FORCE)
endif()
set(${success} ${compiler_has_mpi} PARENT_SCOPE)
unset(compiler_has_mpi CACHE)
endfunction()
# End definitions, commence real work here. # End definitions, commence real work here.
# Most mpi distros have some form of mpiexec which gives us something we can reliably look for. # Most mpi distros have some form of mpiexec which gives us something we can reliably look for.
@ -507,8 +555,18 @@ foreach (lang C CXX Fortran)
interrogate_mpi_compiler(${lang} ${try_libs}) interrogate_mpi_compiler(${lang} ${try_libs})
mark_as_advanced(MPI_${lang}_COMPILER) mark_as_advanced(MPI_${lang}_COMPILER)
# Treat each language separately as far as outputting whether we found support for it and setting MPI_<lang>_FOUND. # last ditch try -- if nothing works so far, just try running the regular compiler and
find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_LIBRARIES MPI_${lang}_INCLUDE_PATH) # see if we can create an MPI executable.
set(regular_compiler_worked 0)
if (NOT MPI_${lang}_LIBRARIES OR NOT MPI_${lang}_INCLUDE_PATH)
try_regular_compiler(${lang} regular_compiler_worked)
endif()
if (regular_compiler_worked)
find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_COMPILER)
else()
find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_LIBRARIES MPI_${lang}_INCLUDE_PATH)
endif()
endif() endif()
endforeach() endforeach()

@ -1,14 +1,18 @@
# - Find the native PNG includes and library # - Find the native PNG includes and library
# #
# This module defines # This module searches libpng, the library for working with PNG images.
# PNG_INCLUDE_DIR, where to find png.h, etc. #
# It defines the following variables
# PNG_INCLUDE_DIRS, where to find png.h, etc.
# PNG_LIBRARIES, the libraries to link against to use PNG. # PNG_LIBRARIES, the libraries to link against to use PNG.
# PNG_DEFINITIONS - You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files. # PNG_DEFINITIONS - You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files.
# PNG_FOUND, If false, do not try to use PNG. # PNG_FOUND, If false, do not try to use PNG.
# also defined, but not for general use are # Also defined, but not for general use are
# PNG_LIBRARY, where to find the PNG library. # PNG_LIBRARY, where to find the PNG library.
# None of the above will be defined unles zlib can be found. # For backward compatiblity the variable PNG_INCLUDE_DIR is also set. It has the same value as PNG_INCLUDE_DIRS.
# PNG depends on Zlib #
# Since PNG depends on the ZLib compression library, none of the above will be
# defined unless ZLib can be found.
#============================================================================= #=============================================================================
# Copyright 2002-2009 Kitware, Inc. # Copyright 2002-2009 Kitware, Inc.
@ -38,7 +42,8 @@ if(ZLIB_FOUND)
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
# png.h includes zlib.h. Sigh. # png.h includes zlib.h. Sigh.
SET(PNG_INCLUDE_DIR ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ) SET(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
SET(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatiblity
SET(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY}) SET(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
if (CYGWIN) if (CYGWIN)

@ -34,6 +34,7 @@
FUNCTION(FIND_PACKAGE_MESSAGE pkg msg details) FUNCTION(FIND_PACKAGE_MESSAGE pkg msg details)
# Avoid printing a message repeatedly for the same find result. # Avoid printing a message repeatedly for the same find result.
IF(NOT ${pkg}_FIND_QUIETLY) IF(NOT ${pkg}_FIND_QUIETLY)
STRING(REGEX REPLACE "[\n]" "" details "${details}")
SET(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg}) SET(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
IF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}") IF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
# The message has not yet been printed. # The message has not yet been printed.

@ -7,7 +7,6 @@
# ... # ...
# if( PostgreSQL_FOUND ) # if( PostgreSQL_FOUND )
# include_directories(${PostgreSQL_INCLUDE_DIRS}) # include_directories(${PostgreSQL_INCLUDE_DIRS})
# link_directories(${PostgreSQL_LIBRARY_DIRS})
# endif( PostgreSQL_FOUND ) # endif( PostgreSQL_FOUND )
# ... # ...
# Remember to include ${PostgreSQL_LIBRARIES} in the target_link_libraries() statement. # Remember to include ${PostgreSQL_LIBRARIES} in the target_link_libraries() statement.
@ -113,12 +112,26 @@ find_path(PostgreSQL_INCLUDE_DIR
# Look in other places. # Look in other places.
${PostgreSQL_ROOT_DIRECTORIES} ${PostgreSQL_ROOT_DIRECTORIES}
PATH_SUFFIXES PATH_SUFFIXES
pgsql
postgresql postgresql
include include
# Help the user find it if we cannot. # Help the user find it if we cannot.
DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}" DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
) )
find_path(PostgreSQL_TYPE_INCLUDE_DIR
NAMES catalog/pg_type.h
PATHS
# Look in other places.
${PostgreSQL_ROOT_DIRECTORIES}
PATH_SUFFIXES
pgsql/server
postgresql/server
include/server
# Help the user find it if we cannot.
DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
)
# The PostgreSQL library. # The PostgreSQL library.
set (PostgreSQL_LIBRARY_TO_FIND pq) set (PostgreSQL_LIBRARY_TO_FIND pq)
# Setting some more prefixes for the library # Setting some more prefixes for the library
@ -138,42 +151,22 @@ find_library( PostgreSQL_LIBRARY
get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH) get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH)
# Did we find anything? # Did we find anything?
set( PostgreSQL_FOUND 0 ) include(FindPackageHandleStandardArgs)
if ( EXISTS "${PostgreSQL_INCLUDE_DIR}" AND EXISTS "${PostgreSQL_LIBRARY_DIR}" ) find_package_handle_standard_args(PostgreSQL DEFAULT_MSG
set( PostgreSQL_FOUND 1 ) PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR)
else ( EXISTS "${PostgreSQL_INCLUDE_DIR}" AND EXISTS "${PostgreSQL_LIBRARY_DIR}" )
if ( POSTGRES_REQUIRED ) set( PostgreSQL_FOUND ${POSTGRESQL_FOUND})
message( FATAL_ERROR "PostgreSQL is required. ${PostgreSQL_ROOT_DIR_MESSAGE}" )
endif ( POSTGRES_REQUIRED )
endif (EXISTS "${PostgreSQL_INCLUDE_DIR}" AND EXISTS "${PostgreSQL_LIBRARY_DIR}" )
# Now try to get the include and library path. # Now try to get the include and library path.
if(PostgreSQL_FOUND) if(PostgreSQL_FOUND)
if(EXISTS "${PostgreSQL_INCLUDE_DIR}") set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR} )
set(PostgreSQL_INCLUDE_DIRS set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} )
${PostgreSQL_INCLUDE_DIR} set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})
)
endif(EXISTS "${PostgreSQL_INCLUDE_DIR}")
if(EXISTS "${PostgreSQL_LIBRARY_DIR}")
set(PostgreSQL_LIBRARY_DIRS
${PostgreSQL_LIBRARY_DIR}
)
set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})
endif(EXISTS "${PostgreSQL_LIBRARY_DIR}")
#message("Final PostgreSQL include dir: ${PostgreSQL_INCLUDE_DIRS}") #message("Final PostgreSQL include dir: ${PostgreSQL_INCLUDE_DIRS}")
#message("Final PostgreSQL library dir: ${PostgreSQL_LIBRARY_DIRS}") #message("Final PostgreSQL library dir: ${PostgreSQL_LIBRARY_DIRS}")
#message("Final PostgreSQL libraries: ${PostgreSQL_LIBRARIES}") #message("Final PostgreSQL libraries: ${PostgreSQL_LIBRARIES}")
endif(PostgreSQL_FOUND) endif(PostgreSQL_FOUND)
if(NOT PostgreSQL_FOUND) mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR PostgreSQL_LIBRARY )
if(NOT PostgreSQL_FIND_QUIETLY)
message(STATUS "PostgreSQL was not found. ${PostgreSQL_DIR_MESSAGE}")
else(NOT PostgreSQL_FIND_QUIETLY)
if(PostgreSQL_FIND_REQUIRED)
message(FATAL_ERROR "PostgreSQL was not found. ${PostgreSQL_DIR_MESSAGE}")
endif(PostgreSQL_FIND_REQUIRED)
endif(NOT PostgreSQL_FIND_QUIETLY)
endif(NOT PostgreSQL_FOUND)

@ -39,7 +39,11 @@
# target_link_libraries(bar ${PROTOBUF_LIBRARIES}) # target_link_libraries(bar ${PROTOBUF_LIBRARIES})
# #
# NOTE: You may need to link against pthreads, depending # NOTE: You may need to link against pthreads, depending
# on the platform. # on the platform.
#
# NOTE: The PROTOBUF_GENERATE_CPP macro & add_executable() or add_library()
# calls only work properly within the same directory.
#
# ==================================================================== # ====================================================================
# #
# PROTOBUF_GENERATE_CPP (public function) # PROTOBUF_GENERATE_CPP (public function)

@ -4,11 +4,17 @@
# #
# PYTHONINTERP_FOUND - Was the Python executable found # PYTHONINTERP_FOUND - Was the Python executable found
# PYTHON_EXECUTABLE - path to the Python interpreter # PYTHON_EXECUTABLE - path to the Python interpreter
# Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
# #
# PYTHON_VERSION_STRING - Python version found e.g. 2.5.2
# PYTHON_VERSION_MAJOR - Python major version found e.g. 2
# PYTHON_VERSION_MINOR - Python minor version found e.g. 5
# PYTHON_VERSION_PATCH - Python patch version found e.g. 2
#
# Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
#============================================================================= #=============================================================================
# Copyright 2005-2010 Kitware, Inc. # Copyright 2005-2010 Kitware, Inc.
# Copyright 2011 Bjoern Ricks <bjoern.ricks@gmail.com>
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -20,32 +26,41 @@
# (To distribute this file outside of CMake, substitute the full # (To distribute this file outside of CMake, substitute the full
# License text for the above reference.) # License text for the above reference.)
# Search for the current active python version first
find_program(PYTHON_EXECUTABLE NAMES python)
# Set up the versions we know about, in the order we will search. Always add # Set up the versions we know about, in the order we will search. Always add
# the user supplied additional versions to the front. # the user supplied additional versions to the front.
set(_Python_VERSIONS set(_Python_VERSIONS
${Python_ADDITIONAL_VERSIONS} ${Python_ADDITIONAL_VERSIONS}
2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
# Run first with the Python version in the executable # Search for newest python version if python executable isn't found
foreach(_CURRENT_VERSION ${_Python_VERSIONS})
set(_Python_NAMES python${_CURRENT_VERSION})
if(WIN32)
list(APPEND _Python_NAMES python)
endif()
find_program(PYTHON_EXECUTABLE
NAMES ${_Python_NAMES}
PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]
)
endforeach()
# Now without any version if we still haven't found it
if(NOT PYTHON_EXECUTABLE) if(NOT PYTHON_EXECUTABLE)
find_program(PYTHON_EXECUTABLE NAMES python) foreach(_CURRENT_VERSION ${_Python_VERSIONS})
set(_Python_NAMES python${_CURRENT_VERSION})
if(WIN32)
list(APPEND _Python_NAMES python)
endif()
find_program(PYTHON_EXECUTABLE
NAMES ${_Python_NAMES}
PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]
)
endforeach()
endif() endif()
# determine python version string
if(PYTHON_EXECUTABLE)
execute_process(COMMAND "${PYTHON_EXECUTABLE}" --version ERROR_VARIABLE _VERSION OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE)
string(REPLACE "Python " "" PYTHON_VERSION_STRING "${_VERSION}")
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" PYTHON_VERSION_MAJOR "${PYTHON_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" PYTHON_VERSION_MINOR "${PYTHON_VERSION_STRING}")
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PYTHON_VERSION_PATCH "${PYTHON_VERSION_STRING}")
endif()
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp DEFAULT_MSG PYTHON_EXECUTABLE) FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)
mark_as_advanced(PYTHON_EXECUTABLE) mark_as_advanced(PYTHON_EXECUTABLE)

@ -352,7 +352,7 @@ IF(QT_QT_LIBRARY)
ENDIF(QT_QT_LIBRARY) ENDIF(QT_QT_LIBRARY)
INCLUDE(CheckSymbolExists) INCLUDE(CheckCXXSymbolExists)
INCLUDE(MacroAddFileDependencies) INCLUDE(MacroAddFileDependencies)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
@ -578,19 +578,6 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
ENDIF () ENDIF ()
IF (APPLE)
SET(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK})
IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
SET(QT_USE_FRAMEWORKS ON CACHE INTERNAL "" FORCE)
SET(CMAKE_FIND_FRAMEWORK FIRST)
ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
SET(QT_USE_FRAMEWORKS OFF CACHE INTERNAL "" FORCE)
SET(CMAKE_FIND_FRAMEWORK LAST)
ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
ENDIF (APPLE)
_QT4_ADJUST_LIB_VARS(QtCore)
# set QT_LIBRARY_DIR based on location of QtCore found. # set QT_LIBRARY_DIR based on location of QtCore found.
IF(QT_QTCORE_LIBRARY_RELEASE) IF(QT_QTCORE_LIBRARY_RELEASE)
GET_FILENAME_COMPONENT(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_RELEASE}" PATH) GET_FILENAME_COMPONENT(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_RELEASE}" PATH)
@ -614,13 +601,24 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE) SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
ENDIF (NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED) ENDIF (NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
IF (APPLE)
SET(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK})
IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
SET(QT_USE_FRAMEWORKS ON CACHE INTERNAL "" FORCE)
SET(CMAKE_FIND_FRAMEWORK FIRST)
ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
SET(QT_USE_FRAMEWORKS OFF CACHE INTERNAL "" FORCE)
SET(CMAKE_FIND_FRAMEWORK LAST)
ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
ENDIF (APPLE)
# ask qmake for the include dir # ask qmake for the include dir
IF (QT_LIBRARY_DIR AND (NOT QT_QTCORE_INCLUDE_DIR OR NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED)) IF (QT_LIBRARY_DIR AND (NOT QT_QTCORE_INCLUDE_DIR OR NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED))
_qt4_query_qmake(QT_INSTALL_HEADERS qt_headers) _qt4_query_qmake(QT_INSTALL_HEADERS qt_headers)
SET(QT_QTCORE_INCLUDE_DIR NOTFOUND) SET(QT_QTCORE_INCLUDE_DIR NOTFOUND)
FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore
HINTS ${qt_headers} ${QT_LIBRARY_DIR} HINTS ${qt_headers} ${QT_LIBRARY_DIR}
PATH_SUFFIXES QtCore PATH_SUFFIXES QtCore qt4/QtCore
) )
# Set QT_HEADERS_DIR based on finding QtCore header # Set QT_HEADERS_DIR based on finding QtCore header
@ -717,19 +715,19 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
# Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES # Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}") SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}")
# Check for Window system symbols (note: only one should end up being set) # Check for Window system symbols (note: only one should end up being set)
CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11) CHECK_CXX_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN) CHECK_CXX_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS) CHECK_CXX_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC) CHECK_CXX_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
IF(Q_WS_MAC) IF(Q_WS_MAC)
IF(QT_QMAKE_CHANGED) IF(QT_QMAKE_CHANGED)
UNSET(QT_MAC_USE_COCOA CACHE) UNSET(QT_MAC_USE_COCOA CACHE)
ENDIF(QT_QMAKE_CHANGED) ENDIF(QT_QMAKE_CHANGED)
CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA) CHECK_CXX_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
ENDIF(Q_WS_MAC) ENDIF(Q_WS_MAC)
IF (QT_QTCOPY_REQUIRED) IF (QT_QTCOPY_REQUIRED)
CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY) CHECK_CXX_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
IF (NOT QT_IS_QTCOPY) IF (NOT QT_IS_QTCOPY)
MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found") MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
ENDIF (NOT QT_IS_QTCOPY) ENDIF (NOT QT_IS_QTCOPY)
@ -864,10 +862,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
) )
ENDFOREACH(QT_MODULE) ENDFOREACH(QT_MODULE)
# QtUiTools not with other frameworks with binary installation (in /usr/lib) # QtUiTools is sometimes not in the same directory as the other found libraries
IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) # e.g. on Mac, its never a framework like the others are
IF(QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR}) FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) ENDIF(QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
# Set QT_QTDESIGNERCOMPONENTS_LIBRARY # Set QT_QTDESIGNERCOMPONENTS_LIBRARY
FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
@ -904,6 +903,8 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
# Set QT_xyz_LIBRARY variable and add # Set QT_xyz_LIBRARY variable and add
# library include path to QT_INCLUDES # library include path to QT_INCLUDES
_QT4_ADJUST_LIB_VARS(QtCore)
FOREACH(QT_MODULE ${QT_MODULES}) FOREACH(QT_MODULE ${QT_MODULES})
_QT4_ADJUST_LIB_VARS(${QT_MODULE}) _QT4_ADJUST_LIB_VARS(${QT_MODULE})
ENDFOREACH(QT_MODULE) ENDFOREACH(QT_MODULE)
@ -1061,6 +1062,14 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
SET( QT_SCRIPT_PLUGINS qtscriptdbus ) SET( QT_SCRIPT_PLUGINS qtscriptdbus )
SET( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds ) SET( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds )
SET( QT_PHONON_PLUGINS ${QT_PHONON_BACKEND_PLUGINS} )
SET( QT_QT3SUPPORT_PLUGINS qtaccessiblecompatwidgets )
SET( QT_QTCORE_PLUGINS ${QT_BEARER_PLUGINS} ${QT_CODECS_PLUGINS} )
SET( QT_QTGUI_PLUGINS qtaccessiblewidgets qgif qjpeg qmng qico qtiff ${QT_DECORATIONS_PLUGINS} ${QT_GRAPHICSDRIVERS_PLUGINS} ${QT_GRAPHICSSYSTEMS_PLUGINS} ${QT_INPUTMETHODS_PLUGINS} ${QT_MOUSEDRIVERS_PLUGINS} )
SET( QT_QTSCRIPT_PLUGINS ${QT_SCRIPT_PLUGINS} )
SET( QT_QTSQL_PLUGINS ${QT_SQLDRIVERS_PLUGINS} )
SET( QT_QTSVG_PLUGINS qsvg qsvgicon )
IF(QT_QMAKE_CHANGED) IF(QT_QMAKE_CHANGED)
FOREACH(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES}) FOREACH(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES})
STRING(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type) STRING(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type)

@ -180,7 +180,7 @@ ENDIF( ${Ruby_FIND_VERSION_SHORT_NODOT} GREATER 18 OR ${_RUBY_VERSION_SHORT_NO
# Determine the list of possible names for the ruby library # Determine the list of possible names for the ruby library
SET(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT}) SET(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ruby${_RUBY_VERSION_SHORT_NODOT})
IF(WIN32) IF(WIN32)
SET( _RUBY_MSVC_RUNTIME "" ) SET( _RUBY_MSVC_RUNTIME "" )

@ -109,7 +109,7 @@ IF(Subversion_SVN_EXECUTABLE)
# This macro requires a svn server network access (Internet most of the time) # This macro requires a svn server network access (Internet most of the time)
# and can also be slow since it access the svn server # and can also be slow since it access the svn server
EXECUTE_PROCESS(COMMAND EXECUTE_PROCESS(COMMAND
${Subversion_SVN_EXECUTABLE} log -r BASE ${dir} ${Subversion_SVN_EXECUTABLE} --non-interactive log -r BASE ${dir}
OUTPUT_VARIABLE ${prefix}_LAST_CHANGED_LOG OUTPUT_VARIABLE ${prefix}_LAST_CHANGED_LOG
ERROR_VARIABLE Subversion_svn_log_error ERROR_VARIABLE Subversion_svn_log_error
RESULT_VARIABLE Subversion_svn_log_result RESULT_VARIABLE Subversion_svn_log_result

@ -6,6 +6,7 @@
# #
# and also the following more fine grained variables: # and also the following more fine grained variables:
# Include paths: X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND # Include paths: X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND
# X11_SM_INCLUDE_PATH, X11_SM_LIB, X11_SM_FOUND
# X11_X11_INCLUDE_PATH, X11_X11_LIB # X11_X11_INCLUDE_PATH, X11_X11_LIB
# X11_Xaccessrules_INCLUDE_PATH, X11_Xaccess_FOUND # X11_Xaccessrules_INCLUDE_PATH, X11_Xaccess_FOUND
# X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND # X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND
@ -27,6 +28,7 @@
# X11_Xinput_INCLUDE_PATH, X11_Xinput_LIB, X11_Xinput_FOUND # X11_Xinput_INCLUDE_PATH, X11_Xinput_LIB, X11_Xinput_FOUND
# X11_Xkb_INCLUDE_PATH, X11_Xkb_FOUND # X11_Xkb_INCLUDE_PATH, X11_Xkb_FOUND
# X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND # X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND
# X11_Xkbfile_INCLUDE_PATH, X11_Xkbfile_LIB, X11_Xkbfile_FOUND
# X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND # X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND
# X11_XTest_INCLUDE_PATH, X11_XTest_LIB, X11_XTest_FOUND # X11_XTest_INCLUDE_PATH, X11_XTest_LIB, X11_XTest_FOUND
# X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND # X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND
@ -35,6 +37,8 @@
# X11_Xt_INCLUDE_PATH, X11_Xt_LIB, X11_Xt_FOUND # X11_Xt_INCLUDE_PATH, X11_Xt_LIB, X11_Xt_FOUND
# X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND # X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND
# X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND # X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND
# X11_XSync_INCLUDE_PATH, (in X11_Xext_LIB), X11_XSync_FOUND
#============================================================================= #=============================================================================
# Copyright 2001-2009 Kitware, Inc. # Copyright 2001-2009 Kitware, Inc.
@ -80,6 +84,7 @@ IF (UNIX)
# Solaris lacks XKBrules.h, so we should skip kxkbd there. # Solaris lacks XKBrules.h, so we should skip kxkbd there.
FIND_PATH(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_SM_INCLUDE_PATH X11/SM/SM.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH})
@ -97,16 +102,19 @@ IF (UNIX)
FIND_PATH(X11_Xinput_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xinput_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xkb_INCLUDE_PATH X11/extensions/XKB.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xkb_INCLUDE_PATH X11/extensions/XKB.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xkblib_INCLUDE_PATH X11/XKBlib.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xkblib_INCLUDE_PATH X11/XKBlib.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xkbfile_INCLUDE_PATH X11/extensions/XKBfile.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xpm_INCLUDE_PATH X11/xpm.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xpm_INCLUDE_PATH X11/xpm.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_XTest_INCLUDE_PATH X11/extensions/XTest.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_XTest_INCLUDE_PATH X11/extensions/XTest.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_XShm_INCLUDE_PATH X11/extensions/XShm.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_XShm_INCLUDE_PATH X11/extensions/XShm.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xrandr_INCLUDE_PATH X11/extensions/Xrandr.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xrandr_INCLUDE_PATH X11/extensions/Xrandr.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xrender_INCLUDE_PATH X11/extensions/Xrender.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xrender_INCLUDE_PATH X11/extensions/Xrender.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_XRes_INCLUDE_PATH X11/extensions/XRes.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xscreensaver_INCLUDE_PATH X11/extensions/scrnsaver.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xscreensaver_INCLUDE_PATH X11/extensions/scrnsaver.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xshape_INCLUDE_PATH X11/extensions/shape.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xshape_INCLUDE_PATH X11/extensions/shape.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xutil_INCLUDE_PATH X11/Xutil.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xutil_INCLUDE_PATH X11/Xutil.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xt_INCLUDE_PATH X11/Intrinsic.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xt_INCLUDE_PATH X11/Intrinsic.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH}) FIND_PATH(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_XSync_INCLUDE_PATH X11/extensions/sync.h ${X11_INC_SEARCH_PATH})
FIND_LIBRARY(X11_X11_LIB X11 ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_X11_LIB X11 ${X11_LIB_SEARCH_PATH})
@ -125,9 +133,11 @@ IF (UNIX)
FIND_LIBRARY(X11_Xi_LIB Xi ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_Xi_LIB Xi ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xinerama_LIB Xinerama ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_Xinerama_LIB Xinerama ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xinput_LIB Xi ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_Xinput_LIB Xi ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xkbfile_LIB xkbfile ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xrandr_LIB Xrandr ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_Xrandr_LIB Xrandr ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_XRes_LIB XRes ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xscreensaver_LIB Xss ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_Xscreensaver_LIB Xss ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xt_LIB Xt ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_Xt_LIB Xt ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH})
@ -242,6 +252,11 @@ IF (UNIX)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrender_INCLUDE_PATH}) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrender_INCLUDE_PATH})
ENDIF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB) ENDIF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB)
IF (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB)
SET(X11_XRes_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XRes_INCLUDE_PATH})
ENDIF (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB)
IF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB) IF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB)
SET(X11_Xrandr_FOUND TRUE) SET(X11_Xrandr_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH}) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH})
@ -277,15 +292,30 @@ IF (UNIX)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkb_INCLUDE_PATH} ) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkb_INCLUDE_PATH} )
ENDIF (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH) ENDIF (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
IF (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
SET(X11_Xkbfile_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkbfile_INCLUDE_PATH} )
ENDIF (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
IF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB) IF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
SET(X11_Xinput_FOUND TRUE) SET(X11_Xinput_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinput_INCLUDE_PATH}) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinput_INCLUDE_PATH})
ENDIF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB) ENDIF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
IF (X11_XSync_INCLUDE_PATH)
SET(X11_XSync_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XSync_INCLUDE_PATH})
ENDIF (X11_XSync_INCLUDE_PATH)
IF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH) IF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
SET(X11_ICE_FOUND TRUE) SET(X11_ICE_FOUND TRUE)
ENDIF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH) ENDIF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
IF(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
SET(X11_SM_FOUND TRUE)
ENDIF(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
# Deprecated variable for backwards compatibility with CMake 1.4 # Deprecated variable for backwards compatibility with CMake 1.4
IF (X11_X11_INCLUDE_PATH AND X11_LIBRARIES) IF (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
SET(X11_FOUND 1) SET(X11_FOUND 1)
@ -401,6 +431,8 @@ IF (UNIX)
X11_Xdamage_INCLUDE_PATH X11_Xdamage_INCLUDE_PATH
X11_Xrender_LIB X11_Xrender_LIB
X11_Xrender_INCLUDE_PATH X11_Xrender_INCLUDE_PATH
X11_XRes_LIB
X11_XRes_INCLUDE_PATH
X11_Xxf86misc_LIB X11_Xxf86misc_LIB
X11_xf86misc_INCLUDE_PATH X11_xf86misc_INCLUDE_PATH
X11_xf86vmode_INCLUDE_PATH X11_xf86vmode_INCLUDE_PATH
@ -422,6 +454,8 @@ IF (UNIX)
X11_Xdmcp_INCLUDE_PATH X11_Xdmcp_INCLUDE_PATH
X11_Xkb_INCLUDE_PATH X11_Xkb_INCLUDE_PATH
X11_Xkblib_INCLUDE_PATH X11_Xkblib_INCLUDE_PATH
X11_Xkbfile_INCLUDE_PATH
X11_Xkbfile_LIB
X11_Xscreensaver_INCLUDE_PATH X11_Xscreensaver_INCLUDE_PATH
X11_Xscreensaver_LIB X11_Xscreensaver_LIB
X11_Xpm_INCLUDE_PATH X11_Xpm_INCLUDE_PATH
@ -437,6 +471,8 @@ IF (UNIX)
X11_ICE_LIB X11_ICE_LIB
X11_ICE_INCLUDE_PATH X11_ICE_INCLUDE_PATH
X11_SM_LIB X11_SM_LIB
X11_SM_INCLUDE_PATH
X11_XSync_INCLUDE_PATH
) )
SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE}) SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE})
ENDIF (UNIX) ENDIF (UNIX)

@ -17,9 +17,12 @@
# ZLIB_MAJOR_VERSION - The major version of zlib # ZLIB_MAJOR_VERSION - The major version of zlib
# ZLIB_MINOR_VERSION - The minor version of zlib # ZLIB_MINOR_VERSION - The minor version of zlib
# ZLIB_PATCH_VERSION - The patch version of zlib # ZLIB_PATCH_VERSION - The patch version of zlib
#
# An includer may set ZLIB_ROOT to a zlib installation root to tell
# this module where to look.
#============================================================================= #=============================================================================
# Copyright 2001-2009 Kitware, Inc. # Copyright 2001-2011 Kitware, Inc.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -31,17 +34,29 @@
# (To distribute this file outside of CMake, substitute the full # (To distribute this file outside of CMake, substitute the full
# License text for the above reference.) # License text for the above reference.)
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h SET(_ZLIB_SEARCHES)
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/include"
) # Search ZLIB_ROOT first if it is set.
IF(ZLIB_ROOT)
SET(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
LIST(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
ENDIF()
# Normal search.
SET(_ZLIB_SEARCH_NORMAL
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
"$ENV{PROGRAMFILES}/zlib"
)
LIST(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
SET(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1) SET(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1)
FIND_LIBRARY(ZLIB_LIBRARY
NAMES # Try each search configuration.
${ZLIB_NAMES} FOREACH(search ${_ZLIB_SEARCHES})
PATHS FIND_PATH(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/lib" FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
) ENDFOREACH()
MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
IF(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h") IF(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")

@ -116,6 +116,14 @@ endforeach()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
set(FortranCInterface_SOURCE_DIR ${CMAKE_ROOT}/Modules/FortranCInterface) set(FortranCInterface_SOURCE_DIR ${CMAKE_ROOT}/Modules/FortranCInterface)
# MinGW's make tool does not always like () in the path
if("${CMAKE_GENERATOR}" MATCHES "MinGW" AND
"${FortranCInterface_SOURCE_DIR}" MATCHES "[()]")
file(COPY ${FortranCInterface_SOURCE_DIR}/
DESTINATION ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterfaceMinGW)
set(FortranCInterface_SOURCE_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterfaceMinGW)
endif()
# Create the interface detection project if it does not exist. # Create the interface detection project if it does not exist.
if(NOT FortranCInterface_BINARY_DIR) if(NOT FortranCInterface_BINARY_DIR)
set(FortranCInterface_BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterface) set(FortranCInterface_BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterface)

@ -24,7 +24,9 @@ include(FortranCInterface)
FortranCInterface_HEADER(VerifyFortran.h SYMBOLS VerifyFortran) FortranCInterface_HEADER(VerifyFortran.h SYMBOLS VerifyFortran)
include_directories(${VerifyFortranC_BINARY_DIR}) include_directories(${VerifyFortranC_BINARY_DIR})
add_executable(VerifyFortranC main.c VerifyC.c VerifyFortran.f ${VerifyCXX}) add_library(VerifyFortran STATIC VerifyFortran.f)
add_executable(VerifyFortranC main.c VerifyC.c ${VerifyCXX})
target_link_libraries(VerifyFortranC VerifyFortran)
if(NOT VERIFY_CXX) if(NOT VERIFY_CXX)
# The entry point (main) is defined in C; link with the C compiler. # The entry point (main) is defined in C; link with the C compiler.

@ -0,0 +1,377 @@
# - Function for generation of export macros for libraries
# This module provides the function GENERATE_EXPORT_HEADER() and the
# accompanying ADD_COMPILER_EXPORT_FLAGS() function.
#
# The GENERATE_EXPORT_HEADER function can be used to generate a file suitable
# for preprocessor inclusion which contains EXPORT macros to be used in
# library classes.
#
# GENERATE_EXPORT_HEADER( LIBRARY_TARGET
# [BASE_NAME <base_name>]
# [EXPORT_MACRO_NAME <export_macro_name>]
# [EXPORT_FILE_NAME <export_file_name>]
# [DEPRECATED_MACRO_NAME <deprecated_macro_name>]
# [NO_EXPORT_MACRO_NAME <no_export_macro_name>]
# [STATIC_DEFINE <static_define>]
# [NO_DEPRECATED_MACRO_NAME <no_deprecated_macro_name>]
# [DEFINE_NO_DEPRECATED]
# [PREFIX_NAME <prefix_name>]
# )
#
# ADD_COMPILER_EXPORT_FLAGS( [FATAL_WARNINGS] )
#
# By default GENERATE_EXPORT_HEADER() generates macro names in a file name
# determined by the name of the library. The ADD_COMPILER_EXPORT_FLAGS function
# adds -fvisibility=hidden to CMAKE_CXX_FLAGS if supported, and is a no-op on
# Windows which does not need extra compiler flags for exporting support. You
# may optionally pass a single argument to ADD_COMPILER_EXPORT_FLAGS that will
# be populated with the required CXX_FLAGS required to enable visibility support
# for the compiler/architecture in use.
#
# This means that in the simplest case, users of these functions will be
# equivalent to:
#
# add_compiler_export_flags()
# add_library(somelib someclass.cpp)
# generate_export_header(somelib)
# install(TARGETS somelib DESTINATION ${LIBRARY_INSTALL_DIR})
# install(FILES
# someclass.h
# ${PROJECT_BINARY_DIR}/somelib_export.h DESTINATION ${INCLUDE_INSTALL_DIR}
# )
#
# And in the ABI header files:
#
# #include "somelib_export.h"
# class SOMELIB_EXPORT SomeClass {
# ...
# };
#
# The CMake fragment will generate a file in the ${CMAKE_CURRENT_BUILD_DIR}
# called somelib_export.h containing the macros SOMELIB_EXPORT, SOMELIB_NO_EXPORT,
# SOMELIB_DEPRECATED, SOMELIB_DEPRECATED_EXPORT and SOMELIB_DEPRECATED_NO_EXPORT.
# The resulting file should be installed with other headers in the library.
#
# The BASE_NAME argument can be used to override the file name and the names
# used for the macros
#
# add_library(somelib someclass.cpp)
# generate_export_header(somelib
# BASE_NAME other_name
# )
#
# Generates a file called other_name_export.h containing the macros
# OTHER_NAME_EXPORT, OTHER_NAME_NO_EXPORT and OTHER_NAME_DEPRECATED etc.
#
# The BASE_NAME may be overridden by specifiying other options in the function.
# For example:
#
# add_library(somelib someclass.cpp)
# generate_export_header(somelib
# EXPORT_MACRO_NAME OTHER_NAME_EXPORT
# )
#
# creates the macro OTHER_NAME_EXPORT instead of SOMELIB_EXPORT, but other macros
# and the generated file name is as default.
#
# add_library(somelib someclass.cpp)
# generate_export_header(somelib
# DEPRECATED_MACRO_NAME KDE_DEPRECATED
# )
#
# creates the macro KDE_DEPRECATED instead of SOMELIB_DEPRECATED.
#
# If LIBRARY_TARGET is a static library, macros are defined without values.
#
# If the same sources are used to create both a shared and a static library, the
# uppercased symbol ${BASE_NAME}_STATIC_DEFINE should be used when building the
# static library
#
# add_library(shared_variant SHARED ${lib_SRCS})
# add_library(static_variant ${lib_SRCS})
# generate_export_header(shared_variant BASE_NAME libshared_and_static)
# set_target_properties(static_variant PROPERTIES
# COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE)
#
# This will cause the export macros to expand to nothing when building the
# static library.
#
# If DEFINE_NO_DEPRECATED is specified, then a macro ${BASE_NAME}_NO_DEPRECATED
# will be defined
# This macro can be used to remove deprecated code from preprocessor output.
#
# option(EXCLUDE_DEPRECATED "Exclude deprecated parts of the library" FALSE)
# if (EXCLUDE_DEPRECATED)
# set(NO_BUILD_DEPRECATED DEFINE_NO_DEPRECATED)
# endif()
# generate_export_header(somelib ${NO_BUILD_DEPRECATED})
#
# And then in somelib:
#
# class SOMELIB_EXPORT SomeClass
# {
# public:
# #ifndef SOMELIB_NO_DEPRECATED
# SOMELIB_DEPRECATED void oldMethod();
# #endif
# };
#
# #ifndef SOMELIB_NO_DEPRECATED
# void SomeClass::oldMethod() { }
# #endif
#
# If PREFIX_NAME is specified, the argument will be used as a prefix to all
# generated macros.
#
# For example:
#
# generate_export_header(somelib PREFIX_NAME VTK_)
#
# Generates the macros VTK_SOMELIB_EXPORT etc.
#=============================================================================
# Copyright 2011 Stephen Kelly <steveire@gmail.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
include(CMakeParseArguments)
include(CheckCXXCompilerFlag)
# TODO: Install this macro separately?
macro(_check_cxx_compiler_attribute _ATTRIBUTE _RESULT)
check_cxx_source_compiles("${_ATTRIBUTE} int somefunc() { return 0; }
int main() { return somefunc();}" ${_RESULT}
# Some compilers do not fail with a bad flag
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
)
endmacro()
macro(_test_compiler_hidden_visibility)
if(CMAKE_COMPILER_IS_GNUCXX)
exec_program(${CMAKE_C_COMPILER} ARGS --version
OUTPUT_VARIABLE _gcc_version_info)
string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
_gcc_version "${_gcc_version_info}")
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
# patch level, handle this here:
if(NOT _gcc_version)
string(REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0"
_gcc_version "${_gcc_version_info}")
endif()
if(${_gcc_version} VERSION_LESS "4.2")
set(GCC_TOO_OLD TRUE)
message(WARNING "GCC version older than 4.2")
endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
exec_program(${CMAKE_CXX_COMPILER} ARGS -V
OUTPUT_VARIABLE _intel_version_info)
string(REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1"
_intel_version "${_intel_version_info}")
if(${_intel_version} VERSION_LESS "12.0")
set(_INTEL_TOO_OLD TRUE)
message(WARNING "Intel compiler older than 12.0")
endif()
endif()
# Exclude XL here because it misinterprets -fvisibility=hidden even though
# the check_cxx_compiler_flag passes
# http://www.cdash.org/CDash/testDetails.php?test=109109951&build=1419259
if(NOT GCC_TOO_OLD
AND NOT _INTEL_TOO_OLD
AND NOT WIN32
AND NOT CYGWIN
AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES XL
AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES PGI
AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom)
check_cxx_compiler_flag(-fvisibility=hidden COMPILER_HAS_HIDDEN_VISIBILITY)
check_cxx_compiler_flag(-fvisibility-inlines-hidden
COMPILER_HAS_HIDDEN_INLINE_VISIBILITY)
option(USE_COMPILER_HIDDEN_VISIBILITY
"Use HIDDEN visibility support if available." ON)
mark_as_advanced(USE_COMPILER_HIDDEN_VISIBILITY)
endif()
endmacro()
macro(_test_compiler_has_deprecated)
if("${CMAKE_CXX_COMPILER_ID}" MATCHES Borland
OR "${CMAKE_CXX_COMPILER_ID}" MATCHES HP
OR GCC_TOO_OLD
OR "${CMAKE_CXX_COMPILER_ID}" MATCHES PGI
OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Watcom)
set(COMPILER_HAS_DEPRECATED "" CACHE INTERNAL
"Compiler support for a deprecated attribute")
else()
_check_cxx_compiler_attribute("__attribute__((__deprecated__))"
COMPILER_HAS_DEPRECATED_ATTR)
if(COMPILER_HAS_DEPRECATED_ATTR)
set(COMPILER_HAS_DEPRECATED "${COMPILER_HAS_DEPRECATED_ATTR}"
CACHE INTERNAL "Compiler support for a deprecated attribute")
else()
_check_cxx_compiler_attribute("__declspec(deprecated)"
COMPILER_HAS_DEPRECATED)
endif()
endif()
endmacro()
get_filename_component(_GENERATE_EXPORT_HEADER_MODULE_DIR
"${CMAKE_CURRENT_LIST_FILE}" PATH)
macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY)
set(DEFINE_DEPRECATED)
set(DEFINE_EXPORT)
set(DEFINE_IMPORT)
set(DEFINE_NO_EXPORT)
if (COMPILER_HAS_DEPRECATED_ATTR)
set(DEFINE_DEPRECATED "__attribute__ ((__deprecated__))")
elseif(COMPILER_HAS_DEPRECATED)
set(DEFINE_DEPRECATED "__declspec(deprecated)")
endif()
get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
if(NOT ${type} STREQUAL "STATIC_LIBRARY")
if(WIN32)
set(DEFINE_EXPORT "__declspec(dllexport)")
set(DEFINE_IMPORT "__declspec(dllimport)")
elseif(COMPILER_HAS_HIDDEN_VISIBILITY AND USE_COMPILER_HIDDEN_VISIBILITY)
set(DEFINE_EXPORT "__attribute__((visibility(\"default\")))")
set(DEFINE_IMPORT "__attribute__((visibility(\"default\")))")
set(DEFINE_NO_EXPORT "__attribute__((visibility(\"hidden\")))")
endif()
endif()
endmacro()
macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
# Option overrides
set(options DEFINE_NO_DEPRECATED)
set(oneValueArgs PREFIX_NAME BASE_NAME EXPORT_MACRO_NAME EXPORT_FILE_NAME
DEPRECATED_MACRO_NAME NO_EXPORT_MACRO_NAME STATIC_DEFINE
NO_DEPRECATED_MACRO_NAME)
set(multiValueArgs)
cmake_parse_arguments(_GEH "${options}" "${oneValueArgs}" "${multiValueArgs}"
${ARGN})
set(BASE_NAME "${TARGET_LIBRARY}")
if(_GEH_BASE_NAME)
set(BASE_NAME ${_GEH_BASE_NAME})
endif()
string(TOUPPER ${BASE_NAME} BASE_NAME_UPPER)
string(TOLOWER ${BASE_NAME} BASE_NAME_LOWER)
# Default options
set(EXPORT_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_EXPORT")
set(NO_EXPORT_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_NO_EXPORT")
set(EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME_LOWER}_export.h")
set(DEPRECATED_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_DEPRECATED")
set(STATIC_DEFINE "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_STATIC_DEFINE")
set(NO_DEPRECATED_MACRO_NAME
"${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_NO_DEPRECATED")
if(_GEH_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown keywords given to GENERATE_EXPORT_HEADER(): \"${_GEH_UNPARSED_ARGUMENTS}\"")
endif()
if(_GEH_EXPORT_MACRO_NAME)
set(EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_EXPORT_MACRO_NAME})
endif()
if(_GEH_EXPORT_FILE_NAME)
if(IS_ABSOLUTE _GEH_EXPORT_FILE_NAME)
set(EXPORT_FILE_NAME ${_GEH_EXPORT_FILE_NAME})
else()
set(EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/${_GEH_EXPORT_FILE_NAME}")
endif()
endif()
if(_GEH_DEPRECATED_MACRO_NAME)
set(DEPRECATED_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_DEPRECATED_MACRO_NAME})
endif()
if(_GEH_NO_EXPORT_MACRO_NAME)
set(NO_EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_NO_EXPORT_MACRO_NAME})
endif()
if(_GEH_STATIC_DEFINE)
set(STATIC_DEFINE ${_GEH_PREFIX_NAME}${_GEH_STATIC_DEFINE})
endif()
if(_GEH_DEFINE_NO_DEPRECATED)
set(DEFINE_NO_DEPRECATED TRUE)
endif()
if(_GEH_NO_DEPRECATED_MACRO_NAME)
set(NO_DEPRECATED_MACRO_NAME
${_GEH_PREFIX_NAME}${_GEH_NO_DEPRECATED_MACRO_NAME})
endif()
set(INCLUDE_GUARD_NAME "${EXPORT_MACRO_NAME}_H")
get_target_property(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY} DEFINE_SYMBOL)
if(NOT EXPORT_IMPORT_CONDITION)
set(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY}_EXPORTS)
endif()
configure_file("${_GENERATE_EXPORT_HEADER_MODULE_DIR}/exportheader.cmake.in"
"${EXPORT_FILE_NAME}" @ONLY)
endmacro()
function(GENERATE_EXPORT_HEADER TARGET_LIBRARY)
get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
if(${type} STREQUAL "MODULE")
message(WARNING "This macro should not be used with libraries of type MODULE")
return()
endif()
if(NOT ${type} STREQUAL "STATIC_LIBRARY" AND NOT ${type} STREQUAL "SHARED_LIBRARY")
message(WARNING "This macro can only be used with libraries")
return()
endif()
_test_compiler_hidden_visibility()
_test_compiler_has_deprecated()
_do_set_macro_values(${TARGET_LIBRARY})
_do_generate_export_header(${TARGET_LIBRARY} ${ARGN})
endfunction()
function(add_compiler_export_flags)
_test_compiler_hidden_visibility()
_test_compiler_has_deprecated()
if(NOT (USE_COMPILER_HIDDEN_VISIBILITY AND COMPILER_HAS_HIDDEN_VISIBILITY))
# Just return if there are no flags to add.
return()
endif()
set (EXTRA_FLAGS "-fvisibility=hidden")
if(COMPILER_HAS_HIDDEN_INLINE_VISIBILITY)
set (EXTRA_FLAGS "${EXTRA_FLAGS} -fvisibility-inlines-hidden")
endif()
# Either return the extra flags needed in the supplied argument, or to the
# CMAKE_CXX_FLAGS if no argument is supplied.
if(ARGV0)
set(${ARGV0} "${EXTRA_FLAGS}" PARENT_SCOPE)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}" PARENT_SCOPE)
endif()
endfunction()

@ -24,7 +24,7 @@
# PARENT_SCOPE. # PARENT_SCOPE.
# #
# GET_PREREQUISITES(<target> <prerequisites_var> <exclude_system> <recurse> # GET_PREREQUISITES(<target> <prerequisites_var> <exclude_system> <recurse>
# <dirs>) # <exepath> <dirs>)
# Get the list of shared library files required by <target>. The list in # Get the list of shared library files required by <target>. The list in
# the variable named <prerequisites_var> should be empty on first entry to # the variable named <prerequisites_var> should be empty on first entry to
# this function. On exit, <prerequisites_var> will contain the list of # this function. On exit, <prerequisites_var> will contain the list of

@ -141,36 +141,46 @@ IF(MSVC)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC90) ENDIF(MSVC90)
IF(MSVC10) MACRO(MSVCRT_FILES_FOR_VERSION version)
SET(v "${version}")
# Find the runtime library redistribution directory. # Find the runtime library redistribution directory.
GET_FILENAME_COMPONENT(msvc_install_dir GET_FILENAME_COMPONENT(msvc_install_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]" ABSOLUTE) "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${v}.0;InstallDir]" ABSOLUTE)
FIND_PATH(MSVC10_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT FIND_PATH(MSVC${v}_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT
PATHS PATHS
"${msvc_install_dir}/../../VC/redist" "${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist" "${base_dir}/VC/redist"
"$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/VC/redist" "$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist"
"$ENV{ProgramFiles(x86)}/Microsoft Visual Studio 10.0/VC/redist" "$ENV{ProgramFiles(x86)}/Microsoft Visual Studio ${v}.0/VC/redist"
) )
MARK_AS_ADVANCED(MSVC10_REDIST_DIR) MARK_AS_ADVANCED(MSVC${v}_REDIST_DIR)
SET(MSVC10_CRT_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT") SET(MSVC${v}_CRT_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT")
IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
SET(__install__libs SET(__install__libs
"${MSVC10_CRT_DIR}/msvcp100.dll" "${MSVC${v}_CRT_DIR}/msvcp${v}0.dll"
"${MSVC10_CRT_DIR}/msvcr100.dll" "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll"
) )
ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES) IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_CRT_DIR SET(MSVC${v}_CRT_DIR
"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugCRT") "${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugCRT")
SET(__install__libs ${__install__libs} SET(__install__libs ${__install__libs}
"${MSVC10_CRT_DIR}/msvcp100d.dll" "${MSVC${v}_CRT_DIR}/msvcp${v}0d.dll"
"${MSVC10_CRT_DIR}/msvcr100d.dll" "${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll"
) )
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC10) ENDMACRO()
IF(MSVC10)
MSVCRT_FILES_FOR_VERSION(10)
ENDIF()
IF(MSVC11)
MSVCRT_FILES_FOR_VERSION(11)
ENDIF()
IF(CMAKE_INSTALL_MFC_LIBRARIES) IF(CMAKE_INSTALL_MFC_LIBRARIES)
IF(MSVC70) IF(MSVC70)
@ -273,42 +283,52 @@ IF(MSVC)
) )
ENDIF(MSVC90) ENDIF(MSVC90)
IF(MSVC10) MACRO(MFC_FILES_FOR_VERSION version)
SET(v "${version}")
IF(CMAKE_INSTALL_DEBUG_LIBRARIES) IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_MFC_DIR SET(MSVC${v}_MFC_DIR
"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugMFC") "${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugMFC")
SET(__install__libs ${__install__libs} SET(__install__libs ${__install__libs}
"${MSVC10_MFC_DIR}/mfc100d.dll" "${MSVC${v}_MFC_DIR}/mfc${v}0d.dll"
"${MSVC10_MFC_DIR}/mfc100ud.dll" "${MSVC${v}_MFC_DIR}/mfc${v}0ud.dll"
"${MSVC10_MFC_DIR}/mfcm100d.dll" "${MSVC${v}_MFC_DIR}/mfcm${v}0d.dll"
"${MSVC10_MFC_DIR}/mfcm100ud.dll" "${MSVC${v}_MFC_DIR}/mfcm${v}0ud.dll"
) )
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_MFC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFC") SET(MSVC${v}_MFC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFC")
IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
SET(__install__libs ${__install__libs} SET(__install__libs ${__install__libs}
"${MSVC10_MFC_DIR}/mfc100.dll" "${MSVC${v}_MFC_DIR}/mfc${v}0.dll"
"${MSVC10_MFC_DIR}/mfc100u.dll" "${MSVC${v}_MFC_DIR}/mfc${v}0u.dll"
"${MSVC10_MFC_DIR}/mfcm100.dll" "${MSVC${v}_MFC_DIR}/mfcm${v}0.dll"
"${MSVC10_MFC_DIR}/mfcm100u.dll" "${MSVC${v}_MFC_DIR}/mfcm${v}0u.dll"
) )
ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
# include the language dll's for vs10 as well as the actuall dll's # include the language dll's as well as the actuall dll's
SET(MSVC10_MFCLOC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFCLOC") SET(MSVC${v}_MFCLOC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFCLOC")
SET(__install__libs ${__install__libs} SET(__install__libs ${__install__libs}
"${MSVC10_MFCLOC_DIR}/mfc100chs.dll" "${MSVC${v}_MFCLOC_DIR}/mfc${v}0chs.dll"
"${MSVC10_MFCLOC_DIR}/mfc100cht.dll" "${MSVC${v}_MFCLOC_DIR}/mfc${v}0cht.dll"
"${MSVC10_MFCLOC_DIR}/mfc100enu.dll" "${MSVC${v}_MFCLOC_DIR}/mfc${v}0enu.dll"
"${MSVC10_MFCLOC_DIR}/mfc100esp.dll" "${MSVC${v}_MFCLOC_DIR}/mfc${v}0esp.dll"
"${MSVC10_MFCLOC_DIR}/mfc100deu.dll" "${MSVC${v}_MFCLOC_DIR}/mfc${v}0deu.dll"
"${MSVC10_MFCLOC_DIR}/mfc100fra.dll" "${MSVC${v}_MFCLOC_DIR}/mfc${v}0fra.dll"
"${MSVC10_MFCLOC_DIR}/mfc100ita.dll" "${MSVC${v}_MFCLOC_DIR}/mfc${v}0ita.dll"
"${MSVC10_MFCLOC_DIR}/mfc100jpn.dll" "${MSVC${v}_MFCLOC_DIR}/mfc${v}0jpn.dll"
"${MSVC10_MFCLOC_DIR}/mfc100kor.dll" "${MSVC${v}_MFCLOC_DIR}/mfc${v}0kor.dll"
) )
ENDIF(MSVC10) ENDMACRO()
IF(MSVC10)
MFC_FILES_FOR_VERSION(10)
ENDIF()
IF(MSVC11)
MFC_FILES_FOR_VERSION(11)
ENDIF()
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES) ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
FOREACH(lib FOREACH(lib
@ -330,6 +350,40 @@ IF(MSVC)
ENDFOREACH(lib) ENDFOREACH(lib)
ENDIF(MSVC) ENDIF(MSVC)
IF(WATCOM)
GET_FILENAME_COMPONENT( CompilerPath ${CMAKE_C_COMPILER} PATH )
IF(WATCOM17)
SET( __install__libs ${CompilerPath}/clbr17.dll
${CompilerPath}/mt7r17.dll ${CompilerPath}/plbr17.dll )
ENDIF()
IF(WATCOM18)
SET( __install__libs ${CompilerPath}/clbr18.dll
${CompilerPath}/mt7r18.dll ${CompilerPath}/plbr18.dll )
ENDIF()
IF(WATCOM19)
SET( __install__libs ${CompilerPath}/clbr19.dll
${CompilerPath}/mt7r19.dll ${CompilerPath}/plbr19.dll )
ENDIF()
FOREACH(lib
${__install__libs}
)
IF(EXISTS ${lib})
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
ELSE()
IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
MESSAGE(WARNING "system runtime library file does not exist: '${lib}'")
# This warning indicates an incomplete Watcom installation
# or a bug somewhere above here in this file.
# If you would like to avoid this warning, fix the real problem, or
# set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
# this file.
ENDIF()
ENDIF()
ENDFOREACH()
ENDIF()
# Include system runtime libraries in the installation if any are # Include system runtime libraries in the installation if any are
# specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS. # specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)

@ -0,0 +1,7 @@
cmake_minimum_required (VERSION 2.8)
project(IntelFortranImplicit Fortran)
add_custom_command(
OUTPUT output.cmake
COMMAND ${CMAKE_COMMAND} -P ${IntelFortranImplicit_SOURCE_DIR}/detect.cmake
)
add_library(FortranLib hello.f output.cmake)

@ -0,0 +1,9 @@
# look at each path and try to find ifconsol.lib
set(LIB "$ENV{LIB}")
foreach(dir ${LIB})
file(TO_CMAKE_PATH "${dir}" dir)
if(EXISTS "${dir}/ifconsol.lib")
file(WRITE output.cmake "list(APPEND implicit_dirs \"${dir}\")\n")
break()
endif()
endforeach()

@ -74,7 +74,7 @@ Var AR_RegFlags
ClearErrors ClearErrors
;Reading component status from registry ;Reading component status from registry
ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" "Installed" ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed"
IfErrors "default_${SecName}" IfErrors "default_${SecName}"
;Status will stay default if registry value not found ;Status will stay default if registry value not found
;(component was never installed) ;(component was never installed)
@ -107,13 +107,13 @@ Var AR_RegFlags
;Section is not selected: ;Section is not selected:
;Calling Section uninstall macro and writing zero installed flag ;Calling Section uninstall macro and writing zero installed flag
!insertmacro "Remove_${${SecName}}" !insertmacro "Remove_${${SecName}}"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
"Installed" 0 "Installed" 0
Goto "exit_${SecName}" Goto "exit_${SecName}"
"leave_${SecName}:" "leave_${SecName}:"
;Section is selected: ;Section is selected:
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
"Installed" 1 "Installed" 1
"exit_${SecName}:" "exit_${SecName}:"
@ -493,7 +493,7 @@ Function ConditionalAddToRegisty
Pop $0 Pop $0
Pop $1 Pop $1
StrCmp "$0" "" ConditionalAddToRegisty_EmptyString StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" \ WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \
"$1" "$0" "$1" "$0"
;MessageBox MB_OK "Set Registry: '$1' to '$0'" ;MessageBox MB_OK "Set Registry: '$1' to '$0'"
DetailPrint "Set install registry entry: '$1' to '$0'" DetailPrint "Set install registry entry: '$1' to '$0'"
@ -804,17 +804,17 @@ FunctionEnd
Section "Uninstall" Section "Uninstall"
ReadRegStr $START_MENU SHCTX \ ReadRegStr $START_MENU SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "StartMenu" "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu"
;MessageBox MB_OK "Start menu is in: $START_MENU" ;MessageBox MB_OK "Start menu is in: $START_MENU"
ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \ ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "DoNotAddToPath" "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "DoNotAddToPath"
ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \ ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathAllUsers" "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathAllUsers"
ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \ ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathCurrentUser" "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathCurrentUser"
;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS" ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
ReadRegStr $INSTALL_DESKTOP SHCTX \ ReadRegStr $INSTALL_DESKTOP SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "InstallToDesktop" "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "InstallToDesktop"
;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP " ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@ @CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
@ -831,7 +831,7 @@ Section "Uninstall"
;Remove the uninstaller itself. ;Remove the uninstaller itself.
Delete "$INSTDIR\Uninstall.exe" Delete "$INSTDIR\Uninstall.exe"
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
;Remove the installation directory if it is empty. ;Remove the installation directory if it is empty.
RMDir "$INSTDIR" RMDir "$INSTDIR"

@ -0,0 +1 @@
include(Platform/AIX-XL-Fortran)

@ -85,20 +85,23 @@ set(CMAKE_DL_LIBS "dl")
macro(__BlueGeneP_set_dynamic_flags compiler_id lang) macro(__BlueGeneP_set_dynamic_flags compiler_id lang)
if (${compiler_id} STREQUAL XL) if (${compiler_id} STREQUAL XL)
# Flags for XL compilers if we explicitly detected XL # Flags for XL compilers if we explicitly detected XL
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-qpic") # -pic set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-qpic")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-qmkshrobj -qnostaticlink") # -shared set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-qmkshrobj -qnostaticlink")
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-rpath,") # -rpath set(BGP_${lang}_DYNAMIC_EXE_FLAGS "-qnostaticlink -qnostaticlink=libgcc")
set(BGP_${lang}_DYNAMIC_EXE_FLAGS "-qnostaticlink -qnostaticlink=libgcc")
else() else()
# Assume flags for GNU compilers (if the ID is GNU *or* anything else). # Assume flags for GNU compilers (if the ID is GNU *or* anything else).
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC") # -pic set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared") # -shared set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-rpath,") # -rpath set(BGP_${lang}_DYNAMIC_EXE_FLAGS "-dynamic")
set(BGP_${lang}_DYNAMIC_EXE_FLAGS "-dynamic")
endif() endif()
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "") # +s, flag for exe link to use shared lib # Both toolchains use the GNU linker on BG/P, so these options are shared.
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") # : or empty set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-rpath,")
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_${lang}_FLAG "-Wl,-rpath-link,")
set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,-soname,")
set(CMAKE_EXE_EXPORTS_${lang}_FLAG "-Wl,--export-dynamic")
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "") # +s, flag for exe link to use shared lib
set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") # : or empty
set(BGP_${lang}_DEFAULT_EXE_FLAGS set(BGP_${lang}_DEFAULT_EXE_FLAGS
"<FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") "<FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")

@ -187,11 +187,13 @@ IF(XCODE)
SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX) SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
ENDIF(XCODE) ENDIF(XCODE)
# Need to list dependent shared libraries on link line. When building IF("${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5")
# with -isysroot (for universal binaries), the linker always looks for # Need to list dependent shared libraries on link line. When building
# dependent libraries under the sysroot. Listing them on the link # with -isysroot (for universal binaries), the linker always looks for
# line works around the problem. # dependent libraries under the sysroot. Listing them on the link
SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1) # line works around the problem.
SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1)
ENDIF()
SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)

@ -0,0 +1,3 @@
@echo off
call "@CMAKE_GNUtoMS_BAT@"
lib /machine:"@CMAKE_GNUtoMS_ARCH@" %*

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save