This is a somewhat artificial example, but is being used by a client as an objection for migrating to CMake. In the attached example, there are two source files: file1.F90 and file2.F90. Both define the module ‘foo_mod’, but only one is listed in CMakeLists.txt for any given configuration. (The interfaces defined by each are different.) If one does a build, and then toggles file1 and file2 in CMakeLists.txt, the code will _correctly_ report a compilation error: call gamma(x) 1 Error: Type mismatch in argument ‘x’ at (1); passed REAL(4) to REAL(8) However, if one then switches back to file1.F90, the error remains. Cmake does not correctly identify that file1.F90 needs to be recompiled. Note 1: If both files have the _same_ interface, then CMake _does_ recompile correctly. Otherwise, I’d have provided a cleaner demonstration. Note 2: If I turn down the verbosity, the build ’succeeds’ in both cases, but instead causes a segmentation fault. This surprises me, as I would expect a compiler error regardless of verbosity. But this is not an immediate concern. —————- Now, one can probably argue that this example is not a CMake bug, but a ‘fix’ would certainly help me in my efforts to convince my client to upgrade. Thanks in advance, - Tom |
cmake_ex.tar
Description: Unix tar archive
Thomas Clune, Ph. D. <thomas.l.cl...@nasa.gov> Head ASTG,Code 606 NASA GSFC MS 610.8 B33-C128 Greenbelt, MD 20771 301-286-4635 |
-- Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake