Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
flagarde committed May 8, 2024
1 parent bd2dd53 commit 33fdb03
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)

set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

option(BUILD_DOCS "Build the docs" ON)
option(BUILD_TESTS "Build the tests" ON)
option(KHAOS_BUILD_DOCS "Build the docs" ON)
option(KHAOS_BUILD_TESTS "Build the tests" ON)

if(BUILD_DOCS OR BUILD_TESTS)
include(GetCMakeMM)
cmmm(VERSION 2.3 REPOSITORY flagarde/CMakeMM)

cmmm_modules_list(REPOSITORY flagarde/CMakeCM)
if(KHAOS_BUILD_DOCS OR KHAOS_BUILD_TESTS)
include(FetchContent)
FetchContent_Declare(CMMM GIT_REPOSITORY "https://github.com/cmake-tools/cmmm.git" GIT_TAG "v1.0")
FetchContent_MakeAvailable(CMMM)
cmmm()
cmmm_modules_list(URL "https://raw.githubusercontent.com/flagarde/CMakeCM/main/ModulesList.cmake")
endif()

project(Khaos VERSION 0.0.1.0 DESCRIPTION "A C/C++ library to simplify cross-platform programming" HOMEPAGE_URL "https://github.com/flagarde/Khaos" LANGUAGES C CXX)

add_subdirectory(src)

if(BUILD_DOCS)
if(KHAOS_BUILD_DOCS)
add_subdirectory(docs)
endif()

if(BUILD_TESTS)
if(KHAOS_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()

0 comments on commit 33fdb03

Please sign in to comment.