File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,20 @@ if(NOT APPLE AND NOT ANDROID)
96
96
set (CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -pthread -ldl -lrt" )
97
97
endif (NOT APPLE AND NOT ANDROID )
98
98
99
+ set_property (GLOBAL PROPERTY FLUID_MODULES "" )
100
+ # find all fluid modules is used for paddle fluid static library
101
+ # for building inference libs
102
+ function (find_fluid_modules TARGET_NAME )
103
+ get_filename_component (__target_path ${TARGET_NAME} ABSOLUTE )
104
+ string (REGEX REPLACE "^${PADDLE_SOURCE_DIR} /" "" __target_path ${__target_path} )
105
+ string (FIND "${__target_path} " "fluid" pos )
106
+ if (pos GREATER 1 )
107
+ get_property (fluid_modules GLOBAL PROPERTY FLUID_MODULES )
108
+ set (fluid_modules ${fluid_modules} ${TARGET_NAME} )
109
+ set_property (GLOBAL PROPERTY FLUID_MODULES "${fluid_modules} " )
110
+ endif ()
111
+ endfunction (find_fluid_modules )
112
+
99
113
function (merge_static_libs TARGET_NAME )
100
114
set (libs ${ARGN} )
101
115
list (REMOVE_DUPLICATES libs )
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- set_property (GLOBAL PROPERTY FLUID_MODULES "" )
16
- # find all fluid modules is used for paddle fluid static library
17
- function (find_fluid_modules TARGET_NAME )
18
- get_filename_component (__target_path ${TARGET_NAME} ABSOLUTE )
19
- string (REGEX REPLACE "^${PADDLE_SOURCE_DIR} /" "" __target_path ${__target_path} )
20
- string (FIND "${__target_path} " "fluid" pos )
21
- if (pos GREATER 1 )
22
- get_property (fluid_modules GLOBAL PROPERTY FLUID_MODULES )
23
- set (fluid_modules ${fluid_modules} ${TARGET_NAME} )
24
- set_property (GLOBAL PROPERTY FLUID_MODULES "${fluid_modules} " )
25
- endif ()
26
- endfunction (find_fluid_modules )
27
-
28
15
# make package for paddle fluid shared and static library
29
16
function (copy TARGET )
30
17
set (options "" )
You can’t perform that action at this time.
0 commit comments