summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake1
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake1
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake34
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake8
-rw-r--r--Modules/CPackDeb.cmake18
-rw-r--r--Modules/Compiler/CCur-Fortran.cmake1
-rw-r--r--Modules/ExternalProject.cmake2
-rw-r--r--Modules/FindBISON.cmake155
-rw-r--r--Modules/FindCUDA.cmake32
-rw-r--r--Modules/FindIce.cmake119
-rw-r--r--Modules/FindwxWidgets.cmake3
-rw-r--r--Modules/GNUInstallDirs.cmake130
-rw-r--r--Modules/Platform/Linux-CCur-Fortran.cmake1
-rw-r--r--Modules/Platform/Linux-GNU-Fortran.cmake1
-rw-r--r--Modules/Platform/Windows-Embarcadero.cmake6
-rw-r--r--Modules/Platform/Windows-GNU.cmake2
16 files changed, 396 insertions, 118 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 937aa8c..40d4ce6 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -80,6 +80,7 @@ else()
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification file.
+ set(CMAKE_C_COMPILER_ID_TEST_FLAGS_FIRST)
set(CMAKE_C_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 893c454..a673525 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -78,6 +78,7 @@ else()
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification file.
+ set(CMAKE_CXX_COMPILER_ID_TEST_FLAGS_FIRST)
set(CMAKE_CXX_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 403ac08..68f2194 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -34,12 +34,19 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
# Try building with no extra flags and then try each set
# of helper flags. Stop when the compiler is identified.
- foreach(flags "" ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
- if(NOT CMAKE_${lang}_COMPILER_ID)
- CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
- foreach(file ${COMPILER_${lang}_PRODUCED_FILES})
- CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}")
- endforeach()
+ foreach(flags ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS_FIRST}
+ ""
+ ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
+ CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
+ CMAKE_DETERMINE_COMPILER_ID_MATCH_VENDOR("${lang}" "${COMPILER_${lang}_PRODUCED_OUTPUT}")
+ if(CMAKE_${lang}_COMPILER_ID)
+ break()
+ endif()
+ foreach(file ${COMPILER_${lang}_PRODUCED_FILES})
+ CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}")
+ endforeach()
+ if(CMAKE_${lang}_COMPILER_ID)
+ break()
endif()
endforeach()
@@ -355,6 +362,7 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
# No output files should be inspected.
set(COMPILER_${lang}_PRODUCED_FILES)
+ set(COMPILER_${lang}_PRODUCED_OUTPUT)
else()
# Compilation succeeded.
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
@@ -395,10 +403,24 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
"${src}\" did not produce an executable in \""
"${CMAKE_${lang}_COMPILER_ID_DIR}\".\n\n")
endif()
+
+ set(COMPILER_${lang}_PRODUCED_OUTPUT "${CMAKE_${lang}_COMPILER_ID_OUTPUT}")
endif()
# Return the files produced by the compilation.
set(COMPILER_${lang}_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE)
+ set(COMPILER_${lang}_PRODUCED_OUTPUT "${COMPILER_${lang}_PRODUCED_OUTPUT}" PARENT_SCOPE)
+endfunction()
+
+#-----------------------------------------------------------------------------
+# Function to extract the compiler id from compiler output.
+function(CMAKE_DETERMINE_COMPILER_ID_MATCH_VENDOR lang output)
+ foreach(vendor ${CMAKE_${lang}_COMPILER_ID_MATCH_VENDORS})
+ if(output MATCHES "${CMAKE_${lang}_COMPILER_ID_MATCH_VENDOR_REGEX_${vendor}}")
+ set(CMAKE_${lang}_COMPILER_ID "${vendor}")
+ endif()
+ endforeach()
+ set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
endfunction()
#-----------------------------------------------------------------------------
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 3a27127..52ec25a 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -98,6 +98,10 @@ else()
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification executable.
+ set(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS_FIRST
+ # Get verbose output to help distinguish compilers.
+ "-v"
+ )
set(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
@@ -111,6 +115,10 @@ endif()
if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
set(CMAKE_Fortran_COMPILER_ID_RUN 1)
+ # Table of per-vendor compiler output regular expressions.
+ list(APPEND CMAKE_Fortran_COMPILER_ID_MATCH_VENDORS CCur)
+ set(CMAKE_Fortran_COMPILER_ID_MATCH_VENDOR_REGEX_CCur "Concurrent Fortran [0-9]+ Compiler")
+
# Table of per-vendor compiler id flags with expected output.
list(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS Compaq)
set(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_Compaq "-what")
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 226153c..09cddcd 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -352,10 +352,11 @@ function(cpack_deb_prepare_package_vars)
OUTPUT_VARIABLE _TMP_VERSION
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- string(REGEX MATCH "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)"
- SHLIBDEPS_EXECUTABLE_VERSION
- "${_TMP_VERSION}")
- set(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
+ if(_TMP_VERSION MATCHES "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)")
+ set(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
+ else()
+ set(SHLIBDEPS_EXECUTABLE_VERSION "")
+ endif()
if(CPACK_DEBIAN_PACKAGE_DEBUG)
message("CPackDeb Debug: dpkg-shlibdeps --version output is '${_TMP_VERSION}'")
@@ -398,9 +399,12 @@ function(cpack_deb_prepare_package_vars)
file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
- # only set ignore-missing-info flag for dpkg-shlibdeps that have --version option
- # (those are newer and also have --ignore-missing-info flag)
- if(SHLIBDEPS_EXECUTABLE_VERSION)
+ # Add --ignore-missing-info if the tool supports it
+ execute_process(COMMAND env LC_ALL=C ${SHLIBDEPS_EXECUTABLE} --help
+ OUTPUT_VARIABLE _TMP_HELP
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(_TMP_HELP MATCHES "--ignore-missing-info")
set(IGNORE_MISSING_INFO_FLAG "--ignore-missing-info")
endif()
diff --git a/Modules/Compiler/CCur-Fortran.cmake b/Modules/Compiler/CCur-Fortran.cmake
new file mode 100644
index 0000000..6ec06ae
--- /dev/null
+++ b/Modules/Compiler/CCur-Fortran.cmake
@@ -0,0 +1 @@
+include(Compiler/GNU-Fortran)
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 11a24b8..eee1841 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -529,7 +529,7 @@ if(error_code)
endif()
execute_process(
- COMMAND \"${git_EXECUTABLE}\" submodule init
+ COMMAND \"${git_EXECUTABLE}\" submodule init ${git_submodules}
WORKING_DIRECTORY \"${work_dir}/${src_name}\"
RESULT_VARIABLE error_code
)
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index ec3ee78..7d81276 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -2,60 +2,75 @@
# FindBISON
# ---------
#
-# Find bison executable and provides macros to generate custom build rules
+# Find ``bison`` executable and provide a macro to generate custom build rules.
#
# The module defines the following variables:
#
-# ::
+# ``BISON_EXECUTABLE``
+# path to the ``bison`` program
#
-# BISON_EXECUTABLE - path to the bison program
-# BISON_VERSION - version of bison
-# BISON_FOUND - true if the program was found
+# ``BISON_VERSION``
+# version of ``bison``
#
+# ``BISON_FOUND``
+# true if the program was found
#
+# The minimum required version of ``bison`` can be specified using the
+# standard CMake syntax, e.g. ``find_package(BISON 2.1.3)``.
#
-# The minimum required version of bison can be specified using the
-# standard CMake syntax, e.g. find_package(BISON 2.1.3)
+# If ``bison`` is found, the module defines the macro::
#
-# If bison is found, the module defines the macros:
+# BISON_TARGET(<Name> <YaccInput> <CodeOutput>
+# [COMPILE_FLAGS <flags>]
+# [DEFINES_FILE <file>]
+# [VERBOSE <file>]
+# )
#
-# ::
+# which will create a custom rule to generate a parser. ``<YaccInput>`` is
+# the path to a yacc file. ``<CodeOutput>`` is the name of the source file
+# generated by bison. A header file is also be generated, and contains
+# the token list.
#
-# BISON_TARGET(<Name> <YaccInput> <CodeOutput> [VERBOSE <file>]
-# [COMPILE_FLAGS <string>])
+# The options are:
#
-# which will create a custom rule to generate a parser. <YaccInput> is
-# the path to a yacc file. <CodeOutput> is the name of the source file
-# generated by bison. A header file is also be generated, and contains
-# the token list. If COMPILE_FLAGS option is specified, the next
-# parameter is added in the bison command line. if VERBOSE option is
-# specified, <file> is created and contains verbose descriptions of the
-# grammar and parser. The macro defines a set of variables:
+# ``COMPILE_FLAGS <flags>``
+# Specify flags to be added to the ``bison`` command line.
+#
+# ``DEFINES_FILE <file>``
+# Specify a non-default header ``<file>`` to be generated by ``bison``.
+#
+# ``VERBOSE <file>``
+# Tell ``bison`` to write verbose descriptions of the grammar and
+# parser to the given ``<file>``.
#
-# ::
+# The macro defines the following variables:
#
-# BISON_${Name}_DEFINED - true is the macro ran successfully
-# BISON_${Name}_INPUT - The input source file, an alias for <YaccInput>
-# BISON_${Name}_OUTPUT_SOURCE - The source file generated by bison
-# BISON_${Name}_OUTPUT_HEADER - The header file generated by bison
-# BISON_${Name}_OUTPUTS - The sources files generated by bison
-# BISON_${Name}_COMPILE_FLAGS - Options used in the bison command line
+# ``BISON_<Name>_DEFINED``
+# true is the macro ran successfully
#
+# ``BISON_<Name>_INPUT``
+# The input source file, an alias for <YaccInput>
#
+# ``BISON_<Name>_OUTPUT_SOURCE``
+# The source file generated by bison
#
-# ::
+# ``BISON_<Name>_OUTPUT_HEADER``
+# The header file generated by bison
#
-# ====================================================================
-# Example:
+# ``BISON_<Name>_OUTPUTS``
+# The sources files generated by bison
#
+# ``BISON_<Name>_COMPILE_FLAGS``
+# Options used in the ``bison`` command line
#
+# Example usage:
#
-# ::
+# .. code-block:: cmake
#
-# find_package(BISON)
-# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
-# add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
-# ====================================================================
+# find_package(BISON)
+# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp
+# DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/parser.h)
+# add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
#=============================================================================
# Copyright 2009 Kitware, Inc.
@@ -74,6 +89,8 @@
find_program(BISON_EXECUTABLE NAMES bison win_bison DOC "path to the bison executable")
mark_as_advanced(BISON_EXECUTABLE)
+include(CMakeParseArguments)
+
if(BISON_EXECUTABLE)
# the bison commands should be executed with the C locale, otherwise
# the message (which are parsed) may be translated
@@ -128,6 +145,12 @@ if(BISON_EXECUTABLE)
list(APPEND BISON_TARGET_cmdopt ${BISON_TARGET_extraopts})
endmacro()
+ # internal macro
+ macro(BISON_TARGET_option_defines Header)
+ set(BISON_TARGET_output_header "${Header}")
+ list(APPEND BISON_TARGET_cmdopt --defines=${BISON_TARGET_output_header})
+ endmacro()
+
#============================================================
# BISON_TARGET (public macro)
#============================================================
@@ -136,51 +159,61 @@ if(BISON_EXECUTABLE)
set(BISON_TARGET_output_header "")
set(BISON_TARGET_cmdopt "")
set(BISON_TARGET_outputs "${BisonOutput}")
- if(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
+
+ # Parsing parameters
+ set(BISON_TARGET_PARAM_OPTIONS)
+ set(BISON_TARGET_PARAM_ONE_VALUE_KEYWORDS
+ VERBOSE
+ COMPILE_FLAGS
+ DEFINES_FILE
+ )
+ set(BISON_TARGET_PARAM_MULTI_VALUE_KEYWORDS)
+ cmake_parse_arguments(
+ BISON_TARGET_ARG
+ "${BISON_TARGET_PARAM_OPTIONS}"
+ "${BISON_TARGET_PARAM_ONE_VALUE_KEYWORDS}"
+ "${BISON_TARGET_PARAM_MULTI_VALUE_KEYWORDS}"
+ ${ARGN}
+ )
+
+ if(NOT "${BISON_TARGET_ARG_UNPARSED_ARGUMENTS}" STREQUAL "")
message(SEND_ERROR "Usage")
else()
- # Parsing parameters
- if(${ARGC} GREATER 5 OR ${ARGC} EQUAL 5)
- if("${ARGV3}" STREQUAL "VERBOSE")
- BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV4}")
- endif()
- if("${ARGV3}" STREQUAL "COMPILE_FLAGS")
- BISON_TARGET_option_extraopts("${ARGV4}")
- endif()
+ if(NOT "${BISON_TARGET_ARG_VERBOSE}" STREQUAL "")
+ BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${BISON_TARGET_ARG_VERBOSE}")
endif()
-
- if(${ARGC} EQUAL 7)
- if("${ARGV5}" STREQUAL "VERBOSE")
- BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV6}")
- endif()
-
- if("${ARGV5}" STREQUAL "COMPILE_FLAGS")
- BISON_TARGET_option_extraopts("${ARGV6}")
- endif()
+ if(NOT "${BISON_TARGET_ARG_COMPILE_FLAGS}" STREQUAL "")
+ BISON_TARGET_option_extraopts("${BISON_TARGET_ARG_COMPILE_FLAGS}")
+ endif()
+ if(NOT "${BISON_TARGET_ARG_DEFINES_FILE}" STREQUAL "")
+ BISON_TARGET_option_defines("${BISON_TARGET_ARG_DEFINES_FILE}")
endif()
- # Header's name generated by bison (see option -d)
- list(APPEND BISON_TARGET_cmdopt "-d")
- string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}")
- string(REPLACE "c" "h" _fileext ${_fileext})
- string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
- BISON_${Name}_OUTPUT_HEADER "${ARGV2}")
- list(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}")
+ if("${BISON_TARGET_output_header}" STREQUAL "")
+ # Header's name generated by bison (see option -d)
+ list(APPEND BISON_TARGET_cmdopt "-d")
+ string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${BisonOutput}")
+ string(REPLACE "c" "h" _fileext ${_fileext})
+ string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
+ BISON_TARGET_output_header "${BisonOutput}")
+ endif()
+ list(APPEND BISON_TARGET_outputs "${BISON_TARGET_output_header}")
add_custom_command(OUTPUT ${BISON_TARGET_outputs}
${BISON_TARGET_extraoutputs}
COMMAND ${BISON_EXECUTABLE}
- ARGS ${BISON_TARGET_cmdopt} -o ${ARGV2} ${ARGV1}
- DEPENDS ${ARGV1}
+ ARGS ${BISON_TARGET_cmdopt} -o ${BisonOutput} ${BisonInput}
+ DEPENDS ${BisonInput}
COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# define target variables
set(BISON_${Name}_DEFINED TRUE)
- set(BISON_${Name}_INPUT ${ARGV1})
+ set(BISON_${Name}_INPUT ${BisonInput})
set(BISON_${Name}_OUTPUTS ${BISON_TARGET_outputs})
set(BISON_${Name}_COMPILE_FLAGS ${BISON_TARGET_cmdopt})
set(BISON_${Name}_OUTPUT_SOURCE "${BisonOutput}")
+ set(BISON_${Name}_OUTPUT_HEADER "${BISON_TARGET_output_header}")
endif()
endmacro()
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index e8e1fb1..f4b0783 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -468,17 +468,31 @@ set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple arguments.")
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(CUDA_HOST_COMPILER "$(VCInstallDir)bin" CACHE FILEPATH "Host side compiler used by NVCC")
else()
- # Using cc which is symlink to clang may let NVCC think it is GCC and issue
- # unhandled -dumpspecs option to clang. Also in case neither
- # CMAKE_C_COMPILER is defined (project does not use C language) nor
- # CUDA_HOST_COMPILER is specified manually we should skip -ccbin and let
- # nvcc use its own default C compiler.
- if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER)
- get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH)
+ if(APPLE
+ AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang"
+ AND "${CMAKE_C_COMPILER}" MATCHES "/cc$")
+ # Using cc which is symlink to clang may let NVCC think it is GCC and issue
+ # unhandled -dumpspecs option to clang. Also in case neither
+ # CMAKE_C_COMPILER is defined (project does not use C language) nor
+ # CUDA_HOST_COMPILER is specified manually we should skip -ccbin and let
+ # nvcc use its own default C compiler.
+ # Only care about this on APPLE with clang to avoid
+ # following symlinks to things like ccache
+ if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER)
+ get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH)
+ # if the real path does not end up being clang then
+ # go back to using CMAKE_C_COMPILER
+ if(NOT "${c_compiler_realpath}" MATCHES "/clang$")
+ set(c_compiler_realpath "${CMAKE_C_COMPILER}")
+ endif()
+ else()
+ set(c_compiler_realpath "")
+ endif()
+ set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC")
else()
- set(c_compiler_realpath "")
+ set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}"
+ CACHE FILEPATH "Host side compiler used by NVCC")
endif()
- set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC")
endif()
# Propagate the host flags to the host compiler via -Xcompiler
diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake
index 8493d80..c88c1b8 100644
--- a/Modules/FindIce.cmake
+++ b/Modules/FindIce.cmake
@@ -20,7 +20,7 @@
# Ice_SLICE_DIRS - the directories containing the Ice slice interface
# definitions
#
-# Ice programs are reported in::
+# Ice slice programs are reported in::
#
# Ice_SLICE2CPP_EXECUTABLE - path to slice2cpp executable
# Ice_SLICE2CS_EXECUTABLE - path to slice2cs executable
@@ -28,10 +28,49 @@
# Ice_SLICE2FREEZE_EXECUTABLE - path to slice2freeze executable
# Ice_SLICE2HTML_EXECUTABLE - path to slice2html executable
# Ice_SLICE2JAVA_EXECUTABLE - path to slice2java executable
+# Ice_SLICE2JS_EXECUTABLE - path to slice2js executable
# Ice_SLICE2PHP_EXECUTABLE - path to slice2php executable
# Ice_SLICE2PY_EXECUTABLE - path to slice2py executable
# Ice_SLICE2RB_EXECUTABLE - path to slice2rb executable
#
+# Ice programs are reported in::
+#
+# Ice_GLACIER2ROUTER_EXECUTABLE - path to glacier2router executable
+# Ice_ICEBOX_EXECUTABLE - path to icebox executable
+# Ice_ICEBOXADMIN_EXECUTABLE - path to iceboxadmin executable
+# Ice_ICEBOXD_EXECUTABLE - path to iceboxd executable
+# Ice_ICEBOXNET_EXECUTABLE - path to iceboxnet executable
+# Ice_ICEGRIDADMIN_EXECUTABLE - path to icegridadmin executable
+# Ice_ICEGRIDNODE_EXECUTABLE - path to icegridnode executable
+# Ice_ICEGRIDNODED_EXECUTABLE - path to icegridnoded executable
+# Ice_ICEGRIDREGISTRY_EXECUTABLE - path to icegridregistry executable
+# Ice_ICEGRIDREGISTRYD_EXECUTABLE - path to icegridregistryd executable
+# Ice_ICEPATCH2CALC_EXECUTABLE - path to icepatch2calc executable
+# Ice_ICEPATCH2CLIENT_EXECUTABLE - path to icepatch2client executable
+# Ice_ICEPATCH2SERVER_EXECUTABLE - path to icepatch2server executable
+# Ice_ICESERVICEINSTALL_EXECUTABLE - path to iceserviceinstall executable
+# Ice_ICESTORMADMIN_EXECUTABLE - path to icestormadmin executable
+# Ice_ICESTORMMIGRATE_EXECUTABLE - path to icestormmigrate executable
+#
+# Ice db programs (Windows only; standard system versions on all other
+# platforms) are reported in::
+#
+# Ice_DB_ARCHIVE_EXECUTABLE - path to db_archive executable
+# Ice_DB_CHECKPOINT_EXECUTABLE - path to db_checkpoint executable
+# Ice_DB_DEADLOCK_EXECUTABLE - path to db_deadlock executable
+# Ice_DB_DUMP_EXECUTABLE - path to db_dump executable
+# Ice_DB_HOTBACKUP_EXECUTABLE - path to db_hotbackup executable
+# Ice_DB_LOAD_EXECUTABLE - path to db_load executable
+# Ice_DB_LOG_VERIFY_EXECUTABLE - path to db_log_verify executable
+# Ice_DB_PRINTLOG_EXECUTABLE - path to db_printlog executable
+# Ice_DB_RECOVER_EXECUTABLE - path to db_recover executable
+# Ice_DB_STAT_EXECUTABLE - path to db_stat executable
+# Ice_DB_TUNER_EXECUTABLE - path to db_tuner executable
+# Ice_DB_UPGRADE_EXECUTABLE - path to db_upgrade executable
+# Ice_DB_VERIFY_EXECUTABLE - path to db_verify executable
+# Ice_DUMPDB_EXECUTABLE - path to dumpdb executable
+# Ice_TRANSFORMDB_EXECUTABLE - path to transformdb executable
+#
# Ice component libraries are reported in::
#
# Ice_<C>_FOUND - ON if component was found
@@ -76,7 +115,7 @@
# Written by Roger Leigh <rleigh@codelibre.net>
#=============================================================================
-# Copyright 2014 University of Dundee
+# Copyright 2014-2015 University of Dundee
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -94,6 +133,8 @@ function(_Ice_FIND)
# Released versions of Ice, including generic short forms
set(ice_versions
3
+ 3.6
+ 3.6.0
3.5
3.5.1
3.5.0
@@ -198,19 +239,55 @@ function(_Ice_FIND)
endforeach()
endif()
+ set(db_programs
+ db_archive
+ db_checkpoint
+ db_deadlock
+ db_dump
+ db_hotbackup
+ db_load
+ db_log_verify
+ db_printlog
+ db_recover
+ db_stat
+ db_tuner
+ db_upgrade
+ db_verify
+ dumpdb
+ transformdb)
+
set(ice_programs
+ glacier2router
+ icebox
+ iceboxadmin
+ iceboxd
+ iceboxnet
+ icegridadmin
+ icegridnode
+ icegridnoded
+ icegridregistry
+ icegridregistryd
+ icepatch2calc
+ icepatch2client
+ icepatch2server
+ iceserviceinstall
+ icestormadmin
+ icestormmigrate)
+
+ set(slice_programs
slice2cpp
slice2cs
slice2freezej
slice2freeze
slice2html
slice2java
+ slice2js
slice2php
slice2py
slice2rb)
# Find all Ice programs
- foreach(program ${ice_programs})
+ foreach(program ${db_programs} ${ice_programs} ${slice_programs})
string(TOUPPER "${program}" program_upcase)
set(cache_var "Ice_${program_upcase}_EXECUTABLE")
set(program_var "Ice_${program_upcase}_EXECUTABLE")
@@ -373,15 +450,51 @@ if(Ice_DEBUG)
message(STATUS "Ice_INCLUDE_DIR directory: ${Ice_INCLUDE_DIR}")
message(STATUS "Ice_SLICE_DIR directory: ${Ice_SLICE_DIR}")
message(STATUS "Ice_LIBRARIES: ${Ice_LIBRARIES}")
+
message(STATUS "slice2cpp executable: ${Ice_SLICE2CPP_EXECUTABLE}")
message(STATUS "slice2cs executable: ${Ice_SLICE2CS_EXECUTABLE}")
message(STATUS "slice2freezej executable: ${Ice_SLICE2FREEZEJ_EXECUTABLE}")
message(STATUS "slice2freeze executable: ${Ice_SLICE2FREEZE_EXECUTABLE}")
message(STATUS "slice2html executable: ${Ice_SLICE2HTML_EXECUTABLE}")
message(STATUS "slice2java executable: ${Ice_SLICE2JAVA_EXECUTABLE}")
+ message(STATUS "slice2js executable: ${Ice_SLICE2JS_EXECUTABLE}")
message(STATUS "slice2php executable: ${Ice_SLICE2PHP_EXECUTABLE}")
message(STATUS "slice2py executable: ${Ice_SLICE2PY_EXECUTABLE}")
message(STATUS "slice2rb executable: ${Ice_SLICE2RB_EXECUTABLE}")
+ message(STATUS "glacier2router executable: ${Ice_GLACIER2ROUTER_EXECUTABLE}")
+
+ message(STATUS "icebox executable: ${Ice_ICEBOX_EXECUTABLE}")
+ message(STATUS "iceboxadmin executable: ${Ice_ICEBOXADMIN_EXECUTABLE}")
+ message(STATUS "iceboxd executable: ${Ice_ICEBOXD_EXECUTABLE}")
+ message(STATUS "iceboxnet executable: ${Ice_ICEBOXNET_EXECUTABLE}")
+ message(STATUS "icegridadmin executable: ${Ice_ICEGRIDADMIN_EXECUTABLE}")
+ message(STATUS "icegridnode executable: ${Ice_ICEGRIDNODE_EXECUTABLE}")
+ message(STATUS "icegridnoded executable: ${Ice_ICEGRIDNODED_EXECUTABLE}")
+ message(STATUS "icegridregistry executable: ${Ice_ICEGRIDREGISTRY_EXECUTABLE}")
+ message(STATUS "icegridregistryd executable: ${Ice_ICEGRIDREGISTRYD_EXECUTABLE}")
+ message(STATUS "icepatch2calc executable: ${Ice_ICEPATCH2CALC_EXECUTABLE}")
+ message(STATUS "icepatch2client executable: ${Ice_ICEPATCH2CLIENT_EXECUTABLE}")
+ message(STATUS "icepatch2server executable: ${Ice_ICEPATCH2SERVER_EXECUTABLE}")
+ message(STATUS "iceserviceinstall executable: ${Ice_ICESERVICEINSTALL_EXECUTABLE}")
+ message(STATUS "icestormadmin executable: ${Ice_ICESTORMADMIN_EXECUTABLE}")
+ message(STATUS "icestormmigrate executable: ${Ice_ICESTORMMIGRATE_EXECUTABLE}")
+
+ message(STATUS "db_archive executable: ${Ice_DB_ARCHIVE_EXECUTABLE}")
+ message(STATUS "db_checkpoint executable: ${Ice_DB_CHECKPOINT_EXECUTABLE}")
+ message(STATUS "db_deadlock executable: ${Ice_DB_DEADLOCK_EXECUTABLE}")
+ message(STATUS "db_dump executable: ${Ice_DB_DUMP_EXECUTABLE}")
+ message(STATUS "db_hotbackup executable: ${Ice_DB_HOTBACKUP_EXECUTABLE}")
+ message(STATUS "db_load executable: ${Ice_DB_LOAD_EXECUTABLE}")
+ message(STATUS "db_log_verify executable: ${Ice_DB_LOG_VERIFY_EXECUTABLE}")
+ message(STATUS "db_printlog executable: ${Ice_DB_PRINTLOG_EXECUTABLE}")
+ message(STATUS "db_recover executable: ${Ice_DB_RECOVER_EXECUTABLE}")
+ message(STATUS "db_stat executable: ${Ice_DB_STAT_EXECUTABLE}")
+ message(STATUS "db_tuner executable: ${Ice_DB_TUNER_EXECUTABLE}")
+ message(STATUS "db_upgrade executable: ${Ice_DB_UPGRADE_EXECUTABLE}")
+ message(STATUS "db_verify executable: ${Ice_DB_VERIFY_EXECUTABLE}")
+ message(STATUS "dumpdb executable: ${Ice_DUMPDB_EXECUTABLE}")
+ message(STATUS "transformdb executable: ${Ice_TRANSFORMDB_EXECUTABLE}")
+
foreach(component ${Ice_FIND_COMPONENTS})
string(TOUPPER "${component}" component_upcase)
set(component_lib "Ice_${component_upcase}_LIBRARIES")
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index c16c011..9a70678 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -740,7 +740,8 @@ else()
# UNIX: Start actual work.
#-----------------------------------------------------------------
# Support cross-compiling, only search in the target platform.
- find_program(wxWidgets_CONFIG_EXECUTABLE wx-config wx-config-3.0
+ find_program(wxWidgets_CONFIG_EXECUTABLE
+ NAMES wx-config wx-config-3.0 wx-config-2.9 wx-config-2.8
DOC "Location of wxWidgets library configuration provider binary (wx-config)."
ONLY_CMAKE_FIND_ROOT_PATH
)
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index c61e7e9..b42084e 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -4,59 +4,104 @@
#
# Define GNU standard installation directories
#
-# Provides install directory variables as defined for GNU software:
+# Provides install directory variables as defined by the
+# `GNU Coding Standards`_.
#
-# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+# .. _`GNU Coding Standards`: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+#
+# Result Variables
+# ^^^^^^^^^^^^^^^^
#
# Inclusion of this module defines the following variables:
#
# ``CMAKE_INSTALL_<dir>``
-# destination for files of a given type
+#
+# Destination for files of a given type. This value may be passed to
+# the ``DESTINATION`` options of :command:`install` commands for the
+# corresponding file type.
+#
# ``CMAKE_INSTALL_FULL_<dir>``
-# corresponding absolute path
#
-# where <dir> is one of:
+# The absolute path generated from the corresponding ``CMAKE_INSTALL_<dir>``
+# value. If the value is not already an absolute path, an absolute path
+# is constructed typically by prepending the value of the
+# :variable:`CMAKE_INSTALL_PREFIX` variable. However, there are some
+# `special cases`_ as documented below.
+#
+# where ``<dir>`` is one of:
#
# ``BINDIR``
-# user executables (bin)
+# user executables (``bin``)
# ``SBINDIR``
-# system admin executables (sbin)
+# system admin executables (``sbin``)
# ``LIBEXECDIR``
-# program executables (libexec)
+# program executables (``libexec``)
# ``SYSCONFDIR``
-# read-only single-machine data (etc)
+# read-only single-machine data (``etc``)
# ``SHAREDSTATEDIR``
-# modifiable architecture-independent data (com)
+# modifiable architecture-independent data (``com``)
# ``LOCALSTATEDIR``
-# modifiable single-machine data (var)
+# modifiable single-machine data (``var``)
# ``LIBDIR``
-# object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian)
+# object code libraries (``lib`` or ``lib64``
+# or ``lib/<multiarch-tuple>`` on Debian)
# ``INCLUDEDIR``
-# C header files (include)
+# C header files (``include``)
# ``OLDINCLUDEDIR``
-# C header files for non-gcc (/usr/include)
+# C header files for non-gcc (``/usr/include``)
# ``DATAROOTDIR``
-# read-only architecture-independent data root (share)
+# read-only architecture-independent data root (``share``)
# ``DATADIR``
-# read-only architecture-independent data (DATAROOTDIR)
+# read-only architecture-independent data (``DATAROOTDIR``)
# ``INFODIR``
-# info documentation (DATAROOTDIR/info)
+# info documentation (``DATAROOTDIR/info``)
# ``LOCALEDIR``
-# locale-dependent data (DATAROOTDIR/locale)
+# locale-dependent data (``DATAROOTDIR/locale``)
# ``MANDIR``
-# man documentation (DATAROOTDIR/man)
+# man documentation (``DATAROOTDIR/man``)
# ``DOCDIR``
-# documentation root (DATAROOTDIR/doc/PROJECT_NAME)
+# documentation root (``DATAROOTDIR/doc/PROJECT_NAME``)
+#
+# If the includer does not define a value the above-shown default will be
+# used and the value will appear in the cache for editing by the user.
+#
+# Special Cases
+# ^^^^^^^^^^^^^
+#
+# The following values of :variable:`CMAKE_INSTALL_PREFIX` are special:
+#
+# ``/``
+#
+# For ``<dir>`` other than the ``SYSCONFDIR`` and ``LOCALSTATEDIR``,
+# the value of ``CMAKE_INSTALL_<dir>`` is prefixed with ``usr/`` if
+# it is not user-specified as an absolute path. For example, the
+# ``INCLUDEDIR`` value ``include`` becomes ``usr/include``.
+# This is required by the `GNU Coding Standards`_, which state:
+#
+# When building the complete GNU system, the prefix will be empty
+# and ``/usr`` will be a symbolic link to ``/``.
+#
+# ``/usr``
#
-# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION
-# options of install() commands for the corresponding file type. If the
-# includer does not define a value the above-shown default will be used
-# and the value will appear in the cache for editing by the user. Each
-# CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
-# from the corresponding destination by prepending (if necessary) the
-# value of CMAKE_INSTALL_PREFIX.
+# For ``<dir>`` equal to ``SYSCONFDIR`` or ``LOCALSTATEDIR``, the
+# ``CMAKE_INSTALL_FULL_<dir>`` is computed by prepending just ``/``
+# to the value of ``CMAKE_INSTALL_<dir>`` if it is not user-specified
+# as an absolute path. For example, the ``SYSCONFDIR`` value ``etc``
+# becomes ``/etc``. This is required by the `GNU Coding Standards`_.
+#
+# ``/opt/...``
+#
+# For ``<dir>`` equal to ``SYSCONFDIR`` or ``LOCALSTATEDIR``, the
+# ``CMAKE_INSTALL_FULL_<dir>`` is computed by *appending* the prefix
+# to the value of ``CMAKE_INSTALL_<dir>`` if it is not user-specified
+# as an absolute path. For example, the ``SYSCONFDIR`` value ``etc``
+# becomes ``/etc/opt/...``. This is defined by the
+# `Filesystem Hierarchy Standard`_.
+#
+# .. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
#=============================================================================
+# Copyright 2015 Alex Turbov <i.zaufi@gmail.com>
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
# Copyright 2011 Kitware, Inc.
#
@@ -274,8 +319,35 @@ foreach(dir
MANDIR
DOCDIR
)
- if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
- set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
+ if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_${dir}}")
+ # Handle special cases:
+ # - CMAKE_INSTALL_PREFIX == /
+ # - CMAKE_INSTALL_PREFIX == /usr
+ # - CMAKE_INSTALL_PREFIX == /opt/...
+ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/")
+ if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR")
+ set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}")
+ else()
+ if (NOT "${CMAKE_INSTALL_${dir}}" MATCHES "^usr/")
+ set(CMAKE_INSTALL_${dir} "usr/${CMAKE_INSTALL_${dir}}")
+ endif()
+ set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}")
+ endif()
+ elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
+ if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR")
+ set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}")
+ else()
+ set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
+ endif()
+ elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/.*")
+ if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR")
+ set(CMAKE_INSTALL_FULL_${dir} "/${CMAKE_INSTALL_${dir}}${CMAKE_INSTALL_PREFIX}")
+ else()
+ set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
+ endif()
+ else()
+ set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
+ endif()
else()
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
endif()
diff --git a/Modules/Platform/Linux-CCur-Fortran.cmake b/Modules/Platform/Linux-CCur-Fortran.cmake
new file mode 100644
index 0000000..ceecc2f
--- /dev/null
+++ b/Modules/Platform/Linux-CCur-Fortran.cmake
@@ -0,0 +1 @@
+include(Platform/Linux-GNU-Fortran)
diff --git a/Modules/Platform/Linux-GNU-Fortran.cmake b/Modules/Platform/Linux-GNU-Fortran.cmake
index 68e9540..85e1226 100644
--- a/Modules/Platform/Linux-GNU-Fortran.cmake
+++ b/Modules/Platform/Linux-GNU-Fortran.cmake
@@ -1,2 +1,3 @@
include(Platform/Linux-GNU)
__linux_compiler_gnu(Fortran)
+set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "")
diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake
index 26b3c0c..58ef3ca 100644
--- a/Modules/Platform/Windows-Embarcadero.cmake
+++ b/Modules/Platform/Windows-Embarcadero.cmake
@@ -74,6 +74,12 @@ set (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
set (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT})
+# The Borland link tool does not support multiple concurrent
+# invocations within a single working directory.
+if(NOT DEFINED CMAKE_JOB_POOL_LINK)
+ set(CMAKE_JOB_POOL_LINK BCC32LinkPool)
+ set_property(GLOBAL APPEND PROPERTY JOB_POOLS BCC32LinkPool=1)
+endif()
macro(__embarcadero_language lang)
set(CMAKE_${lang}_COMPILE_OPTIONS_DLL "${_tD}") # Note: This variable is a ';' separated list
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index b571b16..b97409c 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -35,7 +35,7 @@ endif()
if(MINGW)
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib")
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib")
set(CMAKE_C_STANDARD_LIBRARIES_INIT "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32")
set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
endif()