From 38c9f17a0e1864d2be0ff54ea42d08f1c126078e Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Mon, 30 Mar 2020 13:50:52 +0200 Subject: [PATCH] Fix error in compat/CMakeList.txt The `CMakeLists.txt` in `src/compat` was conditionally reusing the variable `SOURCES` inherited from above, which contained relative paths not related to this directory. This caused `target_sources` to generate a warning. This commit fixes this by setting `SOURCES` to be empty first in the file. --- src/compat/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compat/CMakeLists.txt b/src/compat/CMakeLists.txt index 0e903e5db..0d8dde830 100644 --- a/src/compat/CMakeLists.txt +++ b/src/compat/CMakeLists.txt @@ -1,3 +1,5 @@ +set(SOURCES) + if (${PG_VERSION_MAJOR} LESS "12") set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/tableam.c @@ -7,8 +9,7 @@ if (${PG_VERSION_MAJOR} LESS "12") endif () if (${PG_VERSION_MAJOR} LESS "11") - set(SOURCES - ${SOURCES} + list(APPEND SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/fkeylist.c ) endif ()