Commit 7b360676 authored by Thomas Braun's avatar Thomas Braun
Browse files

Merge branch 'update-minimum-cmake-version' into 'main'

CMakeLists.txt: Raise minimum required cmake version

Closes #6

See merge request !16
parents ba9d8f5d a7d4a587
Loading
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -166,3 +166,39 @@ build-stock:
    - apt-get install -y libtango-dev
    - cmake -B build TangoAccessControl
    - make -C build install

build-main-newest-supported-cmake:
  <<: *build-template
  needs: ["build-cppTango-main"]
  script:
    # Extract tango
    - tar xf usr-local.tar -C /
    # Install custom cmake
    - apt-get install curl
    - apt-get remove -y cmake
    - curl -L https://cmake.org/files/v3.26/cmake-3.26.4-linux-x86_64.sh -o /tmp/cmake-install.sh
    - chmod +x /tmp/cmake-install.sh
    - cd /usr/local
    - /tmp/cmake-install.sh --skip-license --exclude-subdir
    # Build DS
    - cd ${CI_PROJECT_DIR}
    - cmake -Werror=dev -B build TangoAccessControl
    - make -C build install

build-main-oldest-supported-cmake:
  <<: *build-template
  needs: ["build-cppTango-main"]
  script:
    # Extract tango
    - tar xf usr-local.tar -C /
    # Install custom cmake
    - apt-get install curl
    - apt-get remove -y cmake
    - curl -L https://cmake.org/files/v3.18/cmake-3.18.6-Linux-x86_64.sh -o /tmp/cmake-install.sh
    - chmod +x /tmp/cmake-install.sh
    - cd /usr/local
    - /tmp/cmake-install.sh --skip-license --exclude-subdir
    # Build DS
    - cd ${CI_PROJECT_DIR}
    - cmake -Werror=dev -B build TangoAccessControl
    - make -C build install
+2 −13
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.7...3.22 FATAL_ERROR)
cmake_minimum_required(VERSION 3.18...3.26 FATAL_ERROR)
project(TangoAccessControl VERSION 2.19 LANGUAGES CXX)

# Ensure we have access to MSVC_RUNTIME_LIBRARY property for Windows builds
if (WIN32 AND NOT CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
    message(FATAL_ERROR "cmake ${CMAKE_VERSION} is not supported for Windows builds")
endif()

if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
elseif(CMAKE_CONFIGURATION_TYPES)
    set(IS_MULTI_CONFIG YES)
else()
    set(IS_MULTI_CONFIG NO)
endif()

if(NOT CMAKE_BUILD_TYPE AND NOT IS_MULTI_CONFIG)
    message(STATUS "No build type specified - default is DEBUG")