Skip to content

Instantly share code, notes, and snippets.

@davidbirdsong
Created December 16, 2013 05:23
Show Gist options
  • Select an option

  • Save davidbirdsong/7982677 to your computer and use it in GitHub Desktop.

Select an option

Save davidbirdsong/7982677 to your computer and use it in GitHub Desktop.
cmake hack to make hekad work w/ local clones
diff --git a/cmake/externals.cmake b/cmake/externals.cmake
index 78c09f0..05e7a08 100644
--- a/cmake/externals.cmake
+++ b/cmake/externals.cmake
@@ -63,12 +63,19 @@ function(hg_clone url tag)
add_dependencies(GoPackages ${_name})
endfunction(hg_clone)
+function(local_clone ${_url})
+ string(REGEX REPLACE ".*/" "" _name ${url})
+ add_dependencies(GoPackages ${_name})
+endfunction(local_clone)
+
function(add_external_plugin vcs url tag)
string(REGEX REPLACE "https?://" "" _path ${url})
if ("${vcs}" STREQUAL "git")
git_clone(${url} ${tag})
elseif("${vcs}" STREQUAL "hg")
hg_clone(${url} ${tag})
+ elseif("${vcs}" STREQUAL "local_clone")
+ local_clone(${url})
else()
message(FATAL_ERROR "Unknown version control system ${vcs}")
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment