MXS-2014 Add skeleton test for mxb::Log

This commit is contained in:
Johan Wikman
2018-08-16 13:23:03 +03:00
parent 12e8f28907
commit cfdfff46ae
4 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,5 @@
enable_testing()
project(maxutils)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "-fPIC -std=c++11 -ggdb -Wall -Werror -Wno-unused-function")

View File

@ -9,3 +9,5 @@ add_library(maxbase STATIC
)
set_target_properties(maxbase PROPERTIES VERSION "1.0.0" LINK_FLAGS -Wl,-z,defs)
install(TARGETS maxbase DESTINATION lib)
add_subdirectory(test)

View File

@ -0,0 +1,4 @@
add_executable(test_log test_log.cc)
target_link_libraries(test_log maxbase)
add_test(test_log test_log)

View File

@ -0,0 +1,23 @@
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2022-01-01
*
* On the date above, in accordance with the Business Source License, use
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include <maxbase/log.hh>
int main()
{
mxb::Log log;
MXB_NOTICE("Hello World!");
return 0;
}