Hi All,

Is there a way for CMake to search for macro definitions in header
files without doing a try_run?  The reason I'm asking is that
eventually I'll require FindPython.cmake to report the version of
python that it finds.  But I don't want to do this by checking the
directory names (which is unreliable) or by doing a try_run (for the
sake of cross-compilation).  Running the python executable itself to
find the version is also out, due to cross-compilation.

For the VTK wrappers I've written a pseudo-preprocessor
(vtkWrapPreprocess.c) that does essentially what I need, but not at
configure time.  I'm thinking of the same thing for CMake... a simple
built-in preprocessor that can emulate a compiler and give cmake
access to macro definitions without the need for a try_run.  Or
equivalently the real compiler could run its preprocessor stage and
then present the results to cmake.  The main thing is to avoid the
try_run.

Any thoughts?

 - David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to