blob: 7688eb8d5cf650bc60090c295e424c9a4f1d02a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
From 2bcf0e5097070532ebfb0bf0ee0b28e1065be1e8 Mon Sep 17 00:00:00 2001
From: Nick Sarnie <sarnex@gentoo.org>
Date: Tue, 22 May 2018 20:11:17 -0400
Subject: [PATCH] Use a file to get the spirv-tools commit ID
Signed-off-by: Nick Sarnie <sarnex@gentoo.org>
---
layers/CMakeLists.txt | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt
index 5b3758d1..2a9c2f32 100644
--- a/layers/CMakeLists.txt
+++ b/layers/CMakeLists.txt
@@ -51,6 +51,13 @@ macro(run_external_revision_generate symbol_name output)
)
endmacro()
+macro(run_external_revision_generate_spirv_tools source_dir symbol_name output)
+ add_custom_command(OUTPUT ${output}
+ COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/external_revision_generator.py --rev_file ${source_dir}/spirv-tools-commit.h -s ${symbol_name} -o ${output}
+ DEPENDS ${SCRIPTS_DIR}/external_revision_generator.py ${source_dir}/spirv-tools-commit.h
+ )
+endmacro()
+
# Custom targets for generated validation layer helper file dependencies
add_custom_target(spirv_tools_revision_file DEPENDS
spirv_tools_commit_id.h
@@ -78,7 +85,7 @@ run_vk_xml_generate(helper_file_generator.py vk_object_types.h)
run_vk_xml_generate(helper_file_generator.py vk_extension_helper.h)
run_vk_xml_generate(helper_file_generator.py vk_typemap_helper.h)
if(BUILD_LAYERS)
- run_external_revision_generate(SPIRV_TOOLS_COMMIT_ID spirv_tools_commit_id.h)
+ run_external_revision_generate_spirv_tools(/usr/include/spirv-tools SPIRV_TOOLS_COMMIT_ID spirv_tools_commit_id.h)
endif()
# Layer Utils Library
--
2.17.0
|