You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2017/01/06 15:20:06 UTC

qpid-interop-test git commit: QPIDIT-71: cmake fails to detect program mono version

Repository: qpid-interop-test
Updated Branches:
  refs/heads/master 99af3b269 -> 8b71071f8


QPIDIT-71: cmake fails to detect program mono version

Add checks for blank output from 'mono --version' command.
Add similar checks for undefined AMQPNETLITE_LIB_DIR variable.


Project: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/commit/8b71071f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/tree/8b71071f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/diff/8b71071f

Branch: refs/heads/master
Commit: 8b71071f8325f97a61377d5af059d7626902e79c
Parents: 99af3b2
Author: Chuck Rolke <cr...@redhat.com>
Authored: Fri Jan 6 10:17:58 2017 -0500
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Fri Jan 6 10:17:58 2017 -0500

----------------------------------------------------------------------
 shims/amqpnetlite/src/CMakeLists.txt | 32 ++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/8b71071f/shims/amqpnetlite/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/shims/amqpnetlite/src/CMakeLists.txt b/shims/amqpnetlite/src/CMakeLists.txt
index 8b52d98..a4a0d65 100644
--- a/shims/amqpnetlite/src/CMakeLists.txt
+++ b/shims/amqpnetlite/src/CMakeLists.txt
@@ -40,22 +40,32 @@ if (PROG_MONO-NOTFOUND)
 else ()
   # mono found. Check version
   execute_process(COMMAND mono --version OUTPUT_VARIABLE ov)
-  string(REPLACE " " ";" ov_list ${ov})
-  list(GET ov_list 4 mono_ver)
-  if (mono_ver VERSION_LESS "4.2.4")
-    message(STATUS "Mono version ${mono_ver} detected. AMQP.Net Lite requires mono minimum version 4.2.4.")
+  if("${ov}" STREQUAL "")
+    message(STATUS "Mono appears to be installed but the version is not detected. AMQP.Net Lite requires mono minimum version 4.2.4.")
     set(lite_default OFF)
   else ()
-    # check for DLL source directory
-    if (NOT EXISTS ${AMQPNETLITE_LIB_DIR})
-      message(STATUS "AMQP.Net Lite shim requires Amqp.Net.dll to be in folder located with AMQPNETLITE_LIB_DIR environment variable")
-      message(STATUS "AMQP.Net Lite library directory '${AMQPNETLITE_LIB_DIR}' does not exist.")
+    string(REPLACE " " ";" ov_list ${ov})
+    list(GET ov_list 4 mono_ver)
+    if (mono_ver VERSION_LESS "4.2.4")
+      message(STATUS "Mono version ${mono_ver} detected. AMQP.Net Lite requires mono minimum version 4.2.4.")
       set(lite_default OFF)
     else ()
-      if (NOT EXISTS ${AMQPNETLITE_LIB_DIR}/Amqp.Net.dll)
-        message(STATUS "AMQP.Net Lite shim requires Amqp.Net.dll to be in folder located with AMQPNETLITE_LIB_DIR environment variable")
-        message(STATUS "AMQP.Net Lite DLL does not exist in library directory '${AMQPNETLITE_LIB_DIR}'")
+      # check for DLL source directory
+      if ("${AMQPNETLITE_LIB_DIR}" STREQUAL "")
+        message(STATUS "AMQP.Net Lite shim requires Amqp.Net.dll to be in folder located with AMQPNETLITE_LIB_DIR environment variable and AMQPNETLITE_LIB_DIR is not defined.")
         set(lite_default OFF)
+      else ()
+        if (NOT EXISTS ${AMQPNETLITE_LIB_DIR})
+          message(STATUS "AMQP.Net Lite shim requires Amqp.Net.dll to be in folder located with AMQPNETLITE_LIB_DIR environment variable")
+          message(STATUS "AMQP.Net Lite library directory '${AMQPNETLITE_LIB_DIR}' does not exist.")
+          set(lite_default OFF)
+        else ()
+          if (NOT EXISTS ${AMQPNETLITE_LIB_DIR}/Amqp.Net.dll)
+            message(STATUS "AMQP.Net Lite shim requires Amqp.Net.dll to be in folder located with AMQPNETLITE_LIB_DIR environment variable")
+            message(STATUS "AMQP.Net Lite DLL does not exist in library directory '${AMQPNETLITE_LIB_DIR}'")
+            set(lite_default OFF)
+          endif ()
+        endif ()
       endif ()
     endif ()
   endif ()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org