Skip to content

Commit

Permalink
Cleanup template and initialize repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Template Janitor committed Nov 17, 2023
1 parent e4e7597 commit 073d603
Show file tree
Hide file tree
Showing 35 changed files with 168 additions and 510 deletions.
4 changes: 0 additions & 4 deletions .github/FUNDING.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/constants.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PROJECT_NAME=myproject
PROJECT_NAME=infiz
16 changes: 0 additions & 16 deletions .github/template/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/template/removal-list

This file was deleted.

1 change: 0 additions & 1 deletion .github/template/template_name

This file was deleted.

1 change: 0 additions & 1 deletion .github/template/template_repository

This file was deleted.

247 changes: 0 additions & 247 deletions .github/workflows/template-janitor.yml

This file was deleted.

32 changes: 16 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ set(CMAKE_CXX_EXTENSIONS OFF)

# Set the project name and language
project(
myproject
infiz
VERSION 0.0.1
DESCRIPTION ""
HOMEPAGE_URL "%%myurl%%"
HOMEPAGE_URL "https://github.com/cpp-best-practices/infiz"
LANGUAGES CXX C)

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


myproject_setup_options()
infiz_setup_options()

myproject_global_options()
infiz_global_options()
include(Dependencies.cmake)
myproject_setup_dependencies()
infiz_setup_dependencies()

myproject_local_options()
infiz_local_options()

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

target_compile_features(myproject_options INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
target_compile_features(infiz_options INTERFACE cxx_std_${CMAKE_CXX_STANDARD})

add_library(myproject::myproject_options ALIAS myproject_options)
add_library(myproject::myproject_warnings ALIAS myproject_warnings)
add_library(infiz::infiz_options ALIAS infiz_options)
add_library(infiz::infiz_warnings ALIAS infiz_warnings)

#add_library(myproject::myproject_options INTERFACE IMPORTED)
#add_library(myproject::myproject_warnings INTERFACE IMPORTED)
#add_library(infiz::infiz_options INTERFACE IMPORTED)
#add_library(infiz::infiz_warnings INTERFACE IMPORTED)

# configure files based on CMake configuration options
add_subdirectory(configured_files)
Expand All @@ -74,9 +74,9 @@ if(BUILD_TESTING)
endif()


if(myproject_BUILD_FUZZ_TESTS)
if(infiz_BUILD_FUZZ_TESTS)
message(AUTHOR_WARNING "Building Fuzz Tests, using fuzzing sanitizer https://www.llvm.org/docs/LibFuzzer.html")
if (NOT myproject_ENABLE_ADDRESS_SANITIZER AND NOT myproject_ENABLE_THREAD_SANITIZER)
if (NOT infiz_ENABLE_ADDRESS_SANITIZER AND NOT infiz_ENABLE_THREAD_SANITIZER)
message(WARNING "You need asan or tsan enabled for meaningful fuzz testing")
endif()
add_subdirectory(fuzz_test)
Expand All @@ -102,11 +102,11 @@ include(cmake/PackageProject.cmake)

# Add other targets that you want installed here, by default we just package the one executable
# we know we want to ship
myproject_package_project(
infiz_package_project(
TARGETS
intro
myproject_options
myproject_warnings
infiz_options
infiz_warnings
# FIXME: this does not work! CK
# PRIVATE_DEPENDENCIES_CONFIGURED project_options project_warnings
)
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(myproject_setup_dependencies)
function(infiz_setup_dependencies)

# For each dependency, see if it's
# already been provided to us by a parent project
Expand Down
24 changes: 0 additions & 24 deletions LICENSE

This file was deleted.

Loading

0 comments on commit 073d603

Please sign in to comment.