[Beignet] [PATCH] Fix error in CMakeLists.txt of examples.

Chuanbo Weng chuanbo.weng at intel.com
Thu Jun 18 01:12:10 PDT 2015


We check the content of thirdparty/libva by ls command to determine
to clone submodule or not, so use OUTPUT_VARIABLE instead of
RESULT_VARIABLE.

Signed-off-by: Chuanbo Weng <chuanbo.weng at intel.com>
---
 examples/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 2c13eac..fe4e5f6 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,9 +1,9 @@
-EXECUTE_PROCESS(COMMAND ls "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva" RESULT_VARIABLE LS_RESULT)
-IF (NOT ("LS_RESULT" STREQUAL "0"))
+EXECUTE_PROCESS(COMMAND ls "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva" OUTPUT_VARIABLE LS_RESULT)
+IF ("LS_RESULT" STREQUAL "")
 EXECUTE_PROCESS(COMMAND git submodule init WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
 EXECUTE_PROCESS(COMMAND git submodule update WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
 EXECUTE_PROCESS(COMMAND git checkout master WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva)
-ENDIF (NOT ("LS_RESULT" STREQUAL "0"))
+ENDIF ("LS_RESULT" STREQUAL "")
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
                     ${CMAKE_CURRENT_SOURCE_DIR}/../utests
-- 
1.9.1



More information about the Beignet mailing list