You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/10/23 16:36:35 UTC

[33/50] [abbrv] qpid-proton git commit: NO-JIRA: Add missing CMake dependencies for Go examples, was causing build failures.

NO-JIRA: Add missing CMake dependencies for Go examples, was causing build failures.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/9106cb0a
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/9106cb0a
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/9106cb0a

Branch: refs/heads/go1
Commit: 9106cb0aeed37fc5e59775e3e9efe4eec24e44ea
Parents: dc5cbac
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Oct 19 15:40:37 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Oct 19 15:40:37 2015 -0400

----------------------------------------------------------------------
 examples/go/CMakeLists.txt          |  1 +
 proton-c/bindings/go/CMakeLists.txt | 11 +++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9106cb0a/examples/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/go/CMakeLists.txt b/examples/go/CMakeLists.txt
index 2a36ec8..bcfff1a 100644
--- a/examples/go/CMakeLists.txt
+++ b/examples/go/CMakeLists.txt
@@ -25,6 +25,7 @@ if(BUILD_GO)
   foreach(example ${examples})
     set(source ${CMAKE_CURRENT_SOURCE_DIR}/${example}.go)
     set(target ${CMAKE_CURRENT_BINARY_DIR}/${example})
+    message("FIXME ${source} ${GO_TARGETS}")
     add_custom_command(
       OUTPUT ${target}
       COMMAND ${GO_BUILD} ${GO_EXAMPLE_FLAGS} -o ${target} ${source}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9106cb0a/proton-c/bindings/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/CMakeLists.txt b/proton-c/bindings/go/CMakeLists.txt
index e791555..51c2d86 100644
--- a/proton-c/bindings/go/CMakeLists.txt
+++ b/proton-c/bindings/go/CMakeLists.txt
@@ -49,7 +49,8 @@ set(GO_INSTALL ${GO} install ${GO_BUILD_FLAGS} CACHE INTERNAL "Run go install")
 set(GO_TEST ${GO} test ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} ${GO_TEST_FLAGS} CACHE INTERNAL "Run go test")
 
 # Go build depends on the C headers
-file(GLOB headers ${CMAKE_SOURCE_DIR}/proton_c/include/proton/*.h)
+file(GLOB cheaders ${CMAKE_SOURCE_DIR}/proton_c/include/proton/*.h)
+set(cdepends ${headers} qpid-proton)
 
 # Go tools insist on standard Go layout which puts compiled code in the source tree :(
 # Build output is all under git-ignored pkg or bin subdirectories, they are removed by make clean.
@@ -74,7 +75,7 @@ foreach (pkg amqp proton electron)
   set(sources "${GoFiles}${CgoFiles}")
 
   # Build the package library
-  add_custom_command(OUTPUT ${lib} COMMAND ${GO_INSTALL} ${package} DEPENDS ${sources} ${headers})
+  add_custom_command(OUTPUT ${lib} COMMAND ${GO_INSTALL} ${package} DEPENDS ${sources} ${cdepends})
   set(target go-package-${pkg})
   add_custom_target(${target} ALL DEPENDS ${lib})
 
@@ -86,10 +87,12 @@ foreach (pkg amqp proton electron)
   add_custom_target(go-package-test-${pkg} ALL DEPENDS ${test_exe})
   add_test(NAME go_test_${pkg} COMMAND ${test_exe} WORKING_DIRECTORY ${dir})
 
-  list(APPEND GO_TARGETS ${target})
-
+  list(APPEND targets ${target})
 endforeach()
 
+# Make available to examples/go/CMakeLists
+set(GO_TARGETS ${targets} CACHE INTERNAL "Go package library targets")
+
 # Clean up go output directories.
 list(APPEND ADDITIONAL_MAKE_CLEAN_FILES
   ${CMAKE_CURRENT_SOURCE_DIR}/pkg


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