From dea7f60fa1ae6a46228daa36bcb3fec1a6c6ffc3 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 3 Nov 2013 17:55:39 +0100 Subject: Add FindCryptoPP to the cmake search stuf --- cmake/Modules/FindCryptopp.cmake | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 cmake/Modules/FindCryptopp.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindCryptopp.cmake b/cmake/Modules/FindCryptopp.cmake new file mode 100644 index 0000000..7a8ac31 --- /dev/null +++ b/cmake/Modules/FindCryptopp.cmake @@ -0,0 +1,35 @@ +# - Find Crypto++ + +if(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) + set(CRYPTO++_FOUND TRUE) + +else(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) + find_path(CRYPTO++_INCLUDE_DIR cryptlib.h + /usr/include/crypto++ + /usr/include/cryptopp + /usr/local/include/crypto++ + /usr/local/include/cryptopp + /opt/local/include/crypto++ + /opt/local/include/cryptopp + $ENV{SystemDrive}/Crypto++/include + ) + + find_library(CRYPTO++_LIBRARIES NAMES cryptopp + PATHS + /usr/lib + /usr/local/lib + /opt/local/lib + $ENV{SystemDrive}/Crypto++/lib + ) + + if(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) + set(CRYPTO++_FOUND TRUE) + message(STATUS "Found Crypto++: ${CRYPTO++_INCLUDE_DIR}, ${CRYPTO++_LIBRARIES}") + else(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) + set(CRYPTO++_FOUND FALSE) + message(STATUS "Crypto++ not found.") + endif(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) + + mark_as_advanced(CRYPTO++_INCLUDE_DIR CRYPTO++_LIBRARIES) + +endif(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) -- cgit v1.2.3 From ef014f7ddf8fd603a4238f5ed4878d7038ce162d Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 10 Nov 2013 03:18:08 +0100 Subject: Properly detect iconv features to compile --- cmake/Modules/FindIconv.cmake | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 cmake/Modules/FindIconv.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindIconv.cmake b/cmake/Modules/FindIconv.cmake new file mode 100644 index 0000000..c957af6 --- /dev/null +++ b/cmake/Modules/FindIconv.cmake @@ -0,0 +1,57 @@ +# - Try to find Iconv +# Once done this will define +# +# ICONV_FOUND - system has Iconv +# ICONV_INCLUDE_DIR - the Iconv include directory +# ICONV_LIBRARIES - Link these to use Iconv +# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const +# +include(CheckCXXSourceCompiles) + +IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + # Already in cache, be silent + SET(ICONV_FIND_QUIETLY TRUE) +ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +FIND_PATH(ICONV_INCLUDE_DIR iconv.h) + +FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) + +IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + SET(ICONV_FOUND TRUE) +ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) +set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) +IF(ICONV_FOUND) + check_cxx_source_compiles(" + #include + int main(){ + iconv_t conv = 0; + const char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0; + } +" ICONV_SECOND_ARGUMENT_IS_CONST ) +ENDIF(ICONV_FOUND) +set(CMAKE_REQUIRED_INCLUDES) +set(CMAKE_REQUIRED_LIBRARIES) + +IF(ICONV_FOUND) + IF(NOT ICONV_FIND_QUIETLY) + MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") + ENDIF(NOT ICONV_FIND_QUIETLY) +ELSE(ICONV_FOUND) + IF(Iconv_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Iconv") + ENDIF(Iconv_FIND_REQUIRED) +ENDIF(ICONV_FOUND) + +MARK_AS_ADVANCED( + ICONV_INCLUDE_DIR + ICONV_LIBRARIES + ICONV_SECOND_ARGUMENT_IS_CONST +) \ No newline at end of file -- cgit v1.2.3 From 2c9680bc0392a33d32b90723228ec60753070a9f Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Dec 2013 15:31:20 +0100 Subject: Rewrite the FindCryptopp cmake module cleanly --- cmake/Modules/FindCryptopp.cmake | 84 ++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 33 deletions(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindCryptopp.cmake b/cmake/Modules/FindCryptopp.cmake index 7a8ac31..9835b6f 100644 --- a/cmake/Modules/FindCryptopp.cmake +++ b/cmake/Modules/FindCryptopp.cmake @@ -1,35 +1,53 @@ # - Find Crypto++ +# Find the Crypto++ library +# +# This module defines the following variables: +# CRYPTO++_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# CRYPTO++_LIBRARIES - Where to find the library file +# CRYPTO++_INCLUDE_DIRS - The directory where to find the header files +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to way to write them. +# +# CRYPTOPP_FOUND +# +# CRYPTO++_LIBRARY +# CRYPTOPP_LIBRARY +# CRYPTOPP_LIBRARIES +# +# CRYPTO++_INCLUDE_DIR +# CRYPTOPP_INCLUDE_DIRS +# CRYPTOPP_INCLUDE_DIR +# +# This file is in the public domain. + +find_path(CRYPTO++_INCLUDE_DIRS NAMES cryptlib.h + PATH_SUFFIXES "crypto++" "cryptopp" + DOC "The Crypto++ include directory") + +find_library(CRYPTO++_LIBRARIES NAMES cryptopp + DOC "The Crypto++ library") + +# Use some standard module to handle the QUIETLY and REQUIRED arguments, and +# set CRYPTO++_FOUND to TRUE if these two variables are set. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Crypto++ REQUIRED_VARS CRYPTO++_LIBRARIES CRYPTO++_INCLUDE_DIRS) + +# Compatibility for all the ways of writing these variables +if(CRYPTO++_FOUND) + set(CRYPTOPP_FOUND ${CRYPTO++_FOUND}) + + set(CRYPTO++_LIBRARY ${CRYPTO++_LIBRARIES}) + set(CRYPTOPP_LIBRARY ${CRYPTO++_LIBRARIES}) + set(CRYPTOPP_LIBRARIES ${CRYPTO++_LIBRARIES}) + + set(CRYPTO++_INCLUDE_DIR ${CRYPTO++_INCLUDE_DIRS}) + set(CRYPTOPP_INCLUDE_DIR ${CRYPTO++_INCLUDE_DIRS}) + set(CRYPTOPP_INCLUDE_DIRS ${CRYPTO++_INCLUDE_DIRS}) +endif() + +mark_as_advanced(CRYPTO++_INCLUDE_DIRS CRYPTO++_LIBRARIES) + -if(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) - set(CRYPTO++_FOUND TRUE) - -else(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) - find_path(CRYPTO++_INCLUDE_DIR cryptlib.h - /usr/include/crypto++ - /usr/include/cryptopp - /usr/local/include/crypto++ - /usr/local/include/cryptopp - /opt/local/include/crypto++ - /opt/local/include/cryptopp - $ENV{SystemDrive}/Crypto++/include - ) - - find_library(CRYPTO++_LIBRARIES NAMES cryptopp - PATHS - /usr/lib - /usr/local/lib - /opt/local/lib - $ENV{SystemDrive}/Crypto++/lib - ) - - if(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) - set(CRYPTO++_FOUND TRUE) - message(STATUS "Found Crypto++: ${CRYPTO++_INCLUDE_DIR}, ${CRYPTO++_LIBRARIES}") - else(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) - set(CRYPTO++_FOUND FALSE) - message(STATUS "Crypto++ not found.") - endif(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) - - mark_as_advanced(CRYPTO++_INCLUDE_DIR CRYPTO++_LIBRARIES) - -endif(CRYPTO++_INCLUDE_DIR AND CRYPTO++_LIBRARIES) -- cgit v1.2.3 From fb01f78b0ac840387613bf671e980cead27f8fc0 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Dec 2013 15:32:14 +0100 Subject: Rewrite the FindIconv module cleanly --- cmake/Modules/FindIconv.cmake | 78 +++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 40 deletions(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindIconv.cmake b/cmake/Modules/FindIconv.cmake index c957af6..ac81a2c 100644 --- a/cmake/Modules/FindIconv.cmake +++ b/cmake/Modules/FindIconv.cmake @@ -1,29 +1,40 @@ -# - Try to find Iconv -# Once done this will define +# - Find iconv +# Find the iconv (character set conversion) library # -# ICONV_FOUND - system has Iconv -# ICONV_INCLUDE_DIR - the Iconv include directory -# ICONV_LIBRARIES - Link these to use Iconv -# ICONV_SECOND_ARGUMENT_IS_CONST - the second argument for iconv() is const +# This module defines the following variables: +# ICONV_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# ICONV_INCLUDE_DIRS - The directory where to find the header file +# ICONV_LIBRARIES - Where to find the library file +# ICONV_SECOND_ARGUMENT_IS_CONST - The second argument for iconv() is const # -include(CheckCXXSourceCompiles) - -IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - # Already in cache, be silent - SET(ICONV_FIND_QUIETLY TRUE) -ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to way to write them. +# ICONV_LIBRARY +# ICONV_INCLUDE_DIR +# +# This file is in the public domain -FIND_PATH(ICONV_INCLUDE_DIR iconv.h) +find_path(ICONV_INCLUDE_DIRS NAMES iconv.h + DOC "The iconv include directory") -FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) +find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c + DOC "The iconv library") -IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - SET(ICONV_FOUND TRUE) -ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) +# Use some standard module to handle the QUIETLY and REQUIRED arguments, and +# set ICONV_FOUND to TRUE if these two variables are set. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Iconv REQUIRED_VARS ICONV_LIBRARIES ICONV_INCLUDE_DIRS) -set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) -set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) -IF(ICONV_FOUND) +# Check if the prototype is +# size_t iconv(iconv_t cd, char** inbuf, size_t* inbytesleft, +# char** outbuf, size_t* outbytesleft); +# or +# size_t iconv (iconv_t cd, const char** inbuf, size_t* inbytesleft, +# char** outbuf, size_t* outbytesleft); +if(ICONV_FOUND) + include(CheckCXXSourceCompiles) check_cxx_source_compiles(" #include int main(){ @@ -33,25 +44,12 @@ IF(ICONV_FOUND) char* out = 0; size_t olen = 0; iconv(conv, &in, &ilen, &out, &olen); - return 0; - } -" ICONV_SECOND_ARGUMENT_IS_CONST ) -ENDIF(ICONV_FOUND) -set(CMAKE_REQUIRED_INCLUDES) -set(CMAKE_REQUIRED_LIBRARIES) + return 0;}" + ICONV_SECOND_ARGUMENT_IS_CONST) -IF(ICONV_FOUND) - IF(NOT ICONV_FIND_QUIETLY) - MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}") - ENDIF(NOT ICONV_FIND_QUIETLY) -ELSE(ICONV_FOUND) - IF(Iconv_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Iconv") - ENDIF(Iconv_FIND_REQUIRED) -ENDIF(ICONV_FOUND) +# Compatibility for all the ways of writing these variables + set(ICONV_LIBRARY ${ICONV_LIBRARIES}) + set(ICONV_INCLUDE_DIR ${ICONV_INCLUDE_DIRS}) +endif() -MARK_AS_ADVANCED( - ICONV_INCLUDE_DIR - ICONV_LIBRARIES - ICONV_SECOND_ARGUMENT_IS_CONST -) \ No newline at end of file +mark_as_advanced(ICONV_INCLUDE_DIRS ICONV_LIBRARIES ICONV_SECOND_ARGUMENT_IS_CONST) \ No newline at end of file -- cgit v1.2.3 From b11126a19dbaadf4c32fb8dbec22754ad0712c26 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Dec 2013 20:14:12 +0100 Subject: Provide a JID for IRC users, and add a stringprep dependency for this --- cmake/Modules/FindLibidn.cmake | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cmake/Modules/FindLibidn.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindLibidn.cmake b/cmake/Modules/FindLibidn.cmake new file mode 100644 index 0000000..4c0b2c5 --- /dev/null +++ b/cmake/Modules/FindLibidn.cmake @@ -0,0 +1,36 @@ +# - Find libidn +# Find the libidn library, and more particularly the stringprep header. +# +# This module defines the following variables: +# LIBIDN_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# LIBIDN_INCLUDE_DIRS - The directory where to find the header file +# LIBIDN_LIBRARIES - Where to find the library file +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to way to write them. +# LIBIDN_INCLUDE_DIR +# LIBIDN_LIBRARY +# +# This file is in the public domain + +find_path(LIBIDN_INCLUDE_DIRS NAMES stringprep.h + DOC "The libidn include directory") + +# The library containing the stringprep module is libidn +find_library(LIBIDN_LIBRARIES NAMES idn + DOC "The libidn library") + +# Use some standard module to handle the QUIETLY and REQUIRED arguments, and +# set LIBIDN_FOUND to TRUE if these two variables are set. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libidn REQUIRED_VARS LIBIDN_LIBRARIES LIBIDN_INCLUDE_DIRS) + +# Compatibility for all the ways of writing these variables +if(LIBIDN_FOUND) + set(LIBIDN_INCLUDE_DIR ${LIBIDN_INCLUDE_DIRS}) + set(LIBIDN_LIBRARY ${LIBIDN_LIBRARIES}) +endif() + +mark_as_advanced(LIBIDN_INCLUDE_DIRS LIBIDN_LIBRARIES) \ No newline at end of file -- cgit v1.2.3 From 48b4f7b83f9f8e6d89d56f5e24f0ed1d7c4676a1 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 12 Jan 2014 04:12:27 +0100 Subject: Remove cryptopp dependency, directly include a simple sha1 implementation --- cmake/Modules/FindCryptopp.cmake | 53 ---------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 cmake/Modules/FindCryptopp.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindCryptopp.cmake b/cmake/Modules/FindCryptopp.cmake deleted file mode 100644 index 9835b6f..0000000 --- a/cmake/Modules/FindCryptopp.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# - Find Crypto++ -# Find the Crypto++ library -# -# This module defines the following variables: -# CRYPTO++_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# CRYPTO++_LIBRARIES - Where to find the library file -# CRYPTO++_INCLUDE_DIRS - The directory where to find the header files -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to way to write them. -# -# CRYPTOPP_FOUND -# -# CRYPTO++_LIBRARY -# CRYPTOPP_LIBRARY -# CRYPTOPP_LIBRARIES -# -# CRYPTO++_INCLUDE_DIR -# CRYPTOPP_INCLUDE_DIRS -# CRYPTOPP_INCLUDE_DIR -# -# This file is in the public domain. - -find_path(CRYPTO++_INCLUDE_DIRS NAMES cryptlib.h - PATH_SUFFIXES "crypto++" "cryptopp" - DOC "The Crypto++ include directory") - -find_library(CRYPTO++_LIBRARIES NAMES cryptopp - DOC "The Crypto++ library") - -# Use some standard module to handle the QUIETLY and REQUIRED arguments, and -# set CRYPTO++_FOUND to TRUE if these two variables are set. -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Crypto++ REQUIRED_VARS CRYPTO++_LIBRARIES CRYPTO++_INCLUDE_DIRS) - -# Compatibility for all the ways of writing these variables -if(CRYPTO++_FOUND) - set(CRYPTOPP_FOUND ${CRYPTO++_FOUND}) - - set(CRYPTO++_LIBRARY ${CRYPTO++_LIBRARIES}) - set(CRYPTOPP_LIBRARY ${CRYPTO++_LIBRARIES}) - set(CRYPTOPP_LIBRARIES ${CRYPTO++_LIBRARIES}) - - set(CRYPTO++_INCLUDE_DIR ${CRYPTO++_INCLUDE_DIRS}) - set(CRYPTOPP_INCLUDE_DIR ${CRYPTO++_INCLUDE_DIRS}) - set(CRYPTOPP_INCLUDE_DIRS ${CRYPTO++_INCLUDE_DIRS}) -endif() - -mark_as_advanced(CRYPTO++_INCLUDE_DIRS CRYPTO++_LIBRARIES) - - -- cgit v1.2.3 From 293cab0d3797dc244e9dc0844b4522d05ac844c5 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 19 Feb 2014 01:11:46 +0100 Subject: Fix FindIconv cmake module to correctly compile the c++ test code --- cmake/Modules/FindIconv.cmake | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindIconv.cmake b/cmake/Modules/FindIconv.cmake index ac81a2c..d4f8181 100644 --- a/cmake/Modules/FindIconv.cmake +++ b/cmake/Modules/FindIconv.cmake @@ -35,17 +35,22 @@ find_package_handle_standard_args(Iconv REQUIRED_VARS ICONV_LIBRARIES ICONV_INCL # char** outbuf, size_t* outbytesleft); if(ICONV_FOUND) include(CheckCXXSourceCompiles) - check_cxx_source_compiles(" - #include - int main(){ - iconv_t conv = 0; - const char* in = 0; - size_t ilen = 0; - char* out = 0; - size_t olen = 0; - iconv(conv, &in, &ilen, &out, &olen); - return 0;}" - ICONV_SECOND_ARGUMENT_IS_CONST) + + # Set the parameters needed to compile the following code. + set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) + + check_cxx_source_compiles(" + #include + int main(){ + iconv_t conv = 0; + const char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0;}" + ICONV_SECOND_ARGUMENT_IS_CONST) # Compatibility for all the ways of writing these variables set(ICONV_LIBRARY ${ICONV_LIBRARIES}) -- cgit v1.2.3 From 754dd898a7f93689aff22dcfbe71d6ca0095e019 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 19 Feb 2014 01:48:55 +0100 Subject: Fix a typo in Find* comments --- cmake/Modules/FindIconv.cmake | 2 +- cmake/Modules/FindLibidn.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindIconv.cmake b/cmake/Modules/FindIconv.cmake index d4f8181..7ca173f 100644 --- a/cmake/Modules/FindIconv.cmake +++ b/cmake/Modules/FindIconv.cmake @@ -10,7 +10,7 @@ # # For conveniance, these variables are also set. They have the same values # than the variables above. The user can thus choose his/her prefered way -# to way to write them. +# to write them. # ICONV_LIBRARY # ICONV_INCLUDE_DIR # diff --git a/cmake/Modules/FindLibidn.cmake b/cmake/Modules/FindLibidn.cmake index 4c0b2c5..5434127 100644 --- a/cmake/Modules/FindLibidn.cmake +++ b/cmake/Modules/FindLibidn.cmake @@ -9,7 +9,7 @@ # # For conveniance, these variables are also set. They have the same values # than the variables above. The user can thus choose his/her prefered way -# to way to write them. +# to write them. # LIBIDN_INCLUDE_DIR # LIBIDN_LIBRARY # -- cgit v1.2.3 From 9d8166f10d1f14acb936b58fd2907184b1eeadad Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 15 Apr 2014 07:02:09 +0200 Subject: Add support for systemd-daemon --- cmake/Modules/FindSystemdDaemon.cmake | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 cmake/Modules/FindSystemdDaemon.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindSystemdDaemon.cmake b/cmake/Modules/FindSystemdDaemon.cmake new file mode 100644 index 0000000..b653889 --- /dev/null +++ b/cmake/Modules/FindSystemdDaemon.cmake @@ -0,0 +1,34 @@ +# - Find SystemdDaemon +# Find the systemd daemon library +# +# This module defines the following variables: +# SYSTEMDDAEMON_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# SYSTEMDDAEMON_INCLUDE_DIRS - The directory where to find the header file +# SYSTEMDDAEMON_LIBRARIES - Where to find the library file +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# SYSTEMDDAEMON_LIBRARY +# SYSTEMDDAEMON_INCLUDE_DIR +# +# This file is in the public domain + +find_path(SYSTEMDDAEMON_INCLUDE_DIRS NAMES systemd/sd-daemon.h + DOC "The Systemd Daemon include directory") + +find_library(SYSTEMDDAEMON_LIBRARIES NAMES systemd-daemon + DOC "The Systemd Daemon library") + +# Use some standard module to handle the QUIETLY and REQUIRED arguments, and +# set SYSTEMDDAEMON_FOUND to TRUE if these two variables are set. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SystemdDaemon REQUIRED_VARS SYSTEMDDAEMON_LIBRARIES SYSTEMDDAEMON_INCLUDE_DIRS) + +if(SYSTEMDDAEMON_FOUND) + set(SYSTEMDDAEMON_LIBRARY ${SYSTEMDDAEMON_LIBRARIES}) + set(SYSTEMDDAEMON_INCLUDE_DIR ${SYSTEMDDAEMON_INCLUDE_DIRS}) +endif() + +mark_as_advanced(SYSTEMDDAEMON_INCLUDE_DIRS SYSTEMDDAEMON_LIBRARIES) \ No newline at end of file -- cgit v1.2.3 From dd552b1e3401fed2bbce61c02fe68f8776d95da3 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 30 Apr 2014 02:03:24 +0200 Subject: Link with systemd instead of systemd-daemon --- cmake/Modules/FindSystemdDaemon.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindSystemdDaemon.cmake b/cmake/Modules/FindSystemdDaemon.cmake index b653889..441ac47 100644 --- a/cmake/Modules/FindSystemdDaemon.cmake +++ b/cmake/Modules/FindSystemdDaemon.cmake @@ -18,7 +18,7 @@ find_path(SYSTEMDDAEMON_INCLUDE_DIRS NAMES systemd/sd-daemon.h DOC "The Systemd Daemon include directory") -find_library(SYSTEMDDAEMON_LIBRARIES NAMES systemd-daemon +find_library(SYSTEMDDAEMON_LIBRARIES NAMES systemd DOC "The Systemd Daemon library") # Use some standard module to handle the QUIETLY and REQUIRED arguments, and -- cgit v1.2.3 From 8eb9e535a3514a7d9254819f499dcb169c56b51e Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 30 May 2014 13:12:33 +0200 Subject: Use pkg-config first to find libraries --- cmake/Modules/FindLibidn.cmake | 31 ++++++++++++++++++------------- cmake/Modules/FindSystemdDaemon.cmake | 27 ++++++++++++++++----------- 2 files changed, 34 insertions(+), 24 deletions(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindLibidn.cmake b/cmake/Modules/FindLibidn.cmake index 5434127..611a6a8 100644 --- a/cmake/Modules/FindLibidn.cmake +++ b/cmake/Modules/FindLibidn.cmake @@ -15,22 +15,27 @@ # # This file is in the public domain -find_path(LIBIDN_INCLUDE_DIRS NAMES stringprep.h - DOC "The libidn include directory") +include(FindPkgConfig) +pkg_check_modules(LIBIDN libidn) -# The library containing the stringprep module is libidn -find_library(LIBIDN_LIBRARIES NAMES idn - DOC "The libidn library") +if(NOT LIBIDN_FOUND) + find_path(LIBIDN_INCLUDE_DIRS NAMES stringprep.h + DOC "The libidn include directory") -# Use some standard module to handle the QUIETLY and REQUIRED arguments, and -# set LIBIDN_FOUND to TRUE if these two variables are set. -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Libidn REQUIRED_VARS LIBIDN_LIBRARIES LIBIDN_INCLUDE_DIRS) + # The library containing the stringprep module is libidn + find_library(LIBIDN_LIBRARIES NAMES idn + DOC "The libidn library") -# Compatibility for all the ways of writing these variables -if(LIBIDN_FOUND) - set(LIBIDN_INCLUDE_DIR ${LIBIDN_INCLUDE_DIRS}) - set(LIBIDN_LIBRARY ${LIBIDN_LIBRARIES}) + # Use some standard module to handle the QUIETLY and REQUIRED arguments, and + # set LIBIDN_FOUND to TRUE if these two variables are set. + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(LIBIDN REQUIRED_VARS LIBIDN_LIBRARIES LIBIDN_INCLUDE_DIRS) + + # Compatibility for all the ways of writing these variables + if(LIBIDN_FOUND) + set(LIBIDN_INCLUDE_DIR ${LIBIDN_INCLUDE_DIRS}) + set(LIBIDN_LIBRARY ${LIBIDN_LIBRARIES}) + endif() endif() mark_as_advanced(LIBIDN_INCLUDE_DIRS LIBIDN_LIBRARIES) \ No newline at end of file diff --git a/cmake/Modules/FindSystemdDaemon.cmake b/cmake/Modules/FindSystemdDaemon.cmake index 441ac47..9492bf2 100644 --- a/cmake/Modules/FindSystemdDaemon.cmake +++ b/cmake/Modules/FindSystemdDaemon.cmake @@ -15,20 +15,25 @@ # # This file is in the public domain -find_path(SYSTEMDDAEMON_INCLUDE_DIRS NAMES systemd/sd-daemon.h - DOC "The Systemd Daemon include directory") +include(FindPkgConfig) +pkg_check_modules(SYSTEMDDAEMON libsystemd-daemon) -find_library(SYSTEMDDAEMON_LIBRARIES NAMES systemd - DOC "The Systemd Daemon library") +if(NOT SYSTEMDDAEMON_FOUND) + find_path(SYSTEMDDAEMON_INCLUDE_DIRS NAMES systemd/sd-daemon.h + DOC "The Systemd Daemon include directory") -# Use some standard module to handle the QUIETLY and REQUIRED arguments, and -# set SYSTEMDDAEMON_FOUND to TRUE if these two variables are set. -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SystemdDaemon REQUIRED_VARS SYSTEMDDAEMON_LIBRARIES SYSTEMDDAEMON_INCLUDE_DIRS) + find_library(SYSTEMDDAEMON_LIBRARIES NAMES systemd-daemon systemd + DOC "The Systemd Daemon library") -if(SYSTEMDDAEMON_FOUND) - set(SYSTEMDDAEMON_LIBRARY ${SYSTEMDDAEMON_LIBRARIES}) - set(SYSTEMDDAEMON_INCLUDE_DIR ${SYSTEMDDAEMON_INCLUDE_DIRS}) + # Use some standard module to handle the QUIETLY and REQUIRED arguments, and + # set SYSTEMDDAEMON_FOUND to TRUE if these two variables are set. + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(SYSTEMDDAEMON REQUIRED_VARS SYSTEMDDAEMON_LIBRARIES SYSTEMDDAEMON_INCLUDE_DIRS) + + if(SYSTEMDDAEMON_FOUND) + set(SYSTEMDDAEMON_LIBRARY ${SYSTEMDDAEMON_LIBRARIES}) + set(SYSTEMDDAEMON_INCLUDE_DIR ${SYSTEMDDAEMON_INCLUDE_DIRS}) + endif() endif() mark_as_advanced(SYSTEMDDAEMON_INCLUDE_DIRS SYSTEMDDAEMON_LIBRARIES) \ No newline at end of file -- cgit v1.2.3 From a63faf6fa95017dbbfeaf0ff43fdb526c4ae7068 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 30 May 2014 13:39:00 +0200 Subject: Use libuuid to generate unique IDs for iq and adhoc sessions --- cmake/Modules/FindLibuuid.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 cmake/Modules/FindLibuuid.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindLibuuid.cmake b/cmake/Modules/FindLibuuid.cmake new file mode 100644 index 0000000..25b330b --- /dev/null +++ b/cmake/Modules/FindLibuuid.cmake @@ -0,0 +1,41 @@ +# - Find libuuid +# Find the libuuid library +# +# This module defines the following variables: +# LIBUUID_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# LIBUUID_INCLUDE_DIRS - The directory where to find the header file +# LIBUUID_LIBRARIES - Where to find the library file +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# LIBUUID_INCLUDE_DIR +# LIBUUID_LIBRARY +# +# This file is in the public domain + +include(FindPkgConfig) +pkg_check_modules(LIBUUID uuid) + +if(NOT LIBUUID_FOUND) + find_path(LIBUUID_INCLUDE_DIRS NAMES uuid.h + PATH uuid + DOC "The libuuid include directory") + + find_library(LIBUUID_LIBRARIES NAMES uuid + DOC "The libuuid library") + + # Use some standard module to handle the QUIETLY and REQUIRED arguments, and + # set LIBUUID_FOUND to TRUE if these two variables are set. + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(LIBUUID REQUIRED_VARS LIBUUID_LIBRARIES LIBUUID_INCLUDE_DIRS) + + # Compatibility for all the ways of writing these variables + if(LIBUUID_FOUND) + set(LIBUUID_INCLUDE_DIR ${LIBUUID_INCLUDE_DIRS}) + set(LIBUUID_LIBRARY ${LIBUUID_LIBRARIES}) + endif() +endif() + +mark_as_advanced(LIBUUID_INCLUDE_DIRS LIBUUID_LIBRARIES) -- cgit v1.2.3 From 23f32ba39ebe5e9bbdfc4dd00d9914c0f0447ef4 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 18 May 2014 20:23:08 +0200 Subject: Implement TLS support using Botan For now, it tries two TLS ports and then connects to the non-tls port. In the future we would like the user to be able to configure that. fix #2435 --- cmake/Modules/FindBotan.cmake | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 cmake/Modules/FindBotan.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindBotan.cmake b/cmake/Modules/FindBotan.cmake new file mode 100644 index 0000000..f53680d --- /dev/null +++ b/cmake/Modules/FindBotan.cmake @@ -0,0 +1,34 @@ +# - Find botan +# Find the botan cryptographic library +# +# This module defines the following variables: +# BOTAN_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# BOTAN_INCLUDE_DIRS - The directory where to find the header file +# BOTAN_LIBRARIES - Where to find the library file +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# BOTAN_LIBRARY +# BOTAN_INCLUDE_DIR +# +# This file is in the public domain + +find_path(BOTAN_INCLUDE_DIRS NAMES botan/botan.h + DOC "The botan include directory") + +find_library(BOTAN_LIBRARIES NAMES botan + DOC "The botan library") + +# Use some standard module to handle the QUIETLY and REQUIRED arguments, and +# set BOTAN_FOUND to TRUE if these two variables are set. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Botan REQUIRED_VARS BOTAN_LIBRARIES BOTAN_INCLUDE_DIRS) + +if(BOTAN_FOUND) + set(BOTAN_LIBRARY ${BOTAN_LIBRARIES}) + set(BOTAN_INCLUDE_DIR ${BOTAN_INCLUDE_DIRS}) +endif() + +mark_as_advanced(BOTAN_INCLUDE_DIRS BOTAN_LIBRARIES) -- cgit v1.2.3 From 800d7df9aaff31b30f2762f5ae6d0dc0378ecef0 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 8 Jun 2014 12:59:50 +0200 Subject: Properly search for libbotan even in a botan-1.11 subdirectory --- cmake/Modules/FindBotan.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindBotan.cmake b/cmake/Modules/FindBotan.cmake index f53680d..aa8f58c 100644 --- a/cmake/Modules/FindBotan.cmake +++ b/cmake/Modules/FindBotan.cmake @@ -16,9 +16,10 @@ # This file is in the public domain find_path(BOTAN_INCLUDE_DIRS NAMES botan/botan.h + PATH_SUFFIXES botan-1.11 DOC "The botan include directory") -find_library(BOTAN_LIBRARIES NAMES botan +find_library(BOTAN_LIBRARIES NAMES botan botan-1.11 DOC "The botan library") # Use some standard module to handle the QUIETLY and REQUIRED arguments, and -- cgit v1.2.3 From 2bb4a347cdfbee92334d5340ba640c8680a81d9e Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 13 Nov 2014 06:22:17 +0100 Subject: Improve dependencies checks in the build process - Rename all Find*.cmake files to uppercase, to make things more consistent, and fix some issues with them (notably the REQUIRED flag) - Rename SYSTEMDDAEMON to SYSTEMD and only use the libsystemd instead of libsystemd-daemon because it's deprecated for a long time now - Provide a WITH_* and WITHOUT_* switch for all optional dependencies - Document things in the INSTALL file --- cmake/Modules/FindBOTAN.cmake | 35 ++++++++++++++++++++ cmake/Modules/FindBotan.cmake | 35 -------------------- cmake/Modules/FindICONV.cmake | 60 +++++++++++++++++++++++++++++++++++ cmake/Modules/FindIconv.cmake | 60 ----------------------------------- cmake/Modules/FindLIBIDN.cmake | 41 ++++++++++++++++++++++++ cmake/Modules/FindLIBUUID.cmake | 41 ++++++++++++++++++++++++ cmake/Modules/FindLibidn.cmake | 41 ------------------------ cmake/Modules/FindLibuuid.cmake | 41 ------------------------ cmake/Modules/FindSYSTEMD.cmake | 39 +++++++++++++++++++++++ cmake/Modules/FindSystemdDaemon.cmake | 39 ----------------------- 10 files changed, 216 insertions(+), 216 deletions(-) create mode 100644 cmake/Modules/FindBOTAN.cmake delete mode 100644 cmake/Modules/FindBotan.cmake create mode 100644 cmake/Modules/FindICONV.cmake delete mode 100644 cmake/Modules/FindIconv.cmake create mode 100644 cmake/Modules/FindLIBIDN.cmake create mode 100644 cmake/Modules/FindLIBUUID.cmake delete mode 100644 cmake/Modules/FindLibidn.cmake delete mode 100644 cmake/Modules/FindLibuuid.cmake create mode 100644 cmake/Modules/FindSYSTEMD.cmake delete mode 100644 cmake/Modules/FindSystemdDaemon.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindBOTAN.cmake b/cmake/Modules/FindBOTAN.cmake new file mode 100644 index 0000000..a12bd35 --- /dev/null +++ b/cmake/Modules/FindBOTAN.cmake @@ -0,0 +1,35 @@ +# - Find botan +# Find the botan cryptographic library +# +# This module defines the following variables: +# BOTAN_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# BOTAN_INCLUDE_DIRS - The directory where to find the header file +# BOTAN_LIBRARIES - Where to find the library file +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# BOTAN_LIBRARY +# BOTAN_INCLUDE_DIR +# +# This file is in the public domain + +find_path(BOTAN_INCLUDE_DIRS NAMES botan/botan.h + PATH_SUFFIXES botan-1.11 + DOC "The botan include directory") + +find_library(BOTAN_LIBRARIES NAMES botan botan-1.11 + DOC "The botan library") + +# Use some standard module to handle the QUIETLY and REQUIRED arguments, and +# set BOTAN_FOUND to TRUE if these two variables are set. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(BOTAN REQUIRED_VARS BOTAN_LIBRARIES BOTAN_INCLUDE_DIRS) + +if(BOTAN_FOUND) + set(BOTAN_LIBRARY ${BOTAN_LIBRARIES}) + set(BOTAN_INCLUDE_DIR ${BOTAN_INCLUDE_DIRS}) +endif() + +mark_as_advanced(BOTAN_INCLUDE_DIRS BOTAN_LIBRARIES) diff --git a/cmake/Modules/FindBotan.cmake b/cmake/Modules/FindBotan.cmake deleted file mode 100644 index aa8f58c..0000000 --- a/cmake/Modules/FindBotan.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# - Find botan -# Find the botan cryptographic library -# -# This module defines the following variables: -# BOTAN_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# BOTAN_INCLUDE_DIRS - The directory where to find the header file -# BOTAN_LIBRARIES - Where to find the library file -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# BOTAN_LIBRARY -# BOTAN_INCLUDE_DIR -# -# This file is in the public domain - -find_path(BOTAN_INCLUDE_DIRS NAMES botan/botan.h - PATH_SUFFIXES botan-1.11 - DOC "The botan include directory") - -find_library(BOTAN_LIBRARIES NAMES botan botan-1.11 - DOC "The botan library") - -# Use some standard module to handle the QUIETLY and REQUIRED arguments, and -# set BOTAN_FOUND to TRUE if these two variables are set. -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Botan REQUIRED_VARS BOTAN_LIBRARIES BOTAN_INCLUDE_DIRS) - -if(BOTAN_FOUND) - set(BOTAN_LIBRARY ${BOTAN_LIBRARIES}) - set(BOTAN_INCLUDE_DIR ${BOTAN_INCLUDE_DIRS}) -endif() - -mark_as_advanced(BOTAN_INCLUDE_DIRS BOTAN_LIBRARIES) diff --git a/cmake/Modules/FindICONV.cmake b/cmake/Modules/FindICONV.cmake new file mode 100644 index 0000000..7ca173f --- /dev/null +++ b/cmake/Modules/FindICONV.cmake @@ -0,0 +1,60 @@ +# - Find iconv +# Find the iconv (character set conversion) library +# +# This module defines the following variables: +# ICONV_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# ICONV_INCLUDE_DIRS - The directory where to find the header file +# ICONV_LIBRARIES - Where to find the library file +# ICONV_SECOND_ARGUMENT_IS_CONST - The second argument for iconv() is const +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# ICONV_LIBRARY +# ICONV_INCLUDE_DIR +# +# This file is in the public domain + +find_path(ICONV_INCLUDE_DIRS NAMES iconv.h + DOC "The iconv include directory") + +find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c + DOC "The iconv library") + +# Use some standard module to handle the QUIETLY and REQUIRED arguments, and +# set ICONV_FOUND to TRUE if these two variables are set. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Iconv REQUIRED_VARS ICONV_LIBRARIES ICONV_INCLUDE_DIRS) + +# Check if the prototype is +# size_t iconv(iconv_t cd, char** inbuf, size_t* inbytesleft, +# char** outbuf, size_t* outbytesleft); +# or +# size_t iconv (iconv_t cd, const char** inbuf, size_t* inbytesleft, +# char** outbuf, size_t* outbytesleft); +if(ICONV_FOUND) + include(CheckCXXSourceCompiles) + + # Set the parameters needed to compile the following code. + set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) + + check_cxx_source_compiles(" + #include + int main(){ + iconv_t conv = 0; + const char* in = 0; + size_t ilen = 0; + char* out = 0; + size_t olen = 0; + iconv(conv, &in, &ilen, &out, &olen); + return 0;}" + ICONV_SECOND_ARGUMENT_IS_CONST) + +# Compatibility for all the ways of writing these variables + set(ICONV_LIBRARY ${ICONV_LIBRARIES}) + set(ICONV_INCLUDE_DIR ${ICONV_INCLUDE_DIRS}) +endif() + +mark_as_advanced(ICONV_INCLUDE_DIRS ICONV_LIBRARIES ICONV_SECOND_ARGUMENT_IS_CONST) \ No newline at end of file diff --git a/cmake/Modules/FindIconv.cmake b/cmake/Modules/FindIconv.cmake deleted file mode 100644 index 7ca173f..0000000 --- a/cmake/Modules/FindIconv.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# - Find iconv -# Find the iconv (character set conversion) library -# -# This module defines the following variables: -# ICONV_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# ICONV_INCLUDE_DIRS - The directory where to find the header file -# ICONV_LIBRARIES - Where to find the library file -# ICONV_SECOND_ARGUMENT_IS_CONST - The second argument for iconv() is const -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# ICONV_LIBRARY -# ICONV_INCLUDE_DIR -# -# This file is in the public domain - -find_path(ICONV_INCLUDE_DIRS NAMES iconv.h - DOC "The iconv include directory") - -find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c - DOC "The iconv library") - -# Use some standard module to handle the QUIETLY and REQUIRED arguments, and -# set ICONV_FOUND to TRUE if these two variables are set. -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Iconv REQUIRED_VARS ICONV_LIBRARIES ICONV_INCLUDE_DIRS) - -# Check if the prototype is -# size_t iconv(iconv_t cd, char** inbuf, size_t* inbytesleft, -# char** outbuf, size_t* outbytesleft); -# or -# size_t iconv (iconv_t cd, const char** inbuf, size_t* inbytesleft, -# char** outbuf, size_t* outbytesleft); -if(ICONV_FOUND) - include(CheckCXXSourceCompiles) - - # Set the parameters needed to compile the following code. - set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIRS}) - set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) - - check_cxx_source_compiles(" - #include - int main(){ - iconv_t conv = 0; - const char* in = 0; - size_t ilen = 0; - char* out = 0; - size_t olen = 0; - iconv(conv, &in, &ilen, &out, &olen); - return 0;}" - ICONV_SECOND_ARGUMENT_IS_CONST) - -# Compatibility for all the ways of writing these variables - set(ICONV_LIBRARY ${ICONV_LIBRARIES}) - set(ICONV_INCLUDE_DIR ${ICONV_INCLUDE_DIRS}) -endif() - -mark_as_advanced(ICONV_INCLUDE_DIRS ICONV_LIBRARIES ICONV_SECOND_ARGUMENT_IS_CONST) \ No newline at end of file diff --git a/cmake/Modules/FindLIBIDN.cmake b/cmake/Modules/FindLIBIDN.cmake new file mode 100644 index 0000000..611a6a8 --- /dev/null +++ b/cmake/Modules/FindLIBIDN.cmake @@ -0,0 +1,41 @@ +# - Find libidn +# Find the libidn library, and more particularly the stringprep header. +# +# This module defines the following variables: +# LIBIDN_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# LIBIDN_INCLUDE_DIRS - The directory where to find the header file +# LIBIDN_LIBRARIES - Where to find the library file +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# LIBIDN_INCLUDE_DIR +# LIBIDN_LIBRARY +# +# This file is in the public domain + +include(FindPkgConfig) +pkg_check_modules(LIBIDN libidn) + +if(NOT LIBIDN_FOUND) + find_path(LIBIDN_INCLUDE_DIRS NAMES stringprep.h + DOC "The libidn include directory") + + # The library containing the stringprep module is libidn + find_library(LIBIDN_LIBRARIES NAMES idn + DOC "The libidn library") + + # Use some standard module to handle the QUIETLY and REQUIRED arguments, and + # set LIBIDN_FOUND to TRUE if these two variables are set. + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(LIBIDN REQUIRED_VARS LIBIDN_LIBRARIES LIBIDN_INCLUDE_DIRS) + + # Compatibility for all the ways of writing these variables + if(LIBIDN_FOUND) + set(LIBIDN_INCLUDE_DIR ${LIBIDN_INCLUDE_DIRS}) + set(LIBIDN_LIBRARY ${LIBIDN_LIBRARIES}) + endif() +endif() + +mark_as_advanced(LIBIDN_INCLUDE_DIRS LIBIDN_LIBRARIES) \ No newline at end of file diff --git a/cmake/Modules/FindLIBUUID.cmake b/cmake/Modules/FindLIBUUID.cmake new file mode 100644 index 0000000..25b330b --- /dev/null +++ b/cmake/Modules/FindLIBUUID.cmake @@ -0,0 +1,41 @@ +# - Find libuuid +# Find the libuuid library +# +# This module defines the following variables: +# LIBUUID_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# LIBUUID_INCLUDE_DIRS - The directory where to find the header file +# LIBUUID_LIBRARIES - Where to find the library file +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# LIBUUID_INCLUDE_DIR +# LIBUUID_LIBRARY +# +# This file is in the public domain + +include(FindPkgConfig) +pkg_check_modules(LIBUUID uuid) + +if(NOT LIBUUID_FOUND) + find_path(LIBUUID_INCLUDE_DIRS NAMES uuid.h + PATH uuid + DOC "The libuuid include directory") + + find_library(LIBUUID_LIBRARIES NAMES uuid + DOC "The libuuid library") + + # Use some standard module to handle the QUIETLY and REQUIRED arguments, and + # set LIBUUID_FOUND to TRUE if these two variables are set. + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(LIBUUID REQUIRED_VARS LIBUUID_LIBRARIES LIBUUID_INCLUDE_DIRS) + + # Compatibility for all the ways of writing these variables + if(LIBUUID_FOUND) + set(LIBUUID_INCLUDE_DIR ${LIBUUID_INCLUDE_DIRS}) + set(LIBUUID_LIBRARY ${LIBUUID_LIBRARIES}) + endif() +endif() + +mark_as_advanced(LIBUUID_INCLUDE_DIRS LIBUUID_LIBRARIES) diff --git a/cmake/Modules/FindLibidn.cmake b/cmake/Modules/FindLibidn.cmake deleted file mode 100644 index 611a6a8..0000000 --- a/cmake/Modules/FindLibidn.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# - Find libidn -# Find the libidn library, and more particularly the stringprep header. -# -# This module defines the following variables: -# LIBIDN_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# LIBIDN_INCLUDE_DIRS - The directory where to find the header file -# LIBIDN_LIBRARIES - Where to find the library file -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# LIBIDN_INCLUDE_DIR -# LIBIDN_LIBRARY -# -# This file is in the public domain - -include(FindPkgConfig) -pkg_check_modules(LIBIDN libidn) - -if(NOT LIBIDN_FOUND) - find_path(LIBIDN_INCLUDE_DIRS NAMES stringprep.h - DOC "The libidn include directory") - - # The library containing the stringprep module is libidn - find_library(LIBIDN_LIBRARIES NAMES idn - DOC "The libidn library") - - # Use some standard module to handle the QUIETLY and REQUIRED arguments, and - # set LIBIDN_FOUND to TRUE if these two variables are set. - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LIBIDN REQUIRED_VARS LIBIDN_LIBRARIES LIBIDN_INCLUDE_DIRS) - - # Compatibility for all the ways of writing these variables - if(LIBIDN_FOUND) - set(LIBIDN_INCLUDE_DIR ${LIBIDN_INCLUDE_DIRS}) - set(LIBIDN_LIBRARY ${LIBIDN_LIBRARIES}) - endif() -endif() - -mark_as_advanced(LIBIDN_INCLUDE_DIRS LIBIDN_LIBRARIES) \ No newline at end of file diff --git a/cmake/Modules/FindLibuuid.cmake b/cmake/Modules/FindLibuuid.cmake deleted file mode 100644 index 25b330b..0000000 --- a/cmake/Modules/FindLibuuid.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# - Find libuuid -# Find the libuuid library -# -# This module defines the following variables: -# LIBUUID_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# LIBUUID_INCLUDE_DIRS - The directory where to find the header file -# LIBUUID_LIBRARIES - Where to find the library file -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# LIBUUID_INCLUDE_DIR -# LIBUUID_LIBRARY -# -# This file is in the public domain - -include(FindPkgConfig) -pkg_check_modules(LIBUUID uuid) - -if(NOT LIBUUID_FOUND) - find_path(LIBUUID_INCLUDE_DIRS NAMES uuid.h - PATH uuid - DOC "The libuuid include directory") - - find_library(LIBUUID_LIBRARIES NAMES uuid - DOC "The libuuid library") - - # Use some standard module to handle the QUIETLY and REQUIRED arguments, and - # set LIBUUID_FOUND to TRUE if these two variables are set. - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LIBUUID REQUIRED_VARS LIBUUID_LIBRARIES LIBUUID_INCLUDE_DIRS) - - # Compatibility for all the ways of writing these variables - if(LIBUUID_FOUND) - set(LIBUUID_INCLUDE_DIR ${LIBUUID_INCLUDE_DIRS}) - set(LIBUUID_LIBRARY ${LIBUUID_LIBRARIES}) - endif() -endif() - -mark_as_advanced(LIBUUID_INCLUDE_DIRS LIBUUID_LIBRARIES) diff --git a/cmake/Modules/FindSYSTEMD.cmake b/cmake/Modules/FindSYSTEMD.cmake new file mode 100644 index 0000000..c7decde --- /dev/null +++ b/cmake/Modules/FindSYSTEMD.cmake @@ -0,0 +1,39 @@ +# - Find SystemdDaemon +# Find the systemd daemon library +# +# This module defines the following variables: +# SYSTEMD_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# SYSTEMD_INCLUDE_DIRS - The directory where to find the header file +# SYSTEMD_LIBRARIES - Where to find the library file +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# SYSTEMD_LIBRARY +# SYSTEMD_INCLUDE_DIR +# +# This file is in the public domain + +include(FindPkgConfig) +pkg_check_modules(SYSTEMD libsystemd) + +if(NOT SYSTEMD_FOUND) + find_path(SYSTEMD_INCLUDE_DIRS NAMES systemd/sd-daemon.h + DOC "The Systemd include directory") + + find_library(SYSTEMD_LIBRARIES NAMES systemd + DOC "The Systemd library") + + # Use some standard module to handle the QUIETLY and REQUIRED arguments, and + # set SYSTEMD_FOUND to TRUE if these two variables are set. + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(SYSTEMD REQUIRED_VARS SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS) + + if(SYSTEMD_FOUND) + set(SYSTEMD_LIBRARY ${SYSTEMD_LIBRARIES}) + set(SYSTEMD_INCLUDE_DIR ${SYSTEMD_INCLUDE_DIRS}) + endif() +endif() + +mark_as_advanced(SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES) \ No newline at end of file diff --git a/cmake/Modules/FindSystemdDaemon.cmake b/cmake/Modules/FindSystemdDaemon.cmake deleted file mode 100644 index 9492bf2..0000000 --- a/cmake/Modules/FindSystemdDaemon.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# - Find SystemdDaemon -# Find the systemd daemon library -# -# This module defines the following variables: -# SYSTEMDDAEMON_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# SYSTEMDDAEMON_INCLUDE_DIRS - The directory where to find the header file -# SYSTEMDDAEMON_LIBRARIES - Where to find the library file -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# SYSTEMDDAEMON_LIBRARY -# SYSTEMDDAEMON_INCLUDE_DIR -# -# This file is in the public domain - -include(FindPkgConfig) -pkg_check_modules(SYSTEMDDAEMON libsystemd-daemon) - -if(NOT SYSTEMDDAEMON_FOUND) - find_path(SYSTEMDDAEMON_INCLUDE_DIRS NAMES systemd/sd-daemon.h - DOC "The Systemd Daemon include directory") - - find_library(SYSTEMDDAEMON_LIBRARIES NAMES systemd-daemon systemd - DOC "The Systemd Daemon library") - - # Use some standard module to handle the QUIETLY and REQUIRED arguments, and - # set SYSTEMDDAEMON_FOUND to TRUE if these two variables are set. - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(SYSTEMDDAEMON REQUIRED_VARS SYSTEMDDAEMON_LIBRARIES SYSTEMDDAEMON_INCLUDE_DIRS) - - if(SYSTEMDDAEMON_FOUND) - set(SYSTEMDDAEMON_LIBRARY ${SYSTEMDDAEMON_LIBRARIES}) - set(SYSTEMDDAEMON_INCLUDE_DIR ${SYSTEMDDAEMON_INCLUDE_DIRS}) - endif() -endif() - -mark_as_advanced(SYSTEMDDAEMON_INCLUDE_DIRS SYSTEMDDAEMON_LIBRARIES) \ No newline at end of file -- cgit v1.2.3 From 0ee47f628d7b34f285264cde06ff01a5b27e0ace Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 10 Jan 2015 04:19:33 +0100 Subject: Fix the cmake LIBUUID_INCLUDE_DIRS value when we are not using pkg-config --- cmake/Modules/FindLIBUUID.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindLIBUUID.cmake b/cmake/Modules/FindLIBUUID.cmake index 25b330b..17d3c42 100644 --- a/cmake/Modules/FindLIBUUID.cmake +++ b/cmake/Modules/FindLIBUUID.cmake @@ -20,7 +20,7 @@ pkg_check_modules(LIBUUID uuid) if(NOT LIBUUID_FOUND) find_path(LIBUUID_INCLUDE_DIRS NAMES uuid.h - PATH uuid + PATH_SUFFIXES uuid DOC "The libuuid include directory") find_library(LIBUUID_LIBRARIES NAMES uuid -- cgit v1.2.3 From 7ec1f1242fbec9bff1616576732c43249b521e9f Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 22 Feb 2015 20:03:47 +0100 Subject: Add the FindCARES cmake module --- cmake/Modules/FindCARES.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 cmake/Modules/FindCARES.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindCARES.cmake b/cmake/Modules/FindCARES.cmake new file mode 100644 index 0000000..c4c757a --- /dev/null +++ b/cmake/Modules/FindCARES.cmake @@ -0,0 +1,37 @@ +# - Find c-ares +# Find the c-ares library, and more particularly the stringprep header. +# +# This module defines the following variables: +# CARES_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# CARES_INCLUDE_DIRS - The directory where to find the header file +# CARES_LIBRARIES - Where to find the library file +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# CARES_INCLUDE_DIR +# CARES_LIBRARY +# +# This file is in the public domain + +if(NOT CARES_FOUND) + find_path(CARES_INCLUDE_DIRS NAMES ares.h + DOC "The c-ares include directory") + + find_library(CARES_LIBRARIES NAMES cares + DOC "The c-ares library") + + # Use some standard module to handle the QUIETLY and REQUIRED arguments, and + # set CARES_FOUND to TRUE if these two variables are set. + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(CARES REQUIRED_VARS CARES_LIBRARIES CARES_INCLUDE_DIRS) + + # Compatibility for all the ways of writing these variables + if(CARES_FOUND) + set(CARES_INCLUDE_DIR ${CARES_INCLUDE_DIRS}) + set(CARES_LIBRARY ${CARES_LIBRARIES}) + endif() +endif() + +mark_as_advanced(CARES_INCLUDE_DIRS CARES_LIBRARIES) -- cgit v1.2.3 From d600a2843f1dbe3b1ba2dead9a020cc73d7d10ae Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 27 Feb 2015 12:16:09 +0100 Subject: Remove all the libs that are now in louloulibs --- cmake/Modules/FindBOTAN.cmake | 35 ------------------------ cmake/Modules/FindCARES.cmake | 37 ------------------------- cmake/Modules/FindICONV.cmake | 60 ----------------------------------------- cmake/Modules/FindLIBIDN.cmake | 41 ---------------------------- cmake/Modules/FindLIBUUID.cmake | 41 ---------------------------- cmake/Modules/FindSYSTEMD.cmake | 39 --------------------------- 6 files changed, 253 deletions(-) delete mode 100644 cmake/Modules/FindBOTAN.cmake delete mode 100644 cmake/Modules/FindCARES.cmake delete mode 100644 cmake/Modules/FindICONV.cmake delete mode 100644 cmake/Modules/FindLIBIDN.cmake delete mode 100644 cmake/Modules/FindLIBUUID.cmake delete mode 100644 cmake/Modules/FindSYSTEMD.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindBOTAN.cmake b/cmake/Modules/FindBOTAN.cmake deleted file mode 100644 index a12bd35..0000000 --- a/cmake/Modules/FindBOTAN.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# - Find botan -# Find the botan cryptographic library -# -# This module defines the following variables: -# BOTAN_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# BOTAN_INCLUDE_DIRS - The directory where to find the header file -# BOTAN_LIBRARIES - Where to find the library file -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# BOTAN_LIBRARY -# BOTAN_INCLUDE_DIR -# -# This file is in the public domain - -find_path(BOTAN_INCLUDE_DIRS NAMES botan/botan.h - PATH_SUFFIXES botan-1.11 - DOC "The botan include directory") - -find_library(BOTAN_LIBRARIES NAMES botan botan-1.11 - DOC "The botan library") - -# Use some standard module to handle the QUIETLY and REQUIRED arguments, and -# set BOTAN_FOUND to TRUE if these two variables are set. -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(BOTAN REQUIRED_VARS BOTAN_LIBRARIES BOTAN_INCLUDE_DIRS) - -if(BOTAN_FOUND) - set(BOTAN_LIBRARY ${BOTAN_LIBRARIES}) - set(BOTAN_INCLUDE_DIR ${BOTAN_INCLUDE_DIRS}) -endif() - -mark_as_advanced(BOTAN_INCLUDE_DIRS BOTAN_LIBRARIES) diff --git a/cmake/Modules/FindCARES.cmake b/cmake/Modules/FindCARES.cmake deleted file mode 100644 index c4c757a..0000000 --- a/cmake/Modules/FindCARES.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# - Find c-ares -# Find the c-ares library, and more particularly the stringprep header. -# -# This module defines the following variables: -# CARES_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# CARES_INCLUDE_DIRS - The directory where to find the header file -# CARES_LIBRARIES - Where to find the library file -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# CARES_INCLUDE_DIR -# CARES_LIBRARY -# -# This file is in the public domain - -if(NOT CARES_FOUND) - find_path(CARES_INCLUDE_DIRS NAMES ares.h - DOC "The c-ares include directory") - - find_library(CARES_LIBRARIES NAMES cares - DOC "The c-ares library") - - # Use some standard module to handle the QUIETLY and REQUIRED arguments, and - # set CARES_FOUND to TRUE if these two variables are set. - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(CARES REQUIRED_VARS CARES_LIBRARIES CARES_INCLUDE_DIRS) - - # Compatibility for all the ways of writing these variables - if(CARES_FOUND) - set(CARES_INCLUDE_DIR ${CARES_INCLUDE_DIRS}) - set(CARES_LIBRARY ${CARES_LIBRARIES}) - endif() -endif() - -mark_as_advanced(CARES_INCLUDE_DIRS CARES_LIBRARIES) diff --git a/cmake/Modules/FindICONV.cmake b/cmake/Modules/FindICONV.cmake deleted file mode 100644 index 7ca173f..0000000 --- a/cmake/Modules/FindICONV.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# - Find iconv -# Find the iconv (character set conversion) library -# -# This module defines the following variables: -# ICONV_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# ICONV_INCLUDE_DIRS - The directory where to find the header file -# ICONV_LIBRARIES - Where to find the library file -# ICONV_SECOND_ARGUMENT_IS_CONST - The second argument for iconv() is const -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# ICONV_LIBRARY -# ICONV_INCLUDE_DIR -# -# This file is in the public domain - -find_path(ICONV_INCLUDE_DIRS NAMES iconv.h - DOC "The iconv include directory") - -find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c - DOC "The iconv library") - -# Use some standard module to handle the QUIETLY and REQUIRED arguments, and -# set ICONV_FOUND to TRUE if these two variables are set. -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Iconv REQUIRED_VARS ICONV_LIBRARIES ICONV_INCLUDE_DIRS) - -# Check if the prototype is -# size_t iconv(iconv_t cd, char** inbuf, size_t* inbytesleft, -# char** outbuf, size_t* outbytesleft); -# or -# size_t iconv (iconv_t cd, const char** inbuf, size_t* inbytesleft, -# char** outbuf, size_t* outbytesleft); -if(ICONV_FOUND) - include(CheckCXXSourceCompiles) - - # Set the parameters needed to compile the following code. - set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIRS}) - set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) - - check_cxx_source_compiles(" - #include - int main(){ - iconv_t conv = 0; - const char* in = 0; - size_t ilen = 0; - char* out = 0; - size_t olen = 0; - iconv(conv, &in, &ilen, &out, &olen); - return 0;}" - ICONV_SECOND_ARGUMENT_IS_CONST) - -# Compatibility for all the ways of writing these variables - set(ICONV_LIBRARY ${ICONV_LIBRARIES}) - set(ICONV_INCLUDE_DIR ${ICONV_INCLUDE_DIRS}) -endif() - -mark_as_advanced(ICONV_INCLUDE_DIRS ICONV_LIBRARIES ICONV_SECOND_ARGUMENT_IS_CONST) \ No newline at end of file diff --git a/cmake/Modules/FindLIBIDN.cmake b/cmake/Modules/FindLIBIDN.cmake deleted file mode 100644 index 611a6a8..0000000 --- a/cmake/Modules/FindLIBIDN.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# - Find libidn -# Find the libidn library, and more particularly the stringprep header. -# -# This module defines the following variables: -# LIBIDN_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# LIBIDN_INCLUDE_DIRS - The directory where to find the header file -# LIBIDN_LIBRARIES - Where to find the library file -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# LIBIDN_INCLUDE_DIR -# LIBIDN_LIBRARY -# -# This file is in the public domain - -include(FindPkgConfig) -pkg_check_modules(LIBIDN libidn) - -if(NOT LIBIDN_FOUND) - find_path(LIBIDN_INCLUDE_DIRS NAMES stringprep.h - DOC "The libidn include directory") - - # The library containing the stringprep module is libidn - find_library(LIBIDN_LIBRARIES NAMES idn - DOC "The libidn library") - - # Use some standard module to handle the QUIETLY and REQUIRED arguments, and - # set LIBIDN_FOUND to TRUE if these two variables are set. - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LIBIDN REQUIRED_VARS LIBIDN_LIBRARIES LIBIDN_INCLUDE_DIRS) - - # Compatibility for all the ways of writing these variables - if(LIBIDN_FOUND) - set(LIBIDN_INCLUDE_DIR ${LIBIDN_INCLUDE_DIRS}) - set(LIBIDN_LIBRARY ${LIBIDN_LIBRARIES}) - endif() -endif() - -mark_as_advanced(LIBIDN_INCLUDE_DIRS LIBIDN_LIBRARIES) \ No newline at end of file diff --git a/cmake/Modules/FindLIBUUID.cmake b/cmake/Modules/FindLIBUUID.cmake deleted file mode 100644 index 17d3c42..0000000 --- a/cmake/Modules/FindLIBUUID.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# - Find libuuid -# Find the libuuid library -# -# This module defines the following variables: -# LIBUUID_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# LIBUUID_INCLUDE_DIRS - The directory where to find the header file -# LIBUUID_LIBRARIES - Where to find the library file -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# LIBUUID_INCLUDE_DIR -# LIBUUID_LIBRARY -# -# This file is in the public domain - -include(FindPkgConfig) -pkg_check_modules(LIBUUID uuid) - -if(NOT LIBUUID_FOUND) - find_path(LIBUUID_INCLUDE_DIRS NAMES uuid.h - PATH_SUFFIXES uuid - DOC "The libuuid include directory") - - find_library(LIBUUID_LIBRARIES NAMES uuid - DOC "The libuuid library") - - # Use some standard module to handle the QUIETLY and REQUIRED arguments, and - # set LIBUUID_FOUND to TRUE if these two variables are set. - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LIBUUID REQUIRED_VARS LIBUUID_LIBRARIES LIBUUID_INCLUDE_DIRS) - - # Compatibility for all the ways of writing these variables - if(LIBUUID_FOUND) - set(LIBUUID_INCLUDE_DIR ${LIBUUID_INCLUDE_DIRS}) - set(LIBUUID_LIBRARY ${LIBUUID_LIBRARIES}) - endif() -endif() - -mark_as_advanced(LIBUUID_INCLUDE_DIRS LIBUUID_LIBRARIES) diff --git a/cmake/Modules/FindSYSTEMD.cmake b/cmake/Modules/FindSYSTEMD.cmake deleted file mode 100644 index c7decde..0000000 --- a/cmake/Modules/FindSYSTEMD.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# - Find SystemdDaemon -# Find the systemd daemon library -# -# This module defines the following variables: -# SYSTEMD_FOUND - True if library and include directory are found -# If set to TRUE, the following are also defined: -# SYSTEMD_INCLUDE_DIRS - The directory where to find the header file -# SYSTEMD_LIBRARIES - Where to find the library file -# -# For conveniance, these variables are also set. They have the same values -# than the variables above. The user can thus choose his/her prefered way -# to write them. -# SYSTEMD_LIBRARY -# SYSTEMD_INCLUDE_DIR -# -# This file is in the public domain - -include(FindPkgConfig) -pkg_check_modules(SYSTEMD libsystemd) - -if(NOT SYSTEMD_FOUND) - find_path(SYSTEMD_INCLUDE_DIRS NAMES systemd/sd-daemon.h - DOC "The Systemd include directory") - - find_library(SYSTEMD_LIBRARIES NAMES systemd - DOC "The Systemd library") - - # Use some standard module to handle the QUIETLY and REQUIRED arguments, and - # set SYSTEMD_FOUND to TRUE if these two variables are set. - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(SYSTEMD REQUIRED_VARS SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS) - - if(SYSTEMD_FOUND) - set(SYSTEMD_LIBRARY ${SYSTEMD_LIBRARIES}) - set(SYSTEMD_INCLUDE_DIR ${SYSTEMD_INCLUDE_DIRS}) - endif() -endif() - -mark_as_advanced(SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES) \ No newline at end of file -- cgit v1.2.3 From 88ae2599f6dbf655e8806c9b4619ec089425683b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 18 Sep 2015 21:49:54 +0200 Subject: Introduce an optional Database module Uses litesql --- cmake/Modules/FindLITESQL.cmake | 75 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 cmake/Modules/FindLITESQL.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindLITESQL.cmake b/cmake/Modules/FindLITESQL.cmake new file mode 100644 index 0000000..2ce8fd6 --- /dev/null +++ b/cmake/Modules/FindLITESQL.cmake @@ -0,0 +1,75 @@ +# - Find LiteSQL +# +# Find the LiteSQL library, and defines a function to generate C++ files +# from the database xml file using litesql-gen fro +# +# This module defines the following variables: +# LITESQL_FOUND - True if library and include directory are found +# If set to TRUE, the following are also defined: +# LITESQL_INCLUDE_DIRS - The directory where to find the header file +# LITESQL_LIBRARIES - Where to find the library file +# LITESQL_GENERATE_CPP - A function, to be used like this: +# LITESQL_GENERATE_CPP("db/database.xml" # The file defining the db schemas +# "database" # The name of the C++ “module” +# # that will be generated +# LITESQL_GENERATED_SOURCES # Variable containing the +# resulting C++ files to compile +# +# For conveniance, these variables are also set. They have the same values +# than the variables above. The user can thus choose his/her prefered way +# to write them. +# LITESQL_INCLUDE_DIR +# LITESQL_LIBRARY +# +# This file is in the public domain + +find_path(LITESQL_INCLUDE_DIRS NAMES litesql.hpp + DOC "The LiteSQL include directory") + +find_library(LITESQL_LIBRARIES NAMES litesql + DOC "The LiteSQL library") + +foreach(DB_TYPE sqlite postgresql mysql ocilib) + string(TOUPPER ${DB_TYPE} DB_TYPE_UPPER) + find_library(LITESQL_${DB_TYPE_UPPER}_LIB_PATH NAMES litesql_${DB_TYPE} + DOC "The ${DB_TYPE} backend for LiteSQL") + if(LITESQL_${DB_TYPE_UPPER}_LIB_PATH) + list(APPEND LITESQL_LIBRARIES ${LITESQL_${DB_TYPE_UPPER}_LIB_PATH}) + endif() +endforeach() + +find_program(LITESQLGEN_EXECUTABLE NAMES litesql-gen + DOC "The utility that creates .h and .cpp files from a xml database description") + +# Use some standard module to handle the QUIETLY and REQUIRED arguments, and +# set LITESQL_FOUND to TRUE if these two variables are set. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LITESQL REQUIRED_VARS LITESQL_LIBRARIES LITESQL_INCLUDE_DIRS + LITESQLGEN_EXECUTABLE) + +# Compatibility for all the ways of writing these variables +if(LITESQL_FOUND) + set(LITESQL_INCLUDE_DIR ${LITESQL_INCLUDE_DIRS}) + set(LITESQL_LIBRARY ${LITESQL_LIBRARIES}) +endif() + +mark_as_advanced(LITESQL_INCLUDE_DIRS LITESQL_LIBRARIES) + + +# LITESQL_GENERATE_CPP function + +function(LITESQL_GENERATE_CPP + SOURCE_FILE OUTPUT_NAME OUTPUT_SOURCES) + set(${OUTPUT_SOURCES}) + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.hpp" + COMMAND ${LITESQLGEN_EXECUTABLE} + ARGS -t c++ --output-dir=${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE} + DEPENDS ${SOURCE_FILE} + COMMENT "Running litesql-gen on ${SOURCE_FILE}" + VERBATIM) + list(APPEND ${OUTPUT_SOURCES} "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.cpp") + set_source_files_properties(${${OUTPUT_SOURCES}} PROPERTIES GENERATED TRUE) + set(${OUTPUT_SOURCES} ${${OUTPUT_SOURCES}} PARENT_SCOPE) +endfunction() -- cgit v1.2.3 From 6ae7e08c5211fc01155295df4f706dad1836cb80 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 28 Oct 2015 19:22:26 +0100 Subject: Add code coverage support make coverage runs the test_suite and generates a report --- cmake/Modules/CodeCoverage.cmake | 205 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 cmake/Modules/CodeCoverage.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/CodeCoverage.cmake b/cmake/Modules/CodeCoverage.cmake new file mode 100644 index 0000000..2e2d4a0 --- /dev/null +++ b/cmake/Modules/CodeCoverage.cmake @@ -0,0 +1,205 @@ +# Copyright (c) 2012 - 2015, Lars Bilke +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its contributors +# may be used to endorse or promote products derived from this software without +# specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# +# +# 2012-01-31, Lars Bilke +# - Enable Code Coverage +# +# 2013-09-17, Joakim Söderberg +# - Added support for Clang. +# - Some additional usage instructions. +# +# USAGE: + +# 0. (Mac only) If you use Xcode 5.1 make sure to patch geninfo as described here: +# http://stackoverflow.com/a/22404544/80480 +# +# 1. Copy this file into your cmake modules path. +# +# 2. Add the following line to your CMakeLists.txt: +# INCLUDE(CodeCoverage) +# +# 3. Set compiler flags to turn off optimization and enable coverage: +# SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage") +# SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage") +# +# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target +# which runs your test executable and produces a lcov code coverage report: +# Example: +# SETUP_TARGET_FOR_COVERAGE( +# my_coverage_target # Name for custom target. +# test_driver # Name of the test driver executable that runs the tests. +# # NOTE! This should always have a ZERO as exit code +# # otherwise the coverage generation will not complete. +# coverage # Name of output directory. +# ) +# +# 4. Build a Debug build: +# cmake -DCMAKE_BUILD_TYPE=Debug .. +# make +# make my_coverage_target +# +# + +# Check prereqs +FIND_PROGRAM( GCOV_PATH gcov ) +FIND_PROGRAM( LCOV_PATH lcov ) +FIND_PROGRAM( GENHTML_PATH genhtml ) +FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests) + +IF(NOT GCOV_PATH) + MESSAGE(FATAL_ERROR "gcov not found! Aborting...") +ENDIF() # NOT GCOV_PATH + +IF(NOT CMAKE_COMPILER_IS_GNUCXX) + # Clang version 3.0.0 and greater now supports gcov as well. + MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.") + + IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...") + ENDIF() +ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX + +SET(CMAKE_CXX_FLAGS_COVERAGE + "-g -O0 --coverage -fprofile-arcs -ftest-coverage" + CACHE STRING "Flags used by the C++ compiler during coverage builds." + FORCE ) +SET(CMAKE_C_FLAGS_COVERAGE + "-g -O0 --coverage -fprofile-arcs -ftest-coverage" + CACHE STRING "Flags used by the C compiler during coverage builds." + FORCE ) +SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE + "" + CACHE STRING "Flags used for linking binaries during coverage builds." + FORCE ) +SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE + "" + CACHE STRING "Flags used by the shared libraries linker during coverage builds." + FORCE ) +MARK_AS_ADVANCED( + CMAKE_CXX_FLAGS_COVERAGE + CMAKE_C_FLAGS_COVERAGE + CMAKE_EXE_LINKER_FLAGS_COVERAGE + CMAKE_SHARED_LINKER_FLAGS_COVERAGE ) + +IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage")) + MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" ) +ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug" + + +# Param _targetname The name of new the custom make target +# Param _testrunner The name of the target which runs the tests. +# MUST return ZERO always, even on errors. +# If not, no coverage report will be created! +# Param _outputname lcov output is generated as _outputname.info +# HTML report is generated in _outputname/index.html +# Optional fifth parameter is passed as arguments to _testrunner +# Pass them in list form, e.g.: "-j;2" for -j 2 +FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname) + + IF(NOT LCOV_PATH) + MESSAGE(FATAL_ERROR "lcov not found! Aborting...") + ENDIF() # NOT LCOV_PATH + + IF(NOT GENHTML_PATH) + MESSAGE(FATAL_ERROR "genhtml not found! Aborting...") + ENDIF() # NOT GENHTML_PATH + + # Setup target + ADD_CUSTOM_TARGET(${_targetname} + + # Cleanup lcov + ${LCOV_PATH} --directory . --zerocounters + + # Create baseline coverage data file + COMMAND ${LCOV_PATH} -c -i -d . -o ${_outputname}.baseline.info -q + + # Run tests + COMMAND ${_testrunner} ${ARGV3} + + # Capturing lcov counters and generating report + COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info -q + # Combine the baseline and the test data + COMMAND ${LCOV_PATH} -a ${_outputname}.info -a ${_outputname}.baseline.info -o ${_outputname}.info -q + + # Remove information about source files that are not part of + # the test (system file, external libraries, etc) + COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' 'external/*' --output-file ${_outputname}.info.cleaned -q + + # Generate the report + COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned + + # Clean the temporary files we created + COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned + + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report." + ) + + # Show info where to find the report + ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD + COMMAND ; + COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report." + ) + +ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE + +# Param _targetname The name of new the custom make target +# Param _testrunner The name of the target which runs the tests +# Param _outputname cobertura output is generated as _outputname.xml +# Optional fourth parameter is passed as arguments to _testrunner +# Pass them in list form, e.g.: "-j;2" for -j 2 +FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname) + + IF(NOT PYTHON_EXECUTABLE) + MESSAGE(FATAL_ERROR "Python not found! Aborting...") + ENDIF() # NOT PYTHON_EXECUTABLE + + IF(NOT GCOVR_PATH) + MESSAGE(FATAL_ERROR "gcovr not found! Aborting...") + ENDIF() # NOT GCOVR_PATH + + ADD_CUSTOM_TARGET(${_targetname} + + # Run tests + ${_testrunner} ${ARGV3} + + # Running gcovr + COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Running gcovr to produce Cobertura code coverage report." + ) + + # Show info where to find the report + ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD + COMMAND ; + COMMENT "Cobertura code coverage report saved in ${_outputname}.xml." + ) + +ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA -- cgit v1.2.3 From 9fe94215daecf21246e19ba59ef83755129a4a8b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 29 Oct 2015 03:20:39 +0100 Subject: Make lcov gcov etc optional make coverage will display an error instead --- cmake/Modules/CodeCoverage.cmake | 42 ++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/CodeCoverage.cmake b/cmake/Modules/CodeCoverage.cmake index 2e2d4a0..5954846 100644 --- a/cmake/Modules/CodeCoverage.cmake +++ b/cmake/Modules/CodeCoverage.cmake @@ -73,18 +73,30 @@ FIND_PROGRAM( LCOV_PATH lcov ) FIND_PROGRAM( GENHTML_PATH genhtml ) FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests) -IF(NOT GCOV_PATH) - MESSAGE(FATAL_ERROR "gcov not found! Aborting...") -ENDIF() # NOT GCOV_PATH +# Display an error when the target is called. If no error is found, this +# function will be overridden by the real one later in this file +FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname) + ADD_CUSTOM_TARGET(${_targetname} + COMMAND echo "Coverage is not available: ${ERROR_MSG}" + ) +ENDFUNCTION() +IF(NOT GCOV_PATH) + set(ERROR_MSG "gcov not found") + return() +ENDIF() +IF(NOT LCOV_PATH) + set(ERROR_MSG "lcov not found") + return() +ENDIF() +IF(NOT GENHTML_PATH) + set(ERROR_MSG "genhtml not found") + return() +ENDIF() IF(NOT CMAKE_COMPILER_IS_GNUCXX) - # Clang version 3.0.0 and greater now supports gcov as well. - MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.") - - IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...") - ENDIF() -ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX + set(ERROR_MSG "Compiler is not gcc") + return() +ENDIF() SET(CMAKE_CXX_FLAGS_COVERAGE "-g -O0 --coverage -fprofile-arcs -ftest-coverage" @@ -123,19 +135,11 @@ ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug" # Pass them in list form, e.g.: "-j;2" for -j 2 FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname) - IF(NOT LCOV_PATH) - MESSAGE(FATAL_ERROR "lcov not found! Aborting...") - ENDIF() # NOT LCOV_PATH - - IF(NOT GENHTML_PATH) - MESSAGE(FATAL_ERROR "genhtml not found! Aborting...") - ENDIF() # NOT GENHTML_PATH - # Setup target ADD_CUSTOM_TARGET(${_targetname} # Cleanup lcov - ${LCOV_PATH} --directory . --zerocounters + COMMAND ${LCOV_PATH} --directory . --zerocounters # Create baseline coverage data file COMMAND ${LCOV_PATH} -c -i -d . -o ${_outputname}.baseline.info -q -- cgit v1.2.3 From 2307f94e5b02c7cfbc39ca57eb8c9133f6b10ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 12 Jul 2016 11:57:01 +0200 Subject: Clean the list of options visible in non-advanced ccmake --- cmake/Modules/FindLITESQL.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindLITESQL.cmake b/cmake/Modules/FindLITESQL.cmake index 2ce8fd6..91155bb 100644 --- a/cmake/Modules/FindLITESQL.cmake +++ b/cmake/Modules/FindLITESQL.cmake @@ -36,6 +36,7 @@ foreach(DB_TYPE sqlite postgresql mysql ocilib) if(LITESQL_${DB_TYPE_UPPER}_LIB_PATH) list(APPEND LITESQL_LIBRARIES ${LITESQL_${DB_TYPE_UPPER}_LIB_PATH}) endif() + mark_as_advanced(LITESQL_${DB_TYPE_UPPER}_LIB_PATH) endforeach() find_program(LITESQLGEN_EXECUTABLE NAMES litesql-gen @@ -53,7 +54,7 @@ if(LITESQL_FOUND) set(LITESQL_LIBRARY ${LITESQL_LIBRARIES}) endif() -mark_as_advanced(LITESQL_INCLUDE_DIRS LITESQL_LIBRARIES) +mark_as_advanced(LITESQL_INCLUDE_DIRS LITESQL_LIBRARIES LITESQLGEN_EXECUTABLE) # LITESQL_GENERATE_CPP function -- cgit v1.2.3 From d46e0a9196adae3fac73eb14a5b81dad01c7a732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Thu, 28 Jul 2016 11:12:27 +0200 Subject: Mark some more cmake variables as advanced --- cmake/Modules/CodeCoverage.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake/Modules') diff --git a/cmake/Modules/CodeCoverage.cmake b/cmake/Modules/CodeCoverage.cmake index 5954846..4f54327 100644 --- a/cmake/Modules/CodeCoverage.cmake +++ b/cmake/Modules/CodeCoverage.cmake @@ -85,14 +85,17 @@ IF(NOT GCOV_PATH) set(ERROR_MSG "gcov not found") return() ENDIF() +MARK_AS_ADVANCED(GCOV_PATH) IF(NOT LCOV_PATH) set(ERROR_MSG "lcov not found") return() ENDIF() +MARK_AS_ADVANCED(LCOV_PATH) IF(NOT GENHTML_PATH) set(ERROR_MSG "genhtml not found") return() ENDIF() +MARK_AS_ADVANCED(GENHTML_PATH) IF(NOT CMAKE_COMPILER_IS_GNUCXX) set(ERROR_MSG "Compiler is not gcc") return() @@ -188,6 +191,7 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname IF(NOT GCOVR_PATH) MESSAGE(FATAL_ERROR "gcovr not found! Aborting...") ENDIF() # NOT GCOVR_PATH + MARK_AS_ADVANCED(GCOVR_PATH) ADD_CUSTOM_TARGET(${_targetname} -- cgit v1.2.3