Skip to content

Commit

Permalink
Add revision: v1.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GovernikusAusweisApp2 committed Dec 1, 2020
1 parent ad45f88 commit bbeb320
Show file tree
Hide file tree
Showing 2,243 changed files with 34,260 additions and 56,299 deletions.
7 changes: 7 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@ Checks: '
,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
,-cppcoreguidelines-special-member-functions,
,-cppcoreguidelines-pro-type-union-access,
,-fuchsia-*,
,-hicpp-no-array-decay, # qCDebug
,-hicpp-special-member-functions,
,-hicpp-use-override,
,-google-build-using-namespace,
,-modernize-use-default-member-init,
,-modernize-use-override,
,-modernize-use-trailing-return-type,
,-readability-convert-member-functions-to-static,
,-readability-redundant-member-init,
,-readability-implicit-bool-cast,
'

WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
CheckOptions:
- key: cppcoreguidelines-explicit-virtual-functions.AllowOverrideAndFinal
value: '1'
12 changes: 6 additions & 6 deletions CMakeGraphVizOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# cmake --build . --target architecture
########################################

SET(GRAPHVIZ_IGNORE_TARGETS AusweisAppGlobal;AusweisAppExternal;cvc;fuzz;OpenSsl;tlscheck;Test;Script;testbedtool;tsParserFU)
SET(GRAPHVIZ_EXTERNAL_LIBS OFF)
SET(GRAPHVIZ_EXECUTABLES ON)
SET(GRAPHVIZ_GENERATE_PER_TARGET OFF)
SET(GRAPHVIZ_GENERATE_DEPENDERS OFF)
SET(GRAPHVIZ_GRAPH_NAME AusweisApp2)
set(GRAPHVIZ_IGNORE_TARGETS AusweisAppGlobal;AusweisAppExternal;cvc;fuzz;OpenSsl;tlscheck;Test;Script;testbedtool;tsParserFU)
set(GRAPHVIZ_EXTERNAL_LIBS OFF)
set(GRAPHVIZ_EXECUTABLES ON)
set(GRAPHVIZ_GENERATE_PER_TARGET OFF)
set(GRAPHVIZ_GENERATE_DEPENDERS OFF)
set(GRAPHVIZ_GRAPH_NAME AusweisApp2)
319 changes: 172 additions & 147 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,162 +1,187 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.8.0)
cmake_minimum_required(VERSION 3.13.0)

IF(POLICY CMP0020)
CMAKE_POLICY(SET CMP0020 NEW)
ENDIF()
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()

IF(POLICY CMP0046)
CMAKE_POLICY(SET CMP0046 NEW)
ENDIF()
if(POLICY CMP0023)
cmake_policy(SET CMP0023 NEW)
endif()

IF(POLICY CMP0048)
CMAKE_POLICY(SET CMP0048 NEW)
ENDIF()
if(POLICY CMP0046)
cmake_policy(SET CMP0046 NEW)
endif()

IF(POLICY CMP0054)
CMAKE_POLICY(SET CMP0054 NEW)
ENDIF()
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()

IF(POLICY CMP0063)
CMAKE_POLICY(SET CMP0063 NEW)
ENDIF()
if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()

IF(POLICY CMP0071)
CMAKE_POLICY(SET CMP0071 NEW)
ENDIF()
if(POLICY CMP0063)
cmake_policy(SET CMP0063 NEW)
endif()

IF(POLICY CMP0074)
CMAKE_POLICY(SET CMP0074 NEW)
ENDIF()
if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()

if(POLICY CMP0072)
cmake_policy(SET CMP0072 NEW)
endif()

if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()

if(POLICY CMP0076)
cmake_policy(SET CMP0076 NEW)
endif()

# "tools.only" can be defined to disable the normal build and enable
# cmdline "tools" only. For example: "make format" or "make package_source"
IF(tools.only)
SET(LANGUAGES NONE)
ELSE()
SET(LANGUAGES CXX)
ENDIF()
if(tools.only)
set(LANGUAGES NONE)
else()
set(LANGUAGES CXX)
endif()

