]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Check if input variables are defined in cmake scripts.
authorNathan Moinvaziri <nathan@nathanm.com>
Sat, 19 Sep 2020 01:41:45 +0000 (18:41 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 23 Sep 2020 20:34:55 +0000 (22:34 +0200)
cmake/run-and-compare.cmake
cmake/run-and-redirect.cmake
cmake/test-compress.cmake

index 2a6b14f072cbac86621ae31a33ca511d7ce0dea1..8a4c750d1578c764711fa6e0087440a4655d797e 100644 (file)
@@ -1,4 +1,4 @@
-if(NOT OUTPUT OR NOT COMPARE OR NOT COMMAND)
+if(NOT DEFINED OUTPUT OR NOT DEFINED COMPARE OR NOT DEFINED COMMAND)
     message(FATAL_ERROR "Run and compare arguments missing")
 endif()
 
index 50eee981da0832f0be2462659838ab5e3d0dd84a..e55fc3a43b0774f6532e9fa261f61fd40f5aa442 100644 (file)
@@ -1,5 +1,5 @@
 # If no output is specified, discard output
-if(NOT OUTPUT)
+if(NOT DEFINED OUTPUT)
     if(WIN32)
         set(OUTPUT NUL)
     else()
index d2a7f33e56aa822e038b56cbc0443d497cc6c241..76d45b130da5639206e854428b03e84680f9390d 100644 (file)
@@ -3,21 +3,21 @@ if(TARGET)
     set(DECOMPRESS_TARGET ${TARGET})
 endif()
 
-if(NOT INPUT OR NOT COMPRESS_TARGET OR NOT DECOMPRESS_TARGET)
+if(NOT DEFINED INPUT OR NOT DEFINED COMPRESS_TARGET OR NOT DEFINED DECOMPRESS_TARGET)
     message(FATAL_ERROR "Compress test arguments missing")
 endif()
 
 # Set default values
-if(NOT COMPRESS_ARGS)
+if(NOT DEFINED COMPRESS_ARGS)
     set(COMPRESS_ARGS -c -k)
 endif()
-if(NOT DECOMPRESS_ARGS)
+if(NOT DEFINED DECOMPRESS_ARGS)
     set(DECOMPRESS_ARGS -d -c)
 endif()
-if(NOT GZIP_VERIFY)
+if(NOT DEFINED GZIP_VERIFY)
     set(GZIP_VERIFY ON)
 endif()
-if(NOT SUCCESS_EXIT)
+if(NOT DEFINED SUCCESS_EXIT)
     set(SUCCESS_EXIT 0)
 endif()