Skip to content
Permalink
Browse files

Style: Format code with cmake format `0.5.4`

  • Loading branch information...
sanssecours committed Aug 2, 2019
1 parent 4c49e2d commit 93865e12ca85fbec6cc03a8b55c29e5561bd7864
Showing with 2,211 additions and 2,790 deletions.
  1. +3 −13 CMakeLists.txt
  2. +12 −8 benchmarks/CMakeLists.txt
  3. +11 −5 cmake/CMakeLists.txt
  4. +52 −162 cmake/ElektraCache.cmake
  5. +1 −2 cmake/ElektraClasspath.cmake
  6. +3 −7 cmake/ElektraCompiling.cmake
  7. +37 −20 cmake/ElektraCoverage.cmake
  8. +2 −4 cmake/ElektraDocSet.cmake
  9. +15 −13 cmake/ElektraPackaging.cmake
  10. +14 −16 cmake/ElektraUninstall.cmake
  11. +18 −7 cmake/Modules/DownloadProject.cmake
  12. +44 −49 cmake/Modules/ExportPluginSymbols.cmake
  13. +4 −1 cmake/Modules/FindANTLR4CPP.cmake
  14. +6 −6 cmake/Modules/FindAugeas.cmake
  15. +16 −23 cmake/Modules/FindCppCMS.cmake
  16. +7 −5 cmake/Modules/FindDBus.cmake
  17. +12 −17 cmake/Modules/FindDiscount.cmake
  18. +17 −30 cmake/Modules/FindGLib.cmake
  19. +1 −4 cmake/Modules/FindGObjectIntrospection.cmake
  20. +1 −5 cmake/Modules/FindGTest.cmake
  21. +7 −19 cmake/Modules/FindHaskell.cmake
  22. +8 −18 cmake/Modules/FindIconv.cmake
  23. +15 −15 cmake/Modules/FindLibBotan.cmake
  24. +4 −1 cmake/Modules/FindLibEv.cmake
  25. +4 −1 cmake/Modules/FindLibFA.cmake
  26. +7 −5 cmake/Modules/FindLibGit2.cmake
  27. +2 −6 cmake/Modules/FindLibGpgme.cmake
  28. +6 −11 cmake/Modules/FindLibJWT.cmake
  29. +4 −13 cmake/Modules/FindLibOpenSSL.cmake
  30. +6 −6 cmake/Modules/FindLibgcrypt.cmake
  31. +29 −29 cmake/Modules/FindLua.cmake
  32. +6 −10 cmake/Modules/FindMySqlCppConn.cmake
  33. +6 −5 cmake/Modules/FindPEGTL.cmake
  34. +4 −1 cmake/Modules/FindPluginprocess.cmake
  35. +13 −21 cmake/Modules/FindPython2Interp.cmake
  36. +53 −73 cmake/Modules/FindPython2Libs.cmake
  37. +2 −4 cmake/Modules/FindSystemdJournal.cmake
  38. +6 −23 cmake/Modules/FindXercesC.cmake
  39. +5 −1 cmake/Modules/FindYAEP.cmake
  40. +4 −1 cmake/Modules/FindYajl.cmake
  41. +11 −21 cmake/Modules/FindZeroMQ.cmake
  42. +12 −24 cmake/Modules/Findlibuv.cmake
  43. +8 −10 cmake/Modules/Findyaml-cpp.cmake
  44. +18 −44 cmake/Modules/LibAddBinding.cmake
  45. +97 −80 cmake/Modules/LibAddHaskellPlugin.cmake
  46. +5 −15 cmake/Modules/LibAddLib.cmake
  47. +97 −131 cmake/Modules/LibAddMacros.cmake
  48. +46 −130 cmake/Modules/LibAddPlugin.cmake
  49. +37 −55 cmake/Modules/LibAddTest.cmake
  50. +4 −1 cmake/Modules/LibFindMacros.cmake
  51. +6 −5 cmake/Modules/SafeCheckSymbolExists.cmake
  52. +1 −2 cmake/PrintDependencies.cmake
  53. +2 −10 cmake/Toolchain/Toolchain-mingw-w64-x86_64.cmake
  54. +44 −39 doc/CMakeLists.txt
  55. +2 −6 doc/help/CMakeLists.txt
  56. +20 −15 examples/CMakeLists.txt
  57. +9 −11 examples/codegen/econf/cmake/CMakeLists.txt
  58. +9 −11 examples/codegen/tree/cmake/CMakeLists.txt
  59. +4 −12 scripts/CMakeLists.txt
  60. +8 −2 src/bindings/CMakeLists.txt
  61. +2 −5 src/bindings/cpp/benchmarks/CMakeLists.txt
  62. +2 −5 src/bindings/cpp/examples/CMakeLists.txt
  63. +1 −2 src/bindings/cpp/include/CMakeLists.txt
  64. +14 −10 src/bindings/cpp/tests/CMakeLists.txt
  65. +24 −24 src/bindings/gi/CMakeLists.txt
  66. +6 −18 src/bindings/gi/lua/CMakeLists.txt
  67. +6 −18 src/bindings/gi/python/CMakeLists.txt
  68. +5 −12 src/bindings/glib/CMakeLists.txt
  69. +7 −21 src/bindings/glib/tests/CMakeLists.txt
  70. +14 −10 src/bindings/gsettings/CMakeLists.txt
  71. +51 −76 src/bindings/haskell/CMakeLists.txt
  72. +8 −2 src/bindings/intercept/CMakeLists.txt
  73. +6 −6 src/bindings/intercept/env/benchmarks/CMakeLists.txt
  74. +2 −5 src/bindings/intercept/env/examples/CMakeLists.txt
  75. +1 −2 src/bindings/intercept/env/include/CMakeLists.txt
  76. +1 −2 src/bindings/intercept/env/src/CMakeLists.txt
  77. +1 −2 src/bindings/intercept/env/tests/CMakeLists.txt
  78. +4 −1 src/bindings/intercept/fs/CMakeLists.txt
  79. +12 −3 src/bindings/io/CMakeLists.txt
  80. +10 −10 src/bindings/io/doc/CMakeLists.txt
  81. +13 −15 src/bindings/io/ev/CMakeLists.txt
  82. +7 −7 src/bindings/io/ev/example/CMakeLists.txt
  83. +14 −18 src/bindings/io/glib/CMakeLists.txt
  84. +7 −7 src/bindings/io/glib/example/CMakeLists.txt
  85. +13 −15 src/bindings/io/uv/CMakeLists.txt
  86. +7 −7 src/bindings/io/uv/example/CMakeLists.txt
  87. +24 −22 src/bindings/jna/CMakeLists.txt
  88. +21 −5 src/bindings/swig/CMakeLists.txt
  89. +22 −11 src/bindings/swig/lua/CMakeLists.txt
  90. +6 −20 src/bindings/swig/lua/tests/CMakeLists.txt
  91. +25 −10 src/bindings/swig/python/CMakeLists.txt
  92. +6 −20 src/bindings/swig/python/tests/CMakeLists.txt
  93. +27 −14 src/bindings/swig/python2/CMakeLists.txt
  94. +6 −19 src/bindings/swig/python2/tests/CMakeLists.txt
  95. +69 −23 src/bindings/swig/ruby/CMakeLists.txt
  96. +6 −18 src/bindings/swig/ruby/tests/CMakeLists.txt
  97. +17 −20 src/error/CMakeLists.txt
  98. +2 −4 src/include/CMakeLists.txt
  99. +15 −3 src/include/kdbio/CMakeLists.txt
  100. +5 −1 src/libs/CMakeLists.txt
  101. +1 −2 src/libs/ease/CMakeLists.txt
  102. +44 −60 src/libs/elektra/CMakeLists.txt
  103. +6 −3 src/libs/globbing/CMakeLists.txt
  104. +12 −4 src/libs/highlevel/CMakeLists.txt
  105. +6 −3 src/libs/invoke/CMakeLists.txt
  106. +6 −1 src/libs/io/CMakeLists.txt
  107. +2 −7 src/libs/io/adapter/dbus/CMakeLists.txt
  108. +3 −8 src/libs/io/adapter/zeromq/CMakeLists.txt
  109. +7 −14 src/libs/loader/CMakeLists.txt
  110. +7 −3 src/libs/meta/CMakeLists.txt
  111. +8 −4 src/libs/notification/CMakeLists.txt
  112. +5 −12 src/libs/notification/tests/CMakeLists.txt
  113. +6 −3 src/libs/opts/CMakeLists.txt
  114. +1 −2 src/libs/plugin/CMakeLists.txt
  115. +8 −3 src/libs/pluginprocess/CMakeLists.txt
  116. +8 −10 src/libs/pluginprocess/tests/CMakeLists.txt
  117. +1 −2 src/libs/proposal/CMakeLists.txt
  118. +2 −5 src/libs/tools/benchmarks/CMakeLists.txt
  119. +2 −5 src/libs/tools/examples/CMakeLists.txt
  120. +3 −6 src/libs/tools/include/CMakeLists.txt
  121. +15 −16 src/libs/tools/src/CMakeLists.txt
  122. +3 −8 src/libs/tools/tests/CMakeLists.txt
  123. +1 −2 src/libs/utility/CMakeLists.txt
  124. +11 −22 src/plugins/CMakeLists.txt
  125. +4 −9 src/plugins/augeas/CMakeLists.txt
  126. +1 −2 src/plugins/base64/CMakeLists.txt
  127. +2 −5 src/plugins/blockresolver/CMakeLists.txt
  128. +2 −4 src/plugins/boolean/CMakeLists.txt
  129. +1 −2 src/plugins/c/CMakeLists.txt
  130. +2 −4 src/plugins/cache/CMakeLists.txt
  131. +1 −2 src/plugins/cachefilter/CMakeLists.txt
  132. +2 −5 src/plugins/camel/CMakeLists.txt
  133. +1 −2 src/plugins/ccode/CMakeLists.txt
  134. +3 −7 src/plugins/conditionals/CMakeLists.txt
  135. +4 −1 src/plugins/constants/CMakeLists.txt
  136. +1 −2 src/plugins/counter/CMakeLists.txt
  137. +14 −23 src/plugins/crypto/CMakeLists.txt
  138. +7 −8 src/plugins/csvstorage/CMakeLists.txt
  139. +5 −3 src/plugins/curlget/CMakeLists.txt
  140. +2 −8 src/plugins/date/CMakeLists.txt
  141. +6 −18 src/plugins/dbus/CMakeLists.txt
  142. +4 −10 src/plugins/dbusrecv/CMakeLists.txt
  143. +1 −2 src/plugins/desktop/CMakeLists.txt
  144. +1 −2 src/plugins/dini/CMakeLists.txt
  145. +1 −2 src/plugins/doc/CMakeLists.txt
  146. +1 −2 src/plugins/dpkg/CMakeLists.txt
  147. +1 −2 src/plugins/dump/CMakeLists.txt
  148. +3 −6 src/plugins/enum/CMakeLists.txt
  149. +1 −2 src/plugins/error/CMakeLists.txt
  150. +2 −5 src/plugins/file/CMakeLists.txt
  151. +2 −4 src/plugins/filecheck/CMakeLists.txt
  152. +2 −4 src/plugins/fstab/CMakeLists.txt
  153. +1 −2 src/plugins/gitresolver/CMakeLists.txt
  154. +1 −2 src/plugins/glob/CMakeLists.txt
  155. +6 −7 src/plugins/gopts/CMakeLists.txt
  156. +10 −2 src/plugins/gpgme/CMakeLists.txt
  157. +1 −2 src/plugins/hexcode/CMakeLists.txt
  158. +2 −4 src/plugins/hexnumber/CMakeLists.txt
  159. +1 −2 src/plugins/hidden/CMakeLists.txt
  160. +2 −5 src/plugins/hosts/CMakeLists.txt
  161. +2 −4 src/plugins/iconv/CMakeLists.txt
  162. +4 −11 src/plugins/ini/CMakeLists.txt
  163. +1 −2 src/plugins/internalnotification/CMakeLists.txt
  164. +2 −5 src/plugins/ipaddr/CMakeLists.txt
  165. +1 −2 src/plugins/iterate/CMakeLists.txt
  166. +31 −18 src/plugins/jni/CMakeLists.txt
  167. +1 −2 src/plugins/journald/CMakeLists.txt
  168. +2 −4 src/plugins/keytometa/CMakeLists.txt
  169. +2 −4 src/plugins/line/CMakeLists.txt
  170. +6 −5 src/plugins/lineendings/CMakeLists.txt
  171. +1 −2 src/plugins/list/CMakeLists.txt
  172. +1 −2 src/plugins/logchange/CMakeLists.txt
  173. +17 −15 src/plugins/lua/CMakeLists.txt
  174. +2 −4 src/plugins/macaddr/CMakeLists.txt
  175. +3 −7 src/plugins/mini/CMakeLists.txt
  176. +10 −4 src/plugins/mmapstorage/CMakeLists.txt
  177. +2 −5 src/plugins/mozprefs/CMakeLists.txt
  178. +2 −4 src/plugins/multifile/CMakeLists.txt
  179. +1 −2 src/plugins/network/CMakeLists.txt
  180. +8 −12 src/plugins/ni/CMakeLists.txt
  181. +1 −2 src/plugins/noresolver/CMakeLists.txt
  182. +1 −2 src/plugins/null/CMakeLists.txt
  183. +2 −4 src/plugins/passwd/CMakeLists.txt
  184. +1 −2 src/plugins/path/CMakeLists.txt
  185. +3 −6 src/plugins/process/CMakeLists.txt
  186. +1 −2 src/plugins/profile/CMakeLists.txt
  187. +16 −5 src/plugins/python/CMakeLists.txt
  188. +16 −11 src/plugins/python2/CMakeLists.txt
  189. +1 −2 src/plugins/quickdump/CMakeLists.txt
  190. +9 −19 src/plugins/range/CMakeLists.txt
  191. +3 −6 src/plugins/reference/CMakeLists.txt
  192. +5 −1 src/plugins/regexdispatcher/CMakeLists.txt
  193. +1 −2 src/plugins/regexstore/CMakeLists.txt
  194. +2 −4 src/plugins/rename/CMakeLists.txt
  195. +1 −2 src/plugins/required/CMakeLists.txt
  196. +6 −24 src/plugins/resolver/CMakeLists.txt
  197. +2 −4 src/plugins/rgbcolor/CMakeLists.txt
  198. +20 −22 src/plugins/ruby/CMakeLists.txt
  199. +2 −4 src/plugins/shell/CMakeLists.txt
  200. +2 −4 src/plugins/simpleini/CMakeLists.txt
  201. +1 −2 src/plugins/simplespeclang/CMakeLists.txt
  202. +2 −5 src/plugins/spec/CMakeLists.txt
  203. +3 −7 src/plugins/specload/CMakeLists.txt
  204. +2 −5 src/plugins/struct/CMakeLists.txt
  205. +1 −2 src/plugins/sync/CMakeLists.txt
  206. +1 −2 src/plugins/syslog/CMakeLists.txt
  207. +1 −2 src/plugins/tcl/CMakeLists.txt
  208. +2 −4 src/plugins/template/CMakeLists.txt
  209. +1 −2 src/plugins/timeofday/CMakeLists.txt
  210. +1 −2 src/plugins/tracer/CMakeLists.txt
  211. +2 −5 src/plugins/type/CMakeLists.txt
  212. +25 −12 src/plugins/typechecker/CMakeLists.txt
  213. +2 −4 src/plugins/uname/CMakeLists.txt
  214. +2 −4 src/plugins/unit/CMakeLists.txt
  215. +1 −3 src/plugins/validation/CMakeLists.txt
  216. +1 −2 src/plugins/wresolver/CMakeLists.txt
  217. +2 −4 src/plugins/xerces/CMakeLists.txt
  218. +1 −2 src/plugins/yajl/CMakeLists.txt
  219. +17 −7 src/plugins/yambi/CMakeLists.txt
  220. +2 −4 src/plugins/yamlcpp/CMakeLists.txt
  221. +3 −6 src/plugins/yamlsmith/CMakeLists.txt
  222. +41 −36 src/plugins/yanlr/CMakeLists.txt
  223. +2 −4 src/plugins/yanlr/RenameSymbols.cmake
  224. +13 −8 src/plugins/yawn/CMakeLists.txt
  225. +1 −3 src/plugins/yaypeg/CMakeLists.txt
  226. +1 −3 src/plugins/zeromqrecv/CMakeLists.txt
  227. +1 −3 src/plugins/zeromqsend/CMakeLists.txt
  228. +1 −2 src/tools/hub-zeromq/CMakeLists.txt
  229. +29 −21 src/tools/kdb/CMakeLists.txt
  230. +6 −10 src/tools/kdb/gen/templates/CMakeLists.txt
  231. +30 −16 src/tools/qt-gui/CMakeLists.txt
  232. +12 −18 src/tools/rest-backend/CMakeLists.txt
  233. +24 −5 src/tools/rest-backend/benchmarks/CMakeLists.txt
  234. +6 −3 src/tools/rest-backend/tests/CMakeLists.txt
  235. +2 −4 src/tools/rest-frontend/CMakeLists.txt
  236. +16 −27 src/tools/web/CMakeLists.txt
  237. +6 −19 tests/CMakeLists.txt
  238. +1 −2 tests/abi/CMakeLists.txt
  239. +1 −3 tests/cframework/CMakeLists.txt
  240. +2 −7 tests/ctest/CMakeLists.txt
  241. +25 −8 tests/kdb/CMakeLists.txt
  242. +17 −37 tests/shell/CMakeLists.txt
  243. +8 −10 tests/shell/external/CMakeLists.txt
  244. +1 −5 tests/shell/gen/CMakeLists.txt
  245. +21 −35 tests/shell/shell_recorder/CMakeLists.txt
  246. +12 −19 tests/shell/shell_recorder/tutorial_wrapper/CMakeLists.txt
@@ -15,17 +15,9 @@ set (ELEKTRA_HOMEPAGE_URL "https://www.libelektra.org")
if (CMAKE_VERSION VERSION_LESS 3.9)
project (Elektra VERSION "${KDB_VERSION}")
elseif (CMAKE_VERSION VERSION_LESS 3.12)
project (Elektra
VERSION ${KDB_VERSION}
DESCRIPTION
${ELEKTRA_DESCRIPTION})
project (Elektra VERSION ${KDB_VERSION} DESCRIPTION ${ELEKTRA_DESCRIPTION})
else (CMAKE_VERSION VERSION_LESS 3.12)
project (Elektra
VERSION ${KDB_VERSION}
DESCRIPTION
${ELEKTRA_DESCRIPTION}
HOMEPAGE_URL
${ELEKTRA_HOMEPAGE_URL})
project (Elektra VERSION ${KDB_VERSION} DESCRIPTION ${ELEKTRA_DESCRIPTION} HOMEPAGE_URL ${ELEKTRA_HOMEPAGE_URL})
endif (CMAKE_VERSION VERSION_LESS 3.9)

# fix macOS RPATH issues
@@ -63,9 +55,7 @@ endif (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE
RelWithDebInfo
CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif (NOT CMAKE_BUILD_TYPE)

set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
@@ -4,15 +4,18 @@ add_headers (HDR_FILES)

macro (do_benchmark source)
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}")
set (SOURCES ${HDR_FILES} ${ADDITIONAL_SOURCES} benchmarks.c benchmarks.h ${source}.c)
set (SOURCES
${HDR_FILES}
${ADDITIONAL_SOURCES}
benchmarks.c
benchmarks.h
${source}.c)
add_executable (benchmark_${source} ${SOURCES})
add_dependencies (benchmark_${source} kdberrors_generated elektra_error_codes_generated)

