Sun, 03 Sep 2023 09:10:16 +0200
make C++ compiler and pandoc entirely optional
CMakeLists.txt | file | annotate | diff | comparison | revisions | |
docs/src/CMakeLists.txt | file | annotate | diff | comparison | revisions |
--- a/CMakeLists.txt Sun Jul 09 12:43:13 2023 +0200 +++ b/CMakeLists.txt Sun Sep 03 09:10:16 2023 +0200 @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(ucx VERSION 3.0 DESCRIPTION "UAP Common Extensions") +project(ucx VERSION 3.0 DESCRIPTION "UAP Common Extensions" LANGUAGES C) # Configuration cmake_policy(SET CMP0077 NEW) @@ -15,8 +15,15 @@ add_subdirectory(src) # Tests -enable_testing() -add_subdirectory(tests) +include(CheckLanguage) +check_language(CXX) +if (CMAKE_CXX_COMPILER) + enable_language(CXX) + enable_testing() + add_subdirectory(tests) +else () + message(STATUS "No C++ compiler found - tests are not compiled.") +endif () # Web Documentation add_subdirectory(docs/src)
--- a/docs/src/CMakeLists.txt Sun Jul 09 12:43:13 2023 +0200 +++ b/docs/src/CMakeLists.txt Sun Sep 03 09:10:16 2023 +0200 @@ -34,7 +34,7 @@ if (NOT EXISTS ${PANDOC_EXECUTABLE}) find_program(PANDOC_EXECUTABLE pandoc) if(NOT EXISTS ${PANDOC_EXECUTABLE}) - message(WARNING "Pandoc not found, docs-html target will not be generated.") + message(STATUS "Pandoc not found, docs-html target will not be generated.") return() endif() endif()