summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-10-25 21:31:51 +0200
committerPetr Mrázek <peterix@gmail.com>2017-10-25 21:31:51 +0200
commit84e23e2e7ae6763c86943a4e5c37a14aca35cabb (patch)
tree1633f5e4f3836acc4911a737fb63628b201ff749
parentaafac3934b9887ced77c9f5b3d6be988af06dbf0 (diff)
downloadMultiMC-84e23e2e7ae6763c86943a4e5c37a14aca35cabb.tar
MultiMC-84e23e2e7ae6763c86943a4e5c37a14aca35cabb.tar.gz
MultiMC-84e23e2e7ae6763c86943a4e5c37a14aca35cabb.tar.lz
MultiMC-84e23e2e7ae6763c86943a4e5c37a14aca35cabb.tar.xz
MultiMC-84e23e2e7ae6763c86943a4e5c37a14aca35cabb.zip
NOISSUE fix build issues
-rw-r--r--api/logic/QObjectPtr.h1
-rw-r--r--cmake/GetPrerequisites.cmake12
2 files changed, 13 insertions, 0 deletions
diff --git a/api/logic/QObjectPtr.h b/api/logic/QObjectPtr.h
index 000d228d..fb3ab7d2 100644
--- a/api/logic/QObjectPtr.h
+++ b/api/logic/QObjectPtr.h
@@ -2,6 +2,7 @@
#include <memory>
#include <QObject>
+#include <functional>
namespace details
{
diff --git a/cmake/GetPrerequisites.cmake b/cmake/GetPrerequisites.cmake
index d782ced9..b3687f16 100644
--- a/cmake/GetPrerequisites.cmake
+++ b/cmake/GetPrerequisites.cmake
@@ -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()