Merge branch 'experimental'
This commit is contained in:
commit
95dd4ecd87
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -13,4 +13,8 @@ configure crlf=input
|
|||||||
*.sln -crlf
|
*.sln -crlf
|
||||||
*.vcproj -crlf
|
*.vcproj -crlf
|
||||||
|
|
||||||
debian/changelog merge=dpkg-mergechangelogs
|
*.c whitespace=tab-in-indent
|
||||||
|
*.h whitespace=tab-in-indent
|
||||||
|
*.cxx whitespace=tab-in-indent
|
||||||
|
*.txt whitespace=tab-in-indent
|
||||||
|
*.cmake whitespace=tab-in-indent
|
||||||
|
@ -69,18 +69,25 @@ MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES)
|
|||||||
CACHE BOOL "Use system-installed expat" FORCE)
|
CACHE BOOL "Use system-installed expat" FORCE)
|
||||||
SET(CMAKE_USE_SYSTEM_ZLIB "${CMAKE_USE_SYSTEM_LIBRARIES}"
|
SET(CMAKE_USE_SYSTEM_ZLIB "${CMAKE_USE_SYSTEM_LIBRARIES}"
|
||||||
CACHE BOOL "Use system-installed zlib" FORCE)
|
CACHE BOOL "Use system-installed zlib" FORCE)
|
||||||
|
SET(CMAKE_USE_SYSTEM_BZIP2 "${CMAKE_USE_SYSTEM_LIBRARIES}"
|
||||||
|
CACHE BOOL "Use system-installed bzip2" FORCE)
|
||||||
|
SET(CMAKE_USE_SYSTEM_LIBARCHIVE "${CMAKE_USE_SYSTEM_LIBRARIES}"
|
||||||
|
CACHE BOOL "Use system-installed libarchive" FORCE)
|
||||||
ENDIF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
|
ENDIF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
|
||||||
|
|
||||||
# Optionally use system utility libraries.
|
# Optionally use system utility libraries.
|
||||||
|
OPTION(CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" ${CMAKE_USE_SYSTEM_LIBRARIES})
|
||||||
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl"
|
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl"
|
||||||
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CTEST_USE_XMLRPC" ON)
|
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CTEST_USE_XMLRPC" ON)
|
||||||
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat"
|
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat"
|
||||||
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CTEST_USE_XMLRPC" ON)
|
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CTEST_USE_XMLRPC" ON)
|
||||||
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
|
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
|
||||||
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_CURL" ON)
|
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_LIBARCHIVE;NOT CMAKE_USE_SYSTEM_CURL" ON)
|
||||||
|
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_BZIP2 "Use system-installed bzip2"
|
||||||
|
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_LIBARCHIVE" ON)
|
||||||
|
|
||||||
# Mention to the user what system libraries are being used.
|
# Mention to the user what system libraries are being used.
|
||||||
FOREACH(util CURL EXPAT XMLRPC ZLIB)
|
FOREACH(util BZIP2 CURL EXPAT LIBARCHIVE ZLIB)
|
||||||
IF(CMAKE_USE_SYSTEM_${util})
|
IF(CMAKE_USE_SYSTEM_${util})
|
||||||
MESSAGE(STATUS "Using system-installed ${util}")
|
MESSAGE(STATUS "Using system-installed ${util}")
|
||||||
ENDIF(CMAKE_USE_SYSTEM_${util})
|
ENDIF(CMAKE_USE_SYSTEM_${util})
|
||||||
@ -173,6 +180,36 @@ MACRO(CMAKE_SETUP_TESTING)
|
|||||||
ENDMACRO(CMAKE_SETUP_TESTING)
|
ENDMACRO(CMAKE_SETUP_TESTING)
|
||||||
|
|
||||||
|
|
||||||
|
# Provide a way for Visual Studio Express users to turn OFF the new FOLDER
|
||||||
|
# organization feature. Default to ON for non-Express users. Express users must
|
||||||
|
# explicitly turn off this option to build CMake in the Express IDE...
|
||||||
|
#
|
||||||
|
OPTION(CMAKE_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
|
||||||
|
MARK_AS_ADVANCED(CMAKE_USE_FOLDERS)
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
# a macro that only sets the FOLDER target property if it's
|
||||||
|
# "appropriate"
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
MACRO(CMAKE_SET_TARGET_FOLDER tgt folder)
|
||||||
|
IF(CMAKE_USE_FOLDERS)
|
||||||
|
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
|
# Really, I just want this to be an "if(TARGET ${tgt})" ...
|
||||||
|
# but I'm not sure that our min req'd., CMake 2.4.5 can handle
|
||||||
|
# that... so I'm just activating this for now, with a version
|
||||||
|
# compare, and only for MSVC builds.
|
||||||
|
IF(MSVC)
|
||||||
|
IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.8)
|
||||||
|
SET_PROPERTY(TARGET "${tgt}" PROPERTY FOLDER "${folder}")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
ELSE()
|
||||||
|
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS OFF)
|
||||||
|
ENDIF()
|
||||||
|
ENDMACRO(CMAKE_SET_TARGET_FOLDER)
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# a macro to build the utilities used by CMake
|
# a macro to build the utilities used by CMake
|
||||||
@ -192,7 +229,17 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
|
SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
|
||||||
SET(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}")
|
SET(KWSYS_INSTALL_DOC_DIR "${CMake_DOC_DEST}")
|
||||||
ADD_SUBDIRECTORY(Source/kwsys)
|
ADD_SUBDIRECTORY(Source/kwsys)
|
||||||
|
SET(kwsys_folder "Utilities/KWSys")
|
||||||
|
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${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}ProcessFwd9x "${kwsys_folder}")
|
||||||
|
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}")
|
||||||
|
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}")
|
||||||
|
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}")
|
||||||
|
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}")
|
||||||
|
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}")
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
# Setup third-party libraries.
|
# Setup third-party libraries.
|
||||||
# Everything in the tree should be able to include files from the
|
# Everything in the tree should be able to include files from the
|
||||||
@ -221,6 +268,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
SET(CMAKE_ZLIB_INCLUDES)
|
SET(CMAKE_ZLIB_INCLUDES)
|
||||||
SET(CMAKE_ZLIB_LIBRARIES cmzlib)
|
SET(CMAKE_ZLIB_LIBRARIES cmzlib)
|
||||||
ADD_SUBDIRECTORY(Utilities/cmzlib)
|
ADD_SUBDIRECTORY(Utilities/cmzlib)
|
||||||
|
CMAKE_SET_TARGET_FOLDER(cmzlib "Utilities/3rdParty")
|
||||||
ENDIF(CMAKE_USE_SYSTEM_ZLIB)
|
ENDIF(CMAKE_USE_SYSTEM_ZLIB)
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
@ -247,6 +295,8 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
SET(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php")
|
SET(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php")
|
||||||
ENDIF(CMAKE_TESTS_CDASH_SERVER)
|
ENDIF(CMAKE_TESTS_CDASH_SERVER)
|
||||||
ADD_SUBDIRECTORY(Utilities/cmcurl)
|
ADD_SUBDIRECTORY(Utilities/cmcurl)
|
||||||
|
CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty")
|
||||||
|
CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty")
|
||||||
ENDIF(CMAKE_USE_SYSTEM_CURL)
|
ENDIF(CMAKE_USE_SYSTEM_CURL)
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
@ -255,6 +305,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
"${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress")
|
"${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress")
|
||||||
SET(CMAKE_COMPRESS_LIBRARIES "cmcompress")
|
SET(CMAKE_COMPRESS_LIBRARIES "cmcompress")
|
||||||
ADD_SUBDIRECTORY(Utilities/cmcompress)
|
ADD_SUBDIRECTORY(Utilities/cmcompress)
|
||||||
|
CMAKE_SET_TARGET_FOLDER(cmcompress "Utilities/3rdParty")
|
||||||
IF(CMAKE_USE_SYSTEM_BZIP2)
|
IF(CMAKE_USE_SYSTEM_BZIP2)
|
||||||
FIND_PACKAGE(BZip2)
|
FIND_PACKAGE(BZip2)
|
||||||
ELSE()
|
ELSE()
|
||||||
@ -262,10 +313,22 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmbzip2")
|
"${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmbzip2")
|
||||||
SET(BZIP2_LIBRARIES cmbzip2)
|
SET(BZIP2_LIBRARIES cmbzip2)
|
||||||
ADD_SUBDIRECTORY(Utilities/cmbzip2)
|
ADD_SUBDIRECTORY(Utilities/cmbzip2)
|
||||||
|
CMAKE_SET_TARGET_FOLDER(cmbzip2 "Utilities/3rdParty")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
# Build or use system libarchive for CMake and CTest.
|
||||||
IF(CMAKE_USE_SYSTEM_LIBARCHIVE)
|
IF(CMAKE_USE_SYSTEM_LIBARCHIVE)
|
||||||
FIND_PACKAGE(libarchive)
|
IF(EXISTS ${CMAKE_ROOT}/Modules/FindLibArchive.cmake)
|
||||||
SET(CMAKE_TAR_LIBRARIES libarchive)
|
FIND_PACKAGE(LibArchive)
|
||||||
|
ELSE()
|
||||||
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
|
||||||
|
INCLUDE(${CMake_SOURCE_DIR}/Modules/FindLibArchive.cmake)
|
||||||
|
ENDIF()
|
||||||
|
IF(NOT LibArchive_FOUND)
|
||||||
|
MESSAGE(FATAL_ERROR "CMAKE_USE_SYSTEM_LIBARCHIVE is ON but LibArchive is not found!")
|
||||||
|
ENDIF()
|
||||||
|
SET(CMAKE_TAR_LIBRARIES ${LibArchive_LIBRARIES})
|
||||||
ELSE(CMAKE_USE_SYSTEM_LIBARCHIVE)
|
ELSE(CMAKE_USE_SYSTEM_LIBARCHIVE)
|
||||||
SET(HAVE_LIBZ 1)
|
SET(HAVE_LIBZ 1)
|
||||||
SET(HAVE_ZLIB_H 1)
|
SET(HAVE_ZLIB_H 1)
|
||||||
@ -275,6 +338,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
SET(BUILD_ARCHIVE_WITHIN_CMAKE TRUE)
|
SET(BUILD_ARCHIVE_WITHIN_CMAKE TRUE)
|
||||||
ADD_DEFINITIONS(-DLIBARCHIVE_STATIC)
|
ADD_DEFINITIONS(-DLIBARCHIVE_STATIC)
|
||||||
ADD_SUBDIRECTORY(Utilities/cmlibarchive)
|
ADD_SUBDIRECTORY(Utilities/cmlibarchive)
|
||||||
|
CMAKE_SET_TARGET_FOLDER(cmlibarchive "Utilities/3rdParty")
|
||||||
SET(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
|
SET(CMAKE_TAR_LIBRARIES cmlibarchive ${BZIP2_LIBRARIES})
|
||||||
ENDIF(CMAKE_USE_SYSTEM_LIBARCHIVE)
|
ENDIF(CMAKE_USE_SYSTEM_LIBARCHIVE)
|
||||||
|
|
||||||
@ -292,6 +356,7 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
SET(CMAKE_EXPAT_INCLUDES)
|
SET(CMAKE_EXPAT_INCLUDES)
|
||||||
SET(CMAKE_EXPAT_LIBRARIES cmexpat)
|
SET(CMAKE_EXPAT_LIBRARIES cmexpat)
|
||||||
ADD_SUBDIRECTORY(Utilities/cmexpat)
|
ADD_SUBDIRECTORY(Utilities/cmexpat)
|
||||||
|
CMAKE_SET_TARGET_FOLDER(cmexpat "Utilities/3rdParty")
|
||||||
ENDIF(CMAKE_USE_SYSTEM_EXPAT)
|
ENDIF(CMAKE_USE_SYSTEM_EXPAT)
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
@ -330,7 +395,21 @@ MACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
ENDIF(BUILD_CursesDialog)
|
ENDIF(BUILD_CursesDialog)
|
||||||
ENDMACRO (CMAKE_BUILD_UTILITIES)
|
ENDMACRO (CMAKE_BUILD_UTILITIES)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
IF(CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
|
||||||
|
EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER}
|
||||||
|
${CMAKE_CXX_COMPILER_ARG1} -dumpversion
|
||||||
|
OUTPUT_VARIABLE _GXX_VERSION
|
||||||
|
)
|
||||||
|
STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
|
||||||
|
_GXX_VERSION_SHORT ${_GXX_VERSION})
|
||||||
|
IF(_GXX_VERSION_SHORT EQUAL 33)
|
||||||
|
MESSAGE(FATAL_ERROR
|
||||||
|
"GXX 3.3 on OpenBSD is known to cause CPack to Crash.\n"
|
||||||
|
"Please use GXX 4.2 or greater to build CMake on OpenBSD\n"
|
||||||
|
"${CMAKE_CXX_COMPILER} version is: ${_GXX_VERSION}")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# The main section of the CMakeLists file
|
# The main section of the CMakeLists file
|
||||||
@ -339,7 +418,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
# 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 2)
|
SET(CMake_VERSION_PATCH 3)
|
||||||
SET(CMake_VERSION_TWEAK 0)
|
SET(CMake_VERSION_TWEAK 0)
|
||||||
#SET(CMake_VERSION_RC 4)
|
#SET(CMake_VERSION_RC 4)
|
||||||
|
|
||||||
@ -521,6 +600,10 @@ ADD_SUBDIRECTORY(Source)
|
|||||||
ADD_SUBDIRECTORY(Utilities)
|
ADD_SUBDIRECTORY(Utilities)
|
||||||
ADD_SUBDIRECTORY(Tests)
|
ADD_SUBDIRECTORY(Tests)
|
||||||
|
|
||||||
|
CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests")
|
||||||
|
CMAKE_SET_TARGET_FOLDER(cmw9xcom "Utilities/Win9xCompat")
|
||||||
|
CMAKE_SET_TARGET_FOLDER(documentation "Documentation")
|
||||||
|
|
||||||
# add a test
|
# add a test
|
||||||
ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
|
ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
|
||||||
--system-information -G "${CMAKE_TEST_GENERATOR}" )
|
--system-information -G "${CMAKE_TEST_GENERATOR}" )
|
||||||
|
410
ChangeLog.manual
410
ChangeLog.manual
@ -1,3 +1,413 @@
|
|||||||
|
No changes in CMake 2.8.3 since 2.8.3-rc4.
|
||||||
|
|
||||||
|
Changes in CMake 2.8.3-rc4 (since 2.8.3-rc3)
|
||||||
|
--------------------------------------------
|
||||||
|
Bill Hoffman (1):
|
||||||
|
When processing DartMeasurements use the tests working directory.
|
||||||
|
|
||||||
|
David Cole (2):
|
||||||
|
ExternalProject: No svn --username if empty (#11173)
|
||||||
|
Avoid problem reading jni.h on Macs.
|
||||||
|
|
||||||
|
David Partyka (5):
|
||||||
|
Fixed appending PATH to dumpbin tool from growing without bounds.
|
||||||
|
Switch to CMAKE_PATH when doing PATH comparisons on Windows.
|
||||||
|
Remove unecessary TO_CMAKE_PATH for gp_cmd_dir.
|
||||||
|
Append the gp_tool path to the system PATH using native slashes.
|
||||||
|
Fixes to GetPrerequisites for cygwin
|
||||||
|
|
||||||
|
Eric NOULARD (1):
|
||||||
|
CPackDeb Added several optional debian binary package fields
|
||||||
|
|
||||||
|
Marcus D. Hanwell (2):
|
||||||
|
ENH: Added case for Python 2.7.
|
||||||
|
Fixed parallel build for generators with EXTRA.
|
||||||
|
|
||||||
|
Changes in CMake 2.8.3-rc3 (since 2.8.3-rc2)
|
||||||
|
--------------------------------------------
|
||||||
|
Alex Neundorf (4):
|
||||||
|
Remove trailing whitespace
|
||||||
|
Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)
|
||||||
|
Use absolute path to FindPackageHandleStandardArgs.cmake everywhere
|
||||||
|
CodeBlocks Generator: Do not omit files in the project file listing.
|
||||||
|
|
||||||
|
Brad King (4):
|
||||||
|
VS10: Order .vcxproj dependencies deterministically (#10502)
|
||||||
|
Document ENABLE_EXPORTS behavior on Mac (#11295)
|
||||||
|
FindHDF5: Fix typo in parallel-IO support check (#11291)
|
||||||
|
Xcode: Recognize .hh as C++ (#11307)
|
||||||
|
|
||||||
|
Clinton Stimpson (1):
|
||||||
|
Find imports dir in Qt 4.7
|
||||||
|
|
||||||
|
David Partyka (1):
|
||||||
|
Update module to locate newely released MS MPI HPC Pack R2.
|
||||||
|
|
||||||
|
Philip Lowman (1):
|
||||||
|
Remove superfluous variable Boost_COMPAT_STATIC_RUNTIME.
|
||||||
|
|
||||||
|
Rolf Eike Beer (2):
|
||||||
|
FindSubversion: Fix for German localized client (#11273)
|
||||||
|
FindSubversion: Use C locale to detect version (#11273)
|
||||||
|
|
||||||
|
Changes in CMake 2.8.3-rc2 (since 2.8.3-rc1)
|
||||||
|
--------------------------------------------
|
||||||
|
Alex Neundorf (5):
|
||||||
|
APPEND and not-APPEND mode of feature_summary() were swapped
|
||||||
|
Set a default DESCRIPTION if none is given for ALL mode of feature_summary()
|
||||||
|
Close ENDFUNCTION() properly with the same name as FUNCTION()
|
||||||
|
Make cmake-gui remember whether the "Advanced" checkbox was checked or not
|
||||||
|
Also store the required version number in the details message.
|
||||||
|
|
||||||
|
Ben Boeckel (3):
|
||||||
|
Add test that CMake errors with empty libs
|
||||||
|
Fix which string is checked for in the test
|
||||||
|
XCode generation should fail if lang isn't known
|
||||||
|
|
||||||
|
Bill Hoffman (5):
|
||||||
|
Fix the name of the variable being tested.
|
||||||
|
Fix KWStyle line length issues.
|
||||||
|
Add a delay after untar on windows to make external project work on windows 7
|
||||||
|
Add a new line to the end of the generated main.cxx for the hpux compiler.
|
||||||
|
Fix for bug #11274, VS10 custom commands that create files in INTDIR fix.
|
||||||
|
|
||||||
|
Brad King (12):
|
||||||
|
Evaluate <OBJECT_DIR> rule variable for executables
|
||||||
|
ccmake: Fix search with '/'
|
||||||
|
MinGW: Support long object file lists
|
||||||
|
Document IMPORTED_NO_SONAME target property
|
||||||
|
FindMPI: Recoginze -f flags from mpicc (#10771)
|
||||||
|
Add module-dir flag for Compaq Visual Fortran (#11248)
|
||||||
|
FindPythonInterp: Look for python2.7 interpreter
|
||||||
|
VS10: Use $(IntDir) for per-source output directory (#11270)
|
||||||
|
Reset platform/compiler info status for each language
|
||||||
|
Remove trailing whitespace from Xcode generator source
|
||||||
|
VS10: Skip targets with no linker language (#11230)
|
||||||
|
VS10: Encode custom command comments for echo (#11283)
|
||||||
|
|
||||||
|
Clinton Stimpson (1):
|
||||||
|
Fix regression in cross-compile patches with finding Qt libs.
|
||||||
|
|
||||||
|
David Cole (7):
|
||||||
|
Enable calling commands with : in argv[1] (#9963)
|
||||||
|
No extra spaces in CustomCommand test (#9963)
|
||||||
|
Avoid CustomCommand test failure on VS71 (#9963)
|
||||||
|
Update release scripts.
|
||||||
|
Avoid CustomCommand test failure on VS71 (#9963)
|
||||||
|
Honor MAKECOMMAND value saved in cache (#11026)
|
||||||
|
New USE_FOLDERS property OFF by default. (#3796)
|
||||||
|
|
||||||
|
David Gobbi (1):
|
||||||
|
Set the module prefix, updated Windows suffix.
|
||||||
|
|
||||||
|
Eric NOULARD (2):
|
||||||
|
InstallGen/CPack fix handling absolute installed file regression
|
||||||
|
CPackRPM Handle parenthesis in CPACK_SYSTEM_NAME (fix bug 10737)
|
||||||
|
|
||||||
|
James Bigler (2):
|
||||||
|
Fix for bug 0011263.
|
||||||
|
Allow -g3 for CUDA v3.0+.
|
||||||
|
|
||||||
|
Mikkel Krautz (2):
|
||||||
|
Xcode: Avoid trailing space in ARCHS list (#11244)
|
||||||
|
Xcode: Quote string values containing '$' (#11244)
|
||||||
|
|
||||||
|
Philip Lowman (12):
|
||||||
|
FindBoost.cmake fixes for issues 11204 & 8529
|
||||||
|
FindBoost.cmake: Miscellaneous changes and refactoring
|
||||||
|
FindBoost.cmake: Add Boost_NO_SYSTEM_PATHS option
|
||||||
|
FindBoost.cmake: Fix compiling against a boost source tree
|
||||||
|
FindBoost.cmake: Fixes 11246
|
||||||
|
FindBoost.cmake: Fixes 11121
|
||||||
|
FindBoost.cmake: Fixes 10436
|
||||||
|
FindBoost.cmake: Implements 11160
|
||||||
|
Fix 11136: [patch] FindThreads.cmake documents the wrong variable
|
||||||
|
FindBoost.cmake: Fix library search path glitch introduced in earlier commit
|
||||||
|
FindFLEX.cmake: Fix issue 11249
|
||||||
|
Fixes issue 11279: CMakeDetermineVSServicePack support for VS10
|
||||||
|
|
||||||
|
Yaakov Selkowitz (2):
|
||||||
|
FindFLTK*: Use Cygwin fltk on Cygwin (#11290)
|
||||||
|
Use 'uname -m' for processor on Cygwin (#10774)
|
||||||
|
|
||||||
|
Changes in CMake 2.8.3-rc1 (since 2.8.2)
|
||||||
|
----------------------------------------
|
||||||
|
Alex Neundorf (39):
|
||||||
|
fix build on SUSE 11.2 in cmcurl due to ssize_t
|
||||||
|
-add an additional name for finding libtiff on Windows
|
||||||
|
-fix typo in docs of deprecated MacroAddFileDependencies.cmake
|
||||||
|
add 2nd, more powerful mode to find_package_handle_standard_args()
|
||||||
|
-fix indentation of the documentation
|
||||||
|
Add version checking support to FindFlex and FindPerlLibs
|
||||||
|
FindSquish doesn't detect the version, remove that from the documentation
|
||||||
|
Improved version checking for FindRuby using the new mode of FPHSA()
|
||||||
|
Improved version checking for FindJava using the new FPHSA() mode
|
||||||
|
Fix DETAILS string with version number in FHPSA()
|
||||||
|
Improved version checking for FindSubversion using the new mode of FPHSA()
|
||||||
|
Improved version checking for FindCUDA using the new mode of FPHSA
|
||||||
|
Use FPHSA() in FindSWIG, including version checking.
|
||||||
|
Change documentation of Subversion_FOUND and SUBVERSION_FOUND.
|
||||||
|
Add macro CMakeParseArguments() and use it in FPHSA()
|
||||||
|
Fix ZLIB version parsing if no TWEAK version exists
|
||||||
|
Fix EclipseCDT include path parsing with spaces (#10868)
|
||||||
|
Fix EclipseCDT parsing of builtin macros with spaces (#10868)
|
||||||
|
Remove trailing spaces
|
||||||
|
Detect a COMPILER_ID also for ASM.
|
||||||
|
Add timeout to execute_process() in CMAKE_DETERMINE_COMPILER_ID().
|
||||||
|
Fix parsing of builtin macros so Eclipse handles them properly (#10868)
|
||||||
|
Log the required package version and major improvement to FeatureSummary
|
||||||
|
Improve documentation.
|
||||||
|
Improve wording of the documentation.
|
||||||
|
Add macro ADD_FEATURE_INFO() and improve docs.
|
||||||
|
Remove trailing whitespace
|
||||||
|
Make target_link_libraries() complain if bad target name is used
|
||||||
|
Just warn in case of a bad target as only argument for t_l_l()
|
||||||
|
Remove trailing whitespace
|
||||||
|
New CMP0016 for deciding whether an unknown target in TLL() is an error.
|
||||||
|
Record all considered Config files and their versions.
|
||||||
|
Improve error message in Config-mode when no appropriate version was found
|
||||||
|
Replace the two vector<string,string> with one vector<struct{string,string}>
|
||||||
|
Small cleanup of FindPackageHandleStandardArgs.cmake
|
||||||
|
Don't create an empty element at the end of Foo_CONSIDERED_CONFIGS/VERSIONS
|
||||||
|
Add option CONFIG_MODE to FPHSA()
|
||||||
|
Improve version notice in the generated message
|
||||||
|
Improve wording of the error message of find_package() in config-mode
|
||||||
|
|
||||||
|
Andrew Maclean (3):
|
||||||
|
Adding a FindPostgreSQL.cmake module
|
||||||
|
Forgot the copyright notice.
|
||||||
|
Changed ADDITIONAL_SEARCH_PATHS to PostgreSQL_ADDITIONAL_SEARCH_PATHS.
|
||||||
|
|
||||||
|
Arjen Verweij (1):
|
||||||
|
Pass objects to Intel linker using a response file
|
||||||
|
|
||||||
|
Bill Hoffman (9):
|
||||||
|
Disable gcc 33 on OpenBSD because it crashes CPack by default.
|
||||||
|
Fix for bug#10483, INCLUDE_EXTERNAL_MSPROJECT: ProjectGUID now ProjectGuid
|
||||||
|
Remove the ctest submit larget output test.
|
||||||
|
Let CMake recognize .CPP .CXX and .C++ as c++ files.
|
||||||
|
Fix for bug 10388, fix various default flags.
|
||||||
|
Only use .CPP .CXX and .C++ do not work by default with g+++.
|
||||||
|
Fix targets with . in the name for VS 10 IDE.
|
||||||
|
Only test for .CPP on Microsoft compilers which will handle .CPP as c++.
|
||||||
|
Allow testing of .CPP on WIN32 as it is a case insensitive OS and should work.
|
||||||
|
|
||||||
|
Brad King (69):
|
||||||
|
ExternalProject: Add LOG_* options to hide step output
|
||||||
|
FindMPI: Do not parse -l in middle of library name
|
||||||
|
FindMPI: Parse mpicc flags more carefully (#9093)
|
||||||
|
Fix or cast integer conversions in cmake
|
||||||
|
Begin post-2.8.2 development
|
||||||
|
FindMPI: Failure is not an error if not REQUIRED
|
||||||
|
FindMPI: Trust mpicc -showme on BlueGene/L
|
||||||
|
VS: Always separate preprocessor defs by semicolon (#10902)
|
||||||
|
KWSys: Cleanup putenv leak option implementation
|
||||||
|
KWSys: Pass ptrdiff_t check result to System.c
|
||||||
|
Fix or cast more integer conversions in cmake
|
||||||
|
Use same type in both cases of '?:' operator
|
||||||
|
FindMPI: Fix parsing of mpicc -Wl,-L link flags (#9093)
|
||||||
|
Fix signed/unsigned comparison warnings in ccmake
|
||||||
|
Fix integer conversions in cpack
|
||||||
|
bootstrap: Detect known C/C++ compiler toolchains
|
||||||
|
KWSys: Use short fallback timeout for Process tests
|
||||||
|
KWSys: Optionally suppress consistent test failures
|
||||||
|
KWSys: Avoid Clang optimizer bug in testProcess-[45]
|
||||||
|
Poison GCC 3.3 on OpenBSD a bit later
|
||||||
|
KWSys: Avoid undefined behavior in Process crash tests
|
||||||
|
Optionally use system bzip2 library (#10932)
|
||||||
|
ctest_update: Abort if Git FETCH_HEAD has no candidates
|
||||||
|
ctest_update: Support ".git file" work trees
|
||||||
|
ctest_update: Run 'git submodule' at top level
|
||||||
|
FindBoost: Search for Boost 1.42
|
||||||
|
Add FindLibArchive module (#10923)
|
||||||
|
Add option CMAKE_USE_SYSTEM_LIBARCHIVE (#10923)
|
||||||
|
Refer to self with CMake_(SOURCE|BINARY)_DIR (#10046)
|
||||||
|
ExternalProject: Fix $(MAKE) with cygpath on Windows
|
||||||
|
FindBoost: Search for Boost 1.43 and 1.44
|
||||||
|
Include headers from chosen libarchive (#10923)
|
||||||
|
No response files with GNU ld <= 2.16 (#10913)
|
||||||
|
Create class cmArchiveWrite to wrap libarchive (#11020)
|
||||||
|
Include entries for directories in tarballs (#11020)
|
||||||
|
cmArchiveWrite: Fix signed/unsigned compare/convert
|
||||||
|
cmArchiveWrite: Fix signed/unsigned again
|
||||||
|
CPack: Avoid member shadowing after API refactor
|
||||||
|
KWSys: Fix SplitPath for leading '\' on Windows
|
||||||
|
KWSys: Fix GetActualCaseForPath for UNC paths
|
||||||
|
ModuleNoticesTest: Do not require "Kitware" copyright
|
||||||
|
Modules: Fix CMakeParseArguments copyright notice
|
||||||
|
FortranCInterface: Fix doc typo FC.h -> FCMangle.h
|
||||||
|
CTest: Avoid use of old EscapeSpaces method
|
||||||
|
Remove cmSystemTools::EscapeSpaces method
|
||||||
|
Clarify install(TARGETS) docs for EXPORT option
|
||||||
|
Factor out global generator ComputeTargetDepends method
|
||||||
|
Factor out duplicate VS target dependency code
|
||||||
|
Refactor VS <= 7.1 utility-depends workaround
|
||||||
|
Restore GetTargetDirectDepends const return
|
||||||
|
Split notion of node lists and edge lists
|
||||||
|
Distinguish "strong" and "weak" target dependency edges
|
||||||
|
Honor strong intra-component target dependencies
|
||||||
|
libarchive: Remove SCHILY dev,ino,nlink attributes (#11176)
|
||||||
|
Fix unused parameter warning in VS 7.1 generator
|
||||||
|
KWSys: Avoid empty string dereference in SplitString
|
||||||
|
KWSys: Improve SplitPath method documentation
|
||||||
|
KWSys: Use SplitPath in GetActualCaseForPath
|
||||||
|
Add whitespace=tab-in-indent attribute for sources
|
||||||
|
Search MacPorts /opt/local prefix on Mac
|
||||||
|
HP-UX: Always add /usr/lib to rpath (#10571)
|
||||||
|
No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)
|
||||||
|
KWSys: Suppress -Wcast-align warning in MD5.c
|
||||||
|
Suppress -Wcast-align in curl and bzip2
|
||||||
|
libarchive: Fix purposeful crash
|
||||||
|
bootstrap: Honor CFLAGS during "make" test (#10545)
|
||||||
|
file(DOWNLOAD): Fix error message formatting
|
||||||
|
Fix line-too-long style errors
|
||||||
|
Report missing source files with context of target
|
||||||
|
|
||||||
|
Clinton Stimpson (10):
|
||||||
|
Fix performance issue with getting version from zlib.h
|
||||||
|
Fix bug 10418 - GetPrerequisites returning "not" as a dependency.
|
||||||
|
Fix regression in 5e6634fd77969433a87c150a2fb3f2079131484f for Windows.
|
||||||
|
Change Qt4ConfigDependentSettings to use more standard find modules.
|
||||||
|
Add cross-compiling support to FindQt4.cmake
|
||||||
|
Tweak for cygwin, don't convert : to ;
|
||||||
|
Fix some issues with refinding when qmake executable is changed.
|
||||||
|
Find correct Qt plugins for cross-compiling.
|
||||||
|
Fix mingw/VS warning message with cross compile re-org.
|
||||||
|
Make sure moc parameters file goes in binary directory.
|
||||||
|
|
||||||
|
David Cole (20):
|
||||||
|
CheckSourceTree test: read UpdateCommand from Update.xml.
|
||||||
|
Eliminate -Wconversion warnings.
|
||||||
|
Detect CMake warnings and errors in build output.
|
||||||
|
Activate retry code on any curl submit failure.
|
||||||
|
Add another expected output for the failed submit tests.
|
||||||
|
ExternalProject: Use $(MAKE) whenever possible.
|
||||||
|
Copy Resources in Frameworks during fixup_bundle (#10020)
|
||||||
|
Update path to git. dashmacmini2 was "upgraded."
|
||||||
|
ExternalProject: Remove 'unknown keyword' warning (#11034)
|
||||||
|
Add documentation for CPACK_PROJECT_CONFIG_FILE.
|
||||||
|
Add STEP_TARGETS to ExternalProject module.
|
||||||
|
Refine formatting for cmake --help-module output.
|
||||||
|
Improve documentation of OPTION command.
|
||||||
|
Add FOLDER target property, for IDEs (#3796)
|
||||||
|
Avoid adding self as prerequisite. (#10417)
|
||||||
|
Correct CMAKE_INSTALL_PREFIX value for Win64 apps (#9992)
|
||||||
|
Preserve timestamps on files on tar extract.
|
||||||
|
Use QUIET to avoid Java status messages.
|
||||||
|
VS2010: Honor PROJECT_LABEL target property (#10611)
|
||||||
|
VS2010: Set IntDir for utility and global targets.
|
||||||
|
|
||||||
|
David Genest (1):
|
||||||
|
Honor CMAKE_USER_MAKE_RULES_OVERRIDE in try_compile (#10902)
|
||||||
|
|
||||||
|
Eric NOULARD (20):
|
||||||
|
CPackRPM:: Replace - with _ in RPM Version (fix bug 0010934)
|
||||||
|
Provides default changelog if no file is provided
|
||||||
|
CPackRPM:: Quote every filenames in %file section (see bugs 10701,10871,10345)
|
||||||
|
CPackRPM:: [partially] support relocatable package
|
||||||
|
CPackDEB: merge wrong installed size patch. see bugs 10296 (and 10292)
|
||||||
|
CPackDeb optionally generates auto-dependency list part fix of bug 10292
|
||||||
|
Proposal for bash-completion support file
|
||||||
|
CPack: Refactor API in order to handle multi-file packages
|
||||||
|
CPack: Avoid member shadowing after API refactor (part2)
|
||||||
|
Improve cmake-completion (install doc, ctest -R completion)
|
||||||
|
Add ZIP archive format and LZMA compress support to libarchive-wrapper
|
||||||
|
Add XZ compress support to libarchive-wrapper
|
||||||
|
Add Compress compress support to libarchive-wrapper
|
||||||
|
CPack Backward-compatibly enforce DESTDIR for DEB and RPM
|
||||||
|
CPack Enable better handling of absolute installed files
|
||||||
|
CPackArchiveGenerator use cmArchiveWrite wrapper
|
||||||
|
CPackArchiveGenerator add component supports
|
||||||
|
CPackArchiveGenerator improve usability and robustness
|
||||||
|
CPack fix broken compilation for CygwinSource generator
|
||||||
|
CPack handle symlinks in CPACK_INSTALLED_DIRECTORIES fix for bug5430
|
||||||
|
|
||||||
|
James Bigler (1):
|
||||||
|
Added CUDA 3.2 directory changes. Disable emulation mode for CUDA 3.1+.
|
||||||
|
|
||||||
|
Kai Wasserbäch (1):
|
||||||
|
Fix spelling errors reported by Lintian.
|
||||||
|
|
||||||
|
Kovarththanan Rajaratnam (4):
|
||||||
|
FindZLIB: optimize zlib.h version parsing
|
||||||
|
FindCygwin: add new registry entry for Cygwin 1.7 (#10951)
|
||||||
|
FindZLIB: use the FPHSA version mode
|
||||||
|
FindSubversion: set compatibility variables based on FPHSA()
|
||||||
|
|
||||||
|
Marcel Loose (1):
|
||||||
|
Issue 10199: Fixed code documentation and now set <prefix>_WC_ROOT
|
||||||
|
|
||||||
|
Marcus D. Hanwell (1):
|
||||||
|
Bug with default library type of Python modules.
|
||||||
|
|
||||||
|
Mathieu Malaterre (3):
|
||||||
|
Add missing PATHS to find_path commands to fix openssl searching
|
||||||
|
BUG: 0009611 Fix Arch independent FindJNI.cmake on Linux
|
||||||
|
Fix 11035 : debug/release library configuration mistake
|
||||||
|
|
||||||
|
Michael Wild (2):
|
||||||
|
Improve documentation of BundleUtilities.cmake
|
||||||
|
Improve documentation of GetPrerequisites.cmake
|
||||||
|
|
||||||
|
Miguel A. Figueroa-Villanueva (7):
|
||||||
|
ENH: #9775 Added support for new wxWidgets 2.9 libraries.
|
||||||
|
BUG: #9775 Fixed patch FindwxWidgets-fixed-bug-9775.
|
||||||
|
BUG #10658: FindwxWidgets USE_FILE should not include .cmake extension.
|
||||||
|
STYLE: Clarified/Fixed documentation of UsewxWidgets.
|
||||||
|
BUG #11123: Generic include dir should come after config specific one.
|
||||||
|
BUG #8184: Fixed FindwxWidgets wrong order of default libs for MinGW.
|
||||||
|
ENH #8993: FindwxWidgets add support for wx-config custom options.
|
||||||
|
|
||||||
|
Mike McQuaid (1):
|
||||||
|
Make bundle items writable before fixup (#9284)
|
||||||
|
|
||||||
|
Modestas Vainius (1):
|
||||||
|
CTestTestFailedSubmit-xmlrpc: Pass with "Submission problem"
|
||||||
|
|
||||||
|
Patrick Gansterer (4):
|
||||||
|
VS: Convert PlatformName member to a virtual method
|
||||||
|
VS: Add more TargetMachine option values
|
||||||
|
VS: Map /ENTRY linker option to EntryPointSymbol
|
||||||
|
VS: Add ArchitectureId to VS 8 and 9 generators
|
||||||
|
|
||||||
|
Philip Lowman (7):
|
||||||
|
Fixes problem finding libraries under Boost (#9510)
|
||||||
|
Add detection for new pangommconfig.h header file
|
||||||
|
Several fixes needed to improve Windows support
|
||||||
|
11041: Improve FindCxxTest to use Python or Perl automatically; custom flags
|
||||||
|
10241: FindBISON.cmake clears wrong variable
|
||||||
|
10688: FindGTK2.cmake doesn't auto-detect macports
|
||||||
|
Merge patch for detecting gdk-pixbuf library
|
||||||
|
|
||||||
|
Pino Toscano (1):
|
||||||
|
GNU/Hurd platform support fixes (#9873)
|
||||||
|
|
||||||
|
Robert Goulet (1):
|
||||||
|
VS2010: Disable PDBs when there is no debug info
|
||||||
|
|
||||||
|
Rolf Eike Beer (2):
|
||||||
|
clean up some stuff in CPack RPM script
|
||||||
|
Set MSVC_VERSION for MSVC 6, 7, 7.1 (#7944)
|
||||||
|
|
||||||
|
Todd Gamblin (3):
|
||||||
|
Modules: Fix spelling 'To distributed' -> 'To distribute'
|
||||||
|
Teach find_* commands to ignore some paths
|
||||||
|
Add platform files for BlueGene/P systems
|
||||||
|
|
||||||
|
Zach Mullen (12):
|
||||||
|
Checksums on CTest submit files, and retry timed out submissions.
|
||||||
|
Cross-platform fixes for checksum/retry code
|
||||||
|
Fix subscript out of range crash
|
||||||
|
CTest should resubmit in the checksum failed case
|
||||||
|
Testing for CTest checksum
|
||||||
|
Mock checksum failure output for old CDash versions
|
||||||
|
Checksum test should use CMAKE_TESTS_CDASH_SERVER
|
||||||
|
Fix cycle detection for test dependencies
|
||||||
|
More robust cost-based scheduling impl
|
||||||
|
Fix hard-coded CDash URI in version query
|
||||||
|
Added CTest command --print-labels
|
||||||
|
We shouldn't ask CDash for its version info until/unless we actually need it.
|
||||||
|
|
||||||
No changes in CMake 2.8.2 since 2.8.2-rc4.
|
No changes in CMake 2.8.2 since 2.8.2-rc4.
|
||||||
|
|
||||||
Changes in CMake 2.8.2-rc4 (since 2.8.2-rc3)
|
Changes in CMake 2.8.2-rc4 (since 2.8.2-rc3)
|
||||||
|
190
Docs/cmake-completion
Normal file
190
Docs/cmake-completion
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
#
|
||||||
|
# bash-completion file for CMake
|
||||||
|
# Provided by Eric NOULARD - eric.noulard@gmail.com
|
||||||
|
#
|
||||||
|
# see http://bash-completion.alioth.debian.org/
|
||||||
|
# and http://www.cmake.org
|
||||||
|
#
|
||||||
|
# We will try to complete cmake commands options
|
||||||
|
# at 2 (or may be 3 levels)
|
||||||
|
# [cmake|cpack|ctest] <level0> <level1> <level2>
|
||||||
|
#
|
||||||
|
# level0 is top level cmake/cpack/ctest options
|
||||||
|
# level1 is the first argument of level0 option
|
||||||
|
# level2 is the seconf argument of level1 argument
|
||||||
|
# FIXME: I don't know how to handle level2
|
||||||
|
#
|
||||||
|
# The file has been proposed for inclusion in the bash-completion package
|
||||||
|
# https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312632&group_id=100114
|
||||||
|
# In the meantime,
|
||||||
|
# 1) If you want to test bash completion for cmake/cpack/ctest
|
||||||
|
# just source the current file at bash prompt
|
||||||
|
# . ./cmake-completion
|
||||||
|
#
|
||||||
|
# 2) If you want to install it for good copy this file to
|
||||||
|
# cp cmake-completion /etc/bash_completion.d/cmake
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# cmake command
|
||||||
|
#
|
||||||
|
# have cmake &&
|
||||||
|
_cmake()
|
||||||
|
{
|
||||||
|
local cur prev opts words cword
|
||||||
|
COMPREPLY=()
|
||||||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
# seems to be only available on bash-completion 1.2
|
||||||
|
#_get_comp_words_by_ref cur prev
|
||||||
|
|
||||||
|
# cmake command line option we want to complete
|
||||||
|
opts=`cmake --help | grep "^ \-.*=\ .*" | cut -d" " -f 3 | cut -d= -f 1 | cut -d[ -f 1`
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the arguments to some of
|
||||||
|
# the most commonly used commands (Level 1).
|
||||||
|
#
|
||||||
|
case "${prev}" in
|
||||||
|
-E)
|
||||||
|
local running=$(for x in `cmake -E |& grep "^ " | cut -d" " -f 3`; do echo ${x} ; done )
|
||||||
|
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--help-command)
|
||||||
|
local running=$(for x in `cmake --help-command-list`; do echo ${x} ; done )
|
||||||
|
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--help-module)
|
||||||
|
local running=$(for x in `cmake --help-module-list`; do echo ${x} ; done )
|
||||||
|
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--help-policy)
|
||||||
|
local running=$(for x in `cmake --help-policies | grep "^ CMP"`; do echo ${x} ; done )
|
||||||
|
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--help-property)
|
||||||
|
local running=$(for x in `cmake --help-property-list`; do echo ${x} ; done )
|
||||||
|
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--help-variable)
|
||||||
|
local running=$(for x in `cmake --help-variable-list`; do echo ${x} ; done )
|
||||||
|
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the arguments to some of
|
||||||
|
# the most commonly used commands (Level 2).
|
||||||
|
# ?? How to do that ..
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the option (Level 0 - right after cmake)
|
||||||
|
#
|
||||||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||||
|
} &&
|
||||||
|
complete -F _cmake -o default cmake
|
||||||
|
|
||||||
|
#
|
||||||
|
# cpack command
|
||||||
|
#
|
||||||
|
#have cpack &&
|
||||||
|
_cpack()
|
||||||
|
{
|
||||||
|
local cur prev opts words cword
|
||||||
|
COMPREPLY=()
|
||||||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
# seems to be only available on bash-completion 1.2
|
||||||
|
#_get_comp_words_by_ref cur prev
|
||||||
|
|
||||||
|
# cpack command line option we want to complete
|
||||||
|
opts=`cpack --help | grep "^ \-.*=\ .*" | cut -d" " -f 3 | cut -d= -f 1`
|
||||||
|
opts="${opts} --help -V"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the arguments to some of
|
||||||
|
# the most commonly used commands (Level 1).
|
||||||
|
#
|
||||||
|
case "${prev}" in
|
||||||
|
-G)
|
||||||
|
local running=$(for x in `cpack --help | grep "^ .*=\ .*" | grep -v "^ -" | cut -d" " -f 3`; do echo ${x} ; done )
|
||||||
|
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--config)
|
||||||
|
COMPREPLY=( $(compgen -f ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the option (Level 0 - right after cmake)
|
||||||
|
#
|
||||||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||||
|
} &&
|
||||||
|
complete -F _cpack -o default cpack
|
||||||
|
|
||||||
|
#
|
||||||
|
# cmake command
|
||||||
|
#
|
||||||
|
# have ctest &&
|
||||||
|
_ctest()
|
||||||
|
{
|
||||||
|
local cur prev opts words cword
|
||||||
|
COMPREPLY=()
|
||||||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
# seems to be only available on bash-completion 1.2
|
||||||
|
#_get_comp_words_by_ref cur prev
|
||||||
|
|
||||||
|
# cmake command line option we want to complete
|
||||||
|
opts=`ctest --help | grep "\-\-.*" | cut -d" " -f 3 | sed s/,/\\\n/g`
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the arguments to some of
|
||||||
|
# the most commonly used commands (Level 1).
|
||||||
|
#
|
||||||
|
case "${prev}" in
|
||||||
|
--help-command)
|
||||||
|
local running=$(for x in `ctest --help-command-list`; do echo ${x} ; done )
|
||||||
|
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-R)
|
||||||
|
local running=$(for x in `ctest -N 2> /dev/null | grep "^ Test" | cut -d: -f 2`; do echo ${x} ; done )
|
||||||
|
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the arguments to some of
|
||||||
|
# the most commonly used commands (Level 2).
|
||||||
|
# ?? How to do that ..
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the option (Level 0 - right after cmake)
|
||||||
|
#
|
||||||
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||||
|
} &&
|
||||||
|
complete -F _ctest -o default ctest
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-basic-offset: 4
|
||||||
|
# sh-indent-comment: t
|
||||||
|
# indent-tabs-mode: nil
|
||||||
|
# End:
|
||||||
|
# ex: ts=4 sw=4 et filetype=sh
|
@ -12,7 +12,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(ADD_FILE_DEPENDENCIES _file)
|
MACRO(ADD_FILE_DEPENDENCIES _file)
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
# BundleUtilities.cmake
|
# - Functions to help assemble a standalone bundle application.
|
||||||
|
# A collection of CMake utility functions useful for dealing with .app
|
||||||
|
# bundles on the Mac and bundle-like directories on any OS.
|
||||||
#
|
#
|
||||||
# A collection of CMake utility functions useful for dealing with .app bundles
|
# The following functions are provided by this module:
|
||||||
# on the Mac and bundle-like directories on any OS.
|
# fixup_bundle
|
||||||
#
|
# copy_and_fixup_bundle
|
||||||
# The following functions are provided by this script:
|
# verify_app
|
||||||
# get_bundle_main_executable
|
# get_bundle_main_executable
|
||||||
# get_dotapp_dir
|
# get_dotapp_dir
|
||||||
# get_bundle_and_executable
|
# get_bundle_and_executable
|
||||||
@ -13,15 +15,121 @@
|
|||||||
# set_bundle_key_values
|
# set_bundle_key_values
|
||||||
# get_bundle_keys
|
# get_bundle_keys
|
||||||
# copy_resolved_item_into_bundle
|
# copy_resolved_item_into_bundle
|
||||||
|
# copy_resolved_framework_into_bundle
|
||||||
# fixup_bundle_item
|
# fixup_bundle_item
|
||||||
# fixup_bundle
|
|
||||||
# copy_and_fixup_bundle
|
|
||||||
# verify_bundle_prerequisites
|
# verify_bundle_prerequisites
|
||||||
# verify_bundle_symlinks
|
# verify_bundle_symlinks
|
||||||
# verify_app
|
|
||||||
#
|
|
||||||
# Requires CMake 2.6 or greater because it uses function, break and
|
# Requires CMake 2.6 or greater because it uses function, break and
|
||||||
# PARENT_SCOPE. Also depends on GetPrerequisites.cmake.
|
# PARENT_SCOPE. Also depends on GetPrerequisites.cmake.
|
||||||
|
#
|
||||||
|
# FIXUP_BUNDLE(<app> <libs> <dirs>)
|
||||||
|
# Fix up a bundle in-place and make it standalone, such that it can be
|
||||||
|
# drag-n-drop copied to another machine and run on that machine as long as all
|
||||||
|
# of the system libraries are compatible.
|
||||||
|
#
|
||||||
|
# Gather all the keys for all the executables and libraries in a bundle, and
|
||||||
|
# then, for each key, copy each prerequisite into the bundle. Then fix each one
|
||||||
|
# up according to its own list of prerequisites.
|
||||||
|
#
|
||||||
|
# Then clear all the keys and call verify_app on the final bundle to ensure
|
||||||
|
# that it is truly standalone.
|
||||||
|
#
|
||||||
|
# COPY_AND_FIXUP_BUNDLE(<src> <dst> <libs> <dirs>)
|
||||||
|
# Makes a copy of the bundle <src> at location <dst> and then fixes up the
|
||||||
|
# new copied bundle in-place at <dst>...
|
||||||
|
#
|
||||||
|
# VERIFY_APP(<app>)
|
||||||
|
# Verifies that an application <app> appears valid based on running analysis
|
||||||
|
# tools on it. Calls "message(FATAL_ERROR" if the application is not verified.
|
||||||
|
#
|
||||||
|
# GET_BUNDLE_MAIN_EXECUTABLE(<bundle> <result_var>)
|
||||||
|
# The result will be the full path name of the bundle's main executable file
|
||||||
|
# or an "error:" prefixed string if it could not be determined.
|
||||||
|
#
|
||||||
|
# GET_DOTAPP_DIR(<exe> <dotapp_dir_var>)
|
||||||
|
# Returns the nearest parent dir whose name ends with ".app" given the full
|
||||||
|
# path to an executable. If there is no such parent dir, then return a dir at
|
||||||
|
# the same level as the executable, named with the executable's base name and
|
||||||
|
# ending with ".app"
|
||||||
|
#
|
||||||
|
# The returned directory may or may not exist.
|
||||||
|
#
|
||||||
|
# GET_BUNDLE_AND_EXECUTABLE(<app> <bundle_var> <executable_var> <valid_var>)
|
||||||
|
# Takes either a ".app" directory name or the name of an executable
|
||||||
|
# nested inside a ".app" directory and returns the path to the ".app"
|
||||||
|
# directory in <bundle_var> and the path to its main executable in
|
||||||
|
# <executable_var>
|
||||||
|
#
|
||||||
|
# GET_BUNDLE_ALL_EXECUTABLES(<bundle> <exes_var>)
|
||||||
|
# Scans the given bundle recursively for all executable files and accumulates
|
||||||
|
# them into a variable.
|
||||||
|
#
|
||||||
|
# GET_ITEM_KEY(<item> <key_var>)
|
||||||
|
# Given a file (item) name, generate a key that should be unique considering
|
||||||
|
# the set of libraries that need copying or fixing up to make a bundle
|
||||||
|
# standalone. This is essentially the file name including extension with "."
|
||||||
|
# replaced by "_"
|
||||||
|
#
|
||||||
|
# This key is used as a prefix for CMake variables so that we can associate a
|
||||||
|
# set of variables with a given item based on its key.
|
||||||
|
#
|
||||||
|
# CLEAR_BUNDLE_KEYS(<keys_var>)
|
||||||
|
# Loop over the list of keys, clearing all the variables associated with each
|
||||||
|
# key. After the loop, clear the list of keys itself.
|
||||||
|
#
|
||||||
|
# Caller of get_bundle_keys should call clear_bundle_keys when done with list
|
||||||
|
# of keys.
|
||||||
|
#
|
||||||
|
# SET_BUNDLE_KEY_VALUES(<keys_var> <context> <item> <exepath> <dirs>
|
||||||
|
# <copyflag>)
|
||||||
|
# Add a key to the list (if necessary) for the given item. If added,
|
||||||
|
# also set all the variables associated with that key.
|
||||||
|
#
|
||||||
|
# GET_BUNDLE_KEYS(<app> <libs> <dirs> <keys_var>)
|
||||||
|
# Loop over all the executable and library files within the bundle (and given
|
||||||
|
# as extra <libs>) and accumulate a list of keys representing them. Set
|
||||||
|
# values associated with each key such that we can loop over all of them and
|
||||||
|
# copy prerequisite libs into the bundle and then do appropriate
|
||||||
|
# install_name_tool fixups.
|
||||||
|
#
|
||||||
|
# COPY_RESOLVED_ITEM_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
|
||||||
|
# Copy a resolved item into the bundle if necessary. Copy is not necessary if
|
||||||
|
# the resolved_item is "the same as" the resolved_embedded_item.
|
||||||
|
#
|
||||||
|
# COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE(<resolved_item> <resolved_embedded_item>)
|
||||||
|
# Copy a resolved framework into the bundle if necessary. Copy is not necessary
|
||||||
|
# if the resolved_item is "the same as" the resolved_embedded_item.
|
||||||
|
#
|
||||||
|
# By default, BU_COPY_FULL_FRAMEWORK_CONTENTS is not set. If you want full
|
||||||
|
# frameworks embedded in your bundles, set BU_COPY_FULL_FRAMEWORK_CONTENTS to
|
||||||
|
# ON before calling fixup_bundle. By default,
|
||||||
|
# COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE copies the framework dylib itself plus
|
||||||
|
# the framework Resources directory.
|
||||||
|
#
|
||||||
|
# FIXUP_BUNDLE_ITEM(<resolved_embedded_item> <exepath> <dirs>)
|
||||||
|
# Get the direct/non-system prerequisites of the resolved embedded item. For
|
||||||
|
# each prerequisite, change the way it is referenced to the value of the
|
||||||
|
# _EMBEDDED_ITEM keyed variable for that prerequisite. (Most likely changing to
|
||||||
|
# an "@executable_path" style reference.)
|
||||||
|
#
|
||||||
|
# Also, change the id of the item being fixed up to its own _EMBEDDED_ITEM
|
||||||
|
# value.
|
||||||
|
#
|
||||||
|
# Accumulate changes in a local variable and make *one* call to
|
||||||
|
# install_name_tool at the end of the function with all the changes at once.
|
||||||
|
#
|
||||||
|
# If the BU_CHMOD_BUNDLE_ITEMS variable is set then bundle items will be
|
||||||
|
# marked writable before install_name_tool tries to change them.
|
||||||
|
#
|
||||||
|
# VERIFY_BUNDLE_PREREQUISITES(<bundle> <result_var> <info_var>)
|
||||||
|
# Verifies that the sum of all prerequisites of all files inside the bundle
|
||||||
|
# are contained within the bundle or are "system" libraries, presumed to exist
|
||||||
|
# everywhere.
|
||||||
|
#
|
||||||
|
# VERIFY_BUNDLE_SYMLINKS(<bundle> <result_var> <info_var>)
|
||||||
|
# Verifies that any symlinks found in the bundle point to other files that are
|
||||||
|
# already also in the bundle... Anything that points to an external file causes
|
||||||
|
# this function to fail the verification.
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2008-2009 Kitware, Inc.
|
# Copyright 2008-2009 Kitware, Inc.
|
||||||
@ -33,7 +141,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# The functions defined in this file depend on the get_prerequisites function
|
# The functions defined in this file depend on the get_prerequisites function
|
||||||
@ -43,11 +151,6 @@ get_filename_component(BundleUtilities_cmake_dir "${CMAKE_CURRENT_LIST_FILE}" PA
|
|||||||
include("${BundleUtilities_cmake_dir}/GetPrerequisites.cmake")
|
include("${BundleUtilities_cmake_dir}/GetPrerequisites.cmake")
|
||||||
|
|
||||||
|
|
||||||
# get_bundle_main_executable
|
|
||||||
#
|
|
||||||
# The result will be the full path name of the bundle's main executable file
|
|
||||||
# or an "error:" prefixed string if it could not be determined.
|
|
||||||
#
|
|
||||||
function(get_bundle_main_executable bundle result_var)
|
function(get_bundle_main_executable bundle result_var)
|
||||||
set(result "error: '${bundle}/Contents/Info.plist' file does not exist")
|
set(result "error: '${bundle}/Contents/Info.plist' file does not exist")
|
||||||
|
|
||||||
@ -109,15 +212,6 @@ function(get_bundle_main_executable bundle result_var)
|
|||||||
endfunction(get_bundle_main_executable)
|
endfunction(get_bundle_main_executable)
|
||||||
|
|
||||||
|
|
||||||
# get_dotapp_dir
|
|
||||||
#
|
|
||||||
# Returns the nearest parent dir whose name ends with ".app" given the full path
|
|
||||||
# to an executable. If there is no such parent dir, then return a dir at the same
|
|
||||||
# level as the executable, named with the executable's base name and ending with
|
|
||||||
# ".app"
|
|
||||||
#
|
|
||||||
# The returned directory may or may not exist.
|
|
||||||
#
|
|
||||||
function(get_dotapp_dir exe dotapp_dir_var)
|
function(get_dotapp_dir exe dotapp_dir_var)
|
||||||
set(s "${exe}")
|
set(s "${exe}")
|
||||||
|
|
||||||
@ -155,13 +249,6 @@ function(get_dotapp_dir exe dotapp_dir_var)
|
|||||||
endfunction(get_dotapp_dir)
|
endfunction(get_dotapp_dir)
|
||||||
|
|
||||||
|
|
||||||
# get_bundle_and_executable
|
|
||||||
#
|
|
||||||
# Takes either a ".app" directory name or the name of an executable
|
|
||||||
# nested inside a ".app" directory and returns the path to the ".app"
|
|
||||||
# directory in ${bundle_var} and the path to its main executable in
|
|
||||||
# ${executable_var}
|
|
||||||
#
|
|
||||||
function(get_bundle_and_executable app bundle_var executable_var valid_var)
|
function(get_bundle_and_executable app bundle_var executable_var valid_var)
|
||||||
set(valid 0)
|
set(valid 0)
|
||||||
|
|
||||||
@ -215,11 +302,6 @@ function(get_bundle_and_executable app bundle_var executable_var valid_var)
|
|||||||
endfunction(get_bundle_and_executable)
|
endfunction(get_bundle_and_executable)
|
||||||
|
|
||||||
|
|
||||||
# get_bundle_all_executables
|
|
||||||
#
|
|
||||||
# Scans the given bundle recursively for all executable files and accumulates
|
|
||||||
# them into a variable.
|
|
||||||
#
|
|
||||||
function(get_bundle_all_executables bundle exes_var)
|
function(get_bundle_all_executables bundle exes_var)
|
||||||
set(exes "")
|
set(exes "")
|
||||||
|
|
||||||
@ -235,15 +317,6 @@ function(get_bundle_all_executables bundle exes_var)
|
|||||||
endfunction(get_bundle_all_executables)
|
endfunction(get_bundle_all_executables)
|
||||||
|
|
||||||
|
|
||||||
# get_item_key
|
|
||||||
#
|
|
||||||
# Given a file (item) name, generate a key that should be unique considering the set of
|
|
||||||
# libraries that need copying or fixing up to make a bundle standalone. This is
|
|
||||||
# essentially the file name including extension with "." replaced by "_"
|
|
||||||
#
|
|
||||||
# This key is used as a prefix for CMake variables so that we can associate a set
|
|
||||||
# of variables with a given item based on its key.
|
|
||||||
#
|
|
||||||
function(get_item_key item key_var)
|
function(get_item_key item key_var)
|
||||||
get_filename_component(item_name "${item}" NAME)
|
get_filename_component(item_name "${item}" NAME)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@ -254,14 +327,6 @@ function(get_item_key item key_var)
|
|||||||
endfunction(get_item_key)
|
endfunction(get_item_key)
|
||||||
|
|
||||||
|
|
||||||
# clear_bundle_keys
|
|
||||||
#
|
|
||||||
# Loop over the list of keys, clearing all the variables associated with each
|
|
||||||
# key. After the loop, clear the list of keys itself.
|
|
||||||
#
|
|
||||||
# Caller of get_bundle_keys should call clear_bundle_keys when done with list
|
|
||||||
# of keys.
|
|
||||||
#
|
|
||||||
function(clear_bundle_keys keys_var)
|
function(clear_bundle_keys keys_var)
|
||||||
foreach(key ${${keys_var}})
|
foreach(key ${${keys_var}})
|
||||||
set(${key}_ITEM PARENT_SCOPE)
|
set(${key}_ITEM PARENT_SCOPE)
|
||||||
@ -275,11 +340,6 @@ function(clear_bundle_keys keys_var)
|
|||||||
endfunction(clear_bundle_keys)
|
endfunction(clear_bundle_keys)
|
||||||
|
|
||||||
|
|
||||||
# set_bundle_key_values
|
|
||||||
#
|
|
||||||
# Add a key to the list (if necessary) for the given item. If added,
|
|
||||||
# also set all the variables associated with that key.
|
|
||||||
#
|
|
||||||
function(set_bundle_key_values keys_var context item exepath dirs copyflag)
|
function(set_bundle_key_values keys_var context item exepath dirs copyflag)
|
||||||
get_filename_component(item_name "${item}" NAME)
|
get_filename_component(item_name "${item}" NAME)
|
||||||
|
|
||||||
@ -335,14 +395,6 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
|
|||||||
endfunction(set_bundle_key_values)
|
endfunction(set_bundle_key_values)
|
||||||
|
|
||||||
|
|
||||||
# get_bundle_keys
|
|
||||||
#
|
|
||||||
# Loop over all the executable and library files within the bundle (and given as
|
|
||||||
# extra "${libs}") and accumulate a list of keys representing them. Set values
|
|
||||||
# associated with each key such that we can loop over all of them and copy
|
|
||||||
# prerequisite libs into the bundle and then do appropriate install_name_tool
|
|
||||||
# fixups.
|
|
||||||
#
|
|
||||||
function(get_bundle_keys app libs dirs keys_var)
|
function(get_bundle_keys app libs dirs keys_var)
|
||||||
set(${keys_var} PARENT_SCOPE)
|
set(${keys_var} PARENT_SCOPE)
|
||||||
|
|
||||||
@ -363,7 +415,7 @@ function(get_bundle_keys app libs dirs keys_var)
|
|||||||
# but that do not show up in otool -L output...)
|
# but that do not show up in otool -L output...)
|
||||||
#
|
#
|
||||||
foreach(lib ${libs})
|
foreach(lib ${libs})
|
||||||
set_bundle_key_values(${keys_var} "${lib}" "${lib}" "${exepath}" "${dirs}" 1)
|
set_bundle_key_values(${keys_var} "${lib}" "${lib}" "${exepath}" "${dirs}" 0)
|
||||||
|
|
||||||
set(prereqs "")
|
set(prereqs "")
|
||||||
get_prerequisites("${lib}" prereqs 1 1 "${exepath}" "${dirs}")
|
get_prerequisites("${lib}" prereqs 1 1 "${exepath}" "${dirs}")
|
||||||
@ -405,11 +457,6 @@ function(get_bundle_keys app libs dirs keys_var)
|
|||||||
endfunction(get_bundle_keys)
|
endfunction(get_bundle_keys)
|
||||||
|
|
||||||
|
|
||||||
# copy_resolved_item_into_bundle
|
|
||||||
#
|
|
||||||
# Copy a resolved item into the bundle if necessary. Copy is not necessary if
|
|
||||||
# the resolved_item is "the same as" the resolved_embedded_item.
|
|
||||||
#
|
|
||||||
function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
|
function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# ignore case on Windows
|
# ignore case on Windows
|
||||||
@ -433,18 +480,48 @@ function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
|
|||||||
endfunction(copy_resolved_item_into_bundle)
|
endfunction(copy_resolved_item_into_bundle)
|
||||||
|
|
||||||
|
|
||||||
# fixup_bundle_item
|
function(copy_resolved_framework_into_bundle resolved_item resolved_embedded_item)
|
||||||
#
|
if(WIN32)
|
||||||
# Get the direct/non-system prerequisites of the resolved embedded item. For each
|
# ignore case on Windows
|
||||||
# prerequisite, change the way it is referenced to the value of the _EMBEDDED_ITEM
|
string(TOLOWER "${resolved_item}" resolved_item_compare)
|
||||||
# keyed variable for that prerequisite. (Most likely changing to an "@executable_path"
|
string(TOLOWER "${resolved_embedded_item}" resolved_embedded_item_compare)
|
||||||
# style reference.)
|
else()
|
||||||
#
|
set(resolved_item_compare "${resolved_item}")
|
||||||
# Also, change the id of the item being fixed up to its own _EMBEDDED_ITEM value.
|
set(resolved_embedded_item_compare "${resolved_embedded_item}")
|
||||||
#
|
endif()
|
||||||
# Accumulate changes in a local variable and make *one* call to install_name_tool
|
|
||||||
# at the end of the function with all the changes at once.
|
if("${resolved_item_compare}" STREQUAL "${resolved_embedded_item_compare}")
|
||||||
#
|
message(STATUS "warning: resolved_item == resolved_embedded_item - not copying...")
|
||||||
|
else()
|
||||||
|
if(BU_COPY_FULL_FRAMEWORK_CONTENTS)
|
||||||
|
# Full Framework (everything):
|
||||||
|
get_filename_component(resolved_dir "${resolved_item}" PATH)
|
||||||
|
get_filename_component(resolved_dir "${resolved_dir}/../.." ABSOLUTE)
|
||||||
|
get_filename_component(resolved_embedded_dir "${resolved_embedded_item}" PATH)
|
||||||
|
get_filename_component(resolved_embedded_dir "${resolved_embedded_dir}/../.." ABSOLUTE)
|
||||||
|
#message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy_directory '${resolved_dir}' '${resolved_embedded_dir}'")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${resolved_dir}" "${resolved_embedded_dir}")
|
||||||
|
else()
|
||||||
|
# Framework lib itself:
|
||||||
|
#message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy ${resolved_item} ${resolved_embedded_item}")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${resolved_item}" "${resolved_embedded_item}")
|
||||||
|
|
||||||
|
# Plus Resources, if they exist:
|
||||||
|
string(REGEX REPLACE "^(.*)/[^/]+/[^/]+/[^/]+$" "\\1/Resources" resolved_resources "${resolved_item}")
|
||||||
|
string(REGEX REPLACE "^(.*)/[^/]+/[^/]+/[^/]+$" "\\1/Resources" resolved_embedded_resources "${resolved_embedded_item}")
|
||||||
|
if(EXISTS "${resolved_resources}")
|
||||||
|
#message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy_directory '${resolved_resources}' '${resolved_embedded_resources}'")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${resolved_resources}" "${resolved_embedded_resources}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(UNIX AND NOT APPLE)
|
||||||
|
file(RPATH_REMOVE FILE "${resolved_embedded_item}")
|
||||||
|
endif(UNIX AND NOT APPLE)
|
||||||
|
endfunction(copy_resolved_framework_into_bundle)
|
||||||
|
|
||||||
|
|
||||||
function(fixup_bundle_item resolved_embedded_item exepath dirs)
|
function(fixup_bundle_item resolved_embedded_item exepath dirs)
|
||||||
# This item's key is "ikey":
|
# This item's key is "ikey":
|
||||||
#
|
#
|
||||||
@ -467,6 +544,10 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs)
|
|||||||
endif(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
|
endif(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
|
||||||
endforeach(pr)
|
endforeach(pr)
|
||||||
|
|
||||||
|
if(BU_CHMOD_BUNDLE_ITEMS)
|
||||||
|
execute_process(COMMAND chmod u+w "${resolved_embedded_item}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Change this item's id and all of its references in one call
|
# Change this item's id and all of its references in one call
|
||||||
# to install_name_tool:
|
# to install_name_tool:
|
||||||
#
|
#
|
||||||
@ -476,19 +557,6 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs)
|
|||||||
endfunction(fixup_bundle_item)
|
endfunction(fixup_bundle_item)
|
||||||
|
|
||||||
|
|
||||||
# fixup_bundle
|
|
||||||
#
|
|
||||||
# Fix up a bundle in-place and make it standalone, such that it can be drag-n-drop
|
|
||||||
# copied to another machine and run on that machine as long as all of the system
|
|
||||||
# libraries are compatible.
|
|
||||||
#
|
|
||||||
# Gather all the keys for all the executables and libraries in a bundle, and then,
|
|
||||||
# for each key, copy each prerequisite into the bundle. Then fix each one up according
|
|
||||||
# to its own list of prerequisites.
|
|
||||||
#
|
|
||||||
# Then clear all the keys and call verify_app on the final bundle to ensure that
|
|
||||||
# it is truly standalone.
|
|
||||||
#
|
|
||||||
function(fixup_bundle app libs dirs)
|
function(fixup_bundle app libs dirs)
|
||||||
message(STATUS "fixup_bundle")
|
message(STATUS "fixup_bundle")
|
||||||
message(STATUS " app='${app}'")
|
message(STATUS " app='${app}'")
|
||||||
@ -528,8 +596,14 @@ function(fixup_bundle app libs dirs)
|
|||||||
endif(show_status)
|
endif(show_status)
|
||||||
|
|
||||||
if(${${key}_COPYFLAG})
|
if(${${key}_COPYFLAG})
|
||||||
copy_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}"
|
set(item "${${key}_ITEM}")
|
||||||
"${${key}_RESOLVED_EMBEDDED_ITEM}")
|
if(item MATCHES "[^/]+\\.framework/")
|
||||||
|
copy_resolved_framework_into_bundle("${${key}_RESOLVED_ITEM}"
|
||||||
|
"${${key}_RESOLVED_EMBEDDED_ITEM}")
|
||||||
|
else()
|
||||||
|
copy_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}"
|
||||||
|
"${${key}_RESOLVED_EMBEDDED_ITEM}")
|
||||||
|
endif()
|
||||||
endif(${${key}_COPYFLAG})
|
endif(${${key}_COPYFLAG})
|
||||||
endforeach(key)
|
endforeach(key)
|
||||||
|
|
||||||
@ -557,23 +631,12 @@ function(fixup_bundle app libs dirs)
|
|||||||
endfunction(fixup_bundle)
|
endfunction(fixup_bundle)
|
||||||
|
|
||||||
|
|
||||||
# copy_and_fixup_bundle
|
|
||||||
#
|
|
||||||
# Makes a copy of the bundle "src" at location "dst" and then fixes up the
|
|
||||||
# new copied bundle in-place at "dst"...
|
|
||||||
#
|
|
||||||
function(copy_and_fixup_bundle src dst libs dirs)
|
function(copy_and_fixup_bundle src dst libs dirs)
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${src}" "${dst}")
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${src}" "${dst}")
|
||||||
fixup_bundle("${dst}" "${libs}" "${dirs}")
|
fixup_bundle("${dst}" "${libs}" "${dirs}")
|
||||||
endfunction(copy_and_fixup_bundle)
|
endfunction(copy_and_fixup_bundle)
|
||||||
|
|
||||||
|
|
||||||
# verify_bundle_prerequisites
|
|
||||||
#
|
|
||||||
# Verifies that the sum of all prerequisites of all files inside the bundle
|
|
||||||
# are contained within the bundle or are "system" libraries, presumed to exist
|
|
||||||
# everywhere.
|
|
||||||
#
|
|
||||||
function(verify_bundle_prerequisites bundle result_var info_var)
|
function(verify_bundle_prerequisites bundle result_var info_var)
|
||||||
set(result 1)
|
set(result 1)
|
||||||
set(info "")
|
set(info "")
|
||||||
@ -635,12 +698,6 @@ function(verify_bundle_prerequisites bundle result_var info_var)
|
|||||||
endfunction(verify_bundle_prerequisites)
|
endfunction(verify_bundle_prerequisites)
|
||||||
|
|
||||||
|
|
||||||
# verify_bundle_symlinks
|
|
||||||
#
|
|
||||||
# Verifies that any symlinks found in the bundle point to other files that are
|
|
||||||
# already also in the bundle... Anything that points to an external file causes
|
|
||||||
# this function to fail the verification.
|
|
||||||
#
|
|
||||||
function(verify_bundle_symlinks bundle result_var info_var)
|
function(verify_bundle_symlinks bundle result_var info_var)
|
||||||
set(result 1)
|
set(result 1)
|
||||||
set(info "")
|
set(info "")
|
||||||
@ -654,11 +711,6 @@ function(verify_bundle_symlinks bundle result_var info_var)
|
|||||||
endfunction(verify_bundle_symlinks)
|
endfunction(verify_bundle_symlinks)
|
||||||
|
|
||||||
|
|
||||||
# verify_app
|
|
||||||
#
|
|
||||||
# Verifies that an application appears valid based on running analysis tools on it.
|
|
||||||
# Calls message/FATAL_ERROR if the application is not verified.
|
|
||||||
#
|
|
||||||
function(verify_app app)
|
function(verify_app app)
|
||||||
set(verified 0)
|
set(verified 0)
|
||||||
set(info "")
|
set(info "")
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is used by cmake.cxx to compute the CMAKE_ROOT location.
|
# This file is used by cmake.cxx to compute the CMAKE_ROOT location.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# support for AT&T syntax assemblers, e.g. GNU as
|
# support for AT&T syntax assemblers, e.g. GNU as
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues")
|
MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues")
|
||||||
@ -28,18 +28,25 @@ IF("${CMAKE_BASE_NAME}" STREQUAL "as")
|
|||||||
SET(CMAKE_BASE_NAME gas)
|
SET(CMAKE_BASE_NAME gas)
|
||||||
ENDIF("${CMAKE_BASE_NAME}" STREQUAL "as")
|
ENDIF("${CMAKE_BASE_NAME}" STREQUAL "as")
|
||||||
|
|
||||||
INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
|
# Load compiler-specific information.
|
||||||
|
SET(_INCLUDED_FILE "")
|
||||||
IF(CMAKE_SYSTEM_PROCESSOR)
|
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
||||||
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
INCLUDE(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
||||||
ENDIF(CMAKE_SYSTEM_PROCESSOR)
|
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
||||||
IF(NOT _INCLUDED_FILE)
|
IF(NOT _INCLUDED_FILE)
|
||||||
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
|
INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
|
||||||
ENDIF(NOT _INCLUDED_FILE)
|
ENDIF(NOT _INCLUDED_FILE)
|
||||||
|
|
||||||
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
IF(CMAKE_SYSTEM_PROCESSOR)
|
||||||
|
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
||||||
|
IF(NOT _INCLUDED_FILE)
|
||||||
|
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
|
||||||
|
ENDIF(NOT _INCLUDED_FILE)
|
||||||
|
ENDIF(CMAKE_SYSTEM_PROCESSOR)
|
||||||
|
|
||||||
|
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
||||||
IF(NOT _INCLUDED_FILE)
|
IF(NOT _INCLUDED_FILE)
|
||||||
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM OPTIONAL)
|
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
|
||||||
ENDIF(NOT _INCLUDED_FILE)
|
ENDIF(NOT _INCLUDED_FILE)
|
||||||
|
|
||||||
# Set default assembler file extensions:
|
# Set default assembler file extensions:
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# support for the MS assembler, masm and masm64
|
# support for the MS assembler, masm and masm64
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# Nothing here yet
|
# Nothing here yet
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
|
IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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 (CMAKE_MAKE_PROGRAM "make" CACHE STRING
|
SET (CMAKE_MAKE_PROGRAM "make" CACHE STRING
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file sets the basic flags for the C language in CMake.
|
# This file sets the basic flags for the C language in CMake.
|
||||||
@ -26,6 +26,8 @@ ELSE(UNIX)
|
|||||||
SET(CMAKE_C_OUTPUT_EXTENSION .obj)
|
SET(CMAKE_C_OUTPUT_EXTENSION .obj)
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
|
SET(_INCLUDED_FILE 0)
|
||||||
|
|
||||||
# Load compiler-specific information.
|
# Load compiler-specific information.
|
||||||
IF(CMAKE_C_COMPILER_ID)
|
IF(CMAKE_C_COMPILER_ID)
|
||||||
INCLUDE(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL)
|
INCLUDE(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL)
|
||||||
|
@ -21,8 +21,8 @@ IF(CMAKE_COMPILER_IS_MINGW)
|
|||||||
SET(MINGW 1)
|
SET(MINGW 1)
|
||||||
ENDIF(CMAKE_COMPILER_IS_MINGW)
|
ENDIF(CMAKE_COMPILER_IS_MINGW)
|
||||||
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
|
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
|
||||||
SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||||
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm)
|
SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
|
||||||
SET(CMAKE_CXX_LINKER_PREFERENCE 30)
|
SET(CMAKE_CXX_LINKER_PREFERENCE 30)
|
||||||
SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file sets the basic flags for the C++ language in CMake.
|
# This file sets the basic flags for the C++ language in CMake.
|
||||||
@ -26,6 +26,8 @@ ELSE(UNIX)
|
|||||||
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
|
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
|
SET(_INCLUDED_FILE 0)
|
||||||
|
|
||||||
# Load compiler-specific information.
|
# Load compiler-specific information.
|
||||||
IF(CMAKE_CXX_COMPILER_ID)
|
IF(CMAKE_CXX_COMPILER_ID)
|
||||||
INCLUDE(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
|
INCLUDE(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# this file has flags that are shared across languages and sets
|
# this file has flags that are shared across languages and sets
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CMAKE_DEPENDENT_OPTION option doc default depends force)
|
MACRO(CMAKE_DEPENDENT_OPTION option doc default depends force)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# determine the compiler to use for ASM using AT&T syntax, e.g. GNU as
|
# determine the compiler to use for ASM using AT&T syntax, e.g. GNU as
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# determine the compiler to use for ASM programs
|
# determine the compiler to use for ASM programs
|
||||||
@ -38,9 +38,9 @@ ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
|
|||||||
# we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt
|
# we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt
|
||||||
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
|
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
|
||||||
#
|
#
|
||||||
# if a compiler was specified by the user but without path,
|
# if a compiler was specified by the user but without path,
|
||||||
# now try to find it with the full path
|
# now try to find it with the full path
|
||||||
# if it is found, force it into the cache,
|
# if it is found, force it into the cache,
|
||||||
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
|
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
|
||||||
GET_FILENAME_COMPONENT(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
|
GET_FILENAME_COMPONENT(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
|
||||||
IF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
|
IF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
|
||||||
@ -57,11 +57,30 @@ IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
|
|||||||
GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
|
GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
|
||||||
ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
|
ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
|
||||||
|
|
||||||
# If we have a gas/as cross compiler, they have usually some prefix, like
|
|
||||||
|
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
||||||
|
|
||||||
|
# Table of per-vendor compiler id flags with expected output.
|
||||||
|
LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU )
|
||||||
|
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
|
||||||
|
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "GNU assembler")
|
||||||
|
|
||||||
|
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
|
||||||
|
|
||||||
|
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
||||||
|
MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
|
||||||
|
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
||||||
|
MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
|
||||||
|
ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
|
||||||
|
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
# If we have a gas/as cross compiler, they have usually some prefix, like
|
||||||
# e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas .
|
# e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas .
|
||||||
# The other tools of the toolchain usually have the same prefix
|
# The other tools of the toolchain usually have the same prefix
|
||||||
# NAME_WE cannot be used since then this test will fail for names lile
|
# NAME_WE cannot be used since then this test will fail for names lile
|
||||||
# "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be
|
# "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be
|
||||||
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
|
||||||
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
|
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
|
||||||
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
|
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
|
||||||
@ -86,7 +105,7 @@ SET(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
|
|||||||
SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
|
SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
|
||||||
|
|
||||||
# configure variables set in this file for fast reload later on
|
# configure variables set in this file for fast reload later on
|
||||||
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
|
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
|
||||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY)
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY)
|
||||||
|
|
||||||
SET(_CMAKE_ASM_COMPILER)
|
SET(_CMAKE_ASM_COMPILER)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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 the MS assembler (masm or masm64)
|
# Find the MS assembler (masm or masm64)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# determine the compiler to use for C programs
|
# determine the compiler to use for C programs
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# determine the compiler to use for C++ programs
|
# determine the compiler to use for C++ programs
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# Function to compile a source file to identify the compiler ABI.
|
# Function to compile a source file to identify the compiler ABI.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# Function to compile a source file to identify the compiler. This is
|
# Function to compile a source file to identify the compiler. This is
|
||||||
@ -63,7 +63,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
|
|||||||
|
|
||||||
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
|
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
|
||||||
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
|
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
|
||||||
SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
|
SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
|
||||||
PARENT_SCOPE)
|
PARENT_SCOPE)
|
||||||
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID)
|
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID)
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
|||||||
# Return the information extracted.
|
# Return the information extracted.
|
||||||
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
|
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
|
||||||
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
|
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
|
||||||
SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
|
SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
|
||||||
PARENT_SCOPE)
|
PARENT_SCOPE)
|
||||||
SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
|
SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
|
||||||
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
|
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
|
||||||
@ -261,6 +261,17 @@ ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
|
|||||||
# We try running the compiler with the flag for each vendor and
|
# We try running the compiler with the flag for each vendor and
|
||||||
# matching its regular expression in the output.
|
# matching its regular expression in the output.
|
||||||
FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
|
FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
|
||||||
|
|
||||||
|
IF(NOT CMAKE_${lang}_COMPILER_ID_DIR)
|
||||||
|
# We get here when this function is called not from within CMAKE_DETERMINE_COMPILER_ID()
|
||||||
|
# This is done e.g. for detecting the compiler ID for assemblers.
|
||||||
|
# Compute the directory in which to run the test and Create a clean working directory.
|
||||||
|
SET(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang})
|
||||||
|
FILE(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
|
||||||
|
FILE(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
|
||||||
|
ENDIF(NOT CMAKE_${lang}_COMPILER_ID_DIR)
|
||||||
|
|
||||||
|
|
||||||
FOREACH(vendor ${CMAKE_${lang}_COMPILER_ID_VENDORS})
|
FOREACH(vendor ${CMAKE_${lang}_COMPILER_ID_VENDORS})
|
||||||
SET(flags ${CMAKE_${lang}_COMPILER_ID_VENDOR_FLAGS_${vendor}})
|
SET(flags ${CMAKE_${lang}_COMPILER_ID_VENDOR_FLAGS_${vendor}})
|
||||||
SET(regex ${CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor}})
|
SET(regex ${CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor}})
|
||||||
@ -272,6 +283,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
|
|||||||
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
|
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
|
||||||
OUTPUT_VARIABLE output ERROR_VARIABLE output
|
OUTPUT_VARIABLE output ERROR_VARIABLE output
|
||||||
RESULT_VARIABLE result
|
RESULT_VARIABLE result
|
||||||
|
TIMEOUT 10
|
||||||
)
|
)
|
||||||
IF("${output}" MATCHES "${regex}")
|
IF("${output}" MATCHES "${regex}")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
@ -280,9 +292,15 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
|
|||||||
SET(CMAKE_${lang}_COMPILER_ID "${vendor}" PARENT_SCOPE)
|
SET(CMAKE_${lang}_COMPILER_ID "${vendor}" PARENT_SCOPE)
|
||||||
BREAK()
|
BREAK()
|
||||||
ELSE()
|
ELSE()
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
IF("${result}" MATCHES "timeout")
|
||||||
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"did not match \"${regex}\":\n${output}")
|
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
|
||||||
|
"terminated after 10 s due to timeout.")
|
||||||
|
ELSE()
|
||||||
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
|
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
|
||||||
|
"did not match \"${regex}\":\n${output}")
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR)
|
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# determine the compiler to use for Fortran programs
|
# determine the compiler to use for Fortran programs
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# determine the compiler to use for Java programs
|
# determine the compiler to use for Java programs
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# determine the compiler to use for C programs
|
# determine the compiler to use for C programs
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This module is used by the Makefile generator to determin the following variables:
|
# This module is used by the Makefile generator to determin the following variables:
|
||||||
@ -47,17 +47,17 @@ IF(CMAKE_HOST_UNIX)
|
|||||||
IF(CMAKE_UNAME)
|
IF(CMAKE_UNAME)
|
||||||
EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME)
|
EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME)
|
||||||
EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
|
EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
|
||||||
IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
|
IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
|
||||||
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
|
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
|
||||||
RETURN_VALUE val)
|
RETURN_VALUE val)
|
||||||
ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
|
ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
|
||||||
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
|
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
|
||||||
RETURN_VALUE val)
|
RETURN_VALUE val)
|
||||||
IF("${val}" GREATER 0)
|
IF("${val}" GREATER 0)
|
||||||
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
|
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
|
||||||
RETURN_VALUE val)
|
RETURN_VALUE val)
|
||||||
ENDIF("${val}" GREATER 0)
|
ENDIF("${val}" GREATER 0)
|
||||||
ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
|
ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
|
||||||
# check the return of the last uname -m or -p
|
# check the return of the last uname -m or -p
|
||||||
IF("${val}" GREATER 0)
|
IF("${val}" GREATER 0)
|
||||||
SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
|
SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
# ===========================
|
# ===========================
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2009 Kitware, Inc.
|
# Copyright 2009-2010 Kitware, Inc.
|
||||||
# Copyright 2009 Philip Lowman <philip@yhbt.com>
|
# Copyright 2009-2010 Philip Lowman <philip@yhbt.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.
|
||||||
@ -33,7 +33,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# [INTERNAL]
|
# [INTERNAL]
|
||||||
@ -47,6 +47,8 @@ function(_DetermineVSServicePackFromCompiler _OUT_VAR _cl_version)
|
|||||||
set(_version "vc90")
|
set(_version "vc90")
|
||||||
elseif(${_cl_version} VERSION_EQUAL "15.00.30729.01")
|
elseif(${_cl_version} VERSION_EQUAL "15.00.30729.01")
|
||||||
set(_version "vc90sp1")
|
set(_version "vc90sp1")
|
||||||
|
elseif(${_cl_version} VERSION_EQUAL "16.00.30319.01")
|
||||||
|
set(_version "vc100")
|
||||||
else()
|
else()
|
||||||
set(_version "")
|
set(_version "")
|
||||||
endif()
|
endif()
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This module is purposely no longer documented. It does nothing useful.
|
# This module is purposely no longer documented. It does nothing useful.
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# if it's the MS C/CXX compiler, search for link
|
# if it's the MS C/CXX compiler, search for link
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is included in CMakeSystemSpecificInformation.cmake if
|
# This file is included in CMakeSystemSpecificInformation.cmake if
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is included in CMakeSystemSpecificInformation.cmake if
|
# This file is included in CMakeSystemSpecificInformation.cmake if
|
||||||
@ -22,8 +22,8 @@ FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable"
|
|||||||
# so that Eclipse ca find the headers at runtime and parsing etc. works better
|
# 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
|
# 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.
|
# system include directories, which are parsed then and stored in the cache.
|
||||||
MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _result _resultDefines)
|
MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines)
|
||||||
SET(${_result})
|
SET(${_resultIncludeDirs})
|
||||||
SET(_gccOutput)
|
SET(_gccOutput)
|
||||||
FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" )
|
FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" )
|
||||||
EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -v -E -x ${_lang} -dD dummy
|
EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -v -E -x ${_lang} -dD dummy
|
||||||
@ -32,24 +32,43 @@ MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _result _resultDefines)
|
|||||||
OUTPUT_VARIABLE _gccStdout )
|
OUTPUT_VARIABLE _gccStdout )
|
||||||
FILE(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
|
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" )
|
IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
|
||||||
SET(${_result} ${CMAKE_MATCH_1})
|
|
||||||
STRING(REPLACE "\n" " " ${_result} "${${_result}}")
|
# split the output into lines and then remove leading and trailing spaces from each of them:
|
||||||
SEPARATE_ARGUMENTS(${_result})
|
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" )
|
ENDIF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
|
||||||
|
|
||||||
IF( "${_gccStdout}" MATCHES "built-in>\"\n(.+)# 1 +\"dummy\"" )
|
|
||||||
SET(_builtinDefines ${CMAKE_MATCH_1})
|
# now find the builtin macros:
|
||||||
# Remove the '# 1 "<command-line>"' lines
|
STRING(REGEX MATCHALL "#define[^\n]+\n" _defineLines "${_gccStdout}")
|
||||||
STRING(REGEX REPLACE "# 1[^\n]+\n" "" _filteredOutput "${_builtinDefines}")
|
# A few example lines which the regexp below has to match properly:
|
||||||
# Remove the "#define " parts from the output:
|
# #define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||||
STRING(REGEX REPLACE "#define " "" _defineRemoved "${_filteredOutput}")
|
# #define __fastcall __attribute__((__fastcall__))
|
||||||
# Replace the line breaks with spaces, so we can use separate arguments afterwards
|
# #define FOO (23)
|
||||||
STRING(REGEX REPLACE "\n" " " _defineRemoved "${_defineRemoved}")
|
# #define __UINTMAX_TYPE__ long long unsigned int
|
||||||
# Remove space at the end, this would produce empty list items
|
# #define __UINTMAX_TYPE__ long long unsigned int
|
||||||
STRING(REGEX REPLACE " +$" "" ${_resultDefines} "${_defineRemoved}")
|
# #define __i386__ 1
|
||||||
SEPARATE_ARGUMENTS(${_resultDefines})
|
|
||||||
ENDIF( "${_gccStdout}" MATCHES "built-in>\"\n(.+)# 1 +\"dummy\"" )
|
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)
|
ENDMACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang)
|
||||||
|
|
||||||
# Save the current LC_ALL, LC_MESSAGES, and LANG environment variables and set them
|
# Save the current LC_ALL, LC_MESSAGES, and LANG environment variables and set them
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
IF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
|
IF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is included in CMakeSystemSpecificInformation.cmake if
|
# This file is included in CMakeSystemSpecificInformation.cmake if
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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 (CMAKE_MAKE_PROGRAM "wmake" CACHE STRING
|
SET (CMAKE_MAKE_PROGRAM "wmake" CACHE STRING
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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_PROGRAM(CMAKE_MAKE_PROGRAM
|
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CMAKE_FORCE_C_COMPILER compiler id)
|
MACRO(CMAKE_FORCE_C_COMPILER compiler id)
|
||||||
|
@ -9,13 +9,15 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file sets the basic flags for the Fortran language in CMake.
|
# This file sets the basic flags for the Fortran language in CMake.
|
||||||
# It also loads the available platform file for the system-compiler
|
# It also loads the available platform file for the system-compiler
|
||||||
# if it exists.
|
# if it exists.
|
||||||
|
|
||||||
|
SET(_INCLUDED_FILE 0)
|
||||||
|
|
||||||
# Load compiler-specific information.
|
# Load compiler-specific information.
|
||||||
IF(CMAKE_Fortran_COMPILER_ID)
|
IF(CMAKE_Fortran_COMPILER_ID)
|
||||||
INCLUDE(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
|
INCLUDE(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
|
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
|
||||||
@ -52,6 +52,94 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
|||||||
ENDIF(DEFINED CMAKE_RULE_MESSAGES)
|
ENDIF(DEFINED CMAKE_RULE_MESSAGES)
|
||||||
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
|
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||||
|
|
||||||
|
|
||||||
|
# GetDefaultWindowsPrefixBase
|
||||||
|
#
|
||||||
|
# Compute the base directory for CMAKE_INSTALL_PREFIX based on:
|
||||||
|
# - is this 32-bit or 64-bit Windows
|
||||||
|
# - is this 32-bit or 64-bit CMake running
|
||||||
|
# - what architecture targets will be built
|
||||||
|
#
|
||||||
|
function(GetDefaultWindowsPrefixBase var)
|
||||||
|
|
||||||
|
# Try to guess what architecture targets will end up being built as,
|
||||||
|
# even if CMAKE_SIZEOF_VOID_P is not computed yet... We need to know
|
||||||
|
# the architecture of the targets being built to choose the right
|
||||||
|
# default value for CMAKE_INSTALL_PREFIX.
|
||||||
|
#
|
||||||
|
if("${CMAKE_GENERATOR}" MATCHES "Win64")
|
||||||
|
set(arch_hint "x64")
|
||||||
|
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
||||||
|
set(arch_hint "x64")
|
||||||
|
elseif("$ENV{LIB}" MATCHES "(amd64|ia64)")
|
||||||
|
set(arch_hint "x64")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT arch_hint)
|
||||||
|
set(arch_hint "x86")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# default env in a 64-bit app on Win64:
|
||||||
|
# ProgramFiles=C:\Program Files
|
||||||
|
# ProgramFiles(x86)=C:\Program Files (x86)
|
||||||
|
# ProgramW6432=C:\Program Files
|
||||||
|
#
|
||||||
|
# default env in a 32-bit app on Win64:
|
||||||
|
# ProgramFiles=C:\Program Files (x86)
|
||||||
|
# ProgramFiles(x86)=C:\Program Files (x86)
|
||||||
|
# ProgramW6432=C:\Program Files
|
||||||
|
#
|
||||||
|
# default env in a 32-bit app on Win32:
|
||||||
|
# ProgramFiles=C:\Program Files
|
||||||
|
# ProgramFiles(x86) NOT DEFINED
|
||||||
|
# ProgramW6432 NOT DEFINED
|
||||||
|
|
||||||
|
# By default, use the ProgramFiles env var as the base value of
|
||||||
|
# CMAKE_INSTALL_PREFIX:
|
||||||
|
#
|
||||||
|
set(_PREFIX_ENV_VAR "ProgramFiles")
|
||||||
|
|
||||||
|
if ("$ENV{ProgramW6432}" STREQUAL "")
|
||||||
|
# running on 32-bit Windows
|
||||||
|
# must be a 32-bit CMake, too...
|
||||||
|
#message("guess: this is a 32-bit CMake running on 32-bit Windows")
|
||||||
|
else()
|
||||||
|
# running on 64-bit Windows
|
||||||
|
if ("$ENV{ProgramW6432}" STREQUAL "$ENV{ProgramFiles}")
|
||||||
|
# 64-bit CMake
|
||||||
|
#message("guess: this is a 64-bit CMake running on 64-bit Windows")
|
||||||
|
if(NOT "${arch_hint}" STREQUAL "x64")
|
||||||
|
# building 32-bit targets
|
||||||
|
set(_PREFIX_ENV_VAR "ProgramFiles(x86)")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# 32-bit CMake
|
||||||
|
#message("guess: this is a 32-bit CMake running on 64-bit Windows")
|
||||||
|
if("${arch_hint}" STREQUAL "x64")
|
||||||
|
# building 64-bit targets
|
||||||
|
set(_PREFIX_ENV_VAR "ProgramW6432")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#if("${arch_hint}" STREQUAL "x64")
|
||||||
|
# message("guess: you are building a 64-bit app")
|
||||||
|
#else()
|
||||||
|
# message("guess: you are building a 32-bit app")
|
||||||
|
#endif()
|
||||||
|
|
||||||
|
if(NOT "$ENV{${_PREFIX_ENV_VAR}}" STREQUAL "")
|
||||||
|
file(TO_CMAKE_PATH "$ENV{${_PREFIX_ENV_VAR}}" _base)
|
||||||
|
elseif(NOT "$ENV{SystemDrive}" STREQUAL "")
|
||||||
|
set(_base "$ENV{SystemDrive}/Program Files")
|
||||||
|
else()
|
||||||
|
set(_base "C:/Program Files")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(${var} "${_base}" PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
# Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX
|
# Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX
|
||||||
# was initialized by the block below. This is useful for user
|
# was initialized by the block below. This is useful for user
|
||||||
# projects to change the default prefix while still allowing the
|
# projects to change the default prefix while still allowing the
|
||||||
@ -65,23 +153,11 @@ IF(CMAKE_HOST_UNIX)
|
|||||||
SET(CMAKE_INSTALL_PREFIX "/usr/local"
|
SET(CMAKE_INSTALL_PREFIX "/usr/local"
|
||||||
CACHE PATH "Install path prefix, prepended onto install directories.")
|
CACHE PATH "Install path prefix, prepended onto install directories.")
|
||||||
ELSE(CMAKE_HOST_UNIX)
|
ELSE(CMAKE_HOST_UNIX)
|
||||||
IF("$ENV{ProgramFiles}" MATCHES "^$")
|
GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
|
||||||
IF("$ENV{SystemDrive}" MATCHES "^$")
|
|
||||||
SET(CMAKE_GENERIC_PROGRAM_FILES "C:/Program Files")
|
|
||||||
ELSE("$ENV{SystemDrive}" MATCHES "^$")
|
|
||||||
SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{SystemDrive}/Program Files")
|
|
||||||
ENDIF("$ENV{SystemDrive}" MATCHES "^$")
|
|
||||||
ELSE("$ENV{ProgramFiles}" MATCHES "^$")
|
|
||||||
SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{ProgramFiles}")
|
|
||||||
ENDIF("$ENV{ProgramFiles}" MATCHES "^$")
|
|
||||||
SET(CMAKE_INSTALL_PREFIX
|
SET(CMAKE_INSTALL_PREFIX
|
||||||
"${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}"
|
"${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}"
|
||||||
CACHE PATH "Install path prefix, prepended onto install directories.")
|
CACHE PATH "Install path prefix, prepended onto install directories.")
|
||||||
SET(CMAKE_GENERIC_PROGRAM_FILES)
|
SET(CMAKE_GENERIC_PROGRAM_FILES)
|
||||||
|
|
||||||
# Make sure the prefix uses forward slashes.
|
|
||||||
STRING(REGEX REPLACE "\\\\" "/"
|
|
||||||
CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
|
||||||
ENDIF(CMAKE_HOST_UNIX)
|
ENDIF(CMAKE_HOST_UNIX)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This module is purposely no longer documented. It does nothing useful.
|
# This module is purposely no longer documented. It does nothing useful.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This should be included before the _INIT variables are
|
# This should be included before the _INIT variables are
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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_PROGRAM(CMAKE_MAKE_PROGRAM make
|
FIND_PROGRAM(CMAKE_MAKE_PROGRAM make
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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_PROGRAM(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
|
FIND_PROGRAM(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
|
|
||||||
|
138
Modules/CMakeParseArguments.cmake
Normal file
138
Modules/CMakeParseArguments.cmake
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
|
||||||
|
#
|
||||||
|
# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for
|
||||||
|
# parsing the arguments given to that macro or function.
|
||||||
|
# It processes the arguments and defines a set of variables which hold the
|
||||||
|
# values of the respective options.
|
||||||
|
#
|
||||||
|
# The <options> argument contains all options for the respective macro,
|
||||||
|
# i.e. keywords which can be used when calling the macro without any value
|
||||||
|
# following, like e.g. the OPTIONAL keyword of the install() command.
|
||||||
|
#
|
||||||
|
# The <one_value_keywords> argument contains all keywords for this macro
|
||||||
|
# which are followed by one value, like e.g. DESTINATION keyword of the
|
||||||
|
# install() command.
|
||||||
|
#
|
||||||
|
# The <multi_value_keywords> argument contains all keywords for this macro
|
||||||
|
# which can be followed by more than one value, like e.g. the TARGETS or
|
||||||
|
# FILES keywords of the install() command.
|
||||||
|
#
|
||||||
|
# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
|
||||||
|
# keywords listed in <options>, <one_value_keywords> and
|
||||||
|
# <multi_value_keywords> a variable composed of the given <prefix>
|
||||||
|
# followed by "_" and the name of the respective keyword.
|
||||||
|
# These variables will then hold the respective value from the argument list.
|
||||||
|
# For the <options> keywords this will be TRUE or FALSE.
|
||||||
|
#
|
||||||
|
# All remaining arguments are collected in a variable
|
||||||
|
# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether
|
||||||
|
# your macro was called with unrecognized parameters.
|
||||||
|
#
|
||||||
|
# As an example here a my_install() macro, which takes similar arguments as the
|
||||||
|
# real install() command:
|
||||||
|
#
|
||||||
|
# function(MY_INSTALL)
|
||||||
|
# set(options OPTIONAL FAST)
|
||||||
|
# set(oneValueArgs DESTINATION RENAME)
|
||||||
|
# set(multiValueArgs TARGETS CONFIGURATIONS)
|
||||||
|
# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||||
|
# ...
|
||||||
|
#
|
||||||
|
# Assume my_install() has been called like this:
|
||||||
|
# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
|
||||||
|
#
|
||||||
|
# After the cmake_parse_arguments() call the macro will have set the following
|
||||||
|
# variables:
|
||||||
|
# MY_INSTALL_OPTIONAL = TRUE
|
||||||
|
# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
|
||||||
|
# MY_INSTALL_DESTINATION = "bin"
|
||||||
|
# MY_INSTALL_RENAME = "" (was not used)
|
||||||
|
# MY_INSTALL_TARGETS = "foo;bar"
|
||||||
|
# MY_INSTALL_CONFIGURATIONS = "" (was not used)
|
||||||
|
# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
|
||||||
|
#
|
||||||
|
# You can the continue and process these variables.
|
||||||
|
#
|
||||||
|
# Keywords terminate lists of values, e.g. if directly after a one_value_keyword
|
||||||
|
# another recognized keyword follows, this is interpreted as the beginning of
|
||||||
|
# the new option.
|
||||||
|
# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in
|
||||||
|
# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would
|
||||||
|
# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2010 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(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
|
||||||
|
|
||||||
|
|
||||||
|
function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
|
||||||
|
# first set all result variables to empty/FALSE
|
||||||
|
foreach(arg_name ${_singleArgNames} ${_multiArgNames})
|
||||||
|
set(${prefix}_${arg_name})
|
||||||
|
endforeach(arg_name)
|
||||||
|
|
||||||
|
foreach(option ${_optionNames})
|
||||||
|
set(${prefix}_${option} FALSE)
|
||||||
|
endforeach(option)
|
||||||
|
|
||||||
|
set(${prefix}_UNPARSED_ARGUMENTS)
|
||||||
|
|
||||||
|
set(insideValues FALSE)
|
||||||
|
set(currentArgName)
|
||||||
|
|
||||||
|
# now iterate over all arguments and fill the result variables
|
||||||
|
foreach(currentArg ${ARGN})
|
||||||
|
list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
|
||||||
|
list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
|
||||||
|
list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
|
||||||
|
|
||||||
|
if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
|
||||||
|
if(insideValues)
|
||||||
|
if("${insideValues}" STREQUAL "SINGLE")
|
||||||
|
set(${prefix}_${currentArgName} ${currentArg})
|
||||||
|
set(insideValues FALSE)
|
||||||
|
elseif("${insideValues}" STREQUAL "MULTI")
|
||||||
|
list(APPEND ${prefix}_${currentArgName} ${currentArg})
|
||||||
|
endif()
|
||||||
|
else(insideValues)
|
||||||
|
list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
|
||||||
|
endif(insideValues)
|
||||||
|
else()
|
||||||
|
if(NOT ${optionIndex} EQUAL -1)
|
||||||
|
set(${prefix}_${currentArg} TRUE)
|
||||||
|
set(insideValues FALSE)
|
||||||
|
elseif(NOT ${singleArgIndex} EQUAL -1)
|
||||||
|
set(currentArgName ${currentArg})
|
||||||
|
set(${prefix}_${currentArgName})
|
||||||
|
set(insideValues "SINGLE")
|
||||||
|
elseif(NOT ${multiArgIndex} EQUAL -1)
|
||||||
|
set(currentArgName ${currentArg})
|
||||||
|
set(${prefix}_${currentArgName})
|
||||||
|
set(insideValues "MULTI")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endforeach(currentArg)
|
||||||
|
|
||||||
|
# propagate the result variables to the caller:
|
||||||
|
foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
|
||||||
|
set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
|
||||||
|
endforeach(arg_name)
|
||||||
|
set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
|
||||||
|
|
||||||
|
endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# Function parse implicit linker options.
|
# Function parse implicit linker options.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MESSAGE("CMAKE_SYSTEM is ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
|
MESSAGE("CMAKE_SYSTEM is ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is included by cmGlobalGenerator::EnableLanguage.
|
# This file is included by cmGlobalGenerator::EnableLanguage.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
INCLUDE(CMakeTestCompilerCommon)
|
INCLUDE(CMakeTestCompilerCommon)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
INCLUDE(CMakeTestCompilerCommon)
|
INCLUDE(CMakeTestCompilerCommon)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
function(PrintTestCompilerStatus LANG MSG)
|
function(PrintTestCompilerStatus LANG MSG)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
INCLUDE(CMakeTestCompilerCommon)
|
INCLUDE(CMakeTestCompilerCommon)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make smake)
|
FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make smake)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# We use MSBuild as the build tool for VS 10
|
# We use MSBuild as the build tool for VS 10
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# hard code these for fast backwards compatibility tests
|
# hard code these for fast backwards compatibility tests
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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_PROGRAM(CMAKE_MAKE_PROGRAM
|
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
|
||||||
@ -22,3 +22,4 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
|
|||||||
)
|
)
|
||||||
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
|
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
|
||||||
SET(MSVC60 1)
|
SET(MSVC60 1)
|
||||||
|
SET(MSVC_VERSION 1200)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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_PROGRAM(CMAKE_MAKE_PROGRAM
|
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
|
||||||
@ -23,3 +23,4 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
|
|||||||
)
|
)
|
||||||
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
|
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
|
||||||
SET(MSVC71 1)
|
SET(MSVC71 1)
|
||||||
|
SET(MSVC_VERSION 1310)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# hard code these for fast backwards compatibility tests
|
# hard code these for fast backwards compatibility tests
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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_PROGRAM(CMAKE_MAKE_PROGRAM
|
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
|
||||||
@ -22,3 +22,4 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
|
|||||||
)
|
)
|
||||||
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
|
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
|
||||||
SET(MSVC70 1)
|
SET(MSVC70 1)
|
||||||
|
SET(MSVC_VERSION 1300)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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
|
# VCExpress does not support cross compiling, which is necessary for Win CE
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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
|
# VCExpress does not support cross compiling, which is necessary for Win CE
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,9 +19,41 @@
|
|||||||
# described below, for more information about component-specific
|
# described below, for more information about component-specific
|
||||||
# installations.
|
# installations.
|
||||||
#
|
#
|
||||||
# Before including the CPack module, there are a variety of variables
|
# The CPACK_GENERATOR variable has different meanings in different
|
||||||
# that can be set to customize the resulting installers. The most
|
# contexts. In your CMakeLists.txt file, CPACK_GENERATOR is a
|
||||||
# commonly-used variables are:
|
# *list of generators*: when run with no other arguments, CPack
|
||||||
|
# will iterate over that list and produce one package for each
|
||||||
|
# generator. In a CPACK_PROJECT_CONFIG_FILE, though, CPACK_GENERATOR
|
||||||
|
# is a *string naming a single generator*. If you need per-cpack-
|
||||||
|
# generator logic to control *other* cpack settings, then you need
|
||||||
|
# a CPACK_PROJECT_CONFIG_FILE.
|
||||||
|
#
|
||||||
|
# The CMake source tree itself contains a CPACK_PROJECT_CONFIG_FILE.
|
||||||
|
# See the top level file CMakeCPackOptions.cmake.in for an example.
|
||||||
|
#
|
||||||
|
# If set, the CPACK_PROJECT_CONFIG_FILE is included automatically
|
||||||
|
# on a per-generator basis. It only need contain overrides.
|
||||||
|
#
|
||||||
|
# Here's how it works:
|
||||||
|
# - cpack runs
|
||||||
|
# - it includes CPackConfig.cmake
|
||||||
|
# - it iterates over the generators listed in that file's
|
||||||
|
# CPACK_GENERATOR list variable (unless told to use just a
|
||||||
|
# specific one via -G on the command line...)
|
||||||
|
#
|
||||||
|
# - foreach generator, it then
|
||||||
|
# - sets CPACK_GENERATOR to the one currently being iterated
|
||||||
|
# - includes the CPACK_PROJECT_CONFIG_FILE
|
||||||
|
# - produces the package for that generator
|
||||||
|
#
|
||||||
|
# This is the key: For each generator listed in CPACK_GENERATOR
|
||||||
|
# in CPackConfig.cmake, cpack will *reset* CPACK_GENERATOR
|
||||||
|
# internally to *the one currently being used* and then include
|
||||||
|
# the CPACK_PROJECT_CONFIG_FILE.
|
||||||
|
#
|
||||||
|
# Before including this CPack module in your CMakeLists.txt file,
|
||||||
|
# there are a variety of variables that can be set to customize
|
||||||
|
# the resulting installers. The most commonly-used variables are:
|
||||||
#
|
#
|
||||||
# CPACK_PACKAGE_NAME - The name of the package (or application). If
|
# CPACK_PACKAGE_NAME - The name of the package (or application). If
|
||||||
# not specified, defaults to the project name.
|
# not specified, defaults to the project name.
|
||||||
@ -48,6 +80,11 @@
|
|||||||
# CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
|
# CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
|
||||||
# target system, e.g., "CMake 2.5".
|
# target system, e.g., "CMake 2.5".
|
||||||
#
|
#
|
||||||
|
# CPACK_PROJECT_CONFIG_FILE - File included at cpack time, once per
|
||||||
|
# generator after setting CPACK_GENERATOR to the actual generator
|
||||||
|
# being used. Allows per-generator setting of CPACK_* variables at
|
||||||
|
# cpack time.
|
||||||
|
#
|
||||||
# CPACK_RESOURCE_FILE_LICENSE - License file for the project, which
|
# CPACK_RESOURCE_FILE_LICENSE - License file for the project, which
|
||||||
# will typically be displayed to the user (often with an explicit
|
# will typically be displayed to the user (often with an explicit
|
||||||
# "Accept" button, for graphical installers) prior to installation.
|
# "Accept" button, for graphical installers) prior to installation.
|
||||||
@ -459,7 +496,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# Pick a configuration file
|
# Pick a configuration file
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
# - The builtin (binary) CPack Deb generator (Unix only)
|
# - The builtin (binary) CPack Deb generator (Unix only)
|
||||||
# CPackDeb may be used to create Deb package using CPack.
|
# CPackDeb may be used to create Deb package using CPack.
|
||||||
# CPackDeb is a CPack generator thus it uses the CPACK_XXX variables
|
# CPackDeb is a CPack generator thus it uses the CPACK_XXX variables
|
||||||
# used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration
|
# used by CPack : http://www.cmake.org/Wiki/CMake:CPackConfiguration.
|
||||||
|
# CPackDeb generator should work on any linux host but it will
|
||||||
|
# produce better deb package when Debian specific tools 'dpkg-xxx'
|
||||||
|
# are usable on the build system.
|
||||||
#
|
#
|
||||||
# However CPackRPM has specific features which are controlled by
|
# CPackDeb has specific features which are controlled by
|
||||||
# the specifics CPACK_RPM_XXX variables.You'll find a detailed usage on
|
# the specifics CPACK_DEBIAN_XXX variables.You'll find a detailed usage on
|
||||||
# the wiki:
|
# the wiki:
|
||||||
# http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
|
# http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
|
||||||
# However as a handy reminder here comes the list of specific variables:
|
# However as a handy reminder here comes the list of specific variables:
|
||||||
#
|
#
|
||||||
# CPACK_DEBIAN_PACKAGE_NAME
|
# CPACK_DEBIAN_PACKAGE_NAME
|
||||||
# Mandatory : YES
|
# Mandatory : YES
|
||||||
# Default : CPACK_PACKAGE_NAME (lower case)
|
# Default : CPACK_PACKAGE_NAME (lower case)
|
||||||
# The debian package summary
|
# The debian package summary
|
||||||
@ -19,12 +22,12 @@
|
|||||||
# 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
|
# Default : Output of dpkg --print-architecture (or i386 if dpkg is not found)
|
||||||
# The debian package architecture
|
# The debian package architecture
|
||||||
# CPACK_DEBIAN_PACKAGE_DEPENDS
|
# CPACK_DEBIAN_PACKAGE_DEPENDS
|
||||||
# Mandatory : NO
|
# Mandatory : NO
|
||||||
# Default : -
|
# Default : -
|
||||||
# May be used to set deb dependencies.
|
# May be used to set deb dependencies.
|
||||||
# CPACK_DEBIAN_PACKAGE_MAINTAINER
|
# CPACK_DEBIAN_PACKAGE_MAINTAINER
|
||||||
# Mandatory : YES
|
# Mandatory : YES
|
||||||
# Default : CPACK_PACKAGE_CONTACT
|
# Default : CPACK_PACKAGE_CONTACT
|
||||||
@ -41,6 +44,61 @@
|
|||||||
# Mandatory : YES
|
# Mandatory : YES
|
||||||
# Default : 'optional'
|
# Default : 'optional'
|
||||||
# The debian package priority
|
# The debian package priority
|
||||||
|
# CPACK_DEBIAN_PACKAGE_HOMEPAGE
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# The URL of the web site for this package
|
||||||
|
# CPACK_DEBIAN_PACKAGE_SHLIBDEPS
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : OFF
|
||||||
|
# May be set to ON in order to use dpkg-shlibdeps to generate
|
||||||
|
# better package dependency list.
|
||||||
|
# You may need set CMAKE_INSTALL_RPATH toi appropriate value
|
||||||
|
# if you use this feature, because if you don't dpkg-shlibdeps
|
||||||
|
# may fail to find your own shared libs.
|
||||||
|
# See http://www.cmake.org/Wiki/CMake_RPATH_handling.
|
||||||
|
# CPACK_DEBIAN_PACKAGE_DEBUG
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# May be set when invoking cpack in order to trace debug informations
|
||||||
|
# during CPackDeb run.
|
||||||
|
# CPACK_DEBIAN_PACKAGE_PREDEPENDS
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
|
||||||
|
# This field is like Depends, except that it also forces dpkg to complete installation of
|
||||||
|
# the packages named before even starting the installation of the package which declares
|
||||||
|
# the pre-dependency.
|
||||||
|
# CPACK_DEBIAN_PACKAGE_ENHANCES
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
|
||||||
|
# This field is similar to Suggests but works in the opposite direction.
|
||||||
|
# It is used to declare that a package can enhance the functionality of another package.
|
||||||
|
# CPACK_DEBIAN_PACKAGE_BREAKS
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
|
||||||
|
# When one binary package declares that it breaks another, dpkg will refuse to allow the
|
||||||
|
# package which declares Breaks be installed unless the broken package is deconfigured first,
|
||||||
|
# and it will refuse to allow the broken package to be reconfigured.
|
||||||
|
# CPACK_DEBIAN_PACKAGE_CONFLICTS
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
|
||||||
|
# When one binary package declares a conflict with another using a Conflicts field,
|
||||||
|
# dpkg will refuse to allow them to be installed on the system at the same time.
|
||||||
|
# CPACK_DEBIAN_PACKAGE_PROVIDES
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
|
||||||
|
# A virtual package is one which appears in the Provides control field of another package.
|
||||||
|
# CPACK_DEBIAN_PACKAGE_REPLACES
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
|
||||||
|
# Packages can declare in their control file that they should overwrite
|
||||||
|
# files in certain other packages, or completely replace other packages.
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2007-2009 Kitware, Inc.
|
# Copyright 2007-2009 Kitware, Inc.
|
||||||
@ -53,7 +111,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# CPack script for creating Debian package
|
# CPack script for creating Debian package
|
||||||
@ -69,6 +127,103 @@ IF(NOT UNIX)
|
|||||||
MESSAGE(FATAL_ERROR "CPackDeb.cmake may only be used under UNIX.")
|
MESSAGE(FATAL_ERROR "CPackDeb.cmake may only be used under UNIX.")
|
||||||
ENDIF(NOT UNIX)
|
ENDIF(NOT UNIX)
|
||||||
|
|
||||||
|
# CPACK_DEBIAN_PACKAGE_SHLIBDEPS
|
||||||
|
# If specify OFF, only user depends are used
|
||||||
|
IF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
|
||||||
|
ENDIF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
|
||||||
|
|
||||||
|
IF(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
|
||||||
|
# dpkg-shlibdeps is a Debian utility for generating dependency list
|
||||||
|
FIND_PROGRAM(SHLIBDEPS_EXECUTABLE dpkg-shlibdeps)
|
||||||
|
|
||||||
|
# Check version of the dpkg-shlibdeps tool using CPackRPM method
|
||||||
|
IF(SHLIBDEPS_EXECUTABLE)
|
||||||
|
EXECUTE_PROCESS(COMMAND ${SHLIBDEPS_EXECUTABLE} --version
|
||||||
|
OUTPUT_VARIABLE _TMP_VERSION
|
||||||
|
ERROR_QUIET
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
STRING(REGEX MATCH "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)"
|
||||||
|
SHLIBDEPS_EXECUTABLE_VERSION
|
||||||
|
${_TMP_VERSION})
|
||||||
|
SET(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
|
||||||
|
IF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
MESSAGE( "CPackDeb Debug: dpkg-shlibdeps version is <${SHLIBDEPS_EXECUTABLE_VERSION}>")
|
||||||
|
ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
|
||||||
|
# Generating binary list - Get type of all install files
|
||||||
|
EXECUTE_PROCESS(COMMAND find -type f
|
||||||
|
COMMAND xargs file
|
||||||
|
WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
|
||||||
|
OUTPUT_VARIABLE CPACK_DEB_INSTALL_FILES)
|
||||||
|
|
||||||
|
# Convert to CMake list
|
||||||
|
STRING(REGEX REPLACE "\n" ";" CPACK_DEB_INSTALL_FILES ${CPACK_DEB_INSTALL_FILES})
|
||||||
|
|
||||||
|
# Only dynamically linked ELF files are included
|
||||||
|
# Extract only file name infront of ":"
|
||||||
|
FOREACH ( _FILE ${CPACK_DEB_INSTALL_FILES})
|
||||||
|
IF ( ${_FILE} MATCHES "ELF.*dynamically linked")
|
||||||
|
STRING(REGEX MATCH "(^.*):" _FILE_NAME ${_FILE})
|
||||||
|
LIST(APPEND CPACK_DEB_BINARY_FILES ${CMAKE_MATCH_1})
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
|
MESSAGE( "CPackDeb: - Generating dependency list")
|
||||||
|
|
||||||
|
# Create blank control file for running dpkg-shlibdeps
|
||||||
|
# There might be some other way to invoke dpkg-shlibdeps without creating this file
|
||||||
|
# but standard debian package should not have anything that can collide with this file or directory
|
||||||
|
FILE(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
|
||||||
|
FILE(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
|
||||||
|
|
||||||
|
# Execute dpkg-shlibdeps
|
||||||
|
# --ignore-missing-info : allow dpkg-shlibdeps to run even if some libs do not belong to a package
|
||||||
|
# -O : print to STDOUT
|
||||||
|
EXECUTE_PROCESS(COMMAND ${SHLIBDEPS_EXECUTABLE} --ignore-missing-info -O ${CPACK_DEB_BINARY_FILES}
|
||||||
|
WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
|
||||||
|
OUTPUT_VARIABLE SHLIBDEPS_OUTPUT
|
||||||
|
RESULT_VARIABLE SHLIBDEPS_RESULT
|
||||||
|
ERROR_VARIABLE SHLIBDEPS_ERROR
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||||
|
IF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
# dpkg-shlibdeps will throw some warnings if some input files are not binary
|
||||||
|
MESSAGE( "CPackDeb Debug: dpkg-shlibdeps warnings \n${SHLIBDEPS_ERROR}")
|
||||||
|
ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
IF (NOT SHLIBDEPS_RESULT EQUAL 0)
|
||||||
|
MESSAGE (FATAL_ERROR "CPackDeb: dpkg-shlibdeps: ${SHLIBDEPS_ERROR}")
|
||||||
|
ENDIF (NOT SHLIBDEPS_RESULT EQUAL 0)
|
||||||
|
|
||||||
|
#Get rid of prefix generated by dpkg-shlibdeps
|
||||||
|
string (REGEX REPLACE "^.*Depends=" "" CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS ${SHLIBDEPS_OUTPUT})
|
||||||
|
|
||||||
|
IF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
MESSAGE( "CPackDeb Debug: Found dependency: ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
|
||||||
|
ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
|
||||||
|
# Remove blank control file
|
||||||
|
# Might not be safe if package actual contain file or directory named debian
|
||||||
|
FILE(REMOVE_RECURSE "${CPACK_TEMPORARY_DIRECTORY}/debian")
|
||||||
|
|
||||||
|
# Append user depend if set
|
||||||
|
IF (CPACK_DEBIAN_PACKAGE_DEPENDS)
|
||||||
|
SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
|
||||||
|
ELSE (CPACK_DEBIAN_PACKAGE_DEPENDS)
|
||||||
|
SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
|
||||||
|
ENDIF (CPACK_DEBIAN_PACKAGE_DEPENDS)
|
||||||
|
|
||||||
|
ELSE (SHLIBDEPS_EXECUTABLE)
|
||||||
|
IF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
MESSAGE( "CPackDeb Debug: Using only user-provided depends because dpkg-shlibdeps is not found.")
|
||||||
|
ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
ENDIF(SHLIBDEPS_EXECUTABLE)
|
||||||
|
|
||||||
|
ELSE (CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
|
||||||
|
IF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
MESSAGE( "CPackDeb Debug: Using only user-provided depends")
|
||||||
|
ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||||
|
ENDIF(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
|
||||||
|
|
||||||
# Let's define the control file found in debian package:
|
# Let's define the control file found in debian package:
|
||||||
|
|
||||||
# Binary package:
|
# Binary package:
|
||||||
@ -84,7 +239,7 @@ ENDIF(NOT CPACK_DEBIAN_PACKAGE_NAME)
|
|||||||
# Version: (mandatory)
|
# Version: (mandatory)
|
||||||
IF(NOT CPACK_DEBIAN_PACKAGE_VERSION)
|
IF(NOT CPACK_DEBIAN_PACKAGE_VERSION)
|
||||||
IF(NOT CPACK_PACKAGE_VERSION)
|
IF(NOT CPACK_PACKAGE_VERSION)
|
||||||
MESSAGE(FATAL_ERROR "Debian package requires a package version")
|
MESSAGE(FATAL_ERROR "CPackDeb: Debian package requires a package version")
|
||||||
ENDIF(NOT CPACK_PACKAGE_VERSION)
|
ENDIF(NOT CPACK_PACKAGE_VERSION)
|
||||||
SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
|
SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
|
||||||
ENDIF(NOT CPACK_DEBIAN_PACKAGE_VERSION)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_VERSION)
|
||||||
@ -95,7 +250,7 @@ IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
|
|||||||
# $ dpkg --print-architecture
|
# $ dpkg --print-architecture
|
||||||
FIND_PROGRAM(DPKG_CMD dpkg)
|
FIND_PROGRAM(DPKG_CMD dpkg)
|
||||||
IF(NOT DPKG_CMD)
|
IF(NOT DPKG_CMD)
|
||||||
MESSAGE(STATUS "Can not find dpkg in your path, default to i386.")
|
MESSAGE(STATUS "CPackDeb: Can not find dpkg in your path, default to i386.")
|
||||||
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
|
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
|
||||||
ENDIF(NOT DPKG_CMD)
|
ENDIF(NOT DPKG_CMD)
|
||||||
EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture
|
EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture
|
||||||
@ -116,7 +271,7 @@ ENDIF(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
|
|||||||
# Maintainer: (mandatory)
|
# Maintainer: (mandatory)
|
||||||
IF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
|
IF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
|
||||||
IF(NOT CPACK_PACKAGE_CONTACT)
|
IF(NOT CPACK_PACKAGE_CONTACT)
|
||||||
MESSAGE(FATAL_ERROR "Debian package requires a maintainer for a package, set CPACK_PACKAGE_CONTACT or CPACK_DEBIAN_PACKAGE_MAINTAINER")
|
MESSAGE(FATAL_ERROR "CPackDeb: Debian package requires a maintainer for a package, set CPACK_PACKAGE_CONTACT or CPACK_DEBIAN_PACKAGE_MAINTAINER")
|
||||||
ENDIF(NOT CPACK_PACKAGE_CONTACT)
|
ENDIF(NOT CPACK_PACKAGE_CONTACT)
|
||||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
|
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
|
||||||
ENDIF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
|
||||||
@ -124,7 +279,7 @@ ENDIF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
|
|||||||
# Description: (mandatory)
|
# Description: (mandatory)
|
||||||
IF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
|
IF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
|
||||||
IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||||
MESSAGE(FATAL_ERROR "Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION")
|
MESSAGE(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION")
|
||||||
ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||||
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
|
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
|
||||||
ENDIF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
|
ENDIF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
|
||||||
@ -147,13 +302,13 @@ ENDIF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY )
|
|||||||
|
|
||||||
# CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
# CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
||||||
# This variable allow advanced user to add custom script to the control.tar.gz (inside the .deb archive)
|
# This variable allow advanced user to add custom script to the control.tar.gz (inside the .deb archive)
|
||||||
# Typical examples are:
|
# Typical examples are:
|
||||||
# - conffiles
|
# - conffiles
|
||||||
# - postinst
|
# - postinst
|
||||||
# - postrm
|
# - postrm
|
||||||
# - prerm"
|
# - prerm"
|
||||||
# Usage:
|
# Usage:
|
||||||
# SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
# SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
||||||
# "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
|
# "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
# 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. You'll find a detailed usage on
|
# the specifics CPACK_RPM_XXX variables. You'll find a detailed usage on
|
||||||
# the wiki:
|
# the wiki:
|
||||||
# http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
|
# http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
|
||||||
# However as a handy reminder here comes the list of specific variables:
|
# However as a handy reminder here comes the list of specific variables:
|
||||||
#
|
#
|
||||||
# CPACK_RPM_PACKAGE_SUMMARY
|
# CPACK_RPM_PACKAGE_SUMMARY
|
||||||
# Mandatory : YES
|
# Mandatory : YES
|
||||||
# Default : CPACK_PACKAGE_DESCRIPTION
|
# Default : CPACK_PACKAGE_DESCRIPTION_SUMMARY
|
||||||
# The RPM package summary
|
# The RPM package summary
|
||||||
# CPACK_RPM_PACKAGE_NAME
|
# CPACK_RPM_PACKAGE_NAME
|
||||||
# Mandatory : YES
|
# Mandatory : YES
|
||||||
@ -24,14 +24,14 @@
|
|||||||
# CPACK_RPM_PACKAGE_ARCHITECTURE
|
# CPACK_RPM_PACKAGE_ARCHITECTURE
|
||||||
# Mandatory : NO
|
# Mandatory : NO
|
||||||
# Default : -
|
# Default : -
|
||||||
# The RPM package architecture. This may be set to "noarch" if you
|
# The RPM package architecture. This may be set to "noarch" if you
|
||||||
# know you are building a noarch package.
|
# know you are building a noarch package.
|
||||||
# CPACK_RPM_PACKAGE_RELEASE
|
# CPACK_RPM_PACKAGE_RELEASE
|
||||||
# Mandatory : YES
|
# Mandatory : YES
|
||||||
# Default : 1
|
# Default : 1
|
||||||
# The RPM package release. This is the numbering of the RPM package
|
# The RPM package release. This is the numbering of the RPM package
|
||||||
# itself, i.e. the version of the packaging and not the version of the
|
# itself, i.e. the version of the packaging and not the version of the
|
||||||
# content (see CPACK_RPM_PACKAGE_VERSION). One may change the default
|
# content (see CPACK_RPM_PACKAGE_VERSION). One may change the default
|
||||||
# value if the previous packaging was buggy and/or you want to put here
|
# value if the previous packaging was buggy and/or you want to put here
|
||||||
# a fancy Linux distro specific numbering.
|
# a fancy Linux distro specific numbering.
|
||||||
# CPACK_RPM_PACKAGE_LICENSE
|
# CPACK_RPM_PACKAGE_LICENSE
|
||||||
@ -42,10 +42,14 @@
|
|||||||
# Mandatory : YES
|
# Mandatory : YES
|
||||||
# Default : "unknown"
|
# Default : "unknown"
|
||||||
# The RPM package group.
|
# The RPM package group.
|
||||||
# CPACK_RPM_PACKAGE_VENDOR
|
# CPACK_RPM_PACKAGE_VENDOR
|
||||||
# Mandatory : YES
|
# Mandatory : YES
|
||||||
# Default : CPACK_PACKAGE_VENDOR if set or "unknown"
|
# Default : CPACK_PACKAGE_VENDOR if set or "unknown"
|
||||||
# The RPM package group.
|
# The RPM package vendor.
|
||||||
|
# CPACK_RPM_PACKAGE_URL
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# The projects URL.
|
||||||
# CPACK_RPM_PACKAGE_DESCRIPTION
|
# CPACK_RPM_PACKAGE_DESCRIPTION
|
||||||
# Mandatory : YES
|
# Mandatory : YES
|
||||||
# Default : CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package description available"
|
# Default : CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package description available"
|
||||||
@ -61,18 +65,38 @@
|
|||||||
# Mandatory : NO
|
# Mandatory : NO
|
||||||
# Default : -
|
# Default : -
|
||||||
# May be used to set RPM dependencies (requires).
|
# May be used to set RPM dependencies (requires).
|
||||||
# Note that you must enclose the complete requires string between quotes,
|
# Note that you must enclose the complete requires string between quotes,
|
||||||
# for example:
|
# for example:
|
||||||
# set(CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8")
|
# set(CPACK_RPM_PACKAGE_REQUIRES "python >= 2.5.0, cmake >= 2.8")
|
||||||
# CPACK_RPM_PACKAGES_PROVIDES
|
# CPACK_RPM_PACKAGE_SUGGESTS
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# May be used to set weak RPM dependencies (suggests).
|
||||||
|
# Note that you must enclose the complete requires string between quotes.
|
||||||
|
# CPACK_RPM_PACKAGE_PROVIDES
|
||||||
# Mandatory : NO
|
# Mandatory : NO
|
||||||
# Default : -
|
# Default : -
|
||||||
# May be used to set RPM dependencies (provides).
|
# May be used to set RPM dependencies (provides).
|
||||||
|
# CPACK_RPM_PACKAGE_OBSOLETES
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# May be used to set RPM packages that are obsoleted by this one.
|
||||||
|
# CPACK_RPM_PACKAGE_RELOCATABLE
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : CPACK_PACKAGE_RELOCATABLE
|
||||||
|
# If this variable is set to TRUE or ON CPackRPM will try
|
||||||
|
# to build a relocatable RPM package. A relocatable RPM may
|
||||||
|
# be installed using rpm --prefix or --relocate in order to
|
||||||
|
# install it at an alternate place see rpm(8).
|
||||||
|
# Note that currently this may fail if CPACK_SET_DESTDIR is set to ON.
|
||||||
|
# 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
|
||||||
|
# unexpected behavior.
|
||||||
# CPACK_RPM_SPEC_INSTALL_POST
|
# CPACK_RPM_SPEC_INSTALL_POST
|
||||||
# Mandatory : NO
|
# Mandatory : NO
|
||||||
# Default : -
|
# Default : -
|
||||||
# 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.
|
||||||
# CPACK_RPM_SPEC_MORE_DEFINE
|
# CPACK_RPM_SPEC_MORE_DEFINE
|
||||||
# Mandatory : NO
|
# Mandatory : NO
|
||||||
@ -81,19 +105,19 @@
|
|||||||
# CPACK_RPM_PACKAGE_DEBUG
|
# CPACK_RPM_PACKAGE_DEBUG
|
||||||
# Mandatory : NO
|
# Mandatory : NO
|
||||||
# Default : -
|
# Default : -
|
||||||
# May be set when invoking cpack in order to trace debug informations
|
# May be set when invoking cpack in order to trace debug information
|
||||||
# during CPack RPM run. For example you may launch CPack like this
|
# during CPack RPM run. For example you may launch CPack like this
|
||||||
# cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
|
# cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
|
||||||
# CPACK_RPM_USER_BINARY_SPECFILE
|
# CPACK_RPM_USER_BINARY_SPECFILE
|
||||||
# Mandatory : NO
|
# Mandatory : NO
|
||||||
# Default : -
|
# Default : -
|
||||||
# May be set by the user in order to specify a USER binary spec file
|
# May be set by the user in order to specify a USER binary spec file
|
||||||
# to be used by CPackRPM instead of generating the file.
|
# to be used by CPackRPM instead of generating the file.
|
||||||
# The specified file will be processed by CONFIGURE_FILE( @ONLY).
|
# The specified file will be processed by CONFIGURE_FILE( @ONLY).
|
||||||
# CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
|
# CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
|
||||||
# Mandatory : NO
|
# Mandatory : NO
|
||||||
# Default : -
|
# Default : -
|
||||||
# If set CPack will generate a template for USER specified binary
|
# If set CPack will generate a template for USER specified binary
|
||||||
# spec file and stop with an error. For example launch CPack like this
|
# spec file and stop with an error. For example launch CPack like this
|
||||||
# cpack -D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 -G RPM
|
# cpack -D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 -G RPM
|
||||||
# The user may then use this file in order to hand-craft is own
|
# The user may then use this file in order to hand-craft is own
|
||||||
@ -116,6 +140,12 @@
|
|||||||
# put after the %post or %postun section
|
# put after the %post or %postun section
|
||||||
# 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_CHANGELOG_FILE
|
||||||
|
# Mandatory : NO
|
||||||
|
# Default : -
|
||||||
|
# May be used to embbed a changelog in the spec file.
|
||||||
|
# The refered file will be read and directly put after the %changelog
|
||||||
|
# section.
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2007-2009 Kitware, Inc.
|
# Copyright 2007-2009 Kitware, Inc.
|
||||||
@ -127,7 +157,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# Author: Eric Noulard with the help of Alexander Neundorf.
|
# Author: Eric Noulard with the help of Alexander Neundorf.
|
||||||
@ -141,23 +171,23 @@ IF(NOT UNIX)
|
|||||||
ENDIF(NOT UNIX)
|
ENDIF(NOT UNIX)
|
||||||
|
|
||||||
# rpmbuild is the basic command for building RPM package
|
# rpmbuild is the basic command for building RPM package
|
||||||
# it may be a simple (symbolic) link to rpmb command.
|
# it may be a simple (symbolic) link to rpm command.
|
||||||
FIND_PROGRAM(RPMBUILD_EXECUTABLE rpmbuild)
|
FIND_PROGRAM(RPMBUILD_EXECUTABLE rpmbuild)
|
||||||
|
|
||||||
# Check version of the rpmbuild tool this would be easier to
|
# Check version of the rpmbuild tool this would be easier to
|
||||||
# track bugs with users and CPackRPM debug mode.
|
# track bugs with users and CPackRPM debug mode.
|
||||||
# We may use RPM version in order to check for available version dependent features
|
# We may use RPM version in order to check for available version dependent features
|
||||||
IF(RPMBUILD_EXECUTABLE)
|
IF(RPMBUILD_EXECUTABLE)
|
||||||
execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --version
|
execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --version
|
||||||
OUTPUT_VARIABLE _TMP_VERSION
|
OUTPUT_VARIABLE _TMP_VERSION
|
||||||
ERROR_QUIET
|
ERROR_QUIET
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
string(REGEX REPLACE "^.*\ " ""
|
string(REGEX REPLACE "^.*\ " ""
|
||||||
RPMBUILD_EXECUTABLE_VERSION
|
RPMBUILD_EXECUTABLE_VERSION
|
||||||
${_TMP_VERSION})
|
${_TMP_VERSION})
|
||||||
IF(CPACK_RPM_PACKAGE_DEBUG)
|
IF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
MESSAGE("CPackRPM:Debug: rpmbuild version is <${RPMBUILD_EXECUTABLE_VERSION}>")
|
MESSAGE("CPackRPM:Debug: rpmbuild version is <${RPMBUILD_EXECUTABLE_VERSION}>")
|
||||||
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
ENDIF(RPMBUILD_EXECUTABLE)
|
ENDIF(RPMBUILD_EXECUTABLE)
|
||||||
|
|
||||||
IF(NOT RPMBUILD_EXECUTABLE)
|
IF(NOT RPMBUILD_EXECUTABLE)
|
||||||
@ -165,14 +195,14 @@ IF(NOT RPMBUILD_EXECUTABLE)
|
|||||||
ENDIF(NOT RPMBUILD_EXECUTABLE)
|
ENDIF(NOT RPMBUILD_EXECUTABLE)
|
||||||
|
|
||||||
# We may use RPM version in the future in order
|
# We may use RPM version in the future in order
|
||||||
# to shut down warning about space in buildtree
|
# to shut down warning about space in buildtree
|
||||||
# some recent RPM version should support space in different places.
|
# some recent RPM version should support space in different places.
|
||||||
# not checked [yet].
|
# not checked [yet].
|
||||||
IF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
|
IF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
|
||||||
MESSAGE(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.")
|
MESSAGE(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.")
|
||||||
ENDIF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
|
ENDIF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
|
||||||
|
|
||||||
# If rpmbuild is found
|
# If rpmbuild is found
|
||||||
# we try to discover alien since we may be on non RPM distro like Debian.
|
# we try to discover alien since we may be on non RPM distro like Debian.
|
||||||
# In this case we may try to to use more advanced features
|
# In this case we may try to to use more advanced features
|
||||||
# like generating RPM directly from DEB using alien.
|
# like generating RPM directly from DEB using alien.
|
||||||
@ -182,7 +212,7 @@ 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)
|
||||||
|
|
||||||
#
|
#
|
||||||
# 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
|
||||||
# CPACK_xxx generic values.
|
# CPACK_xxx generic values.
|
||||||
@ -197,10 +227,10 @@ IF(NOT CPACK_RPM_PACKAGE_SUMMARY)
|
|||||||
IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||||
STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_SUMMARY)
|
STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_SUMMARY)
|
||||||
ELSE(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
ELSE(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||||
SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
|
SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
|
||||||
ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||||
ENDIF(NOT CPACK_RPM_PACKAGE_SUMMARY)
|
ENDIF(NOT CPACK_RPM_PACKAGE_SUMMARY)
|
||||||
|
|
||||||
# CPACK_RPM_PACKAGE_NAME (mandatory)
|
# CPACK_RPM_PACKAGE_NAME (mandatory)
|
||||||
IF(NOT CPACK_RPM_PACKAGE_NAME)
|
IF(NOT CPACK_RPM_PACKAGE_NAME)
|
||||||
STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_NAME)
|
STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_NAME)
|
||||||
@ -213,6 +243,11 @@ IF(NOT CPACK_RPM_PACKAGE_VERSION)
|
|||||||
ENDIF(NOT CPACK_PACKAGE_VERSION)
|
ENDIF(NOT CPACK_PACKAGE_VERSION)
|
||||||
SET(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
|
SET(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
|
||||||
ENDIF(NOT CPACK_RPM_PACKAGE_VERSION)
|
ENDIF(NOT CPACK_RPM_PACKAGE_VERSION)
|
||||||
|
# Replace '-' in version with '_'
|
||||||
|
# '-' character is an Illegal RPM version character
|
||||||
|
# it is illegal because it is used to separate
|
||||||
|
# RPM "Version" from RPM "Release"
|
||||||
|
STRING(REPLACE "-" "_" CPACK_RPM_PACKAGE_VERSION ${CPACK_RPM_PACKAGE_VERSION})
|
||||||
|
|
||||||
# CPACK_RPM_PACKAGE_ARCHITECTURE (optional)
|
# CPACK_RPM_PACKAGE_ARCHITECTURE (optional)
|
||||||
IF(CPACK_RPM_PACKAGE_ARCHITECTURE)
|
IF(CPACK_RPM_PACKAGE_ARCHITECTURE)
|
||||||
@ -260,7 +295,7 @@ ENDIF(NOT CPACK_RPM_PACKAGE_VENDOR)
|
|||||||
|
|
||||||
# CPACK_RPM_PACKAGE_DESCRIPTION
|
# CPACK_RPM_PACKAGE_DESCRIPTION
|
||||||
# The variable content may be either
|
# The variable content may be either
|
||||||
# - explicitely given by tthe user or
|
# - explicitly given by the user or
|
||||||
# - filled with the content of CPACK_PACKAGE_DESCRIPTION_FILE
|
# - filled with the content of CPACK_PACKAGE_DESCRIPTION_FILE
|
||||||
# if it is defined
|
# if it is defined
|
||||||
# - set to a default value
|
# - set to a default value
|
||||||
@ -294,25 +329,36 @@ IF (CPACK_RPM_COMPRESSION_TYPE)
|
|||||||
ELSE(CPACK_RPM_COMPRESSION_TYPE)
|
ELSE(CPACK_RPM_COMPRESSION_TYPE)
|
||||||
SET(CPACK_RPM_COMPRESSION_TYPE_TMP "")
|
SET(CPACK_RPM_COMPRESSION_TYPE_TMP "")
|
||||||
ENDIF(CPACK_RPM_COMPRESSION_TYPE)
|
ENDIF(CPACK_RPM_COMPRESSION_TYPE)
|
||||||
# CPACK_RPM_PACKAGE_REQUIRES
|
|
||||||
# Placeholder used to specify binary RPM dependencies (if any)
|
|
||||||
# see http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html
|
|
||||||
IF(CPACK_RPM_PACKAGE_REQUIRES)
|
|
||||||
IF(CPACK_RPM_PACKAGE_DEBUG)
|
|
||||||
MESSAGE("CPackRPM:Debug: User defined Requires:\n ${CPACK_RPM_PACKAGE_REQUIRES}")
|
|
||||||
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
|
||||||
SET(TMP_RPM_REQUIRES "Requires: ${CPACK_RPM_PACKAGE_REQUIRES}")
|
|
||||||
ENDIF(CPACK_RPM_PACKAGE_REQUIRES)
|
|
||||||
|
|
||||||
# CPACK_RPM_PACKAGE_PROVIDES
|
if(CPACK_PACKAGE_RELOCATABLE)
|
||||||
# Placeholder used to specify binary RPM dependencies (if any)
|
set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
|
||||||
# see http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html
|
endif(CPACK_PACKAGE_RELOCATABLE)
|
||||||
IF(CPACK_RPM_PACKAGE_PROVIDES)
|
if(CPACK_RPM_PACKAGE_RELOCATABLE)
|
||||||
IF(CPACK_RPM_PACKAGE_DEBUG)
|
if(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
MESSAGE("CPackRPM:Debug: User defined Provides:\n ${CPACK_RPM_PACKAGE_PROVIDES}")
|
message("CPackRPM:Debug: Trying to build a relocatable package")
|
||||||
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
endif(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
SET(TMP_RPM_PROVIDES "Provides: ${CPACK_RPM_PACKAGE_PROVIDES}")
|
if(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
|
||||||
ENDIF(CPACK_RPM_PACKAGE_PROVIDES)
|
message("CPackRPM:Warning: CPACK_SET_DESTDIR is set (=${CPACK_SET_DESTDIR}) while requesting a relocatable package (CPACK_RPM_PACKAGE_RELOCATABLE is set): this is not supported, the package won't be relocatable.")
|
||||||
|
else(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
|
||||||
|
set(CPACK_RPM_PACKAGE_PREFIX ${CPACK_PACKAGING_INSTALL_PREFIX})
|
||||||
|
endif(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
|
||||||
|
endif(CPACK_RPM_PACKAGE_RELOCATABLE)
|
||||||
|
|
||||||
|
# check if additional fields for RPM spec header are given
|
||||||
|
FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX)
|
||||||
|
IF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER})
|
||||||
|
STRING(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH)
|
||||||
|
MATH(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1")
|
||||||
|
STRING(SUBSTRING ${_RPM_SPEC_HEADER} 1 ${_PACKAGE_HEADER_STRLENGTH} _PACKAGE_HEADER_TAIL)
|
||||||
|
STRING(TOLOWER "${_PACKAGE_HEADER_TAIL}" _PACKAGE_HEADER_TAIL)
|
||||||
|
STRING(SUBSTRING ${_RPM_SPEC_HEADER} 0 1 _PACKAGE_HEADER_NAME)
|
||||||
|
SET(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}")
|
||||||
|
IF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
|
MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}}")
|
||||||
|
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
|
SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}}")
|
||||||
|
ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER})
|
||||||
|
ENDFOREACH(_RPM_SPEC_HEADER)
|
||||||
|
|
||||||
# CPACK_RPM_SPEC_INSTALL_POST
|
# CPACK_RPM_SPEC_INSTALL_POST
|
||||||
# May be used to define a RPM post intallation script
|
# May be used to define a RPM post intallation script
|
||||||
@ -348,7 +394,7 @@ endif(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE)
|
|||||||
|
|
||||||
# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
|
# CPACK_RPM_PRE_INSTALL_SCRIPT_FILE
|
||||||
# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
|
# CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
|
||||||
# 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_PRE_INSTALL_SCRIPT_FILE)
|
if(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE)
|
||||||
@ -367,6 +413,19 @@ if(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE)
|
|||||||
endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
|
endif(EXISTS ${CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE})
|
||||||
endif(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE)
|
endif(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE)
|
||||||
|
|
||||||
|
# CPACK_RPM_CHANGELOG_FILE
|
||||||
|
# May be used to embed a changelog in the spec file.
|
||||||
|
# The refered file will be read and directly put after the %changelog section
|
||||||
|
if(CPACK_RPM_CHANGELOG_FILE)
|
||||||
|
if(EXISTS ${CPACK_RPM_CHANGELOG_FILE})
|
||||||
|
file(READ ${CPACK_RPM_CHANGELOG_FILE} CPACK_RPM_SPEC_CHANGELOG)
|
||||||
|
else(EXISTS ${CPACK_RPM_CHANGELOG_FILE})
|
||||||
|
message(SEND_ERROR "CPackRPM:Warning: CPACK_RPM_CHANGELOG_FILE <${CPACK_RPM_CHANGELOG_FILE}> does not exists - ignoring")
|
||||||
|
endif(EXISTS ${CPACK_RPM_CHANGELOG_FILE})
|
||||||
|
else(CPACK_RPM_CHANGELOG_FILE)
|
||||||
|
set(CPACK_RPM_SPEC_CHANGELOG "* Sun Jul 4 2010 Erk <eric.noulard@gmail.com>\n Generated by CPack RPM (no Changelog file were provided)")
|
||||||
|
endif(CPACK_RPM_CHANGELOG_FILE)
|
||||||
|
|
||||||
# CPACK_RPM_SPEC_MORE_DEFINE
|
# CPACK_RPM_SPEC_MORE_DEFINE
|
||||||
# This is a generated spec rpm file spaceholder
|
# This is a generated spec rpm file spaceholder
|
||||||
IF(CPACK_RPM_SPEC_MORE_DEFINE)
|
IF(CPACK_RPM_SPEC_MORE_DEFINE)
|
||||||
@ -396,18 +455,47 @@ SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
|
|||||||
|
|
||||||
# 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 must remove the './' due to the local search (thus the sed)
|
# We must remove the './' due to the local search and escape the
|
||||||
|
# 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
|
||||||
COMMAND sed {s/\\.//}
|
COMMAND sed {s:.*/man.*/.*:&*:}
|
||||||
COMMAND sed {s/.*man.*\\/.*/&*/}
|
COMMAND sed {s/\\.\\\(.*\\\)/\"\\1\"/}
|
||||||
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
|
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
|
||||||
OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
|
OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
|
||||||
|
|
||||||
|
if (CPACK_ABSOLUTE_DESTINATION_FILES)
|
||||||
|
IF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
|
message("CPackRPM:Debug: Handling Absolute Destination Files: ${CPACK_ABSOLUTE_DESTINATION_FILES}")
|
||||||
|
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
|
# Remove trailing space
|
||||||
|
string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST)
|
||||||
|
# Transform endline separated - string into CMake List
|
||||||
|
string(REPLACE "\n" ";" CPACK_RPM_INSTALL_FILES_LIST "${CPACK_RPM_INSTALL_FILES_LIST}")
|
||||||
|
# Remove unecessary quotes
|
||||||
|
string(REPLACE "\"" "" CPACK_RPM_INSTALL_FILES_LIST "${CPACK_RPM_INSTALL_FILES_LIST}")
|
||||||
|
# Remove ABSOLUTE install file from INSTALL FILE LIST
|
||||||
|
list(REMOVE_ITEM CPACK_RPM_INSTALL_FILES_LIST ${CPACK_ABSOLUTE_DESTINATION_FILES})
|
||||||
|
# Rebuild 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)
|
||||||
|
# Build ABSOLUTE_INSTALL_FILES
|
||||||
|
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "")
|
||||||
|
foreach(F IN LISTS CPACK_ABSOLUTE_DESTINATION_FILES)
|
||||||
|
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "${CPACK_RPM_ABSOLUTE_INSTALL_FILES}%config \"${F}\"\n")
|
||||||
|
endforeach(F)
|
||||||
|
IF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
|
message("CPackRPM:Debug: CPACK_RPM_ABSOLUTE_INSTALL_FILES=${CPACK_RPM_ABSOLUTE_INSTALL_FILES}")
|
||||||
|
message("CPackRPM:Debug: CPACK_RPM_INSTALL_FILES=${CPACK_RPM_INSTALL_FILES}")
|
||||||
|
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
|
endif(CPACK_ABSOLUTE_DESTINATION_FILES)
|
||||||
|
|
||||||
# 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}.spec")
|
SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec")
|
||||||
|
|
||||||
# Print out some debug information if we were asked for that
|
# Print out some debug information if we were asked for that
|
||||||
IF(CPACK_RPM_PACKAGE_DEBUG)
|
IF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
|
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
|
||||||
@ -420,7 +508,7 @@ IF(CPACK_RPM_PACKAGE_DEBUG)
|
|||||||
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||||
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
|
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
|
||||||
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
|
|
||||||
# USER generated spec file handling.
|
# USER generated spec file handling.
|
||||||
# We should generate a spec file template:
|
# We should generate a spec file template:
|
||||||
# - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
|
# - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
|
||||||
@ -429,7 +517,7 @@ ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
|||||||
IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
|
IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
|
||||||
FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
|
FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
|
||||||
"# -*- rpm-spec -*-
|
"# -*- rpm-spec -*-
|
||||||
Buildroot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@
|
BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@
|
||||||
Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@
|
Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@
|
||||||
Name: \@CPACK_RPM_PACKAGE_NAME\@
|
Name: \@CPACK_RPM_PACKAGE_NAME\@
|
||||||
Version: \@CPACK_RPM_PACKAGE_VERSION\@
|
Version: \@CPACK_RPM_PACKAGE_VERSION\@
|
||||||
@ -437,11 +525,13 @@ Release: \@CPACK_RPM_PACKAGE_RELEASE\@
|
|||||||
License: \@CPACK_RPM_PACKAGE_LICENSE\@
|
License: \@CPACK_RPM_PACKAGE_LICENSE\@
|
||||||
Group: \@CPACK_RPM_PACKAGE_GROUP\@
|
Group: \@CPACK_RPM_PACKAGE_GROUP\@
|
||||||
Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
|
Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
|
||||||
|
\@TMP_RPM_URL\@
|
||||||
\@TMP_RPM_REQUIRES\@
|
\@TMP_RPM_REQUIRES\@
|
||||||
\@TMP_RPM_PROVIDES\@
|
\@TMP_RPM_PROVIDES\@
|
||||||
|
\@TMP_RPM_OBSOLETES\@
|
||||||
\@TMP_RPM_BUILDARCH\@
|
\@TMP_RPM_BUILDARCH\@
|
||||||
|
\@TMP_RPM_PREFIX\@
|
||||||
#p define prefix \@CMAKE_INSTALL_PREFIX\@
|
|
||||||
%define _rpmdir \@CPACK_RPM_DIRECTORY\@
|
%define _rpmdir \@CPACK_RPM_DIRECTORY\@
|
||||||
%define _rpmfilename \@CPACK_RPM_FILE_NAME\@
|
%define _rpmfilename \@CPACK_RPM_FILE_NAME\@
|
||||||
%define _unpackaged_files_terminate_build 0
|
%define _unpackaged_files_terminate_build 0
|
||||||
@ -449,7 +539,7 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
|
|||||||
\@TMP_RPM_SPEC_INSTALL_POST\@
|
\@TMP_RPM_SPEC_INSTALL_POST\@
|
||||||
\@CPACK_RPM_SPEC_MORE_DEFINE\@
|
\@CPACK_RPM_SPEC_MORE_DEFINE\@
|
||||||
\@CPACK_RPM_COMPRESSION_TYPE_TMP\@
|
\@CPACK_RPM_COMPRESSION_TYPE_TMP\@
|
||||||
|
|
||||||
%description
|
%description
|
||||||
\@CPACK_RPM_PACKAGE_DESCRIPTION\@
|
\@CPACK_RPM_PACKAGE_DESCRIPTION\@
|
||||||
|
|
||||||
@ -458,17 +548,17 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
|
|||||||
# We do only save CPack installed tree in _prepr
|
# We do only save CPack installed tree in _prepr
|
||||||
# and then restore it in build.
|
# and then restore it in build.
|
||||||
%prep
|
%prep
|
||||||
mv $RPM_BUILD_ROOT \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot
|
mv $RPM_BUILD_ROOT \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\"
|
||||||
|
|
||||||
#p build
|
#p build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
if [ -e $RPM_BUILD_ROOT ];
|
if [ -e $RPM_BUILD_ROOT ];
|
||||||
then
|
then
|
||||||
mv \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot/* $RPM_BUILD_ROOT
|
mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot/*\" $RPM_BUILD_ROOT
|
||||||
else
|
else
|
||||||
mv \@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot $RPM_BUILD_ROOT
|
mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
|
|
||||||
@ -487,63 +577,42 @@ fi
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
${CPACK_RPM_INSTALL_FILES}
|
${CPACK_RPM_INSTALL_FILES}
|
||||||
|
${CPACK_RPM_ABSOLUTE_INSTALL_FILES}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Apr 4 2010 Erk <eric.noulard@gmail.com>
|
\@CPACK_RPM_SPEC_CHANGELOG\@
|
||||||
Add support for specifying RPM compression type
|
|
||||||
* Sat Nov 28 2009 Erk <eric.noulard@gmail.com>
|
|
||||||
Refix backup/restore install tree for OpenSuSE 11.2
|
|
||||||
* Sun Nov 22 2009 Erk <eric.noulard@gmail.com>
|
|
||||||
Include symlinks in the file list.
|
|
||||||
* Sat Nov 14 2009 Erk <eric.noulard@gmail.com>
|
|
||||||
Replace prep and build step with backup and restore
|
|
||||||
of the previously CPack installed tree. This should
|
|
||||||
mimic what is expected in rpmbuild usual steps
|
|
||||||
* Wed Nov 11 2009 Erk <eric.noulard@gmail.com>
|
|
||||||
Add support for USER defined pre/post[un]install scripts
|
|
||||||
* Wed Oct 07 2009 Erk <eric.noulard@gmail.com>
|
|
||||||
Add user custom spec file support
|
|
||||||
* Sat Oct 03 2009 Kami <cmoidavid@gmail.com>
|
|
||||||
Update to handle more precisely the files section
|
|
||||||
* Mon Oct 03 2008 Erk <eric.noulard@gmail.com>
|
|
||||||
Update generator to handle optional dependencies using Requires
|
|
||||||
Update DEBUG output typos.
|
|
||||||
* Mon Aug 25 2008 Erk <eric.noulard@gmail.com>
|
|
||||||
Update generator to handle optional post-install
|
|
||||||
* Tue Aug 16 2007 Erk <eric.noulard@gmail.com>
|
|
||||||
Generated by CPack RPM Generator and associated macros
|
|
||||||
")
|
")
|
||||||
# Stop here if we were asked to only generate a template USER spec file
|
# Stop here if we were asked to only generate a template USER spec file
|
||||||
# The generated file may then be used as a template by user who wants
|
# The generated file may then be used as a template by user who wants
|
||||||
# to customize their own spec file.
|
# to customize their own spec file.
|
||||||
IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
|
IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
|
||||||
MESSAGE(FATAL_ERROR "CPackRPM: STOP here Generated USER binary spec file templare is: ${CPACK_RPM_BINARY_SPECFILE}.in")
|
MESSAGE(FATAL_ERROR "CPackRPM: STOP here Generated USER binary spec file templare is: ${CPACK_RPM_BINARY_SPECFILE}.in")
|
||||||
ENDIF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
|
ENDIF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
|
||||||
ENDIF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
|
ENDIF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
|
||||||
|
|
||||||
# After that we may either use a user provided spec file
|
# After that we may either use a user provided spec file
|
||||||
# or generate one using appropriate variables value.
|
# or generate one using appropriate variables value.
|
||||||
IF(CPACK_RPM_USER_BINARY_SPECFILE)
|
IF(CPACK_RPM_USER_BINARY_SPECFILE)
|
||||||
# User may have specified SPECFILE just use it
|
# User may have specified SPECFILE just use it
|
||||||
MESSAGE("CPackRPM: Will use USER specified spec file: ${CPACK_RPM_USER_BINARY_SPECFILE}")
|
MESSAGE("CPackRPM: Will use USER specified spec file: ${CPACK_RPM_USER_BINARY_SPECFILE}")
|
||||||
# The user provided file is processed for @var replacement
|
# The user provided file is processed for @var replacement
|
||||||
CONFIGURE_FILE(${CPACK_RPM_USER_BINARY_SPECFILE} ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
|
CONFIGURE_FILE(${CPACK_RPM_USER_BINARY_SPECFILE} ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
|
||||||
ELSE(CPACK_RPM_USER_BINARY_SPECFILE)
|
ELSE(CPACK_RPM_USER_BINARY_SPECFILE)
|
||||||
# No User specified spec file, will use the generated spec file
|
# No User specified spec file, will use the generated spec file
|
||||||
MESSAGE("CPackRPM: Will use GENERATED spec file: ${CPACK_RPM_BINARY_SPECFILE}")
|
MESSAGE("CPackRPM: Will use GENERATED spec file: ${CPACK_RPM_BINARY_SPECFILE}")
|
||||||
# Note the just created file is processed for @var replacement
|
# Note the just created file is processed for @var replacement
|
||||||
CONFIGURE_FILE(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
|
CONFIGURE_FILE(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
|
||||||
ENDIF(CPACK_RPM_USER_BINARY_SPECFILE)
|
ENDIF(CPACK_RPM_USER_BINARY_SPECFILE)
|
||||||
|
|
||||||
IF(RPMBUILD_EXECUTABLE)
|
IF(RPMBUILD_EXECUTABLE)
|
||||||
# Now call rpmbuild using the SPECFILE
|
# Now call rpmbuild using the SPECFILE
|
||||||
EXECUTE_PROCESS(
|
EXECUTE_PROCESS(
|
||||||
COMMAND "${RPMBUILD_EXECUTABLE}" -bb
|
COMMAND "${RPMBUILD_EXECUTABLE}" -bb
|
||||||
--buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
|
--buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
|
||||||
"${CPACK_RPM_BINARY_SPECFILE}"
|
"${CPACK_RPM_BINARY_SPECFILE}"
|
||||||
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
|
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
|
||||||
ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.err"
|
ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.err"
|
||||||
OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.out")
|
OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.out")
|
||||||
IF(CPACK_RPM_PACKAGE_DEBUG)
|
IF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
MESSAGE("CPackRPM:Debug: You may consult rpmbuild logs in: ")
|
MESSAGE("CPackRPM:Debug: You may consult rpmbuild logs in: ")
|
||||||
MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.err")
|
MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.err")
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
IF(CMAKE_BINARY_DIR)
|
IF(CMAKE_BINARY_DIR)
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
OPTION(BUILD_TESTING "Build the testing tree." ON)
|
OPTION(BUILD_TESTING "Build the testing tree." ON)
|
||||||
@ -163,6 +163,11 @@ IF(BUILD_TESTING)
|
|||||||
SET(DART_TESTING_TIMEOUT 1500 CACHE STRING
|
SET(DART_TESTING_TIMEOUT 1500 CACHE STRING
|
||||||
"Maximum time allowed before CTest will kill the test.")
|
"Maximum time allowed before CTest will kill the test.")
|
||||||
|
|
||||||
|
SET(CTEST_SUBMIT_RETRY_DELAY 5 CACHE STRING
|
||||||
|
"How long to wait between timed-out CTest submissions.")
|
||||||
|
SET(CTEST_SUBMIT_RETRY_COUNT 3 CACHE STRING
|
||||||
|
"How many times to retry timed-out CTest submissions.")
|
||||||
|
|
||||||
FIND_PROGRAM(MEMORYCHECK_COMMAND
|
FIND_PROGRAM(MEMORYCHECK_COMMAND
|
||||||
NAMES purify valgrind boundscheck
|
NAMES purify valgrind boundscheck
|
||||||
PATHS
|
PATHS
|
||||||
@ -223,8 +228,10 @@ IF(BUILD_TESTING)
|
|||||||
ENDIF(NOT BUILDNAME)
|
ENDIF(NOT BUILDNAME)
|
||||||
|
|
||||||
# the build command
|
# the build command
|
||||||
BUILD_COMMAND(MAKECOMMAND CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}")
|
BUILD_COMMAND(MAKECOMMAND_DEFAULT_VALUE
|
||||||
SET(MAKECOMMAND ${MAKECOMMAND} CACHE STRING "Command to build the project")
|
CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}")
|
||||||
|
SET(MAKECOMMAND ${MAKECOMMAND_DEFAULT_VALUE}
|
||||||
|
CACHE STRING "Command to build the project")
|
||||||
|
|
||||||
# the default build configuration the ctest build handler will use
|
# the default build configuration the ctest build handler will use
|
||||||
# if there is no -C arg given to ctest:
|
# if there is no -C arg given to ctest:
|
||||||
@ -262,7 +269,9 @@ IF(BUILD_TESTING)
|
|||||||
SCPCOMMAND
|
SCPCOMMAND
|
||||||
SLURM_SBATCH_COMMAND
|
SLURM_SBATCH_COMMAND
|
||||||
SLURM_SRUN_COMMAND
|
SLURM_SRUN_COMMAND
|
||||||
SITE
|
SITE
|
||||||
|
CTEST_SUBMIT_RETRY_DELAY
|
||||||
|
CTEST_SUBMIT_RETRY_COUNT
|
||||||
)
|
)
|
||||||
# BUILDNAME
|
# BUILDNAME
|
||||||
IF(NOT RUN_FROM_DART)
|
IF(NOT RUN_FROM_DART)
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# Determine the current system, so this information can be used
|
# Determine the current system, so this information can be used
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
IF(NOT RUN_FROM_CTEST_OR_DART)
|
IF(NOT RUN_FROM_CTEST_OR_DART)
|
||||||
@ -65,6 +65,7 @@ IF(NOT _CTEST_TARGETS_ADDED)
|
|||||||
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}
|
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}
|
||||||
)
|
)
|
||||||
SET_PROPERTY(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "")
|
SET_PROPERTY(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "")
|
||||||
|
SET_PROPERTY(TARGET ${mode} PROPERTY FOLDER "CTestDashboardTargets")
|
||||||
ENDFOREACH(mode)
|
ENDFOREACH(mode)
|
||||||
|
|
||||||
# For Makefile generators add more granular targets.
|
# For Makefile generators add more granular targets.
|
||||||
@ -79,6 +80,7 @@ IF(NOT _CTEST_TARGETS_ADDED)
|
|||||||
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype}
|
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype}
|
||||||
)
|
)
|
||||||
SET_PROPERTY(TARGET ${mode}${testtype} PROPERTY RULE_LAUNCH_CUSTOM "")
|
SET_PROPERTY(TARGET ${mode}${testtype} PROPERTY RULE_LAUNCH_CUSTOM "")
|
||||||
|
SET_PROPERTY(TARGET ${mode}${testtype} PROPERTY FOLDER "CTestDashboardTargets")
|
||||||
ENDFOREACH(testtype)
|
ENDFOREACH(testtype)
|
||||||
ENDFOREACH(mode)
|
ENDFOREACH(mode)
|
||||||
ENDIF("${CMAKE_GENERATOR}" MATCHES Make)
|
ENDIF("${CMAKE_GENERATOR}" MATCHES Make)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
INCLUDE(CheckCSourceCompiles)
|
INCLUDE(CheckCSourceCompiles)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
|
MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
INCLUDE(CheckCXXSourceCompiles)
|
INCLUDE(CheckCXXSourceCompiles)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
|
MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
|
MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
|
macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
|
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
|
MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
|
MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
|
MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
|
MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MESSAGE(SEND_ERROR
|
MESSAGE(SEND_ERROR
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
INCLUDE(CheckCSourceCompiles)
|
INCLUDE(CheckCSourceCompiles)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
|
MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
|
MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This module is shared by multiple languages; use include blocker.
|
# This module is shared by multiple languages; use include blocker.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This module is shared by multiple languages; use include blocker.
|
# This module is shared by multiple languages; use include blocker.
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
# This module is shared by multiple languages; use include blocker.
|
# This module is shared by multiple languages; use include blocker.
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
# See the License for more information.
|
# See the License for more information.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# (To distributed 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.)
|
||||||
|
|
||||||
OPTION(BUILD_TESTING "Build the testing tree." ON)
|
OPTION(BUILD_TESTING "Build the testing tree." ON)
|
||||||
|
@ -84,3 +84,7 @@ CurlOptions: @CTEST_CURL_OPTIONS@
|
|||||||
# warning, if you add new options here that have to do with submit,
|
# warning, if you add new options here that have to do with submit,
|
||||||
# you have to update cmCTestSubmitCommand.cxx
|
# you have to update cmCTestSubmitCommand.cxx
|
||||||
|
|
||||||
|
# For CTest submissions that timeout, these options
|
||||||
|
# specify behavior for retrying the submission
|
||||||
|
CTestSubmitRetryDelay: @CTEST_SUBMIT_RETRY_DELAY@
|
||||||
|
CTestSubmitRetryCount: @CTEST_SUBMIT_RETRY_COUNT@
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user