Fix error in CMakeLists.txt of examples.

Submitted by Chuanbo Weng on June 18, 2015, 8:12 a.m.

Details

Message ID 1434615130-8034-1-git-send-email-chuanbo.weng@intel.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Chuanbo Weng June 18, 2015, 8:12 a.m.
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@intel.com>
---
 examples/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

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

Comments

LGTM, pushed. Thanks.

> -----Original Message-----

> From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf Of

> Chuanbo Weng

> Sent: Thursday, June 18, 2015 16:12

> To: beignet@lists.freedesktop.org

> Cc: Weng, Chuanbo

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

> 

> 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@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

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

> http://lists.freedesktop.org/mailman/listinfo/beignet