Skip to content

Commit

Permalink
Merge pull request #1938 from jagerman/no-empty-compilations
Browse files Browse the repository at this point in the history
Don't build empty cpp files
  • Loading branch information
majestrate authored Jun 22, 2022
2 parents 193ab47 + 8c3d1b3 commit a9a9593
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions llarp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ add_library(lokinet-util
util/buffer.cpp
util/fs.cpp
util/json.cpp
util/logging/android_logger.cpp
util/logging/buffer.cpp
util/logging/file_logger.cpp
util/logging/logger.cpp
util/logging/logger_internal.cpp
util/logging/loglevel.cpp
util/logging/ostream_logger.cpp
util/logging/syslog_logger.cpp
util/logging/win32_logger.cpp
util/lokinet_init.c
util/mem.cpp
util/printer.cpp
Expand All @@ -38,7 +36,10 @@ target_link_libraries(lokinet-util PUBLIC
)

if(ANDROID)
target_sources(lokinet-util PRIVATE util/logging/android_logger.cpp)
target_link_libraries(lokinet-util PUBLIC log)
elseif(WIN32)
target_sources(lokinet-util PRIVATE util/logging/win32_logger.cpp)
endif()

add_library(lokinet-platform
Expand Down
3 changes: 0 additions & 3 deletions llarp/util/logging/android_logger.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#if defined(ANDROID)

#include "android_logger.hpp"
#include "logger_internal.hpp"

Expand Down Expand Up @@ -69,4 +67,3 @@ namespace llarp

} // namespace llarp
} // namespace llarp
#endif
2 changes: 0 additions & 2 deletions llarp/util/logging/win32_logger.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(_WIN32)
#include "win32_logger.hpp"
#include "logger_internal.hpp"

Expand Down Expand Up @@ -113,4 +112,3 @@ namespace llarp
}

} // namespace llarp
#endif

0 comments on commit a9a9593

Please sign in to comment.