cmake HAVE_MPROTECT examples

crossuo/crossuo deps/sdl-2.0.10-c1be3add38/CMakeLists.txt :746

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main() { }" HAVE_MPROTECT)

AtomicGameEngine/AtomicGameEngine Source/ThirdParty/SDL/CMakeLists.txt :541

check_include_file (sys/mman.h HAVE_MPROTECT)

skylersaleh/SkyEmu src/SDL2/CMakeLists.txt :878

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main(void) { return 0; }" HAVE_MPROTECT)

rheit/zdoom src/CMakeLists.txt :399

CHECK_FUNCTION_EXISTS(mprotect HAVE_MPROTECT)

nvMcJohn/apitest thirdparty/SDL2-2.0.1/CMakeLists.txt :500

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main() { }" HAVE_MPROTECT)

urho3d/urho3d Source/ThirdParty/SDL/CMakeLists.txt :577

check_include_file (sys/mman.h HAVE_MPROTECT)

u3d-community/U3D Source/ThirdParty/SDL/CMakeLists.txt :889

check_include_file (sys/mman.h HAVE_MPROTECT)

openc2e/openc2e externals/SDL2/CMakeLists.txt :1022

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main(void) { return 0; }" HAVE_MPROTECT)

organicmaps/organicmaps 3party/harfbuzz/CMakeLists.txt :32

target_compile_definitions(${PROJECT_NAME}
  PRIVATE
    HAVE_FREETYPE=1
    # TODO: Enable later if necessary, and sync with xcode/harfbuzz project.
    #HAVE_ICU
    #$<$<BOOL:${APPLE}>:HAVE_CORETEXT>
    HAVE_ATEXIT
    HAVE_GETPAGESIZE
    HAVE_MPROTECT
    HAVE_SYSCONF
)

JulNadeauCA/libagar CMakeChecks.cmake :1888

check_c_source_compiles("
#include <sys/mman.h>

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

int
main(int argc, char *argv[])
{
	void *p;
	int psz;
	char *buffer;

	psz = sysconf(_SC_PAGE_SIZE);
	if (psz == -1) {
		return (1);
	}

	posix_memalign(&buffer, psz, psz*4);
	if (buffer == NULL)
		return (1);

	mprotect(buffer + psz*2, psz, PROT_READ);
	return (0);
}
" HAVE_MPROTECT)

boundary/wireshark ConfigureChecks.cmake :82

check_function_exists("mprotect"         HAVE_MPROTECT)

glKarin/com.n0n3m4.diii4a Q3E/src/main/jni/deplibs/SDL2/CMakeLists.txt :1092

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main(void) { return 0; }" HAVE_MPROTECT)

rbfx/rbfx Source/ThirdParty/SDL/CMakeLists.txt :980

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main(void) { return 0; }" HAVE_MPROTECT)

vengi-voxel/vengi contrib/libs/sdl2/CMakeLists.txt :1083

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main(void) { return 0; }" HAVE_MPROTECT)

google/filament third_party/libsdl2/CMakeLists.txt :672

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main() { }" HAVE_MPROTECT)

godlikepanos/anki-3d-engine ThirdParty/Sdl2/CMakeLists.txt :883

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main(void) { return 0; }" HAVE_MPROTECT)

klaussilveira/qengine vendor/SDL2-2.0.22/CMakeLists.txt :883

check_c_source_compiles("#include <sys/types.h>
                             #include <sys/mman.h>
                             int main(void) { return 0; }" HAVE_MPROTECT)