Merge pull request #398 from rgetz/dev

add make target of 'dev_docs' which uses Doxygen to build html pages
pull/422/head
f4exb 2019-08-03 01:04:17 +02:00 zatwierdzone przez GitHub
commit 233a84c2b3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 1932 dodań i 0 usunięć

Wyświetl plik

@ -448,6 +448,45 @@ include_directories(
${OPENGL_INCLUDE_DIR}
)
# Set up optional make target for developer doc
find_package(Doxygen)
if(DOXYGEN_FOUND)
option(WITH_DOC "Generate developer doc with Doxygen" ON)
message(STATUS "added optional 'make dev_docs' for developer documentation generation")
# It is not an error when 'dot' is not found, just switching off the Doxygen's HAVE_DOT option
find_package_handle_standard_args (Dot REQUIRED_VARS DOXYGEN_DOT_EXECUTABLE)
# This sets HAVE_CASE_SENSITIVE_FILESYSTEM which is 0 or 1, we need "YES" or "NO"
include(cmake/Modules/CheckCaseSensitiveFileSystem.cmake)
if (HAVE_CASE_SENSITIVE_FILESYSTEM)
set(CMAKE_CASE_SENSITIVE_FILESYSTEM "YES")
else()
set(CMAKE_CASE_SENSITIVE_FILESYSTEM "NO")
endif()
if(WIN32 OR APPLE)
set(CMAKE_SHORT_NAMES "YES")
else()
set(CMAKE_SHORT_NAMES "NO")
endif()
set(DOX_HTML_OUT ${CMAKE_CURRENT_BINARY_DIR}/dev_docs)
if (WITH_DOC)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/include/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(dev_docs)
add_custom_command(TARGET dev_docs POST_BUILD
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating developer documentation with Doxygen" VERBATIM
)
endif()
else()
message(STATUS "Doxygen not found, developer documentation can not be generated")
endif()
############ build sdrangel benchmark ################
if(NOT WIN32)
set(sdrangelbench_SOURCES

Wyświetl plik

@ -0,0 +1,38 @@
#
# Check if the file system is case sensitive or not
# Inspired by Andreas Lauser's cmake at:
# https://github.com/OPM/opm-parser/blob/master/cmake/Modules/CheckCaseSensitiveFileSystem.cmake
# Included in sdrangle (LGPL3) - with permission.
#
# Sets the following variable:
# HAVE_CASE_SENSITIVE_FILESYSTEM True if the file system honors the case of files
#
# I dislike that we have to emit a file from CMake, but I can't think of a better way.
message(STATUS "Check for case-sensitive file systems")
string(RANDOM LENGTH 6 ALPHABET abcdefghijklmnopqrstuvwxyz TMP_FILE_L)
set(TMP_FILE_L "${TMP_FILE_L}.tmp")
string(TOUPPER ${TMP_FILE_L} TMP_FILE_U)
string(TIMESTAMP TMP_TIME)
set(TMP_FILE_CONTENTS "${TMP_FILE_L} ${TMP_TIME}")
# create a uppercase file
file(WRITE "${CMAKE_BINARY_DIR}/${TMP_FILE_U}" "${TMP_FILE_CONTENTS}")
# test if lowercase file can be opened
set(FileContents "")
if (EXISTS "${CMAKE_BINARY_DIR}/${TMP_FILE_L}")
file(READ "${CMAKE_BINARY_DIR}/${TMP_FILE_L}" FileContents)
endif()
# remove the file
file(REMOVE "${CMAKE_BINARY_DIR}/${TMP_FILE_U}")
# check the contents
# If it is empty, the file system is case sensitive.
if ("${FileContents}" STREQUAL "${TMP_FILE_CONTENTS}")
message(STATUS "File system is not case-sensitive")
set(HAVE_CASE_SENSITIVE_FILESYSTEM 0)
else()
message(STATUS "File system is case-sensitive")
set(HAVE_CASE_SENSITIVE_FILESYSTEM 1)
endif()

Plik diff jest za duży Load Diff