All Projects → gangliao → cmake_cxx_go

gangliao / cmake_cxx_go

Licence: Apache-2.0 License
No description or website provided.

Programming Languages

go
31211 projects - #10 most used programming language
CMake
9771 projects
Cuda
1817 projects
c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to cmake cxx go

cmake-init
The missing CMake project initializer
Stars: ✭ 1,071 (+8138.46%)
Mutual labels:  static-library, shared-library
ezinject
Modular binary injection framework, successor of libhooker
Stars: ✭ 47 (+261.54%)
Mutual labels:  shared-library
jsrdbg
JavaScript Remote Debugger for SpiderMonkey.
Stars: ✭ 23 (+76.92%)
Mutual labels:  shared-library
ods-jenkins-shared-library
Shared Jenkins library which all ODS projects & components use - provisioning, SonarQube code scanning, Nexus publishing, OpenShift template based deployments and repository orchestration
Stars: ✭ 51 (+292.31%)
Mutual labels:  shared-library
not-enough-standards
A modern header-only C++ library that provides platform-independent utilities.
Stars: ✭ 197 (+1415.38%)
Mutual labels:  shared-library
httpserverapp
Sample application for C++ http server
Stars: ✭ 25 (+92.31%)
Mutual labels:  shared-library
Jenkins-Pipeline-Utils
Global Jenkins Pipeline Library with common utilities.
Stars: ✭ 36 (+176.92%)
Mutual labels:  shared-library
minilib
A c standard system library with a focus on size, headeronly, "singlefile", intended for static linking. 187 Bytes for "Hello World"(regular elf), compiled with the standard gcc toolchain.
Stars: ✭ 29 (+123.08%)
Mutual labels:  static-library
strf
Yet another C++ text formatting library.
Stars: ✭ 57 (+338.46%)
Mutual labels:  static-library
golang-cpp-basic-example
A simple example demonstrating how to call C++ from Go
Stars: ✭ 49 (+276.92%)
Mutual labels:  shared-library
libconfini
Yet another INI parser
Stars: ✭ 106 (+715.38%)
Mutual labels:  shared-library
shared-react-components-example
An example of a mono-repository of shared React components libraries!
Stars: ✭ 85 (+553.85%)
Mutual labels:  shared-library
resource-loader
Getting files out of a JAR or loading a shared library is difficult. We made it easy.
Stars: ✭ 15 (+15.38%)
Mutual labels:  shared-library
shared-library-webpack-plugin
Webpack plugin for library sharing at runtime between applications
Stars: ✭ 35 (+169.23%)
Mutual labels:  shared-library

cmake_cxx_go

We add some custom CMake functions to support golang including go get, go build, go install.

custom functions

  1. ExternalGoProject_Add
ExternalGoProject_Add(go_redis github.com/hoisie/redis)
  1. ADD_GO_EXECUTABLE
ADD_GO_EXECUTABLE(redis_lister    # executable name
                  redis_lister.go # `package main` source file
                  go_redis)       # everything else is a dependency
  1. ADD_GO_LIBRARY
add_go_library(adder STATIC)  # build library libaddr.a
add_executable(main main.cxx) # build binary main
add_dependencies(main adder)  # adder is a dependency of main
target_link_libraries(main ${CMAKE_CURRENT_BINARY_DIR}/libadder.a) # link libaddr.a into main

cmake build and install

mkdir build && cmake ..
make && make install

Test cases

  • redis: redis lister
  • recordio: go get external projects and build a library
  • static_and_shared: C++ calling from go static/dynamic library
  • cuda: go calling from CUDA kernel

Demo

Reference

  1. https://github.com/cpconduce/go_cmake
  2. https://github.com/draffensperger/go-interlang
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].