From 2db15080085856ed9b5f20642dbb354aac59a888 Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Wed, 17 Jul 2024 12:53:19 -0500 Subject: Move the file public header files to `include` dir (#4636) * Move the file public header files to `include` dir Close the issue (#4635). Move the following headers files to a `include` dir located at root dir of slang repo: slang-com-helper.h -> include/slang-com-helper.h slang-com-ptr.h -> include/slang-com-ptr.h slang-gfx.h -> include/slang-gfx.h slang.h -> include/slang.h Change cmake/SlangTarget.cmake to add include path to every target, and change the source file to use "#include " to include the public headers. The source code update is by the script like follow: ``` fileNames_slang=$(grep -r "\".*slang\.h\"" source/ -l) for fileName in "${fileNames_slang[@]}" do echo "$fileName" sed -i "s/\".*slang\.h\"/\"slang\.h\"/" $fileName done ``` * Fix the test issues * Fix cpu test issues by adding include seach path * Update cmake to not add include path for every target Also change "#include " to "include "slang.h" " to make the coding style consistent with other slang code. * Change public include to private include for unit-test and slang-glslang --- tools/render-test/diagnostics.h | 2 +- tools/render-test/options.h | 4 ++-- tools/render-test/slang-support.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/render-test') diff --git a/tools/render-test/diagnostics.h b/tools/render-test/diagnostics.h index 08ba28e27..fa4c8a389 100644 --- a/tools/render-test/diagnostics.h +++ b/tools/render-test/diagnostics.h @@ -7,7 +7,7 @@ #include "../../source/compiler-core/slang-source-loc.h" #include "../../source/compiler-core/slang-diagnostic-sink.h" -#include "../../slang.h" +#include "slang.h" namespace Slang { diff --git a/tools/render-test/options.h b/tools/render-test/options.h index 6ea166833..1400f0129 100644 --- a/tools/render-test/options.h +++ b/tools/render-test/options.h @@ -7,14 +7,14 @@ #define SLANG_HANDLE_RESULT_FAIL(x) assert(!"failure") #endif -#include "../../slang-com-helper.h" +#include "slang-com-helper.h" #include "../../source/core/slang-writer.h" #include "../../source/core/slang-process-util.h" #include "../../source/compiler-core/slang-command-line-args.h" -#include "../../slang-gfx.h" +#include "slang-gfx.h" namespace renderer_test { diff --git a/tools/render-test/slang-support.h b/tools/render-test/slang-support.h index 6eef93edc..0ed6216a9 100644 --- a/tools/render-test/slang-support.h +++ b/tools/render-test/slang-support.h @@ -3,7 +3,7 @@ #include "slang-gfx.h" -#include +#include "slang.h" #include "shader-input-layout.h" #include "options.h" -- cgit v1.2.3