From 3639989ffe2ac7038a77ea0c00f23d042827faee Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Mon, 12 Nov 2018 14:44:57 +0800 Subject: [PATCH] cmake ammendments --- CMakeLists.txt | 8 ++++---- tests/CMakeLists.txt | 1 - tests/README.md | 2 +- tests/mysql_tests.cpp | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7e4086..8d92d39 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if (NOT MONERO_DIR) set(MONERO_DIR ~/monero) endif() -option(BUILD_TEST "Build tests for the project" OFF) +option(BUILD_TESTS "Build tests for the project" OFF) message(STATUS MONERO_DIR ": ${MONERO_DIR}") @@ -37,7 +37,7 @@ set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${MONERO_BUILD_DIR}" include(MyUtils) -if (${BUILD_TEST}) +if (${BUILD_TESTS}) include(CodeCoverage) APPEND_COVERAGE_COMPILER_FLAGS() set(COVERAGE_EXCLUDES @@ -170,7 +170,7 @@ set(LIBRARIES ${LIBRARIES} ${HIDAPI_LIBRARIES}) target_link_libraries(${PROJECT_NAME} ${LIBRARIES}) -if (${BUILD_TEST}) +if (${BUILD_TESTS}) include_directories( ${CMAKE_SOURCE_DIR}/ext/googletest/googletest/include ${CMAKE_SOURCE_DIR}/ext/googletest/googlemock/include) @@ -178,7 +178,7 @@ endif() configure_files(${CMAKE_CURRENT_SOURCE_DIR}/sql ${CMAKE_CURRENT_BINARY_DIR}/sql) -if (${BUILD_TEST}) +if (${BUILD_TESTS}) enable_testing() add_subdirectory(ext/googletest) add_subdirectory(tests) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 423f895..0e410cb 100755 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -28,7 +28,6 @@ SETUP_TARGET_FOR_COVERAGE( NAME mysql_cov EXECUTABLE mysql_tests) - SETUP_TARGET_FOR_COVERAGE( NAME microcore_cov EXECUTABLE microcore_tests) diff --git a/tests/README.md b/tests/README.md index 7b0a455..d925d31 100755 --- a/tests/README.md +++ b/tests/README.md @@ -22,7 +22,7 @@ information on conneting to the test database in cd openmonero/build # indicate that test should be build -cmake -DBUILD_TEST=ON .. +cmake -DBUILD_TESTS=ON .. # compile openmonero with tests make diff --git a/tests/mysql_tests.cpp b/tests/mysql_tests.cpp index 62fbbfa..6d9b9b1 100755 --- a/tests/mysql_tests.cpp +++ b/tests/mysql_tests.cpp @@ -118,7 +118,7 @@ TEST(MYSQL_CONNECTION, CanConnect) json db_config = readin_config(); if (db_config.empty()) - FAIL() << "Cant readin_config()"; + FAIL() << "Cant read in_config()"; xmreg::MySqlConnector::url = db_config["url"]; xmreg::MySqlConnector::port = db_config["port"];