View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014481CMakeCMakepublic2013-10-13 19:442014-03-05 09:58
ReporterDragos Carp 
Assigned ToBrad King 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
Platformx86_64OSLinuxOS VersionFedora 19
Product VersionCMake 2.8.11.2 
Target VersionCMake 3.0Fixed in VersionCMake 3.0 
Summary0014481: Unable to support a new language using CMAKE_MODULE_PATH within an outside project.
DescriptionAs 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 InformationFollowing 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()
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0034243)
Brad King (manager)
2013-10-25 09:55

I see the pull request at

 https://github.com/Kitware/CMake/pull/69 [^]

Thanks. See comments there.
(0034271)
Brad King (manager)
2013-10-28 09:16

Applied, thanks:

CMakeDetermineCompilerId: Load src from CMAKE_MODULE_PATH
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e65c7887 [^]
(0035299)
Robert Maynard (manager)
2014-03-05 09:58

Closing resolved issues that have not been updated in more than 4 months

 Issue History
Date Modified Username Field Change
2013-10-13 19:44 Dragos Carp New Issue
2013-10-25 09:55 Brad King Assigned To => Brad King
2013-10-25 09:55 Brad King Status new => assigned
2013-10-25 09:55 Brad King Target Version => CMake 3.0
2013-10-25 09:55 Brad King Note Added: 0034243
2013-10-28 09:16 Brad King Note Added: 0034271
2013-10-28 09:17 Brad King Status assigned => resolved
2013-10-28 09:17 Brad King Resolution open => fixed
2013-10-28 09:17 Brad King Fixed in Version => CMake 3.0
2014-03-05 09:58 Robert Maynard Note Added: 0035299
2014-03-05 09:58 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team