The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15293 ====================================================================== Reported By: Gavriloaie Eugen-Andrei Assigned To: ====================================================================== Project: CMake Issue ID: 15293 Category: CMake Reproducibility: always Severity: major Priority: urgent Status: new ====================================================================== Date Submitted: 2014-12-08 11:26 EST Last Modified: 2014-12-08 11:26 EST ====================================================================== Summary: FIND_LIBRARY not working consistently Description: I have a cmake-based project and as part of it I need to build and install a 3rd party library. For this purpose, I have created a shell script which builds and install that library in a certain location. This 3rd party library is autohell based (autotools, autoconf, etc).
Logical steps performed inside my cmake script are as follows: 1. Try to use FIND_PATH to locate the header files and FIND_LIBRARY to locate the library. Tolerate the not-found errors at this step 2. If http://public.kitware.com/Bug/view.php?id=1 fails, than I execute that install script which properly installs the 3rd party lib in that location. I can clearly see the headers and the libs under that target folder 3. execute http://public.kitware.com/Bug/view.php?id=1 again, this time not tolerating the errors. Now, FIND_PATH succeeded for the headers files but FIND_LIBRARY fails. Again, the *.a is in place. Further more, if I delete all intermediate files generated by cmake (leaving the 3rd party lib intact) and execute cmake again, http://public.kitware.com/Bug/view.php?id=1 is a success. I suspect that cmake somehow caches the result of FIND_LIBRARY at http://public.kitware.com/Bug/view.php?id=1 and uses it directly at http://public.kitware.com/Bug/view.php?id=3, without really doing any search Steps to Reproduce: I have attached the file which is doing the detect/install/detect-again steps ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-12-08 11:26 Gavriloaie Eugen-AndreiNew Issue 2014-12-08 11:26 Gavriloaie Eugen-AndreiFile Added: Find_usrsctp.cmake ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
