diff options
author | Yoichi Nakayama <yoichi.nakayama@gmail.com> | 2021-11-23 10:12:29 +0900 |
---|---|---|
committer | Yoichi Nakayama <yoichi.nakayama@gmail.com> | 2021-11-23 10:20:04 +0900 |
commit | 7bb206a76dca70b7db236315d348c6c9fc325cab (patch) | |
tree | e38bb2d225746de8343db08837840e84aad3ece0 /cmake/SanitizeBool.cmake | |
parent | 540b02f3b97baf2bc1d62210a23d522b5d73e5eb (diff) | |
parent | f9c4dc10d90732cfbe2271dd58b01dd8f4003d15 (diff) | |
download | libgit2-7bb206a76dca70b7db236315d348c6c9fc325cab.tar.gz |
Merge branch 'main' into better-compatiblity-for-at-time-notation
Conflicts:
src/revparse.c
Diffstat (limited to 'cmake/SanitizeBool.cmake')
-rw-r--r-- | cmake/SanitizeBool.cmake | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/cmake/SanitizeBool.cmake b/cmake/SanitizeBool.cmake index b5b99a690..586c17d05 100644 --- a/cmake/SanitizeBool.cmake +++ b/cmake/SanitizeBool.cmake @@ -1,20 +1,20 @@ -FUNCTION(SanitizeBool VAR) - STRING(TOLOWER "${${VAR}}" VALUE) - IF(VALUE STREQUAL "on") - SET(${VAR} "ON" PARENT_SCOPE) - ELSEIF(VALUE STREQUAL "yes") - SET(${VAR} "ON" PARENT_SCOPE) - ELSEIF(VALUE STREQUAL "true") - SET(${VAR} "ON" PARENT_SCOPE) - ELSEIF(VALUE STREQUAL "1") - SET(${VAR} "ON" PARENT_SCOPE) - ELSEIF(VALUE STREQUAL "off") - SET(${VAR} "OFF" PARENT_SCOPE) - ELSEIF(VALUE STREQUAL "no") - SET(${VAR} "OFF" PARENT_SCOPE) - ELSEIF(VALUE STREQUAL "false") - SET(${VAR} "OFF" PARENT_SCOPE) - ELSEIF(VALUE STREQUAL "0") - SET(${VAR} "OFF" PARENT_SCOPE) - ENDIF() -ENDFUNCTION() +function(SanitizeBool VAR) + string(TOLOWER "${${VAR}}" VALUE) + if(VALUE STREQUAL "on") + set(${VAR} "ON" PARENT_SCOPE) + elseif(VALUE STREQUAL "yes") + set(${VAR} "ON" PARENT_SCOPE) + elseif(VALUE STREQUAL "true") + set(${VAR} "ON" PARENT_SCOPE) + elseif(VALUE STREQUAL "1") + set(${VAR} "ON" PARENT_SCOPE) + elseif(VALUE STREQUAL "off") + set(${VAR} "OFF" PARENT_SCOPE) + elseif(VALUE STREQUAL "no") + set(${VAR} "OFF" PARENT_SCOPE) + elseif(VALUE STREQUAL "false") + set(${VAR} "OFF" PARENT_SCOPE) + elseif(VALUE STREQUAL "0") + set(${VAR} "OFF" PARENT_SCOPE) + endif() +endfunction() |