From 21d75fa4cd6eb57af08e07053fe55ccab78a0e2f Mon Sep 17 00:00:00 2001 From: Fatih YAZICI Date: Fri, 4 Oct 2019 22:46:18 +0300 Subject: [PATCH] Fix CMake 3.10 and below compatibility (#763) Add empty list of sources to add_library and add_executable. --- CMakeLists.txt | 2 +- test/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2236dd1..4052242 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ set(msvc-rt-mt-dll $) set(backport-msvc-runtime $) -add_library(yaml-cpp ${yaml-cpp-type}) +add_library(yaml-cpp ${yaml-cpp-type} "") add_library(yaml::yaml ALIAS yaml-cpp) set_property(TARGET yaml-cpp diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3301584..23fc0c5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,7 +20,7 @@ endif() file(GLOB test-new-api-sources ${test-new-api-pattern}) file(GLOB test-sources ${test-source-pattern}) -add_executable(yaml-cpp-tests) +add_executable(yaml-cpp-tests "") target_sources(yaml-cpp-tests PRIVATE ${test-new-api-sources}