forked from ChunelFeng/CGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[compile] Feat bazel (ChunelFeng#377)
* feat(bazel) * feat(bazel)
- Loading branch information
1 parent
2c42a2b
commit b1a663e
Showing
49 changed files
with
194 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# NOET: test all the examples at a time | ||
test_suite( | ||
name = "test_all_examples", | ||
tests = [":E01-AutoPilot",":E02-MockGUI",":E03-ThirdFlow",":E04-MapReduce"], | ||
) | ||
|
||
# test-1: E01-AutoPilot | ||
cc_test ( | ||
name = "E01-AutoPilot", | ||
srcs = ["E01-AutoPilot.cpp"], | ||
deps = ["//src:CGraph",], | ||
) | ||
|
||
# test-2: E02-MockGUI | ||
cc_test ( | ||
name = "E02-MockGUI", | ||
srcs = ["E02-MockGUI.cpp"], | ||
deps = ["//src:CGraph",], | ||
) | ||
|
||
# test-3: E03-ThirdFlow | ||
cc_test ( | ||
name = "E03-ThirdFlow", | ||
srcs = ["E03-ThirdFlow.cpp"], | ||
deps = ["//src:CGraph",], | ||
) | ||
|
||
# test-4: E04-MapReduce | ||
cc_test ( | ||
name = "E04-MapReduce", | ||
srcs = ["E04-MapReduce.cpp"], | ||
deps = ["//src:CGraph",], | ||
) | ||
|
||
# import the CGraph.h from src dir | ||
# cc_import( | ||
# name = "CGraph_h", | ||
# hdrs = ["src/CGraph.h"], | ||
# visibility = ["//visibility:public"], | ||
# ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
#include <cmath> | ||
#include <set> | ||
|
||
#include "CGraph.h" | ||
#include "src/CGraph.h" | ||
|
||
using namespace CGraph; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
load("@rules_cc//cc:defs.bzl", "cc_library") | ||
|
||
cc_library( | ||
name = "CGraph", | ||
srcs = glob(["**/*.cpp"]), | ||
hdrs = glob(["**/*.h", "**/*.inl"]), | ||
copts = [ | ||
"-D_CGRAPH_SILENCE", | ||
"-D_CGRAPH_SHOW_THREAD_METRICS_", | ||
"-D_ENABLE_LIKELY_", | ||
], | ||
linkstatic = 0, | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
CGRAPH_FUNCTIONAL_LIST = [ | ||
"test-functional-01", | ||
"test-functional-02", | ||
"test-functional-03", | ||
"test-functional-04", | ||
"test-functional-05", | ||
] | ||
|
||
[ | ||
cc_test( | ||
name = "%s" % fun_name, | ||
srcs = ["%s.cpp" % fun_name], | ||
|
||
deps = ["//src:CGraph", | ||
"//test/_Materials:test_materials",], | ||
) | ||
for fun_name in CGRAPH_FUNCTIONAL_LIST | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CGRAPH_PERFORMANCE_LIST = [ | ||
"test-performance-01", | ||
"test-performance-02", | ||
"test-performance-03", | ||
] | ||
|
||
[ | ||
cc_test( | ||
name = "%s" % perf_name, | ||
srcs = ["%s.cpp" % perf_name], | ||
deps = ["//src:CGraph", | ||
"//test/_Materials:test_materials",], | ||
) | ||
for perf_name in CGRAPH_PERFORMANCE_LIST | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cc_library( | ||
name = "test_materials", | ||
hdrs = glob(["**/*.h"]), | ||
linkstatic = 0, | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
cc_library( | ||
name = "Tutorial_header", | ||
hdrs = glob(["MyGAspect/**/*.h", | ||
"MyGCondition/**/*.h", | ||
"MyGDaemon/**/*.h", | ||
"MyGEvent/**/*.h", | ||
"MyGMutable/**/*.h", | ||
"MyGNode/**/*.h", | ||
"MyParams/**/*.h", | ||
"MyUtils/**/*.h",]), | ||
linkstatic = 0, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
CGRAPH_TUTORIAL_LIST = [ | ||
"T00-HelloCGraph", | ||
"T01-Simple", | ||
"T02-Cluster", | ||
"T03-Region", | ||
"T04-Complex", | ||
"T05-Param", | ||
"T06-Condition", | ||
"T07-MultiPipeline", | ||
"T08-Template", | ||
"T09-Aspect", | ||
"T10-AspectParam", | ||
"T11-Singleton", | ||
"T12-Function", | ||
"T13-Daemon", | ||
"T14-Hold", | ||
"T15-ElementParam", | ||
"T16-MessageSendRecv", | ||
"T17-MessagePubSub", | ||
"T18-Event", | ||
"T19-Cancel", | ||
"T20-YieldResume", | ||
"T21-MultiCondition", | ||
"T22-Timeout", | ||
"T23-Some", | ||
"T24-Fence", | ||
"T25-Coordinator", | ||
"T26-Mutable", | ||
] | ||
|
||
[ | ||
cc_test( | ||
name = "%s" % tutorial_name, | ||
srcs = ["%s.cpp" % tutorial_name], | ||
deps = [":Tutorial_header","//src:CGraph",], | ||
) | ||
for tutorial_name in CGRAPH_TUTORIAL_LIST | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.