[cmake-developers] [CMake 0014811]: Too many include paths are set to AM_MOC_INCLUDES in AutomocInfo.cmake then the build fails.
Mantis Bug Tracker
mantis at public.kitware.com
Tue Mar 18 00:27:12 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14811
======================================================================
Reported By: Yew Kurabayashi
Assigned To:
======================================================================
Project: CMake
Issue ID: 14811
Category: CMake
Reproducibility: always
Severity: feature
Priority: high
Status: new
======================================================================
Date Submitted: 2014-03-18 13:27 JST
Last Modified: 2014-03-18 13:27 JST
======================================================================
Summary: Too many include paths are set to AM_MOC_INCLUDES in
AutomocInfo.cmake then the build fails.
Description:
I want to use following classes in ITK and ParaView for image conversion
between ITK and Qt through VTK.
itk::ImageToVTKImageFilter< TInputImage >
http://www.itk.org/Doxygen/html/classitk_1_1ImageToVTKImageFilter.html
itk::VTKImageToImageFilter< TOutputImage >
http://www.itk.org/Doxygen/html/classitk_1_1VTKImageToImageFilter.html
pqCoreUtilities
http://www.paraview.org/ParaView/Doc/Nightly/www/cxx-doc/classpqCoreUtilities.html
So, I wrote a CmakeLists.txt as below and generated a solution for Visual
Studio 11(MSVC 2012) Win64 with Cmake GUI successfully, but subsequent build
process with MSVC fails every time.
I found out that the build stop is caused from moc failure via too many
include paths set to AM_MOC_INCLUDES in the file “(build
directory)/CmakeFiles/(project name)_automoc.dir/AutomocInfo.cmake”.
I can finish build process by deleting some paths in AM_MOC_INCLUDES, but I
think it's very hard task and there is no guarantee for right build in this way.
I know that it might not be a bug in Cmake, and be a limitation of moc. But
it's a critical limitation in the development together with ITK, VTK, ParaView,
and Qt.
So, I appreciate if you show a solution or some workarounds for this problem.
Thank you in advance.
Steps to Reproduce:
Generate a solution for MSVC 2012 Win64 with following CmakeLists.txt, then
build it by Visual Studio.
CmakeLists.txt:
cmake_minimum_required(VERSION 2.8.11 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
project(MocTest.1.0)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(Qt5Widgets REQUIRED)
find_package(ITK REQUIRED NO_MODULE)
include(${ITK_USE_FILE})
FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})
file(GLOB CXX_FILES *.cxx)
file(GLOB CPP_FILES *.cpp)
add_executable( MocTest.1.0 ${CXX_FILES} ${CPP_FILES} )
target_link_libraries( MocTest.1.0
Qt5::Widgets ${ITK_LIBRARIES} ${PARAVIEW_LIBRARIES}
)
Additional Information:
List of softwares, libraries:
Microsoft Visual Studio Express 2013 for Windows Desktop
(Solution generated with CMake is for MSVC 2012)
Solution Platform: x64
ITK 4.5.1
ParaView 4.1.0
Qt 5.2.1
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-03-18 13:27 Yew Kurabayashi New Issue
2014-03-18 13:27 Yew Kurabayashi File Added: sampleProject.zip
======================================================================
More information about the cmake-developers
mailing list