[CMake] ExternalProject breaks a parallel make.
Andrey Nikitin
andrey.d.nikitin at gmail.com
Sat Apr 2 05:27:04 EDT 2011
Hi.
I have problem with make -jN and Cmake ExternalProject.
% alias make="make -j5"
% make
Scanning dependencies of target EXTLIB
[ 0%] Creating directories for 'EXTLIB'
[ 0%] No download step for 'EXTLIB'
[ 0%] [ 0%] No patch step for 'EXTLIB'
No update step for 'EXTLIB'
[ 0%] No configure step for 'EXTLIB'
[ 0%] Performing build step for 'EXTLIB'
make[3]: warning: jobserver unavailable: using -j1. Add `+' to parent
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^ THIS IS MY PROBLEM ^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
make rule. start EXTLIB build: duration 5 sec. EXTLIB is built
[ 0%] Performing install step for 'EXTLIB' EXTLIB *.{a,so} objects are
installed [ 0%] No test step for 'EXTLIB'
[ 0%] Completed 'EXTLIB'
[ 90%] Built target EXTLIB
Scanning dependencies of target hello
[100%] Building C object CMakeFiles/hello.dir/main.c.o
Linking C executable hello
[100%] Built target hello
My test project files contents see below.
% tree -AF --dirsfirst
.
├── build/
├── extlib/
│ ├── CMakeLists.txt
│ └── Makefile
├── CMakeLists.txt
└── main.c
% cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project ( hello C )
add_subdirectory( extlib )
add_executable( ${PROJECT_NAME} WIN32 main.c )
add_dependencies( ${PROJECT_NAME} EXTLIB )
% cat extlib/CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
include(ExternalProject)
ExternalProject_Add( EXTLIB
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
BUILD_IN_SOURCE 1
DOWNLOAD_COMMAND ""
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ""
# BUILD_COMMAND ""
TEST_COMMAND ""
INSTALL_COMMAND echo "EXTLIB *.{a,so} objects are installed"
)
% cat extlib/Makefile
all:
echo "start EXTLIB build: duration 5 sec."
sleep 5
echo "EXTLIB is built"
% cat main.c
#include <stdio.h>
int main( int argc, const char* argv[] )
{
printf("Hello world!\n");
}
% cmake --version
cmake version 2.8.2 (Debian/GNU Linux 6.0.1)
More information about the CMake
mailing list