MantisBT - CMake
View Issue Details
0010229CMakeModulespublic2010-02-01 19:392010-08-19 22:48
Ben Medina 
Philip Lowman 
normalminoralways
closednot fixable 
CMake-2-8 
 
0010229: FindGTest.cmake doesn't work with gtest built via CMake on Windows
The googletest project now includes a CMakeList.txt file (see here: http://code.google.com/p/googletest/source/browse/trunk/CMakeLists.txt [^]). However, if you build googletest via this method, FindGTest.cmake will not be able to find the gtest libraries on Windows.
One reason for this is that the CMake-built gtest doesn't use library name suffixes for the debug builds, but rather puts them in the typical Debug/Release subdirectory.
No tags attached.
Issue History
2010-02-01 19:39Ben MedinaNew Issue
2010-02-10 01:22Philip LowmanStatusnew => assigned
2010-02-10 01:22Philip LowmanAssigned To => Philip Lowman
2010-02-10 01:28Philip LowmanNote Added: 0019504
2010-03-11 13:21Ben MedinaNote Added: 0019843
2010-08-19 22:48Philip LowmanNote Added: 0021860
2010-08-19 22:48Philip LowmanStatusassigned => closed
2010-08-19 22:48Philip LowmanResolutionopen => not fixable

Notes
(0019504)
Philip Lowman   
2010-02-10 01:28   
Thanks for passing this along. Have you tested FindGTest against the installed form of the CMake build (after running the INSTALL project)?

I can probably make it work against the CMake build tree for GTest but now that GTest support CMake it would be far easier just to get them to publish an export file if they don't already.
(0019843)
Ben Medina   
2010-03-11 13:21   
They don't create an INSTALL project.

I agree it's better for them to publish an export file. I'll file a bug with them.
(0021860)
Philip Lowman   
2010-08-19 22:48   
I actually can't make it work against the CMake build tree for GTest because it won't have header files in it even if I fix the problem to workaround their
broken library filenames. No, the only fix for this is in upstream GoogleTest.

Here are some suggestions:

1. The libraries generated by CMake in GTest should have the same "d" postfix as the MSVC solutions files that come with GTest
2. Add support for CMake 'make install'
3. Add support for installing a CMake export file
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:install [^]

I'm pretty busy. If you happen to have time to submit a patch to them that would be the easiest way to resolve this problem. Assuming they haven't already fixed this, which is possible. The CMakeLists.txt is declared very beta and cutting edge in the 1.5.0 release I looked at. Sounds like it needs some additional work.