Browse Source

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
Helena Kotas 4 years ago
parent
commit
c565b3d20b

+ 1 - 1
cmake/modules/FindDiaSDK.cmake

@@ -34,7 +34,7 @@ elseif (CMAKE_GENERATOR MATCHES "Visual Studio.*ARM" OR CMAKE_GENERATOR_PLATFORM
 else (CMAKE_GENERATOR MATCHES "Visual Studio.*Win64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
   find_library(DIASDK_GUIDS_LIBRARY NAMES diaguids.lib
                HINTS ${DIASDK_INCLUDE_DIR}/../lib )
-endif (CMAKE_GENERATOR MATCHES "Visual Studio.*Win64" )
+endif (CMAKE_GENERATOR MATCHES "Visual Studio.*Win64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "x64")
 
 set(DIASDK_LIBRARIES ${DIASDK_GUIDS_LIBRARY})
 set(DIASDK_INCLUDE_DIRS ${DIASDK_INCLUDE_DIR})

+ 5 - 0
include/dxc/Test/HlslTestUtils.h

@@ -27,8 +27,13 @@
 
 using namespace std;
 
+#ifndef HLSLDATAFILEPARAM
 #define HLSLDATAFILEPARAM L"HlslDataDir"
+#endif
+
+#ifndef FILECHECKDUMPDIRPARAM
 #define FILECHECKDUMPDIRPARAM L"FileCheckDumpDir"
+#endif
 
 // If TAEF verify macros are available, use them to alias other legacy
 // comparison macros that don't have a direct translation.

+ 1 - 1
tools/clang/unittests/HLSL/CMakeLists.txt

@@ -104,7 +104,7 @@ if(WIN32)
 include_directories(${TAEF_INCLUDE_DIRS})
 include_directories(${DIASDK_INCLUDE_DIRS})
 include_directories(${D3D12_INCLUDE_DIRS})
-
+include_directories(${LLVM_MAIN_INCLUDE_DIR}/dxc/Test)
 endif(WIN32)
 
 # Add includes to directly reference intrinsic tables.

+ 1 - 1
tools/clang/unittests/HLSL/ShaderOpTest.cpp

@@ -25,7 +25,7 @@
 #include "dxc/Support/dxcapi.use.h" // DxcDllSupport
 #include "dxc/DXIL/DxilConstants.h" // ComponentType
 #include "WexTestClass.h"           // TAEF
-#include "dxc/Test/HLSLTestUtils.h"          // LogCommentFmt
+#include "HLSLTestUtils.h"          // LogCommentFmt
 
 #include <stdlib.h>
 #include <DirectXMath.h>

+ 2 - 2
utils/hct/hctbuild.cmd

@@ -119,11 +119,11 @@ if /i "%1"=="-arm64" (
   set BUILD_ARCH=ARM64
   shift /1
 )
-if "%1"=="-Debug" (
+if /i "%1"=="-Debug" (
   set BUILD_CONFIG=Debug
   shift /1
 )
-if "%1"=="-Release" (
+if /i "%1"=="-Release" (
   set BUILD_CONFIG=Release
   shift /1
 )

+ 3 - 1
utils/hct/hcttest.cmd

@@ -138,8 +138,10 @@ if "%1"=="-clean" (
   set GENERATOR_NINJA=1
 ) else if "%1"=="-rel" (
   set BUILD_CONFIG=Release
-) else if "%1"=="-Release" (
+) else if /i "%1"=="-Release" (
   set BUILD_CONFIG=Release
+) else if /i "%1"=="-Debug" (
+  set BUILD_CONFIG=Debug
 ) else if "%1"=="-x86" (
   rem Allow BUILD_ARCH override.  This may be used by HCT_EXTRAS scripts.
   set BUILD_ARCH=Win32