File tree 1 file changed +19
-12
lines changed
1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -69,17 +69,24 @@ if(NO_PADDLE_SUBMODULE)
69
69
endif ()
70
70
71
71
# submodule Paddle first
72
- get_filename_component (REPO_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR} /../../"
73
- ABSOLUTE )
74
- message (STATUS "Run 'git submodule update --init Paddle' in ${REPO_SOURCE_DIR} " )
75
- execute_process (
76
- COMMAND git submodule update --init Paddle
77
- WORKING_DIRECTORY ${REPO_SOURCE_DIR}
78
- RESULT_VARIABLE result_var)
79
- if (NOT result_var EQUAL 0)
72
+ if (paddle_submodule)
80
73
message (
81
- FATAL_ERROR "Failed to get submodule Paddle', please check your network !" )
82
- endif ()
74
+ "Paddle submodule already exists, skip git submodule update --init Paddle" )
75
+ else ()
76
+ get_filename_component (REPO_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR} /../../"
77
+ ABSOLUTE )
78
+ message (
79
+ STATUS "Run 'git submodule update --init Paddle' in ${REPO_SOURCE_DIR} " )
80
+ execute_process (
81
+ COMMAND git submodule update --init Paddle
82
+ WORKING_DIRECTORY ${REPO_SOURCE_DIR}
83
+ RESULT_VARIABLE result_var)
84
+ if (NOT result_var EQUAL 0)
85
+ message (
86
+ FATAL_ERROR "Failed to get submodule Paddle', please check your network !"
87
+ )
88
+ endif ()
83
89
84
- get_filename_component (PADDLE_SOURCE_DIR "${REPO_SOURCE_DIR} /Paddle" ABSOLUTE )
85
- message (STATUS "PADDLE_SOURCE_DIR=${PADDLE_SOURCE_DIR} " )
90
+ get_filename_component (PADDLE_SOURCE_DIR "${REPO_SOURCE_DIR} /Paddle" ABSOLUTE )
91
+ message (STATUS "PADDLE_SOURCE_DIR=${PADDLE_SOURCE_DIR} " )
92
+ endif ()
You can’t perform that action at this time.
0 commit comments