[CMake] ExternalProject feature regenerating the configure script
Ashok Nalkund
ashoknn at qti.qualcomm.com
Tue Jul 23 20:42:16 EDT 2013
Hi All,
I'm using CMake's ExternalProject_Add to compile a package. The
package contains configure script that was generated using autoconf
2.68. My system has autoconf 2.63. If I compile the package directly
using configure/make, it compiles fine. However, if I try to compile
using ExternalProject_Add feature, the configure script seems to be
regenerated. Here is my CMakeLists.txt, I've not included the
compiler/linker flags.
>
> cmake_minimum_required(VERSION 2.8)
>
> set( CMAKE_C_COMPILER clang)
> set( CMAKE_CXX_COMPILER clang++)
>
> project(Test)
>
> include(ExternalProject)
> ExternalProject_Add(package
> PREFIX ${CMAKE_CURRENT_BINARY_DIR}
> URL ${CMAKE_CURRENT_SOURCE_DIR}/package
> INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/artifacts
> CONFIGURE_COMMAND <SOURCE_DIR>/configure
> CC=${CMAKE_C_COMPILER}
> CXX=${CMAKE_CXX_COMPILER}
> ${PACKAGE_COMPILER_FLAGS}
> ${PACKAGE_CONFIGURE_FLAGS}
> BUILD_COMMAND make
> INSTALL_COMMAND make install
> )
The part where I think its regenerating the configure script shows:
> cd <path to project>/build/src/package && /bin/sh <path to
> project>/build/src/package/autotools/missing --run automake-1.11 --foreign
> aclocal.m4:17: warning: this file was generated for autoconf 2.68.
> You have another version of autoconf. It may work, but is not
> guaranteed to.
> If you have problems, you may need to regenerate the build system
> entirely.
> To do so, use the procedure documented by the package, typically
> `autoreconf'.
> configure.ac:8: version mismatch. This is Automake 1.11.1,
> configure.ac:8: but the definition used by this AM_INIT_AUTOMAKE
> configure.ac:8: comes from Automake 1.11.3. You should recreate
> configure.ac:8: aclocal.m4 with aclocal and run automake again.
> Makefile.am:50: .PHONY was already defined in condition DX_COND_doc,
> which is included in condition TRUE ...
> Makefile.am:45: ... `.PHONY' previously defined here
> WARNING: `automake-1.11' is probably too old. You should only need it if
> you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
> You might want to install the `Automake' and `Perl' packages.
> Grab them from any GNU archive site.
Does anybody have an idea why its happening?
TIA,
ashok
More information about the CMake
mailing list