mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Our custom CMake module currently live in "cmake/Modules". As the "cmake/" directory doesn't contain anything except the "Modules" directory, it doesn't really make sense to have the additional intermediate directory. So let's instead move the modules one level up into the "cmake/" top level directory.
21 lines
578 B
CMake
21 lines
578 B
CMake
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()
|