CMakeLists.txt

changeset 752
aaad6674a1a3
parent 701
72a440c437e9
     1.1 --- a/CMakeLists.txt	Sun Jul 09 12:43:13 2023 +0200
     1.2 +++ b/CMakeLists.txt	Sun Sep 03 09:10:16 2023 +0200
     1.3 @@ -1,5 +1,5 @@
     1.4  cmake_minimum_required(VERSION 3.14)
     1.5 -project(ucx VERSION 3.0 DESCRIPTION "UAP Common Extensions")
     1.6 +project(ucx VERSION 3.0 DESCRIPTION "UAP Common Extensions" LANGUAGES C)
     1.7  
     1.8  # Configuration
     1.9  cmake_policy(SET CMP0077 NEW)
    1.10 @@ -15,8 +15,15 @@
    1.11  add_subdirectory(src)
    1.12  
    1.13  # Tests
    1.14 -enable_testing()
    1.15 -add_subdirectory(tests)
    1.16 +include(CheckLanguage)
    1.17 +check_language(CXX)
    1.18 +if (CMAKE_CXX_COMPILER)
    1.19 +    enable_language(CXX)
    1.20 +    enable_testing()
    1.21 +    add_subdirectory(tests)
    1.22 +else ()
    1.23 +    message(STATUS "No C++ compiler found - tests are not compiled.")
    1.24 +endif ()
    1.25  
    1.26  # Web Documentation
    1.27  add_subdirectory(docs/src)

mercurial