From 9a11f4e9f1ae9dfe24595b009037b8ace1b19c87 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Fri, 18 Oct 2019 16:23:07 +0200 Subject: [CMAKE] Use KDECmakeSettings --- cmake/modules/AddCMockaTest.cmake | 1 + cmake/modules/DefineCMakeDefaults.cmake | 34 ---- cmake/modules/DefineCompilerFlags.cmake | 98 ----------- cmake/modules/DefineInstallationPaths.cmake | 111 ------------ cmake/modules/GNUInstallDirs.cmake | 253 ---------------------------- cmake/modules/Warnings.cmake | 29 ---- 6 files changed, 1 insertion(+), 525 deletions(-) delete mode 100644 cmake/modules/DefineCMakeDefaults.cmake delete mode 100644 cmake/modules/DefineCompilerFlags.cmake delete mode 100644 cmake/modules/DefineInstallationPaths.cmake delete mode 100644 cmake/modules/GNUInstallDirs.cmake delete mode 100644 cmake/modules/Warnings.cmake (limited to 'cmake') diff --git a/cmake/modules/AddCMockaTest.cmake b/cmake/modules/AddCMockaTest.cmake index b2d1ca8a4..1c0bc04f6 100644 --- a/cmake/modules/AddCMockaTest.cmake +++ b/cmake/modules/AddCMockaTest.cmake @@ -18,6 +18,7 @@ endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW) function (ADD_CMOCKA_TEST _testName _testSource) add_executable(${_testName} ${_testSource}) + ecm_mark_nongui_executable(${_testName}) target_link_libraries(${_testName} ${ARGN}) add_test(${_testName} ${CMAKE_CURRENT_BINARY_DIR}/${_testName}) endfunction (ADD_CMOCKA_TEST) diff --git a/cmake/modules/DefineCMakeDefaults.cmake b/cmake/modules/DefineCMakeDefaults.cmake deleted file mode 100644 index 483722fdc..000000000 --- a/cmake/modules/DefineCMakeDefaults.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# (c) 2014 Copyright ownCloud GmbH -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING* file. - -# Always include srcdir and builddir in include path -# This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY} in -# about every subdir -# since cmake 2.4.0 -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -# Put the include dirs which are in the source or build tree -# before all other include dirs, so the headers in the sources -# are prefered over the already installed ones -# since cmake 2.4.1 -set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) - -# Use colored output -# since cmake 2.4.0 -set(CMAKE_COLOR_MAKEFILE ON) - -# Define the generic version of the libraries here -set(GENERIC_LIB_VERSION "0.1.0") -set(GENERIC_LIB_SOVERSION "0") - -# set -Werror -set(CMAKE_ENABLE_WERROR ON) - -# Set the default build type to release with debug info -if (NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE RelWithDebInfo - CACHE STRING - "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." - ) -endif (NOT CMAKE_BUILD_TYPE) diff --git a/cmake/modules/DefineCompilerFlags.cmake b/cmake/modules/DefineCompilerFlags.cmake deleted file mode 100644 index b38c85569..000000000 --- a/cmake/modules/DefineCompilerFlags.cmake +++ /dev/null @@ -1,98 +0,0 @@ -# (c) 2014 Copyright ownCloud GmbH -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING* file. - -# define system dependent compiler flags - -include(CheckCCompilerFlag) -include(CheckCCompilerFlagSSP) - -# -# Define GNUCC compiler flags -# -if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)") - - # add -Wconversion ? - # cannot be pedantic with sqlite3 directly linked - # FIXME Can we somehow not use those flags for sqlite3.* but use them for the rest of csync? - if (NOT USE_OUR_OWN_SQLITE3) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors") - endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -D_GNU_SOURCE") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__STDC_FORMAT_MACROS=1") - - if (${CMAKE_C_COMPILER_ID} MATCHES "Clang") - # Disable warning for assert() statements in csync - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-statement-expression") - endif() - - set(CSYNC_STRICT OFF CACHE BOOL "Strict error checking, enabled -Werror and friends") - if (CSYNC_STRICT) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") - endif(CSYNC_STRICT) - - # with -fPIC - check_c_compiler_flag("-fPIC" WITH_FPIC) - if (WITH_FPIC AND NOT WIN32) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") - endif (WITH_FPIC AND NOT WIN32) - - check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR) - if (WITH_STACK_PROTECTOR AND NOT WIN32) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector") - endif (WITH_STACK_PROTECTOR AND NOT WIN32) - - if (CMAKE_BUILD_TYPE) - string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER) - if (CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)") - check_c_compiler_flag("-Wp,-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE) - if (WITH_FORTIFY_SOURCE) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-D_FORTIFY_SOURCE=2") - endif (WITH_FORTIFY_SOURCE) - endif() - endif() -endif (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)") - -if (UNIX AND NOT WIN32) - # - # Check for large filesystem support - # - if (CMAKE_SIZEOF_VOID_P MATCHES "8") - # with large file support - execute_process( - COMMAND - getconf LFS64_CFLAGS - OUTPUT_VARIABLE - _lfs_CFLAGS - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - else (CMAKE_SIZEOF_VOID_P MATCHES "8") - # with large file support - execute_process( - COMMAND - getconf LFS_CFLAGS - OUTPUT_VARIABLE - _lfs_CFLAGS - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - endif (CMAKE_SIZEOF_VOID_P MATCHES "8") - if (_lfs_CFLAGS) - string(REGEX REPLACE "[\r\n]" " " "${_lfs_CFLAGS}" "${${_lfs_CFLAGS}}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_lfs_CFLAGS}") - endif (_lfs_CFLAGS) -else(UNIX AND NOT WIN32) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64") -endif (UNIX AND NOT WIN32) - -if (MSVC) - # Use secure functions by default and suppress warnings about - #"deprecated" functions - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_NONSTDC_NO_WARNINGS=1 /D _CRT_SECURE_NO_WARNINGS=1") -endif (MSVC) diff --git a/cmake/modules/DefineInstallationPaths.cmake b/cmake/modules/DefineInstallationPaths.cmake deleted file mode 100644 index b1fb47d59..000000000 --- a/cmake/modules/DefineInstallationPaths.cmake +++ /dev/null @@ -1,111 +0,0 @@ -# (c) 2014 Copyright ownCloud GmbH -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING* file. - -if (UNIX) - # Suffix for Linux - SET(LIB_SUFFIX - CACHE STRING "Define suffix of directory name (32/64)" - ) - - SET(EXEC_INSTALL_PREFIX - "${CMAKE_INSTALL_PREFIX}" - CACHE PATH "Base directory for executables and libraries" - ) - SET(SHARE_INSTALL_PREFIX - "${CMAKE_INSTALL_PREFIX}/share" - CACHE PATH "Base directory for files which go to share/" - ) - SET(DATA_INSTALL_PREFIX - "${SHARE_INSTALL_PREFIX}" - CACHE PATH "The parent directory where applications can install their data") - - # The following are directories where stuff will be installed to - SET(BIN_INSTALL_DIR - "${CMAKE_INSTALL_BINDIR}" - CACHE PATH "The ${APPLICATION_SHORTNAME} binary install dir (default prefix/bin)" - ) - SET(SBIN_INSTALL_DIR - "${EXEC_INSTALL_PREFIX}/sbin" - CACHE PATH "The ${APPLICATION_SHORTNAME} sbin install dir (default prefix/sbin)" - ) - SET(LIB_INSTALL_DIR - "${CMAKE_INSTALL_LIBDIR}" - CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/lib)" - ) - SET(LIBEXEC_INSTALL_DIR - "${EXEC_INSTALL_PREFIX}/libexec" - CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/libexec)" - ) - SET(LIB_PRIVATE_INSTALL_DIR - "${LIB_INSTALL_DIR}" - CACHE PATH "The subdirectory relative to the install prefix where private libs are installed" - ) - SET(INCLUDE_INSTALL_DIR - "${CMAKE_INSTALL_PREFIX}/include" - CACHE PATH "The subdirectory to the header prefix (default prefix/include)" - ) - - SET(DATA_INSTALL_DIR - "${DATA_INSTALL_PREFIX}" - CACHE PATH "The parent directory where applications can install their data (default prefix/share/${APPLICATION_SHORTNAME})" - ) - SET(HTML_INSTALL_DIR - "${DATA_INSTALL_PREFIX}/doc/HTML" - CACHE PATH "The HTML install dir for documentation (default data/doc/html)" - ) - SET(ICON_INSTALL_DIR - "${DATA_INSTALL_PREFIX}/icons" - CACHE PATH "The icon install dir (default data/icons/)" - ) - SET(SOUND_INSTALL_DIR - "${DATA_INSTALL_PREFIX}/sounds" - CACHE PATH "The install dir for sound files (default data/sounds)" - ) - - SET(LOCALE_INSTALL_DIR - "${SHARE_INSTALL_PREFIX}/locale" - CACHE PATH "The install dir for translations (default prefix/share/locale)" - ) - - SET(XDG_APPS_DIR - "${SHARE_INSTALL_PREFIX}/applications/" - CACHE PATH "The XDG apps dir" - ) - SET(XDG_DIRECTORY_DIR - "${SHARE_INSTALL_PREFIX}/desktop-directories" - CACHE PATH "The XDG directory" - ) - - IF(NOT "${EXEC_INSTALL_PREFIX}" STREQUAL "/usr") - SET(SYSCONFDIR_INSTALL_PREFIX "${EXEC_INSTALL_PREFIX}") - endif() - - SET(SYSCONF_INSTALL_DIR - "${SYSCONFDIR_INSTALL_PREFIX}/etc" - CACHE PATH "The ${APPLICATION_SHORTNAME} sysconfig install dir (default prefix/etc)" - ) - SET(MAN_INSTALL_DIR - "${SHARE_INSTALL_PREFIX}/man" - CACHE PATH "The ${APPLICATION_SHORTNAME} man install dir (default prefix/man)" - ) - SET(INFO_INSTALL_DIR - "${SHARE_INSTALL_PREFIX}/info" - CACHE PATH "The ${APPLICATION_SHORTNAME} info install dir (default prefix/info)" - ) -endif (UNIX) - -if (WIN32) - # Same same - set(SHARE_INSTALL_PREFIX "share" CACHE PATH "-") - set(BIN_INSTALL_DIR "." CACHE PATH "-") - set(SBIN_INSTALL_DIR "." CACHE PATH "-") - set(LIB_INSTALL_DIR "lib" CACHE PATH "-") - set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-") - set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-") - set(ICON_INSTALL_DIR "." CACHE PATH "-") - set(SOUND_INSTALL_DIR "." CACHE PATH "-") - set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-") - set(SYSCONF_INSTALL_DIR "config" CACHE PATH "-") - set(MAN_INSTALL_DIR "man" CACHE PATH "-") -endif (WIN32) diff --git a/cmake/modules/GNUInstallDirs.cmake b/cmake/modules/GNUInstallDirs.cmake deleted file mode 100644 index 5249477cb..000000000 --- a/cmake/modules/GNUInstallDirs.cmake +++ /dev/null @@ -1,253 +0,0 @@ -#.rst: -# GNUInstallDirs -# -------------- -# -# Define GNU standard installation directories -# -# Provides install directory variables as defined for GNU software: -# -# :: -# -# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html -# -# Inclusion of this module defines the following variables: -# -# :: -# -# CMAKE_INSTALL_ - destination for files of a given type -# CMAKE_INSTALL_FULL_ - corresponding absolute path -# -# where is one of: -# -# :: -# -# BINDIR - user executables (bin) -# SBINDIR - system admin executables (sbin) -# LIBEXECDIR - program executables (libexec) -# SYSCONFDIR - read-only single-machine data (etc) -# SHAREDSTATEDIR - modifiable architecture-independent data (com) -# LOCALSTATEDIR - modifiable single-machine data (var) -# LIBDIR - object code libraries (lib or lib64 or lib/ on Debian) -# INCLUDEDIR - C header files (include) -# OLDINCLUDEDIR - C header files for non-gcc (/usr/include) -# DATAROOTDIR - read-only architecture-independent data root (share) -# DATADIR - read-only architecture-independent data (DATAROOTDIR) -# INFODIR - info documentation (DATAROOTDIR/info) -# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale) -# MANDIR - man documentation (DATAROOTDIR/man) -# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME) -# -# Each CMAKE_INSTALL_ 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_ value contains an absolute path constructed -# from the corresponding destination by prepending (if necessary) the -# value of CMAKE_INSTALL_PREFIX. - -#============================================================================= -# Copyright 2011 Nikita Krupen'ko -# Copyright 2011 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# Installation directories -# -if(NOT DEFINED CMAKE_INSTALL_BINDIR) - set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)") -endif() - -if(NOT DEFINED CMAKE_INSTALL_SBINDIR) - set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)") -endif() - -if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR) - set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)") -endif() - -if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR) - set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)") -endif() - -if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR) - set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)") -endif() - -if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR) - set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)") -endif() - -# We check if the variable was manually set and not cached, in order to -# allow projects to set the values as normal variables before including -# GNUInstallDirs to avoid having the entries cached or user-editable. It -# replaces the "if(NOT DEFINED CMAKE_INSTALL_XXX)" checks in all the -# other cases. -# If CMAKE_INSTALL_LIBDIR is defined, if _libdir_set is false, then the -# variable is a normal one, otherwise it is a cache one. -get_property(_libdir_set CACHE CMAKE_INSTALL_LIBDIR PROPERTY TYPE SET) -if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set - AND DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX - AND NOT "${_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_INSTALL_PREFIX}")) - # If CMAKE_INSTALL_LIBDIR is not defined, it is always executed. - # Otherwise: - # * if _libdir_set is false it is not executed (meaning that it is - # not a cache variable) - # * if _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX is not defined it is - # not executed - # * if _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX and - # CMAKE_INSTALL_PREFIX are the same string it is not executed. - # _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX is updated after the - # execution, of this part of code, therefore at the next inclusion - # of the file, CMAKE_INSTALL_LIBDIR is defined, and the 2 strings - # are equal, meaning that the if is not executed the code the - # second time. - - set(_LIBDIR_DEFAULT "lib") - # Override this default 'lib' with 'lib64' iff: - # - we are on Linux system but NOT cross-compiling - # - we are NOT on debian - # - we are on a 64 bits system - # reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf - # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if - # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu" - # and CMAKE_INSTALL_PREFIX is "/usr" - # See http://wiki.debian.org/Multiarch - if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX) - set(__LAST_LIBDIR_DEFAULT "lib") - # __LAST_LIBDIR_DEFAULT is the default value that we compute from - # _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX, not a cache entry for - # the value that was last used as the default. - # This value is used to figure out whether the user changed the - # CMAKE_INSTALL_LIBDIR value manually, or if the value was the - # default one. When CMAKE_INSTALL_PREFIX changes, the value is - # updated to the new default, unless the user explicitly changed it. - endif() - if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" - AND NOT CMAKE_CROSSCOMPILING) - if (EXISTS "/etc/debian_version") # is this a debian system ? - if(CMAKE_LIBRARY_ARCHITECTURE) - set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}") - endif() - else() # not debian, rely on CMAKE_SIZEOF_VOID_P: - if(NOT DEFINED CMAKE_SIZEOF_VOID_P) - message(AUTHOR_WARNING - "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. " - "Please enable at least one language before including GNUInstallDirs.") - else() - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") - set(_LIBDIR_DEFAULT "lib64") - if(DEFINED _GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX) - set(__LAST_LIBDIR_DEFAULT "lib64") - endif() - endif() - endif() - endif() - endif() - if(NOT DEFINED CMAKE_INSTALL_LIBDIR) - set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})") - elseif(DEFINED __LAST_LIBDIR_DEFAULT - AND "${__LAST_LIBDIR_DEFAULT}" STREQUAL "${CMAKE_INSTALL_LIBDIR}") - set_property(CACHE CMAKE_INSTALL_LIBDIR PROPERTY VALUE "${_LIBDIR_DEFAULT}") - endif() -endif() -# Save for next run -set(_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE INTERNAL "CMAKE_INSTALL_PREFIX during last run") -unset(_libdir_set) -unset(__LAST_LIBDIR_DEFAULT) - - -if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR) - set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)") -endif() - -if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR) - set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)") -endif() - -if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR) - set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)") -endif() - -#----------------------------------------------------------------------------- -# Values whose defaults are relative to DATAROOTDIR. Store empty values in -# the cache and store the defaults in local variables if the cache values are -# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes. - -if(NOT CMAKE_INSTALL_DATADIR) - set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)") - set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}") -endif() - -if(NOT CMAKE_INSTALL_INFODIR) - set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)") - set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info") -endif() - -if(NOT CMAKE_INSTALL_LOCALEDIR) - set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)") - set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale") -endif() - -if(NOT CMAKE_INSTALL_MANDIR) - set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)") - set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man") -endif() - -if(NOT CMAKE_INSTALL_DOCDIR) - set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)") - set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}") -endif() - -#----------------------------------------------------------------------------- - -mark_as_advanced( - CMAKE_INSTALL_BINDIR - CMAKE_INSTALL_SBINDIR - CMAKE_INSTALL_LIBEXECDIR - CMAKE_INSTALL_SYSCONFDIR - CMAKE_INSTALL_SHAREDSTATEDIR - CMAKE_INSTALL_LOCALSTATEDIR - CMAKE_INSTALL_LIBDIR - CMAKE_INSTALL_INCLUDEDIR - CMAKE_INSTALL_OLDINCLUDEDIR - CMAKE_INSTALL_DATAROOTDIR - CMAKE_INSTALL_DATADIR - CMAKE_INSTALL_INFODIR - CMAKE_INSTALL_LOCALEDIR - CMAKE_INSTALL_MANDIR - CMAKE_INSTALL_DOCDIR - ) - -# Result directories -# -foreach(dir - BINDIR - SBINDIR - LIBEXECDIR - SYSCONFDIR - SHAREDSTATEDIR - LOCALSTATEDIR - LIBDIR - INCLUDEDIR - OLDINCLUDEDIR - DATAROOTDIR - DATADIR - INFODIR - LOCALEDIR - MANDIR - DOCDIR - ) - if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}}) - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") - else() - set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}") - endif() -endforeach() diff --git a/cmake/modules/Warnings.cmake b/cmake/modules/Warnings.cmake deleted file mode 100644 index d4f7c910a..000000000 --- a/cmake/modules/Warnings.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# (c) 2014 Copyright ownCloud GmbH -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING* file. - -if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments") - - # Fix sqlite compilation on macOS - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-incompatible-pointer-types-discards-qualifiers") - - if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") - # Fix sqlite compilation on MinGW - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-discarded-qualifiers") - - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion - OUTPUT_VARIABLE GCC_VERSION) - if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic") - else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") - endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") - endif() - - if(DEFINED MIRALL_FATAL_WARNINGS) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") - endif(DEFINED MIRALL_FATAL_WARNINGS) -endif() -- cgit v1.2.3