Skip to content

Instantly share code, notes, and snippets.

View njlr's full-sized avatar
🌏
F# ing

njlr njlr

🌏
F# ing
View GitHub Profile
cxx_binary(
name = 'demo',
header_namespace = 'demo',
headers = subdir_glob([
('demo/include', '**/*.hpp'),
]),
srcs = glob([
'demo/src/**/*.cpp',
]),
)
[cxx]
gtest_dep = //googletest:gtest
#include <iostream>
#include <mathutils/add.hpp>
int main() {
std::cout << "Hello, world. " << std::endl;
std::cout << "3 + 4 = " << add(3, 4) << std::endl;
return 0;
}
cxx_binary(
name = 'demo',
header_namespace = 'demo',
headers = subdir_glob([
('demo/include', '**/*.hpp'),
]),
srcs = glob([
'demo/src/**/*.cpp',
]),
deps = [
cxx_library(
name = 'mathutils',
header_namespace = 'mathutils',
exported_headers = subdir_glob([
('include', '**/*.hpp'),
]),
srcs = glob([
'src/**/*.cpp',
]),
visibility = [
#include <mathutils/add.hpp>
int add(int x, int y) {
return x + y;
}
#ifndef MATH_HPP
#define MATH_HPP
int add(int x, int y);
#endif
cxx_binary(
name = 'buck-cpp-example',
header_namespace = 'buck-cpp-example',
srcs = glob([
'buck-cpp-example/src/**/*.cpp',
]),
headers = subdir_glob([
('buck-cpp-example/include', '**/*.hpp'),
]),
)
#include <iostream>
int main() {
std::cout << "Hello, world. " << std::endl;
return 0;
}

Buckaroo contributor agreement

The Buckaroo Agreement (this "Agreement") applies to any Contribution you make to any Work.

This is a binding legal agreement on you and any organization you represent. If you are signing this Agreement on behalf of your employer or other organization, you represent and warrant that you have the authority to agree to this Agreement on behalf of the organization.

1. Definitions

"Contribution" means any original work, including any modification of or addition to an existing work, that you submit to Buckaroo in any manner for inclusion in any Work.