[CMake] Is there a default value for CMAKE_MODULE_PATH?

Jayesh Badwaik public at jayeshbadwaik.in
Wed Nov 9 10:05:01 EST 2016


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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161109/112b308a/attachment-0001.sig>


More information about the CMake mailing list