mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Cleanup CMake files
- Replace tabs with spaces - Use lowercase for CMake commands - Unify alignment - Remove superfluous empty line - Add space after CMake command Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
81bc57309b
commit
20a8a4a4cc
8 changed files with 51 additions and 42 deletions
|
@ -17,8 +17,8 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
|
|||
execute_process (COMMAND git log -1 --pretty=format:%h
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE COMMIT)
|
||||
configure_file ( ${CMAKE_SOURCE_DIR}/commit.h.in
|
||||
${CMAKE_SOURCE_DIR}/commit.h)
|
||||
configure_file (${CMAKE_SOURCE_DIR}/commit.h.in
|
||||
${CMAKE_SOURCE_DIR}/commit.h)
|
||||
message ("-- Found SHA1 reference: ${COMMIT}")
|
||||
endif (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
|
||||
|
||||
|
@ -32,22 +32,21 @@ set (PACKAGE_STRING "${PACKAGE} ${VERSION}")
|
|||
string (TIMESTAMP PACKAGE_DATE "%Y-%m-%d")
|
||||
|
||||
if (FREEBSD OR DRAGONFLY)
|
||||
SET (TIMEW_MANDIR man CACHE STRING "Installation directory for man pages")
|
||||
SET (TIMEW_MAN1DIR man/man1 CACHE STRING "Installation directory for man pages, section 1")
|
||||
SET (TIMEW_MAN5DIR man/man5 CACHE STRING "Installation directory for man pages, section 5")
|
||||
SET (TIMEW_MAN7DIR man/man7 CACHE STRING "Installation directory for man pages, section 7")
|
||||
set (TIMEW_MANDIR man CACHE STRING "Installation directory for man pages")
|
||||
set (TIMEW_MAN1DIR man/man1 CACHE STRING "Installation directory for man pages, section 1")
|
||||
set (TIMEW_MAN5DIR man/man5 CACHE STRING "Installation directory for man pages, section 5")
|
||||
set (TIMEW_MAN7DIR man/man7 CACHE STRING "Installation directory for man pages, section 7")
|
||||
else (FREEBSD OR DRAGONFLY)
|
||||
SET (TIMEW_MANDIR share/man CACHE STRING "Installation directory for man pages")
|
||||
SET (TIMEW_MAN1DIR share/man/man1 CACHE STRING "Installation directory for man pages, section 1")
|
||||
SET (TIMEW_MAN5DIR share/man/man5 CACHE STRING "Installation directory for man pages, section 5")
|
||||
SET (TIMEW_MAN7DIR share/man/man7 CACHE STRING "Installation directory for man pages, section 7")
|
||||
set (TIMEW_MANDIR share/man CACHE STRING "Installation directory for man pages")
|
||||
set (TIMEW_MAN1DIR share/man/man1 CACHE STRING "Installation directory for man pages, section 1")
|
||||
set (TIMEW_MAN5DIR share/man/man5 CACHE STRING "Installation directory for man pages, section 5")
|
||||
set (TIMEW_MAN7DIR share/man/man7 CACHE STRING "Installation directory for man pages, section 7")
|
||||
endif (FREEBSD OR DRAGONFLY)
|
||||
SET (TIMEW_DOCDIR share/doc/timew CACHE STRING "Installation directory for doc files")
|
||||
set (TIMEW_DOCDIR share/doc/timew CACHE STRING "Installation directory for doc files")
|
||||
|
||||
message ("-- Configuring cmake.h")
|
||||
configure_file (
|
||||
${CMAKE_SOURCE_DIR}/cmake.h.in
|
||||
${CMAKE_SOURCE_DIR}/cmake.h)
|
||||
configure_file (${CMAKE_SOURCE_DIR}/cmake.h.in
|
||||
${CMAKE_SOURCE_DIR}/cmake.h)
|
||||
|
||||
add_subdirectory (src)
|
||||
add_subdirectory (src/commands)
|
||||
|
@ -66,9 +65,22 @@ endforeach (doc_FILE)
|
|||
|
||||
set (CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set (CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION})
|
||||
set (CPACK_SOURCE_IGNORE_FILES "CMakeCache" "CMakeFiles" "CPackConfig" "CPackSourceConfig"
|
||||
"_CPack_Packages" "cmake_install" "install_manifest" "Makefile$"
|
||||
"test" "package-config" "src/timew$" "src/libtimew.a"
|
||||
"src/commands/libcommands.a" "src/lex$" "src/liblibshared.a"
|
||||
"/\\\\.gitignore" "/\\\\.git/" "swp$")
|
||||
set (CPACK_SOURCE_IGNORE_FILES "CMakeCache"
|
||||
"CMakeFiles"
|
||||
"CPackConfig"
|
||||
"CPackSourceConfig"
|
||||
"_CPack_Packages"
|
||||
"cmake_install"
|
||||
"install_manifest"
|
||||
"Makefile$"
|
||||
"test"
|
||||
"package-config"
|
||||
"src/timew$"
|
||||
"src/libtimew.a"
|
||||
"src/commands/libcommands.a"
|
||||
"src/lex$"
|
||||
"src/liblibshared.a"
|
||||
"/\\\\.gitignore"
|
||||
"/\\\\.git/"
|
||||
"swp$")
|
||||
include (CPack)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
(thanks to Ankur Sinha)
|
||||
- Use local man pages in tests
|
||||
(thanks to Maxim Beder)
|
||||
- Cleanup CMake files
|
||||
|
||||
------ current release ---------------------------
|
||||
|
||||
|
|
|
@ -6,10 +6,9 @@ set (DOC_FILES)
|
|||
foreach (SRC ${DOC_SOURCES})
|
||||
string (REPLACE ".adoc" "" OUTPUT_FILE_NAME "${SRC}")
|
||||
|
||||
add_custom_command (
|
||||
OUTPUT "${OUTPUT_FILE_NAME}"
|
||||
COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage ${ASCIIDOCTOR_OPTIONS} ${SRC} -o ${OUTPUT_FILE_NAME}
|
||||
DEPENDS "${SRC}")
|
||||
add_custom_command (OUTPUT "${OUTPUT_FILE_NAME}"
|
||||
COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage ${ASCIIDOCTOR_OPTIONS} ${SRC} -o ${OUTPUT_FILE_NAME}
|
||||
DEPENDS "${SRC}")
|
||||
|
||||
set (DOC_FILES ${DOC_FILES} "${OUTPUT_FILE_NAME}")
|
||||
endforeach (SRC)
|
||||
|
|
|
@ -6,10 +6,9 @@ set (DOC_FILES)
|
|||
foreach (SRC ${DOC_SOURCES})
|
||||
string (REPLACE ".adoc" "" OUTPUT_FILE_NAME "${SRC}")
|
||||
|
||||
add_custom_command (
|
||||
OUTPUT "${OUTPUT_FILE_NAME}"
|
||||
COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage ${ASCIIDOCTOR_OPTIONS} ${SRC} -o ${OUTPUT_FILE_NAME}
|
||||
DEPENDS "${SRC}")
|
||||
add_custom_command (OUTPUT "${OUTPUT_FILE_NAME}"
|
||||
COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage ${ASCIIDOCTOR_OPTIONS} ${SRC} -o ${OUTPUT_FILE_NAME}
|
||||
DEPENDS "${SRC}")
|
||||
|
||||
set (DOC_FILES ${DOC_FILES} "${OUTPUT_FILE_NAME}")
|
||||
endforeach (SRC)
|
||||
|
|
8
doc/themes/CMakeLists.txt
vendored
8
doc/themes/CMakeLists.txt
vendored
|
@ -3,7 +3,7 @@ cmake_minimum_required (VERSION 2.8.12)
|
|||
message ("-- Configuring theme documentation")
|
||||
|
||||
install (FILES README DESTINATION ${TIMEW_DOCDIR}/doc/themes)
|
||||
INSTALL (FILES dark.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
|
||||
INSTALL (FILES dark_blue.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
|
||||
INSTALL (FILES dark_green.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
|
||||
INSTALL (FILES dark_red.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
|
||||
install (FILES dark.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
|
||||
install (FILES dark_blue.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
|
||||
install (FILES dark_green.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
|
||||
install (FILES dark_red.theme DESTINATION ${TIMEW_DOCDIR}/doc/themes)
|
||||
|
|
|
@ -72,4 +72,3 @@ set_property (TARGET timew_executable PROPERTY OUTPUT_NAME "timew")
|
|||
set_property (TARGET lex_executable PROPERTY OUTPUT_NAME "lex")
|
||||
|
||||
install (TARGETS timew_executable DESTINATION bin)
|
||||
|
||||
|
|
|
@ -7,15 +7,14 @@ include_directories (${CMAKE_SOURCE_DIR}
|
|||
|
||||
set (ADDITIONAL_HELP_H "additional-help.h")
|
||||
|
||||
ADD_CUSTOM_COMMAND (
|
||||
OUTPUT ${ADDITIONAL_HELP_H}
|
||||
COMMAND /bin/sh src/commands/generate-additional-help.sh > src/commands/${ADDITIONAL_HELP_H}
|
||||
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/generate-additional-help.sh
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "Generating ${ADDITIONAL_HELP_H}")
|
||||
add_custom_command (OUTPUT ${ADDITIONAL_HELP_H}
|
||||
COMMAND /bin/sh src/commands/generate-additional-help.sh > src/commands/${ADDITIONAL_HELP_H}
|
||||
DEPENDS ${CMAKE_CURRENT_LIST_DIR}/generate-additional-help.sh
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "Generating ${ADDITIONAL_HELP_H}")
|
||||
|
||||
ADD_CUSTOM_TARGET (generate_additional_help
|
||||
DEPENDS ${ADDITIONAL_HELP_H})
|
||||
add_custom_target (generate_additional_help
|
||||
DEPENDS ${ADDITIONAL_HELP_H})
|
||||
|
||||
set (commands_SRCS CmdAnnotate.cpp
|
||||
CmdCancel.cpp
|
||||
|
|
|
@ -4,9 +4,9 @@ cmake_minimum_required (VERSION 2.8.12)
|
|||
# https://gitlab.kitware.com/cmake/cmake/issues/16062
|
||||
# The issue has been fixed in CMake 3.11.0; the policy is set
|
||||
# to OLD for compatibility with older versions of CMake only.
|
||||
if(POLICY CMP0037 AND ${CMAKE_VERSION} VERSION_LESS "3.11.0")
|
||||
if (POLICY CMP0037 AND ${CMAKE_VERSION} VERSION_LESS "3.11.0")
|
||||
cmake_policy(SET CMP0037 OLD)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# If this is a debug build, check if we have libfiu installed and available on
|
||||
# the system. If so, we will be able to use it to add additional tests of the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue