The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=14481 ====================================================================== Reported By: Dragos Carp Assigned To: ====================================================================== Project: CMake Issue ID: 14481 Category: CMake Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2013-10-13 19:44 EDT Last Modified: 2013-10-13 19:44 EDT ====================================================================== Summary: Unable to support a new language using CMAKE_MODULE_PATH within an outside project. Description: As described in Modules/CMakeAddNewLanguage.txt it should be possible to add support for a new language (D in my case) by including the language modules using the CMAKE_MODULE_PATH variable. This works very nicely with the exception of the compiler identification, when Modules/CMakeDetermineCompilerId.cmake contains hardcoded the path to the source configuration file in line 88: file(READ ${CMAKE_ROOT}/Modules/${src}.in ID_CONTENT_IN)
Additional Information: Following patch will correct the problem: --- install-cmake-ref/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake 2013-10-07 17:31:00.000000000 +0200 +++ install-cmake/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake 2013-10-14 00:45:00.000000000 +0200 @@ -85,7 +85,8 @@ #----------------------------------------------------------------------------- # Function to write the compiler id source file. function(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src) - file(READ ${CMAKE_ROOT}/Modules/${src}.in ID_CONTENT_IN) + find_file(src_in ${src}.in PATHS ${CMAKE_ROOT}/Modules ${CMAKE_MODULE_PATH}) + file(READ ${src_in} ID_CONTENT_IN) string(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY) file(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}") endfunction() ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2013-10-13 19:44 Dragos Carp New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers