Re: [CMake] CMake Reports Incorrect HDF5 Libraries on OS X after 3.6.0 Upgrade
Rad, I can verify that the issue is resolved in the git repo if anyone else is running into the bug. Thanks! On Tue, Jul 12, 2016 at 5:12 AM, Robert Maynard wrote: > Hi Breannan, > > You can track the status of the fix at > https://gitlab.kitware.com/cmake/cmake/merge_requests/34 > > On Mon, Jul 11, 2016 at 8:52 AM, Robert Maynard > wrote: >> Hi Breannan, >> >> I am able to reproduce this and will start digging into why this is >> occurring. >> >> On Sun, Jul 10, 2016 at 6:34 PM, Breannan Smith >> wrote: >>> After upgrading to CMake 3.6.0 from 3.5.2, CMake fails to find HDF5 on OS X. >>> >>> With 3.5.2, find_package(HDF5 REQUIRED COMPONENTS C) reports the >>> following for HDF5_LIBRARIES. Note the presences of libhdf5.dylib, in >>> this list: >>> >>> /usr/local/Cellar/hdf5/1.8.16_1/lib/libhdf5.dylib;/usr/local/opt/szip/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib >>> >>> With 3.6.0, the same find_package command gives the following >>> HDF5_LIBRARIES. Notice that libhdf5.dylib is not even present: >>> >>> /usr/local/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib >>> >>> The contents of the HDF5_LIBRARIES and HDF5_C_LIBRARIES are the same >>> under 3.6.0. Interestingly, the FindHDF5.cmake module does not report >>> a failure under 3.6.0 even though it fails to locate the HDF5 library. >>> >>> I did not see any changes to FindHDF5.cmake listed under the 3.6 >>> release notes [1], but diffing the module files there were extensive >>> edits made. >>> >>> Has anyone else run into this issue or found a fix? Thank you! >>> >>> [1] https://cmake.org/cmake/help/v3.6/release/3.6.html >>> -- >>> >>> 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 -- 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] excluded from build in Visual Studio project
Hi, I think you can add any files to a library/executable target and they will show up in the IDE. If the files are actual source code files such as .cpp/.c/.cxx you can set HEADER_FILE_ONLY property on them so that they do no get compiled when the target is built the https://cmake.org/cmake/help/v3.6/prop_sf/HEADER_FILE_ONLY.html. HTH Guillaume On Wed, Jul 13, 2016 at 6:40 PM, Craig Scott wrote: > short, you probably want to use add_custom_ta -- Guillaume Dumont = dumont.guilla...@gmail.com -- 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] excluded from build in Visual Studio project
Somewhat related, the following thread from a few days ago may be helpful: http://public.kitware.com/pipermail/cmake/2016-July/063897.html In short, you probably want to use add_custom_target() without the ALL keyword. On Thu, Jul 14, 2016 at 8:35 AM, Michael Legleux wrote: > I have a use case that I haven't had much luck googling. > > I have a project that needs to have files visible in the Visual Studio IDE > but marked with the red "Excluded from build" symbol. > The source files are not needed in any way for the visual studio project, > but for example, they use functions defined in project source files, so > they need to be searchable and updatable from the visual studio ide. > > I can't seem to find any nice clean way to do this with cmake (or anyway > yet for that matter.) > > -- > > 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 > -- Craig Scott Melbourne, Australia http://crascit.com -- 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] excluded from build in Visual Studio project
I have a use case that I haven't had much luck googling. I have a project that needs to have files visible in the Visual Studio IDE but marked with the red "Excluded from build" symbol. The source files are not needed in any way for the visual studio project, but for example, they use functions defined in project source files, so they need to be searchable and updatable from the visual studio ide. I can't seem to find any nice clean way to do this with cmake (or anyway yet for that matter.) -- 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] Splitting in multiple directories
On Tuesday 12 July 2016 09:00:43 portolan wrote: > Hello, > > I am new to Cmake and I have a pretty strange behaviour: I set my c+++ > project to work with a single CMakefile.txt, and now I am trying to have > a more proper version with a .txt for each subdirectory > > Pretty normal stuff, my source tree is: > > --Lib(my sources) > > --Logger (as the name says, a logger) > > --Lib_UT (Unitary tests for CxxTest) > > --Lib_UT_Runner (the Cxx-generated test runner) > > > I have a Lib_UT/CMakefile.txt and Lib_UT_Runner/CMakefile.txt, I call > them using include_directory(Lib_UT) and I guess you mean add_subdirectory() ? > include_directory(Lib_UT_Runner) and everything is fine (apart from the > runner executable being in a different directory) > > BUT is I do the same for the logger, Lib_UT_Runner has a linking error > where it cannot link to LibLogger.so. But the shared library is > correctly generated and it is on the command line : > > /usr/bin/c++ -lpthread CMakeFiles/Lib_UT_Runner.dir/Runner.cpp.o > -o Lib_UT_Runner ../Lib_UT/libLib_UT.so ../libLib.so ../libLogger.so > -lpthread > -Wl,-rpath,/home/michele/mast-devel/cmake_debug/Lib_UT:/home/michele/mast-de > vel/cmake_debug:/home/michele/mast-devel/cmake_debug/Logger > > I tried using find_library, but I always get not-found what's the error message ? Posting relevant bits of your CMakeLists.txt (related to subdirs, creating targets and linking) would be helpful too. Alex -- 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] Does Makefile generated by CMake support make -jN?
> > Thanks for your analysis for me Andrew. I can't use "-j" options, i think > the reason is the project i dealed with is not parallel. Thus when i use "make > -jN", it couldn't work correctly every time. Obviously it caused by the > Makefile generated by CMake, so i wonder if there are some CMake options to > use CPU effectively. This usually means missing dependencies the CMakeLists.txt files. Because of this you get unpredictable results when compiling in parallel. Check your dependencies on targets, link lines, and source files and make sure they are all correct and not missing anything. > Because i found when i use already exist Makefile, just > use "make", it used about 480% CPU. The Makefile is probably explicitly adding a fixed number of -j options. CMake will not do this and instead rely on the user to call make with their desired appropriate level of parallelism. > And when i use CMake generated Makefile, it just uesd about 96% CPU. The > "hardware acceleration" i said means how to > CPU more effectively in CMake. > -jN is as good as it gets for make. That being said, you can always try a different generator, like Ninja, which tends to have quite a bit better build times in parallel. First things first though, you need to get your dependency problem squared away. That's the underlying cause of why your parallel builds with -j are unpredictable. -- 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] ANN: CMake Course - October 10 in Lyon, France
Kitware will be holding a CMake training course on October 10, 2016 at Kitware's office in Lyon, France. This one-day course will cover CMake, CTest, CPack and CDash. Visit our website for more information and registration details (early registration and student discounts available): http://training.kitware.fr/browse/129 Note that the course will be taught in English. If you have any questions, please contact me directly or training at kitware.fr. We are looking forward to seeing you in Lyon, Julien -- Kitware SAS 26 rue Louis Guérin 69100 Villeurbanne, France http://www.kitware.eu -- 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