[GCC-XML] "An IF command had incorrect arguments" from "GCC_XML/KWSys/CMakeLists.txt"

Follower follower at rancidbacon.com
Sun May 21 09:48:01 EDT 2006


Hi...

I was recently trying to get gccxml compiled on Mac OS X 10.4.5
so I could use it with the code generator from the Python ctypes project.

I ran into a problem after following these instructions in "gccxml/README":

    $ mkdir gccxml-build
    $ cd gccxml-build
    $ cmake ../gccxml -DCMAKE_INSTALL_PREFIX:PATH=/installation/path

When I executed this command:

    cmake ../gccxml

It progresses successfully for a while but then ends with:

     ...
     -- Checking whether struct stat has st_mtim member - no
     CMake Error: Error in cmake code at

/Users/phil/Downloads/gccxml-cvs2/gccxml/GCC_XML/KWSys/CMakeLists.txt:679:
     IF An IF command had incorrect arguments: COMMAND
SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE
     -- Configuring done

My elegant :-) solution at the time was to comment out the following
section of code (in `CMakeLists.txt`):

# Setup testing if not being built as part of another project.
IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)

...

   ENDIF(BUILD_TESTING)
ENDIF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)

Re-executing the command after this edit enabled compilation to complete
successfully.

I don't know if this error indicates anything more than user error but I
thought I'd at least mention it.

Eventually I was successful in using gccxml/ctypes/spidermonkey to
access the Javascript parser in SpiderMonkey, so thanks for your work on
gccxml. (I'm hoping I'll put the work up on the net in due course, but
believe it when you see it. :-) )

--Phil.

P.S. The bounce message for non-subscribers to this list has the subject 
"Your message to gccxml awaits moderator approval" even though the 
messages are always discarded (which the body goes on to explain). It 
would be helpful if the subject was something like: "Your message to 
gccxml has been discarded".



More information about the gccxml mailing list