From f6e30f22f4334c36a42622e8fddd9cd92d0fe543 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 1 Jul 2020 20:22:21 +0000 Subject: CMake: fix path checks in chipdb build scripts. `if(NOT DEFINED)` is not appropriate since a variable that contains `-NOTFOUND` still counts as `DEFINED`. This can cause issues if configuration fails, writes `-NOTFOUND` to the cache, and is then restarted. --- ecp5/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ecp5') diff --git a/ecp5/CMakeLists.txt b/ecp5/CMakeLists.txt index 303208ed..5bb82f4c 100644 --- a/ecp5/CMakeLists.txt +++ b/ecp5/CMakeLists.txt @@ -25,7 +25,7 @@ else() "Trellis install prefix") message(STATUS "Trellis install prefix: ${TRELLIS_INSTALL_PREFIX}") - if(NOT DEFINED TRELLIS_LIBDIR) + if(NOT TRELLIS_LIBDIR) if(WIN32) set(pytrellis_lib pytrellis.pyd) else() @@ -42,7 +42,7 @@ else() endif() message(STATUS "Trellis library directory: ${TRELLIS_LIBDIR}") - if(NOT DEFINED TRELLIS_DATADIR) + if(NOT TRELLIS_DATADIR) set(TRELLIS_DATADIR ${TRELLIS_INSTALL_PREFIX}/share/${TRELLIS_PROGRAM_PREFIX}trellis) endif() message(STATUS "Trellis data directory: ${TRELLIS_DATADIR}") -- cgit v1.2.3