mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 17:56:13 -04:00
Fix CMakeLists.txt to build under Bash on Ubuntu on Windows
(Windows Subsystem for Windows 10)
This commit is contained in:
parent
35aaf73191
commit
6dc7f9b235
@ -177,7 +177,7 @@ include_directories("${PROJECT_SOURCE_DIR}/include")
|
|||||||
# add sources of the wrapper as a "SQLiteCpp" static library
|
# add sources of the wrapper as a "SQLiteCpp" static library
|
||||||
add_library(SQLiteCpp ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT})
|
add_library(SQLiteCpp ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT})
|
||||||
# make the sqlite3 library part of the interface of the SQLiteCpp wrapper itself (the client app does not need to link to sqlite3)
|
# make the sqlite3 library part of the interface of the SQLiteCpp wrapper itself (the client app does not need to link to sqlite3)
|
||||||
# PR https://github.com/SRombauts/SQLiteCpp/pull/111 "linked SQLiteCpp to sqlite3" commented out since it breacks install step from PR #118
|
# PR https://github.com/SRombauts/SQLiteCpp/pull/111 "linked SQLiteCpp to sqlite3" commented out since it breaks install step from PR #118
|
||||||
#target_link_libraries(SQLiteCpp PUBLIC sqlite3)
|
#target_link_libraries(SQLiteCpp PUBLIC sqlite3)
|
||||||
|
|
||||||
if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
|
if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
|
||||||
@ -295,12 +295,14 @@ if (SQLITECPP_BUILD_TESTS)
|
|||||||
include_directories("${PROJECT_SOURCE_DIR}/googletest/googletest/include")
|
include_directories("${PROJECT_SOURCE_DIR}/googletest/googletest/include")
|
||||||
|
|
||||||
# Add definitions to keep googletest from making the compilation fail
|
# Add definitions to keep googletest from making the compilation fail
|
||||||
if (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919) # OR MSVC_TOOLSET_VERSION EQUAL 141)
|
if (MSVC)
|
||||||
target_compile_definitions(gtest PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
if (MSVC AND MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919) # OR MSVC_TOOLSET_VERSION EQUAL 141)
|
||||||
target_compile_definitions(gtest_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
target_compile_definitions(gtest PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
||||||
target_compile_definitions(gmock PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
target_compile_definitions(gtest_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
||||||
target_compile_definitions(gmock_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
target_compile_definitions(gmock PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
||||||
endif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919)
|
target_compile_definitions(gmock_main PUBLIC _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
||||||
|
endif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919)
|
||||||
|
endif (MSVC)
|
||||||
|
|
||||||
# add the unit test executable
|
# add the unit test executable
|
||||||
add_executable(SQLiteCpp_tests ${SQLITECPP_TESTS})
|
add_executable(SQLiteCpp_tests ${SQLITECPP_TESTS})
|
||||||
|
@ -74,7 +74,6 @@ And the following IDEs/Compilers
|
|||||||
- Clang 3.5 and 3.8
|
- Clang 3.5 and 3.8
|
||||||
- Xcode 8
|
- Xcode 8
|
||||||
- Visual Studio Community 2017, and VS 2013 & 2015 (AppVeyor)
|
- Visual Studio Community 2017, and VS 2013 & 2015 (AppVeyor)
|
||||||
- Eclipse CDT under Linux
|
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user