1

当我尝试时卡住ExternalProject_Addgflags。感谢任何人的帮助。

CMakeLists.txt 的片段如下。

ExternalProject_Add(gflags
  PREFIX                ${CMAKE_CURRENT_BINARY_DIR}/gflags-prefix
  SOURCE_DIR            ${CMAKE_CURRENT_SOURCE_DIR}/gflags
  CONFIGURE_COMMAND     cmake -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/gflags -DBUILD_SHARED_LIBS=ON ${CMAKE_CURRENT_SOURCE_DIR}
  BUILD_COMMAND         $(MAKE)
  BUILD_IN_SOURCE       0
  INSTALL_COMMAND       $(MAKE) install)

事实证明-- Build files have been written to: $CMAKE_BINARY_PATH/gflags-prefix/src/gflags-build/gflags-prefix/src/gflags-build/gflags-prefix/src/gflags-build,当cmake ../ && make -j16.

输出样本:

Scanning dependencies of target gflags
[ 12%] Creating directories for 'gflags'
[ 25%] No download step for 'gflags'
[ 37%] No patch step for 'gflags'
[ 50%] No update step for 'gflags'
[ 62%] Performing configure step for 'gflags'
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done

-- Build files have been written to: /foopath/build/gflags-prefix/src/gflags-build
[ 75%] Performing build step for 'gflags'
Scanning dependencies of target gflags
[ 12%] Creating directories for 'gflags'
[ 25%] No download step for 'gflags'
[ 50%] No patch step for 'gflags'
[ 50%] No update step for 'gflags'
[ 62%] Performing configure step for 'gflags'
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build files have been written to: /foopath/build/gflags-prefix/src/gflags-build/gflags-prefix/src/gflags-build
4

0 回答 0