I'm trying to write modules to use CMake with a custom compiler, however I'm stuck in CMakeDetermineCUSTOMCompiler.cmake
. I'd like the modules to work either installed inside of CMake's Modules directory or an external directoy specified by CMAKE_MODULE_PATH
.
To make it work installed in CMake's directory I can put:
configure_file(${CMAKE_ROOT}/Modules/CMakeCUSTOMCompiler.cmake.in
but then it doesn't work with CMAKE_MODULE_PATH. Is there any where I can reference the location of the current module? Or search the locations specified in CMAKE_MODULE_PATH?