Lines Matching +full:libspirv +full:- +full:tools
1 # Copyright (c) 2015-2016 The Khronos Group Inc.
7 # http://www.apache.org/licenses/LICENSE-2.0
27 project(spirv-tools)
29 set(SPIRV_TOOLS "SPIRV-Tools")
40 add_definitions(-DSPIRV_LINUX)
43 add_definitions(-DSPIRV_WINDOWS)
45 add_definitions(-DSPIRV_WINDOWS)
47 add_definitions(-DSPIRV_MAC)
49 add_definitions(-DSPIRV_ANDROID)
52 add_definitions(-DSPIRV_FREEBSD)
58 add_definitions(-DSPIRV_TIMER_ENABLED)
71 option(SPIRV_BUILD_COMPRESSION "Build SPIR-V compressing codec" OFF)
78 set(SPIRV_WARNINGS -Wall -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers)
81 set(SPIRV_WARNINGS ${SPIRV_WARNINGS} -Wno-self-assign)
84 option(SPIRV_WARN_EVERYTHING "Enable -Weverything" ${SPIRV_WARN_EVERYTHING})
88 -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded)
90 set(SPIRV_WARNINGS ${SPIRV_WARNINGS} -Wpedantic -pedantic-errors)
98 set(SPIRV_WARNINGS ${SPIRV_WARNINGS} -Werror)
101 set(SPIRV_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS /wd4800)
112 add_definitions(-DSPIRV_COLOR_TERMINAL)
117 add_definitions(-DSPIRV_LOG_DEBUG)
129 -std=c++11 -fno-exceptions -fno-rtti)
131 -Wall -Wextra -Wno-long-long -Wshadow -Wundef -Wconversion
132 -Wno-sign-conversion)
135 target_compile_options(${TARGET} PRIVATE -fno-omit-frame-pointer)
142 -fsanitize=${SPIRV_USE_SANITIZER})
145 -ftemplate-depth=1024)
148 -Wno-missing-field-initializers)
153 # Specify /EHs for exception handling. This makes using SPIRV-Tools as
163 LINK_FLAGS -static -static-libgcc -static-libstdc++)
187 add_test(NAME spirv-tools-symbol-exports-${TARGET}
189 ${spirv-tools_SOURCE_DIR}/utils/check_symbol_exports.py "$<TARGET_FILE:${TARGET}>")
214 add_definitions(-DSPIRV_CHECK_CONTEXT)
232 add_subdirectory(tools)
240 ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv-tools/libspirv.h
241 ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv-tools/libspirv.hpp
242 ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv-tools/optimizer.hpp
243 ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv-tools/linker.hpp
244 ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv-tools/instrument.hpp
246 ${CMAKE_INSTALL_INCLUDEDIR}/spirv-tools/)
250 add_test(NAME spirv-tools-copyrights
255 set(SPIRV_LIBRARIES "-lSPIRV-Tools -lSPIRV-Tools-link -lSPIRV-Tools-opt")
256 set(SPIRV_SHARED_LIBRARIES "-lSPIRV-Tools-shared")
258 set(SPIRV_LIBRARIES "${SPIRV_LIBRARIES} -lSPIRV-Tools-comp")
261 # Build pkg-config file
262 # Use a first-class target so it's regenerated when relevant files are updated.
263 add_custom_target(spirv-tools-pkg-config ALL
265 -DCHANGES_FILE=${CMAKE_CURRENT_SOURCE_DIR}/CHANGES
266 -DTEMPLATE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/SPIRV-Tools.pc.in
267 -DOUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools.pc
268 -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
269 -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
270 -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
271 -DSPIRV_LIBRARIES=${SPIRV_LIBRARIES}
272 -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake
273 DEPENDS "CHANGES" "cmake/SPIRV-Tools.pc.in" "cmake/write_pkg_config.cmake")
274 add_custom_target(spirv-tools-shared-pkg-config ALL
276 -DCHANGES_FILE=${CMAKE_CURRENT_SOURCE_DIR}/CHANGES
277 -DTEMPLATE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/SPIRV-Tools-shared.pc.in
278 -DOUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools-shared.pc
279 -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
280 -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
281 -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
282 -DSPIRV_SHARED_LIBRARIES=${SPIRV_SHARED_LIBRARIES}
283 -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake
284 DEPENDS "CHANGES" "cmake/SPIRV-Tools-shared.pc.in" "cmake/write_pkg_config.cmake")
286 # Install pkg-config file
290 ${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools.pc
291 ${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools-shared.pc