Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ After following the build steps above:
- `cmake ..`
- `make turtlecoin_test`

The test binary will be in the `src/test` directory when building completes. Run the file to run the tests and view the test report:
The test binary will be in the `src` directory when building completes. Run the file to run the tests and view the test report:

- `./test/turtlecoin_test`
- `./turtlecoin_test`

#### Thanks
Cryptonote Developers, Bytecoin Developers, Monero Developers, Forknote Project, TurtleCoin Community
Expand Down
8 changes: 6 additions & 2 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ set(UPNPC_BUILD_STATIC ON CACHE BOOL "Build static library")
set(UPNPC_BUILD_SHARED OFF CACHE BOOL "Build shared library")
set(UPNPC_BUILD_TESTS OFF CACHE BOOL "Build test executables")
set(WITH_MD_LIBRARY OFF CACHE BOOL "Code Generation for static library")
set(INSTALL_GTEST OFF CACHE BOOL "Enable installation of googletest")
set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject")

add_subdirectory(miniupnpc)
add_subdirectory(cryptopp)
add_subdirectory(sqlite3)
add_subdirectory(lz4)
add_subdirectory(googletest)

if(MSVC)
add_subdirectory(rocksDB EXCLUDE_FROM_ALL)
set_property(TARGET upnpc-static cryptopp-static rocksdb sqlite3 lz4 PROPERTY FOLDER "external")
set_property(TARGET upnpc-static cryptopp-static rocksdb sqlite3 lz4 gtest PROPERTY FOLDER "external")
elseif(NOT MSVC)
set_property(TARGET upnpc-static cryptopp-static sqlite3 lz4 PROPERTY FOLDER "external")
set_property(TARGET upnpc-static cryptopp-static sqlite3 lz4 gtest PROPERTY FOLDER "external")
add_custom_target(
rocksdb
COMMAND $(MAKE) rocksdb
Expand All @@ -25,6 +28,7 @@ endif()

if(MSVC)
set_property(TARGET upnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
elseif(NOT MSVC)
set_property(TARGET upnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
endif()
Expand Down
93 changes: 45 additions & 48 deletions external/googletest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Author: misterg@google.com (Gennadiy Civil)
#
# Bazel Build for Google C++ Testing Framework(Google Test)

package(default_visibility = ["//visibility:public"])
Expand All @@ -38,19 +36,21 @@ licenses(["notice"])

config_setting(
name = "windows",
values = {"cpu": "x64_windows"},
)

config_setting(
name = "windows_msvc",
values = {"cpu": "x64_windows_msvc"},
constraint_values = ["@bazel_tools//platforms:windows"],
)

config_setting(
name = "has_absl",
values = {"define": "absl=1"},
)

# Library that defines the FRIEND_TEST macro.
cc_library(
name = "gtest_prod",
hdrs = ["googletest/include/gtest/gtest_prod.h"],
includes = ["googletest/include"],
)

# Google Test including Google Mock
cc_library(
name = "gtest",
Expand All @@ -73,21 +73,14 @@ cc_library(
"googletest/include/gtest/*.h",
"googlemock/include/gmock/*.h",
]),
copts = select(
{
":windows": [],
":windows_msvc": [],
"//conditions:default": ["-pthread"],
},
),
defines = select(
{
":has_absl": [
"GTEST_HAS_ABSL=1",
],
"//conditions:default": [],
},
),
copts = select({
":windows": [],
"//conditions:default": ["-pthread"],
}),
defines = select({
":has_absl": ["GTEST_HAS_ABSL=1"],
"//conditions:default": [],
}),
includes = [
"googlemock",
"googlemock/include",
Expand All @@ -96,32 +89,33 @@ cc_library(
],
linkopts = select({
":windows": [],
":windows_msvc": [],
"//conditions:default": [
"-pthread",
"//conditions:default": ["-pthread"],
}),
deps = select({
":has_absl": [
"@com_google_absl//absl/debugging:failure_signal_handler",
"@com_google_absl//absl/debugging:stacktrace",
"@com_google_absl//absl/debugging:symbolize",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:optional",
"@com_google_absl//absl/types:variant",
],
"//conditions:default": [],
}),
deps = select(
{
":has_absl": [
"@com_google_absl//absl/debugging:failure_signal_handler",
"@com_google_absl//absl/debugging:stacktrace",
"@com_google_absl//absl/debugging:symbolize",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:optional",
"@com_google_absl//absl/types:variant",
],
"//conditions:default": [],
},
),
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
})
)

cc_library(
name = "gtest_main",
srcs = [
"googlemock/src/gmock_main.cc",
],
srcs = ["googlemock/src/gmock_main.cc"],
deps = [":gtest"],
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
})
)

# The following rules build samples of how to use gTest.
Expand All @@ -139,14 +133,18 @@ cc_library(
"googletest/samples/sample3-inl.h",
"googletest/samples/sample4.h",
],
features = select({
":windows": ["windows_export_all_symbols"],
"//conditions:default": [],
})
)

