@@ -177,7 +177,7 @@ include_directories("${PROJECT_SOURCE_DIR}/include")
177177# add sources of the wrapper as a "SQLiteCpp" static library
178178add_library (SQLiteCpp ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT} )
179179# make the sqlite3 library part of the interface of the SQLiteCpp wrapper itself (the client app does not need to link to sqlite3)
180- # PR https://github.com/SRombauts/SQLiteCpp/pull/111 "linked SQLiteCpp to sqlite3" commented out since it breacks install step from PR #118
180+ # PR https://github.com/SRombauts/SQLiteCpp/pull/111 "linked SQLiteCpp to sqlite3" commented out since it breaks install step from PR #118
181181#target_link_libraries(SQLiteCpp PUBLIC sqlite3)
182182
183183if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" ))
@@ -295,12 +295,14 @@ if (SQLITECPP_BUILD_TESTS)
295295 include_directories ("${PROJECT_SOURCE_DIR} /googletest/googletest/include" )
296296
297297 # Add definitions to keep googletest from making the compilation fail
298- if (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919) # OR MSVC_TOOLSET_VERSION EQUAL 141)
299- target_compile_definitions (gtest PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
300- target_compile_definitions (gtest_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
301- target_compile_definitions (gmock PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
302- target_compile_definitions (gmock_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
303- endif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919)
298+ if (MSVC )
299+ if (MSVC AND MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919) # OR MSVC_TOOLSET_VERSION EQUAL 141)
300+ target_compile_definitions (gtest PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
301+ target_compile_definitions (gtest_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
302+ target_compile_definitions (gmock PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
303+ target_compile_definitions (gmock_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
304+ endif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919)
305+ endif (MSVC )
304306
305307 # add the unit test executable
306308 add_executable (SQLiteCpp_tests ${SQLITECPP_TESTS} )
0 commit comments