Merge pull request #2510 from blattms/debian-patches-2
Further patches to the build system from Debian unstable packaging.
This commit is contained in:
@@ -307,8 +307,13 @@ if(ENABLE_ECL_INPUT)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Install build system files
|
||||
install(DIRECTORY cmake DESTINATION share/opm USE_SOURCE_PERMISSIONS)
|
||||
# Install build system files and documentation
|
||||
install(DIRECTORY cmake
|
||||
DESTINATION share/opm USE_SOURCE_PERMISSIONS
|
||||
PATTERN "OPM-CMake.md" EXCLUDE)
|
||||
|
||||
install(FILES cmake/OPM-CMake.md
|
||||
DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
|
||||
# Install tab completion skeleton
|
||||
install(FILES etc/opm_bash_completion.sh.in DESTINATION share/opm/etc)
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
# Installs bash tab completion for a product
|
||||
macro(opm_add_bash_completion binary)
|
||||
option(USE_BASH_COMPLETIONS_DIR
|
||||
"Whether to use the new bash completion dir (/usr/share/bash-completion/completions) with load on demand"
|
||||
OFF)
|
||||
if(USE_BASH_COMPLETIONS_DIR)
|
||||
set(_BASH_COMPLETION_FILE ${binary})
|
||||
set(_BASH_COMPLETION_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/bash-completion/completions)
|
||||
else()
|
||||
set(_BASH_COMPLETION_FILE ${binary}_bash_completion.sh)
|
||||
set(_BASH_COMPLETION_INSTALL_DIR ${CMAKE_INSTALL_SYSCONFDIR}/bash_completion.d)
|
||||
endif()
|
||||
set(PRODUCT ${binary})
|
||||
configure_file(${OPM_MACROS_ROOT}/etc/opm_bash_completion.sh.in ${binary}_bash_completion.sh @ONLY)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/${binary}_bash_completion.sh DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/bash_completion.d)
|
||||
configure_file(${OPM_MACROS_ROOT}/etc/opm_bash_completion.sh.in ${_BASH_COMPLETION_FILE} @ONLY)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/${_BASH_COMPLETION_FILE} DESTINATION ${_BASH_COMPLETION_INSTALL_DIR})
|
||||
endmacro()
|
||||
|
||||
@@ -130,9 +130,18 @@ macro (find_and_append_package_to prefix name)
|
||||
# and the likes which is only done via opm_find_package
|
||||
if ( (NOT DEFINED ${name}_FOUND AND NOT DEFINED ${NAME}_FOUND )
|
||||
OR _search_components GREATER -1)
|
||||
string(REGEX MATCH "(opm)-.*" _is_opm ${name})
|
||||
string(REGEX MATCH "(opm)-.*" _is_opm ${name})
|
||||
if(NOT _is_opm)
|
||||
find_package (${name} ${ARGN})
|
||||
# When using Boost >= 1.70 and e.g. CMake 3.18 we need to make sure that
|
||||
# subsequent searches are using config mode too. Otherwise the library
|
||||
# list will be completely messed up. We use a set Boost_Dir to detect that
|
||||
# previous searches were done using config mode.
|
||||
if("${name}" STREQUAL "Boost" AND Boost_DIR)
|
||||
set(_CONFIG_MODE CONFIG)
|
||||
else()
|
||||
set(_CONFIG_MODE "")
|
||||
endif()
|
||||
find_package (${name} ${ARGN} ${_CONFIG_MODE})
|
||||
else()
|
||||
if(${name}_DIR)
|
||||
find_package (${name} ${${prefix}_VERSION_MAJOR}.${${prefix}_VERSION_MINOR} ${ARGN} NO_MODULE PATHS ${${name}_DIR} NO_DEFAULT_PATH)
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
find_package (Boost 1.44.0 COMPONENTS unit_test_framework QUIET)
|
||||
# When using Boost >= 1.70 and e.g. CMake 3.18 we need to make sure that
|
||||
# subsequent searches are using config mode too. Otherwise the library
|
||||
# list will be completely messed up. We use a set Boost_Dir to detect that
|
||||
# previous searches were done using config mode.
|
||||
if(Boost_DIR)
|
||||
set(_Boost_CONFIG_MODE CONFIG)
|
||||
endif()
|
||||
find_package (Boost 1.44.0 COMPONENTS unit_test_framework QUIET ${_Boost_CONFIG_MODE})
|
||||
|
||||
if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
|
||||
# setup to do a test compile
|
||||
|
||||
Reference in New Issue
Block a user