# SPDX-License-Identifier: MIT # Copyright (c) 2023 John Watts and the LuminaSensum contributors cmake_minimum_required(VERSION 3.25) # Useful options for compiling set(compile_opts -Wall -Wextra -Wpedantic -Werror -fwrapv -fno-strict-aliasing -fsigned-char) # Create TardisLang library project(TardisLang) file(GLOB SRC_FILES "${PROJECT_SOURCE_DIR}/*.c") add_library(TardisLang ${SRC_FILES}) set_property(TARGET TardisLang PROPERTY C_STANDARD 11) target_compile_options(TardisLang PRIVATE ${compile_opts}) # Create test app program option(BUILD_TARDISLANG_APP "Build the TardisLang test app" ON) if(BUILD_TARDISLANG_APP) project(TardisLangApp) file(GLOB SRC_FILES "${PROJECT_SOURCE_DIR}/app/*.c") add_executable(TardisLangApp ${SRC_FILES}) set_property(TARGET TardisLangApp PROPERTY C_STANDARD 11) target_compile_options(TardisLangApp PRIVATE ${compile_opts}) target_link_libraries(TardisLangApp PRIVATE TardisLang) endif()