diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f53abacb4052febc23c6ac76f2481776730056e..2048796ef3e065a80286a6ae65fd6476ff11118f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,7 @@ option(WITH_DOC "Compile PaddlePaddle with documentation" OFF) option(ON_COVERALLS "Compile PaddlePaddle with code coverage" OFF) option(COVERALLS_UPLOAD "Package code coverage data to coveralls" OFF) option(ON_TRAVIS "Exclude special unit test on Travis CI" OFF) +option(WITH_C_API "Compile PaddlePaddle with C-API(Prediction)" ON) # CMAKE_BUILD_TYPE if(NOT CMAKE_BUILD_TYPE) @@ -53,6 +54,7 @@ endif() set(THIRD_PARTY_PATH "${PROJ_ROOT}/third_party" CACHE STRING "A path setting third party libraries download & build directories.") + ######################################################################################## include(external/zlib) # download, build, install zlib diff --git a/paddle/CMakeLists.txt b/paddle/CMakeLists.txt index b3f3b2fbcedd78a2d19d1b29ac416680cb060208..48905f323732692bf7463e1fb6f559beca15c837 100644 --- a/paddle/CMakeLists.txt +++ b/paddle/CMakeLists.txt @@ -8,7 +8,9 @@ add_subdirectory(gserver) add_subdirectory(pserver) add_subdirectory(trainer) add_subdirectory(scripts) -add_subdirectory(capi) +if(WITH_C_API) + add_subdirectory(capi) +endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in ${CMAKE_CURRENT_SOURCE_DIR}/setup.py)