Skip to content
Permalink
Browse files

Style: Reformat CMake code with `cmake-format` 0.6

  • Loading branch information
sanssecours committed Nov 24, 2019
1 parent 1f6bdf3 commit 526c550849b8840fb4fc915ce25363c184cb397f
Showing with 3,050 additions and 3,554 deletions.
  1. +26 −14 CMakeLists.txt
  2. +6 −15 benchmarks/CMakeLists.txt
  3. +33 −51 doc/CMakeLists.txt
  4. +8 −2 doc/help/CMakeLists.txt
  5. +4 −15 examples/CMakeLists.txt
  6. +4 −3 examples/codegen/econf/cmake/CMakeLists.txt
  7. +4 −3 examples/codegen/menu/cmake/CMakeLists.txt
  8. +4 −3 examples/codegen/tree/cmake/CMakeLists.txt
  9. +7 −10 scripts/CMakeLists.txt
  10. +12 −17 scripts/cmake/CMakeLists.txt
  11. +222 −122 scripts/cmake/ElektraCache.cmake
  12. +4 −10 scripts/cmake/ElektraCompiling.cmake
  13. +25 −51 scripts/cmake/ElektraCoverage.cmake
  14. +1 −5 scripts/cmake/ElektraDocSet.cmake
  15. +8 −29 scripts/cmake/ElektraManPage.cmake
  16. +41 −39 scripts/cmake/ElektraPackaging.cmake
  17. +63 −70 scripts/cmake/ElektraUninstall.cmake
  18. +29 −33 scripts/cmake/Modules/DownloadProject.cmake
  19. +28 −34 scripts/cmake/Modules/ExportPluginSymbols.cmake
  20. +5 −5 scripts/cmake/Modules/FindANTLR4CPP.cmake
  21. +12 −8 scripts/cmake/Modules/FindAugeas.cmake
  22. +13 −14 scripts/cmake/Modules/FindCppCMS.cmake
  23. +33 −21 scripts/cmake/Modules/FindDBus.cmake
  24. +16 −17 scripts/cmake/Modules/FindDiscount.cmake
  25. +13 −26 scripts/cmake/Modules/FindGLib.cmake
  26. +19 −22 scripts/cmake/Modules/FindGObjectIntrospection.cmake
  27. +4 −1 scripts/cmake/Modules/FindGTest.cmake
  28. +19 −9 scripts/cmake/Modules/FindIconv.cmake
  29. +18 −19 scripts/cmake/Modules/FindLibBotan.cmake
  30. +10 −6 scripts/cmake/Modules/FindLibEv.cmake
  31. +1 −4 scripts/cmake/Modules/FindLibFA.cmake
  32. +6 −12 scripts/cmake/Modules/FindLibGit2.cmake
  33. +17 −20 scripts/cmake/Modules/FindLibGpgme.cmake
  34. +9 −6 scripts/cmake/Modules/FindLibJWT.cmake
  35. +4 −1 scripts/cmake/Modules/FindLibOpenSSL.cmake
  36. +1 −4 scripts/cmake/Modules/FindLibgcrypt.cmake
  37. +65 −111 scripts/cmake/Modules/FindLua.cmake
  38. +5 −5 scripts/cmake/Modules/FindMySqlCppConn.cmake
  39. +1 −4 scripts/cmake/Modules/FindPluginprocess.cmake
  40. +24 −55 scripts/cmake/Modules/FindPython2Interp.cmake
  41. +59 −84 scripts/cmake/Modules/FindPython2Libs.cmake
  42. +19 −18 scripts/cmake/Modules/FindSystemdJournal.cmake
  43. +45 −47 scripts/cmake/Modules/FindXercesC.cmake
  44. +1 −4 scripts/cmake/Modules/FindYajl.cmake
  45. +26 −28 scripts/cmake/Modules/FindZeroMQ.cmake
  46. +26 −28 scripts/cmake/Modules/Findlibuv.cmake
  47. +10 −8 scripts/cmake/Modules/Findyaml-cpp.cmake
  48. +89 −73 scripts/cmake/Modules/LibAddBinding.cmake
  49. +11 −7 scripts/cmake/Modules/LibAddLib.cmake
  50. +149 −217 scripts/cmake/Modules/LibAddMacros.cmake
  51. +159 −146 scripts/cmake/Modules/LibAddPlugin.cmake
  52. +18 −29 scripts/cmake/Modules/LibAddTest.cmake
  53. +5 −7 scripts/cmake/Modules/LibFindMacros.cmake
  54. +6 −9 scripts/cmake/Modules/SafeCheckSymbolExists.cmake
  55. +8 −2 scripts/cmake/Toolchain/Toolchain-mingw-w64-x86_64.cmake
  56. +20 −5 scripts/completion/CMakeLists.txt
  57. +4 −1 src/bindings/CMakeLists.txt
  58. +2 −11 src/bindings/cpp/tests/CMakeLists.txt
  59. +4 −1 src/bindings/glib/CMakeLists.txt
  60. +4 −1 src/bindings/glib/tests/CMakeLists.txt
  61. +20 −21 src/bindings/gsettings/CMakeLists.txt
  62. +2 −8 src/bindings/intercept/CMakeLists.txt
  63. +1 −4 src/bindings/intercept/env/benchmarks/CMakeLists.txt
  64. +12 −11 src/bindings/intercept/env/src/CMakeLists.txt
  65. +1 −4 src/bindings/intercept/fs/CMakeLists.txt
  66. +3 −12 src/bindings/io/CMakeLists.txt
  67. +6 −10 src/bindings/io/doc/CMakeLists.txt
  68. +15 −18 src/bindings/io/ev/CMakeLists.txt
  69. +1 −4 src/bindings/io/ev/example/CMakeLists.txt
  70. +15 −18 src/bindings/io/glib/CMakeLists.txt
  71. +1 −4 src/bindings/io/glib/example/CMakeLists.txt
  72. +18 −21 src/bindings/io/uv/CMakeLists.txt
  73. +1 −4 src/bindings/io/uv/example/CMakeLists.txt
  74. +55 −68 src/bindings/jna/CMakeLists.txt
  75. +15 −20 src/bindings/rust/CMakeLists.txt
  76. +4 −16 src/bindings/swig/CMakeLists.txt
  77. +11 −19 src/bindings/swig/lua/CMakeLists.txt
  78. +8 −2 src/bindings/swig/lua/tests/CMakeLists.txt
  79. +16 −26 src/bindings/swig/python/CMakeLists.txt
  80. +8 −2 src/bindings/swig/python/tests/CMakeLists.txt
  81. +28 −35 src/bindings/swig/python2/CMakeLists.txt
  82. +4 −1 src/bindings/swig/python2/tests/CMakeLists.txt
  83. +34 −81 src/bindings/swig/ruby/CMakeLists.txt
  84. +6 −4 src/bindings/swig/ruby/tests/CMakeLists.txt
  85. +28 −28 src/include/CMakeLists.txt
  86. +3 −15 src/include/kdbio/CMakeLists.txt
  87. +25 −36 src/libs/CMakeLists.txt
  88. +63 −68 src/libs/elektra/CMakeLists.txt
  89. +1 −5 src/libs/globbing/CMakeLists.txt
  90. +1 −6 src/libs/highlevel/CMakeLists.txt
  91. +1 −5 src/libs/invoke/CMakeLists.txt
  92. +1 −6 src/libs/io/CMakeLists.txt
  93. +1 −1 src/libs/io/adapter/zeromq/CMakeLists.txt
  94. +6 −5 src/libs/loader/CMakeLists.txt
  95. +10 −9 src/libs/merge/CMakeLists.txt
  96. +1 −6 src/libs/meta/CMakeLists.txt
  97. +8 −7 src/libs/notification/CMakeLists.txt
  98. +1 −5 src/libs/opts/CMakeLists.txt
  99. +1 −6 src/libs/pluginprocess/CMakeLists.txt
  100. +1 −4 src/libs/pluginprocess/tests/CMakeLists.txt
  101. +39 −44 src/libs/tools/src/CMakeLists.txt
  102. +5 −7 src/libs/tools/tests/CMakeLists.txt
  103. +14 −10 src/plugins/CMakeLists.txt
  104. +17 −15 src/plugins/augeas/CMakeLists.txt
  105. +5 −7 src/plugins/base64/CMakeLists.txt
  106. +5 −4 src/plugins/blockresolver/CMakeLists.txt
  107. +1 −2 src/plugins/c/CMakeLists.txt
  108. +5 −4 src/plugins/cache/CMakeLists.txt
  109. +5 −10 src/plugins/ccode/CMakeLists.txt
  110. +7 −11 src/plugins/conditionals/CMakeLists.txt
  111. +7 −12 src/plugins/constants/CMakeLists.txt
  112. +1 −2 src/plugins/counter/CMakeLists.txt
  113. +2 −9 src/plugins/cpptemplate/CMakeLists.txt
  114. +22 −25 src/plugins/crypto/CMakeLists.txt
  115. +7 −9 src/plugins/csvstorage/CMakeLists.txt
  116. +7 −9 src/plugins/curlget/CMakeLists.txt
  117. +4 −3 src/plugins/date/CMakeLists.txt
  118. +5 −4 src/plugins/dbus/CMakeLists.txt
  119. +12 −10 src/plugins/dbusrecv/CMakeLists.txt
  120. +1 −2 src/plugins/desktop/CMakeLists.txt
  121. +4 −10 src/plugins/directoryvalue/CMakeLists.txt
  122. +4 −3 src/plugins/doc/CMakeLists.txt
  123. +1 −2 src/plugins/dpkg/CMakeLists.txt
  124. +4 −3 src/plugins/dump/CMakeLists.txt
  125. +1 −2 src/plugins/error/CMakeLists.txt
  126. +5 −7 src/plugins/fcrypt/CMakeLists.txt
  127. +4 −3 src/plugins/file/CMakeLists.txt
  128. +6 −5 src/plugins/filecheck/CMakeLists.txt
  129. +5 −4 src/plugins/fstab/CMakeLists.txt
  130. +6 −5 src/plugins/gitresolver/CMakeLists.txt
  131. +4 −3 src/plugins/glob/CMakeLists.txt
  132. +10 −9 src/plugins/gopts/CMakeLists.txt
  133. +7 −10 src/plugins/gpgme/CMakeLists.txt
  134. +4 −3 src/plugins/hexcode/CMakeLists.txt
  135. +5 −4 src/plugins/hexnumber/CMakeLists.txt
  136. +1 −2 src/plugins/hidden/CMakeLists.txt
  137. +7 −10 src/plugins/hosts/CMakeLists.txt
  138. +6 −5 src/plugins/iconv/CMakeLists.txt
  139. +7 −6 src/plugins/ini/CMakeLists.txt
  140. +5 −4 src/plugins/internalnotification/CMakeLists.txt
  141. +4 −3 src/plugins/ipaddr/CMakeLists.txt
  142. +4 −3 src/plugins/iterate/CMakeLists.txt
  143. +25 −40 src/plugins/jni/CMakeLists.txt
  144. +5 −4 src/plugins/journald/CMakeLists.txt
  145. +9 −13 src/plugins/kconfig/CMakeLists.txt
  146. +5 −4 src/plugins/keytometa/CMakeLists.txt
  147. +5 −4 src/plugins/line/CMakeLists.txt
  148. +5 −7 src/plugins/lineendings/CMakeLists.txt
  149. +5 −7 src/plugins/list/CMakeLists.txt
  150. +1 −2 src/plugins/logchange/CMakeLists.txt
  151. +20 −24 src/plugins/lua/CMakeLists.txt
  152. +4 −3 src/plugins/macaddr/CMakeLists.txt
  153. +4 −6 src/plugins/mathcheck/CMakeLists.txt
  154. +6 −5 src/plugins/mini/CMakeLists.txt
  155. +14 −16 src/plugins/mmapstorage/CMakeLists.txt
  156. +5 −4 src/plugins/mozprefs/CMakeLists.txt
  157. +5 −4 src/plugins/multifile/CMakeLists.txt
  158. +4 −3 src/plugins/network/CMakeLists.txt
  159. +7 −9 src/plugins/ni/CMakeLists.txt
  160. +1 −2 src/plugins/noresolver/CMakeLists.txt
  161. +1 −2 src/plugins/null/CMakeLists.txt
  162. +5 −4 src/plugins/passwd/CMakeLists.txt
  163. +4 −3 src/plugins/path/CMakeLists.txt
  164. +6 −5 src/plugins/process/CMakeLists.txt
  165. +4 −3 src/plugins/profile/CMakeLists.txt
  166. +18 −31 src/plugins/python/CMakeLists.txt
  167. +25 −34 src/plugins/python2/CMakeLists.txt
  168. +4 −3 src/plugins/quickdump/CMakeLists.txt
  169. +6 −8 src/plugins/range/CMakeLists.txt
  170. +6 −8 src/plugins/reference/CMakeLists.txt
  171. +5 −4 src/plugins/rename/CMakeLists.txt
  172. +31 −34 src/plugins/resolver/CMakeLists.txt
  173. +4 −3 src/plugins/rgbcolor/CMakeLists.txt
  174. +13 −21 src/plugins/ruby/CMakeLists.txt
  175. +1 −2 src/plugins/shell/CMakeLists.txt
  176. +5 −4 src/plugins/simpleini/CMakeLists.txt
  177. +5 −4 src/plugins/spec/CMakeLists.txt
  178. +14 −13 src/plugins/specload/CMakeLists.txt
  179. +1 −2 src/plugins/sync/CMakeLists.txt
  180. +1 −2 src/plugins/syslog/CMakeLists.txt
  181. +6 −10 src/plugins/tcl/CMakeLists.txt
  182. +4 −3 src/plugins/template/CMakeLists.txt
  183. +1 −2 src/plugins/timeofday/CMakeLists.txt
  184. +1 −2 src/plugins/tracer/CMakeLists.txt
  185. +5 −7 src/plugins/type/CMakeLists.txt
  186. +5 −4 src/plugins/uname/CMakeLists.txt
  187. +4 −3 src/plugins/unit/CMakeLists.txt
  188. +4 −3 src/plugins/validation/CMakeLists.txt
  189. +1 −2 src/plugins/wresolver/CMakeLists.txt
  190. +13 −12 src/plugins/xerces/CMakeLists.txt
  191. +7 −10 src/plugins/xmltool/CMakeLists.txt
  192. +16 −15 src/plugins/yajl/CMakeLists.txt
  193. +65 −47 src/plugins/yambi/CMakeLists.txt
  194. +38 −40 src/plugins/yamlcpp/CMakeLists.txt
  195. +5 −4 src/plugins/yamlsmith/CMakeLists.txt
  196. +110 −89 src/plugins/yanlr/CMakeLists.txt
  197. +13 −65 src/plugins/yanlr/RenameSymbols.cmake
  198. +12 −10 src/plugins/zeromqrecv/CMakeLists.txt
  199. +5 −4 src/plugins/zeromqsend/CMakeLists.txt
  200. +3 −16 src/tools/kdb/CMakeLists.txt
  201. +10 −8 src/tools/kdb/gen/templates/CMakeLists.txt
  202. +6 −3 src/tools/pythongen/CMakeLists.txt
  203. +42 −51 src/tools/qt-gui/CMakeLists.txt
  204. +28 −34 src/tools/web/CMakeLists.txt
  205. +7 −13 src/tools/website-backend/CMakeLists.txt
  206. +5 −24 src/tools/website-backend/benchmarks/CMakeLists.txt
  207. +13 −15 src/tools/website-backend/tests/CMakeLists.txt
  208. +6 −16 src/tools/website-frontend/CMakeLists.txt
  209. +34 −27 tests/CMakeLists.txt
  210. +32 −41 tests/kdb/CMakeLists.txt
  211. +26 −28 tests/shell/CMakeLists.txt
  212. +12 −10 tests/shell/external/CMakeLists.txt
  213. +10 −2 tests/shell/gen/CMakeLists.txt
  214. +5 −14 tests/shell/shell_recorder/CMakeLists.txt
  215. +6 −21 tests/shell/shell_recorder/tutorial_wrapper/CMakeLists.txt
