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.
This commit is contained in:
Mats Kindahl 2020-03-30 13:50:52 +02:00 committed by Erik Nordström
parent 082a9ffedc
commit 38c9f17a0e

View File

@ -1,3 +1,5 @@
set(SOURCES)
if (${PG_VERSION_MAJOR} LESS "12") if (${PG_VERSION_MAJOR} LESS "12")
set(SOURCES set(SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/tableam.c ${CMAKE_CURRENT_SOURCE_DIR}/tableam.c
@ -7,8 +9,7 @@ if (${PG_VERSION_MAJOR} LESS "12")
endif () endif ()
if (${PG_VERSION_MAJOR} LESS "11") if (${PG_VERSION_MAJOR} LESS "11")
set(SOURCES list(APPEND SOURCES
${SOURCES}
${CMAKE_CURRENT_SOURCE_DIR}/fkeylist.c ${CMAKE_CURRENT_SOURCE_DIR}/fkeylist.c
) )
endif () endif ()