Prevent Effcee install his things when build spirv-tools with testing enabled (#3256)

This commit is contained in:
Gustavo Alvarez 2020-05-19 16:29:31 +02:00 committed by GitHub
parent 85c7e7956b
commit b75dbf82a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,7 +88,7 @@ if (NOT ${SPIRV_SKIP_TESTS})
set(RE2_BUILD_TESTING OFF CACHE STRING "Run RE2 Tests")
if (NOT RE2_SOURCE_DIR)
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/re2)
set(RE2_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/re2" CACHE STRING "RE2 source dir" )
set(RE2_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/re2" CACHE STRING "RE2 source dir" )
endif()
endif()
endif()
@ -98,13 +98,17 @@ if (NOT ${SPIRV_SKIP_TESTS})
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/effcee)
# If we're configuring RE2 (via Effcee), then turn off RE2 testing.
if (NOT TARGET re2)
set(RE2_BUILD_TESTING OFF)
set(RE2_BUILD_TESTING OFF)
endif()
if (MSVC)
# SPIRV-Tools uses the shared CRT with MSVC. Tell Effcee to do the same.
set(EFFCEE_ENABLE_SHARED_CRT ON)
# SPIRV-Tools uses the shared CRT with MSVC. Tell Effcee to do the same.
set(EFFCEE_ENABLE_SHARED_CRT ON)
endif()
add_subdirectory(effcee)
set(EFFCEE_BUILD_SAMPLES OFF CACHE BOOL "Do not build Effcee examples")
if (NOT TARGET effcee)
set(EFFCEE_BUILD_TESTING OFF CACHE BOOL "Do not build Effcee test suite")
endif()
add_subdirectory(effcee EXCLUDE_FROM_ALL)
set_property(TARGET effcee PROPERTY FOLDER Effcee)
# Turn off warnings for effcee and re2
set_property(TARGET effcee APPEND PROPERTY COMPILE_OPTIONS -w)