mirror of
https://github.com/boostorg/mysql.git
synced 2026-02-14 12:52:17 +00:00
Trying to make Appveyor link
This commit is contained in:
@@ -11,7 +11,7 @@ endif()
|
||||
|
||||
# Utility function to set warnings and other compile properties of
|
||||
# our test targets
|
||||
function(_mysql_set_target_warnings TARGET_NAME)
|
||||
function(_mysql_common_target_settings TARGET_NAME)
|
||||
if(MSVC)
|
||||
target_compile_definitions(${TARGET_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS _WIN32_WINNT=0x0601)
|
||||
target_link_directories(${TARGET_NAME} PRIVATE ${Boost_LIBRARY_DIRS})
|
||||
|
||||
@@ -12,7 +12,7 @@ function (_mysql_add_example EXECUTABLE_NAME CPPFILE)
|
||||
mysql_asio
|
||||
Boost::coroutine
|
||||
)
|
||||
_mysql_set_target_warnings(${EXECUTABLE_NAME})
|
||||
_mysql_common_target_settings(${EXECUTABLE_NAME})
|
||||
endfunction()
|
||||
|
||||
set(MYSQL_EXAMPLES
|
||||
|
||||
@@ -9,6 +9,7 @@ FetchContent_Declare(
|
||||
FetchContent_GetProperties(googletest)
|
||||
if(NOT googletest_POPULATED)
|
||||
FetchContent_Populate(googletest)
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) # Avoid GTest linking against wrong CRT
|
||||
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
@@ -51,7 +52,7 @@ target_link_libraries(
|
||||
gmock
|
||||
mysql_asio
|
||||
)
|
||||
_mysql_set_target_warnings(mysql_unittests)
|
||||
_mysql_common_target_settings(mysql_unittests)
|
||||
add_test(
|
||||
NAME mysql_unittests
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/mysql_unittests
|
||||
|
||||
Reference in New Issue
Block a user