cmake_modules/FindFreepascal.cmake
changeset 8283 af97cdbb7713
parent 8195 37d47f09f981
child 8285 a1500ffdc343
equal deleted inserted replaced
8281:a1577759bf62 8283:af97cdbb7713
    17 else()
    17 else()
    18     message(FATAL_ERROR "Could NOT find Freepascal")
    18     message(FATAL_ERROR "Could NOT find Freepascal")
    19 endif()
    19 endif()
    20 
    20 
    21 # Check for noexecstack flag support
    21 # Check for noexecstack flag support
       
    22 message(STATUS "Checking whether linker needs explicit noexecstack")
    22 set(NOEXECSTACK_FLAGS "-k-z" "-knoexecstack")
    23 set(NOEXECSTACK_FLAGS "-k-z" "-knoexecstack")
    23 file(WRITE ${EXECUTABLE_OUTPUT_PATH}/checkstack.pas "begin end.")
    24 file(WRITE ${EXECUTABLE_OUTPUT_PATH}/checkstack.pas "begin end.")
    24 
    25 
    25 execute_process(COMMAND ${FPC_EXECUTABLE} ${NOEXECSTACK_FLAGS} checkstack.pas
    26 execute_process(COMMAND ${FPC_EXECUTABLE} ${NOEXECSTACK_FLAGS} checkstack.pas
    26     WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
    27     WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}