[cmake-developers] [CMake 0013691]: FindGettext.cmake does not set GETTEXT_FOUND in PARENT_SCOPE
Mantis Bug Tracker
mantis at public.kitware.com
Fri Nov 16 15:21:08 EST 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13691
======================================================================
Reported By: Herbert Thielen
Assigned To:
======================================================================
Project: CMake
Issue ID: 13691
Category: Modules
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-11-16 15:21 EST
Last Modified: 2012-11-16 15:21 EST
======================================================================
Summary: FindGettext.cmake does not set GETTEXT_FOUND in
PARENT_SCOPE
Description:
When using "find_package(Gettext)", the variable GETTEXT_FOUND is not set even
if the gettext tools are installed and can be found.
Steps to Reproduce:
Use a CMakeLists.txt with e.g.
===== snip =====
find_package(Gettext)
if (GETTEXT_FOUND)
message (WARNING "All is fine, gettext found.")
else (GETTEXT_FOUND)
message (WARNING "Did not find gettext.")
endif (GETTEXT_FOUND)
===== snap =====
and run 'cmake --trace path/to/project/dir'. The FindGettext.cmake modules tells
you when msgmerge etc. are found, but even if the tools are found, the output of
the lines above will be "Did not find gettext" because GETTEXT_FOUND is not set
in the scope of CMakeLists.txt.
Probably this is not related to Windows, but I didn't try this version on other
platforms.
Additional Information:
The following patch helped:
$ diff -u FindGettext.cmake~ FindGettext.cmake
--- FindGettext.cmake~ 2012-11-06 20:45:28.000000000 +0100
+++ FindGettext.cmake 2012-11-16 17:57:47.139133300 +0100
@@ -210,4 +210,4 @@
endfunction()
-set(GETTEXT_FOUND ${Gettext_FOUND})
+set(GETTEXT_FOUND ${Gettext_FOUND} PARENT_SCOPE)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-11-16 15:21 Herbert ThielenNew Issue
======================================================================
More information about the cmake-developers
mailing list