mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 04:41:16 +00:00
Improve bazel build for Windows. (#1100)
Windows builds need some defines being set to use the static linking. Also add bazel builds and test to Github-CI.
This commit is contained in:

committed by
GitHub

parent
13626af92a
commit
420c982310
@@ -1,3 +1,9 @@
|
||||
yaml_cpp_defines = select({
|
||||
# On Windows, ensure static linking is used.
|
||||
"@platforms//os:windows": ["YAML_CPP_STATIC_DEFINE", "YAML_CPP_NO_CONTRIB"],
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
cc_library(
|
||||
name = "yaml-cpp_internal",
|
||||
visibility = ["//:__subpackages__"],
|
||||
@@ -11,4 +17,5 @@ cc_library(
|
||||
includes = ["include"],
|
||||
hdrs = glob(["include/**/*.h"]),
|
||||
srcs = glob(["src/**/*.cpp", "src/**/*.h"]),
|
||||
defines = yaml_cpp_defines,
|
||||
)
|
||||
|
Reference in New Issue
Block a user