NOISSUE fix build issues

This commit is contained in:
Petr Mrázek
2017-10-25 21:31:51 +02:00
parent aafac3934b
commit 84e23e2e7a
2 changed files with 13 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
#include <memory> #include <memory>
#include <QObject> #include <QObject>
#include <functional>
namespace details namespace details
{ {

View File

@@ -174,9 +174,14 @@ function(is_file_executable file result_var)
if(file_cmd) if(file_cmd)
execute_process(COMMAND "${file_cmd}" "${file_full}" execute_process(COMMAND "${file_cmd}" "${file_full}"
RESULT_VARIABLE file_rv
OUTPUT_VARIABLE file_ov OUTPUT_VARIABLE file_ov
ERROR_VARIABLE file_ev
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
if(NOT file_rv STREQUAL "0")
message(FATAL_ERROR "${file_cmd} failed: ${file_rv}\n${file_ev}")
endif()
# Replace the name of the file in the output with a placeholder token # Replace the name of the file in the output with a placeholder token
# (the string " _file_full_ ") so that just in case the path name of # (the string " _file_full_ ") so that just in case the path name of
@@ -205,6 +210,13 @@ function(is_file_executable file result_var)
return() return()
endif() endif()
# "file" version 5.22 does not print "(used shared libraries)"
# but uses "interpreter"
if("${file_ov}" MATCHES "shared object.*interpreter")
set(${result_var} 1 PARENT_SCOPE)
return()
endif()
else() else()
message(STATUS "warning: No 'file' command, skipping execute_process...") message(STATUS "warning: No 'file' command, skipping execute_process...")
endif() endif()