CMakeFile.txt: Unknown arguments specified: "STREQUAL" "TRUE"

Bug #1080713 reported by Pim Vullers on 2012-11-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Maya
Fix Released
High
Pim Vullers
cmake
Fix Released
Unknown
cmake (Ubuntu)
High
Dimitri John Ledkov

Bug Description

When trying to build Maya I get the following error:

...
-- Found Gettext: /usr/bin/msgmerge (found version "0.18.1")
CMake Error at CMakeLists.txt:69 (if):
  if given arguments:

    "STREQUAL" "TRUE"

  Unknown arguments specified

-- Configuring incomplete, errors occurred!

Apparently there is something wrong in the CMakeLists.txt file.

Build from trunk on Gentoo Linux, with CMake 2.8.10.1 and Gettext 0.18.1.1.

Pim Vullers (pimvullers) wrote :
Pim Vullers (pimvullers) wrote :

The attached branch fixes this problem. The problem seems to be caused when the variable that gets compared is actually not a string.

Niels Avonds (niels-avonds) wrote :

Merged the branch. Thanks Pim :)

Changed in maya:
assignee: nobody → Pim Vullers (pimvullers)
importance: Undecided → High
status: New → Fix Committed
milestone: none → luna-beta2
Pim Vullers (pimvullers) wrote :

Niels, this fixes the problem, but apparently not the correct operation. At least on my system it does not seem to build translations.

Changed in maya:
status: Fix Committed → In Progress
Niels Avonds (niels-avonds) wrote :

My translations seem to build fine. I changed one just to test and it changed in Maya. Any errors showing up?

On 11/20/12 13:24, Niels Avonds wrote:
> My translations seem to build fine. I changed one just to test and it
> changed in Maya. Any errors showing up?

Seems to be my CMake install that's broken. So the _FOUND variable does
not get set properly (see
http://www.cmake.org/Bug/view.php?id=13691&nbn=3, seems to be similar to
my case).

But also according to
http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries the if statement
should just be written as:

if (GETTEXT_FOUND)

and not using a string comparison.

Pim Vullers (pimvullers) wrote :

Updated my branch to use this (correct) style. This bug can be closed then, I'll file a new one for Gentoo.

Changed in maya:
status: In Progress → Fix Committed
Dimitri John Ledkov (xnox) wrote :

The new CMake is now in Ubuntu Raring and the same problem has hit other projects.

Do you have a link to the gentoo bug?

Dimitri John Ledkov (xnox) wrote :

This now fails:
if ("${GETTEXT_FOUND}" STREQUAL "TRUE")

Please use:
if (GETTEXT_FOUND)

Changed in cmake (Ubuntu):
status: New → Won't Fix
Changed in cmake:
status: Unknown → New
Changed in cmake (Ubuntu):
assignee: nobody → Dmitrijs Ledkovs (xnox)
importance: Undecided → High
status: Won't Fix → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cmake - 2.8.10.1-0ubuntu2

---------------
cmake (2.8.10.1-0ubuntu2) raring; urgency=low

  * Fix FindGettext, by using a fix applied in OpenSUSE (LP: #1080713)
 -- Dmitrijs Ledkovs <email address hidden> Thu, 22 Nov 2012 15:34:24 +0000

Changed in cmake (Ubuntu):
status: Triaged → Fix Released
Changed in cmake:
status: New → Fix Released
Changed in maya:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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