Re: [CMake] Good practice: using INTERFACE-libraries in FindABC.cmake?
On Mon, 29 Feb 2016 21:20:59 +0100 Stephen Kelly wrote: > Patrick Boettcher wrote: > > > I came across the INTERFACE-type of libraries when writing a > > FindModule.cmake-file for custom libraries installed by my > > project. > > You don't provide FindModules for your CMake-built libraries. Thank you for the pointer. I wasn't aware of it and haven't entirely understood it yet. However, when I said 'for custom libraries installed by my project' I was not referring to cmake-based projects. These libraries are used as is and for the moment I don't want to integrate them via ExternalProject. -- Patrick. -- 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
[CMake] Visual Studio and ExternalProject_Add
I've been having great success with using ExternalProject over the terrible git submodules. However, when using Visual Studio, the following error happens: Performing download step (git clone) for 'catch-lib' 2> Cloning into 'catch-lib'... 2> Note: checking out 'tags/v1.3.4'. 2> 2> You are in 'detached HEAD' state. You can look around, make experimental 2> changes and commit them, and you can discard any commits you make in this 2> state without impacting any branches by performing another checkout. 2> 2> If you want to create a new branch to retain commits you create, you may 2> do so (now or later) by using -b with the checkout command again. Example: 2> 2>git checkout -b 2> 2> HEAD is now at 3b4edd7... Build for v1.3.4 2> fatal: 'submodule' appears to be a git command, but we were not 2> able to execute it. Maybe git-submodule is broken? 2> CMake Error at C:/Users/kevin/dev/sol2/vendor/tmp/catch-lib-gitclone.cmake:58 (message): 2>Failed to init submodules in: 2>'C:/Users/kevin/dev/sol2/vendor/src/catch-lib' The CMake file is located here: https://github.com/Nava2/sol2/blob/cmake-build/CMakeLists.txt Steps I've verified: - git.exe is on my system PATH - The submodule URL is valid - Builds on OSX/Linux - Reinstalled git (twice) I'm new to Visual Studio (I work primarily with Linux/OSX), so I'm sure I'm missing something along the way. Thanks, -- Kevin Brightwell*. BESc., BSc.* MESc. Candidate 2017 Western University -- 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
[CMake] best way of parsing test results from ctest + valgrind
Hello, I am just getting started on using valgrind memory analysis for my tests. When I run ctest with nightly memory check, I get an XML document, but it is very hard to read the results. What is the best way of reading this doc? Thanks! Aaron -- 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
Re: [CMake] CMAKE_THREAD_LIBS_INIT
OK, figured this one out too. Thank again, Caleb! On Tue, Mar 1, 2016 at 10:48 AM, Aaron Boxer wrote: > Hello, > I am getting link error "undefined reference to pthread_create" > > I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line, > and I have added > > FIND_PACKAGE(Threads REQUIRED). > > Here is a link to my cmake file: > > > https://github.com/GrokImageCompression/opendcp/blob/master/libopendcp/CMakeLists.txt > > Any help would be very greatly appreciated. > > Thanks! > Aaron > > > -- 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
[CMake] CMAKE_THREAD_LIBS_INIT
Hello, I am getting link error "undefined reference to pthread_create" I have added ${CMAKE_THREAD_LIBS_INIT} in my cmake link line, and I have added FIND_PACKAGE(Threads REQUIRED). Here is a link to my cmake file: https://github.com/GrokImageCompression/opendcp/blob/master/libopendcp/CMakeLists.txt Any help would be very greatly appreciated. Thanks! Aaron -- 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
Re: [CMake] CMAKE_DL_LIBS
Thanks! I found the problem: I needed to add CMAKE_DL_LIBS to another static library that the main exe was linking to. Now this link error is gone. On Tue, Mar 1, 2016 at 9:55 AM, J. Caleb Wherry wrote: > That link looks fine to me. You might want to verify that the > CMAKE_DL_LIBS variable actually contains what it should on your system (or > a least contains what it should right before using it). > > You could explicitly add the "-dl" to that link statement and see if that > works. That's what that variable should contain anyways on Linux boxes. > > -Caleb > > (Pasting off list response below) > > Thanks, Caleb. Are you saying that I need to add "-ldl" link lib in > addition to ${CMAKE_DL_LIBS} ? > > > My CMake file is here: > > > https://github.com/GrokImageCompression/opendcp/blob/master/cli/CMakeLists.txt > > and the lines for the exe that is not linking are found here: > > TARGET_LINK_LIBRARIES(opendcp_j2k ${CMAKE_DL_LIBS} ${OPENDCP_LIB} ) > > > This is an open source proj, by the way. I can send you a few short lines > about how to build on Ubuntu, if you are interested. > > Thanks very much for your help. > > > Aaron > > On Tuesday, March 1, 2016, Aaron Boxer wrote: > >> >> >> On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer wrote: >> >>> Hello! >>> I have a CMAKE project that creates an executable that links with a >>> static lib >>> from a second CMAKE project. The static lib requires the dlopen and >>> dlclose >>> symbols. >>> >>> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake >>> file. >>> >>> However, I still get an error about "undefined reference to symbol >>> "dlclose" >>> >> >> The error states: "missing DSO from command line" >> >> Also, the second CMAKE project also contains executables that link with >> the static >> library, and they link with no problem. >> >> >> >> >> > > -- > Sent from my iPhone 4s > -- 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
Re: [CMake] CMAKE_DL_LIBS
That link looks fine to me. You might want to verify that the CMAKE_DL_LIBS variable actually contains what it should on your system (or a least contains what it should right before using it). You could explicitly add the "-dl" to that link statement and see if that works. That's what that variable should contain anyways on Linux boxes. -Caleb (Pasting off list response below) Thanks, Caleb. Are you saying that I need to add "-ldl" link lib in addition to ${CMAKE_DL_LIBS} ? My CMake file is here: https://github.com/GrokImageCompression/opendcp/blob/master/cli/CMakeLists.txt and the lines for the exe that is not linking are found here: TARGET_LINK_LIBRARIES(opendcp_j2k ${CMAKE_DL_LIBS} ${OPENDCP_LIB} ) This is an open source proj, by the way. I can send you a few short lines about how to build on Ubuntu, if you are interested. Thanks very much for your help. Aaron On Tuesday, March 1, 2016, Aaron Boxer wrote: > > > On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer > wrote: > >> Hello! >> I have a CMAKE project that creates an executable that links with a >> static lib >> from a second CMAKE project. The static lib requires the dlopen and >> dlclose >> symbols. >> >> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake >> file. >> >> However, I still get an error about "undefined reference to symbol >> "dlclose" >> > > The error states: "missing DSO from command line" > > Also, the second CMAKE project also contains executables that link with > the static > library, and they link with no problem. > > > > > -- Sent from my iPhone 4s -- 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
Re: [CMake] CMAKE_DL_LIBS
Most likely solution: missing the "-ldl" link lib which should solve your missing symbol issues. The DSO error is most likely caused by the above. However, there could be a problem with your linking order. I'd have to see the CMake file to be sure. Caleb On Tuesday, March 1, 2016, Aaron Boxer wrote: > > > On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer > wrote: > >> Hello! >> I have a CMAKE project that creates an executable that links with a >> static lib >> from a second CMAKE project. The static lib requires the dlopen and >> dlclose >> symbols. >> >> So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake >> file. >> >> However, I still get an error about "undefined reference to symbol >> "dlclose" >> > > The error states: "missing DSO from command line" > > Also, the second CMAKE project also contains executables that link with > the static > library, and they link with no problem. > > > > > -- Sent from my iPhone 4s -- 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
[CMake] CMAKE_DL_LIBS
Hello! I have a CMAKE project that creates an executable that links with a static lib from a second CMAKE project. The static lib requires the dlopen and dlclose symbols. So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake file. However, I still get an error about "undefined reference to symbol "dlclose" I am using CMake 3.2.2. Any ideas ? Thanks, Aaron -- 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
Re: [CMake] CMAKE_DL_LIBS
On Tue, Mar 1, 2016 at 9:06 AM, Aaron Boxer wrote: > Hello! > I have a CMAKE project that creates an executable that links with a static > lib > from a second CMAKE project. The static lib requires the dlopen and dlclose > symbols. > > So, when I link the first project, I add ${CMAKE_DL_LIBS} to the CMake > file. > > However, I still get an error about "undefined reference to symbol > "dlclose" > The error states: "missing DSO from command line" Also, the second CMAKE project also contains executables that link with the static library, and they link with no problem. -- 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