View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0003144 | CMake | CMake | public | 2006-04-19 06:10 | 2008-01-15 21:12 | ||||
Reporter | betsubetsu | ||||||||
Assigned To | Brad King | ||||||||
Priority | urgent | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0003144: cmake fails when fortran modules are saved in an otehr directory that the default one. | ||||||||
Description | In fortran example of cmake (cmake-2.2.3/Tests/Fortran), I added the following line in CMakeLists.txt which tells the compiler to put the modules in directory ./modules: SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -module ./modules") after generating the makefile with cmake, i compile and gets this error message: [...] Building Fortran object CMakeFiles/test_module.dir/test_module_interface.o /opt/intel/fc_80/bin/ifort -o CMakeFiles/test_module.dir/test_module_interface.o -module ./modules -c /home/betsubetsu/cmake-2.2.3/Tests/Fortran/test_module_interface.f90 /home/betsubetsu/cmake/bin/cmake -E cmake_copy_f90_mod TEST_MODULE test_module.mod.stamp Error copying Fortran module "TEST_MODULE". Tried "TEST_MODULE.mod" and "test_module.mod". make[3]: *** [CMakeFiles/test_module.dir/test_module_interface.o.provides.build] Error 1 make[3]: Leaving directory `/home/betsubetsu/cmake-2.2.3/Tests/Fortran' make[2]: *** [CMakeFiles/test_module.dir/test_module_interface.o.provides] Error 2 make[2]: Leaving directory `/home/betsubetsu/cmake-2.2.3/Tests/Fortran' make[1]: *** [CMakeFiles/test_module.dir/all] Error 2 make[1]: Leaving directory `/home/betsubetsu/cmake-2.2.3/Tests/Fortran' make: *** [all] Error 2 If i don't put the option '-modules' then it works fine. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0004006) betsubetsu (reporter) 2006-04-19 06:47 |
I should say that the compilation fails, not cmake. |
(0004442) Brad King (manager) 2006-07-11 13:34 |
Unfortunately this will be non-trivial to fix and we have no time to spend on Fortran support right now. If you want to try to create a patch we may accept it. Here is how to get started: There is no (easy) way CMake will be able to recognize -module flags for all compilers and magically know where to look for the exported module files. Instead we should add a target property called Fortran_MODULES_DIR or something like that. The target property can be initialized from a CMAKE_Fortran_MODULES_DIR variable to allow a simple global setting. The CMakeFortranInformation.cmake file should have a variable such as CMAKE_Fortran_MODULES_DIR_FLAGS or something along those lines to tell the generator how to give the modules directory to the compiler. Then the fortran dependency scanning for a target can be updated to know about the modules directory since it is now a target property. |
(0010161) Brad King (manager) 2008-01-15 21:12 |
This bug has been fixed by changes described in bug 0005809. The target property Fortran_MODULE_DIRECTORY may now be set to request that modules be placed in another directory. The property may be set on all targets by setting the variable CMAKE_Fortran_MODULE_DIRECTORY before creating any targets. Dependencies are tracked correctly. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2007-10-03 16:28 | Brad King | Relationship added | related to 0005809 |
2008-01-15 21:12 | Brad King | Status | assigned => closed |
2008-01-15 21:12 | Brad King | Note Added: 0010161 | |
2008-01-15 21:12 | Brad King | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |