[CMake] Fortran support bugs?

2007-08-09 Thread yardbird
Hello,

I would like to use CMake as a build system for a Fortran project of my 
research group.

The problems I'm experiencing are quite various, but I think I've tracked them 
down to a single cause. In the specific case, which I'm attaching as a 
compressed archive, CMake runs fine, but when launching make it hangs at the 
dependency scanning phase. With other Fortran projects, CMake detects bogus 
dependencies, which do not exist and have strange names. These strange names 
helped me to identify the probable cause of the bug, since such names are 
taken from comments in the source code: they consist of portion of phrases, 
name, adjectives, etc.

I think CMake is confused when it finds the USE keyword somewhere in Fortran 
comments, and it is tricked into thinking that the keyword is specifying some 
dependency even if it is placed inside a comment. Indeed, by erasing all 
comments in source files, usually the build is performed successfully.

Does this make any sense? I would really like to use CMake for these Fortran 
projects, since I'm already using it heavily in my C/C++ projects and I love 
it.

Thanks and best regards,

  Francesco.


attitude.tar.bz2
Description: application/tbz
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Re: Fortran support bugs?

2007-08-09 Thread yardbird
On Thursday 09 August 2007, Maik Beckmann wrote:
  gname HATES top-posting so badly!

 yardbird [EMAIL PROTECTED] writes:

 Hello Francesco,

 I working on Fortran support enhancements but I'm not finish it yet.

  In the specific case, which I'm attaching as a
  compressed archive, CMake runs fine, but when launching make it hangs
  at the dependency scanning phase.

 The current fortran source parser, is an adaption of makedepf90-2.6.6
 http://www.helsinki.fi/~eedelman/makedepf90.html
 written by Erik Edelmann seems to be confused by some statement.
 I have sources which trigger the same issue.  However, the changes in
 makedepf90-2.8.8, which I adapted lately(changes are not in CVS!),
 fix this problem.

 Please be patient, I'm doing my best in the spare time I'm able to
 spend on cmake.


 Regards, Maik Beckmann

Thanks Maik and others,

I guess in the meantime we will temporarily backup to SCons, and go back to 
CMake as soon as the Fortran bugs get fixed. It's nothing really fancy, hence 
the transition will be hopefully painless.

Thanks all and best regards,

  Francesco
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Interest in PyQt4 CMake module?

2007-08-09 Thread yardbird
Hello,

I've developed for my own needs a little CMake module that adds some support 
for PyQt4.

In the specific the module looks for the pyuic4 and pyrcc4 binaries and 
defines two macros that use those binaries to turn Qt4 UI and Resource file 
into Python code to be used in PyQt4.

Most likely the module works only on unix (I don't think PyQt4's Win installer 
adds the necessary paths), but maybe it can be used as a basis and improved. 
The naming and usage of the macros is modelled after FindQt4.cmake's ones.

Best regards,

  Francesco.
# Try to find PyQt4 utilities, pyuic4 and pyrcc4:
# PYUIC4BINARY - Location of pyuic4 executable
# PYRCC4BINARY - Location of pyrcc4 executable
# PyQt4_FOUND - PyQt4 utilities found.

# Also provides macro similar to FindQt4.cmake's WRAP_UI and WRAP_RC,
# for the automatic generation of Python code from Qt4's user interface
# ('.ui') and resource ('.qrc') files. These macros are called:
# - PYQT4_WRAP_UI
# - PYQT4_WRAP_RC

IF(PYUIC4BINARY AND PYRCC4BINARY)
  # Already in cache, be silent
  set(PyQt4_FIND_QUIETLY TRUE)
ENDIF(PYUIC4BINARY AND PYRCC4BINARY)

FIND_PROGRAM(PYUIC4BINARY pyuic4)
FIND_PROGRAM(PYRCC4BINARY pyrcc4)

MACRO(PYQT4_WRAP_UI outfiles)
  FOREACH(it ${ARGN})
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.py)
ADD_CUSTOM_TARGET(${it} ALL
  DEPENDS ${outfile}
)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
  COMMAND ${PYUIC4BINARY} ${infile} -o ${outfile}
  MAIN_DEPENDENCY ${infile}
)
SET(${outfiles} ${${outfiles}} ${outfile})
  ENDFOREACH(it)
ENDMACRO (PYQT4_WRAP_UI)

MACRO(PYQT4_WRAP_RC outfiles)
  FOREACH(it ${ARGN})
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile}_rc.py)
ADD_CUSTOM_TARGET(${it} ALL
  DEPENDS ${outfile}
)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
  COMMAND ${PYRCC4BINARY} ${infile} -o ${outfile}
  MAIN_DEPENDENCY ${infile}
)
SET(${outfiles} ${${outfiles}} ${outfile})
  ENDFOREACH(it)
ENDMACRO (PYQT4_WRAP_RC)

IF(EXISTS ${PYUIC4BINARY} AND EXISTS ${PYRCC4BINARY})
   set(PyQt4_FOUND TRUE)
ENDIF(EXISTS ${PYUIC4BINARY} AND EXISTS ${PYRCC4BINARY})

if(PyQt4_FOUND)
  if(NOT PyQt4_FIND_QUIETLY)
message(STATUS Found PyQt4: ${PYUIC4BINARY}, ${PYRCC4BINARY})
  endif(NOT PyQt4_FIND_QUIETLY)
endif(PyQt4_FOUND)
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake