From 5d08bd17093e2da4d19ad806eeaf1bb3ab6012b6 Mon Sep 17 00:00:00 2001 From: Daniel Chabrowski Date: Sun, 11 Feb 2018 21:16:15 +0100 Subject: [PATCH] Bump example's cmake version to 3.1 CMake 3.1 is used in main CMakeLists file, no reason not to use it in example. Threads::Threads is introduced in cmake 3.1. --- example/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index ae5add05..cc699729 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -21,7 +21,7 @@ # * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ # *************************************************************************/ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) project(SpdlogExamples CXX) if(TARGET spdlog) @@ -32,16 +32,16 @@ else() find_package(spdlog CONFIG REQUIRED) endif() -find_package(Threads) +find_package(Threads REQUIRED) add_executable(example example.cpp) -target_link_libraries(example spdlog::spdlog ${CMAKE_THREAD_LIBS_INIT}) +target_link_libraries(example spdlog::spdlog Threads::Threads) add_executable(benchmark bench.cpp) -target_link_libraries(benchmark spdlog::spdlog ${CMAKE_THREAD_LIBS_INIT}) +target_link_libraries(benchmark spdlog::spdlog Threads::Threads) add_executable(multisink multisink.cpp) -target_link_libraries(multisink spdlog::spdlog ${CMAKE_THREAD_LIBS_INIT}) +target_link_libraries(multisink spdlog::spdlog Threads::Threads) enable_testing() file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")