Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ CheckOptions:
value: >
boost/test/.*;
__chrono/.*
HeaderFilterRegex: '^.*/include/chains/.*$'
HeaderFilterRegex: '^.*/include/chain/.*$'
2 changes: 1 addition & 1 deletion .github/constants.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PROJECT_NAME=chains
PROJECT_NAME=chain
2 changes: 1 addition & 1 deletion .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-Dchains_ENABLE_SANITIZER_ADDRESS:BOOL=OFF
-Dchain_ENABLE_SANITIZER_ADDRESS:BOOL=OFF
-S ${{ github.workspace }}

- name: Build
Expand Down
42 changes: 21 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ set(CMAKE_CXX_EXTENSIONS OFF)

# Set the project name and language
project(
chains
chain
VERSION 0.0.1
DESCRIPTION ""
HOMEPAGE_URL "https://github.com/stlab/chains"
HOMEPAGE_URL "https://github.com/stlab/chain"
LANGUAGES CXX C)

include(cmake/PreventInSourceBuilds.cmake)
include(ProjectOptions.cmake)


chains_setup_options()
chain_setup_options()

chains_global_options()
chain_global_options()
include(Dependencies.cmake)
chains_setup_dependencies()
chain_setup_dependencies()

chains_local_options()
chain_local_options()

# don't know if this should be set globally from here or not...
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
Expand All @@ -49,19 +49,19 @@ string(
8
GIT_SHORT_SHA)

target_compile_features(chains_options INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
target_compile_features(chain_options INTERFACE cxx_std_${CMAKE_CXX_STANDARD})

add_library(chains::chains_options ALIAS chains_options)
add_library(chains::chains_warnings ALIAS chains_warnings)
add_library(chain::chain_options ALIAS chain_options)
add_library(chain::chain_warnings ALIAS chain_warnings)

#add_library(chains::chains_options INTERFACE IMPORTED)
#add_library(chains::chains_warnings INTERFACE IMPORTED)
#add_library(chain::chain_options INTERFACE IMPORTED)
#add_library(chain::chain_warnings INTERFACE IMPORTED)


add_library(chains INTERFACE)
add_library(chains::chains ALIAS chains)
add_library(chain INTERFACE)
add_library(chain::chain ALIAS chain)

target_include_directories(chains INTERFACE
target_include_directories(chain INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/include
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>/include
$<INSTALL_INTERFACE:include>)
Expand All @@ -77,11 +77,11 @@ add_subdirectory(configured_files)
# disable the `min` and `max` macros defined in the windows.h header
#
if (WIN32)
target_compile_definitions(chains INTERFACE NOMINMAX)
target_compile_definitions(chain INTERFACE NOMINMAX)
endif()


add_subdirectory(include/chains)
add_subdirectory(include/chain)
# Adding the src:
add_subdirectory(src)

Expand All @@ -99,9 +99,9 @@ if(BUILD_TESTING)
endif()


# if(chains_BUILD_FUZZ_TESTS)
# if(chain_BUILD_FUZZ_TESTS)
# message(AUTHOR_WARNING "Building Fuzz Tests, using fuzzing sanitizer https://www.llvm.org/docs/LibFuzzer.html")
# if (NOT chains_ENABLE_ADDRESS_SANITIZER AND NOT chains_ENABLE_THREAD_SANITIZER)
# if (NOT chain_ENABLE_ADDRESS_SANITIZER AND NOT chain_ENABLE_THREAD_SANITIZER)
# message(WARNING "You need asan or tsan enabled for meaningful fuzz testing")
# endif()
# add_subdirectory(fuzz_test)
Expand All @@ -127,11 +127,11 @@ endif()

# Add other targets that you want installed here, by default we just package the one executable
# we know we want to ship
# chains_package_project(
# chain_package_project(
# TARGETS
# intro
# chains_options
# chains_warnings
# chain_options
# chain_warnings
# # FIXME: this does not work! CK
# # PRIVATE_DEPENDENCIES_CONFIGURED project_options project_warnings
# )
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
{
"name": "conf-unixlike-common",
"description": "Unix-like OS settings for gcc and clang toolchains",
"description": "Unix-like OS settings for gcc and clang toolchain",
"hidden": true,
"inherits": "conf-common",
"condition": {
Expand Down
2 changes: 1 addition & 1 deletion Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include(cmake/CPM.cmake)
# Done as a function so that updates to variables like
# CMAKE_CXX_FLAGS don't propagate out to other
# targets
function(chains_setup_dependencies)
function(chain_setup_dependencies)

# For each dependency, see if it's
# already been provided to us by a parent project
Expand Down
Loading
Loading