2020-03-02 20:47:43 +00:00
|
|
|
# Copyright 2020 The Tint Authors.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2020-03-18 14:08:48 +00:00
|
|
|
function(tint_spvtools_compile_options TARGET)
|
|
|
|
# We'll use the optimizer for its nice SPIR-V in-memory representation
|
|
|
|
target_link_libraries(${TARGET} SPIRV-Tools-opt SPIRV-Tools)
|
|
|
|
|
|
|
|
# We'll be cheating: using internal interfaces to the SPIRV-Tools
|
|
|
|
# optimizer.
|
|
|
|
target_include_directories(${TARGET} PRIVATE
|
|
|
|
${spirv-tools_SOURCE_DIR}
|
|
|
|
${spirv-tools_BINARY_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
if (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
|
|
|
|
# The SPIRV-Tools code is conditioned against C++ and an older version of Clang.
|
|
|
|
# Suppress warnings triggered in our current compilation environment.
|
|
|
|
# TODO(dneto): Fix the issues upstream.
|
|
|
|
target_compile_options(${TARGET} PRIVATE
|
|
|
|
-Wno-newline-eof
|
|
|
|
-Wno-sign-conversion
|
|
|
|
-Wno-old-style-cast
|
|
|
|
-Wno-weak-vtables
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endfunction()
|
|
|
|
|
2020-03-02 20:47:43 +00:00
|
|
|
set(TINT_LIB_SRCS
|
2020-06-11 19:35:20 +00:00
|
|
|
../include/tint/tint.h
|
2020-10-29 13:36:32 +00:00
|
|
|
ast/access_control.cc
|
|
|
|
ast/access_control.h
|
2020-11-19 18:55:01 +00:00
|
|
|
ast/access_decoration.cc
|
|
|
|
ast/access_decoration.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/array_accessor_expression.cc
|
|
|
|
ast/array_accessor_expression.h
|
2020-10-08 19:34:25 +00:00
|
|
|
ast/array_decoration.cc
|
|
|
|
ast/array_decoration.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/assignment_statement.cc
|
|
|
|
ast/assignment_statement.h
|
2020-04-07 19:27:41 +00:00
|
|
|
ast/binary_expression.cc
|
|
|
|
ast/binary_expression.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/binding_decoration.cc
|
|
|
|
ast/binding_decoration.h
|
2020-09-22 22:07:13 +00:00
|
|
|
ast/bitcast_expression.cc
|
|
|
|
ast/bitcast_expression.h
|
2020-07-27 15:25:00 +00:00
|
|
|
ast/block_statement.cc
|
|
|
|
ast/block_statement.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/bool_literal.h
|
|
|
|
ast/bool_literal.cc
|
|
|
|
ast/break_statement.cc
|
|
|
|
ast/break_statement.h
|
2020-11-12 19:49:10 +00:00
|
|
|
ast/builder.cc
|
|
|
|
ast/builder.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/builtin.cc
|
|
|
|
ast/builtin.h
|
|
|
|
ast/builtin_decoration.cc
|
|
|
|
ast/builtin_decoration.h
|
|
|
|
ast/call_expression.cc
|
|
|
|
ast/call_expression.h
|
2020-07-21 13:42:05 +00:00
|
|
|
ast/call_statement.cc
|
|
|
|
ast/call_statement.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/case_statement.cc
|
|
|
|
ast/case_statement.h
|
2020-12-01 18:04:17 +00:00
|
|
|
ast/clone_context.cc
|
|
|
|
ast/clone_context.h
|
2020-09-29 18:07:50 +00:00
|
|
|
ast/constant_id_decoration.cc
|
|
|
|
ast/constant_id_decoration.h
|
2020-03-30 22:46:06 +00:00
|
|
|
ast/constructor_expression.cc
|
|
|
|
ast/constructor_expression.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/continue_statement.cc
|
|
|
|
ast/continue_statement.h
|
|
|
|
ast/decorated_variable.cc
|
|
|
|
ast/decorated_variable.h
|
2020-11-03 21:40:20 +00:00
|
|
|
ast/decoration.cc
|
|
|
|
ast/decoration.h
|
2020-07-25 03:34:33 +00:00
|
|
|
ast/discard_statement.cc
|
|
|
|
ast/discard_statement.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/else_statement.cc
|
|
|
|
ast/else_statement.h
|
|
|
|
ast/expression.cc
|
|
|
|
ast/expression.h
|
|
|
|
ast/fallthrough_statement.cc
|
|
|
|
ast/fallthrough_statement.h
|
|
|
|
ast/float_literal.cc
|
|
|
|
ast/float_literal.h
|
|
|
|
ast/function.cc
|
|
|
|
ast/function.h
|
2020-09-20 19:18:58 +00:00
|
|
|
ast/function_decoration.cc
|
|
|
|
ast/function_decoration.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/identifier_expression.cc
|
|
|
|
ast/identifier_expression.h
|
|
|
|
ast/if_statement.cc
|
|
|
|
ast/if_statement.h
|
2020-06-02 20:11:54 +00:00
|
|
|
ast/int_literal.cc
|
|
|
|
ast/int_literal.h
|
2020-06-04 17:05:35 +00:00
|
|
|
ast/intrinsic.cc
|
|
|
|
ast/intrinsic.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/literal.h
|
|
|
|
ast/literal.cc
|
|
|
|
ast/location_decoration.cc
|
|
|
|
ast/location_decoration.h
|
|
|
|
ast/loop_statement.cc
|
|
|
|
ast/loop_statement.h
|
|
|
|
ast/member_accessor_expression.cc
|
|
|
|
ast/member_accessor_expression.h
|
|
|
|
ast/module.cc
|
|
|
|
ast/module.h
|
|
|
|
ast/node.cc
|
|
|
|
ast/node.h
|
2020-05-05 14:21:19 +00:00
|
|
|
ast/null_literal.cc
|
|
|
|
ast/null_literal.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/pipeline_stage.cc
|
|
|
|
ast/pipeline_stage.h
|
|
|
|
ast/return_statement.cc
|
|
|
|
ast/return_statement.h
|
2020-03-30 22:46:06 +00:00
|
|
|
ast/scalar_constructor_expression.cc
|
|
|
|
ast/scalar_constructor_expression.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/set_decoration.cc
|
|
|
|
ast/set_decoration.h
|
2020-06-02 20:11:44 +00:00
|
|
|
ast/sint_literal.cc
|
|
|
|
ast/sint_literal.h
|
2020-09-21 17:42:10 +00:00
|
|
|
ast/stage_decoration.cc
|
|
|
|
ast/stage_decoration.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/statement.cc
|
|
|
|
ast/statement.h
|
|
|
|
ast/storage_class.cc
|
|
|
|
ast/storage_class.h
|
2020-10-08 19:34:25 +00:00
|
|
|
ast/stride_decoration.cc
|
|
|
|
ast/stride_decoration.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/struct.cc
|
|
|
|
ast/struct.h
|
2020-11-03 21:40:20 +00:00
|
|
|
ast/struct_block_decoration.cc
|
|
|
|
ast/struct_block_decoration.h
|
2020-10-08 19:34:25 +00:00
|
|
|
ast/struct_decoration.cc
|
|
|
|
ast/struct_decoration.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/struct_member.cc
|
|
|
|
ast/struct_member.h
|
|
|
|
ast/struct_member_decoration.cc
|
|
|
|
ast/struct_member_decoration.h
|
|
|
|
ast/struct_member_offset_decoration.cc
|
|
|
|
ast/struct_member_offset_decoration.h
|
|
|
|
ast/switch_statement.cc
|
|
|
|
ast/switch_statement.h
|
2020-12-03 17:14:29 +00:00
|
|
|
ast/traits.h
|
2020-03-30 22:46:06 +00:00
|
|
|
ast/type_constructor_expression.h
|
|
|
|
ast/type_constructor_expression.cc
|
2020-11-19 18:55:01 +00:00
|
|
|
ast/type_decoration.cc
|
|
|
|
ast/type_decoration.h
|
2020-10-27 18:50:59 +00:00
|
|
|
ast/type/access_control_type.cc
|
|
|
|
ast/type/access_control_type.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/type/alias_type.cc
|
|
|
|
ast/type/alias_type.h
|
|
|
|
ast/type/array_type.cc
|
|
|
|
ast/type/array_type.h
|
|
|
|
ast/type/bool_type.cc
|
|
|
|
ast/type/bool_type.h
|
2020-07-30 23:26:28 +00:00
|
|
|
ast/type/depth_texture_type.cc
|
|
|
|
ast/type/depth_texture_type.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/type/f32_type.cc
|
|
|
|
ast/type/f32_type.h
|
|
|
|
ast/type/i32_type.cc
|
|
|
|
ast/type/i32_type.h
|
|
|
|
ast/type/matrix_type.cc
|
|
|
|
ast/type/matrix_type.h
|
2020-09-17 03:53:04 +00:00
|
|
|
ast/type/multisampled_texture_type.cc
|
|
|
|
ast/type/multisampled_texture_type.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/type/pointer_type.cc
|
|
|
|
ast/type/pointer_type.h
|
2020-07-30 23:26:28 +00:00
|
|
|
ast/type/sampled_texture_type.cc
|
|
|
|
ast/type/sampled_texture_type.h
|
2020-07-30 22:27:25 +00:00
|
|
|
ast/type/sampler_type.cc
|
|
|
|
ast/type/sampler_type.h
|
2020-07-30 23:26:28 +00:00
|
|
|
ast/type/storage_texture_type.cc
|
|
|
|
ast/type/storage_texture_type.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/type/struct_type.cc
|
|
|
|
ast/type/struct_type.h
|
2020-07-30 23:26:28 +00:00
|
|
|
ast/type/texture_type.cc
|
|
|
|
ast/type/texture_type.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/type/type.cc
|
|
|
|
ast/type/type.h
|
|
|
|
ast/type/u32_type.cc
|
|
|
|
ast/type/u32_type.h
|
|
|
|
ast/type/vector_type.cc
|
|
|
|
ast/type/vector_type.h
|
|
|
|
ast/type/void_type.cc
|
|
|
|
ast/type/void_type.h
|
2020-11-23 19:30:55 +00:00
|
|
|
ast/type_manager.cc
|
|
|
|
ast/type_manager.h
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/uint_literal.cc
|
|
|
|
ast/uint_literal.h
|
|
|
|
ast/unary_op.cc
|
|
|
|
ast/unary_op.h
|
|
|
|
ast/unary_op_expression.cc
|
|
|
|
ast/unary_op_expression.h
|
|
|
|
ast/variable.cc
|
|
|
|
ast/variable.h
|
|
|
|
ast/variable_decoration.cc
|
|
|
|
ast/variable_decoration.h
|
2020-03-30 22:46:48 +00:00
|
|
|
ast/variable_decl_statement.cc
|
|
|
|
ast/variable_decl_statement.h
|
2020-09-21 00:28:58 +00:00
|
|
|
ast/workgroup_decoration.cc
|
|
|
|
ast/workgroup_decoration.h
|
2020-11-30 22:50:25 +00:00
|
|
|
castable.cc
|
|
|
|
castable.h
|
2020-11-02 15:41:08 +00:00
|
|
|
diagnostic/diagnostic.cc
|
|
|
|
diagnostic/diagnostic.h
|
|
|
|
diagnostic/formatter.cc
|
|
|
|
diagnostic/formatter.h
|
2020-11-02 19:26:28 +00:00
|
|
|
diagnostic/printer.cc
|
|
|
|
diagnostic/printer.h
|
2020-10-16 02:26:54 +00:00
|
|
|
inspector/entry_point.cc
|
|
|
|
inspector/entry_point.h
|
|
|
|
inspector/inspector.cc
|
|
|
|
inspector/inspector.h
|
|
|
|
inspector/scalar.cc
|
|
|
|
inspector/scalar.h
|
2020-11-10 21:49:56 +00:00
|
|
|
namer.cc
|
|
|
|
namer.h
|
2020-03-02 20:47:43 +00:00
|
|
|
reader/reader.cc
|
|
|
|
reader/reader.h
|
2020-04-03 02:35:23 +00:00
|
|
|
scope_stack.h
|
2020-10-30 20:44:53 +00:00
|
|
|
source.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
source.h
|
2020-12-04 09:06:09 +00:00
|
|
|
transform/emit_vertex_point_size.cc
|
|
|
|
transform/emit_vertex_point_size.h
|
|
|
|
transform/bound_array_accessors.cc
|
|
|
|
transform/bound_array_accessors.h
|
2020-12-08 21:07:24 +00:00
|
|
|
transform/first_index_offset.cc
|
|
|
|
transform/first_index_offset.h
|
2020-09-29 23:54:03 +00:00
|
|
|
transform/manager.cc
|
|
|
|
transform/manager.h
|
2020-12-04 09:06:09 +00:00
|
|
|
transform/transform.cc
|
|
|
|
transform/transform.h
|
|
|
|
transform/vertex_pulling.cc
|
|
|
|
transform/vertex_pulling.h
|
2020-03-02 20:47:43 +00:00
|
|
|
type_determiner.cc
|
|
|
|
type_determiner.h
|
2020-11-06 17:31:15 +00:00
|
|
|
validator/validator.cc
|
|
|
|
validator/validator.h
|
|
|
|
validator/validator_impl.cc
|
|
|
|
validator/validator_impl.h
|
|
|
|
validator/validator_test_helper.cc
|
|
|
|
validator/validator_test_helper.h
|
2020-11-20 10:04:44 +00:00
|
|
|
writer/float_to_string.cc
|
|
|
|
writer/float_to_string.h
|
2020-11-26 13:57:32 +00:00
|
|
|
writer/pack_coord_arrayidx.cc
|
|
|
|
writer/pack_coord_arrayidx.h
|
2020-06-23 17:48:40 +00:00
|
|
|
writer/text.cc
|
|
|
|
writer/text.h
|
|
|
|
writer/text_generator.cc
|
|
|
|
writer/text_generator.h
|
2020-03-02 20:47:43 +00:00
|
|
|
writer/writer.cc
|
|
|
|
writer/writer.h
|
|
|
|
)
|
|
|
|
|
2020-11-02 19:26:28 +00:00
|
|
|
if(UNIX)
|
|
|
|
list(APPEND TINT_LIB_SRCS diagnostic/printer_linux.cc)
|
|
|
|
elseif(WIN32)
|
|
|
|
list(APPEND TINT_LIB_SRCS diagnostic/printer_windows.cc)
|
|
|
|
else()
|
|
|
|
list(APPEND TINT_LIB_SRCS diagnostic/printer_other.cc)
|
|
|
|
endif()
|
|
|
|
|
2020-03-18 14:08:48 +00:00
|
|
|
if(${TINT_BUILD_SPV_READER})
|
2020-03-02 20:47:43 +00:00
|
|
|
list(APPEND TINT_LIB_SRCS
|
2020-04-27 20:14:08 +00:00
|
|
|
reader/spirv/construct.h
|
|
|
|
reader/spirv/construct.cc
|
2020-09-22 14:22:12 +00:00
|
|
|
reader/spirv/entry_point_info.h
|
2020-03-23 22:53:42 +00:00
|
|
|
reader/spirv/enum_converter.h
|
|
|
|
reader/spirv/enum_converter.cc
|
2020-03-17 20:07:41 +00:00
|
|
|
reader/spirv/fail_stream.h
|
2020-04-07 19:54:52 +00:00
|
|
|
reader/spirv/function.cc
|
|
|
|
reader/spirv/function.h
|
2020-03-20 19:24:23 +00:00
|
|
|
reader/spirv/namer.cc
|
|
|
|
reader/spirv/namer.h
|
2020-03-17 20:07:41 +00:00
|
|
|
reader/spirv/parser.cc
|
|
|
|
reader/spirv/parser.h
|
|
|
|
reader/spirv/parser_impl.cc
|
|
|
|
reader/spirv/parser_impl.h
|
2020-11-17 18:32:18 +00:00
|
|
|
reader/spirv/usage.cc
|
|
|
|
reader/spirv/usage.h
|
2020-03-02 20:47:43 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-03-18 14:08:48 +00:00
|
|
|
if(${TINT_BUILD_WGSL_READER})
|
|
|
|
list(APPEND TINT_LIB_SRCS
|
|
|
|
reader/wgsl/lexer.cc
|
|
|
|
reader/wgsl/lexer.h
|
|
|
|
reader/wgsl/parser.cc
|
|
|
|
reader/wgsl/parser.h
|
|
|
|
reader/wgsl/parser_impl.cc
|
|
|
|
reader/wgsl/parser_impl.h
|
2020-11-09 20:44:34 +00:00
|
|
|
reader/wgsl/parser_impl_detail.h
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/token.cc
|
|
|
|
reader/wgsl/token.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(${TINT_BUILD_SPV_WRITER})
|
|
|
|
list(APPEND TINT_LIB_SRCS
|
|
|
|
writer/spirv/binary_writer.cc
|
|
|
|
writer/spirv/binary_writer.h
|
|
|
|
writer/spirv/builder.cc
|
|
|
|
writer/spirv/builder.h
|
2020-04-01 23:40:53 +00:00
|
|
|
writer/spirv/function.cc
|
|
|
|
writer/spirv/function.h
|
2020-03-18 14:08:48 +00:00
|
|
|
writer/spirv/generator.cc
|
|
|
|
writer/spirv/generator.h
|
|
|
|
writer/spirv/instruction.cc
|
|
|
|
writer/spirv/instruction.h
|
|
|
|
writer/spirv/operand.cc
|
|
|
|
writer/spirv/operand.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(${TINT_BUILD_WGSL_WRITER})
|
|
|
|
list(APPEND TINT_LIB_SRCS
|
|
|
|
writer/wgsl/generator.cc
|
|
|
|
writer/wgsl/generator.h
|
|
|
|
writer/wgsl/generator_impl.cc
|
|
|
|
writer/wgsl/generator_impl.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-06-23 17:48:40 +00:00
|
|
|
if(${TINT_BUILD_MSL_WRITER})
|
|
|
|
list(APPEND TINT_LIB_SRCS
|
|
|
|
writer/msl/generator.cc
|
|
|
|
writer/msl/generator.h
|
|
|
|
writer/msl/generator_impl.cc
|
|
|
|
writer/msl/generator_impl.h
|
2020-07-02 20:53:45 +00:00
|
|
|
writer/msl/namer.cc
|
|
|
|
writer/msl/namer.h
|
2020-06-23 17:48:40 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-07-20 22:13:37 +00:00
|
|
|
if(${TINT_BUILD_HLSL_WRITER})
|
|
|
|
list(APPEND TINT_LIB_SRCS
|
|
|
|
writer/hlsl/generator.cc
|
|
|
|
writer/hlsl/generator.h
|
|
|
|
writer/hlsl/generator_impl.cc
|
|
|
|
writer/hlsl/generator_impl.h
|
2020-07-21 14:51:33 +00:00
|
|
|
writer/hlsl/namer.cc
|
|
|
|
writer/hlsl/namer.h
|
2020-07-20 22:13:37 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-03-02 20:47:43 +00:00
|
|
|
set(TINT_TEST_SRCS
|
2020-03-03 14:09:27 +00:00
|
|
|
ast/array_accessor_expression_test.cc
|
2020-03-05 20:20:39 +00:00
|
|
|
ast/assignment_statement_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/binding_decoration_test.cc
|
2020-09-22 22:07:13 +00:00
|
|
|
ast/bitcast_expression_test.cc
|
2020-07-27 15:25:00 +00:00
|
|
|
ast/block_statement_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/bool_literal_test.cc
|
2020-03-05 20:29:13 +00:00
|
|
|
ast/break_statement_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/builtin_decoration_test.cc
|
2020-03-05 20:35:57 +00:00
|
|
|
ast/call_expression_test.cc
|
2020-07-21 13:42:05 +00:00
|
|
|
ast/call_statement_test.cc
|
2020-03-06 14:28:01 +00:00
|
|
|
ast/case_statement_test.cc
|
2020-12-03 18:10:39 +00:00
|
|
|
ast/clone_context_test.cc
|
2020-09-29 18:07:50 +00:00
|
|
|
ast/constant_id_decoration_test.cc
|
2020-03-09 13:23:22 +00:00
|
|
|
ast/continue_statement_test.cc
|
2020-07-25 03:34:33 +00:00
|
|
|
ast/discard_statement_test.cc
|
2020-11-03 21:40:20 +00:00
|
|
|
ast/decoration_test.cc
|
2020-03-10 17:47:56 +00:00
|
|
|
ast/decorated_variable_test.cc
|
2020-03-10 17:48:25 +00:00
|
|
|
ast/else_statement_test.cc
|
2020-04-22 00:23:49 +00:00
|
|
|
ast/expression_test.cc
|
2020-03-10 19:19:18 +00:00
|
|
|
ast/fallthrough_statement_test.cc
|
2020-03-27 00:45:34 +00:00
|
|
|
ast/float_literal_test.cc
|
2020-03-10 19:19:28 +00:00
|
|
|
ast/function_test.cc
|
2020-03-16 13:26:10 +00:00
|
|
|
ast/identifier_expression_test.cc
|
2020-03-16 13:39:44 +00:00
|
|
|
ast/if_statement_test.cc
|
2020-11-18 21:19:22 +00:00
|
|
|
ast/intrinsic_texture_helper_test.cc
|
|
|
|
ast/intrinsic_texture_helper_test.h
|
2020-06-02 20:11:54 +00:00
|
|
|
ast/int_literal_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/location_decoration_test.cc
|
2020-03-16 13:58:53 +00:00
|
|
|
ast/loop_statement_test.cc
|
2020-03-16 14:17:28 +00:00
|
|
|
ast/member_accessor_expression_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/module_test.cc
|
2020-12-01 18:04:17 +00:00
|
|
|
ast/module_clone_test.cc
|
2020-05-05 14:21:19 +00:00
|
|
|
ast/null_literal_test.cc
|
2020-04-07 19:27:41 +00:00
|
|
|
ast/binary_expression_test.cc
|
2020-03-17 03:51:29 +00:00
|
|
|
ast/return_statement_test.cc
|
2020-03-30 22:46:06 +00:00
|
|
|
ast/scalar_constructor_expression_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/set_decoration_test.cc
|
2020-06-02 20:11:44 +00:00
|
|
|
ast/sint_literal_test.cc
|
2020-09-21 17:42:10 +00:00
|
|
|
ast/stage_decoration_test.cc
|
2020-10-08 19:34:25 +00:00
|
|
|
ast/stride_decoration_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/struct_member_test.cc
|
|
|
|
ast/struct_member_offset_decoration_test.cc
|
|
|
|
ast/struct_test.cc
|
2020-03-17 03:53:41 +00:00
|
|
|
ast/switch_statement_test.cc
|
2020-11-13 21:58:28 +00:00
|
|
|
ast/test_helper.h
|
2020-10-27 18:50:59 +00:00
|
|
|
ast/type/access_control_type_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/type/alias_type_test.cc
|
|
|
|
ast/type/array_type_test.cc
|
|
|
|
ast/type/bool_type_test.cc
|
2020-07-30 23:26:28 +00:00
|
|
|
ast/type/depth_texture_type_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/type/f32_type_test.cc
|
|
|
|
ast/type/i32_type_test.cc
|
|
|
|
ast/type/matrix_type_test.cc
|
2020-09-17 03:53:04 +00:00
|
|
|
ast/type/multisampled_texture_type_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/type/pointer_type_test.cc
|
2020-07-30 23:26:28 +00:00
|
|
|
ast/type/sampled_texture_type_test.cc
|
2020-07-30 22:27:25 +00:00
|
|
|
ast/type/sampler_type_test.cc
|
2020-07-30 23:26:28 +00:00
|
|
|
ast/type/storage_texture_type_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/type/struct_type_test.cc
|
|
|
|
ast/type/u32_type_test.cc
|
|
|
|
ast/type/vector_type_test.cc
|
2020-12-03 17:14:29 +00:00
|
|
|
ast/traits_test.cc
|
2020-03-30 22:46:06 +00:00
|
|
|
ast/type_constructor_expression_test.cc
|
2020-11-23 19:30:55 +00:00
|
|
|
ast/type_manager_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/uint_literal_test.cc
|
2020-03-17 14:25:02 +00:00
|
|
|
ast/unary_op_expression_test.cc
|
2020-03-30 22:46:48 +00:00
|
|
|
ast/variable_decl_statement_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
ast/variable_test.cc
|
2020-09-21 00:28:58 +00:00
|
|
|
ast/workgroup_decoration_test.cc
|
2020-11-30 22:50:25 +00:00
|
|
|
castable_test.cc
|
2020-11-02 15:41:08 +00:00
|
|
|
diagnostic/formatter_test.cc
|
2020-11-02 19:26:28 +00:00
|
|
|
diagnostic/printer_test.cc
|
2020-10-16 02:26:54 +00:00
|
|
|
inspector/inspector_test.cc
|
2020-11-10 21:49:56 +00:00
|
|
|
namer_test.cc
|
2020-04-03 02:35:23 +00:00
|
|
|
scope_stack_test.cc
|
2020-12-04 09:06:09 +00:00
|
|
|
transform/emit_vertex_point_size_test.cc
|
|
|
|
transform/bound_array_accessors_test.cc
|
2020-12-08 21:07:24 +00:00
|
|
|
transform/first_index_offset_test.cc
|
2020-12-04 09:06:09 +00:00
|
|
|
transform/vertex_pulling_test.cc
|
2020-04-07 12:46:30 +00:00
|
|
|
type_determiner_test.cc
|
2020-11-06 17:31:15 +00:00
|
|
|
validator/validator_control_block_test.cc
|
|
|
|
validator/validator_function_test.cc
|
|
|
|
validator/validator_test.cc
|
2020-11-18 18:40:10 +00:00
|
|
|
validator/validator_type_test.cc
|
2020-11-20 10:04:44 +00:00
|
|
|
writer/float_to_string_test.cc
|
2020-03-02 20:47:43 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
## Tint library
|
|
|
|
add_library(libtint ${TINT_LIB_SRCS})
|
|
|
|
tint_default_compile_options(libtint)
|
2020-10-06 15:11:17 +00:00
|
|
|
if (${COMPILER_IS_LIKE_GNU})
|
|
|
|
target_compile_options(libtint PRIVATE -fvisibility=hidden)
|
|
|
|
endif()
|
|
|
|
|
2020-11-24 15:28:06 +00:00
|
|
|
if (${TINT_BUILD_FUZZERS})
|
|
|
|
# Tint library with fuzzer instrumentation
|
|
|
|
add_library(libtint-fuzz ${TINT_LIB_SRCS})
|
|
|
|
tint_default_compile_options(libtint-fuzz)
|
|
|
|
if (${COMPILER_IS_LIKE_GNU})
|
|
|
|
target_compile_options(libtint-fuzz PRIVATE -fvisibility=hidden)
|
|
|
|
endif()
|
|
|
|
target_compile_options(libtint-fuzz PUBLIC -fsanitize=fuzzer -fsanitize-coverage=trace-cmp)
|
|
|
|
target_link_options(libtint-fuzz PUBLIC -fsanitize=fuzzer -fsanitize-coverage=trace-cmp)
|
|
|
|
endif()
|
|
|
|
|
2020-03-02 20:47:43 +00:00
|
|
|
set_target_properties(libtint PROPERTIES OUTPUT_NAME "tint")
|
2020-03-18 14:08:48 +00:00
|
|
|
|
|
|
|
if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER})
|
2020-03-13 20:21:45 +00:00
|
|
|
tint_spvtools_compile_options(libtint)
|
2020-11-24 15:28:06 +00:00
|
|
|
if (${TINT_BUILD_FUZZERS})
|
|
|
|
tint_spvtools_compile_options(libtint-fuzz)
|
|
|
|
endif()
|
2020-03-02 20:47:43 +00:00
|
|
|
endif()
|
|
|
|
|
2020-03-18 14:08:48 +00:00
|
|
|
if(${TINT_BUILD_SPV_READER})
|
|
|
|
list(APPEND TINT_TEST_SRCS
|
2020-03-23 22:53:42 +00:00
|
|
|
reader/spirv/enum_converter_test.cc
|
2020-03-17 20:07:41 +00:00
|
|
|
reader/spirv/fail_stream_test.cc
|
2020-04-09 20:45:31 +00:00
|
|
|
reader/spirv/function_arithmetic_test.cc
|
2020-04-21 17:44:44 +00:00
|
|
|
reader/spirv/function_bit_test.cc
|
2020-04-21 17:44:44 +00:00
|
|
|
reader/spirv/function_cfg_test.cc
|
2020-07-20 22:19:01 +00:00
|
|
|
reader/spirv/function_call_test.cc
|
2020-06-12 15:09:56 +00:00
|
|
|
reader/spirv/function_composite_test.cc
|
2020-04-20 21:06:43 +00:00
|
|
|
reader/spirv/function_conversion_test.cc
|
2020-04-07 19:56:02 +00:00
|
|
|
reader/spirv/function_decl_test.cc
|
2020-06-12 15:09:14 +00:00
|
|
|
reader/spirv/function_glsl_std_450_test.cc
|
2020-04-14 20:56:07 +00:00
|
|
|
reader/spirv/function_logical_test.cc
|
2020-04-08 20:06:26 +00:00
|
|
|
reader/spirv/function_memory_test.cc
|
2020-06-22 20:48:59 +00:00
|
|
|
reader/spirv/function_misc_test.cc
|
|
|
|
reader/spirv/function_var_test.cc
|
2020-03-20 19:24:23 +00:00
|
|
|
reader/spirv/namer_test.cc
|
2020-03-30 21:14:28 +00:00
|
|
|
reader/spirv/parser_impl_convert_member_decoration_test.cc
|
2020-03-24 21:42:16 +00:00
|
|
|
reader/spirv/parser_impl_convert_type_test.cc
|
2020-04-01 21:21:21 +00:00
|
|
|
reader/spirv/parser_impl_function_decl_test.cc
|
2020-03-30 21:09:59 +00:00
|
|
|
reader/spirv/parser_impl_get_decorations_test.cc
|
2020-11-17 17:59:38 +00:00
|
|
|
reader/spirv/parser_impl_handle_test.cc
|
2020-03-17 20:07:41 +00:00
|
|
|
reader/spirv/parser_impl_import_test.cc
|
2020-04-01 17:55:57 +00:00
|
|
|
reader/spirv/parser_impl_module_var_test.cc
|
2020-03-31 20:02:36 +00:00
|
|
|
reader/spirv/parser_impl_named_types_test.cc
|
2020-03-17 20:07:41 +00:00
|
|
|
reader/spirv/parser_impl_test.cc
|
2020-07-20 22:19:01 +00:00
|
|
|
reader/spirv/parser_impl_user_name_test.cc
|
2020-03-17 20:07:41 +00:00
|
|
|
reader/spirv/parser_test.cc
|
|
|
|
reader/spirv/spirv_tools_helpers_test.cc
|
|
|
|
reader/spirv/spirv_tools_helpers_test.h
|
2020-11-17 18:32:18 +00:00
|
|
|
reader/spirv/usage_test.cc
|
2020-03-10 22:54:31 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-03-18 14:08:48 +00:00
|
|
|
if(${TINT_BUILD_WGSL_READER})
|
|
|
|
list(APPEND TINT_TEST_SRCS
|
|
|
|
reader/wgsl/lexer_test.cc
|
|
|
|
reader/wgsl/parser_test.cc
|
|
|
|
reader/wgsl/parser_impl_additive_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_and_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_argument_expression_list_test.cc
|
|
|
|
reader/wgsl/parser_impl_assignment_stmt_test.cc
|
|
|
|
reader/wgsl/parser_impl_body_stmt_test.cc
|
|
|
|
reader/wgsl/parser_impl_break_stmt_test.cc
|
2020-07-21 15:13:36 +00:00
|
|
|
reader/wgsl/parser_impl_call_stmt_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/parser_impl_case_body_test.cc
|
|
|
|
reader/wgsl/parser_impl_const_expr_test.cc
|
|
|
|
reader/wgsl/parser_impl_const_literal_test.cc
|
|
|
|
reader/wgsl/parser_impl_continue_stmt_test.cc
|
|
|
|
reader/wgsl/parser_impl_continuing_stmt_test.cc
|
2020-09-02 14:06:45 +00:00
|
|
|
reader/wgsl/parser_impl_depth_texture_type_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/parser_impl_else_stmt_test.cc
|
|
|
|
reader/wgsl/parser_impl_elseif_stmt_test.cc
|
|
|
|
reader/wgsl/parser_impl_equality_expression_test.cc
|
2020-10-29 13:05:52 +00:00
|
|
|
reader/wgsl/parser_impl_error_msg_test.cc
|
2020-11-11 18:44:36 +00:00
|
|
|
reader/wgsl/parser_impl_error_resync_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/parser_impl_exclusive_or_expression_test.cc
|
2020-08-24 18:22:22 +00:00
|
|
|
reader/wgsl/parser_impl_for_stmt_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/parser_impl_function_decl_test.cc
|
2020-09-21 00:37:08 +00:00
|
|
|
reader/wgsl/parser_impl_function_decoration_list_test.cc
|
|
|
|
reader/wgsl/parser_impl_function_decoration_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/parser_impl_function_header_test.cc
|
|
|
|
reader/wgsl/parser_impl_function_type_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_global_constant_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_global_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_global_variable_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_if_stmt_test.cc
|
2020-09-08 16:38:39 +00:00
|
|
|
reader/wgsl/parser_impl_image_storage_type_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/parser_impl_inclusive_or_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_logical_and_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_logical_or_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_loop_stmt_test.cc
|
|
|
|
reader/wgsl/parser_impl_multiplicative_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_param_list_test.cc
|
|
|
|
reader/wgsl/parser_impl_paren_rhs_stmt_test.cc
|
|
|
|
reader/wgsl/parser_impl_pipeline_stage_test.cc
|
|
|
|
reader/wgsl/parser_impl_postfix_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_primary_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_relational_expression_test.cc
|
2020-09-02 15:52:15 +00:00
|
|
|
reader/wgsl/parser_impl_sampled_texture_type_test.cc
|
2020-09-02 13:26:15 +00:00
|
|
|
reader/wgsl/parser_impl_sampler_type_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/parser_impl_shift_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_statement_test.cc
|
|
|
|
reader/wgsl/parser_impl_statements_test.cc
|
|
|
|
reader/wgsl/parser_impl_storage_class_test.cc
|
2020-09-08 16:48:09 +00:00
|
|
|
reader/wgsl/parser_impl_storage_texture_type_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/parser_impl_struct_body_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_struct_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_struct_decoration_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_struct_decoration_test.cc
|
|
|
|
reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_struct_member_decoration_test.cc
|
|
|
|
reader/wgsl/parser_impl_struct_member_test.cc
|
|
|
|
reader/wgsl/parser_impl_switch_body_test.cc
|
|
|
|
reader/wgsl/parser_impl_switch_stmt_test.cc
|
|
|
|
reader/wgsl/parser_impl_test.cc
|
2020-04-17 13:18:20 +00:00
|
|
|
reader/wgsl/parser_impl_test_helper.cc
|
2020-03-25 19:16:36 +00:00
|
|
|
reader/wgsl/parser_impl_test_helper.h
|
2020-09-02 14:16:35 +00:00
|
|
|
reader/wgsl/parser_impl_texture_sampler_types_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
reader/wgsl/parser_impl_type_alias_test.cc
|
|
|
|
reader/wgsl/parser_impl_type_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_unary_expression_test.cc
|
|
|
|
reader/wgsl/parser_impl_variable_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_variable_decoration_list_test.cc
|
|
|
|
reader/wgsl/parser_impl_variable_decoration_test.cc
|
|
|
|
reader/wgsl/parser_impl_variable_ident_decl_test.cc
|
|
|
|
reader/wgsl/parser_impl_variable_stmt_test.cc
|
|
|
|
reader/wgsl/parser_impl_variable_storage_decoration_test.cc
|
|
|
|
reader/wgsl/token_test.cc
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(${TINT_BUILD_SPV_WRITER})
|
|
|
|
list(APPEND TINT_TEST_SRCS
|
|
|
|
writer/spirv/binary_writer_test.cc
|
2020-04-22 14:07:05 +00:00
|
|
|
writer/spirv/builder_accessor_expression_test.cc
|
2020-04-02 02:41:30 +00:00
|
|
|
writer/spirv/builder_assign_test.cc
|
2020-04-08 17:18:20 +00:00
|
|
|
writer/spirv/builder_binary_expression_test.cc
|
2020-09-22 22:07:13 +00:00
|
|
|
writer/spirv/builder_bitcast_expression_test.cc
|
2020-07-27 15:25:00 +00:00
|
|
|
writer/spirv/builder_block_test.cc
|
2020-04-20 15:46:18 +00:00
|
|
|
writer/spirv/builder_call_test.cc
|
2020-03-30 22:46:06 +00:00
|
|
|
writer/spirv/builder_constructor_expression_test.cc
|
2020-07-25 14:32:44 +00:00
|
|
|
writer/spirv/builder_discard_test.cc
|
2020-08-31 15:49:43 +00:00
|
|
|
writer/spirv/builder_format_conversion_test.cc
|
2020-09-21 18:49:01 +00:00
|
|
|
writer/spirv/builder_function_decoration_test.cc
|
2020-03-25 19:43:20 +00:00
|
|
|
writer/spirv/builder_function_test.cc
|
2020-04-01 23:40:53 +00:00
|
|
|
writer/spirv/builder_function_variable_test.cc
|
2020-03-30 19:49:01 +00:00
|
|
|
writer/spirv/builder_global_variable_test.cc
|
2020-04-01 23:44:11 +00:00
|
|
|
writer/spirv/builder_ident_expression_test.cc
|
2020-04-14 16:40:30 +00:00
|
|
|
writer/spirv/builder_if_test.cc
|
2020-06-04 17:05:35 +00:00
|
|
|
writer/spirv/builder_intrinsic_test.cc
|
2020-11-19 14:08:51 +00:00
|
|
|
writer/spirv/builder_intrinsic_texture_test.cc
|
2020-03-27 00:45:34 +00:00
|
|
|
writer/spirv/builder_literal_test.cc
|
2020-04-20 14:07:29 +00:00
|
|
|
writer/spirv/builder_loop_test.cc
|
2020-03-30 20:03:24 +00:00
|
|
|
writer/spirv/builder_return_test.cc
|
2020-06-01 18:56:34 +00:00
|
|
|
writer/spirv/builder_switch_test.cc
|
2020-03-30 19:49:01 +00:00
|
|
|
writer/spirv/builder_test.cc
|
2020-03-27 00:45:34 +00:00
|
|
|
writer/spirv/builder_type_test.cc
|
2020-04-22 00:24:11 +00:00
|
|
|
writer/spirv/builder_unary_op_expression_test.cc
|
2020-03-18 14:08:48 +00:00
|
|
|
writer/spirv/instruction_test.cc
|
|
|
|
writer/spirv/operand_test.cc
|
2020-03-23 20:59:12 +00:00
|
|
|
writer/spirv/spv_dump.cc
|
|
|
|
writer/spirv/spv_dump.h
|
2020-11-13 18:13:24 +00:00
|
|
|
writer/spirv/test_helper.h
|
2020-03-18 14:08:48 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(${TINT_BUILD_WGSL_WRITER})
|
|
|
|
list(APPEND TINT_TEST_SRCS
|
|
|
|
writer/wgsl/generator_impl_test.cc
|
2020-03-18 20:10:44 +00:00
|
|
|
writer/wgsl/generator_impl_alias_type_test.cc
|
|
|
|
writer/wgsl/generator_impl_array_accessor_test.cc
|
2020-03-20 19:01:57 +00:00
|
|
|
writer/wgsl/generator_impl_assign_test.cc
|
2020-06-23 18:22:05 +00:00
|
|
|
writer/wgsl/generator_impl_binary_test.cc
|
2020-09-22 22:07:13 +00:00
|
|
|
writer/wgsl/generator_impl_bitcast_test.cc
|
2020-07-27 15:25:00 +00:00
|
|
|
writer/wgsl/generator_impl_block_test.cc
|
2020-03-20 19:02:05 +00:00
|
|
|
writer/wgsl/generator_impl_break_test.cc
|
2020-03-19 02:51:27 +00:00
|
|
|
writer/wgsl/generator_impl_call_test.cc
|
2020-03-20 19:04:45 +00:00
|
|
|
writer/wgsl/generator_impl_case_test.cc
|
2020-03-19 02:53:30 +00:00
|
|
|
writer/wgsl/generator_impl_cast_test.cc
|
2020-03-30 22:46:06 +00:00
|
|
|
writer/wgsl/generator_impl_constructor_test.cc
|
2020-03-20 19:04:54 +00:00
|
|
|
writer/wgsl/generator_impl_continue_test.cc
|
2020-07-25 14:33:04 +00:00
|
|
|
writer/wgsl/generator_impl_discard_test.cc
|
2020-03-20 19:05:02 +00:00
|
|
|
writer/wgsl/generator_impl_fallthrough_test.cc
|
2020-03-20 19:09:04 +00:00
|
|
|
writer/wgsl/generator_impl_function_test.cc
|
2020-03-18 20:10:44 +00:00
|
|
|
writer/wgsl/generator_impl_identifier_test.cc
|
2020-03-20 19:08:56 +00:00
|
|
|
writer/wgsl/generator_impl_if_test.cc
|
2020-03-20 19:07:00 +00:00
|
|
|
writer/wgsl/generator_impl_loop_test.cc
|
2020-03-19 02:55:19 +00:00
|
|
|
writer/wgsl/generator_impl_member_accessor_test.cc
|
2020-03-20 19:05:10 +00:00
|
|
|
writer/wgsl/generator_impl_return_test.cc
|
2020-03-20 19:06:52 +00:00
|
|
|
writer/wgsl/generator_impl_switch_test.cc
|
2020-03-18 20:10:44 +00:00
|
|
|
writer/wgsl/generator_impl_type_test.cc
|
2020-03-20 19:01:47 +00:00
|
|
|
writer/wgsl/generator_impl_unary_op_test.cc
|
2020-03-30 22:46:48 +00:00
|
|
|
writer/wgsl/generator_impl_variable_decl_statement_test.cc
|
2020-03-18 20:10:44 +00:00
|
|
|
writer/wgsl/generator_impl_variable_test.cc
|
2020-11-13 18:13:24 +00:00
|
|
|
writer/wgsl/test_helper.h
|
2020-03-18 14:08:48 +00:00
|
|
|
)
|
2020-03-13 20:21:45 +00:00
|
|
|
endif()
|
2020-06-23 17:48:40 +00:00
|
|
|
|
|
|
|
if(${TINT_BUILD_MSL_WRITER})
|
|
|
|
list(APPEND TINT_TEST_SRCS
|
2020-06-26 21:27:59 +00:00
|
|
|
writer/msl/generator_impl_alias_type_test.cc
|
2020-06-26 21:27:59 +00:00
|
|
|
writer/msl/generator_impl_array_accessor_test.cc
|
2020-06-23 17:54:33 +00:00
|
|
|
writer/msl/generator_impl_assign_test.cc
|
2020-06-23 18:22:05 +00:00
|
|
|
writer/msl/generator_impl_binary_test.cc
|
2020-09-22 22:07:13 +00:00
|
|
|
writer/msl/generator_impl_bitcast_test.cc
|
2020-07-27 15:25:00 +00:00
|
|
|
writer/msl/generator_impl_block_test.cc
|
2020-06-29 21:17:54 +00:00
|
|
|
writer/msl/generator_impl_break_test.cc
|
2020-07-14 20:37:38 +00:00
|
|
|
writer/msl/generator_impl_call_test.cc
|
2020-06-30 21:33:20 +00:00
|
|
|
writer/msl/generator_impl_case_test.cc
|
2020-06-26 21:27:59 +00:00
|
|
|
writer/msl/generator_impl_cast_test.cc
|
2020-06-23 18:22:21 +00:00
|
|
|
writer/msl/generator_impl_constructor_test.cc
|
2020-06-29 21:17:54 +00:00
|
|
|
writer/msl/generator_impl_continue_test.cc
|
2020-07-25 14:32:54 +00:00
|
|
|
writer/msl/generator_impl_discard_test.cc
|
2020-09-21 18:58:01 +00:00
|
|
|
writer/msl/generator_impl_function_entry_point_data_test.cc
|
2020-06-23 17:54:25 +00:00
|
|
|
writer/msl/generator_impl_function_test.cc
|
2020-06-23 17:49:08 +00:00
|
|
|
writer/msl/generator_impl_identifier_test.cc
|
2020-06-26 21:27:59 +00:00
|
|
|
writer/msl/generator_impl_if_test.cc
|
2020-07-20 22:13:00 +00:00
|
|
|
writer/msl/generator_impl_import_test.cc
|
2020-07-25 14:39:23 +00:00
|
|
|
writer/msl/generator_impl_intrinsic_test.cc
|
2020-11-26 15:07:52 +00:00
|
|
|
writer/msl/generator_impl_intrinsic_texture_test.cc
|
2020-06-30 17:40:28 +00:00
|
|
|
writer/msl/generator_impl_loop_test.cc
|
2020-06-29 21:17:44 +00:00
|
|
|
writer/msl/generator_impl_member_accessor_test.cc
|
2020-07-16 17:54:26 +00:00
|
|
|
writer/msl/generator_impl_module_constant_test.cc
|
2020-06-23 17:49:00 +00:00
|
|
|
writer/msl/generator_impl_return_test.cc
|
2020-06-30 21:33:20 +00:00
|
|
|
writer/msl/generator_impl_switch_test.cc
|
2020-06-23 17:48:40 +00:00
|
|
|
writer/msl/generator_impl_test.cc
|
2020-06-23 17:48:53 +00:00
|
|
|
writer/msl/generator_impl_type_test.cc
|
2020-06-26 21:27:59 +00:00
|
|
|
writer/msl/generator_impl_unary_op_test.cc
|
2020-07-08 20:52:46 +00:00
|
|
|
writer/msl/generator_impl_variable_decl_statement_test.cc
|
2020-07-02 20:53:45 +00:00
|
|
|
writer/msl/namer_test.cc
|
2020-11-13 18:13:24 +00:00
|
|
|
writer/msl/test_helper.h
|
2020-06-23 17:48:40 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-07-20 22:13:37 +00:00
|
|
|
if (${TINT_BUILD_HLSL_WRITER})
|
|
|
|
list(APPEND TINT_TEST_SRCS
|
2020-07-29 18:56:25 +00:00
|
|
|
writer/hlsl/generator_impl_alias_type_test.cc
|
2020-07-29 18:56:35 +00:00
|
|
|
writer/hlsl/generator_impl_array_accessor_test.cc
|
2020-07-21 15:58:56 +00:00
|
|
|
writer/hlsl/generator_impl_assign_test.cc
|
2020-07-21 15:58:20 +00:00
|
|
|
writer/hlsl/generator_impl_binary_test.cc
|
2020-09-22 22:07:13 +00:00
|
|
|
writer/hlsl/generator_impl_bitcast_test.cc
|
2020-07-29 19:06:46 +00:00
|
|
|
writer/hlsl/generator_impl_block_test.cc
|
2020-07-21 15:58:29 +00:00
|
|
|
writer/hlsl/generator_impl_break_test.cc
|
2020-08-19 17:44:45 +00:00
|
|
|
writer/hlsl/generator_impl_call_test.cc
|
2020-07-21 15:58:43 +00:00
|
|
|
writer/hlsl/generator_impl_case_test.cc
|
2020-08-19 19:14:44 +00:00
|
|
|
writer/hlsl/generator_impl_cast_test.cc
|
2020-07-29 18:50:18 +00:00
|
|
|
writer/hlsl/generator_impl_constructor_test.cc
|
2020-07-21 15:58:29 +00:00
|
|
|
writer/hlsl/generator_impl_continue_test.cc
|
2020-07-29 18:56:50 +00:00
|
|
|
writer/hlsl/generator_impl_discard_test.cc
|
2020-09-22 13:47:32 +00:00
|
|
|
writer/hlsl/generator_impl_function_entry_point_data_test.cc
|
2020-08-19 17:32:25 +00:00
|
|
|
writer/hlsl/generator_impl_function_test.cc
|
2020-07-21 14:51:33 +00:00
|
|
|
writer/hlsl/generator_impl_identifier_test.cc
|
2020-07-30 22:26:55 +00:00
|
|
|
writer/hlsl/generator_impl_if_test.cc
|
2020-08-19 19:17:54 +00:00
|
|
|
writer/hlsl/generator_impl_intrinsic_test.cc
|
2020-11-20 10:28:24 +00:00
|
|
|
writer/hlsl/generator_impl_intrinsic_texture_test.cc
|
2020-08-19 19:19:04 +00:00
|
|
|
writer/hlsl/generator_impl_import_test.cc
|
2020-07-30 22:27:09 +00:00
|
|
|
writer/hlsl/generator_impl_loop_test.cc
|
2020-07-29 19:12:19 +00:00
|
|
|
writer/hlsl/generator_impl_member_accessor_test.cc
|
2020-08-19 19:03:24 +00:00
|
|
|
writer/hlsl/generator_impl_module_constant_test.cc
|
2020-07-21 15:58:29 +00:00
|
|
|
writer/hlsl/generator_impl_return_test.cc
|
2020-07-21 15:58:50 +00:00
|
|
|
writer/hlsl/generator_impl_switch_test.cc
|
2020-07-20 22:13:37 +00:00
|
|
|
writer/hlsl/generator_impl_test.cc
|
2020-07-29 18:30:44 +00:00
|
|
|
writer/hlsl/generator_impl_type_test.cc
|
2020-07-21 15:58:36 +00:00
|
|
|
writer/hlsl/generator_impl_unary_op_test.cc
|
2020-07-30 22:26:46 +00:00
|
|
|
writer/hlsl/generator_impl_variable_decl_statement_test.cc
|
2020-07-21 14:51:33 +00:00
|
|
|
writer/hlsl/namer_test.cc
|
2020-08-26 19:05:46 +00:00
|
|
|
writer/hlsl/test_helper.h
|
2020-07-20 22:13:37 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-03-18 14:08:48 +00:00
|
|
|
add_executable(tint_unittests ${TINT_TEST_SRCS})
|
|
|
|
|
|
|
|
if(NOT MSVC)
|
2020-03-02 20:47:43 +00:00
|
|
|
target_compile_options(tint_unittests PRIVATE
|
|
|
|
-Wno-global-constructors
|
|
|
|
-Wno-weak-vtables
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
## Test executable
|
|
|
|
target_include_directories(
|
|
|
|
tint_unittests PRIVATE ${gmock_SOURCE_DIR}/include)
|
|
|
|
target_link_libraries(tint_unittests libtint gmock_main)
|
|
|
|
tint_default_compile_options(tint_unittests)
|
|
|
|
|
2020-03-18 14:08:48 +00:00
|
|
|
if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER})
|
|
|
|
tint_spvtools_compile_options(tint_unittests)
|
|
|
|
endif()
|
|
|
|
|
2020-03-02 20:47:43 +00:00
|
|
|
add_test(NAME tint_unittests COMMAND tint_unittests)
|