IF(APPLE AND NOT IOS)
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "Required macOS version")
ENDIF()
if(UNIX AND NOT IOS)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "Required macOS version")
endif()

PROJECT(AusweisApp2 VERSION 1.20.2 LANGUAGES ${LANGUAGES})
project(AusweisApp2 VERSION 1.22.0 LANGUAGES ${LANGUAGES})

# Set TWEAK if not defined in PROJECT_VERSION above to
# have a valid tweak version without propagating it
IF(NOT PROJECT_VERSION_TWEAK)
SET(PROJECT_VERSION_TWEAK 0)
ENDIF()

IF(APPLE AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.16" AND NOT tools.only)
ENABLE_LANGUAGE(OBJCXX)
ENDIF()

IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND (IOS OR ANDROID))
SET(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/dist" CACHE PATH "default install path" FORCE)
ENDIF()
SET(CMAKE_DIR "${PROJECT_SOURCE_DIR}/cmake")
SET(CMAKE_MODULE_PATH "${CMAKE_DIR}")
OPTION(BUILD_SHARED_LIBS "Enable build of shared libraries")
OPTION(INTEGRATED_SDK "Build platform specific SDK" OFF)

INCLUDE(Helper)

IF(NOT VENDOR)
SET(VENDOR_FILE "${PROJECT_SOURCE_DIR}/vendor.txt")
IF(EXISTS "${VENDOR_FILE}")
FILE(READ "${VENDOR_FILE}" VENDOR)
STRING(STRIP "${VENDOR}" VENDOR)
ELSEIF(LINUX OR BSD)
SET(VENDOR "") # Qt uses Organization for pathes
ELSE()
SET(VENDOR AusweisApp2_CE) # CommunityEdition
ENDIF()
ENDIF()
IF(VENDOR MATCHES "Governikus")
SET(VENDOR_GOVERNIKUS TRUE)
ENDIF()

MESSAGE(STATUS "VENDOR: ${VENDOR}")
MESSAGE(STATUS "VERSION: ${PROJECT_VERSION}")

IF(ANDROID)
GET_ANDROID_TOOLCHAIN_VARS(ANDROID_TOOLCHAIN_PREFIX ANDROID_TOOLCHAIN_MACHINE_NAME)
IF(NOT BUILD_PREVIEW)
SET(BUILD_PREVIEW false)
ENDIF()
MESSAGE(STATUS "BUILD_PREVIEW: ${BUILD_PREVIEW}")

IF(NOT ANDROID_VERSION_CODE)
SET(ANDROID_VERSION_CODE 0)
ENDIF()
MESSAGE(STATUS "ANDROID_VERSION_CODE: ${ANDROID_VERSION_CODE}")
ENDIF()

IF(IOS)
IF(NOT USE_DISTRIBUTION_PROFILE)
SET(USE_DISTRIBUTION_PROFILE false)
ENDIF()
MESSAGE(STATUS "USE_DISTRIBUTION_PROFILE: ${USE_DISTRIBUTION_PROFILE}")
ENDIF()

IF("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}" AND NOT FORCE_SOURCE_BUILD)
MESSAGE(FATAL_ERROR "in tree building is not supported!")
ENDIF()

IF(CMAKE_BUILD_TYPE)
STRING(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
ELSE()
SET(CMAKE_BUILD_TYPE "DEBUG" CACHE STRING "build type configuration" FORCE)
ENDIF()

IF(DESKTOP)
SET(CMAKE_AUTOUIC ON)
ENDIF()
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_INCLUDE_CURRENT_DIR ON)

SET(SRC_DIR ${PROJECT_SOURCE_DIR}/src)
SET(TEST_DIR ${PROJECT_SOURCE_DIR}/test)
SET(RESOURCES_DIR ${PROJECT_SOURCE_DIR}/resources)
SET(PACKAGING_DIR ${RESOURCES_DIR}/packaging)
SET(COPYRIGHT_TEXT "2014-2020 ${VENDOR}")
IF(APPLE)
STRING(REPLACE " \& " " \& " COPYRIGHT_TEXT ${COPYRIGHT_TEXT})
ENDIF()
SET(BUNDLE_IDENTIFIER com.governikus.ausweisapp2)

INCLUDE(Tools)
INCLUDE(DVCS)
ADD_SUBDIRECTORY(docs)

INCLUDE(DefaultFiles)
INCLUDE(Appcast)
INCLUDE(Messages)
IF(tools.only)
INCLUDE(Packaging)
RETURN()
ENDIF()

IF(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
INCLUDE(CTest)
CONFIGURE_FILE("${CMAKE_DIR}/CTestCustom.cmake.in" "${CMAKE_BINARY_DIR}/CTestCustom.cmake" @ONLY)
CONFIGURE_FILE("${RESOURCES_DIR}/sonar-project.properties.in" "${CMAKE_BINARY_DIR}/sonar-project.properties" @ONLY)
ENDIF()

INCLUDE(Libraries)
INCLUDE(CompilerFlags)

IF(LINUX OR BSD)
INCLUDE(GNUInstallDirs)
ENDIF()

ADD_SUBDIRECTORY(resources)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(test)

IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/utils")
ADD_SUBDIRECTORY(utils)
ENDIF()

INCLUDE(Packaging)
if(NOT PROJECT_VERSION_TWEAK)
set(PROJECT_VERSION_TWEAK 0)
endif()

if(APPLE AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.16" AND NOT tools.only)
enable_language(OBJCXX)
endif()

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND (IOS OR ANDROID))
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/dist" CACHE PATH "default install path" FORCE)
endif()
set(CMAKE_DIR "${PROJECT_SOURCE_DIR}/cmake")
set(CMAKE_MODULE_PATH "${CMAKE_DIR}")
option(BUILD_SHARED_LIBS "Enable build of shared libraries")
option(INTEGRATED_SDK "Build platform specific SDK" OFF)

include(Helper)

if(NOT VENDOR)
set(VENDOR_FILE "${PROJECT_SOURCE_DIR}/vendor.txt")
if(EXISTS "${VENDOR_FILE}")
file(READ "${VENDOR_FILE}" VENDOR)
string(STRIP "${VENDOR}" VENDOR)
elseif(LINUX OR BSD)
set(VENDOR "") # Qt uses Organization for pathes
else()
set(VENDOR AusweisApp2_CE) # CommunityEdition
endif()
endif()
if(VENDOR MATCHES "Governikus")
set(VENDOR_GOVERNIKUS TRUE)
set(LICENSE_FILE "${PROJECT_SOURCE_DIR}/LICENSE.officially.txt")
else()
set(LICENSE_FILE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
endif()

message(STATUS "VENDOR: ${VENDOR}")
message(STATUS "VERSION: ${PROJECT_VERSION}")

if(ANDROID)
if(NOT BUILD_PREVIEW)
set(BUILD_PREVIEW false)
endif()
message(STATUS "BUILD_PREVIEW: ${BUILD_PREVIEW}")

if(NOT ANDROID_VERSION_CODE)
set(ANDROID_VERSION_CODE 0)
endif()
message(STATUS "ANDROID_VERSION_CODE: ${ANDROID_VERSION_CODE}")
endif()

if(IOS)
if(NOT USE_DISTRIBUTION_PROFILE)
set(USE_DISTRIBUTION_PROFILE false)
endif()
message(STATUS "USE_DISTRIBUTION_PROFILE: ${USE_DISTRIBUTION_PROFILE}")
endif()

if("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}" AND NOT FORCE_SOURCE_BUILD)
message(FATAL_ERROR "in tree building is not supported!")
endif()

if(CMAKE_BUILD_TYPE)
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
else()
set(CMAKE_BUILD_TYPE "DEBUG" CACHE STRING "build type configuration" FORCE)
endif()

set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(SRC_DIR ${PROJECT_SOURCE_DIR}/src)
set(TEST_DIR ${PROJECT_SOURCE_DIR}/test)
set(DOCS_DIR ${PROJECT_SOURCE_DIR}/docs)
set(RESOURCES_DIR ${PROJECT_SOURCE_DIR}/resources)
set(PACKAGING_DIR ${RESOURCES_DIR}/packaging)
set(COPYRIGHT_TEXT "2014-2020 ${VENDOR}")
if(APPLE)
string(REPLACE " \& " " \& " COPYRIGHT_TEXT ${COPYRIGHT_TEXT})
endif()
set(BUNDLE_IDENTIFIER com.governikus.ausweisapp2)

include(Tools)
include(DVCS)
add_subdirectory(docs)

include(DefaultFiles)
include(Appcast)
include(Messages)
if(tools.only)
include(Packaging)
return()
endif()

if(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
set(VALGRIND_SUPPRESSIONS "${CMAKE_PREFIX_PATH}/test/valgrind.supp")
if(NOT EXISTS "${VALGRIND_SUPPRESSIONS}")
set(VALGRIND_SUPPRESSIONS "${CMAKE_SOURCE_DIR}/libs/test/valgrind.supp")
endif()
message(STATUS "Using valgrind suppressions: ${VALGRIND_SUPPRESSIONS}")
set(VALGRIND_COMMAND_OPTIONS "--tool=memcheck --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite --error-exitcode=1 --gen-suppressions=all --suppressions=${VALGRIND_SUPPRESSIONS}")

include(CTest)
configure_file("${CMAKE_DIR}/CTestCustom.cmake.in" "${CMAKE_BINARY_DIR}/CTestCustom.cmake" @ONLY)

set(SONAR_CACHE_DIR ${CMAKE_BINARY_DIR}/../sonar_cache)
if(NOT EXISTS "${SONAR_CACHE_DIR}")
set(SONAR_CACHE_DIR ${CMAKE_BINARY_DIR})
endif()
get_filename_component(SONAR_CACHE_DIR ${SONAR_CACHE_DIR} ABSOLUTE)
configure_file("${RESOURCES_DIR}/sonar-project.properties.in" "${CMAKE_BINARY_DIR}/sonar-project.properties" @ONLY)
endif()

include(Libraries)
include(CompilerFlags)

if(LINUX OR BSD)
include(GNUInstallDirs)
endif()

add_subdirectory(resources)
add_subdirectory(src)
add_subdirectory(test)

if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/utils")
add_subdirectory(utils)
endif()

include(Packaging)
12 changes: 6 additions & 6 deletions CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SET(CTEST_PROJECT_NAME "AusweisApp2")
SET(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
set(CTEST_PROJECT_NAME "AusweisApp2")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

SET(CTEST_DROP_METHOD "http")
SET(CTEST_DROP_SITE "cdash")
SET(CTEST_DROP_LOCATION "/submit.php?project=AusweisApp2")
SET(CTEST_DROP_SITE_CDASH TRUE)
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash")
set(CTEST_DROP_LOCATION "/submit.php?project=AusweisApp2")
set(CTEST_DROP_SITE_CDASH TRUE)
3 changes: 3 additions & 0 deletions Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ OPTIMIZE_OUTPUT_C = YES
QT_AUTOBRIEF = YES
BUILTIN_STL_SUPPORT = YES
GENERATE_TREEVIEW = YES
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@
EXCLUDE_PATTERNS = @PROJECT_BINARY_DIR@/* \
*/CMake* */libs/* */test/*

SEARCHENGINE = YES
COLS_IN_ALPHA_INDEX = 10
Expand Down
Loading

0 comments on commit bbeb320

Please sign in to comment.