Fix CMake condition

In some cases _temp variable will not be set due to pg_config not
returning any output for a specific flag. This results in an
error when doing comparison using STREQUAL and build failure.
Wrapping variable in double quotes fixes the problem.
This commit is contained in:
niksa 2019-11-20 11:13:58 +01:00 committed by Niksa Jakovljevic
parent 2f7d69f93b
commit 1e5d0d4424

View File

@ -22,7 +22,7 @@ function(GET_PG_CONFIG var)
# It will then also show as, e.g., "PG_LDFLAGS-NOTFOUND" in any
# string interpolation, making it obvious that it is an undefined
# CMake variable.
if(${_temp} STREQUAL "not recorded")
if("${_temp}" STREQUAL "not recorded")
set(_temp ${var}-NOTFOUND)
endif()