More cleanups for Windows.
This commit is contained in:
parent
8b11dfe167
commit
af7991e062
26
BUILD.bazel
26
BUILD.bazel
@ -48,9 +48,9 @@ cc_library(
|
|||||||
"OGLCompilersDLL/InitializeDll.cpp",
|
"OGLCompilersDLL/InitializeDll.cpp",
|
||||||
] + select({
|
] + select({
|
||||||
"@bazel_tools//src/conditions:windows":
|
"@bazel_tools//src/conditions:windows":
|
||||||
["glslang/OSDependent/Windows/ossource.cpp"],
|
["glslang/OSDependent/Windows/ossource.cpp"],
|
||||||
"//conditions:default":
|
"//conditions:default":
|
||||||
["glslang/OSDependent/Unix/ossource.cpp"],
|
["glslang/OSDependent/Unix/ossource.cpp"],
|
||||||
}),
|
}),
|
||||||
hdrs = glob([
|
hdrs = glob([
|
||||||
"glslang/Include/*.h",
|
"glslang/Include/*.h",
|
||||||
@ -188,11 +188,6 @@ filegroup(
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
|
||||||
name = "test_dir",
|
|
||||||
srcs = ["Test"],
|
|
||||||
)
|
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "glslang_test_lib",
|
name = "glslang_test_lib",
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
@ -207,9 +202,15 @@ cc_library(
|
|||||||
],
|
],
|
||||||
copts = COMMON_COPTS,
|
copts = COMMON_COPTS,
|
||||||
data = [":test_files"],
|
data = [":test_files"],
|
||||||
defines = [
|
defines = select({
|
||||||
'GLSLANG_TEST_DIRECTORY=\\"\\"',
|
# Unfortunately we can't use $(location) in cc_library at the moment.
|
||||||
],
|
# See https://github.com/bazelbuild/bazel/issues/1023
|
||||||
|
# So we'll specify the path manually.
|
||||||
|
"@bazel_tools//src/conditions:windows":
|
||||||
|
["GLSLANG_TEST_DIRECTORY='\"../../../../../Test\"'"],
|
||||||
|
"//conditions:default":
|
||||||
|
["GLSLANG_TEST_DIRECTORY='\"Test\"'"],
|
||||||
|
}),
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
deps = [
|
deps = [
|
||||||
":SPIRV",
|
":SPIRV",
|
||||||
@ -232,13 +233,8 @@ GLSLANG_TESTS = glob(
|
|||||||
[cc_test(
|
[cc_test(
|
||||||
name = test_file.replace("gtests/", "").replace(".FromFile.cpp", "") + "_test",
|
name = test_file.replace("gtests/", "").replace(".FromFile.cpp", "") + "_test",
|
||||||
srcs = [test_file],
|
srcs = [test_file],
|
||||||
args = [
|
|
||||||
"--test-root",
|
|
||||||
"$(location :test_dir)",
|
|
||||||
],
|
|
||||||
copts = COMMON_COPTS,
|
copts = COMMON_COPTS,
|
||||||
data = [
|
data = [
|
||||||
":test_dir",
|
|
||||||
":test_files",
|
":test_files",
|
||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user