View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013034 | CMake | (No Category) | public | 2012-03-09 23:27 | 2012-09-03 16:02 | ||||
Reporter | Ben Matthews | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | IBM Bluegene/L | OS | Linux (SuSe PowerPC multilib) | OS Version | SLES 9 | ||||
Product Version | CMake 2.8.7 | ||||||||
Target Version | CMake 2.8.8 | Fixed in Version | CMake 2.8.8 | ||||||
Summary | 0013034: CMAKE_Fortran_MODULE_DIRECTORY does not document that it is output only | ||||||||
Description | XLF 10.1 looks for modules in the directories passed to the "-I" switch. CMake correctly sets -qmoddir= to set the module output directory, but fails to generate the matching -I switch, causing builds using a non-standard module directory to fail. (The build also fails with the GFortran 3.3.3 as shipped with BG/L with g77: unrecognized option `-Jmodules') | ||||||||
Steps To Reproduce | mkdir tmp git clone https://matthb2@github.com/matthb2/CMake-XL-Fortran-Module-Bug.git [^] mkdir build-broken cd build-broken cmake -DCMAKE_TOOLCHAIN_FILE=/gpfs/gpfs0/home/matthb2/bluegenexlc-mpixlf.cmake ../CMake-XL-Fortran-Module-Bug/ #snipped make Scanning dependencies of target test [ 50%] Building Fortran object CMakeFiles/test.dir/modexample.f.o ** test === End of Compilation 1 === 1501-510 Compilation successful for file modexample.f. [100%] Building Fortran object CMakeFiles/test.dir/main.f.o "/gpfs/gpfs0/home/matthb2/cmake_bug/CMake-XL-Fortran-Module-Bug/main.f", line 2.15: 1514-219 (S) Unable to access module symbol file for module test. Check path and file permissions of file. Use association not done for this module. 1501-511 Compilation failed for file main.f. make[2]: *** [CMakeFiles/test.dir/main.f.o] Error 1 make[1]: *** [CMakeFiles/test.dir/all] Error 2 make: *** [all] Error 2 cd ../CMake-XL-Fortran-Module-Bug git checkout -b workaround origin/workaround mkdir ../build-works cd ../build-works cmake -DCMAKE_TOOLCHAIN_FILE=/gpfs/gpfs0/home/matthb2/bluegenexlc-mpixlf.cmake ../CMake-XL-Fortran-Module-Bug/ #snipped make -- Configuring done -- Generating done -- Build files have been written to: /gpfs/gpfs0/home/matthb2/cmake_bug/build Scanning dependencies of target test [ 50%] Building Fortran object CMakeFiles/test.dir/modexample.f.o ** test === End of Compilation 1 === 1501-510 Compilation successful for file modexample.f. [100%] Building Fortran object CMakeFiles/test.dir/main.f.o ** demo === End of Compilation 1 === 1501-510 Compilation successful for file main.f. Linking Fortran executable test [100%] Built target test | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0028887) Ben Matthews (reporter) 2012-03-09 23:29 edited on: 2012-03-09 23:31 |
Test system is a front-end node for an IBM Bluegene/L Likely also applicable to /P, but I haven't tested it. Example (master branch) works fine with modern versions of gfortran on x86 |
(0028889) Brad King (manager) 2012-03-12 09:07 |
The CMAKE_Fortran_MODULE_DIRECTORY variable is about where module *output* goes. This is orthogonal in principle to where module *input* is searched. It is perfectly reasonable for a target to generate modules it doesn't use and thus would not need the output directory to be an input directory automatically. You need to add the location with include_directories(). |
(0028892) Ben Matthews (reporter) 2012-03-12 11:46 |
Ok. To me, it would be nice if the documentation made this a little more clear, since this issue only seems to show up on a few (less common) compilers. |
(0028893) Brad King (manager) 2012-03-12 11:57 |
This came up on the mailing list recently too. I've updated the documentation: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54604ee7 [^] |
(0030885) David Cole (manager) 2012-09-03 16:02 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-03-09 23:27 | Ben Matthews | New Issue | |
2012-03-09 23:29 | Ben Matthews | Note Added: 0028887 | |
2012-03-09 23:31 | Ben Matthews | Note Edited: 0028887 | |
2012-03-12 09:07 | Brad King | Note Added: 0028889 | |
2012-03-12 11:46 | Ben Matthews | Note Added: 0028892 | |
2012-03-12 11:56 | Brad King | Summary | Setting CMAKE_Fortran_MODULE_DIRECTORY breaks build on IBM XLF Compiler => CMAKE_Fortran_MODULE_DIRECTORY does not document that it is output only |
2012-03-12 11:57 | Brad King | Note Added: 0028893 | |
2012-03-12 11:57 | Brad King | Status | new => resolved |
2012-03-12 11:57 | Brad King | Fixed in Version | => CMake 2.8.8 |
2012-03-12 11:57 | Brad King | Resolution | open => fixed |
2012-03-12 11:57 | Brad King | Assigned To | => Brad King |
2012-04-19 15:53 | David Cole | Target Version | => CMake 2.8.8 |
2012-09-03 16:02 | David Cole | Note Added: 0030885 | |
2012-09-03 16:02 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |