AutomocInfo.cmake.in depends on environment variables

Bug #1281652 reported by Andreas Pokorny
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cmake (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The cmake modules found in cmake 2.8.12.2-0ubuntu1 contain a qt moc configuration template file that gets generated into the build directory of a qt based project.
--- snip ----
set(AM_QT_MOC_EXECUTABLE "@_qt_moc_executable@")
if(DEFINED ENV{DEB_BUILD_MULTIARCH} AND DEFINED ENV{DEB_HOST_MULTIARCH} AND "@_qt_moc_executable@" MATCHES "/usr/lib/$ENV{DEB_HOST_MULTIARCH}/qt5/bin/moc")
  set(AM_QT_MOC_EXECUTABLE "/usr/lib/$ENV{DEB_BUILD_MULTIARCH}/qt5/bin/moc")
endif()
--- snip ---

This is un-handy as it requires DEB_HOST_MULTIARCH and DEB_HOST_MULTIARCH to be set everytime you build.
Usually cmake configuration files are used to hard-code all movable parts at build configuration time.

Since you cannot switch architecture in a build directory in any way there is no need to have that configureable at build time. It would be nice if there is a way to evaluate the environment variables only once configuration build time.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hi, do you have a patch for this issue?

Timo Röhling (roehling)
Changed in cmake (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.