diff -r e0a76056a633 -r 2286a39140da hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Thu Nov 22 00:56:36 2012 +0400 +++ b/hedgewars/CMakeLists.txt Wed Nov 21 23:34:54 2012 +0100 @@ -108,9 +108,13 @@ find_program(fpc_executable fpc) ENDIF() -if(fpc_executable) - execute_process(COMMAND ${fpc_executable} -iV OUTPUT_VARIABLE fpc_output) -endif(fpc_executable) +message(STATUS "Check for working FPC compiler: ${fpc_executable}") +execute_process(COMMAND ${fpc_executable} -iV OUTPUT_VARIABLE fpc_output ERROR_VARIABLE fpc_error) +if(fpc_error) + message(STATUS "Check for working FPC compiler: ${fpc_executable} -- broken") +else(fpc_error) + message(STATUS "Check for working FPC compiler: ${fpc_executable} -- works") +endif(fpc_error) string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" fpc_version "${fpc_output}") if(fpc_version) @@ -129,17 +133,21 @@ message(FATAL_ERROR "No FreePascal compiler found!") endif() +message(STATUS "Checking whether linker supports noexecstack flag") set(noexecstack_flags "-k-z" "-knoexecstack") file(WRITE ${EXECUTABLE_OUTPUT_PATH}/checkstack.pas "begin end.") execute_process(COMMAND ${fpc_executable} ${noexecstack_flags} checkstack.pas WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} RESULT_VARIABLE testnoexecstack - OUTPUT_QUIET + OUTPUT_QUIET ERROR_QUIET ) if(${testnoexecstack}) set (noexecstack_flags "") + message(STATUS "Checking whether linker supports noexecstack flag -- no") +else(${testnoexecstack}) + message(STATUS "Checking whether linker supports noexecstack flag -- yes") endif(${testnoexecstack}) #DEPENDECIES AND EXECUTABLES SECTION @@ -182,14 +190,13 @@ set(pascal_flags "-k${PNG_LIBRARY}" ${pascal_flags}) endif() else() - message(STATUS "Screenshots will be in BMP format because libpng was not found") + message(WARNING "Screenshots will be in BMP format because libpng was not found") endif() else() message(STATUS "Screenshots will be in BMP format per user request") endif() - #this command is a workaround to some inlining issues present in older FreePascal versions and fixed in 2.6 if(fpc_version LESS "020600") #under some configurations CMAKE_BUILD_TOOL fails to pass on the jobserver, breaking parallel compilation @@ -224,7 +231,7 @@ set(pascal_flags "-k${FFMPEG_LIBAVCODEC}" "-k${FFMPEG_LIBAVFORMAT}" "-k${FFMPEG_LIBAVUTIL}" ${pascal_flags}) ENDIF() else() - message(STATUS "Could NOT find FFMPEG/LibAV, video recording will be disabled") + message(WARNING "Could NOT find FFMPEG/LibAV, video recording will be disabled") endif() else() message(STATUS "Video recording disabled by user")