target_link_elektra (benchmark_${source} elektra-kdb elektra-meta)

set_target_properties (benchmark_${source}
PROPERTIES COMPILE_DEFINITIONS
HAVE_KDBCONFIG_H)
set_target_properties (benchmark_${source} PROPERTIES COMPILE_DEFINITIONS HAVE_KDBCONFIG_H)

# ~~~
# Useful for debugging: COMMAND strace -o strace.out "${command}"
@@ -21,7 +24,10 @@ macro (do_benchmark source)
COMMAND rm -f *.out
COMMAND valgrind
--tool=callgrind
--callgrind-out-file=callgrind.out "$<TARGET_FILE:benchmark_${source}>" > output.out
--callgrind-out-file=callgrind.out
"$<TARGET_FILE:benchmark_${source}>"
>
output.out
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
endmacro (do_benchmark)

@@ -38,9 +44,7 @@ if (NOT WIN32)
endif (NOT WIN32)

# exclude the OPMPHM benchmarks from mingw
if (ENABLE_OPTIMIZATIONS
AND NOT
WIN32)
if (ENABLE_OPTIMIZATIONS AND NOT WIN32)

# set USE_OPENMP here and define it in opmphm.c
set (USE_OPENMP 0)
@@ -25,8 +25,7 @@ write_basic_package_version_file ("${CMAKE_CURRENT_BINARY_DIR}/ElektraConfigVers
VERSION ${KDB_VERSION}
COMPATIBILITY AnyNewerVersion)

