mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-14 04:32:14 +00:00
NOISSUE fix build issues
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <QObject>
|
||||
#include <functional>
|
||||
|
||||
namespace details
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user