1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-01-16 09:47:56 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Gabi Melman
1a1ea028f6
Merge pull request #1587 from podsvirov/increased-tolerance-waiting-time-for-mingw
Twice tolerance waiting time with MinGW
2020-06-10 23:47:19 +03:00
Gabi Melman
814c3445a3
Merge pull request #1586 from podsvirov/fix-shared-non-msvc
Fix shared library building failure on Windows with non MSVC
2020-06-10 23:46:46 +03:00
Konstantin Podsvirov
075dcee042 Twice tolerance waiting time with MinGW
Increased tolerance waiting time for MinGW in dequeue-empty-nowait test
case, because this test case not passed on slow and powerful computers.
2020-06-10 23:44:30 +03:00
Konstantin Podsvirov
fe97a03033 Fix shared library building failure on Windows with non MSVC
For example, now we can built shared library on Window with MinGW.

This changes improve features added in #1467.
2020-06-10 22:56:53 +03:00
3 changed files with 7 additions and 8 deletions

View File

@ -131,16 +131,15 @@ if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
list(APPEND SPDLOG_SRCS src/fmt.cpp)
endif()
if(WIN32 AND SPDLOG_BUILD_SHARED)
list(APPEND SPDLOG_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
endif()
if(SPDLOG_BUILD_SHARED)
if(WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)
list(APPEND SPDLOG_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
endif()
add_library(spdlog SHARED ${SPDLOG_SRCS} ${SPDLOG_ALL_HEADERS})
target_compile_definitions(spdlog PUBLIC SPDLOG_SHARED_LIB)
if(WIN32)
if(MSVC)
target_compile_options(spdlog PUBLIC /wd4251 /wd4275)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)
endif()
if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
target_compile_definitions(spdlog PRIVATE FMT_EXPORT PUBLIC FMT_SHARED)

View File

@ -1,5 +1,5 @@
#define APSTUDIO_READONLY_SYMBOLS
#include "winres.h"
#include <windows.h>
#undef APSTUDIO_READONLY_SYMBOLS
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View File

@ -10,7 +10,7 @@ static milliseconds millis_from(const test_clock::time_point &tp0)
TEST_CASE("dequeue-empty-nowait", "[mpmc_blocking_q]")
{
size_t q_size = 100;
milliseconds tolerance_wait(10);
milliseconds tolerance_wait(20);
spdlog::details::mpmc_blocking_queue<int> q(q_size);
int popped_item = 0;