On 2010-03-24 16:45+0100 Arjen Markus wrote:

> Well, that turns out to be easy enough! I will look into the differences
> later.

To Hazen and Arjen:

Actually, you don't have to use svn to see what the revision 10805
differences are. The plplot_cvs mailing archive has them as well.

Here is the first part of that commit message (by me).

<quote>
Reorganize language support using the CMAKE_MODULES_PATH list to have
different language support depending on whether the cmake version is
2.6.x or 2.8.x.
</quote>

One of my previous posts in this thread proved that reorganization (in fact
current svn trunk) does its job perfectly on Linux, i.e., if you introduce
an additional Fortran Platform file for CMake-2.6.4, it is honored on Linux.

>From the CMake-2.6.x Fortran perspective, what that reorganization did was

(1) define CMAKE_MODULE_PATH as follows:

   set(CMAKE_MODULE_PATH
     ${PROJECT_SOURCE_DIR}/cmake/modules
     ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake
     ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.6
     )

(2) move cmake/modules/Platform/Windows-GNU-Fortran.cmake unchanged to
cmake/modules/language_support/cmake-2.6/Platform

(3) move cmake/modules/CMakeFortranInformation.cmake to
cmake/modules/language_support/cmake-2.6 with the following changes
to accommodate that changed location:

--- 
/home/software/plplot_svn/HEAD/plplot_bisect/cmake/modules/CMakeFortranInformation.cmake
    2010-02-27 11:56:55.000000000 -0800
+++ ./CMakeFortranInformation.cmake     2010-02-18 10:40:40.000000000 -0800
@@ -9,19 +9,20 @@
    SET(CMAKE_BASE_NAME g77)
  ENDIF(CMAKE_COMPILER_IS_GNUG77)
  IF(CMAKE_Fortran_COMPILER_ID)
-  IF(EXISTS 
${CMAKE_MODULE_PATH}/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake
 OR EXISTS 
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
+  # FIXME: PLplot specific path here that will be different for other projects.
+  IF(EXISTS 
${CMAKE_SOURCE_DIR}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake
 OR EXISTS 
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
      SET(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER_ID}-Fortran)
-  ENDIF(EXISTS 
${CMAKE_MODULE_PATH}/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake
 OR EXISTS 
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
+  ENDIF(EXISTS 
${CMAKE_SOURCE_DIR}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake
 OR EXISTS 
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
  ENDIF(CMAKE_Fortran_COMPILER_ID)
-IF(EXISTS 
${CMAKE_MODULE_PATH}/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+IF(EXISTS 
${CMAKE_SOURCE_DIR}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
    # Use this file if it exists.
    SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
-  ${CMAKE_MODULE_PATH}/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-ELSE(EXISTS 
${CMAKE_MODULE_PATH}/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+  
${CMAKE_SOURCE_DIR}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+ELSE(EXISTS 
${CMAKE_SOURCE_DIR}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
    # This one apparently doesn't have to actually exist, see OPTIONAL below.
    SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
    
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-ENDIF(EXISTS 
${CMAKE_MODULE_PATH}/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+ENDIF(EXISTS 
${CMAKE_SOURCE_DIR}/cmake/modules/language-support/cmake-2.6/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)

  # This should be included before the _INIT variables are

Note those changes only involve replacing CMAKE_MODULE_PATH (since it is now
a list) with the explicit location instead.  So as far as I can tell from
CMake logic inspection, the reorganization should work identically to before
for the MinGW platform, and certainly this reorganization works fine on
Linux.

Obviously, I must be missing something since both of you guys see changed
behaviour for MinGW due to this reorganization for CMake-2.6.x.  Arjen
defined the problem as
cmake/modules/language_support/cmake-2.6/Platform/Windows-GNU-Fortran.cmake
was being ignored.  If that is really true, it should only take a few
minutes of debugging
cmake/modules/language_support/cmake-2.6/CMakeFortranInformation.cmake by
inserting message statements in the svn trunk version of that file to see
why
cmake/modules/language_support/cmake-2.6/Platform/Windows-GNU-Fortran.cmake
is being ignored.

Good luck with that debugging, and please let me know how it goes because
you certainly have my curiosity aroused about why the above simple
changes do not work on MinGW.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to