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 Jan 2, 2024
1 parent e3b19c3 commit 3adb19d
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=cmake_experiment
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
cmake_experiment
VERSION 0.0.1
DESCRIPTION ""
HOMEPAGE_URL "%%myurl%%"
HOMEPAGE_URL "https://github.com/pkp124/cmake_experiment"
LANGUAGES CXX C)

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


myproject_setup_options()
cmake_experiment_setup_options()

myproject_global_options()
cmake_experiment_global_options()
include(Dependencies.cmake)
myproject_setup_dependencies()
cmake_experiment_setup_dependencies()

myproject_local_options()
cmake_experiment_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(cmake_experiment_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(cmake_experiment::cmake_experiment_options ALIAS cmake_experiment_options)
add_library(cmake_experiment::cmake_experiment_warnings ALIAS cmake_experiment_warnings)

#add_library(myproject::myproject_options INTERFACE IMPORTED)
#add_library(myproject::myproject_warnings INTERFACE IMPORTED)
#add_library(cmake_experiment::cmake_experiment_options INTERFACE IMPORTED)
#add_library(cmake_experiment::cmake_experiment_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(cmake_experiment_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 cmake_experiment_ENABLE_ADDRESS_SANITIZER AND NOT cmake_experiment_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(
cmake_experiment_package_project(
TARGETS
intro
myproject_options
myproject_warnings
cmake_experiment_options
cmake_experiment_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(cmake_experiment_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 3adb19d

Please sign in to comment.