[cmake-developers] [CMake 0014266]: cmake configure step in ExternalProject_Add makes Visual studio stops

Mantis Bug Tracker mantis at public.kitware.com
Wed Jul 3 08:34:55 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14266 
====================================================================== 
Reported By:                ycollet
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14266
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-07-03 08:34 EDT
Last Modified:              2013-07-03 08:34 EDT
====================================================================== 
Summary:                    cmake configure step in ExternalProject_Add makes
Visual studio stops
Description: 
I used ExternalProject_Add to configure and compile a thirdparty library
(log4cplus-1.1.1).
The configure step call cmake. This cmake performs some configure check (check
if some headers exist, check if some library is present). Some of these check
fails (this is a normal thing because some headers are not present under
windows).

But when a configure check fails, an error counter is incrementer under visual
studio. And when this counter reaches 120, Visual Studio 2008 express stops due
to a large number of errors.

To overcome this, I needed to activate BUILD_IN_SOURCE and CONFIGURE_LOG. After
that, all the messages from the configure step are not displayed anymore in the
visual studio console and the error counter is not incremented anymore. After
that, the configure step went fine.

Steps to Reproduce: 
The external project which doesn't worked:

ExternalProject_Add(EP_log4cplus
                    PREFIX ${EP_InstallDir}/log4cplus
                    URL
http://kent.dl.sourceforge.net/project/log4cplus/log4cplus-stable/1.1.1/log4cplus-1.1.1.tar.bz2
                    CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory
${EP_InstallDir}/log4cplus/src/EP_log4cplus/build
                                   && ${CMAKE_COMMAND} -E chdir
${EP_InstallDir}/log4cplus/src/EP_log4cplus/build ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${EP_InstallDir}/install ..
                    BUILD_COMMAND     ${CMAKE_COMMAND} -E chdir
${EP_InstallDir}/log4cplus/src/EP_log4cplus/build make
                    INSTALL_COMMAND   ${CMAKE_COMMAND} -E chdir
${EP_InstallDir}/log4cplus/src/EP_log4cplus/build make install
                    )

The external project command which worked:

ExternalProject_Add(EP_log4cplus
                    PREFIX ${EP_InstallDir}/log4cplus
                    URL
http://kent.dl.sourceforge.net/project/log4cplus/log4cplus-stable/1.1.1/log4cplus-1.1.1.tar.bz2
                    CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${EP_InstallDir}/install -DUNICODE=OFF -G "NMake
Makefiles" .
                    BUILD_COMMAND     ${CMAKE_COMMAND} -E chdir
${EP_InstallDir}/log4cplus/src/EP_log4cplus nmake
                    BUILD_IN_SOURCE   1
                    INSTALL_COMMAND   ${CMAKE_COMMAND} -E chdir
${EP_InstallDir}/log4cplus/src/EP_log4cplus nmake install
                    LOG_CONFIGURE 1
			)
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-07-03 08:34 ycollet        New Issue                                    
======================================================================




More information about the cmake-developers mailing list