Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
a6f6e365
Commit
a6f6e365
authored
Mar 12, 2017
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: Improve the usage of PARENT_SCOPE
parent
4d42dddf
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
78 deletions
+62
-78
CMakeLists.txt
CMakeLists.txt
+2
-2
louloulibs/CMakeLists.txt
louloulibs/CMakeLists.txt
+2
-38
louloulibs/cmake/Modules/FindBOTAN.cmake
louloulibs/cmake/Modules/FindBOTAN.cmake
+21
-12
louloulibs/cmake/Modules/FindGCRYPT.cmake
louloulibs/cmake/Modules/FindGCRYPT.cmake
+18
-12
louloulibs/cmake/Modules/FindICONV.cmake
louloulibs/cmake/Modules/FindICONV.cmake
+5
-4
louloulibs/cmake/Modules/FindLIBIDN.cmake
louloulibs/cmake/Modules/FindLIBIDN.cmake
+4
-3
louloulibs/cmake/Modules/FindLIBUUID.cmake
louloulibs/cmake/Modules/FindLIBUUID.cmake
+3
-2
louloulibs/cmake/Modules/FindSYSTEMD.cmake
louloulibs/cmake/Modules/FindSYSTEMD.cmake
+4
-3
louloulibs/cmake/Modules/FindUDNS.cmake
louloulibs/cmake/Modules/FindUDNS.cmake
+3
-2
No files found.
CMakeLists.txt
View file @
a6f6e365
...
...
@@ -193,11 +193,11 @@ add_executable(test_suite EXCLUDE_FROM_ALL ${source_tests}
target_link_libraries
(
${
PROJECT_NAME
}
${
EXPAT_LIBRARIES
}
${
LIBUUID_LIBRARIES
}
${
EXPAT_LIBRAR
IES
}
)
${
EXPAT_LIBRAR
Y
}
)
target_link_libraries
(
test_suite
${
EXPAT_LIBRARIES
}
${
LIBUUID_LIBRARIES
}
${
EXPAT_LIBRAR
IES
}
)
${
EXPAT_LIBRAR
Y
}
)
if
(
SYSTEMD_FOUND
)
target_link_libraries
(
${
PROJECT_NAME
}
${
SYSTEMD_LIBRARIES
}
)
target_link_libraries
(
test_suite
${
SYSTEMD_LIBRARIES
}
)
...
...
louloulibs/CMakeLists.txt
View file @
a6f6e365
...
...
@@ -10,10 +10,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra")
## Look for external libraries
#
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/Modules/"
)
include
(
FindEXPAT
)
find_package
(
EXPAT REQUIRED
)
find_package
(
ICONV REQUIRED
)
find_package
(
LIBUUID REQUIRED
)
find_package
(
EXPAT REQUIRED
)
set
(
EXPAT_FOUND
${
EXPAT_FOUND
}
PARENT_SCOPE
)
if
(
WITH_LIBIDN
)
find_package
(
LIBIDN REQUIRED
)
...
...
@@ -50,42 +50,6 @@ include_directories(${EXPAT_INCLUDE_DIRS})
include_directories
(
${
ICONV_INCLUDE_DIRS
}
)
include_directories
(
${
LIBUUID_INCLUDE_DIRS
}
)
set
(
EXPAT_INCLUDE_DIRS
${
EXPAT_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
EXPAT_LIBRARIES
${
EXPAT_LIBRARIES
}
PARENT_SCOPE
)
set
(
ICONV_INCLUDE_DIRS
${
ICONV_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
ICONV_LIBRARIES
${
ICONV_LIBRARIES
}
PARENT_SCOPE
)
set
(
LIBUUID_INCLUDE_DIRS
${
LIBUUID_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
LIBUUID_LIBRARIES
${
LIBUUID_LIBRARIES
}
PARENT_SCOPE
)
if
(
LIBIDN_FOUND
)
include_directories
(
${
LIBIDN_INCLUDE_DIRS
}
)
set
(
LIBDIN_FOUND
${
LIBDIN_FOUND
}
PARENT_SCOPE
)
set
(
LIBDIN_INCLUDE_DIRS
${
LIBDIN_INCLUDE_DIRS
}
PARENT_SCOPE
)
endif
()
if
(
SYSTEMD_FOUND
)
include_directories
(
${
SYSTEMD_INCLUDE_DIRS
}
)
set
(
SYSTEMD_FOUND
${
SYSTEMD_FOUND
}
PARENT_SCOPE
)
set
(
SYSTEMD_INCLUDE_DIRS
${
SYSTEMD_INCLUDE_DIRS
}
PARENT_SCOPE
)
endif
()
if
(
BOTAN_FOUND
)
include_directories
(
SYSTEM
${
BOTAN_INCLUDE_DIRS
}
)
set
(
BOTAN_FOUND
${
BOTAN_FOUND
}
PARENT_SCOPE
)
set
(
BOTAN_INCLUDE_DIRS
${
BOTAN_INCLUDE_DIRS
}
PARENT_SCOPE
)
endif
()
if
(
GCRYPT_FOUND
)
include_directories
(
SYSTEM
${
GCRYPT_INCLUDE_DIRS
}
)
set
(
GCRYPT_FOUND
${
GCRYPT_FOUND
}
PARENT_SCOPE
)
set
(
GCRYPT_INCLUDE_DIRS
${
GCRYPT_INCLUDE_DIRS
}
PARENT_SCOPE
)
endif
()
if
(
UDNS_FOUND
)
include_directories
(
${
UDNS_INCLUDE_DIRS
}
)
set
(
UDNS_FOUND
${
UDNS_FOUND
}
PARENT_SCOPE
)
set
(
UDNS_INCLUDE_DIRS
${
UDNS_INCLUDE_DIRS
}
PARENT_SCOPE
)
endif
()
set
(
POLLER_DOCSTRING
"Choose the poller between POLL and EPOLL (Linux-only)"
)
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"Linux"
)
set
(
POLLER
"EPOLL"
CACHE STRING
${
POLLER_DOCSTRING
}
)
...
...
louloulibs/cmake/Modules/FindBOTAN.cmake
View file @
a6f6e365
...
...
@@ -15,21 +15,30 @@
#
# This file is in the public domain
find_path
(
BOTAN_INCLUDE_DIRS NAMES botan/botan.h
PATH_SUFFIXES botan-2 botan-1.11
DOC
"The botan include directory"
)
include
(
FindPkgConfig
)
pkg_check_modules
(
BOTAN botan-2
)
if
(
NOT BOTAN_FOUND
)
pkg_check_modules
(
BOTAN botan-1.11
)
endif
()
if
(
NOT BOTAN_FOUND
)
find_path
(
BOTAN_INCLUDE_DIRS NAMES botan/botan.h
PATH_SUFFIXES botan-2 botan-1.11
DOC
"The botan include directory"
)
find_library
(
BOTAN_LIBRARIES NAMES botan botan-2 botan-1.11
DOC
"The botan library"
)
find_library
(
BOTAN_LIBRARIES NAMES botan botan-2 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
)
# 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
}
)
if
(
BOTAN_FOUND
)
set
(
BOTAN_LIBRARY
${
BOTAN_LIBRARIES
}
PARENT_SCOPE
)
set
(
BOTAN_INCLUDE_DIR
${
BOTAN_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
BOTAN_FOUND
${
BOTAN_FOUND
}
PARENT_SCOPE
)
endif
()
endif
()
mark_as_advanced
(
BOTAN_INCLUDE_DIRS BOTAN_LIBRARIES
)
louloulibs/cmake/Modules/FindGCRYPT.cmake
View file @
a6f6e365
...
...
@@ -15,21 +15,27 @@
#
# This file is in the public domain
find_path
(
GCRYPT_INCLUDE_DIRS NAMES gcrypt.h
PATH_SUFFIXES gcrypt
DOC
"The gcrypt include directory"
)
include
(
FindPkgConfig
)
pkg_check_modules
(
GCRYPT gcrypt
)
find_library
(
GCRYPT_LIBRARIES NAMES gcrypt
DOC
"The gcrypt library"
)
if
(
NOT GCRYPT_FOUND
)
find_path
(
GCRYPT_INCLUDE_DIRS NAMES gcrypt.h
PATH_SUFFIXES gcrypt
DOC
"The gcrypt include directory"
)
# Use some standard module to handle the QUIETLY and REQUIRED arguments, and
# set GCRYPT_FOUND to TRUE if these two variables are set.
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
GCRYPT REQUIRED_VARS GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIRS
)
find_library
(
GCRYPT_LIBRARIES NAMES gcrypt
DOC
"The gcrypt library"
)
if
(
GCRYPT_FOUND
)
set
(
GCRYPT_LIBRARY
${
GCRYPT_LIBRARIES
}
)
set
(
GCRYPT_INCLUDE_DIR
${
GCRYPT_INCLUDE_DIRS
}
)
# Use some standard module to handle the QUIETLY and REQUIRED arguments, and
# set GCRYPT_FOUND to TRUE if these two variables are set.
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
GCRYPT REQUIRED_VARS GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIRS
)
if
(
GCRYPT_FOUND
)
set
(
GCRYPT_LIBRARY
${
GCRYPT_LIBRARIES
}
PARENT_SCOPE
)
set
(
GCRYPT_INCLUDE_DIR
${
GCRYPT_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
GCRYPT_FOUND
${
GCRYPT_FOUND
}
PARENT_SCOPE
)
endif
()
endif
()
mark_as_advanced
(
GCRYPT_INCLUDE_DIRS GCRYPT_LIBRARIES
)
louloulibs/cmake/Modules/FindICONV.cmake
View file @
a6f6e365
...
...
@@ -52,9 +52,10 @@ if(ICONV_FOUND)
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
}
)
# Compatibility for all the ways of writing these variables
set
(
ICONV_LIBRARY
${
ICONV_LIBRARIES
}
PARENT_SCOPE
)
set
(
ICONV_INCLUDE_DIR
${
ICONV_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
ICONV_FOUND
${
ICONV_FOUND
}
PARENT_SCOPE
)
endif
()
mark_as_advanced
(
ICONV_INCLUDE_DIRS 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
)
louloulibs/cmake/Modules/FindLIBIDN.cmake
View file @
a6f6e365
...
...
@@ -33,9 +33,10 @@ if(NOT LIBIDN_FOUND)
# Compatibility for all the ways of writing these variables
if
(
LIBIDN_FOUND
)
set
(
LIBIDN_INCLUDE_DIR
${
LIBIDN_INCLUDE_DIRS
}
)
set
(
LIBIDN_LIBRARY
${
LIBIDN_LIBRARIES
}
)
set
(
LIBIDN_INCLUDE_DIR
${
LIBIDN_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
LIBIDN_LIBRARY
${
LIBIDN_LIBRARIES
}
PARENT_SCOPE
)
set
(
LIBIDN_FOUND
${
LIBIDN_FOUND
}
PARENT_SCOPE
)
endif
()
endif
()
mark_as_advanced
(
LIBIDN_INCLUDE_DIRS LIBIDN_LIBRARIES
)
\ No newline at end of file
mark_as_advanced
(
LIBIDN_INCLUDE_DIRS LIBIDN_LIBRARIES
)
louloulibs/cmake/Modules/FindLIBUUID.cmake
View file @
a6f6e365
...
...
@@ -33,8 +33,9 @@ if(NOT LIBUUID_FOUND)
# Compatibility for all the ways of writing these variables
if
(
LIBUUID_FOUND
)
set
(
LIBUUID_INCLUDE_DIR
${
LIBUUID_INCLUDE_DIRS
}
)
set
(
LIBUUID_LIBRARY
${
LIBUUID_LIBRARIES
}
)
set
(
LIBUUID_INCLUDE_DIR
${
LIBUUID_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
LIBUUID_LIBRARY
${
LIBUUID_LIBRARIES
}
PARENT_SCOPE
)
set
(
LIBUUID_FOUND
${
LIBUUID_FOUND
}
PARENT_SCOPE
)
endif
()
endif
()
...
...
louloulibs/cmake/Modules/FindSYSTEMD.cmake
View file @
a6f6e365
...
...
@@ -31,9 +31,10 @@ if(NOT SYSTEMD_FOUND)
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
}
)
set
(
SYSTEMD_LIBRARY
${
SYSTEMD_LIBRARIES
}
PARENT_SCOPE
)
set
(
SYSTEMD_INCLUDE_DIR
${
SYSTEMD_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
SYSTEMD_FOUND
${
SYSTEMD_FOUND
}
PARENT_SCOPE
)
endif
()
endif
()
mark_as_advanced
(
SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES
)
\ No newline at end of file
mark_as_advanced
(
SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES
)
louloulibs/cmake/Modules/FindUDNS.cmake
View file @
a6f6e365
...
...
@@ -29,8 +29,9 @@ if(NOT UDNS_FOUND)
# Compatibility for all the ways of writing these variables
if
(
UDNS_FOUND
)
set
(
UDNS_INCLUDE_DIR
${
UDNS_INCLUDE_DIRS
}
)
set
(
UDNS_LIBRARY
${
UDNS_LIBRARIES
}
)
set
(
UDNS_INCLUDE_DIR
${
UDNS_INCLUDE_DIRS
}
PARENT_SCOPE
)
set
(
UDNS_LIBRARY
${
UDNS_LIBRARIES
}
PARENT_SCOPE
)
set
(
UDNS_FOUND
${
UDNS_FOUND
}
PARENT_SCOPE
)
endif
()
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment