Skip to content

Commit b640fa4

Browse files
committed
Cleanup and minor changes to improve integration with internal projects (#3199)
* Cleanup and minor changes to improve integration with internal projects Adds -Debug option to hcttest.cmd * Case insensitive compare for -Debug and -Release flags in hctbuild and hcttest
1 parent a1b3f67 commit b640fa4

6 files changed

Lines changed: 13 additions & 6 deletions

File tree

cmake/modules/FindDiaSDK.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ elseif (CMAKE_GENERATOR MATCHES "Visual Studio.*ARM" OR CMAKE_GENERATOR_PLATFORM
3434
else (CMAKE_GENERATOR MATCHES "Visual Studio.*Win64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
3535
find_library(DIASDK_GUIDS_LIBRARY NAMES diaguids.lib
3636
HINTS ${DIASDK_INCLUDE_DIR}/../lib )
37-
endif (CMAKE_GENERATOR MATCHES "Visual Studio.*Win64" )
37+
endif (CMAKE_GENERATOR MATCHES "Visual Studio.*Win64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x64")
3838

3939
set(DIASDK_LIBRARIES ${DIASDK_GUIDS_LIBRARY})
4040
set(DIASDK_INCLUDE_DIRS ${DIASDK_INCLUDE_DIR})

include/dxc/Test/HlslTestUtils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727

2828
using namespace std;
2929

30+
#ifndef HLSLDATAFILEPARAM
3031
#define HLSLDATAFILEPARAM L"HlslDataDir"
32+
#endif
33+
34+
#ifndef FILECHECKDUMPDIRPARAM
3135
#define FILECHECKDUMPDIRPARAM L"FileCheckDumpDir"
36+
#endif
3237

3338
// If TAEF verify macros are available, use them to alias other legacy
3439
// comparison macros that don't have a direct translation.

tools/clang/unittests/HLSL/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ if(WIN32)
104104
include_directories(${TAEF_INCLUDE_DIRS})
105105
include_directories(${DIASDK_INCLUDE_DIRS})
106106
include_directories(${D3D12_INCLUDE_DIRS})
107-
107+
include_directories(${LLVM_MAIN_INCLUDE_DIR}/dxc/Test)
108108
endif(WIN32)
109109

110110
# Add includes to directly reference intrinsic tables.

tools/clang/unittests/HLSL/ShaderOpTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "dxc/Support/dxcapi.use.h" // DxcDllSupport
2626
#include "dxc/DXIL/DxilConstants.h" // ComponentType
2727
#include "WexTestClass.h" // TAEF
28-
#include "dxc/Test/HLSLTestUtils.h" // LogCommentFmt
28+
#include "HLSLTestUtils.h" // LogCommentFmt
2929

3030
#include <stdlib.h>
3131
#include <DirectXMath.h>

utils/hct/hctbuild.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ if /i "%1"=="-arm64" (
119119
set BUILD_ARCH=ARM64
120120
shift /1
121121
)
122-
if "%1"=="-Debug" (
122+
if /i "%1"=="-Debug" (
123123
set BUILD_CONFIG=Debug
124124
shift /1
125125
)
126-
if "%1"=="-Release" (
126+
if /i "%1"=="-Release" (
127127
set BUILD_CONFIG=Release
128128
shift /1
129129
)

utils/hct/hcttest.cmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ if "%1"=="-clean" (
138138
set GENERATOR_NINJA=1
139139
) else if "%1"=="-rel" (
140140
set BUILD_CONFIG=Release
141-
) else if "%1"=="-Release" (
141+
) else if /i "%1"=="-Release" (
142142
set BUILD_CONFIG=Release
143+
) else if /i "%1"=="-Debug" (
144+
set BUILD_CONFIG=Debug
143145
) else if "%1"=="-x86" (
144146
rem Allow BUILD_ARCH override. This may be used by HCT_EXTRAS scripts.
145147
set BUILD_ARCH=Win32

0 commit comments

Comments
 (0)