mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 05:13:25 +01:00
Merge pull request #1699
dd348549
make previous change portable (Timothy D. Prime)32d7d048
fixes #1688 protect make debug-test from gtest (Timothy D. Prime)
This commit is contained in:
commit
71770d1a78
@ -43,24 +43,30 @@ if (GTest_FOUND)
|
|||||||
include_directories(SYSTEM ${GTEST_INCLUDE_DIRS})
|
include_directories(SYSTEM ${GTEST_INCLUDE_DIRS})
|
||||||
else ()
|
else ()
|
||||||
message(STATUS "GTest not found on the system: will use GTest bundled with this source")
|
message(STATUS "GTest not found on the system: will use GTest bundled with this source")
|
||||||
add_subdirectory(gtest)
|
|
||||||
include_directories(SYSTEM "${gtest_SOURCE_DIR}/include" "${gtest_SOURCE_DIR}")
|
include(ExternalProject)
|
||||||
|
ExternalProject_Add(googletest
|
||||||
|
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gtest
|
||||||
|
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gtest
|
||||||
|
DOWNLOAD_COMMAND ""
|
||||||
|
UPDATE_COMMAND ""
|
||||||
|
INSTALL_COMMAND ""
|
||||||
|
)
|
||||||
|
add_library(gtest UNKNOWN IMPORTED)
|
||||||
|
add_library(gtest_main UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(gtest PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/gtest/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||||
|
)
|
||||||
|
set_target_properties(gtest_main PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/gtest/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||||
|
)
|
||||||
|
add_dependencies(gtest googletest)
|
||||||
|
add_dependencies(gtest_main googletest)
|
||||||
|
|
||||||
# Emulate the FindGTest module's variable.
|
# Emulate the FindGTest module's variable.
|
||||||
set(GTEST_LIBRARIES gtest)
|
set(GTEST_LIBRARIES gtest gtest_main)
|
||||||
|
include_directories(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/gtest/include")
|
||||||
# Ignore some warnings when building gtest binaries.
|
endif (GTest_FOUND)
|
||||||
if(NOT MSVC)
|
|
||||||
set_property(TARGET gtest
|
|
||||||
APPEND_STRING
|
|
||||||
PROPERTY
|
|
||||||
COMPILE_FLAGS " -Wno-undef -Wno-sign-compare")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_property(TARGET gtest
|
|
||||||
PROPERTY
|
|
||||||
FOLDER "${folder}")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
file(COPY
|
file(COPY
|
||||||
data/wallet_9svHk1.keys
|
data/wallet_9svHk1.keys
|
||||||
|
Loading…
Reference in New Issue
Block a user