Skip to content

Commit

Permalink
Merge pull request #28 from IBM/CppInstall
Browse files Browse the repository at this point in the history
Cpp install
  • Loading branch information
gabe-l-hart authored Aug 12, 2021
2 parents 2866624 + 878b8fa commit 41f0aa6
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ target_include_directories(${library_name} PUBLIC include)
target_include_directories(${library_name} PUBLIC ${Boost_INCLUDE_DIRECTORIES})
target_include_directories(${library_name} PUBLIC ${nlohmann_json_SOURCE_DIR}/single_include)
target_link_libraries(${library_name} ${Boost_locale_LIBRARIES})
set_target_properties(alog PROPERTIES PUBLIC_HEADER include/alog/logger.hpp)
install(
TARGETS alog
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alog
)

# Add the unit tests if enabled
option(BUILD_UNIT_TESTS "Build the unit tests" ON)
Expand Down
4 changes: 4 additions & 0 deletions src/cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ RUN true && \
cmake .. && \
make && \
ctest && \
make install && \
test -e /usr/local/include/alog/logger.hpp && \
test -e /usr/local/lib/libalog.so && \
test -e /usr/local/include/nlohmann/json.hpp && \
true

## Release Test ################################################################
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/cpp/src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

// Local
#include "logger.h"
#include "alog/logger.hpp"

// Standard
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/tests/include/unit_testing.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <fstream>
#include <sstream>

#include "logger.h"
#include "alog/logger.hpp"

namespace test
{
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/tools/alog_fib_example/include/fibonacci.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <future>

// First Party
#include <logger.h>
#include <alog/logger.hpp>

namespace fib
{
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/tools/alog_fib_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <sstream>

// First Party
#include <logger.h>
#include <alog/logger.hpp>

// Local
#include "util.h"
Expand Down Expand Up @@ -158,4 +158,4 @@ int main(int argc, char *argv[])
ALOG(MAIN, info, ss.str());
}
}
}
}

0 comments on commit 41f0aa6

Please sign in to comment.