summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--utests/CMakeLists.txt5
2 files changed, 5 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index af782785..7d0ce0a7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,10 +5,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../include
${MESA_SOURCE_INCLUDES})
-set(GEN_PCI_ID)
-execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/GetGenID.sh"
+if (NOT GEN_PCI_ID)
+ execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/GetGenID.sh"
OUTPUT_VARIABLE GEN_PCI_ID)
-message(STATUS "Platform Gen PCI id is " ${GEN_PCI_ID})
+ message(STATUS "Platform Gen PCI id is " ${GEN_PCI_ID})
+ set(GEN_PCI_ID ${GEN_PCI_ID} PARENT_SCOPE)
+endif (NOT GEN_PCI_ID)
macro (MakeKernelBinStr KERNEL_PATH KERNEL_FILES)
foreach (KF ${KERNEL_FILES})
diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt
index 76bc56e1..d950e5d6 100644
--- a/utests/CMakeLists.txt
+++ b/utests/CMakeLists.txt
@@ -178,11 +178,6 @@ set (utests_sources
utest_file_map.cpp
utest_helper.cpp)
-set(GEN_PCI_ID)
-execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/../src/GetGenID.sh"
- OUTPUT_VARIABLE GEN_PCI_ID)
-
-message(STATUS "Platform Gen PCI id is " ${GEN_PCI_ID})
SET (kernel_bin ${CMAKE_CURRENT_SOURCE_DIR}/../kernels/compiler_ceil)
ADD_CUSTOM_COMMAND(
OUTPUT ${kernel_bin}.bin