Commit 5d08bd17 authored by Daniel Chabrowski's avatar Daniel Chabrowski

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.
parent 646a140e
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment