[CMake] Problem with LINK_DIRECTORIES
Hi, For a static library target, I used TARGET_LINK_LIBRARIES and LINK_DIRECTORIES to link with a third party library. As we can see that in cmake, this linking information is propagated and used only in an executable/shared library target which depends on the former static library. But the issue is that only the TARGET_LINK_LIBRARIES is propagated and not the LINK_DIRECTORIES. This fails the linking of the executable/shared library target because it could not find the third party library. I found this problem when generating for visual studio 2005. The problem might be there in other platforms also. I feel that this behavior is an issue. Or am I missing something? Please let me know. Regards, Arun -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
[CMake] Compiler/Linker flags for coverage/memcheck
Hi, I cannot understand how to include the flags -fprofile-arcs -ftest-coverage to the compiler/linker flags or purify flags in my CMakeLists.txt. Why can't CTest application and/or INCLUDE(CTest) itself do this automatically as it knows the specific platform and coverage/memcheck tool used. If I explicitly add the flags to CMAKE_C_FLAGS / CMAKE_EXE_LINKER_FLAGS, the script becomes compiler/tool dependent. Also these flags gets included unwanted in normal build also. Is there a platform independent and tool independent solution for the user? All the tutorials only explain how to add tests and how to do make Experimental/Nightly, but none of them explains how the compiler-specific and tool-specific flags are to be added during CTest build for the coverage/memcheck tools to work. Regards, Arun___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake