[CMake] Boost external project doesn't build with VS2010 generator

Ben Medina ben.medina at gmail.com
Tue Oct 25 17:30:32 EDT 2011


Hello all,

I'm trying to build Boost as an external project, but it won't build
if I use the VS2010 generator. I've whittled the code down to the
following CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
project (boost-external)

set (Boost_Source "E:/boost_1_47_0")

include(ExternalProject)
ExternalProject_Add(
    Boost
    SOURCE_DIR "${Boost_Source}"
    UPDATE_COMMAND ""
    BUILD_IN_SOURCE 1
    CONFIGURE_COMMAND bootstrap.bat
    BUILD_COMMAND b2 install
    INSTALL_COMMAND ""
    )

When I build the project, the configure step happens, but the build
step is skipped:

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.
2>------ Build started: Project: Boost, Configuration: Debug x64 ------
2>  Performing configure step for 'Boost'
2>  Building Boost.Build engine
2>
2>  Bootstrapping is done. To build, run:
2>
2>      .\b2
2>
2>  To adjust configuration, edit 'project-config.jam'.
2>  Further information:
2>
2>      - Command line help:
2>      .\b2 --help
2>
2>      - Getting started guide:
2>      http://boost.org/more/getting_started/windows.html
2>
2>      - Boost.Build documentation:
2>      http://www.boost.org/boost-build2/doc/html/index.html
3>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------
3>  Build all projects
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

When I use the VS2008 generator, the project builds as expected:

Microsoft (R) Visual Studio Version 9.0.30729.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: Boost, Configuration: Debug x64 ------
1>Creating directories for 'Boost'
1>No download step for 'Boost'
1>No patch step for 'Boost'
1>No update step for 'Boost'
1>Performing configure step for 'Boost'
1>Building Boost.Build engine
...
1>Generating Code...
1>Bootstrapping is done. To build, run:
1>    .\b2
1>
1>To adjust configuration, edit 'project-config.jam'.
1>Further information:
1>    - Command line help:
1>    .\b2 --help
1>
1>    - Getting started guide:
1>    http://boost.org/more/getting_started/windows.html
1>
1>    - Boost.Build documentation:
1>    http://www.boost.org/boost-build2/doc/html/index.html
1>Performing build step for 'Boost'
1>has_icu_test.cpp
1>Performing configuration checks
...

And it goes on to build from there.


I'm using CMake 2.8.6. Is there some way I can work around this, or
should I file a bug?

Thanks,
Ben


More information about the CMake mailing list