build: Add CMake-based build system

Co-authored-by: Tim Ruffing <crypto@timruffing.de>
This commit is contained in:
Hennadii Stepanov
2023-03-08 13:33:16 +00:00
parent cbd2555934
commit 5468d70964
11 changed files with 601 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
function(check_string_option_value option)
get_property(expected_values CACHE ${option} PROPERTY STRINGS)
if(expected_values)
foreach(value IN LISTS expected_values)
if(value STREQUAL "${${option}}")
return()
endif()
endforeach()
message(FATAL_ERROR "${option} value is \"${${option}}\", but must be one of ${expected_values}.")
endif()
message(AUTHOR_WARNING "The STRINGS property must be set before invoking `check_string_option_value' function.")
endfunction()