cc_test(
name = "gtest_samples",
size = "small",
#All Samples except:
#sample9 ( main )
#sample10 (main and takes a command line option and needs to be separate)
# All Samples except:
# sample9 (main)
# sample10 (main and takes a command line option and needs to be separate)
srcs = [
"googletest/samples/sample1_unittest.cc",
"googletest/samples/sample2_unittest.cc",
Expand All @@ -161,6 +159,7 @@ cc_test(
"gtest_sample_lib",
":gtest_main",
],
linkstatic = 0,
)

cc_test(
Expand All @@ -174,7 +173,5 @@ cc_test(
name = "sample10_unittest",
size = "small",
srcs = ["googletest/samples/sample10_unittest.cc"],
deps = [
":gtest",
],
deps = [":gtest"],
)
19 changes: 16 additions & 3 deletions external/googletest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
# Note: CMake support is community-based. The maintaners do not use CMake
# internally.

cmake_minimum_required(VERSION 2.8.8)

project(googletest-distribution)
set(GOOGLETEST_VERSION 1.9.0)

if (CMAKE_VERSION VERSION_LESS "3.1")
add_definitions(-std=c++11)
else()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT CYGWIN)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
endif()

if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif (POLICY CMP0048)

project(googletest-distribution)
set(GOOGLETEST_VERSION 1.9.0)

enable_testing()

include(CMakeDependentOption)
Expand Down
3 changes: 2 additions & 1 deletion external/googletest/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ itself is a valuable contribution.

To keep the source consistent, readable, diffable and easy to merge,
we use a fairly rigid coding style, as defined by the [google-styleguide](https://github.com/google/styleguide) project. All patches will be expected
to conform to the style outlined [here](https://google.github.io/styleguide/cppguide.html).
to conform to the style outlined [here](https://google.github.io/styleguide/cppguide.html).
Use [.clang-format](https://github.com/google/googletest/blob/master/.clang-format) to check your formatting

## Requirements for Contributors ###

Expand Down
4 changes: 3 additions & 1 deletion external/googletest/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Note: automake support is community-based. The maintaners do not use automake
# internally.

## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4

AUTOMAKE_OPTIONS = foreign

Expand Down
13 changes: 6 additions & 7 deletions external/googletest/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

# Google Test #

[![Build Status](https://travis-ci.org/google/googletest.svg?branch=master)](https://travis-ci.org/google/googletest)
[![Build Status](https://api.travis-ci.org/google/googletest.svg?branch=master)](https://travis-ci.org/google/googletest)
[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/GoogleTestAppVeyor/googletest/branch/master)

**Future Plans**:
* 1.8.x Release - the 1.8.x will be the last release that works with pre-C++11 compilers. The 1.8.x will not accept any requests for any new features and any bugfix requests will only be accepted if proven "critical"
* 1.8.x Release - [the 1.8.x](https://github.com/google/googletest/releases/tag/release-1.8.1) is the last release that works with pre-C++11 compilers. The 1.8.x will not accept any requests for any new features and any bugfix requests will only be accepted if proven "critical"
* Post 1.8.x - work to improve/cleanup/pay technical debt. When this work is completed there will be a 1.9.x tagged release
* Post 1.9.x googletest will follow [Abseil Live at Head philosophy](https://abseil.io/about/philosophy)

Expand All @@ -16,10 +16,8 @@ This repository is a merger of the formerly separate GoogleTest and
GoogleMock projects. These were so closely related that it makes sense to
maintain and release them together.

Please see the project page above for more information as well as the
mailing list for questions, discussions, and development. There is
also an IRC channel on [OFTC](https://webchat.oftc.net/) (irc.oftc.net) #gtest available. Please
join us!
Please subscribe to the mailing list at googletestframework@googlegroups.com for questions, discussions, and development.
There is also an IRC channel on [OFTC](https://webchat.oftc.net/) (irc.oftc.net) #gtest available.

Getting started information for **Google Test** is available in the
[Google Test Primer](googletest/docs/primer.md) documentation.
Expand Down Expand Up @@ -54,6 +52,7 @@ Google test has been used on a variety of platforms:
* MinGW
* Windows Mobile
* Symbian
* PlatformIO

## Who Is Using Google Test? ##

Expand Down Expand Up @@ -107,7 +106,7 @@ package (as described below):
* GNU-compatible Make or gmake
* POSIX-standard shell
* POSIX(-2) Regular Expressions (regex.h)
* A C++98-standard-compliant compiler
* A C++11-standard-compliant compiler

### Windows Requirements ###

Expand Down
2 changes: 2 additions & 0 deletions external/googletest/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
workspace(name = "com_google_googletest")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Abseil
http_archive(
name = "com_google_absl",
Expand Down
Loading