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 <QObject>
#include <functional>
namespace details
{

View File

@@ -174,9 +174,14 @@ function(is_file_executable file result_var)
if(file_cmd)
execute_process(COMMAND "${file_cmd}" "${file_full}"
RESULT_VARIABLE file_rv
OUTPUT_VARIABLE file_ov
ERROR_VARIABLE file_ev
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
# (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()
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()
message(STATUS "warning: No 'file' command, skipping execute_process...")
endif()