tags:

views:

12

answers:

1

I'd like to use CMake to run some tests for an xslt coding project.

The "code" is xslt files. I don't really compile anything, but I have a collection of tests that I use to verify my xslt stuff works.

How can I define a new compiler in CMake?

A: 

Hi,

Rather than go through the work of having CMake use xslt as your compiler, the best approach may be to simple use CMake with CTest to run your existing tests. Your code would look something like this:

project ( XSLTTests )
enable_testing()
find_package(Java REQUIRED)

add_test ( ${Java_JAVA_EXECUTABLE} -jar xslt.jar TestInput.xml TestOutput.html )

Then later on the command line, you can just run CTest.

ctest

Of course you will need to write some code to determine if you xslt is producing the correct outputs.

Best,
-dan

Daniel Blezek
That makes the most sense. I'll try it out.
The Doctor What