mirror of https://github.com/oxen-io/lokinet
check for std::optional as macos can be broke af sometimes
parent
5a24d2deef
commit
abc1f67430
@ -0,0 +1,18 @@
|
||||
# check for std::optional because macos is broke af sometimes
|
||||
|
||||
set(std_optional_code [[
|
||||
#include <optional>
|
||||
|
||||
int main() {
|
||||
std::optional<int> maybe;
|
||||
maybe = 1;
|
||||
return maybe.value() == 1;
|
||||
}
|
||||
]])
|
||||
|
||||
check_cxx_source_compiles("${std_optional_code}" was_compiled)
|
||||
if(was_compiled)
|
||||
message(STATUS "we have std::optional")
|
||||
else()
|
||||
message(FATAL_ERROR "we dont have std::optional your compiler is broke af")
|
||||
endif()
|
Loading…
Reference in New Issue