yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
3b495e14
main
1# Copyright (C) 2020-2025 The Khronos Group Inc. 2# 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 9# Redistributions of source code must retain the above copyright 10# notice, this list of conditions and the following disclaimer. 11# 12# Redistributions in binary form must reproduce the above 13# copyright notice, this list of conditions and the following 14# disclaimer in the documentation and/or other materials provided 15# with the distribution. 16# 17# Neither the name of The Khronos Group Inc. nor the names of its 18# contributors may be used to endorse or promote products derived 19# from this software without specific prior written permission. 20# 21# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32# POSSIBILITY OF SUCH DAMAGE. 33 34# Suppress all warnings from external projects. 35set_property ( DIRECTORY APPEND PROPERTY COMPILE_OPTIONS -w ) 36 37if ( GLSLANG_TESTS) 38if ( TARGET gmock) 39message ( STATUS "Google Mock already configured - use it" ) 40elseif ( IS_DIRECTORY ${ CMAKE_CURRENT_SOURCE_DIR } /googletest) 41# We need to make sure Google Test does not mess up with the 42# global CRT settings on Windows. 43if ( WIN32) 44set ( gtest_force_shared_crt ON CACHE BOOL "" FORCE ) 45endif () 46# EXCLUDE_FROM_ALL keeps the install target from installing GTEST files. 47add_subdirectory ( googletest EXCLUDE_FROM_ALL ) 48set ( GTEST_TARGETS 49gtest 50gtest_main 51gmock 52gmock_main ) 53foreach ( target${ GTEST_TARGETS }) 54set_property ( TARGET ${ target } PROPERTY FOLDER gtest ) 55endforeach () 56mark_as_advanced ( gmock_build_tests 57BUILD_GMOCK 58BUILD_GTEST 59BUILD_SHARED_LIBS 60gtest_build_samples 61gtest_build_tests 62gtest_disable_pthreads 63gtest_force_shared_crt 64gtest_hide_internal_symbols ) 65else () 66message ( STATUS 67"Google Mock was not found - tests based on that will not build" ) 68endif () 69endif () 70 71if ( ENABLE_OPTAND NOT TARGET SPIRV-Tools-opt) 72if ( IS_DIRECTORY ${ CMAKE_CURRENT_SOURCE_DIR } /spirv-tools) 73set ( SPIRV_SKIP_TESTS ON CACHE BOOL "Skip building SPIRV-Tools tests" ) 74add_subdirectory ( spirv-tools ) 75endif () 76endif () 77