Re: [CMake] Is there a default value for CMAKE_MODULE_PATH?
On 2016-11-09 10:05, Jayesh Badwaik wrote: > Over past few days, Boost has updated from version 1.61 to version 1.62. The > latest version of CMake that I have (3.6.3) does not yet have the appropriate > FindBoost.cmake and hence, issues warnings as shown in the postscript. > > As I see this is temporary, and there is a correct FindBoost.cmake in the git > repository which works fine. So, I want to use this new module file till the > time when the new version of CMake comes out and I won't have to use this > special file anymore. > > All the solutions that I have found on internet require me to put a line > setting the CMAKE_MODULE_PATH in my project source code. I don't want to do > it > since the change is supposed to be temporary anyway. So, I was wondering if > there is a location inside the PROJECT_SOURCE_DIR which is scanned by default > by cmake? > > If there is no such location, I can live with the warnings for a little > while, > but I was just curious. I don't think you can avoid setting CMAKE_MODULE_PATH. Also, it's only "temporary" until you bump your cmake_minimum_required. What I've done in some projects is include the module in a directory named after the version of CMake that will include the updated version. You can then iterate over such directories and compare the name to the CMake version to decide whether or not to add that directory. This way someone with new enough CMake to not need the module will use the built-in version, while someone with older CMake will get your copy. -- Matthew -- 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] Is there a default value for CMAKE_MODULE_PATH?
All of these version work, but because of the various kinds of automated setups I use, the command line options seems the best compromise. However, I realized that I have a include file in my source code which is ignored from the source control since it is user/system dependent, and I have put my config there now. Thanks a lot for your help. -- Cheers Jayesh Badwaik https://www.jayeshbadwaik.in signature.asc Description: This is a digitally signed message part. -- 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] Is there a default value for CMAKE_MODULE_PATH?
On 09/11/2016 16:05, Jayesh Badwaik wrote: Hi, TL;DR Is there a default value for CMAKE_MODULE_PATH which allows me to use a module file from inside my PROJECT_SOURCE_DIR. Context: Over past few days, Boost has updated from version 1.61 to version 1.62. The latest version of CMake that I have (3.6.3) does not yet have the appropriate FindBoost.cmake and hence, issues warnings as shown in the postscript. Have you tried setting Boost_ADDITIONAL_VERSIONS ? c.f FindBoost's documentation: Boost_ADDITIONAL_VERSIONS - List of Boost versions not known to this module (Boost install locations may contain the version) I don't know what changed in Boost 1.62 but doing so may be enough for you. Alternatively, you can set CMAKE_MODULE_PATH by hand in your command line. BR David -- David Wagner complex != complicated - Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- 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] Is there a default value for CMAKE_MODULE_PATH?
Hi, TL;DR Is there a default value for CMAKE_MODULE_PATH which allows me to use a module file from inside my PROJECT_SOURCE_DIR. Context: Over past few days, Boost has updated from version 1.61 to version 1.62. The latest version of CMake that I have (3.6.3) does not yet have the appropriate FindBoost.cmake and hence, issues warnings as shown in the postscript. As I see this is temporary, and there is a correct FindBoost.cmake in the git repository which works fine. So, I want to use this new module file till the time when the new version of CMake comes out and I won't have to use this special file anymore. All the solutions that I have found on internet require me to put a line setting the CMAKE_MODULE_PATH in my project source code. I don't want to do it since the change is supposed to be temporary anyway. So, I was wondering if there is a location inside the PROJECT_SOURCE_DIR which is scanned by default by cmake? If there is no such location, I can live with the warnings for a little while, but I was just curious. -- Cheers Jayesh Badwaik https://www.jayeshbadwaik.in = CMake Warnings = CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message): Imported targets not available for Boost version 106200 Call Stack (most recent call first): /usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES) /usr/share/cmake-3.6/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES) CMakeLists.txt:48 (find_package) signature.asc Description: This is a digitally signed message part. -- 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