Imported Upstream version 2.8.9-rc1

ci/unstable
Modestas Vainius 13 years ago
parent 60ee04bd10
commit c35ced89e6

@ -1,6 +1,6 @@
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
# Copyright 2000-2012 Kitware, Inc., Insight Software Consortium
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@ -9,7 +9,7 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2 FATAL_ERROR)
SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
PROJECT(CMake)
@ -324,10 +324,9 @@ MACRO (CMAKE_BUILD_UTILITIES)
#---------------------------------------------------------------------
# Build or use system libarchive for CMake and CTest.
IF(CMAKE_USE_SYSTEM_LIBARCHIVE)
IF(EXISTS ${CMAKE_ROOT}/Modules/FindLibArchive.cmake)
IF(EXISTS ${CMAKE_ROOT}/Modules/FindLibArchive.cmake) # added in 2.8.3
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)
@ -422,26 +421,13 @@ ENDIF()
# The main section of the CMakeLists file
#
#-----------------------------------------------------------------------
# The CMake version number.
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 8)
SET(CMake_VERSION_PATCH 8)
SET(CMake_VERSION_TWEAK 0)
#SET(CMake_VERSION_RC 2)
# Releases define a tweak level.
IF(DEFINED CMake_VERSION_TWEAK)
INCLUDE(Source/CMakeVersion.cmake)
# Releases define a small tweak level.
IF("${CMake_VERSION_TWEAK}" VERSION_LESS 20000000)
SET(CMake_VERSION_IS_RELEASE 1)
SET(CMake_VERSION_SOURCE "")
ELSE()
SET(CMake_VERSION_IS_RELEASE 0)
# Use the date as the tweak level.
INCLUDE(${CMake_SOURCE_DIR}/Source/kwsys/kwsysDateStamp.cmake)
SET(CMake_VERSION_TWEAK
"${KWSYS_DATE_STAMP_YEAR}${KWSYS_DATE_STAMP_MONTH}${KWSYS_DATE_STAMP_DAY}"
)
INCLUDE(${CMake_SOURCE_DIR}/Source/CMakeVersionSource.cmake)
ENDIF()
@ -633,6 +619,9 @@ INSTALL(
WORLD_READ WORLD_EXECUTE
)
# process docs related install
ADD_SUBDIRECTORY(Docs)
#-----------------------------------------------------------------------
# End of the main section of the CMakeLists file
#-----------------------------------------------------------------------

@ -1,3 +1,309 @@
Changes in CMake 2.8.9-rc1 (since 2.8.8)
----------------------------------------
Alex Neundorf (12):
-fix #13081: support OBJECT libraries in CodeBlocks/QtCreator projects
CodeBlocks: improve support for OBJECT libraries
fix #13195: avoid multiple mentions of found packages
FeatureSummary.cmake: nicer formatting
-strip trailing whitespace
make default install component name configurable
-add docs for ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}
write_basic_package_version_file() now works with unset CMAKE_SIZEOF_VOID_P
add test for #13241: empty SIZEOF_VOIDP in write_basic_package_version_file
ASM compiler detection: remove debug output (#13270)
Eclipse: parallel build also for "Build project" #13287
automoc: better error handling (#13299)
Anthony J. Bentley (1):
FindwxWidgets: Do not use -isystem on OpenBSD (#13219)
Ben Boeckel (2):
Don't put legacy variables back into the cache
Search for other ABIFLAGS builds of Python
Bill Hoffman (15):
Add support to ctest for GTM mumps coverage.
Fix warning about char* instead of const char*.
Fix line length.
Add test for mumps coverage. Also refactor code to prepare for cache coverage.
Add virutal destructor to silence warning.
Add support for Cache coverage.
Fix some warnings and a bug where it went past the length of a vector.
Use a script to run the test because WORKING_DIRECTORY is not in 2.8.2.
Use <TARGET_FILE> expression to run ctest so it works with Xcode and VS IDE.
Add ability to specify more than one package directory or coverage directory.
Remove uncovered files from cache coverage data.
Disable bullseye coverage for mumps coverage test.
Update test data to match new coverage format.
Do not try to run bullseye coverage if COVFILE env is empty.
CDash now supports lots of files in coverage. So, show all files.
Brad King (59):
Add LICENSE and NOTICE
Add 'tips' script to suggest local configuration
Add 'setup-user' script to configure authorship information
Add 'setup-hooks' script to install local hooks
Add 'setup-gerrit' script to configure Gerrit access
Add 'setup-stage' script to configure topic stage remote
Add 'setup-ssh' script to configure ssh push access
Add README instructions and sample configuration
Add and configure developer setup helper scripts
Exclude from source archives files specific to Git work tree
Exclude from CMake source archives files specific to Git work tree
Refactor CMake version handling
Document behavior of multiple target_link_libraries calls (#13113)
ctest_coverage: Save/restore LC_ALL around gcov (#13136)
Cleanup custom command .rule file internal handling
Factor out custom command .rule file path generation
VS10: Avoid creating .rule files next to outputs (#13141)
find_package: Document <package>_FIND_* variables (#13142)
find_package: Fix components signature documentation (#13142)
Teach RunCMake tests to allow custom checks
list: Handle errors on empty lists more gracefully (#13138)
include_external_msproject: Test TYPE, GUID, PLATFORM options (#13120)
VS: Fix line-too-long style errors
libarchive: Avoid 'inline' keyword on XL C v6 (#13148)
Intel: On Windows use /EHsc instead of deprecated /GX (#13163)
KWSys: Remove DateStamp
try_compile: Cleanup temporary directories (#13160)
setup-stage: Optionally reconfigure topic stage
CTest: Escape MemCheck test output for XML (#13124)
Documentation: Fix HTML anchor ranges
Require CMake 2.8.2 or higher to build CMake
CTest: Simplify environment save/restore
KWSys: Fix SystemTools environment memory handling (#13156)
VS10: Refactor custom commands to use WriteSource
VS10: Simplify vcxproj.filter file generation
VS10: Convert paths normally unless forced to relative
VS11: Do not use source path conversion workaround specific to VS 10
VS10: Generate relative source paths when possible (#12570)
Intel: On Windows use /RTC1 instead of deprecated /GZ (#13174)
Test NO_SONAME property (#13155)
KWSys: Remove dependencies on FundamentalType
Documentation: Improve HTML section index format
VS: Restore header files marked as OS X Framework content (#13196)
VS11: Fix ARM architecture hint typo (#13077)
Fortran: Follow <>-style includes (#13239)
bootstrap: Port back to old shells (#13199)
KWSys: Remove unused environ declaration from SystemTools
FindBZip2: Search locations in GnuWin32 registry
cmArchiveWrite: Clear fflags from archive entries
Makefile: Support directory names containing '=' (#12934)
libarchive: Avoid 'inline' on SunPro < 5.9 (#13277)
Avoid direct use of std::(o|)stringstream (#13272)
KWIML: Add interface to report broken integer format macros
KWIML: Report broken integer format macros on AIX 4.3
add_library: Allow OBJECT library without dynamic linking (#13289)
install: Fix FILES_MATCHING on case-sensitive Mac filesystems (#13177)
Make CTest.UpdateGIT robust to Git safecrlf on Windows
Do not crash on SHARED library without language (#13324)
CMakeDetermineCCompiler: Fix typo "_CXX_" -> "_C_" (#13330)
Brian Helba (1):
Print any evaluated 'elseif'/'else' commands in trace mode (#13220)
Charlie Sharpsteen (1):
Mac: Add guards to CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE defaults
Clinton Stimpson (1):
cmake-gui: Wait for configure/generate thread to complete before exiting.
Daniel R. Gomez (6):
KWSys: Fix hashtable prime list on g++ 2.9 (#13273)
Tests/IncludeDirectories: Files must end in a newline (#13314)
Tests/VSGNUFortran: Avoid C++ comment in C code (#13314)
Tests/Assembler: Assemble and link with same flags (#13314)
Fix FindPackageMode test Makefile (#13314)
Avoid string.clear and string.push_back (#13319)
David Cole (12):
Begin post-2.8.8 development
CPack/NSIS: Add CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS (#13085)
ExternalProject: Add missing COMMAND keyword
ExternalProject: Avoid unnecessary git clones (#12564)
ExternalProject: Refactor repeated code into function (#12564)
ExternalProject: Avoid repeated git clone operations (#12564)
CTest: Modify reg ex so it also works with gcov 4.7 output (#13121)
BZip2: Remove unnecessary *.bz2 files from CMake source tree
Ninja: Enable the ninja generator by default on Windows.
Revert "Millenium update: 79 * (16/9)/(4/3) = 105"
Ninja: Restructure code to work with the Borland compilers
Remove unused ivars to eliminate compiler warnings
David Faure (1):
Abort FindQt4.cmake if Qt 5 is found.
Eric NOULARD (12):
Use fakeroot for control.tar.gz as well
Enhancement of bash completion scripts given by Igor Murzov.
Install editors helper files
CPack - preserve timestamp for CPACK_INSTALLED_DIRECTORIES. fixes: #0013193
CPack add easy possibility to warn about CPACK_SET_DESTDIR
CPack add necessary check to detect/warns/error on ABSOLUTE DESTINATION
Fix KWStyle warning
Use CPACK_xxx and CMAKE_xxx in a consistent way.
CPack allow RPM and DEB generator to be used on OSX.
Calm down Borland compiler warning about "always true"
CPackRPM: avoid leakage of RPM directive from one component to another.
CPackDeb add missing documentation for some CPACK_DEBIAN_xx variables.
Fraser Hutchison (1):
CPack: Fixed incorrect error log for CPACK_NSIS_MENU_LINKS.
Jan Schaffmeister (1):
Xcode: Recognize storyboard source files (#13214)
Jim Hague (2):
libarchive: Avoid trailing , in enum for XL v6 (#13148)
Workaround IBM XL v6 streams seekg bug (#13149)
Jonathan Klein (1):
FindBullet: Add missing math library name (#13309)
Joseph Snyder (1):
Change GT.M Coverage Parser global
Konstantin Tokarev (1):
[OSX] Fixed undefined symbol when linking CMakeLib into shared library
Kurtis Nusbaum (1):
Added conditional for the phonon backend plugin.
Leonid Yurchenko (1):
include_external_msproject: Add TYPE, GUID, PLATFORM options (#13120)
Mario Bensi (1):
Add FindLibLZMA Module
Mariusz Plucinski (1):
Do not crash on unknown source language (#13323)
Matt McCormick (1):
ExternalProject: Fix 'make' builds with Ninja (#13159)
Minmin Gong (1):
VS11: Add ARM architecture generator (#13077)
Modestas Vainius (3):
Fix CPack RPM man page typo detected by lintian.
Support building shared libraries or modules without soname (#13155)
Fix a few typos in NO_SONAME property description.
Nicolas Despres (2):
Ninja: Add a convenient 'clean' target.
Ninja: Add a convenient 'help' target.
Patrick Gansterer (1):
Added CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL
Peter Collingbourne (2):
Ninja: apply CMAKE_<LANG>_FLAGS_<TYPE> to executable targets (#13069)
Ninja: mark rules/build file streams failed if error occurred (#13067, #13105)
Peter Kuemmel (61):
Ninja: ensure output directories exist
Ninja: no 16:9 screens for the cmake team ;)
Ninja: add option to enable ninja where it is not enabled by default
Ninja: remove GCC -Wshadow warning
Ninja: enable Ninja for CodeBlocks
Ninja: no additional variable needed to enable ninja
Ninja: CMAKE_USE_NINJA is the name of the macro
VC Express doesn't support folders, ignore USE_FOLDER property
Ninja: add response file support on Windows
Ninja: 30000 is too long for windows cmd
Ninja: check for valid pointer
Ninja: also create rspfile rules
Ninja: don't break because of empty commands
Ninja: find mingw's resource compiler
Ninja: add dependency tracking for msvc with cldeps
Ninja: add wrapper for cl to extract dependencies
Ninja: allow spaces in source path
Ninja: assume cmcldeps in the same dir as cmake
Ninja: add copyright and description
Ninja: don't set cmcldeps vars to empty string when they are not defined
Ninja: fix ModuleNoticies test
Ninja: don't use cmcldeps for try_compile
Ninja: allow spaces in cldeps's .d file
Ninja: fix line length
Ninja: don't pollute the rules file with useless comments
Ninja: use slahes in .d files
Line Length: <79
Millenium update: 79 * (16/9)/(4/3) = 105
Ninja: complete MinGW support
Ninja: use slashes for include dirs, so also slahes are in the .d files
Ninja: ninja can't read dep. pathes with parentheses
Ninja: work with ninja/master, don't compile rc files with cl
Ninja: extract dependencies for .rc files with msvc tools
Ninja: remove unused CommentStream
Ninja: onyl use pre processor for rc file parsing
Ninja: suppress startup logos
Ninja: cmcldeps
Ninja: don't use shell when cmake is called directly
Ninja: ninja now also could read parentheses in .d files
Ninja: fix Linux build
Ninja: sh needs something befor and after &&
Ninja: build with old vc versions
Ninja: remove nop line
Ninja: undo all the NOSHELL patches
Ninja: be more accurate when estimating the command line length
Ninja: don't pollute build dir with preprocessed rc files
Ninja: Eclipse and KDevelop fixes for ninja
Ninja: no /nologo option in old rc.exe
Ninja: but cl supports /nologo ...
Ninja: try to make GetProcessId visible
Ninja: build cmcldeps with mingw
Ninja: don't remove space between command and parameters
Ninja: some bytes of the rc files couldn't be piped correctly
Ninja: build server fixes
Ninja: build with old msvc versions
Ninja: msvc6 for-scoping
Ninja: maybe this fixes the bcc32 build
remove warning about unused parameter
Ninja: build server fixes
Ninja: try work around for bcc32 bug
Ninja: disable cldeps for bcc32, it's too old, and ninja would also not build
Rolf Eike Beer (12):
FindPkgConfig.cmake: fix documented output variable not set (#13125,#13132)
UseJava: fix typo in variable name (#13135)
Check{C,CXX}CompilerFlag: catch more Intel warning types (#12576)
FindPythonLibs: honor EXACT version specification (#13216)
UseJava: fix find_jar() called with multiple files (#13281)
fix some typos
do not explicitely specify /usr and /usr/local as search paths
replace open coded versions of file(TO_CMAKE_PATH)
FindDevIL: clean up documentation formatting
FindQt4: extend documentation
Qt4Macros: improve basename extraction in QT4_ADD_DBUS_INTERFACES
Qt4Macros: add some quotes to prevent damage from spaces in the paths
Sean McBride (1):
Remove unused ivars to eliminate compiler warnings
Sebastian Leske (1):
Improve documentation of set command (#13269)
Stephen Kelly (10):
Fix the number variable comparison when Qt is not found.
Update the docs of IMPORTED_LOCATION_CONFIG to match the code.
Move the EscapeJSON method to a sharable location.
Add newline to the output.
Make the CMAKE_EXPORT_COMPILE_COMMANDS option work with Ninja.
Escape the source file to be compiled if required.
Exclude the CompileCommandOutput test on WIN32.
Add platform variables for position independent code flags
Add platform variable for flags specific to shared libraries
Refactor generation of shared library flags
Tobias Bieniek (1):
Qt4Macros: Added support for generated resource files
Zack Galbreath (1):
FindPythonLibs: Document cache variables (#13240)
Zaheer Chothia (1):
VS: Set Intel Fortran 13 project version
Changes in CMake 2.8.8 (since 2.8.8-rc2)
----------------------------------------
Brad King (1):

@ -0,0 +1,4 @@
string(REGEX REPLACE "^/(.*)" "\\1" REL_CMAKE_DATA_DIR "${CMAKE_DATA_DIR}")
install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${REL_CMAKE_DATA_DIR}/editors/vim)
install(FILES cmake-mode.el DESTINATION ${REL_CMAKE_DATA_DIR}/editors/emacs)
ADD_SUBDIRECTORY (bash-completion)

@ -0,0 +1,8 @@
# Always install completion file in local dir
# in order to be sure to always be able to install
# in a local user directory rooted in a single directory.
# packager should either patch that out or
# add symlinks to the files in appropriate places
# /etc/bash_completion.d/
# DATADIR/completions (may be /usr/share/<package>/completions
install(FILES cmake cpack ctest DESTINATION ${REL_CMAKE_DATA_DIR}/completions)

@ -0,0 +1,149 @@
# bash completion for cmake(1) -*- shell-script -*-
_cmake()
{
local cur prev words cword split=false
_init_completion -n := || return
# Workaround for options like -DCMAKE_BUILD_TYPE=Release
local prefix=
if [[ $cur == -D* ]]; then
prev=-D
prefix=-D
cur="${cur#-D}"
elif [[ $cur == -U* ]]; then
prev=-U
prefix=-U
cur="${cur#-U}"
fi
case "$prev" in
-D)
if [[ $cur == *=* ]]; then
# complete values for variables
local var type value
var="${cur%%[:=]*}"
value="${cur#*=}"
if [[ $cur == CMAKE_BUILD_TYPE* ]]; then # most widely used case
COMPREPLY=( $( compgen -W 'Debug Release RelWithDebInfo
MinSizeRel' -- "$value" ) )
return
fi
if [[ $cur == *:* ]]; then
type="${cur#*:}"
type="${type%%=*}"
else # get type from cache if it's not set explicitly
type=$( cmake -LA -N 2>/dev/null | grep "$var:" \
2>/dev/null )
type="${type#*:}"
type="${type%%=*}"
fi
case "$type" in
FILEPATH)
cur="$value"
_filedir
return
;;
PATH)
cur="$value"
_filedir -d
return
;;
BOOL)
COMPREPLY=( $( compgen -W 'ON OFF TRUE FALSE' -- \
"$value" ) )
return
;;
STRING|INTERNAL)
# no completion available
return
;;
esac
elif [[ $cur == *:* ]]; then
# complete types
local type="${cur#*:}"
COMPREPLY=( $( compgen -W 'FILEPATH PATH STRING BOOL INTERNAL'\
-S = -- "$type" ) )
compopt -o nospace
else
# complete variable names
COMPREPLY=( $( compgen -W '$( cmake -LA -N | tail -n +2 |
cut -f1 -d: )' -P "$prefix" -- "$cur" ) )
compopt -o nospace
fi
return
;;
-U)
COMPREPLY=( $( compgen -W '$( cmake -LA -N | tail -n +2 |
cut -f1 -d: )' -P "$prefix" -- "$cur" ) )
return
;;
esac
_split_longopt && split=true
case "$prev" in
-C|-P|--graphviz|--system-information)
_filedir
return
;;
--build)
_filedir -d
return
;;
-E)
COMPREPLY=( $( compgen -W "$( cmake -E help |& sed -n \
'/^ /{s|^ \([^ ]\{1,\}\) .*$|\1|;p}' 2>/dev/null )" \
-- "$cur" ) )
return
;;
-G)
# FIXME: doesn't work properly
local IFS=$'\n'
COMPREPLY=( $( compgen -W '$( cmake --help 2>/dev/null | sed -n \
"/^.*[^ ].*= Generates/{s|^ *\(.*[^ ]\) *= Generates.*$|\1|;s| |\\\\ |g;p}" \
2>/dev/null )' -- "$cur" ) )
return
;;
--help-command)
COMPREPLY=( $( compgen -W '$( cmake --help-command-list 2>/dev/null|
tail -n +2 )' -- "$cur" ) )
return
;;
--help-module)
COMPREPLY=( $( compgen -W '$( cmake --help-module-list 2>/dev/null|
tail -n +2 )' -- "$cur" ) )
return
;;
--help-policy)
COMPREPLY=( $( compgen -W '$( cmake --help-policies 2>/dev/null |
grep "^ CMP" 2>/dev/null )' -- "$cur" ) )
return
;;
--help-property)
COMPREPLY=( $( compgen -W '$( cmake --help-property-list \
2>/dev/null | tail -n +2 )' -- "$cur" ) )
return
;;
--help-variable)
COMPREPLY=( $( compgen -W '$( cmake --help-variable-list \
2>/dev/null | tail -n +2 )' -- "$cur" ) )
return
;;
esac
$split && return
if [[ "$cur" == -* ]]; then
COMPREPLY=( $(compgen -W '$( _parse_help "$1" --help )' -- ${cur}) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
[[ $COMPREPLY ]] && return
fi
_filedir
} &&
complete -F _cmake cmake
# ex: ts=4 sw=4 et filetype=sh

@ -0,0 +1,61 @@
# bash completion for cpack(1) -*- shell-script -*-
_cpack()
{
local cur prev words cword
_init_completion -n = || return
case "$prev" in
-G)
COMPREPLY=( $( compgen -W '$( cpack --help 2>/dev/null |
grep "^ .*=\ .*" 2> /dev/null | grep -v "^ -" 2>/dev/null |
cut -d" " -f 3 )' -- "$cur" ) )
return
;;
-C)
COMPREPLY=( $( compgen -W 'Debug Release RelWithDebInfo
MinSizeRel' -- "$cur" ) )
return
;;
-D)
[[ $cur == *=* ]] && return # no completion for values
COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \
2>/dev/null | tail -n +2 )' -S = -- "$cur" ) )
compopt -o nospace
return
;;
-P|-R|--vendor)
# argument required but no completions available
return
;;
-B)
_filedir -d
return
;;
--config)
_filedir
return
;;
--help-command)
COMPREPLY=( $( compgen -W '$( cpack --help-command-list 2>/dev/null|
tail -n +2 )' -- "$cur" ) )
return
;;
--help-variable)
COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \
2>/dev/null | tail -n +2 )' -- "$cur" ) )
return
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $(compgen -W '$( _parse_help "$1" --help )' -- ${cur}) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
[[ $COMPREPLY ]] && return
fi
_filedir
} &&
complete -F _cpack cpack
# ex: ts=4 sw=4 et filetype=sh

@ -0,0 +1,81 @@
# bash completion for ctest(1) -*- shell-script -*-
_ctest()
{
local cur prev words cword
_init_completion -n = || return
case "$prev" in
-C|--build-config)
COMPREPLY=( $( compgen -W 'Debug Release RelWithDebInfo
MinSizeRel' -- "$cur" ) )
return
;;
-j|--parallel)
COMPREPLY=( $( compgen -W "{1..$(( $(_ncpus)*2 ))}" -- "$cur" ) )
return
;;
-O|--output-log|-A|--add-notes|--extra-submit)
_filedir
return
;;
-L|--label-regex|-LE|--label-exclude|--track|-I|--tests-information|\
--max-width|--timeout|--stop-time)
# argument required but no completions available
return
;;
-R|--tests-regex|-E|--exclude-regex)
COMPREPLY=( $( compgen -W '$( ctest -N 2>/dev/null |
grep "^ Test" 2>/dev/null | cut -d: -f 2 )' -- "$cur" ) )
return
;;
-D|--dashboard)
if [[ $cur == @(Experimental|Nightly|Continuous)* ]]; then
local model action
action=${cur#@(Experimental|Nightly|Continuous)}
model=${cur%"$action"}
COMPREPLY=( $( compgen -W 'Start Update Configure Build Test
Coverage Submit MemCheck' -P "$model" -- "$action" ) )
else
COMPREPLY=( $( compgen -W 'Experimental Nightly Continuous' \
-- "$cur" ) )
compopt -o nospace
fi
return
;;
-M|--test-model)
COMPREPLY=( $( compgen -W 'Experimental Nightly Continuous' -- \
"$cur" ) )
return
;;
-T|--test-action)
COMPREPLY=( $( compgen -W 'Start Update Configure Build Test
Coverage Submit MemCheck' -- "$cur" ) )
return
;;
-S|--script|-SP|--script-new-process)
# FIXME ?
return
;;
--interactive-debug-mode)
COMPREPLY=( $( compgen -W '0 1' -- "$cur" ) )
return
;;
--help-command)
COMPREPLY=( $( compgen -W '$( ctest --help-command-list 2>/dev/null|
tail -n +2 )' -- "$cur" ) )
return
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $(compgen -W '$( _parse_help "$1" --help )' -- ${cur}) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
[[ $COMPREPLY ]] && return
fi
_filedir
} &&
complete -F _ctest ctest
# ex: ts=4 sw=4 et filetype=sh

@ -1,207 +0,0 @@
#
# 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
;;
# FIXME: don't know how to handle multi words completion
# or more precisely word that contains space in them like "Unix Makefiles"
# -G)
# local running=$(for x in `cmake --help | grep "^ .*=\ .*" | grep -v "^ -" | cut -d"=" -f 1 | grep -v "^ "`; do echo \"${x}\" ; done )
# COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
# return 0
# ;;
--help-command)
local running=$(for x in `cmake --help-command-list | grep -v "cmake version"`; do echo ${x} ; done )
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
return 0
;;
--help-module)
local running=$(for x in `cmake --help-module-list | grep -v "cmake version"`; 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 | grep -v "cmake version"`; do echo ${x} ; done )
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
return 0
;;
--help-variable)
local running=$(for x in `cmake --help-variable-list | grep -v "cmake version"`; 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
;;
--help-variable)
local running=$(for x in `cpack --help-variable-list | grep -v "cpack version" `; do echo ${x} ; done )
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
return 0
;;
--help-command)
local running=$(for x in `cpack --help-command-list | grep -v "cpack version" `; do echo ${x} ; done )
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
return 0
;;
*)
;;
esac
#
# Complete the option (Level 0 - right after cpack)
#
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
} &&
complete -F _cpack -o default cpack
#
# ctest 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 | grep -v "ctest version" `; do echo ${x} ; done )
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) )
return 0
;;
-R|-E)
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

@ -18,6 +18,11 @@ else()
endif()
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")

@ -34,6 +34,11 @@ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")

@ -33,6 +33,11 @@ else()
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")

@ -48,3 +48,6 @@ SET(CMAKE_C_HAS_ISYSROOT "@CMAKE_C_HAS_ISYSROOT@")
SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@

@ -164,7 +164,7 @@ INCLUDE(CMakeCommonLanguageInclude)
# create a C shared library
IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
SET(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
# create a C shared module just copy the shared library rule

@ -49,3 +49,6 @@ SET(CMAKE_CXX_HAS_ISYSROOT "@CMAKE_CXX_HAS_ISYSROOT@")
SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@

@ -100,6 +100,18 @@ IF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
IF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIC)
SET(CMAKE_CXX_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC})
ENDIF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIC)
IF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE)
SET(CMAKE_CXX_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE})
ENDIF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE)
IF(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL)
SET(CMAKE_CXX_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL})
ENDIF(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL)
IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
@ -242,7 +254,7 @@ INCLUDE(CMakeCommonLanguageInclude)
# create a shared C++ library
IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
# create a c++ shared module copy the shared library rule by default

@ -0,0 +1,37 @@
#=============================================================================
# Copyright 2012 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
#
# When using Ninja cl.exe is wrapped by cmcldeps to extract the included
# headers for dependency tracking.
#
# cmcldeps path is set, and cmcldeps needs to know the localized string
# in front of each include path, so it can remove it.
#
IF(MSVC_C_ARCHITECTURE_ID AND CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_C_COMPILER AND CMAKE_COMMAND)
STRING(REPLACE "cmake.exe" "cmcldeps.exe" CMAKE_CMCLDEPS_EXECUTABLE ${CMAKE_COMMAND})
SET(showdir ${CMAKE_BINARY_DIR}/CMakeFiles/ShowIncludes)
FILE(WRITE ${showdir}/foo.h "\n")
FILE(WRITE ${showdir}/main.c "#include \"foo.h\" \nint main(){}\n")
EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} /nologo /showIncludes ${showdir}/main.c
WORKING_DIRECTORY ${showdir} OUTPUT_VARIABLE showOut)
STRING(REPLACE main.c "" showOut1 ${showOut})
STRING(REPLACE "/" "\\" header1 ${showdir}/foo.h)
STRING(TOLOWER ${header1} header2)
STRING(REPLACE ${header2} "" showOut2 ${showOut1})
STRING(REPLACE "\n" "" showOut3 ${showOut2})
SET(SET_CMAKE_CMCLDEPS_EXECUTABLE "SET(CMAKE_CMCLDEPS_EXECUTABLE \"${CMAKE_CMCLDEPS_EXECUTABLE}\")")
SET(SET_CMAKE_CL_SHOWINCLUDE_PREFIX "SET(CMAKE_CL_SHOWINCLUDE_PREFIX \"${showOut3}\")")
ENDIF()

@ -32,7 +32,7 @@
# _CMAKE_TOOLCHAIN_PREFIX
IF(NOT CMAKE_C_COMPILER)
SET(CMAKE_CXX_COMPILER_INIT NOTFOUND)
SET(CMAKE_C_COMPILER_INIT NOTFOUND)
# prefer the environment variable CC
IF($ENV{CC} MATCHES ".+")
@ -165,9 +165,7 @@ ENDIF (CMAKE_CROSSCOMPILING
AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake)
INCLUDE(CMakeFindBinUtils)
IF(MSVC_C_ARCHITECTURE_ID)
SET(SET_MSVC_C_ARCHITECTURE_ID

@ -173,6 +173,7 @@ ENDIF (CMAKE_CROSSCOMPILING
AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake)
INCLUDE(CMakeFindBinUtils)
IF(MSVC_CXX_ARCHITECTURE_ID)
SET(SET_MSVC_CXX_ARCHITECTURE_ID

@ -302,12 +302,6 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
TIMEOUT 10
)
IF("${lang}" STREQUAL "ASM")
MESSAGE(STATUS "Checked for ${vendor}")
MESSAGE(STATUS " Output: -${output}-")
MESSAGE(STATUS " Result: -${result}-")
ENDIF("${lang}" STREQUAL "ASM")
IF("${output}" MATCHES "${regex}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "

@ -74,6 +74,18 @@ ENDIF()
# catch any modules
SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
IF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIC)
SET(CMAKE_Fortran_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC})
ENDIF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIC)
IF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE)
SET(CMAKE_Fortran_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE})
ENDIF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE)
IF(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL)
SET(CMAKE_Fortran_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL})
ENDIF(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL)
# Create a set of shared library variable specific to Fortran
# For 90% of the systems, these are the same flags as the C versions
# so if these are not set just copy the flags from the c version
@ -171,7 +183,7 @@ INCLUDE(CMakeCommonLanguageInclude)
# create a Fortran shared library
IF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
# create a Fortran shared module just copy the shared library rule

@ -60,6 +60,12 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
ENDIF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
IF(CMAKE_GENERATOR MATCHES "Ninja")
SET(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
"Enable/Disable output of compile commands during generation."
)
MARK_AS_ADVANCED(CMAKE_EXPORT_COMPILE_COMMANDS)
ENDIF(CMAKE_GENERATOR MATCHES "Ninja")
# GetDefaultWindowsPrefixBase
#
@ -77,6 +83,8 @@ function(GetDefaultWindowsPrefixBase var)
#
if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
set(arch_hint "x64")
elseif("${CMAKE_GENERATOR}" MATCHES "ARM")
set(arch_hint "ARM")
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(arch_hint "x64")
elseif("$ENV{LIB}" MATCHES "(amd64|ia64)")
@ -168,6 +176,10 @@ ELSE(CMAKE_HOST_UNIX)
SET(CMAKE_GENERIC_PROGRAM_FILES)
ENDIF(CMAKE_HOST_UNIX)
# Set a variable which will be used as component name in install() commands
# where no COMPONENT has been given:
SET(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "Unspecified")
MARK_AS_ADVANCED(
CMAKE_SKIP_RPATH
CMAKE_SKIP_INSTALL_RPATH

@ -97,6 +97,9 @@
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# elif defined(_M_ARM)
# define ARCHITECTURE_ID "ARM"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif

@ -89,6 +89,7 @@
# CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
# not including the extension. For example, cmake-2.6.1-Linux-i686.
# The default value is
#
# ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}.
##end
#
@ -341,6 +342,10 @@ cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME
cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}")
IF(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
ENDIF(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
IF(CPACK_NSIS_MODIFY_PATH)
SET(CPACK_NSIS_MODIFY_PATH ON)
ENDIF(CPACK_NSIS_MODIFY_PATH)

@ -68,7 +68,11 @@
# CPACK_DEBIAN_PACKAGE_HOMEPAGE
# Mandatory : NO
# Default : -
# The URL of the web site for this package
# The URL of the web site for this package, preferably (when applicable) the
# site from which the original source can be obtained and any additional
# upstream documentation or information may be found.
# The content of this field is a simple URL without any surrounding
# characters such as <>.
##end
##variable
# CPACK_DEBIAN_PACKAGE_SHLIBDEPS
@ -137,6 +141,30 @@
# Packages can declare in their control file that they should overwrite
# files in certain other packages, or completely replace other packages.
##end
##variable
# CPACK_DEBIAN_PACKAGE_RECOMMENDS
# Mandatory : NO
# Default : -
# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
# Allows packages to declare a strong, but not absolute, dependency on other packages.
##end
##variable
# CPACK_DEBIAN_PACKAGE_SUGGESTS
# Mandatory : NO
# Default : -
# see http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps
# Allows packages to declare a suggested package install grouping.
##end
##variable
# CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
# Mandatory : NO
# Default : -
# This variable allow advanced user to add custom script to the control.tar.gz
# Typical usage is for conffiles, postinst, postrm, prerm.
# Usage: SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
# "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
##end
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.

@ -31,13 +31,21 @@
##end
#
##variable
# CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that will
# be added to the install Section.
# CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS - Extra NSIS commands that
# will be added to the beginning of the install Section, before your
# install tree is available on the target system.
##end
#
##variable
# CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that
# will be added to the end of the install Section, after your
# install tree is available on the target system.
##end
#
##variable
# CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS - Extra NSIS commands that will
# be added to the uninstall Section.
# be added to the uninstall Section, before your install tree is
# removed from the target system.
##end
#
##variable
@ -46,6 +54,14 @@
##end
#
##variable
# CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL - Ask about uninstalling
# previous versions first.
# If this is set to "ON", then an installer will look for previous
# installed versions and if one is found, ask the user whether to
# uninstall it before proceeding with the install.
##end
#
##variable
# CPACK_NSIS_MODIFY_PATH - Modify PATH toggle.
# If this is set to "ON", then an extra page
# will appear in the installer that will allow the user to choose

@ -488,7 +488,10 @@ FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
ELSE(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
# Do not forget to unset previously set header (from previous component)
UNSET(TMP_RPM_${_RPM_SPEC_HEADER})
ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
ENDFOREACH(_RPM_SPEC_HEADER)
# CPACK_RPM_SPEC_INSTALL_POST

@ -33,7 +33,9 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "option .*not supported" # Intel
FAIL_REGEX "option.*not supported" # Intel
FAIL_REGEX "invalid argument .*option" # Intel
FAIL_REGEX "ignoring option .*argument required" # Intel
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL

@ -33,7 +33,9 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "unknown .*option" # Clang
FAIL_REGEX "ignoring unknown option" # MSVC
FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "option .*not supported" # Intel
FAIL_REGEX "option.*not supported" # Intel
FAIL_REGEX "invalid argument .*option" # Intel
FAIL_REGEX "ignoring option .*argument required" # Intel
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL

@ -21,6 +21,10 @@ set(__COMPILER_GNU 1)
macro(__compiler_gnu lang)
# Feature flags.
set(CMAKE_${lang}_VERBOSE_FLAG "-v")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
endif()
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")

@ -20,6 +20,9 @@ set(__COMPILER_SCO 1)
macro(__compiler_sco lang)
# Feature flags.
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC -Kpic)
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE -Kpie)
set(CMAKE_${lang}_COMPILE_OPTIONS_DLL -belf)
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-Kpic -belf")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-belf -Wl,-Bexport")
endmacro()

@ -1,5 +1,7 @@
SET(CMAKE_C_VERBOSE_FLAG "-#")
SET(CMAKE_C_COMPILE_OPTIONS_PIC -KPIC)
SET(CMAKE_C_COMPILE_OPTIONS_PIE -KPIE)
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R")

@ -1,5 +1,7 @@
SET(CMAKE_CXX_VERBOSE_FLAG "-v")
SET(CMAKE_CXX_COMPILE_OPTIONS_PIC -KPIC)
SET(CMAKE_CXX_COMPILE_OPTIONS_PIE -KPIE)
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R")

@ -47,7 +47,7 @@ macro(__compiler_xl lang)
# files so that we export only the symbols actually provided by the sources.
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
"${CMAKE_XL_CreateExportList} <OBJECT_DIR>/objects.exp <OBJECTS>"
"<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>"
"<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>"
)
endif()
endmacro()

@ -252,12 +252,23 @@ define_property(DIRECTORY PROPERTY "EP_STEP_TARGETS" INHERITED
)
function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag src_name work_dir)
function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag src_name work_dir gitclone_infofile gitclone_stampfile)
file(WRITE ${script_filename}
"if(\"${git_tag}\" STREQUAL \"\")
message(FATAL_ERROR \"Tag for git checkout should not be empty.\")
endif()
set(run 0)
if(\"${gitclone_infofile}\" IS_NEWER_THAN \"${gitclone_stampfile}\")
set(run 1)
endif()
if(NOT run)
message(STATUS \"Avoiding repeated git clone, stamp file is up to date: '${gitclone_stampfile}'\")
return()
endif()
execute_process(
COMMAND \${CMAKE_COMMAND} -E remove_directory \"${source_dir}\"
RESULT_VARIABLE error_code
@ -302,6 +313,19 @@ if(error_code)
message(FATAL_ERROR \"Failed to update submodules in: '${work_dir}/${src_name}'\")
endif()
# Complete success, update the script-last-run stamp file:
#
execute_process(
COMMAND \${CMAKE_COMMAND} -E copy
\"${gitclone_infofile}\"
\"${gitclone_stampfile}\"
WORKING_DIRECTORY \"${work_dir}/${src_name}\"
RESULT_VARIABLE error_code
)
if(error_code)
message(FATAL_ERROR \"Failed to copy script-last-run stamp file: '${gitclone_stampfile}'\")
endif()
"
)
@ -688,8 +712,12 @@ function(_ep_get_build_command name step cmd_var)
endif()
else() # if(cfg_cmd_id STREQUAL "configure")
# Non-CMake project. Guess "make" and "make install" and "make test".
# But use "$(MAKE)" to get recursive parallel make.
if("${CMAKE_GENERATOR}" MATCHES "Makefiles")
# Try to get the parallel arguments
set(cmd "$(MAKE)")
else()
set(cmd "make")
endif()
if(step STREQUAL "INSTALL")
set(args install)
endif()
@ -824,15 +852,23 @@ function(_ep_get_configuration_subdir_suffix suffix_var)
endfunction(_ep_get_configuration_subdir_suffix)
function(ExternalProject_Add_StepTargets name)
set(steps ${ARGN})
function(_ep_get_step_stampfile name step stampfile_var)
ExternalProject_Get_Property(${name} stamp_dir)
_ep_get_configuration_subdir_suffix(cfgdir)
ExternalProject_Get_Property(${name} stamp_dir)
set(stampfile "${stamp_dir}${cfgdir}/${name}-${step}")
set(${stampfile_var} "${stampfile}" PARENT_SCOPE)
endfunction()
function(ExternalProject_Add_StepTargets name)
set(steps ${ARGN})
foreach(step ${steps})
_ep_get_step_stampfile(${name} ${step} stamp_file)
add_custom_target(${name}-${step}
DEPENDS ${stamp_dir}${cfgdir}/${name}-${step})
DEPENDS ${stamp_file})
# Depend on other external projects (target-level).
get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
@ -845,23 +881,26 @@ endfunction(ExternalProject_Add_StepTargets)
function(ExternalProject_Add_Step name step)
set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
ExternalProject_Get_Property(${name} stamp_dir)
_ep_get_configuration_subdir_suffix(cfgdir)
set(complete_stamp_file "${cmf_dir}${cfgdir}/${name}-complete")
_ep_get_step_stampfile(${name} ${step} stamp_file)
add_custom_command(APPEND
OUTPUT ${cmf_dir}${cfgdir}/${name}-complete
DEPENDS ${stamp_dir}${cfgdir}/${name}-${step}
OUTPUT ${complete_stamp_file}
DEPENDS ${stamp_file}
)
_ep_parse_arguments(ExternalProject_Add_Step
${name} _EP_${step}_ "${ARGN}")
# Steps depending on this step.
get_property(dependers TARGET ${name} PROPERTY _EP_${step}_DEPENDERS)
foreach(depender IN LISTS dependers)
_ep_get_step_stampfile(${name} ${depender} depender_stamp_file)
add_custom_command(APPEND
OUTPUT ${stamp_dir}${cfgdir}/${name}-${depender}
DEPENDS ${stamp_dir}${cfgdir}/${name}-${step}
OUTPUT ${depender_stamp_file}
DEPENDS ${stamp_file}
)
endforeach()
@ -871,7 +910,8 @@ function(ExternalProject_Add_Step name step)
# Dependencies on steps.
get_property(dependees TARGET ${name} PROPERTY _EP_${step}_DEPENDEES)
foreach(dependee IN LISTS dependees)
list(APPEND depends ${stamp_dir}${cfgdir}/${name}-${dependee})
_ep_get_step_stampfile(${name} ${dependee} dependee_stamp_file)
list(APPEND depends ${dependee_stamp_file})
endforeach()
# The command to run.
@ -901,10 +941,10 @@ function(ExternalProject_Add_Step name step)
# Run every time?
get_property(always TARGET ${name} PROPERTY _EP_${step}_ALWAYS)
if(always)
set_property(SOURCE ${stamp_dir}${cfgdir}/${name}-${step} PROPERTY SYMBOLIC 1)
set_property(SOURCE ${stamp_file} PROPERTY SYMBOLIC 1)
set(touch)
else()
set(touch ${CMAKE_COMMAND} -E touch ${stamp_dir}${cfgdir}/${name}-${step})
set(touch ${CMAKE_COMMAND} -E touch ${stamp_file})
endif()
# Wrap with log script?
@ -914,7 +954,7 @@ function(ExternalProject_Add_Step name step)
endif()
add_custom_command(
OUTPUT ${stamp_dir}${cfgdir}/${name}-${step}
OUTPUT ${stamp_file}
COMMENT ${comment}
COMMAND ${command}
COMMAND ${touch}
@ -1079,9 +1119,15 @@ function(_ep_add_download_command name)
set(git_tag "master")
endif()
# For the download step, and the git clone operation, only the repository
# should be recorded in a configured RepositoryInfo file. If the repo
# changes, the clone script should be run again. But if only the tag
# changes, avoid running the clone script again. Let the 'always' running
# update step checkout the new tag.
#
set(repository ${git_repository})
set(module)
set(tag ${git_tag})
set(tag)
configure_file(
"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
"${stamp_dir}/${name}-gitinfo.txt"
@ -1097,6 +1143,7 @@ function(_ep_add_download_command name)
#
_ep_write_gitclone_script(${tmp_dir}/${name}-gitclone.cmake ${source_dir}
${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${src_name} ${work_dir}
${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt
)
set(comment "Performing download step (git clone) for '${name}'")
set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake)
@ -1141,7 +1188,8 @@ function(_ep_add_download_command name)
set(comment "Performing download step (verify and extract) for '${name}'")
endif()
_ep_write_verifyfile_script("${stamp_dir}/verify-${name}.cmake" "${file}" "${md5}")
list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake)
list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake
COMMAND)
_ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${name}" "${file}" "${source_dir}")
list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake)
endif()
@ -1276,14 +1324,12 @@ endfunction(_ep_add_patch_command)
function(_ep_add_configure_command name)
ExternalProject_Get_Property(${name} source_dir binary_dir tmp_dir)
_ep_get_configuration_subdir_suffix(cfgdir)
# Depend on other external projects (file-level).
set(file_deps)
get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
foreach(dep IN LISTS deps)
get_property(dep_stamp_dir TARGET ${dep} PROPERTY _EP_STAMP_DIR)
list(APPEND file_deps ${dep_stamp_dir}${cfgdir}/${dep}-done)
_ep_get_step_stampfile(${dep} "done" done_stamp_file)
list(APPEND file_deps ${done_stamp_file})
endforeach()
get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET)
@ -1446,11 +1492,14 @@ function(ExternalProject_Add name)
# Add a custom target for the external project.
set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)
add_custom_target(${name} ALL DEPENDS ${cmf_dir}${cfgdir}/${name}-complete)
set(complete_stamp_file "${cmf_dir}${cfgdir}/${name}-complete")
add_custom_target(${name} ALL DEPENDS ${complete_stamp_file})
set_property(TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT 1)
_ep_parse_arguments(ExternalProject_Add ${name} _EP_ "${ARGN}")
_ep_set_directories(${name})
ExternalProject_Get_Property(${name} stamp_dir)
_ep_get_step_stampfile(${name} "done" done_stamp_file)
_ep_get_step_stampfile(${name} "install" install_stamp_file)
# The 'complete' step depends on all other steps and creates a
# 'done' mark. A dependent external project's 'configure' step
@ -1461,19 +1510,18 @@ function(ExternalProject_Add name)
# parallel builds. However, the Ninja generator needs to see the entire
# dependency graph, and can cope with custom commands belonging to
# multiple targets, so we add the 'done' mark as an output for Ninja only.
set(complete_outputs ${cmf_dir}${cfgdir}/${name}-complete)
set(complete_outputs ${complete_stamp_file})
if(${CMAKE_GENERATOR} MATCHES "Ninja")
set(complete_outputs
${complete_outputs} ${stamp_dir}${cfgdir}/${name}-done)
set(complete_outputs ${complete_outputs} ${done_stamp_file})
endif()
add_custom_command(
OUTPUT ${complete_outputs}
COMMENT "Completed '${name}'"
COMMAND ${CMAKE_COMMAND} -E make_directory ${cmf_dir}${cfgdir}
COMMAND ${CMAKE_COMMAND} -E touch ${cmf_dir}${cfgdir}/${name}-complete
COMMAND ${CMAKE_COMMAND} -E touch ${stamp_dir}${cfgdir}/${name}-done
DEPENDS ${stamp_dir}${cfgdir}/${name}-install
COMMAND ${CMAKE_COMMAND} -E touch ${complete_stamp_file}
COMMAND ${CMAKE_COMMAND} -E touch ${done_stamp_file}
DEPENDS ${install_stamp_file}
VERBATIM
)

@ -318,7 +318,7 @@ FUNCTION(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_PURPOSE)
FOREACH(_purpose ${_info})
SET(_currentFeatureText "${_currentFeatureText}\n * ${_purpose}")
SET(_currentFeatureText "${_currentFeatureText}\n ${_purpose}")
ENDFOREACH()
ENDIF(includeThisOne)
@ -399,7 +399,7 @@ FUNCTION(FEATURE_SUMMARY)
SET(_tmp)
_FS_GET_FEATURE_SUMMARY( ${part} _tmp ${_FS_INCLUDE_QUIET_PACKAGES})
IF(_tmp)
SET(_fullText "${_fullText}\n\n-- ${title_${part}}\n${_tmp}")
SET(_fullText "${_fullText}\n-- ${title_${part}}\n${_tmp}\n")
IF("${part}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND")
SET(requiredPackagesNotFound TRUE)
ENDIF()

@ -74,7 +74,7 @@ endif (ARMADILLO_INCLUDE_DIR)
#======================
# Checks 'RECQUIRED', 'QUIET' and versions.
# Checks 'REQUIRED', 'QUIET' and versions.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Armadillo
REQUIRED_VARS ARMADILLO_LIBRARY ARMADILLO_INCLUDE_DIR

@ -22,11 +22,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h )
SET(_BZIP2_PATHS PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Bzip2;InstallPath]"
)
FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h ${_BZIP2_PATHS} PATH_SUFFIXES include)
IF (NOT BZIP2_LIBRARIES)
FIND_LIBRARY(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 )
FIND_LIBRARY(BZIP2_LIBRARY_DEBUG NAMES bzip2d )
FIND_LIBRARY(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 ${_BZIP2_PATHS} PATH_SUFFIXES lib)
FIND_LIBRARY(BZIP2_LIBRARY_DEBUG NAMES bzip2d ${_BZIP2_PATHS} PATH_SUFFIXES lib)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
SELECT_LIBRARY_CONFIGURATIONS(BZIP2)

@ -63,7 +63,7 @@ _FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_Debug BulletD
_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision)
_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_Debug BulletCollision_d)
_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY BulletMath LinearMath)
_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_d)
_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_Debug LinearMath_d)
_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody)
_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d)

@ -540,7 +540,7 @@ set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
# CUDA 3.2+ on Windows moved the library directoryies, so we need the new
# CUDA 3.2+ on Windows moved the library directories, so we need the new
# and old paths.
set(_cuda_64bit_lib_dir "lib/x64" "lib64" )
endif()

@ -2,11 +2,22 @@
# http://openil.sourceforge.net/
#
# This module sets:
# IL_LIBRARIES the name of the IL library. These include the full path to the core DevIL library. This one has to be linked into the application.
# ILU_LIBRARIES the name of the ILU library. Again, the full path. This library is for filters and effects, not actual loading. It doesn't have to be linked if the functionality it provides is not used.
# ILUT_LIBRARIES the name of the ILUT library. Full path. This part of the library interfaces with OpenGL. It is not strictly needed in applications.
# IL_INCLUDE_DIR where to find the il.h, ilu.h and ilut.h files.
# IL_FOUND this is set to TRUE if all the above variables were set. This will be set to false if ILU or ILUT are not found, even if they are not needed. In most systems, if one library is found all the others are as well. That's the way the DevIL developers release it.
# IL_LIBRARIES - the name of the IL library. These include the full path to
# the core DevIL library. This one has to be linked into the
# application.
# ILU_LIBRARIES - the name of the ILU library. Again, the full path. This
# library is for filters and effects, not actual loading. It
# doesn't have to be linked if the functionality it provides
# is not used.
# ILUT_LIBRARIES - the name of the ILUT library. Full path. This part of the
# library interfaces with OpenGL. It is not strictly needed
# in applications.
# IL_INCLUDE_DIR - where to find the il.h, ilu.h and ilut.h files.
# IL_FOUND - this is set to TRUE if all the above variables were set.
# This will be set to false if ILU or ILUT are not found,
# even if they are not needed. In most systems, if one
# library is found all the others are as well. That's the
# way the DevIL developers release it.
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.

@ -79,18 +79,14 @@ SET(FLTK_DIR_STRING "directory containing FLTKConfig.cmake. This is either the
# Search only if the location is not already known.
IF(NOT FLTK_DIR)
# Get the system search path as a list.
IF(UNIX)
STRING(REGEX MATCHALL "[^:]+" FLTK_DIR_SEARCH1 "$ENV{PATH}")
ELSE(UNIX)
STRING(REGEX REPLACE "\\\\" "/" FLTK_DIR_SEARCH1 "$ENV{PATH}")
ENDIF(UNIX)
STRING(REGEX REPLACE "/;" ";" FLTK_DIR_SEARCH2 ${FLTK_DIR_SEARCH1})
FILE(TO_CMAKE_PATH "$ENV{PATH}" FLTK_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
SET(FLTK_DIR_SEARCH "")
FOREACH(dir ${FLTK_DIR_SEARCH2})
SET(FLTK_DIR_SEARCH ${FLTK_DIR_SEARCH} "${dir}/../lib/fltk")
ENDFOREACH(dir)
STRING(REPLACE "//" "/" FLTK_DIR_SEARCH "${FLTK_DIR_SEARCH}")
#
# Look for an installation or build tree.
@ -105,8 +101,6 @@ IF(NOT FLTK_DIR)
# Look in standard UNIX install locations.
/usr/local/lib/fltk
/usr/lib/fltk
/usr/local/include
/usr/include
/usr/local/fltk
/usr/X11R6/include

@ -59,18 +59,14 @@ SET(FLTK2_DIR_STRING "directory containing FLTK2Config.cmake. This is either th
# Search only if the location is not already known.
IF(NOT FLTK2_DIR)
# Get the system search path as a list.
IF(UNIX)
STRING(REGEX MATCHALL "[^:]+" FLTK2_DIR_SEARCH1 "$ENV{PATH}")
ELSE(UNIX)
STRING(REGEX REPLACE "\\\\" "/" FLTK2_DIR_SEARCH1 "$ENV{PATH}")
ENDIF(UNIX)
STRING(REGEX REPLACE "/;" ";" FLTK2_DIR_SEARCH2 ${FLTK2_DIR_SEARCH1})
FILE(TO_CMAKE_PATH "$ENV{PATH}" FLTK2_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
SET(FLTK2_DIR_SEARCH "")
FOREACH(dir ${FLTK2_DIR_SEARCH2})
SET(FLTK2_DIR_SEARCH ${FLTK2_DIR_SEARCH} "${dir}/../lib/fltk")
ENDFOREACH(dir)
STRING(REPLACE "//" "/" FLTK2_DIR_SEARCH "${FLTK2_DIR_SEARCH}")
#
# Look for an installation or build tree.
@ -85,8 +81,6 @@ IF(NOT FLTK2_DIR)
# Look in standard UNIX install locations.
/usr/local/lib/fltk2
/usr/lib/fltk2
/usr/local/include
/usr/include
/usr/local/fltk2
/usr/X11R6/include
@ -193,8 +187,6 @@ IF(FLTK2_DIR)
ENDIF(FLTK2_FLUID_EXECUTABLE)
SET(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH}
/usr/local/include
/usr/include
/usr/local/fltk2
/usr/X11R6/include
)
@ -202,8 +194,6 @@ IF(FLTK2_DIR)
FIND_PATH(FLTK2_INCLUDE_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH})
SET(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH}
/usr/lib
/usr/local/lib
/usr/local/fltk2/lib
/usr/X11R6/lib
${FLTK2_INCLUDE_DIR}/lib

@ -0,0 +1,69 @@
# - Find LibLZMA
# Find LibLZMA headers and library
#
# LIBLZMA_FOUND - True if liblzma is found.
# LIBLZMA_INCLUDE_DIRS - Directory where liblzma headers are located.
# LIBLZMA_LIBRARIES - Lzma libraries to link against.
# LIBLZMA_HAS_AUTO_DECODER - True if lzma_auto_decoder() is found (required).
# LIBLZMA_HAS_EASY_ENCODER - True if lzma_easy_encoder() is found (required).
# LIBLZMA_HAS_LZMA_PRESET - True if lzma_lzma_preset() is found (required).
# LIBLZMA_VERSION_MAJOR - The major version of lzma
# LIBLZMA_VERSION_MINOR - The minor version of lzma
# LIBLZMA_VERSION_PATCH - The patch version of lzma
# LIBLZMA_VERSION_STRING - version number as a string (ex: "5.0.3")
#=============================================================================
# Copyright 2008 Per Øyvind Karlsen <peroyvind@mandriva.org>
# Copyright 2009 Alexander Neundorf <neundorf@kde.org>
# Copyright 2009 Helio Chissini de Castro <helio@kde.org>
# Copyright 2012 Mario Bensi <mbensi@ipsquad.net>
#
# 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.)
FIND_PATH(LIBLZMA_INCLUDE_DIR lzma.h )
FIND_LIBRARY(LIBLZMA_LIBRARY lzma)
IF(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
FILE(READ "${LIBLZMA_INCLUDE_DIR}/lzma/version.h" LIBLZMA_HEADER_CONTENTS)
STRING(REGEX REPLACE ".*#define LZMA_VERSION_MAJOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MAJOR "${LIBLZMA_HEADER_CONTENTS}")
STRING(REGEX REPLACE ".*#define LZMA_VERSION_MINOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MINOR "${LIBLZMA_HEADER_CONTENTS}")
STRING(REGEX REPLACE ".*#define LZMA_VERSION_PATCH ([0-9]+).*" "\\1" LIBLZMA_VERSION_PATCH "${LIBLZMA_HEADER_CONTENTS}")
SET(LIBLZMA_VERSION_STRING "${LIBLZMA_VERSION_MAJOR}.${LIBLZMA_VERSION_MINOR}.${LIBLZMA_VERSION_PATCH}")
ENDIF(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
# We're using new code known now as XZ, even library still been called LZMA
# it can be found in http://tukaani.org/xz/
# Avoid using old codebase
IF (LIBLZMA_LIBRARY)
INCLUDE(CheckLibraryExists)
CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_auto_decoder "" LIBLZMA_HAS_AUTO_DECODER)
CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_easy_encoder "" LIBLZMA_HAS_EASY_ENCODER)
CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_lzma_preset "" LIBLZMA_HAS_LZMA_PRESET)
ENDIF (LIBLZMA_LIBRARY)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibLZMA REQUIRED_VARS LIBLZMA_INCLUDE_DIR
LIBLZMA_LIBRARY
LIBLZMA_HAS_AUTO_DECODER
LIBLZMA_HAS_EASY_ENCODER
LIBLZMA_HAS_LZMA_PRESET
VERSION_VAR LIBLZMA_VERSION_STRING
)
IF (LIBLZMA_FOUND)
SET(LIBLZMA_LIBRARIES ${LIBLZMA_LIBRARY})
SET(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIR})
ENDIF (LIBLZMA_FOUND)
MARK_AS_ADVANCED( LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY )

@ -31,8 +31,6 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
@ -47,8 +45,6 @@ FIND_LIBRARY(LUA_LIBRARY_lua
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
@ -67,8 +63,6 @@ ELSE(${LUA_LIBRARY_lua} MATCHES "framework")
$ENV{LUA_DIR}
PATH_SUFFIXES lib64 lib
PATHS
/usr/local
/usr
/sw
/opt/local
/opt/csw

@ -32,8 +32,6 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
@ -48,8 +46,6 @@ FIND_LIBRARY(LUA_LIBRARY
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw

@ -68,8 +68,6 @@ FIND_PATH(OPENAL_INCLUDE_DIR al.h
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
@ -85,8 +83,6 @@ FIND_LIBRARY(OPENAL_LIBRARY
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw

@ -30,8 +30,6 @@ FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
@ -46,8 +44,6 @@ FIND_LIBRARY(PHYSFS_LIBRARY
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw

@ -13,11 +13,10 @@
# When the 'QUIET' argument is set, no status messages will be printed.
#
# It sets the following variables:
# PKG_CONFIG_FOUND ... true if pkg-config works on the system
# PKG_CONFIG_FOUND ... if pkg-config executable was found
# PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program
# PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found
# (since CMake 2.8.8)
# PKG_CONFIG_FOUND ... if pkg-config executable was found
#
# For the following variables two sets of values exist; first one is the
# common one and has the given PREFIX. The second set contains flags
@ -104,6 +103,11 @@ find_package_handle_standard_args(PkgConfig
REQUIRED_VARS PKG_CONFIG_EXECUTABLE
VERSION_VAR PKG_CONFIG_VERSION_STRING)
# This is needed because the module name is "PkgConfig" but the name of
# this variable has always been PKG_CONFIG_FOUND so this isn't automatically
# handled by FPHSA.
set(PKG_CONFIG_FOUND "${PKGCONFIG_FOUND}")
# Unsets the given variables
macro(_pkgconfig_unset var)
set(${var} "" CACHE INTERNAL "")

@ -51,8 +51,6 @@ FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
@ -69,8 +67,6 @@ FIND_LIBRARY(PRODUCER_LIBRARY
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
/usr/local
/usr
/sw
/opt/local
/opt/csw

@ -13,6 +13,11 @@
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
# version numbers that should be taken into account when searching for Python.
# You need to set this variable before calling find_package(PythonLibs).
#
# If you'd like to specify the installation of Python to use, you should modify
# the following cache variables:
# PYTHON_LIBRARY - path to the python library
# PYTHON_INCLUDE_DIR - path to where Python.h is found
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@ -40,13 +45,19 @@ IF(PythonLibs_FIND_VERSION)
STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
STRING(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
UNSET(_PYTHON_FIND_OTHER_VERSIONS)
IF(NOT PythonLibs_FIND_VERSION_EXACT)
IF(PythonLibs_FIND_VERSION_EXACT)
IF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}")
ELSE(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}")
ENDIF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
ELSE(PythonLibs_FIND_VERSION_EXACT)
FOREACH(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
IF(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
LIST(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
ENDIF()
ENDFOREACH()
ENDIF(NOT PythonLibs_FIND_VERSION_EXACT)
ENDIF(PythonLibs_FIND_VERSION_EXACT)
UNSET(_PYTHON_FIND_MAJ_MIN)
UNSET(_PYTHON_FIND_MAJ)
ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
@ -82,7 +93,12 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
ENDIF(WIN32)
FIND_LIBRARY(PYTHON_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
NAMES
python${_CURRENT_VERSION_NO_DOTS}
python${_CURRENT_VERSION}mu
python${_CURRENT_VERSION}m
python${_CURRENT_VERSION}u
python${_CURRENT_VERSION}
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
@ -120,12 +136,14 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
PATH_SUFFIXES
python${_CURRENT_VERSION}mu
python${_CURRENT_VERSION}m
python${_CURRENT_VERSION}u
python${_CURRENT_VERSION}
)
# For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
"Path to where Python.h is found (deprecated)")
# For backward compatibility, set PYTHON_INCLUDE_PATH.
SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
IF(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
FILE(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str

@ -102,15 +102,28 @@
# accompanying header file foo.h.
# If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro.
#
# You should have a look on the AUTOMOC property for targets to achieve the same results.
#
# macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
# create a the interface header and implementation files with the
# Create a the interface header and implementation files with the
# given basename from the given interface xml file and add it to
# the list of sources
# the list of sources.
#
# You can pass additional parameters to the qdbusxml2cpp call by setting
# properties on the input file:
#
# INCLUDE the given file will be included in the generate interface header
#
# CLASSNAME the generated class is named accordingly
#
# NO_NAMESPACE the generated class is not wrapped in a namespace
#
# macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
# create the interface header and implementation files
# for all listed interface xml files
# the name will be automatically determined from the name of the xml file
# Create the interface header and implementation files
# for all listed interface xml files.
# The basename will be automatically determined from the name of the xml file.
#
# The source file properties described for QT4_ADD_DBUS_INTERFACE also apply here.
#
# macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
# create a dbus adaptor (header and implementation file) from the xml file
@ -1059,7 +1072,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
SET( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff )
SET( QT_INPUTMETHODS_PLUGINS qimsw_multi )
SET( QT_MOUSEDRIVERS_PLUGINS qwstslibmousehandler )
IF(APPLE)
SET( QT_PHONON_BACKEND_PLUGINS phonon_qt7 )
ELSEIF(WIN32)
SET( QT_PHONON_BACKEND_PLUGINS phonon_ds9 )
ENDIF()
SET( QT_SCRIPT_PLUGINS qtscriptdbus )
SET( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds )
@ -1169,10 +1186,22 @@ ELSE( Qt4_FIND_COMPONENTS )
ENDIF( Qt4_FIND_COMPONENTS )
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
if (QT_VERSION_MAJOR GREATER 4)
SET(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}")
SET(QT4_FOUND FALSE)
IF(Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "${VERSION_MSG}, this code requires Qt 4.x")
ELSE(Qt4_FIND_REQUIRED)
IF(NOT Qt4_FIND_QUIETLY)
MESSAGE( STATUS "${VERSION_MSG}")
ENDIF(NOT Qt4_FIND_QUIETLY)
ENDIF(Qt4_FIND_REQUIRED)
else()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
VERSION_VAR QTVERSION
)
endif()
#######################################
#

@ -39,8 +39,6 @@ FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/usr/local/include
/usr/include
/sw/include/SDL # Fink
/sw/include
/opt/local/include/SDL # DarwinPorts
@ -60,8 +58,6 @@ FIND_LIBRARY(SDLIMAGE_LIBRARY
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw

@ -39,8 +39,6 @@ FIND_PATH(SDLMIXER_INCLUDE_DIR SDL_mixer.h
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/usr/local/include
/usr/include
/sw/include/SDL # Fink
/sw/include
/opt/local/include/SDL # DarwinPorts
@ -60,8 +58,6 @@ FIND_LIBRARY(SDLMIXER_LIBRARY
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw

@ -39,8 +39,6 @@ FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/usr/local/include
/usr/include
/sw/include/SDL # Fink
/sw/include
/opt/local/include/SDL # DarwinPorts
@ -59,8 +57,6 @@ FIND_LIBRARY(SDLNET_LIBRARY
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw

@ -86,8 +86,6 @@ FIND_PATH(SDL_SOUND_INCLUDE_DIR SDL_sound.h
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/usr/local/include
/usr/include
/sw/include/SDL # Fink
/sw/include
/opt/local/include/SDL # DarwinPorts
@ -106,8 +104,6 @@ FIND_LIBRARY(SDL_SOUND_LIBRARY
$ENV{SDLDIR}/lib
$ENV{SDLDIR}
PATHS
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
@ -222,8 +218,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
$ENV{SDLSOUNDDIR}
$ENV{SDLDIR}/lib
$ENV{SDLDIR}
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
@ -245,8 +239,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
$ENV{SDLSOUNDDIR}
$ENV{SDLDIR}/lib
$ENV{SDLDIR}
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
@ -271,8 +263,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
$ENV{SDLSOUNDDIR}
$ENV{SDLDIR}/lib
$ENV{SDLDIR}
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
@ -293,8 +283,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
$ENV{SDLSOUNDDIR}
$ENV{SDLDIR}/lib
$ENV{SDLDIR}
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
@ -317,8 +305,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
$ENV{SDLSOUNDDIR}
$ENV{SDLDIR}/lib
$ENV{SDLDIR}
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
@ -341,8 +327,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
$ENV{SDLSOUNDDIR}
$ENV{SDLDIR}/lib
$ENV{SDLDIR}
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
@ -368,8 +352,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
$ENV{SDLSOUNDDIR}
$ENV{SDLDIR}/lib
$ENV{SDLDIR}
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
@ -395,8 +377,6 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
$ENV{SDLSOUNDDIR}
$ENV{SDLDIR}/lib
$ENV{SDLDIR}
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib

@ -39,8 +39,6 @@ FIND_PATH(SDLTTF_INCLUDE_DIR SDL_ttf.h
/usr/local/include/SDL11 # FreeBSD ports
/usr/include/SDL12
/usr/include/SDL11
/usr/local/include
/usr/include
/sw/include/SDL # Fink
/sw/include
/opt/local/include/SDL # DarwinPorts
@ -59,8 +57,6 @@ FIND_LIBRARY(SDLTTF_LIBRARY
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw

@ -43,18 +43,14 @@ SET(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
# Search only if the location is not already known.
IF(NOT SQUISH_INSTALL_DIR)
# Get the system search path as a list.
IF(UNIX)
STRING(REGEX MATCHALL "[^:]+" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}")
ELSE(UNIX)
STRING(REGEX REPLACE "\\\\" "/" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}")
ENDIF(UNIX)
STRING(REGEX REPLACE "/;" ";" SQUISH_INSTALL_DIR_SEARCH2 ${SQUISH_INSTALL_DIR_SEARCH1})
FILE(TO_CMAKE_PATH "$ENV{PATH}" SQUISH_INSTALL_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
SET(SQUISH_INSTALL_DIR_SEARCH "")
FOREACH(dir ${SQUISH_INSTALL_DIR_SEARCH2})
SET(SQUISH_INSTALL_DIR_SEARCH ${SQUISH_INSTALL_DIR_SEARCH} "${dir}/../lib/fltk")
ENDFOREACH(dir)
STRING(REPLACE "//" "/" SQUISH_INSTALL_DIR_SEARCH "${SQUISH_INSTALL_DIR_SEARCH}")
# Look for an installation
FIND_PATH(SQUISH_INSTALL_DIR bin/squishrunner

@ -82,8 +82,6 @@ SET(TCLTK_POSSIBLE_LIB_PATHS
"${TK_LIBRARY_PATH}"
"${TCL_TCLSH_PATH_PARENT}/lib"
"${TK_WISH_PATH_PARENT}/lib"
/usr/lib
/usr/local/lib
)
IF(WIN32)
@ -162,8 +160,6 @@ SET(TCLTK_POSSIBLE_INCLUDE_PATHS
${TK_FRAMEWORK_INCLUDES}
"${TCL_TCLSH_PATH_PARENT}/include"
"${TK_WISH_PATH_PARENT}/include"
/usr/include
/usr/local/include
/usr/include/tcl${TK_LIBRARY_VERSION}
/usr/include/tcl${TCL_LIBRARY_VERSION}
/usr/include/tcl8.6

@ -66,8 +66,6 @@ SET(TCLTK_POSSIBLE_LIB_PATHS
"${TK_LIBRARY_PATH}"
"${TCL_TCLSH_PATH_PARENT}/lib"
"${TK_WISH_PATH_PARENT}/lib"
/usr/lib
/usr/local/lib
)
IF(WIN32)

@ -167,9 +167,9 @@ SET(wxWidgets_CXX_FLAGS "")
# http://www.cmake.org/pipermail/cmake/2008-April/021115.html
# http://www.cmake.org/pipermail/cmake/2008-April/021146.html
#
IF(APPLE)
IF(APPLE OR CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
ENDIF(APPLE)
ENDIF()
# DEPRECATED: This is a patch to support the DEPRECATED use of
# wxWidgets_USE_LIBS.

@ -139,7 +139,7 @@ IF(WIN32_STYLE_FIND)
## find libs for combination of static/shared with release/debug
## be careful if you add something here,
## avoid mixing of headers and libs of different wx versions,
## there may be multiple WX version s installed.
## there may be multiple WX versions installed.
SET (WXWINDOWS_POSSIBLE_LIB_PATHS
"${WXWINDOWS_ROOT_DIR}/lib"
)

@ -637,6 +637,7 @@ Section "-Core installation"
;Use the entire tree produced by the INSTALL target. Keep the
;list of directories here in sync with the RMDir commands below.
SetOutPath "$INSTDIR"
@CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@
@CPACK_NSIS_FULL_INSTALL@
;Store installation folder
@ -899,6 +900,28 @@ SectionEnd
; "Program Files" for AllUsers, "My Documents" for JustMe...
Function .onInit
StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "UninstallString"
StrCmp $0 "" inst
MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \
"@CPACK_NSIS_PACKAGE_NAME@ is already installed. $\n$\nDo you want to uninstall the old version before installing the new one?" \
IDYES uninst IDNO inst
Abort
;Run the uninstaller
uninst:
ClearErrors
ExecWait '$0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
IfErrors uninst_failed inst
uninst_failed:
MessageBox MB_OK|MB_ICONSTOP "Uninstall failed."
Abort
inst:
; Reads components status for registry
!insertmacro SectionList "InitSection"

@ -1,6 +1,8 @@
SET(BEOS 1)
SET(CMAKE_DL_LIBS root be)
SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")

@ -85,11 +85,15 @@ set(CMAKE_DL_LIBS "dl")
macro(__BlueGeneP_set_dynamic_flags compiler_id lang)
if (${compiler_id} STREQUAL XL)
# Flags for XL compilers if we explicitly detected XL
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-qpie")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-qpic")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-qmkshrobj -qnostaticlink")
set(BGP_${lang}_DYNAMIC_EXE_FLAGS "-qnostaticlink -qnostaticlink=libgcc")
else()
# Assume flags for GNU compilers (if the ID is GNU *or* anything else).
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
set(BGP_${lang}_DYNAMIC_EXE_FLAGS "-dynamic")

@ -35,7 +35,10 @@ macro(__cygwin_compiler_gnu lang)
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") # No -fPIC on cygwin
# No -fPIC on cygwin
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "")
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links

@ -84,11 +84,11 @@ ENDIF(XCODE)
SET(CMAKE_MacOSX_Content_COMPILE_OBJECT "\"${CMAKE_COMMAND}\" -E copy_if_different <SOURCE> <OBJECT>")
SET(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_MODULE
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
@ -106,7 +106,9 @@ SET(CMAKE_Fortran_CREATE_SHARED_MODULE
# default to searching for frameworks first
SET(CMAKE_FIND_FRAMEWORK FIRST)
IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)
SET(CMAKE_FIND_FRAMEWORK FIRST)
ENDIF()
# set up the default search directories for frameworks
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
@ -115,7 +117,9 @@ SET(CMAKE_SYSTEM_FRAMEWORK_PATH
/System/Library/Frameworks)
# default to searching for application bundles first
SET(CMAKE_FIND_APPBUNDLE FIRST)
IF(NOT DEFINED CMAKE_FIND_APPBUNDLE)
SET(CMAKE_FIND_APPBUNDLE FIRST)
ENDIF()
# set up the default search directories for application bundles
SET(CMAKE_SYSTEM_APPBUNDLE_PATH
~/Applications
@ -125,4 +129,3 @@ SET(CMAKE_SYSTEM_APPBUNDLE_PATH
INCLUDE(Platform/UnixPaths)
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /sw/include)
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /sw/lib)

@ -207,11 +207,11 @@ ENDIF()
SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
SET(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_SHARED_MODULE
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
@ -223,14 +223,15 @@ SET(CMAKE_Fortran_CREATE_SHARED_MODULE
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_C_CREATE_MACOSX_FRAMEWORK
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
SET(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> -install_name <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
# default to searching for frameworks first
SET(CMAKE_FIND_FRAMEWORK FIRST)
IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)
SET(CMAKE_FIND_FRAMEWORK FIRST)
ENDIF()
# set up the default search directories for frameworks
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
@ -239,7 +240,9 @@ SET(CMAKE_SYSTEM_FRAMEWORK_PATH
/System/Library/Frameworks)
# default to searching for application bundles first
SET(CMAKE_FIND_APPBUNDLE FIRST)
IF(NOT DEFINED CMAKE_FIND_APPBUNDLE)
SET(CMAKE_FIND_APPBUNDLE FIRST)
ENDIF()
# set up the default search directories for application bundles
SET(_apps_paths)
FOREACH(_path

@ -1,5 +1,7 @@
IF(EXISTS /usr/include/dlfcn.h)
SET(CMAKE_DL_LIBS "")
SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib

@ -19,6 +19,7 @@ endif()
set(__HPUX_COMPILER_HP 1)
macro(__hpux_compiler_hp lang)
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "+Z")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "+Z")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-Wl,-E,+nodefaultrpath -b -L/usr/lib")
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath")

@ -1,6 +1,8 @@
SET(BEOS 1)
SET(CMAKE_DL_LIBS root be)
SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")

@ -31,6 +31,8 @@ if(NOT XIAR)
endif(NOT XIAR)
macro(__linux_compiler_intel lang)
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")

@ -20,6 +20,8 @@ set(__LINUX_COMPILER_PGI 1)
macro(__linux_compiler_pgi lang)
# Shared library compile and link flags.
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
endmacro()

@ -20,6 +20,8 @@ set(__LINUX_COMPILER_PATHSCALE 1)
macro(__linux_compiler_pathscale lang)
# Shared library compile and link flags.
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
endmacro()

@ -1,6 +1,10 @@
IF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
SET(CMAKE_C_COMPILE_OPTIONS_PIE -K PIE)
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
ELSE(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
SET(CMAKE_C_COMPILE_OPTIONS_PIE -K PIE)
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport")
ENDIF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")

@ -1,5 +1,7 @@
IF(EXISTS /usr/include/dlfcn.h)
SET(CMAKE_DL_LIBS "")
SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib

@ -4,6 +4,8 @@ IF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
IF(CMAKE_SYSTEM MATCHES "OSF1-1.*")
# OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fpic")
SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fpie")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fpic") # -pic
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fpic") # -pic
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.*")

@ -1,2 +1,4 @@
SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
SET(CMAKE_C_COMPILE_OPTIONS_PIE "")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
INCLUDE(Platform/UnixPaths)

@ -1,4 +1,6 @@
IF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
SET(CMAKE_C_COMPILE_OPTIONS_PIC "-PIC")
SET(CMAKE_C_COMPILE_OPTIONS_PIE "-PIE")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R")
@ -8,7 +10,7 @@ ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
IF(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ELSE(CMAKE_COMPILER_IS_GNUCC)
# Take default rule from CMakeDefaultMakeRuleVariables.cmake.
ENDIF(CMAKE_COMPILER_IS_GNUCC)

@ -1,3 +1,5 @@
SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
SET(CMAKE_C_COMPILE_OPTIONS_PIE "")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport")
INCLUDE(Platform/UnixPaths)

@ -1,3 +1,5 @@
SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
SET(CMAKE_C_COMPILE_OPTIONS_PIE "")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-Wl,-Bexport")
INCLUDE(Platform/UnixPaths)

@ -76,7 +76,8 @@ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_R
macro(__embarcadero_language lang)
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "${_tD}")
set(CMAKE_${lang}_COMPILE_OPTIONS_DLL "${_tD}") # Note: This variable is a ';' separated list
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "${_tD}") # ... while this is a space separated string.
# compile a source file into an object file
# place <DEFINES> outside the response file because Borland refuses

@ -77,7 +77,11 @@ macro(__windows_compiler_gnu lang)
endforeach(type)
endif()
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") # No -fPIC on Windows
# No -fPIC on Windows
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "")
set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "")
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE})
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1)

@ -1,4 +1,4 @@
include(Platform/Windows-Intel)
set(_COMPILE_CXX " /TP")
set(_FLAGS_CXX " /GX /GR")
set(_FLAGS_CXX " /EHsc /GR")
__windows_compiler_intel(CXX)

@ -92,7 +92,7 @@ macro(__windows_compiler_intel lang)
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
set(CMAKE_${lang}_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000${_FLAGS_${lang}}")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Od /GZ")
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Od /RTC1")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/DNDEBUG /MD /O1")
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/DNDEBUG /MD /O2")
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/DNDEBUG /MD /Zi /O2")

@ -20,7 +20,8 @@ SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT "debug all" )
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" )
SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" )
set (CMAKE_SHARED_LIBRARY_C_FLAGS "-bd" )
set(CMAKE_C_COMPILE_OPTIONS_DLL "-bd") # Note: This variable is a ';' separated list
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-bd") # ... while this is a space separated string.
SET(CMAKE_RC_COMPILER "rc" )

@ -10,6 +10,8 @@
SET(CMAKE_DL_LIBS "dl")
SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib

@ -182,11 +182,13 @@ MACRO (QT4_ADD_RESOURCES outfiles )
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
SET(_RC_DEPENDS)
IF(EXISTS "${infile}")
# parse file for dependencies
# all files are absolute paths or relative to the location of the qrc file
FILE(READ "${infile}" _RC_FILE_CONTENTS)
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
SET(_RC_DEPENDS)
FOREACH(_RC_FILE ${_RC_FILES})
STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
IF(NOT IS_ABSOLUTE "${_RC_FILE}")
@ -199,6 +201,12 @@ MACRO (QT4_ADD_RESOURCES outfiles )
# again when dependencies need to be recomputed.
QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends)
CONFIGURE_FILE("${infile}" "${out_depends}" COPY_ONLY)
ELSE(EXISTS "${infile}")
# The .qrc file does not exist (yet). Let's add a dependency and hope
# that it will be generated later
SET(out_depends)
ENDIF(EXISTS "${infile}")
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_RCC_EXECUTABLE}
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
@ -212,9 +220,9 @@ ENDMACRO (QT4_ADD_RESOURCES)
MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE)
SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
SET(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h")
SET(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp")
SET(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE)
IF(_nonamespace)
@ -233,16 +241,16 @@ MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
SET(_params ${_params} -i ${_include})
ENDIF(_include)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
DEPENDS ${_infile} VERBATIM)
SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
SET_SOURCE_FILES_PROPERTIES("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE)
QT4_GENERATE_MOC(${_header} ${_moc})
QT4_GENERATE_MOC("${_header}" "${_moc}")
SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
LIST(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")
MACRO_ADD_FILE_DEPENDENCIES("${_impl}" "${_moc}")
ENDMACRO(QT4_ADD_DBUS_INTERFACE)
@ -250,9 +258,10 @@ ENDMACRO(QT4_ADD_DBUS_INTERFACE)
MACRO(QT4_ADD_DBUS_INTERFACES _sources)
FOREACH (_current_FILE ${ARGN})
GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME)
# get the part before the ".xml" suffix
STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE})
STRING(TOLOWER ${_basename} _basename)
STRING(REGEX REPLACE "(.*\\.)?([^\\.]+)\\.xml" "\\2" _basename ${_basename})
QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
ENDFOREACH (_current_FILE)
ENDMACRO(QT4_ADD_DBUS_INTERFACES)
@ -297,27 +306,27 @@ MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optional
ENDIF (_optionalBasename)
SET(_optionalClassName "${ARGV5}")
SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
SET(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h")
SET(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp")
SET(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
IF(_optionalClassName)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
DEPENDS ${_infile} VERBATIM
)
ELSE(_optionalClassName)
ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
DEPENDS ${_infile} VERBATIM
)
ENDIF(_optionalClassName)
QT4_GENERATE_MOC(${_header} ${_moc})
SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
QT4_GENERATE_MOC("${_header}" "${_moc}")
SET_SOURCE_FILES_PROPERTIES("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE)
MACRO_ADD_FILE_DEPENDENCIES("${_impl}" "${_moc}")
SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
LIST(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")
ENDMACRO(QT4_ADD_DBUS_ADAPTOR)

@ -130,7 +130,7 @@
# Example:
# create_javadoc(my_example_doc
# PACKAGES com.exmaple.foo com.example.bar
# SOURCEPATH ${CMAKE_CURRENT_SOURCE_PATH}
# SOURCEPATH "${CMAKE_CURRENT_SOURCE_DIR}"
# CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
# WINDOWTITLE "My example"
# DOCTITLE "<h1>My example</h1>"
@ -533,9 +533,9 @@ function (find_jar VARIABLE)
endif (${_state} STREQUAL "name")
endforeach (arg ${ARGN})
if (${_jar_names} STREQUAL "")
if (NOT _jar_names)
message(FATAL_ERROR "find_jar: No name to search for given")
endif (${_jar_names} STREQUAL "")
endif (NOT _jar_names)
foreach (jar_name ${_jar_names})
foreach (version ${_jar_versions})

@ -337,6 +337,8 @@ IF (WIN32)
cmGlobalVisualStudio11Generator.cxx
cmGlobalVisualStudio11Win64Generator.h
cmGlobalVisualStudio11Win64Generator.cxx
cmGlobalVisualStudio11ARMGenerator.h
cmGlobalVisualStudio11ARMGenerator.cxx
cmGlobalVisualStudioGenerator.cxx
cmGlobalVisualStudioGenerator.h
cmGlobalWatcomWMakeGenerator.cxx
@ -355,18 +357,18 @@ IF (WIN32)
ENDIF(NOT UNIX)
ENDIF (WIN32)
# turn on Ninja by default
# Turn on Ninja by default, but disable it
# on platforms where it does not pass all tests.
# Enforce Ninja support by setting CMAKE_USE_NINJA
set(_CMAKE_DEFAULT_NINJA_VALUE TRUE)
# turn it off for platforms where it does not pass all the
# tests
if(WIN32 OR APPLE)
if(APPLE)
SET(_CMAKE_DEFAULT_NINJA_VALUE FALSE)
endif()
SET(CMAKE_ENABLE_NINJA ${_CMAKE_DEFAULT_NINJA_VALUE} CACHE BOOL
"Enable the ninja generator for CMake. currently not fully working for Windows or OSX")
"Enable the ninja generator for CMake. When enabled, some CMake tests still fail on OSX")
MARK_AS_ADVANCED(CMAKE_ENABLE_NINJA)
IF(CMAKE_ENABLE_NINJA)
MESSAGE(STATUS "Enable ninja generator.")
MESSAGE(STATUS "Ninja generator enabled.")
SET(SRCS ${SRCS}
cmGlobalNinjaGenerator.cxx
cmGlobalNinjaGenerator.h
@ -381,8 +383,13 @@ IF(CMAKE_ENABLE_NINJA)
cmNinjaUtilityTargetGenerator.h
)
ADD_DEFINITIONS(-DCMAKE_USE_NINJA)
IF(WIN32 AND NOT CYGWIN AND NOT BORLAND)
SET_SOURCE_FILES_PROPERTIES(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501)
ADD_EXECUTABLE(cmcldeps cmcldeps.cxx)
INSTALL_TARGETS(/bin cmcldeps)
ENDIF()
ELSE()
MESSAGE(STATUS "Disable ninja generator.")
MESSAGE(STATUS "Ninja generator disabled, enable it with -DCMAKE_ENABLE_NINJA=ON")
ENDIF()
# create a library used by the command line and the GUI
@ -423,6 +430,9 @@ SET(CTEST_SRCS cmCTest.cxx
CTest/cmCTestConfigureHandler.cxx
CTest/cmCTestCoverageCommand.cxx
CTest/cmCTestCoverageHandler.cxx
CTest/cmParseMumpsCoverage.cxx
CTest/cmParseCacheCoverage.cxx
CTest/cmParseGTMCoverage.cxx
CTest/cmParsePHPCoverage.cxx
CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
CTest/cmCTestGenericHandler.cxx

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Update the version component if it looks like a date or -f is given.
if test "x$1" = "x-f"; then shift ; n='*' ; else n='\{8\}' ; fi
if test "$#" -gt 0; then echo 1>&2 "usage: CMakeVersion.bash [-f]"; exit 1; fi
sed -i -e '
s/\(^SET(CMake_VERSION_TWEAK\) [0-9]'"$n"'\(.*\)/\1 '"$(date +%Y%m%d)"'\2/
' "${BASH_SOURCE%/*}/CMakeVersion.cmake"

@ -0,0 +1,6 @@
# CMake version number components.
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 8)
SET(CMake_VERSION_PATCH 9)
SET(CMake_VERSION_TWEAK 0)
SET(CMake_VERSION_RC 1)

@ -480,7 +480,12 @@ int cmCPackDebGenerator::createDeb()
// Do not end the md5sum file with yet another (invalid)
}
cmd = "\"";
cmd = "";
if (NULL != this->GetOption("CPACK_DEBIAN_FAKEROOT_EXECUTABLE"))
{
cmd = this->GetOption("CPACK_DEBIAN_FAKEROOT_EXECUTABLE");
}
cmd += " \"";
cmd += cmakeExecutable;
cmd += "\" -E tar cfz control.tar.gz ./control ./md5sums";
const char* controlExtra =

@ -31,6 +31,17 @@ public:
cmCPackDebGenerator();
virtual ~cmCPackDebGenerator();
static bool CanGenerate()
{
#ifdef __APPLE__
// on MacOS enable CPackDeb iff dpkg is found
return cmSystemTools::FindProgram("dpkg") != "" ? true : false;
#else
// legacy behavior on other systems
return true;
#endif
}
protected:
virtual int InitializeInternal();
/**

@ -77,4 +77,35 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm)
"which is done right before packaging the files."
" The script is not called by e.g.: make install.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_ABSOLUTE_DESTINATION_FILES", cmProperty::VARIABLE,
"List of files which have been installed using "
" an ABSOLUTE DESTINATION path.",
"This variable is a Read-Only variable which is set internally"
" by CPack during installation and before packaging using"
" CMAKE_ABSOLUTE_DESTINATION_FILES defined in cmake_install.cmake "
"scripts. The value can be used within CPack project configuration"
" file and/or CPack<GEN>.cmake file of <GEN> generator.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
"Ask CPack to warn each time a file with absolute INSTALL"
" DESTINATION is encountered.",
"This variable triggers the definition of "
"CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs"
" cmake_install.cmake scripts.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
"Ask CPack to error out as soon as a file with absolute INSTALL"
" DESTINATION is encountered.",
"The fatal error is emitted before the installation of "
"the offending file takes place. Some CPack generators, like NSIS,"
"enforce this internally. "
"This variable triggers the definition of"
"CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs"
"Variables common to all CPack generators");
}

@ -66,6 +66,27 @@ int cmCPackGenerator::PrepareNames()
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"Create temp directory." << std::endl);
// checks CPACK_SET_DESTDIR support
if (IsOn("CPACK_SET_DESTDIR"))
{
if (SETDESTDIR_UNSUPPORTED==SupportsSetDestdir())
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"CPACK_SET_DESTDIR is set to ON but the '"
<< Name << "' generator does NOT support it."
<< std::endl);
return 0;
}
else if (SETDESTDIR_SHOULD_NOT_BE_USED==SupportsSetDestdir())
{
cmCPackLogger(cmCPackLog::LOG_WARNING,
"CPACK_SET_DESTDIR is set to ON but it is "
<< "usually a bad idea to do that with '"
<< Name << "' generator. Use at your own risk."
<< std::endl);
}
}
std::string tempDirectory = this->GetOption("CPACK_PACKAGE_DIRECTORY");
tempDirectory += "/_CPack_Packages/";
const char* toplevelTag = this->GetOption("CPACK_TOPLEVEL_TAG");
@ -388,8 +409,11 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
std::string>(targetFile,inFileRelative));
}
/* If it is not a symlink then do a plain copy */
else if ( !cmSystemTools::CopyFileIfDifferent(inFile.c_str(),
filePath.c_str()) )
else if (!(
cmSystemTools::CopyFileIfDifferent(inFile.c_str(),filePath.c_str())
&&
cmSystemTools::CopyFileTime(inFile.c_str(),filePath.c_str())
) )
{
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
<< inFile.c_str() << " -> " << filePath.c_str() << std::endl);
@ -828,8 +852,35 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
filesBefore = glB.GetFiles();
std::sort(filesBefore.begin(),filesBefore.end());
}
// If CPack was asked to warn on ABSOLUTE INSTALL DESTINATION
// then forward request to cmake_install.cmake script
if (this->GetOption("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION"))
{
mf->AddDefinition("CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION",
"1");
}
// If current CPack generator does support
// ABSOLUTE INSTALL DESTINATION or CPack has been asked for
// then ask cmake_install.cmake script to error out
// as soon as it occurs (before installing file)
if (!SupportsAbsoluteDestination() ||
this->GetOption("CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION"))
{
mf->AddDefinition("CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION",
"1");
}
// do installation
int res = mf->ReadListFile(0, installFile.c_str());
// forward definition of CMAKE_ABSOLUTE_DESTINATION_FILES
// to CPack (may be used by generators like CPack RPM or DEB)
// in order to transparently handle ABSOLUTE PATH
if (mf->GetDefinition("CMAKE_ABSOLUTE_DESTINATION_FILES"))
{
mf->AddDefinition("CPACK_ABSOLUTE_DESTINATION_FILES",
mf->GetDefinition("CMAKE_ABSOLUTE_DESTINATION_FILES"));
}
// Now rebuild the list of files after installation
// of the current component (if we are in component install)
if (componentInstall)
@ -953,6 +1004,8 @@ int cmCPackGenerator::DoPackage()
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
"Create package using " << this->Name.c_str() << std::endl);
// Prepare CPack internal name and check
// values for many CPACK_xxx vars
if ( !this->PrepareNames() )
{
return 0;
@ -1430,6 +1483,19 @@ std::string cmCPackGenerator::GetComponentPackageFileName(
return initialPackageFileName + suffix;
}
//----------------------------------------------------------------------
enum cmCPackGenerator::CPackSetDestdirSupport
cmCPackGenerator::SupportsSetDestdir() const
{
return cmCPackGenerator::SETDESTDIR_SUPPORTED;
}
//----------------------------------------------------------------------
bool cmCPackGenerator::SupportsAbsoluteDestination() const
{
return true;
}
//----------------------------------------------------------------------
bool cmCPackGenerator::SupportsComponentInstallation() const
{

@ -62,6 +62,16 @@ public:
{ this->GeneratorVerbose = val ?
cmSystemTools::OUTPUT_MERGE : cmSystemTools::OUTPUT_NONE; }
/**
* Returns true if the generator may work on this system.
* Rational:
* Some CPack generator may run on some host and may not on others
* (with the same system) because some tools are missing. If the tool
* is missing then CPack won't activate (in the CPackGeneratorFactory)
* this particular generator.
*/
static bool CanGenerate() { return true; }
/**
* Do the actual whole package processing.
* Subclass may redefine it but its usually enough
@ -189,6 +199,38 @@ protected:
virtual int InstallProjectViaInstallCMakeProjects(
bool setDestDir, const char* tempInstallDirectory);
/**
* The various level of support of
* CPACK_SET_DESTDIR used by the generator.
*/
enum CPackSetDestdirSupport {
/* the generator works with or without it */
SETDESTDIR_SUPPORTED,
/* the generator works best if automatically handled */
SETDESTDIR_INTERNALLY_SUPPORTED,
/* no official support, use at your own risk */
SETDESTDIR_SHOULD_NOT_BE_USED,
/* officially NOT supported */
SETDESTDIR_UNSUPPORTED
};
/**
* Does the CPack generator support CPACK_SET_DESTDIR?
* The default legacy value is 'SETDESTDIR_SUPPORTED' generator
* have to override it in order change this.
* @return CPackSetDestdirSupport
*/
virtual enum CPackSetDestdirSupport SupportsSetDestdir() const;
/**
* Does the CPack generator support absolute path
* in INSTALL DESTINATION?
* The default legacy value is 'true' generator
* have to override it in order change this.
* @return true if supported false otherwise
*/
virtual bool SupportsAbsoluteDestination() const;
/**
* Does the CPack generator support component installation?.
* Some Generators requires the user to set

@ -31,7 +31,7 @@
# include "cmCPackCygwinSourceGenerator.h"
#endif
#if !defined(_WIN32) && !defined(__APPLE__) \
#if !defined(_WIN32) \
&& !defined(__QNXNTO__) && !defined(__BEOS__)
# include "cmCPackDebGenerator.h"
# include "cmCPackRPMGenerator.h"
@ -40,44 +40,90 @@
#include "cmCPackLog.h"
#if defined(__BORLANDC__)
# pragma warn -8008 /* condition is always true */
#endif
//----------------------------------------------------------------------
cmCPackGeneratorFactory::cmCPackGeneratorFactory()
{
if (cmCPackTGZGenerator::CanGenerate())
{
this->RegisterGenerator("TGZ", "Tar GZip compression",
cmCPackTGZGenerator::CreateGenerator);
}
if (cmCPackSTGZGenerator::CanGenerate())
{
this->RegisterGenerator("STGZ", "Self extracting Tar GZip compression",
cmCPackSTGZGenerator::CreateGenerator);
}
if (cmCPackNSISGenerator::CanGenerate())
{
this->RegisterGenerator("NSIS", "Null Soft Installer",
cmCPackNSISGenerator::CreateGenerator);
}
#ifdef __CYGWIN__
if (cmCPackCygwinBinaryGenerator::CanGenerate())
{
this->RegisterGenerator("CygwinBinary", "Cygwin Binary Installer",
cmCPackCygwinBinaryGenerator::CreateGenerator);
}
if (cmCPackCygwinSourceGenerator::CanGenerate())
{
this->RegisterGenerator("CygwinSource", "Cygwin Source Installer",
cmCPackCygwinSourceGenerator::CreateGenerator);
}
#endif
if (cmCPackZIPGenerator::CanGenerate())
{
this->RegisterGenerator("ZIP", "ZIP file format",
cmCPackZIPGenerator::CreateGenerator);
}
if (cmCPackTarBZip2Generator::CanGenerate())
{
this->RegisterGenerator("TBZ2", "Tar BZip2 compression",
cmCPackTarBZip2Generator::CreateGenerator);
}
if (cmCPackTarCompressGenerator::CanGenerate())
{
this->RegisterGenerator("TZ", "Tar Compress compression",
cmCPackTarCompressGenerator::CreateGenerator);
}
#ifdef __APPLE__
if (cmCPackDragNDropGenerator::CanGenerate())
{
this->RegisterGenerator("DragNDrop", "Mac OSX Drag And Drop",
cmCPackDragNDropGenerator::CreateGenerator);
}
if (cmCPackBundleGenerator::CanGenerate())
{
this->RegisterGenerator("Bundle", "Mac OSX bundle",
cmCPackBundleGenerator::CreateGenerator);
}
if (cmCPackPackageMakerGenerator::CanGenerate())
{
this->RegisterGenerator("PackageMaker", "Mac OSX Package Maker installer",
cmCPackPackageMakerGenerator::CreateGenerator);
}
if (cmCPackOSXX11Generator::CanGenerate())
{
this->RegisterGenerator("OSXX11", "Mac OSX X11 bundle",
cmCPackOSXX11Generator::CreateGenerator);
}
#endif
#if !defined(_WIN32) && !defined(__APPLE__) \
#if !defined(_WIN32) \
&& !defined(__QNXNTO__) && !defined(__BEOS__)
if (cmCPackDebGenerator::CanGenerate())
{
this->RegisterGenerator("DEB", "Debian packages",
cmCPackDebGenerator::CreateGenerator);
}
if (cmCPackRPMGenerator::CanGenerate())
{
this->RegisterGenerator("RPM", "RPM packages",
cmCPackRPMGenerator::CreateGenerator);
}
#endif
}

@ -64,6 +64,7 @@ int cmCPackNSISGenerator::PackageFiles()
<< std::endl);
return false;
}
std::string nsisFileName = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
std::string tmpFile = nsisFileName;
tmpFile += "/NSISOutput.log";
@ -542,8 +543,8 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
{
cmCPackLogger(
cmCPackLog::LOG_ERROR,
"CPACK_PACKAGE_EXECUTABLES should contain pairs of <executable> and "
"<icon name>." << std::endl);
"CPACK_NSIS_MENU_LINKS should contain pairs of <shortcut target> and "
"<shortcut label>." << std::endl);
return;
}
@ -630,6 +631,19 @@ bool cmCPackNSISGenerator::GetListOfSubdirectories(const char* topdir,
return true;
}
//----------------------------------------------------------------------
enum cmCPackGenerator::CPackSetDestdirSupport
cmCPackNSISGenerator::SupportsSetDestdir() const
{
return cmCPackGenerator::SETDESTDIR_SHOULD_NOT_BE_USED;
}
//----------------------------------------------------------------------
bool cmCPackNSISGenerator::SupportsAbsoluteDestination() const
{
return false;
}
//----------------------------------------------------------------------
bool cmCPackNSISGenerator::SupportsComponentInstallation() const
{

@ -44,6 +44,8 @@ protected:
bool GetListOfSubdirectories(const char* dir,
std::vector<std::string>& dirs);
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const;
virtual bool SupportsAbsoluteDestination() const;
virtual bool SupportsComponentInstallation() const;
/// Produce a string that contains the NSIS code to describe a

@ -35,6 +35,17 @@ public:
cmCPackRPMGenerator();
virtual ~cmCPackRPMGenerator();
static bool CanGenerate()
{
#ifdef __APPLE__
// on MacOS enable CPackRPM iff rpmbuild is found
return cmSystemTools::FindProgram("rpmbuild") != "" ? true : false;
#else
// legacy behavior on other systems
return true;
#endif
}
protected:
virtual int InitializeInternal();
virtual int PackageFiles();

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

Loading…
Cancel
Save