2 message(STATUS "Google Mock found - building tests")
5 # Framework related source files
6 ${CMAKE_CURRENT_SOURCE_DIR}/Initializer.h
7 ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
8 ${CMAKE_CURRENT_SOURCE_DIR}/Settings.cpp
9 ${CMAKE_CURRENT_SOURCE_DIR}/Settings.h
10 ${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.cpp
11 ${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.h
13 # Test related source files
14 ${CMAKE_CURRENT_SOURCE_DIR}/AST.FromFile.cpp
15 ${CMAKE_CURRENT_SOURCE_DIR}/BuiltInResource.FromFile.cpp
16 ${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp
17 ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp
20 add_executable(glslangtests ${TEST_SOURCES})
21 target_compile_definitions(glslangtests
22 PRIVATE GLSLANG_TEST_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/../Test")
23 target_include_directories(glslangtests PRIVATE
24 ${CMAKE_CURRENT_SOURCE_DIR}
26 ${gmock_SOURCE_DIR}/include
27 ${gtest_SOURCE_DIR}/include)
28 target_link_libraries(glslangtests PRIVATE
29 glslang OSDependent OGLCompiler glslang
30 SPIRV glslang-default-resource-limits gmock)
31 add_test(NAME glslang-gtests COMMAND glslangtests)