Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't add -frtti for tests. Use newer googletest. #37

Merged
merged 1 commit into from
Dec 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,6 @@ if (NOT ${SPIRV_SKIP_EXECUTABLES})

add_executable(UnitSPIRV ${TEST_SOURCES})
default_compile_options(UnitSPIRV)
if (UNIX)
# The tests use mocking, and mocking requires runtime type information
# for the test classes. Until we adopt a version of gmock that avoids
# this problem (see https://github.com/google/googletest/issues/610),
# add RTTI.
target_compile_options(UnitSPIRV PRIVATE -frtti)
endif()
target_include_directories(UnitSPIRV PRIVATE
${gmock_SOURCE_DIR}/include ${gtest_SOURCE_DIR}/include)
target_link_libraries(UnitSPIRV PRIVATE ${SPIRV_TOOLS} gmock)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ source is not provided with this project. Download the `googletest` source
into the `<spirv-dir>/external/googletest` directory before configuring
and building the project.

*Note*: You must use a version of googletest that includes
[a fix](https://github.com/google/googletest/pull/612) for
[googletest issue 610](https://github.com/google/googletest/issues/610).
The fix is included on the googletest master branch any time after 2015-11-10.
In particular, googletest must be newer than version 1.7.0.

## Build

The project uses [CMake](https://cmake.org/) to generate platform-specific
Expand Down