diff --git a/CMakeLists.txt b/CMakeLists.txt index d44bb0e..562c330 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,9 @@ -cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(logfault DESCRIPTION "Simple to use, header only C++ library for application-logging on all major platforms." HOMEPAGE_URL https://github.com/jgaa/logfault - VERSION 0.5.0 + VERSION 0.5.1 LANGUAGES CXX) include(GNUInstallDirs) @@ -27,6 +27,7 @@ option(LOGFAULT_BUILD_TESTS "Build tests" ON) if(LOGFAULT_BUILD_TESTS) find_package(GTest REQUIRED) + include(CTest) enable_testing() add_subdirectory(tests) endif() diff --git a/conanfile.py b/conanfile.py index a7f157c..35d22b3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -7,17 +7,11 @@ class LogfaultConan(ConanFile): name = "logfault" - version = "0.5.0" + version = "0.5.1" settings = "os", "arch", "compiler", "build_type" exports_sources = "include/*", "tests/*", "CMakeLists.txt" no_copy_source = True generators = "CMakeToolchain", "CMakeDeps" - options = {"with_tests": [True, False]} - default_options = {"with_tests": False} - - # def source(self): - # git = Git(self) - # git.clone(url="https://github.com/conan-io/libhello.git", target=".") def package(self): # This will also copy the "include" folder diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index 82d3673..5e72b01 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project (example) find_package (Threads) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ec7bc74..f79f975 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,37 +1,5 @@ - - -message ("GTEST_LIBRARIES: ${GTEST_LIBRARIES}") -message ("GTest_LIBRARIES: ${GTest_LIBRARIES}") - -message ("GTEST_INCLUDE_DIRS: ${GTEST_INCLUDE_DIRS}") -message ("GTest_INCLUDE_DIRS: ${GTest_INCLUDE_DIRS}") - -if (NOT GTEST_LIBRARIES) - set (GTEST_LIBRARIES ${GTest_LIBRARIES}) -endif() - -if (NOT GTEST_INCLUDE_DIRS) - set (GTEST_INCLUDE_DIRS ${GTest_INCLUDE_DIRS}) -endif() - -option(WITH_QT "Enable QT" OFF) - -# if (WITH_QT) -# add_definitions(-DLOGFAULT_USE_QT_LOG=1) -# find_package(Qt6 6.4 REQUIRED COMPONENTS Test) -# qt_standard_project_setup(REQUIRES 6.5) -# qt_add_executable(general_tests general_tests.cpp) - -# else() -# add_executable(general_tests general_tests.cpp) -# target_link_libraries(general_tests -# ${DEFAULT_LIBRARIES} -# ) -# endif() - ####### default_to_clog - add_executable(default_to_clog default_to_clog.cpp ) @@ -43,12 +11,11 @@ target_include_directories(default_to_clog ${CMAKE_CURRENT_SOURCE_DIR} ${LOGFAULT_ROOT}/include ${GTEST_INCLUDE_DIRS} - #${GTest_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/exports ) target_link_libraries(default_to_clog - ${GTEST_LIBRARIES} + GTest::gtest ${CMAKE_THREAD_LIBS_INIT} ) @@ -69,12 +36,11 @@ target_include_directories(default_to_clog_with_tid ${CMAKE_CURRENT_SOURCE_DIR} ${LOGFAULT_ROOT}/include ${GTEST_INCLUDE_DIRS} - #${GTest_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/exports ) target_link_libraries(default_to_clog_with_tid - ${GTEST_LIBRARIES} + GTest::gtest ${CMAKE_THREAD_LIBS_INIT} )