diff --git a/maxutils/CMakeLists.txt b/maxutils/CMakeLists.txt index c5f13f1ae..aeb148e93 100644 --- a/maxutils/CMakeLists.txt +++ b/maxutils/CMakeLists.txt @@ -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") diff --git a/maxutils/maxbase/src/CMakeLists.txt b/maxutils/maxbase/src/CMakeLists.txt index 41ed87554..f41846ca3 100644 --- a/maxutils/maxbase/src/CMakeLists.txt +++ b/maxutils/maxbase/src/CMakeLists.txt @@ -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) diff --git a/maxutils/maxbase/src/test/CMakeLists.txt b/maxutils/maxbase/src/test/CMakeLists.txt new file mode 100644 index 000000000..0f654c1c5 --- /dev/null +++ b/maxutils/maxbase/src/test/CMakeLists.txt @@ -0,0 +1,4 @@ +add_executable(test_log test_log.cc) +target_link_libraries(test_log maxbase) +add_test(test_log test_log) + diff --git a/maxutils/maxbase/src/test/test_log.cc b/maxutils/maxbase/src/test/test_log.cc new file mode 100644 index 000000000..4963019cd --- /dev/null +++ b/maxutils/maxbase/src/test/test_log.cc @@ -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 + +int main() +{ + mxb::Log log; + + MXB_NOTICE("Hello World!"); + + return 0; +}