Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ package:

test:
cd ${BUILD_DIR} && ctest --verbose

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ docker run -it --rm templateapp
docker build --target=run -t templateapp .
docker run -it --rm templateapp
```

1 change: 1 addition & 0 deletions scripts/templateapp.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh

/usr/bin/templateapp

5 changes: 3 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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}
Expand All @@ -18,3 +18,4 @@ target_include_directories(${EXECUTABLE_NAME}
PRIVATE
.
)

3 changes: 2 additions & 1 deletion src/templateapp.m.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iostream>
#include <string>

#include <templateapp_util.h>
#include "util.h"

using namespace templateapp;

Expand All @@ -13,3 +13,4 @@ int main()
std::cout << meaningOfLifeTheUniverseAndEverything(question) << std::endl;
return 0;
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(LIBRARY_NAME templateapplib)
set(LIBRARY_NAME util)

add_library(${LIBRARY_NAME} STATIC)

Expand All @@ -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}
Expand All @@ -24,3 +24,4 @@ target_include_directories(${LIBRARY_NAME}
PRIVATE
.
)

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <templateapp_util.h>
#include "util.h"

namespace templateapp {

Expand All @@ -7,3 +7,4 @@ int meaningOfLifeTheUniverseAndEverything(const std::string& question) {
}

} // close namespace templateapp

Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ namespace templateapp {
} // close namespace templateapp

#endif /* TEMPLATEAPP_UTIL_H */

1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ add_subdirectory(integration)
add_subdirectory(unit)

add_test(NAME unittest COMMAND templateapp.u.t)

5 changes: 3 additions & 2 deletions tests/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <catch2/catch.hpp>

#include <templateapp_util.h>
#include "util.h"

namespace templateapp {

Expand All @@ -9,3 +9,4 @@ TEST_CASE( "The answer to life, the universe, and everything", "[templateapp_uti
}

} // close namespace templateapp

5 changes: 3 additions & 2 deletions tests/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

3 changes: 2 additions & 1 deletion tests/unit/templateapp_util.t.cpp → tests/unit/util.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <catch2/catch.hpp>

#include <templateapp_util.h>
#include "util.h"

namespace templateapp {

Expand All @@ -9,3 +9,4 @@ TEST_CASE( "The answer to life, the universe, and everything", "[templateapp_uti
}

} // close namespace templateapp