diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fa54d5..c02f116 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,3 +43,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 74b244d..392df68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,3 +25,4 @@ COPY --from=build /usr/local/src/templateapp/build/templateapp-Linux.deb /usr/lo WORKDIR /usr/local/bin RUN dpkg -i templateapp-Linux.deb ENTRYPOINT [ "/usr/bin/templateapp.sh" ] + 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 303bfc2..6d758b0 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,4 @@ docker run -it --rm templateapp docker build --target=run -t templateapp . docker run -it --rm templateapp ``` + diff --git a/scripts/templateapp.sh b/scripts/templateapp.sh index 6c0dfe5..b77fa0f 100644 --- a/scripts/templateapp.sh +++ b/scripts/templateapp.sh @@ -1,3 +1,4 @@ #!/bin/sh /usr/bin/templateapp + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0deb060..97222eb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,12 +1,12 @@ set(EXECUTABLE_NAME templateapp) -add_subdirectory(templateapp_util) +add_subdirectory(util) add_executable(${EXECUTABLE_NAME}) target_link_libraries(${EXECUTABLE_NAME} PRIVATE - templateapplib + util ) target_sources(${EXECUTABLE_NAME} @@ -18,3 +18,4 @@ target_include_directories(${EXECUTABLE_NAME} PRIVATE . ) + diff --git a/src/templateapp.m.cpp b/src/templateapp.m.cpp index 56eae4c..b2268ed 100644 --- a/src/templateapp.m.cpp +++ b/src/templateapp.m.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include "util.h" using namespace templateapp; @@ -13,3 +13,4 @@ int main() std::cout << meaningOfLifeTheUniverseAndEverything(question) << std::endl; return 0; } + diff --git a/src/templateapp_util/CMakeLists.txt b/src/util/CMakeLists.txt similarity index 76% rename from src/templateapp_util/CMakeLists.txt rename to src/util/CMakeLists.txt index fdfd44c..eeaf142 100644 --- a/src/templateapp_util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LIBRARY_NAME templateapplib) +set(LIBRARY_NAME util) add_library(${LIBRARY_NAME} STATIC) @@ -10,12 +10,12 @@ target_link_libraries(${LIBRARY_NAME} target_sources(${LIBRARY_NAME} PRIVATE - templateapp_util.cpp + util.cpp INTERFACE PUBLIC FILE_SET HEADERS FILES - templateapp_util.h + util.h ) target_include_directories(${LIBRARY_NAME} @@ -24,3 +24,4 @@ target_include_directories(${LIBRARY_NAME} PRIVATE . ) + diff --git a/src/templateapp_util/templateapp_util.cpp b/src/util/util.cpp similarity index 83% rename from src/templateapp_util/templateapp_util.cpp rename to src/util/util.cpp index 8e6e1d9..76910fa 100644 --- a/src/templateapp_util/templateapp_util.cpp +++ b/src/util/util.cpp @@ -1,4 +1,4 @@ -#include +#include "util.h" namespace templateapp { @@ -7,3 +7,4 @@ int meaningOfLifeTheUniverseAndEverything(const std::string& question) { } } // close namespace templateapp + diff --git a/src/templateapp_util/templateapp_util.h b/src/util/util.h similarity index 99% rename from src/templateapp_util/templateapp_util.h rename to src/util/util.h index 7d0725f..62410be 100644 --- a/src/templateapp_util/templateapp_util.h +++ b/src/util/util.h @@ -14,3 +14,4 @@ namespace templateapp { } // close namespace templateapp #endif /* TEMPLATEAPP_UTIL_H */ + diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ebcd6b5..98ecc10 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,3 +2,4 @@ add_subdirectory(integration) add_subdirectory(unit) add_test(NAME unittest COMMAND templateapp.u.t) + diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index 686f199..43e5cc8 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -5,10 +5,11 @@ add_executable(templateapp.i.t) target_link_libraries(templateapp.i.t PRIVATE Catch2::Catch2WithMain - templateapplib + util ) target_sources(templateapp.i.t PRIVATE - templateapp_util.t.cpp + util.t.cpp ) + diff --git a/tests/integration/templateapp_util.t.cpp b/tests/integration/util.t.cpp similarity index 90% rename from tests/integration/templateapp_util.t.cpp rename to tests/integration/util.t.cpp index cb75f3d..ccd982d 100644 --- a/tests/integration/templateapp_util.t.cpp +++ b/tests/integration/util.t.cpp @@ -1,6 +1,6 @@ #include -#include +#include "util.h" namespace templateapp { @@ -9,3 +9,4 @@ TEST_CASE( "The answer to life, the universe, and everything", "[templateapp_uti } } // close namespace templateapp + diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 9dfe373..9bea74f 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -5,10 +5,11 @@ add_executable(templateapp.u.t) target_link_libraries(templateapp.u.t PRIVATE Catch2::Catch2WithMain - templateapplib + util ) target_sources(templateapp.u.t PRIVATE - templateapp_util.t.cpp + util.t.cpp ) + diff --git a/tests/unit/templateapp_util.t.cpp b/tests/unit/util.t.cpp similarity index 90% rename from tests/unit/templateapp_util.t.cpp rename to tests/unit/util.t.cpp index cb75f3d..ccd982d 100644 --- a/tests/unit/templateapp_util.t.cpp +++ b/tests/unit/util.t.cpp @@ -1,6 +1,6 @@ #include -#include +#include "util.h" namespace templateapp { @@ -9,3 +9,4 @@ TEST_CASE( "The answer to life, the universe, and everything", "[templateapp_uti } } // close namespace templateapp +