From 5fcedeb506b7d47dd7bab35797f2c3f23db6fe10 Mon Sep 17 00:00:00 2001 From: Jürgen Hötzel Date: Thu, 9 Apr 2020 02:08:57 +0200 Subject: Handle unset environment in CMake condition gracefully (#19) This fixes a CMake Error when if the environment variable is not set. --- prom/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prom/CMakeLists.txt b/prom/CMakeLists.txt index aaa8877..3e610d4 100644 --- a/prom/CMakeLists.txt +++ b/prom/CMakeLists.txt @@ -121,7 +121,7 @@ target_sources( target_link_libraries(prom PUBLIC Threads::Threads) -if ($ENV{TEST} EQUAL "1") +if ($ENV{TEST}) include(test/CMakeLists.txt) endif() @@ -137,4 +137,4 @@ set(CPACK_PACKAGE_HOMEPAGE_URL https://github.internal.digitalocean.com/timeseri include(CPack) install(TARGETS prom ARCHIVE) -install(DIRECTORY include/ DESTINATION /usr/include/) \ No newline at end of file +install(DIRECTORY include/ DESTINATION /usr/include/) -- cgit v1.2.3