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

Tests on windows #83

Open
wants to merge 3 commits 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
33 changes: 17 additions & 16 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ set(HAVE_ZLIB ${CASS_USE_ZLIB})
# Generate the driver_config.hpp file
configure_file(
${CASS_ROOT_DIR}/driver_config.hpp.in
${CMAKE_CURRENT_SOURCE_DIR}/driver_config.hpp)
${CMAKE_CURRENT_BINARY_DIR}/generated/driver_config.hpp)
list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/generated)


#------------------------------
Expand Down Expand Up @@ -174,39 +175,39 @@ if(CASS_BUILD_SHARED)
endif()

if(CASS_BUILD_STATIC)
add_library(cassandra_static STATIC
add_library(scylla-cpp-driver_static STATIC
${SOURCES}
$<TARGET_OBJECTS:curl_hostcheck_static>
$<TARGET_OBJECTS:hdr_histogram_static>
$<TARGET_OBJECTS:http-parser_static>
$<TARGET_OBJECTS:minizip_static>)
target_link_libraries(cassandra_static ${CASS_LIBS})
target_include_directories(cassandra_static PRIVATE ${INCLUDE_DIRS} ${CASS_INCLUDES})
target_link_libraries(scylla-cpp-driver_static ${CASS_LIBS})
target_include_directories(scylla-cpp-driver_static PRIVATE ${INCLUDE_DIRS} ${CASS_INCLUDES})

set_target_properties(cassandra_static PROPERTIES OUTPUT_NAME scylla-cpp-driver_static)
set_target_properties(cassandra_static PROPERTIES VERSION ${PROJECT_VERSION_STRING} SOVERSION ${PROJECT_VERSION_MAJOR})
set_target_properties(cassandra_static PROPERTIES
COMPILE_PDB_NAME "cassandra_static"
set_target_properties(scylla-cpp-driver_static PROPERTIES OUTPUT_NAME scylla-cpp-driver_static)
set_target_properties(scylla-cpp-driver_static PROPERTIES VERSION ${PROJECT_VERSION_STRING} SOVERSION ${PROJECT_VERSION_MAJOR})
set_target_properties(scylla-cpp-driver_static PROPERTIES
COMPILE_PDB_NAME "scylla-cpp-driver_static"
COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
set_target_properties(cassandra_static PROPERTIES
set_target_properties(scylla-cpp-driver_static PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set_target_properties(cassandra_static PROPERTIES FOLDER "Driver")
set_target_properties(scylla-cpp-driver_static PROPERTIES FOLDER "Driver")

target_compile_definitions(cassandra_static PRIVATE CASS_STATIC)
target_compile_definitions(scylla-cpp-driver_static PRIVATE CASS_STATIC)

if(CASS_USE_BOOST_ATOMIC AND BOOST_LIBRARY_NAME)
add_dependencies(cassandra_static ${BOOST_LIBRARY_NAME})
add_dependencies(scylla-cpp-driver_static ${BOOST_LIBRARY_NAME})
endif()
if(LIBUV_LIBRARY_NAME)
add_dependencies(cassandra_static ${LIBUV_LIBRARY_NAME})
add_dependencies(scylla-cpp-driver_static ${LIBUV_LIBRARY_NAME})
endif()
if(OPENSSL_LIBRARY_NAME)
add_dependencies(cassandra_static ${OPENSSL_LIBRARY_NAME})
add_dependencies(scylla-cpp-driver_static ${OPENSSL_LIBRARY_NAME})
endif()
if(ZLIB_LIBRARY_NAME)
add_dependencies(cassandra_static ${ZLIB_LIBRARY_NAME})
add_dependencies(scylla-cpp-driver_static ${ZLIB_LIBRARY_NAME})
endif()
endif()

Expand Down Expand Up @@ -292,7 +293,7 @@ if(CASS_BUILD_SHARED)
endif()

if(CASS_BUILD_STATIC)
install(TARGETS cassandra_static
install(TARGETS scylla-cpp-driver_static
RUNTIME DESTINATION ${INSTALL_DLL_EXE_DIR} # for dll/executable/pdb files
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # for shared library
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) # for static library
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ include_directories(${CASS_ROOT_DIR}/tests/src/vendor)
include_directories(${CASS_INCLUDE_DIR})
include_directories(${CASS_SRC_DIR})
include_directories(${CASS_SRC_DIR}/third_party/sparsehash/src)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src/generated)

set(GOOGLE_TEST_DIR ${CASS_ROOT_DIR}/tests/src/vendor/gtest)
set(GOOGLE_TEST_HEADER_FILES "${GOOGLE_TEST_DIR}/gtest.h")
Expand Down
2 changes: 1 addition & 1 deletion tests/src/unit/tests/test_protocol_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TEST_F(ProtocolVersionUnitTest, LowestSupported) {
}

TEST_F(ProtocolVersionUnitTest, HighestSupported) {
EXPECT_EQ(ProtocolVersion(CASS_PROTOCOL_VERSION_DSEV2), ProtocolVersion::highest_supported());
EXPECT_EQ(ProtocolVersion(CASS_PROTOCOL_VERSION_V4), ProtocolVersion::highest_supported());
}

TEST_F(ProtocolVersionUnitTest, NewestBeta) {
Expand Down