Skip to content

Commit

Permalink
docs: add TODO comments in files
Browse files Browse the repository at this point in the history
Signed-off-by: Alfi Maulana <alfi.maulana.f@gmail.com>
  • Loading branch information
threeal committed Oct 2, 2024
1 parent aee035d commit d8f8428
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- name: Upload Project
uses: actions/upload-artifact@v4.4.0
with:
# TODO: Replace `MyProject` with the correct project name.
name: MyProject
path: install
if-no-files-found: error
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- name: Configure Project
uses: threeal/cmake-action@v2.0.0
with:
# TODO: Replace `MY_PROJECT_ENABLE_TESTS` with the correct test option.
options: MY_PROJECT_ENABLE_TESTS=ON
run-build: false

Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
cmake_minimum_required(VERSION 3.21)

# TODO: Replace the project name, version, description, and homepage URL.
project(
MyProject
VERSION 0.0.0
DESCRIPTION "A starter CMake package for creating directories recursively"
HOMEPAGE_URL https://github.com/threeal/cmake-starter
LANGUAGES NONE)

# TODO: Rename these options to be prefixed with the correct project name.
option(MY_PROJECT_ENABLE_TESTS "Enable test targets.")
option(MY_PROJECT_ENABLE_INSTALL "Enable install targets." "${PROJECT_IS_TOP_LEVEL}")

Expand All @@ -18,20 +20,26 @@ if(NOT DEFINED CMAKE_FIND_PACKAGE_PREFER_CONFIG)
endif()

# Include the main module.
# TODO: Replace `MyProject.cmake` with the correct main module file.
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/MyProject.cmake)

# TODO: Replace `MY_PROJECT_ENABLE_TESTS` with the correct option.
if(MY_PROJECT_ENABLE_TESTS)
enable_testing()

find_package(Assertion 1.0.0 REQUIRED)
assertion_add_test(test/git_clone.cmake)
endif()

# TODO: Replace `MY_PROJECT_ENABLE_INSTALL` with the correct option.
if(MY_PROJECT_ENABLE_INSTALL)
# TODO: Rename the output file to be prefixed with the correct project name.
include(CMakePackageConfigHelpers)
write_basic_package_version_file(cmake/MyProjectConfigVersion.cmake
COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT)

# TODO: Replace the `FILES` arguments with the correct files.
# TODO: Rename the `DESTINATION` argument to match the correct project name.
include(GNUInstallDirs)
install(
FILES cmake/MyProject.cmake
Expand Down
2 changes: 2 additions & 0 deletions cmake/MyProject.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# TODO: Rename this module to match the correct project name.

# Clone a Git repository to a specified directory.
#
# git_clone(<url> <dir>)
Expand Down
3 changes: 3 additions & 0 deletions cmake/MyProjectConfig.cmake
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# TODO: Rename this module to match the correct project name.

# TODO: Replace `MyProject.cmake` with the correct main module file.
include(${CMAKE_CURRENT_LIST_DIR}/MyProject.cmake)
1 change: 1 addition & 0 deletions test/git_clone.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TODO: Replace `MyProject.cmake` with the correct main module file.
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/MyProject.cmake)

section("it should clone a Git repository")
Expand Down

0 comments on commit d8f8428

Please sign in to comment.