mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
22 lines
428 B
CMake
22 lines
428 B
CMake
|
include(CheckCXXSourceCompiles)
|
||
|
|
||
|
check_cxx_source_compiles("
|
||
|
#include <signal.h>
|
||
|
#include <stdlib.h>
|
||
|
int main() {
|
||
|
stack_t ss;
|
||
|
ss.ss_sp = calloc(SIGSTKSZ, 1);
|
||
|
ss.ss_size = SIGSTKSZ;
|
||
|
ss.ss_flags = 0;
|
||
|
sigaltstack(&ss, nullptr);
|
||
|
return 0;
|
||
|
}"
|
||
|
SIGALTSTACK
|
||
|
)
|
||
|
|
||
|
if (SIGALTSTACK_FOUND)
|
||
|
add_compile_options(
|
||
|
-DWITH_SIGALTSTACK
|
||
|
)
|
||
|
endif (SIGALTSTACK_FOUND)
|