Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake gen when HLSL_BUILD_DXILCONV=0 #6911

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ option(HLSL_ENABLE_FIXED_VER "Reads version information from a file." OFF) # HLS
option(HLSL_ENABLE_ANALYZE "Enables compiler analysis during compilation." OFF) # HLSL Change
option(HLSL_OPTIONAL_PROJS_IN_DEFAULT "Include optional projects in default build target." OFF) # HLSL Change
option(HLSL_BUILD_DXILCONV "Include DXBC to DXIL converter and tools." ON) # HLSL Change
option(HLSL_BUILD_DXILDLL "Build dxildll." ON) # HLSL Change

option(HLSL_ENABLE_DEBUG_ITERATORS "Disable debug iterators for faster debug and to remove some additional allocations with improper noexcept attribution" OFF) # HLSL Change

Expand Down
11 changes: 9 additions & 2 deletions projects/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
set(DXC_PROJECTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(DXC_PROJECTS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})

if(WIN32 AND HLSL_BUILD_DXILCONV)
add_subdirectory(include/Tracing)
if(WIN32)

if(HLSL_BUILD_DXILCONV OR HLSL_BUILD_DXILDLL)
add_subdirectory(include/Tracing) # DxcRuntimeEtw target
endif (HLSL_BUILD_DXILCONV OR HLSL_BUILD_DXILDLL)

if (HLSL_BUILD_DXILCONV)
add_subdirectory(dxilconv)
endif (WIN32 AND HLSL_BUILD_DXILCONV)

endif (WIN32)
7 changes: 4 additions & 3 deletions tools/clang/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ endif()
set(CLANG_TEST_DEPS dxc dxa dxopt dxl dxv dxr dxcompiler clang-tblgen llvm-config opt FileCheck count not ClangUnitTests)
if (WIN32)
list(APPEND CLANG_TEST_DEPS
dxc_batch ExecHLSLTests dxildll
dxc_batch ExecHLSLTests
)
else()
endif()
if (HLSL_BUILD_DXILDLL)
list(APPEND CLANG_TEST_DEPS
dxildll
)
endif()
else()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else()
endif()

add_custom_target(clang-test-depends DEPENDS ${CLANG_TEST_DEPS})
set_target_properties(clang-test-depends PROPERTIES FOLDER "Clang tests")
# HLSL Change End
Expand Down
4 changes: 3 additions & 1 deletion tools/clang/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ add_subdirectory(dxcompiler)
add_subdirectory(dxclib)
add_subdirectory(dxc)
add_subdirectory(dxcvalidator)
add_subdirectory(dxildll)
if (HLSL_BUILD_DXILDLL)
add_subdirectory(dxildll)
endif()
add_subdirectory(dxa)
add_subdirectory(dxopt)
add_subdirectory(dxl)
Expand Down
Loading