summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-11-14 12:34:18 +0800
committerGitHub <noreply@github.com>2024-11-13 20:34:18 -0800
commit7b570feed42976a6e787d79a70aaf8e667745e58 (patch)
tree7f96139f9570de1e2c5747faf6ad489e029de535 /cmake
parentfdf106b543c756eebca7e90fe839fdf1902cc381 (diff)
Correct include dir for libslang (#5539)
This stops adding the repo root to the include path for anything linking with slang. This enabled a bunch of convenient includes, but might lead to confusing behavior for anyone including slang. Not to mention differences including it from an install vs source. Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/LLVM.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/LLVM.cmake b/cmake/LLVM.cmake
index e0b7d6241..3c7c1b543 100644
--- a/cmake/LLVM.cmake
+++ b/cmake/LLVM.cmake
@@ -79,6 +79,10 @@ function(fetch_or_build_slang_llvm)
LINK_WITH_PRIVATE core compiler-core llvm-dep clang-dep
# We include slang.h, but don't need to link with it
INCLUDE_FROM_PRIVATE slang
+ # We include tools/slang-test/filecheck.h, but don't need to link
+ # with it and it might not be a target if SLANG_ENABLE_TESTS is
+ # false, so just include the directory manually here
+ INCLUDE_DIRECTORIES_PRIVATE ${slang_SOURCE_DIR}/tools
# This uses the SLANG_DLL_EXPORT macro from slang.h, so make sure to set
# SLANG_DYNAMIC and SLANG_DYNAMIC_EXPORT
EXPORT_MACRO_PREFIX SLANG