cmake ammendments

new_rpc
moneroexamples 6 years ago
parent a42327b1fb
commit 3639989ffe

@ -15,7 +15,7 @@ if (NOT MONERO_DIR)
set(MONERO_DIR ~/monero) set(MONERO_DIR ~/monero)
endif() 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}") message(STATUS MONERO_DIR ": ${MONERO_DIR}")
@ -37,7 +37,7 @@ set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${MONERO_BUILD_DIR}"
include(MyUtils) include(MyUtils)
if (${BUILD_TEST}) if (${BUILD_TESTS})
include(CodeCoverage) include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS() APPEND_COVERAGE_COMPILER_FLAGS()
set(COVERAGE_EXCLUDES set(COVERAGE_EXCLUDES
@ -170,7 +170,7 @@ set(LIBRARIES ${LIBRARIES} ${HIDAPI_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${LIBRARIES}) target_link_libraries(${PROJECT_NAME} ${LIBRARIES})
if (${BUILD_TEST}) if (${BUILD_TESTS})
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/ext/googletest/googletest/include ${CMAKE_SOURCE_DIR}/ext/googletest/googletest/include
${CMAKE_SOURCE_DIR}/ext/googletest/googlemock/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) configure_files(${CMAKE_CURRENT_SOURCE_DIR}/sql ${CMAKE_CURRENT_BINARY_DIR}/sql)
if (${BUILD_TEST}) if (${BUILD_TESTS})
enable_testing() enable_testing()
add_subdirectory(ext/googletest) add_subdirectory(ext/googletest)
add_subdirectory(tests) add_subdirectory(tests)

@ -28,7 +28,6 @@ SETUP_TARGET_FOR_COVERAGE(
NAME mysql_cov NAME mysql_cov
EXECUTABLE mysql_tests) EXECUTABLE mysql_tests)
SETUP_TARGET_FOR_COVERAGE( SETUP_TARGET_FOR_COVERAGE(
NAME microcore_cov NAME microcore_cov
EXECUTABLE microcore_tests) EXECUTABLE microcore_tests)

@ -22,7 +22,7 @@ information on conneting to the test database in
cd openmonero/build cd openmonero/build
# indicate that test should be build # indicate that test should be build
cmake -DBUILD_TEST=ON .. cmake -DBUILD_TESTS=ON ..
# compile openmonero with tests # compile openmonero with tests
make make

@ -118,7 +118,7 @@ TEST(MYSQL_CONNECTION, CanConnect)
json db_config = readin_config(); json db_config = readin_config();
if (db_config.empty()) if (db_config.empty())
FAIL() << "Cant readin_config()"; FAIL() << "Cant read in_config()";
xmreg::MySqlConnector::url = db_config["url"]; xmreg::MySqlConnector::url = db_config["url"];
xmreg::MySqlConnector::port = db_config["port"]; xmreg::MySqlConnector::port = db_config["port"];

Loading…
Cancel
Save