Got stuck when I'm trying ExternalProject_Add
for gflags
. Appreciate for anyone's help.
The snippet for CMakeLists.txt as follows.
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)
It turns out -- Build files have been written to: $CMAKE_BINARY_PATH/gflags-prefix/src/gflags-build/gflags-prefix/src/gflags-build/gflags-prefix/src/gflags-build
many times, when cmake ../ && make -j16
.
Output sample:
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