@@ -15,9 +15,16 @@ 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
@@ -41,21 +48,24 @@ endif (ENABLE_TESTING)

if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
if (NOT FORCE_IN_SOURCE_BUILD)
message (FATAL_ERROR "In-source builds are not permitted.\n"
"Make a separate folder for building:\n"
" mkdir build && cd build && cmake ..\n"
"Before that, remove the files already created:\n"
" rm -rf CMakeCache.txt CMakeFiles\n"
"If you really know what you are doing\n"
"(will overwrite original files!) use:\n"
" cmake -DFORCE_IN_SOURCE_BUILD=ON\n")
message (
FATAL_ERROR
"In-source builds are not permitted.\n"
"Make a separate folder for building:\n"
" mkdir build && cd build && cmake ..\n"
"Before that, remove the files already created:\n"
" rm -rf CMakeCache.txt CMakeFiles\n"
"If you really know what you are doing\n"
"(will overwrite original files!) use:\n"
" cmake -DFORCE_IN_SOURCE_BUILD=ON\n")
endif (NOT FORCE_IN_SOURCE_BUILD)
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)
set (
CMAKE_BUILD_TYPE
RelWithDebInfo
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)
@@ -96,7 +106,9 @@ endif (BUILD_DOCUMENTATION)
add_subdirectory (scripts)

