MantisBT - CMake
View Issue Details
0006339CMakeModulespublic2008-02-13 13:292008-02-21 12:09
Philip Lowman 
Alex Neundorf 
normalfeaturealways
closedno change required 
 
 
0006339: Additional Find* modules for Pthreads, Magick++, CxxTest.
Attached are modules for FindPthreads.cmake, FindMagick.cmake, and FindCxxTest.cmake.

FindPthreads.cmake is designed to facilitate searching for the Pthreads-win32 port or a standard Pthreads library if on a UNIX based system.

FindMagick.cmake is designed to search for the C/C++ development headers/libraries which can be optionally installed with the ImageMagick software package. If desired, this functionality can be incorporated into FindImageMagick (which presently is focused only on looking for ImageMagick binaries).

FindCxxTest.cmake is designed to search for the CxxTest unit testing suite and declares a convenience macro to assist developers in executing unittests via the CTest framework.
No tags attached.
? FindPthreads.cmake (3,209) 2008-02-13 13:29
https://public.kitware.com/Bug/file/1309/FindPthreads.cmake
? FindMagick.cmake (1,632) 2008-02-13 13:29
https://public.kitware.com/Bug/file/1310/FindMagick.cmake
? FindCxxTest.cmake (3,391) 2008-02-13 13:30
https://public.kitware.com/Bug/file/1311/FindCxxTest.cmake
Issue History
2008-02-13 13:29Philip LowmanNew Issue
2008-02-13 13:29Philip LowmanFile Added: FindPthreads.cmake
2008-02-13 13:29Philip LowmanFile Added: FindMagick.cmake
2008-02-13 13:30Philip LowmanFile Added: FindCxxTest.cmake
2008-02-13 14:13Alex NeundorfNote Added: 0010483
2008-02-13 16:08Eric NOULARDNote Added: 0010488
2008-02-15 10:31Bill HoffmanStatusnew => assigned
2008-02-15 10:31Bill HoffmanAssigned To => Alex Neundorf
2008-02-15 17:31Eric NOULARDNote Added: 0010524
2008-02-21 00:43Philip LowmanNote Added: 0010609
2008-02-21 00:45Philip LowmanNote Added: 0010610
2008-02-21 12:09Alex NeundorfNote Added: 0010617
2008-02-21 12:09Alex NeundorfStatusassigned => closed
2008-02-21 12:09Alex NeundorfResolutionopen => no change required

Notes
(0010483)
Alex Neundorf   
2008-02-13 14:13   
I'm not sure about pthreads, since there is already a FindThreads.cmake.

The other two look good, please check Modules/readme.txt whether everything is ok.
One thing I noticed is that the recommended name for the library variable is FOO_LIBRARIES, i.e. the plural.

Also in cmake cvs there is Modules/FindPackageHandleStandardArgs.cmake, which should be used to evaluate the QUIET and REQUIRED variables. Please have a look at that and use it in your modules.

Alex

(actually it would be nice to have a separate entry in the bug tracker for each of the modules, this makes it easier to close them once something has been committed)
(0010488)
Eric NOULARD   
2008-02-13 16:08   
current FindThread does not handles PthreadWin32 case.
May be it would be worth merging those two.
I'll have a look since I did use my own (unsubmitted) FindPthread
(0010524)
Eric NOULARD   
2008-02-15 17:31   
After reading my own FindPthreadWin32.cmake I think
mine is just too ugly to be useful but
it could be nice to have:

FindPthreads.cmake (like the submitted one)
which tries to find pthread libs be it on Un*x/OS X or Windows.

FindThreads.cmake may eventually load FindPthreads.cmake for
the pthread case, however after reading it I wouldn't like
this one, for example:
IF(CMAKE_SYSTEM MATCHES "Windows")
  SET(CMAKE_USE_WIN32_THREADS_INIT 1)
ENDIF(CMAKE_SYSTEM MATCHES "Windows")

does not match my needs at all.
I may want to use pthread on windows too.
(0010609)
Philip Lowman   
2008-02-21 00:43   
Please close this bug.
I have created 3 new bug reports for each one of these modules so they can be dealt with separately if need be (as per Alex's suggestion).

FindPthreads.cmake => Bug 6399
FindMagick.cmake => Bug 6400
FindCxxTest.cmake => Bug 6401
(0010610)
Philip Lowman   
2008-02-21 00:45   
Forgot to mention: the new bugs I filed have updated versions of all 3 of these modules which address the issues Alex mentioned (FindPackageHandleStandardArgs.cmake not being used & confirming everything complies with readme.txt).
(0010617)
Alex Neundorf   
2008-02-21 12:09   
There are now three separate feature requests.