@@ -177,7 +177,7 @@ include_directories("${PROJECT_SOURCE_DIR}/include")
177
177
# add sources of the wrapper as a "SQLiteCpp" static library
178
178
add_library (SQLiteCpp ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT} )
179
179
# 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
181
181
#target_link_libraries(SQLiteCpp PUBLIC sqlite3)
182
182
183
183
if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" ))
@@ -295,12 +295,14 @@ if (SQLITECPP_BUILD_TESTS)
295
295
include_directories ("${PROJECT_SOURCE_DIR} /googletest/googletest/include" )
296
296
297
297
# 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 )
304
306
305
307
# add the unit test executable
306
308
add_executable (SQLiteCpp_tests ${SQLITECPP_TESTS} )
0 commit comments