Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove internal library to fix MSVC linking issues #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
21 changes: 6 additions & 15 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,16 @@ target_include_directories(InfluxDB-Internal PRIVATE ${INTERNAL_INCLUDE_DIRS})
target_link_libraries(InfluxDB-Internal PRIVATE cpr::cpr)


add_library(InfluxDB-Core OBJECT
InfluxDB.cxx
Point.cxx
InfluxDBFactory.cxx
InfluxDBBuilder.cxx
Proxy.cxx
)
target_include_directories(InfluxDB-Core PUBLIC
${PROJECT_SOURCE_DIR}/include
${PROJECT_BINARY_DIR}/src
)
target_link_libraries(InfluxDB-Core PRIVATE cpr::cpr)


add_library(InfluxDB
$<TARGET_OBJECTS:InfluxDB-Core>
InfluxDB.cxx
Point.cxx
InfluxDBFactory.cxx
InfluxDBBuilder.cxx
Proxy.cxx
$<TARGET_OBJECTS:InfluxDB-Internal>
$<TARGET_OBJECTS:InfluxDB-BoostSupport>
)
target_link_libraries(InfluxDB PRIVATE cpr::cpr)
add_library(InfluxData::InfluxDB ALIAS InfluxDB)

#
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ add_unittest(LineProtocolTest DEPENDS InfluxDB InfluxDB-Internal)
add_unittest(InfluxDBTest DEPENDS InfluxDB)
add_unittest(InfluxDBFactoryTest DEPENDS InfluxDB)
add_unittest(ProxyTest DEPENDS InfluxDB)
add_unittest(HttpTest DEPENDS InfluxDB-Core InfluxDB-Internal InfluxDB-BoostSupport CprMock Threads::Threads)
add_unittest(HttpTest DEPENDS CprMock InfluxDB InfluxDB-Internal InfluxDB-BoostSupport Threads::Threads)
add_unittest(UriParserTest)

add_unittest(NoBoostSupportTest)
Expand Down