install (FILES "${CMAKE_CURRENT_BINARY_DIR}/ElektraConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/ElektraConfigVersion.cmake"
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/ElektraConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/ElektraConfigVersion.cmake"
DESTINATION ${TARGET_CMAKE_FOLDER})

# pkg-config files
@@ -45,9 +44,16 @@ configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/elektra.pc.in" "${CMAKE_CURRENT_BIN
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/elektra.pc" DESTINATION lib${LIB_SUFFIX}/${TARGET_PKGCONFIG_FOLDER})

add_custom_target (uninstall
COMMAND "${CMAKE_COMMAND}" -D KDB_VERSION=${KDB_VERSION} -D CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -D
CMAKE_FIND_LIBRARY_PREFIXES=${CMAKE_FIND_LIBRARY_PREFIXES} -D
CMAKE_FIND_LIBRARY_SUFFIXES=${CMAKE_FIND_LIBRARY_SUFFIXES} -P
COMMAND "${CMAKE_COMMAND}"
-D
KDB_VERSION=${KDB_VERSION}
-D
CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-D
CMAKE_FIND_LIBRARY_PREFIXES=${CMAKE_FIND_LIBRARY_PREFIXES}
-D
CMAKE_FIND_LIBRARY_SUFFIXES=${CMAKE_FIND_LIBRARY_SUFFIXES}
-P
"${CMAKE_CURRENT_SOURCE_DIR}/ElektraUninstall.cmake"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
COMMENT "Uninstalling Elektra from system or DESTDIR")

0 comments on commit 93865e1

Please sign in to comment.
You can’t perform that action at this time.