Initial commit
This commit is contained in:
commit
91d54c58d5
42 changed files with 2212 additions and 0 deletions
94
CMakeLists.txt
Normal file
94
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
cmake_minimum_required(VERSION 3.28)
|
||||
project(bedrock VERSION 0.1 LANGUAGES CXX)
|
||||
|
||||
find_program(
|
||||
CLANG_TIDY_COMMAND
|
||||
NAMES
|
||||
clang-tidy
|
||||
HINTS
|
||||
/opt/homebrew/opt/llvm/bin/
|
||||
NO_CACHE
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
add_compile_options(
|
||||
-Weverything
|
||||
-Werror
|
||||
-Wno-c++98-compat
|
||||
-Wno-c++98-compat-pedantic
|
||||
-Wno-poison-system-directories
|
||||
-Wno-explicit-specialization-storage-class
|
||||
-Wno-unsafe-buffer-usage
|
||||
-Wno-padded
|
||||
-Wno-global-constructors
|
||||
-Wno-exit-time-destructors
|
||||
-fno-exceptions
|
||||
-fcheck-new
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE BEDROCK_NUMBERS "src/numbers.cppm")
|
||||
file(GLOB_RECURSE BEDROCK_FOUNDATION "src/foundation/*.cppm" "src/foundation.cppm")
|
||||
file(GLOB_RECURSE BEDROCK_SEMANTICS "src/semantics/*.cppm" "src/semantics.cppm")
|
||||
file(GLOB_RECURSE BEDROCK_COLLECTIONS "src/collections/*.cppm" "src/collections.cppm")
|
||||
file(GLOB_RECURSE BEDROCK_IO "src/io/*.cppm" "src/io.cppm")
|
||||
file(GLOB_RECURSE BEDROCK_CLI "src/cli/*.cppm" "src/cli.cppm")
|
||||
file(GLOB_RECURSE BEDROCK_TEST "src/test/*.cppm" "src/test.cppm")
|
||||
add_library(bedrock)
|
||||
target_sources(bedrock
|
||||
PUBLIC
|
||||
FILE_SET CXX_MODULES FILES
|
||||
${BEDROCK_NUMBERS}
|
||||
${BEDROCK_SEMANTICS}
|
||||
${BEDROCK_FOUNDATION}
|
||||
${BEDROCK_COLLECTIONS}
|
||||
${BEDROCK_IO}
|
||||
${BEDROCK_CLI}
|
||||
${BEDROCK_TEST}
|
||||
src/bedrock.cppm
|
||||
)
|
||||
set_target_properties(bedrock PROPERTIES
|
||||
VERSION ${PROJECT_VERSION}
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR}
|
||||
CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}"
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE BEDROCK_TEST_SRCS "src/*.test.cpp")
|
||||
add_executable(bedrock-tests ${BEDROCK_TEST_SRCS})
|
||||
target_link_libraries(bedrock-tests PUBLIC bedrock)
|
||||
|
||||
#include(FetchContent)
|
||||
#
|
||||
#fetchcontent_declare(
|
||||
# Catch2
|
||||
# GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
# GIT_TAG v3.4.0
|
||||
# SYSTEM
|
||||
#)
|
||||
#fetchcontent_makeavailable(Catch2)
|
||||
#list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
|
||||
#
|
||||
#include(CTest)
|
||||
#include(Catch)
|
||||
#
|
||||
#file(GLOB_RECURSE BEDROCK_TESTS "src/*.test.cpp")
|
||||
#add_executable(bedrock-tests
|
||||
# ${BEDROCK_TESTS}
|
||||
#)
|
||||
#target_compile_options(bedrock-tests PUBLIC
|
||||
# -Weverything
|
||||
# -Werror
|
||||
# -Wno-c++98-compat
|
||||
# -Wno-c++98-compat-pedantic
|
||||
# -Wno-poison-system-directories
|
||||
# -Wno-unused-member-function
|
||||
# -Wno-explicit-specialization-storage-class
|
||||
#)
|
||||
#target_link_libraries(bedrock-tests
|
||||
# PUBLIC bedrock
|
||||
# PRIVATE Catch2::Catch2WithMain
|
||||
#)
|
||||
#catch_discover_tests(bedrock-tests)
|
||||
Loading…
Add table
Add a link
Reference in a new issue