]> granicus.if.org Git - libevent/commitdiff
Make EVENT_STAGE_NAME non cached
authorAzat Khuzhin <a3at.mail@gmail.com>
Sun, 29 Jan 2017 17:19:06 +0000 (20:19 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Sun, 29 Jan 2017 17:35:57 +0000 (20:35 +0300)
It did not work before correctly anyway, since cmake do not reset cache
entries by default, so that reset to "beta" didn't work.

But I don't think that making this variable cached is useful, so let's
remove this.

CMakeLists.txt
README.md

index 2d713cf511ca658f16dde0c905b779a515a365a3..ae1b4e47e97a43681a93ba728626a04ed1e20a2c 100644 (file)
@@ -76,26 +76,25 @@ set(EVENT_PACKAGE_VERSION
 set(EVENT_NUMERIC_VERSION 0x02020001)
 
 # only a subset of names can be used, defaults to "beta"
-set(EVENT_STAGE_NAME ${EVENT_VERSION_STAGE}
-       CACHE STRING "set the stage name (beta|alpha|release)")
+set(EVENT_STAGE_NAME ${EVENT_VERSION_STAGE})
 
 # a list that defines what can set for EVENT_STAGE_VERSION
 set(EVENT__ALLOWED_STAGE_NAMES
-    rc
-    beta
-    alpha
-    alpha-dev
-    release)
-
-# attempt to find the EVENT__STAGE_VERSION in the allowed list
-# of accepted stage names, the return value is stord in
-# EVENT__STAGE_RET
-
-list(FIND EVENT__ALLOWED_STAGE_NAMES
-       ${EVENT_STAGE_NAME}
-       EVENT__STAGE_RET)
-
-if (EVENT__STAGE_RET EQUAL "-1")
+       rc
+       beta
+       alpha
+       alpha-dev
+       release
+       stable
+)
+list(
+       FIND EVENT__ALLOWED_STAGE_NAMES
+       "${EVENT_STAGE_NAME}"
+       EVENT__STAGE_RET
+)
+if (EVENT__STAGE_RET EQUAL -1)
+       message(WARNING
+               "stage ${EVENT_STAGE_NAME} is not allowed, reset to beta")
        set(EVENT_STAGE_NAME beta)
 endif()
 
index 5e3eb4df8fe06d9136033ca73ac9c6830afcabeb..150bfe0dded458a82c36636e0bbe3077d880f2e1 100644 (file)
--- a/README.md
+++ b/README.md
@@ -77,9 +77,6 @@ EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF
 # on the the cross compilation target to verify that it works. See cmake
 # documentation for try_run for more details
 EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF
-
-# set EVENT_STAGE_VERSION
-EVENT__STAGE_VERSION:STRING=beta
 ```
 
 __More variables can be found by running `cmake -LAH <sourcedir_path>`__