# is there anything to build except documentation?
if (BUILD_FULL OR BUILD_STATIC OR BUILD_SHARED)
if (BUILD_FULL
OR BUILD_STATIC
OR BUILD_SHARED)
if (BUILD_TESTING)
find_package (GTest)
endif (BUILD_TESTING)
@@ -4,12 +4,7 @@ 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})

target_link_elektra (benchmark_${source} elektra-kdb elektra-meta)
@@ -19,15 +14,11 @@ macro (do_benchmark source)
# ~~~
# Useful for debugging: COMMAND strace -o strace.out "${command}"
# ~~~
add_custom_target (benchmark_${source}_callgrind
COMMAND rm -f *.out
COMMAND valgrind
--tool=callgrind
--callgrind-out-file=callgrind.out
"$<TARGET_FILE:benchmark_${source}>"
>
output.out
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
add_custom_target (
benchmark_${source}_callgrind
COMMAND rm -f *.out
COMMAND valgrind --tool=callgrind --callgrind-out-file=callgrind.out "$<TARGET_FILE:benchmark_${source}>" > output.out
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
endmacro (do_benchmark)

do_benchmark (large)
@@ -10,11 +10,7 @@ find_package (Doxygen QUIET)
# file is the file name to set a dependency to
# install is where it should be installed
# ~~~
macro (do_doc
target
folder
file
install)
macro (do_doc target folder file install)

# sometimes doxygen is too slow and fails with "Could not create output directory .../doc/html"
file (MAKE_DIRECTORY ${folder})
@@ -44,7 +40,10 @@ if (DOXYGEN_FOUND)
endif (BUILD_PDF)

if (BUILD_DOCSET)
execute_process (COMMAND make ARGS -v RESULT_VARIABLE MAKE_NOT_AVAILABLE OUTPUT_QUIET)
execute_process (
COMMAND make ARGS -v
RESULT_VARIABLE MAKE_NOT_AVAILABLE
OUTPUT_QUIET)
if (MAKE_NOT_AVAILABLE)
set (WITH_DOCSET NO)
message (WARNING "Sorry, since Make is not available I can not build the DocSet.")
@@ -70,45 +69,31 @@ if (DOXYGEN_FOUND)
endif ()

configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" @ONLY)
file (GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile INPUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

do_doc (html
${OUTPUT_DIRECTORY}/html/
index.html
${TARGET_DOCUMENTATION_HTML_FOLDER})
do_doc (man3
${OUTPUT_DIRECTORY}/man/man3elektra/
kdb.3elektra
"${TARGET_DOCUMENTATION_MAN_FOLDER};PATTERN;_*;EXCLUDE")
file (
GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
INPUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

do_doc (html ${OUTPUT_DIRECTORY}/html/ index.html ${TARGET_DOCUMENTATION_HTML_FOLDER})
do_doc (man3 ${OUTPUT_DIRECTORY}/man/man3elektra/ kdb.3elektra "${TARGET_DOCUMENTATION_MAN_FOLDER};PATTERN;_*;EXCLUDE")
add_dependencies (man3 html)
set (outputs ${OUTPUT_DIRECTORY}/html/index.html ${OUTPUT_DIRECTORY}/man/man3elektra/kdb.3elektra)

if (WITH_LATEX)
do_doc (latex
${OUTPUT_DIRECTORY}/latex/
refman.tex
${TARGET_DOCUMENTATION_LATEX_FOLDER})
do_doc (latex ${OUTPUT_DIRECTORY}/latex/ refman.tex ${TARGET_DOCUMENTATION_LATEX_FOLDER})
add_dependencies (latex man3 html)
list (APPEND outputs ${OUTPUT_DIRECTORY}/latex/refman.tex)

file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/markdownlinkconverter/elektraSpecialCharacters.sty"
DESTINATION "${OUTPUT_DIRECTORY}/latex/")

add_custom_command (OUTPUT ${OUTPUT_DIRECTORY}/latex/refman.pdf
COMMAND ${PDFLATEX_COMPILER}
ARGS
${PDFLATEX_COMPILER_OPTIONS}
${OUTPUT_DIRECTORY}/latex/refman.tex
COMMAND ${PDFLATEX_COMPILER}
ARGS
${PDFLATEX_COMPILER_OPTIONS}
${OUTPUT_DIRECTORY}/latex/refman.tex
COMMAND ${PDFLATEX_COMPILER}
ARGS
${PDFLATEX_COMPILER_OPTIONS}
${OUTPUT_DIRECTORY}/latex/refman.tex
DEPENDS ${OUTPUT_DIRECTORY}/latex/refman.tex markdownlinkconverter
WORKING_DIRECTORY ${OUTPUT_DIRECTORY}/latex/)
add_custom_command (
OUTPUT ${OUTPUT_DIRECTORY}/latex/refman.pdf
COMMAND ${PDFLATEX_COMPILER} ARGS ${PDFLATEX_COMPILER_OPTIONS} ${OUTPUT_DIRECTORY}/latex/refman.tex
COMMAND ${PDFLATEX_COMPILER} ARGS ${PDFLATEX_COMPILER_OPTIONS} ${OUTPUT_DIRECTORY}/latex/refman.tex
COMMAND ${PDFLATEX_COMPILER} ARGS ${PDFLATEX_COMPILER_OPTIONS} ${OUTPUT_DIRECTORY}/latex/refman.tex
DEPENDS ${OUTPUT_DIRECTORY}/latex/refman.tex markdownlinkconverter
WORKING_DIRECTORY ${OUTPUT_DIRECTORY}/latex/)

add_custom_target (pdf ALL DEPENDS ${OUTPUT_DIRECTORY}/latex/refman.pdf)
add_dependencies (pdf latex)
@@ -117,25 +102,22 @@ if (DOXYGEN_FOUND)

if (WITH_DOCSET)
set (DOCSET_PATH ${OUTPUT_DIRECTORY}/html/org.libelektra.docset)
add_custom_command (OUTPUT ${DOCSET_PATH}
COMMAND make
COMMAND ${CMAKE_COMMAND}
ARGS
-D
DOCSET_PATH=${DOCSET_PATH}
-D
ICON_PATH=${CMAKE_SOURCE_DIR}/doc/images/icon.png
-P
${CMAKE_SOURCE_DIR}/scripts/cmake/ElektraDocSet.cmake
DEPENDS ${OUTPUT_DIRECTORY}/html/index.html markdownlinkconverter
WORKING_DIRECTORY ${OUTPUT_DIRECTORY}/html)
add_custom_command (
OUTPUT ${DOCSET_PATH}
COMMAND make
COMMAND
${CMAKE_COMMAND} ARGS -D DOCSET_PATH=${DOCSET_PATH} -D ICON_PATH=${CMAKE_SOURCE_DIR}/doc/images/icon.png -P
${CMAKE_SOURCE_DIR}/scripts/cmake/ElektraDocSet.cmake
DEPENDS ${OUTPUT_DIRECTORY}/html/index.html markdownlinkconverter
WORKING_DIRECTORY ${OUTPUT_DIRECTORY}/html)
add_custom_target (docset ALL DEPENDS ${DOCSET_PATH})
endif (WITH_DOCSET)

add_custom_command (OUTPUT ${outputs}
COMMAND ${DOXYGEN_EXECUTABLE} ARGS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile markdownlinkconverter
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command (
OUTPUT ${outputs}
COMMAND ${DOXYGEN_EXECUTABLE} ARGS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile markdownlinkconverter
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
else (DOXYGEN_FOUND)
message (WARNING "Sorry, I cannot create the reference manual: I could not find Doxygen")
endif (DOXYGEN_FOUND)
@@ -10,13 +10,19 @@ if (BUILD_DOCUMENTATION)
endif (RONN_LOC)
endif (BUILD_DOCUMENTATION)

file (GLOB KDBNAMES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} kdb*.md)
file (
GLOB KDBNAMES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
kdb*.md)
foreach (FULLNAME ${KDBNAMES})
get_filename_component (NAME ${FULLNAME} NAME_WE)
generate_manpage (${NAME})
endforeach ()

file (GLOB KDBNAMES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} elektra*.md)
file (
GLOB KDBNAMES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
elektra*.md)
foreach (FULLNAME ${KDBNAMES})
get_filename_component (NAME ${FULLNAME} NAME_WE)
generate_manpage (${NAME} SECTION 7)
@@ -32,10 +32,7 @@ target_link_elektra (kdbset elektra-kdb elektra-merge)
target_link_elektra (set_key elektra-kdb)
target_link_elektra (opts elektra-ease elektra-opts)
target_link_elektra (optsSnippets elektra-opts)
target_link_elektra (gopts
elektra-ease
elektra-opts
elektra-kdb)
target_link_elektra (gopts elektra-ease elektra-opts elektra-kdb)

# Notification examples

@@ -63,16 +60,12 @@ if (FOUND_NAME GREATER -1)
set (SOURCES ${SRC_FILES} ${HDR_FILES})
if (BUILD_FULL OR BUILD_STATIC)
list (APPEND SOURCES $<TARGET_OBJECTS:elektra-io-uv-objects>) # add sources for elektra-io-uv for static and full
# builds
# builds
endif ()

add_executable (${EXAMPLE} ${SOURCES})

target_link_elektra (${EXAMPLE}
elektra-kdb
elektra-notification
elektra-io
elektra-io-uv)
target_link_elektra (${EXAMPLE} elektra-kdb elektra-notification elektra-io elektra-io-uv)
if (BUILD_FULL OR BUILD_STATIC)
target_link_libraries (${EXAMPLE} ${PC_libuv_LDFLAGS})
endif ()
@@ -103,11 +96,7 @@ if (FOUND_NAME GREATER -1)

add_executable (${EXAMPLE} ${SOURCES})

target_link_elektra (${EXAMPLE}
elektra-kdb
elektra-notification
elektra-io
elektra-io-glib)
target_link_elektra (${EXAMPLE} elektra-kdb elektra-notification elektra-io elektra-io-glib)
if (BUILD_FULL OR BUILD_STATIC)
target_link_libraries (${EXAMPLE} ${GLib_LIBRARY})
endif ()
@@ -18,9 +18,10 @@ if (ELEKTRA_FOUND)

include_directories (${Elektra_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})

elektra_kdb_gen (highlevel "spec/sw/example/econf/#0/current" "genelektra"
INPUT ni "${CMAKE_CURRENT_SOURCE_DIR}/../spec.ini"
KDB ${KDB})
elektra_kdb_gen (
highlevel "spec/sw/example/econf/#0/current" "genelektra"
INPUT ni "${CMAKE_CURRENT_SOURCE_DIR}/../spec.ini"
KDB ${KDB})

add_executable (application ../src/application.c ${CMAKE_CURRENT_BINARY_DIR}/genelektra.c)
target_link_libraries (application ${ElektraCodegen_LIBRARIES})
@@ -18,9 +18,10 @@ if (ELEKTRA_FOUND)

include_directories (${Elektra_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})

elektra_kdb_gen (highlevel "spec/sw/example/menu/#0/current" "genelektra"
INPUT ni "${CMAKE_CURRENT_SOURCE_DIR}/../spec.ini"
KDB ${KDB})
elektra_kdb_gen (
highlevel "spec/sw/example/menu/#0/current" "genelektra"
INPUT ni "${CMAKE_CURRENT_SOURCE_DIR}/../spec.ini"
KDB ${KDB})

add_executable (application ../src/application.c ${CMAKE_CURRENT_BINARY_DIR}/genelektra.c)
target_link_libraries (application ${ElektraCodegen_LIBRARIES})
@@ -18,9 +18,10 @@ if (ELEKTRA_FOUND)

include_directories (${Elektra_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})

elektra_kdb_gen (highlevel "spec/sw/example/tree/#0/current" "genelektra"
INPUT ni "${CMAKE_CURRENT_SOURCE_DIR}/../spec.ini"
KDB ${KDB})
elektra_kdb_gen (
highlevel "spec/sw/example/tree/#0/current" "genelektra"
INPUT ni "${CMAKE_CURRENT_SOURCE_DIR}/../spec.ini"
KDB ${KDB})

add_executable (application ../src/application.c ${CMAKE_CURRENT_BINARY_DIR}/genelektra.c)
target_link_libraries (application ${ElektraCodegen_LIBRARIES})
@@ -6,11 +6,7 @@ if (PROCESSOR_COUNT EQUAL 0)
endif (PROCESSOR_COUNT EQUAL 0)

set (CMAKE_MAKE_PROGRAM_BASENAME ${CMAKE_MAKE_PROGRAM})
string (REGEX
REPLACE ".*/([^/]+)$"
"\\1"
CMAKE_MAKE_PROGRAM_BASENAME
${CMAKE_MAKE_PROGRAM_BASENAME})
string (REGEX REPLACE ".*/([^/]+)$" "\\1" CMAKE_MAKE_PROGRAM_BASENAME ${CMAKE_MAKE_PROGRAM_BASENAME})

install (PROGRAMS benchmark-createtree DESTINATION ${TARGET_TOOL_EXEC_FOLDER})

@@ -38,11 +34,12 @@ install (PROGRAMS reset DESTINATION ${TARGET_TOOL_EXEC_FOLDER})
install (PROGRAMS reset-elektra DESTINATION ${TARGET_TOOL_EXEC_FOLDER})
install (PROGRAMS umount-all DESTINATION ${TARGET_TOOL_EXEC_FOLDER})

add_custom_target (source-package
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/make-source-package"
COMMENT "Make a elektra source package by using git"
VERBATIM
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
add_custom_target (
source-package
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/make-source-package"
COMMENT "Make a elektra source package by using git"
VERBATIM
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")

configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/randoop/randoop.in" "${CMAKE_CURRENT_BINARY_DIR}/randoop/randoop" @ONLY)
file (COPY "${CMAKE_CURRENT_SOURCE_DIR}/randoop/randoopClasses.txt" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/randoop/")

0 comments on commit 526c550

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