glslang/gtests/CMakeLists.txt
Rex Xu c9e3c3c941 Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat.
- Add support of half float constant: hf, HF.
- Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=,
  *=, /=, ==, !=, >=, <=, >, <.
- Add support of type conversions: float16_t -> XXX, XXX -> float16_t.
- Add new built-in functions.
2016-09-30 16:13:06 +08:00

44 lines
1.6 KiB
CMake

if (TARGET gmock)
message(STATUS "Google Mock found - building tests")
set(TEST_SOURCES
# Framework related source files
${CMAKE_CURRENT_SOURCE_DIR}/Initializer.h
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Settings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Settings.h
${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.cpp
${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.h
# Test related source files
${CMAKE_CURRENT_SOURCE_DIR}/AST.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/BuiltInResource.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Config.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/HexFloat.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Hlsl.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp
# -- Remapper tests
${CMAKE_CURRENT_SOURCE_DIR}/Remap.FromFile.cpp
)
add_executable(glslangtests ${TEST_SOURCES})
set_property(TARGET glslangtests PROPERTY FOLDER tests)
glslang_set_link_args(glslangtests)
install(TARGETS glslangtests
RUNTIME DESTINATION bin)
target_compile_definitions(glslangtests
PRIVATE GLSLANG_TEST_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/../Test")
target_include_directories(glslangtests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}
${gmock_SOURCE_DIR}/include
${gtest_SOURCE_DIR}/include)
target_link_libraries(glslangtests PRIVATE
SPVRemapper glslang OSDependent OGLCompiler HLSL glslang
SPIRV glslang-default-resource-limits gmock)
add_test(NAME glslang-gtests COMMAND glslangtests)
endif()