mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
Use commandline options instead of ENV variables
This commit is contained in:
parent
7d623e1c90
commit
3290d38011
@ -151,7 +151,7 @@ endfunction(glslang_set_link_args)
|
||||
# otherwise, it will find the wrong version and fail later
|
||||
if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
|
||||
# We depend on these for later projects, so they should come first.
|
||||
add_subdirectory(External)
|
||||
endif()
|
||||
@ -189,24 +189,17 @@ if(BUILD_TESTING)
|
||||
set(IGNORE_CR_FLAG -o igncr)
|
||||
endif()
|
||||
|
||||
add_test(NAME glslang-testsuite
|
||||
COMMAND bash ${IGNORE_CR_FLAG} runtests
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Test/)
|
||||
|
||||
|
||||
if (CMAKE_CONFIGURATION_TYPES)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT GLSLANG_PATH=${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT SPIRV_REMAP_PATH=${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/spirv-remap)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT GLSLANG_TEST_RESULTS=${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
|
||||
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/localResults)
|
||||
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/glslangValidator)
|
||||
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$<CONFIGURATION>/spirv-remap)
|
||||
else(CMAKE_CONFIGURATION_TYPES)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT GLSLANG_PATH=${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT SPIRV_REMAP_PATH=${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
|
||||
set_property(TEST glslang-testsuite APPEND PROPERTY
|
||||
ENVIRONMENT GLSLANG_TEST_RESULTS=${CMAKE_CURRENT_BINARY_DIR}/localResults)
|
||||
set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults)
|
||||
set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator)
|
||||
set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap)
|
||||
endif(CMAKE_CONFIGURATION_TYPES)
|
||||
|
||||
add_test(NAME glslang-testsuite
|
||||
COMMAND bash ${IGNORE_CR_FLAG} runtests ${RESULTS_PATH} ${VALIDATOR_PATH} ${REMAP_PATH}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Test/)
|
||||
endif(BUILD_TESTING)
|
||||
|
@ -1,9 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TARGETDIR=${GLSLANG_TEST_RESULTS:-localResults}
|
||||
# Arguments:
|
||||
# 1- TargetDirectory, where to write test results and intermediary files
|
||||
# 2- Path to glslangValidator
|
||||
# 3- Path to spirv-remap
|
||||
|
||||
TARGETDIR=${1:-localResults}
|
||||
BASEDIR=baseResults
|
||||
EXE=${GLSLANG_PATH:-../build/install/bin/glslangValidator}
|
||||
REMAPEXE=${SPIRV_REMAP_PATH:-../build/install/bin/spirv-remap}
|
||||
EXE=${2:-../build/install/bin/glslangValidator}
|
||||
REMAPEXE=${3:-../build/install/bin/spirv-remap}
|
||||
HASERROR=0
|
||||
mkdir -p $TARGETDIR
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user