From 8c2b66a2140fd0c0616e45a1385b1ebb8e5803ac Mon Sep 17 00:00:00 2001 From: Hunter LaTourette Date: Thu, 31 Jul 2025 01:58:57 -0400 Subject: [PATCH] refactor (*): update organization --- CMakeLists.txt | 1 + Dockerfile | 1 + Makefile | 1 + README.md | 1 + include/{templatelib_42.h => templatelib/fortytwo.h} | 7 ++++--- src/CMakeLists.txt | 5 +++-- src/{templatelib_42.cpp => fortytwo.cpp} | 3 ++- tests/CMakeLists.txt | 1 + tests/integration/CMakeLists.txt | 3 ++- tests/integration/{templatelib_42.t.cpp => fortytwo.t.cpp} | 3 ++- tests/unit/CMakeLists.txt | 3 ++- tests/unit/{templatelib_42.t.cpp => fortytwo.t.cpp} | 3 ++- 12 files changed, 22 insertions(+), 10 deletions(-) rename include/{templatelib_42.h => templatelib/fortytwo.h} (75%) rename src/{templatelib_42.cpp => fortytwo.cpp} (81%) rename tests/integration/{templatelib_42.t.cpp => fortytwo.t.cpp} (89%) rename tests/unit/{templatelib_42.t.cpp => fortytwo.t.cpp} (89%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0feddc..b61c06b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,3 +37,4 @@ set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_SYSTEM_NAME}) set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) include(CPack) + diff --git a/Dockerfile b/Dockerfile index 6c83337..d753cf7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,3 +24,4 @@ FROM ubuntu:latest AS run COPY --from=build /usr/local/src/templatelib/build/templatelib-Linux.deb /usr/local/bin WORKDIR /usr/local/bin RUN dpkg -i templatelib-Linux.deb + diff --git a/Makefile b/Makefile index a91e4a7..39dfc12 100644 --- a/Makefile +++ b/Makefile @@ -18,3 +18,4 @@ package: test: cd ${BUILD_DIR} && ctest --verbose + diff --git a/README.md b/README.md index 0100981..3760864 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,4 @@ docker build --target build -t templatelib . docker build --target test -t templatelib . docker run -it --rm templatelib ``` + diff --git a/include/templatelib_42.h b/include/templatelib/fortytwo.h similarity index 75% rename from include/templatelib_42.h rename to include/templatelib/fortytwo.h index 891b007..992330d 100644 --- a/include/templatelib_42.h +++ b/include/templatelib/fortytwo.h @@ -1,5 +1,5 @@ -#ifndef TEMPLATELIB_42_H -#define TEMPLATELIB_42_H +#ifndef TEMPLATELIB_FORTYTWO_H +#define TEMPLATELIB_FORTYTWO_H #include @@ -13,4 +13,5 @@ namespace templatelib { int meaningOfLifeTheUniverseAndEverything(const std::string& question); } // close namespace templatelib -#endif /* TEMPLATELIB_UTIL_H */ +#endif /* TEMPLATELIB_FORTYTWO_H */ + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7a1f24c..452665b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,14 +10,14 @@ target_link_libraries(${LIBRARY_NAME} target_sources(${LIBRARY_NAME} PRIVATE - templatelib_42.cpp + fortytwo.cpp INTERFACE PUBLIC FILE_SET HEADERS BASE_DIRS ${INC_DIR} FILES - ${INC_DIR}/templatelib_42.h + ${INC_DIR}/${LIBRARY_NAME}/fortytwo.h ) target_include_directories(${LIBRARY_NAME} @@ -26,3 +26,4 @@ target_include_directories(${LIBRARY_NAME} PRIVATE . ) + diff --git a/src/templatelib_42.cpp b/src/fortytwo.cpp similarity index 81% rename from src/templatelib_42.cpp rename to src/fortytwo.cpp index 8146e40..ca35153 100644 --- a/src/templatelib_42.cpp +++ b/src/fortytwo.cpp @@ -1,4 +1,4 @@ -#include +#include "templatelib/fortytwo.h" namespace templatelib { @@ -7,3 +7,4 @@ int meaningOfLifeTheUniverseAndEverything(const std::string& question) { } } // close namespace templatelib + diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 27809ac..03b5399 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,3 +2,4 @@ add_subdirectory(integration) add_subdirectory(unit) add_test(NAME unittest COMMAND templatelib.u.t) + diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index dce9282..2c80c62 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -10,5 +10,6 @@ target_link_libraries(templatelib.i.t target_sources(templatelib.i.t PRIVATE - templatelib_42.t.cpp + fortytwo.t.cpp ) + diff --git a/tests/integration/templatelib_42.t.cpp b/tests/integration/fortytwo.t.cpp similarity index 89% rename from tests/integration/templatelib_42.t.cpp rename to tests/integration/fortytwo.t.cpp index 6bf05b3..26454e2 100644 --- a/tests/integration/templatelib_42.t.cpp +++ b/tests/integration/fortytwo.t.cpp @@ -1,6 +1,6 @@ #include -#include +#include "templatelib/fortytwo.h" namespace templatelib { @@ -9,3 +9,4 @@ TEST_CASE( "The answer to life, the universe, and everything", "[templatelib_42] } } // close namespace templatelib + diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 196dce0..cac23d8 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -10,5 +10,6 @@ target_link_libraries(templatelib.u.t target_sources(templatelib.u.t PRIVATE - templatelib_42.t.cpp + fortytwo.t.cpp ) + diff --git a/tests/unit/templatelib_42.t.cpp b/tests/unit/fortytwo.t.cpp similarity index 89% rename from tests/unit/templatelib_42.t.cpp rename to tests/unit/fortytwo.t.cpp index 6bf05b3..26454e2 100644 --- a/tests/unit/templatelib_42.t.cpp +++ b/tests/unit/fortytwo.t.cpp @@ -1,6 +1,6 @@ #include -#include +#include "templatelib/fortytwo.h" namespace templatelib { @@ -9,3 +9,4 @@ TEST_CASE( "The answer to life, the universe, and everything", "[templatelib_42] } } // close namespace templatelib +