1
- list (APPEND DXC_CMAKE_ARGS "-DHLSL_OPTIONAL_PROJS_IN_DEFAULT:BOOL=OFF" )
2
- list (APPEND DXC_CMAKE_ARGS "-DHLSL_ENABLE_ANALYZE:BOOL=OFF" )
3
- list (APPEND DXC_CMAKE_ARGS "-DHLSL_OFFICIAL_BUILD:BOOL=OFF" )
4
- list (APPEND DXC_CMAKE_ARGS "-DHLSL_ENABLE_FIXED_VER:BOOL=OFF" )
5
- list (APPEND DXC_CMAKE_ARGS "-DHLSL_ENABLE_FIXED_VER:BOOL=OFF" )
6
- list (APPEND DXC_CMAKE_ARGS "-DHLSL_FIXED_VERSION_LOCATION:STRING=" )
7
- list (APPEND DXC_CMAKE_ARGS "-DHLSL_BUILD_DXILCONV:BOOL=ON" )
8
- list (APPEND DXC_CMAKE_ARGS "-DCLANG_VENDOR:STRING=" )
9
- list (APPEND DXC_CMAKE_ARGS "-DENABLE_SPIRV_CODEGEN:BOOL=ON" )
10
- list (APPEND DXC_CMAKE_ARGS "-DSPIRV_BUILD_TESTS:BOOL=OFF" )
11
- list (APPEND DXC_CMAKE_ARGS "-DCLANG_ENABLE_ARCMT:BOOL=OFF" )
12
- list (APPEND DXC_CMAKE_ARGS "-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF" )
13
- list (APPEND DXC_CMAKE_ARGS "-DCLANG_INCLUDE_TESTS:BOOL=Off" )
14
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_INCLUDE_TESTS:BOOL=Off" )
15
- list (APPEND DXC_CMAKE_ARGS "-DHLSL_INCLUDE_TESTS:BOOL=OFF" )
16
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_TARGETS_TO_BUILD:STRING=None" )
17
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_INCLUDE_DOCS:BOOL=OFF" )
18
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_INCLUDE_TESTS:BOOL=OFF" )
19
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_INCLUDE_EXAMPLES:BOOL=OFF" )
20
- list (APPEND DXC_CMAKE_ARGS "-DLIBCLANG_BUILD_STATIC:BOOL=ON" )
21
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_OPTIMIZED_TABLEGEN:BOOL=OFF" )
22
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_REQUIRES_EH:BOOL=ON" )
23
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_APPEND_VC_REV:BOOL=ON" )
24
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_ENABLE_RTTI:BOOL=ON" )
25
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_ENABLE_EH:BOOL=ON" )
26
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_DEFAULT_TARGET_TRIPLE:STRING=dxil-ms-dx" )
27
- list (APPEND DXC_CMAKE_ARGS "-DCLANG_BUILD_EXAMPLES:BOOL=OFF" )
28
- list (APPEND DXC_CMAKE_ARGS "-DLLVM_REQUIRES_RTTI:BOOL=ON" )
29
- list (APPEND DXC_CMAKE_ARGS "-DCLANG_CL:BOOL=OFF" )
30
- list (APPEND DXC_CMAKE_ARGS "-DCMAKE_SYSTEM_VERSION=10.0.17763.0" )
31
- list (APPEND DXC_CMAKE_ARGS "-DDXC_BUILD_ARCH=x64" )
1
+ set (HLSL_OPTIONAL_PROJS_IN_DEFAULT OFF CACHE BOOL "" )
2
+ set (HLSL_ENABLE_ANALYZE OFF CACHE BOOL "" )
3
+ set (HLSL_OFFICIAL_BUILD OFF CACHE BOOL "" )
4
+ set (HLSL_ENABLE_FIXED_VER OFF CACHE BOOL "" )
5
+ set (HLSL_ENABLE_FIXED_VER OFF CACHE BOOL "" )
6
+ set (HLSL_FIXED_VERSION_LOCATION "" CACHE STRING "" )
7
+ set (HLSL_BUILD_DXILCONV ON CACHE BOOL "" )
8
+ set (CLANG_VENDOR "" CACHE STRING "" )
9
+ set (ENABLE_SPIRV_CODEGEN ON CACHE BOOL "" )
10
+ set (SPIRV_BUILD_TESTS OFF CACHE BOOL "" )
11
+ set (CLANG_ENABLE_ARCMT OFF CACHE BOOL "" )
12
+ set (CLANG_ENABLE_STATIC_ANALYZER OFF CACHE BOOL "" )
13
+ set (CLANG_INCLUDE_TESTS Off CACHE BOOL "" )
14
+ set (LLVM_INCLUDE_TESTS Off CACHE BOOL "" )
15
+ set (HLSL_INCLUDE_TESTS OFF CACHE BOOL "" )
16
+ set (LLVM_TARGETS_TO_BUILD None CACHE STRING "" )
17
+ set (LLVM_INCLUDE_DOCS OFF CACHE BOOL "" )
18
+ set (LLVM_INCLUDE_TESTS OFF CACHE BOOL "" )
19
+ set (LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "" )
20
+ set (LIBCLANG_BUILD_STATIC ON CACHE BOOL "" )
21
+ set (LLVM_OPTIMIZED_TABLEGEN OFF CACHE BOOL "" )
22
+ set (LLVM_REQUIRES_EH ON CACHE BOOL "" )
23
+ set (LLVM_APPEND_VC_REV ON CACHE BOOL "" )
24
+ set (LLVM_ENABLE_RTTI ON CACHE BOOL "" )
25
+ set (LLVM_ENABLE_EH ON CACHE BOOL "" )
26
+ set (LLVM_DEFAULT_TARGET_TRIPLE "dxil-ms-dx" CACHE STRING "" )
27
+ set (CLANG_BUILD_EXAMPLES OFF CACHE BOOL "" )
28
+ set (LLVM_REQUIRES_RTTI ON CACHE BOOL "" )
29
+ set (CLANG_CL OFF CACHE BOOL "" )
30
+ set (LLVM_ENABLE_WERROR OFF CACHE BOOL "" FORCE )
31
+ set (SPIRV_WERROR OFF CACHE BOOL "" FORCE )
32
+ #set(CMAKE_SYSTEM_VERSION=10.0.17763.0")
33
+ set (DXC_BUILD_ARCH x64 CACHE STRING "" )
34
+ set (SPIRV_HEADERS_SKIP_INSTALL ON CACHE INTERNAL "Skip SPIRV-Headers install" )
35
+ set (SPIRV_HEADERS_SKIP_EXAMPLES ON CACHE INTERNAL "Skip SPIRV-Headers examples" )
36
+ set (SKIP_SPIRV_TOOLS_INSTALL ON CACHE INTERNAL "Skip SPIRV-Tools install" )
37
+ set (SPIRV_SKIP_TESTS ON CACHE INTERNAL "Skip SPIRV-Tools tests" )
38
+ set (SPIRV_SKIP_EXECUTABLES ON CACHE INTERNAL "Skip SPIRV-Tools executable build" )
32
39
33
- set (_DXC_CURRENT_CONFIG_ "$<IF:$<CONFIG:Debug>,Debug,Release>" )
34
- set (DXC_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR} /dxc" CACHE INTERNAL "" )
35
- set (DXC_BINARY_DIR_EP "${CMAKE_CURRENT_BINARY_DIR} /external/dxc" CACHE INTERNAL "" )
36
- set (DXC_BINARY_DIR_GE "${DXC_BINARY_DIR_EP} /build" CACHE INTERNAL "" )
37
- set (DXC_BIN_DIR "${DXC_BINARY_DIR_GE} /Release/bin" CACHE INTERNAL "" ) # hardcoded
38
- set (DXC_LIB_DIR "${DXC_BINARY_DIR_GE} /${_DXC_CURRENT_CONFIG_} /lib" CACHE INTERNAL "" ) # library path depends on the configuration
39
- set (DXC_EXECUTABLE "${DXC_BIN_DIR} /dxc.exe" CACHE INTERNAL "" )
40
- set (DXC_DXCOMPILER_LIB "${DXC_LIB_DIR} /dxcompiler.lib" CACHE INTERNAL "" )
40
+ add_subdirectory (dxc dxc )
41
+
42
+ # TODO: change them
43
+ #set(_DXC_CURRENT_CONFIG_ "$<IF:$<CONFIG:Debug>,Debug,Release>")
44
+ #set(DXC_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dxc" CACHE INTERNAL "")
45
+ #set(DXC_BINARY_DIR_EP "${CMAKE_CURRENT_BINARY_DIR}/external/dxc" CACHE INTERNAL "")
46
+ #set(DXC_BINARY_DIR_GE "${DXC_BINARY_DIR_EP}/build" CACHE INTERNAL "")
47
+ #set(DXC_BIN_DIR "${DXC_BINARY_DIR_GE}/Release/bin" CACHE INTERNAL "") # hardcoded
48
+ #set(DXC_LIB_DIR "${DXC_BINARY_DIR_GE}/${_DXC_CURRENT_CONFIG_}/lib" CACHE INTERNAL "") # library path depends on the configuration
49
+ #set(DXC_EXECUTABLE "${DXC_BIN_DIR}/dxc.exe" CACHE INTERNAL "")
50
+ #set(DXC_DXCOMPILER_LIB "${DXC_LIB_DIR}/dxcompiler.lib" CACHE INTERNAL "")
41
51
42
52
# DXC External Project
43
53
# builds DXC executable target and dxcompiler library target
44
54
# we cannot include it to Nabla's BS because DXC's BS isn't supposed to be added via submodule
45
55
# - there are troubles with linker input paths and include/link search directory paths
46
56
47
- ExternalProject_Add (dxc
48
- DOWNLOAD_COMMAND ""
49
- SOURCE_DIR "${DXC_SOURCE_DIR} "
50
- BINARY_DIR "${DXC_BINARY_DIR_EP} "
51
- BUILD_COMMAND "${CMAKE_COMMAND} " --build "${DXC_BINARY_DIR_GE} " --config Release --target dxc -v # DXC executable will be compiled always in Release mode
52
- COMMAND "${CMAKE_COMMAND} " --build "${DXC_BINARY_DIR_GE} " --config ${_DXC_CURRENT_CONFIG_} --target dxcompiler -v
53
- CONFIGURE_COMMAND "${CMAKE_COMMAND} " -S "${DXC_SOURCE_DIR} " -B "${DXC_BINARY_DIR_GE} " -G "${CMAKE_GENERATOR} " "-Ax64" -T "${CMAKE_GENERATOR_TOOLSET} " ${DXC_CMAKE_ARGS}
54
- INSTALL_COMMAND ""
55
- TEST_COMMAND ""
56
- LOG_INSTALL 1
57
- )
57
+ # ExternalProject_Add(dxc
58
+ # DOWNLOAD_COMMAND ""
59
+ # SOURCE_DIR "${DXC_SOURCE_DIR}"
60
+ # BINARY_DIR "${DXC_BINARY_DIR_EP}"
61
+ # BUILD_COMMAND "${CMAKE_COMMAND}" --build "${DXC_BINARY_DIR_GE}" --config Release --target dxc -v # DXC executable will be compiled always in Release mode
62
+ # COMMAND "${CMAKE_COMMAND}" --build "${DXC_BINARY_DIR_GE}" --config ${_DXC_CURRENT_CONFIG_} --target dxcompiler -v
63
+ # CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${DXC_SOURCE_DIR}" -B "${DXC_BINARY_DIR_GE}" -G "${CMAKE_GENERATOR}" "-Ax64" -T "${CMAKE_GENERATOR_TOOLSET}" ${DXC_CMAKE_ARGS}
64
+ # INSTALL_COMMAND ""
65
+ # TEST_COMMAND ""
66
+ # LOG_INSTALL 1
67
+ # )
58
68
59
69
unset (DXC_CMAKE_ARGS )
60
70
unset (_DXC_CURRENT_CONFIG_ )
61
71
62
- if (_NBL_ENABLE_DXC_COMPILE_TESTS_ )
63
- add_subdirectory (CT CT )
64
- endif ()
72
+ # if(_NBL_ENABLE_DXC_COMPILE_TESTS_)
73
+ # add_subdirectory(CT CT)
74
+ # endif()
0 commit comments