Skip to content

Instantly share code, notes, and snippets.

@petrhosek
Created December 8, 2018 01:50
Show Gist options
  • Save petrhosek/aa5fd4210804bd94f95dc97b8d5b238e to your computer and use it in GitHub Desktop.
Save petrhosek/aa5fd4210804bd94f95dc97b8d5b238e to your computer and use it in GitHub Desktop.
#include "foo/foo.h"
#include "foo/foo_internal.h"
#include "bar/bar.h"
void bar() {
foo();
foo_internal();
}
module "//bar:bar" {
export *
header "../../bar/bar.h"
use "//foo:baz"
}
extern module "//foo:foo" "obj/foo/quux.cppmap"
#ifndef BAR_H_
#define BAR_H_
void bar();
#endif
#include "foo/foo.h"
#include "foo/foo_internal.h"
void foo_internal() {
}
void foo() {
}
module "//foo:foo" {
export *
header "../../foo/foo.h"
private header "../../foo/foo_internal.h"
}
#ifndef FOO_H_
#define FOO_H_
void foo();
#endif
#ifndef FOO_INTERNAL_H_
#define FOO_INTERNAL_H_
void foo_internal();
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment