Skip to content

Commit fe8d5ff

Browse files
committed
Add WITH_C_API option
1 parent 873368f commit fe8d5ff

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
4343
option(ON_COVERALLS "Compile PaddlePaddle with code coverage" OFF)
4444
option(COVERALLS_UPLOAD "Package code coverage data to coveralls" OFF)
4545
option(ON_TRAVIS "Exclude special unit test on Travis CI" OFF)
46+
option(WITH_C_API "Compile PaddlePaddle with C-API(Prediction)" ON)
4647

4748
# CMAKE_BUILD_TYPE
4849
if(NOT CMAKE_BUILD_TYPE)
@@ -53,6 +54,7 @@ endif()
5354

5455
set(THIRD_PARTY_PATH "${PROJ_ROOT}/third_party" CACHE STRING
5556
"A path setting third party libraries download & build directories.")
57+
5658
########################################################################################
5759

5860
include(external/zlib) # download, build, install zlib

paddle/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ add_subdirectory(gserver)
88
add_subdirectory(pserver)
99
add_subdirectory(trainer)
1010
add_subdirectory(scripts)
11-
add_subdirectory(capi)
11+
if(WITH_C_API)
12+
add_subdirectory(capi)
13+
endif()
1214
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
1315
${CMAKE_CURRENT_SOURCE_DIR}/setup.py)
1416

0 commit comments

Comments
 (0)