[CMake] Java variables case

William A. Hoffman billlist at nycap.rr.com
Mon Feb 6 16:21:35 EST 2006


At 09:56 AM 2/3/2006, Maxime Sermesant wrote:
>Dear all,
>
>I get into problems with  recent versions of CMake (I used to use the
>1.8), regarding Java variables.
>
>I get errors which seem to come from the case :
>CMake variables are CMAKE_Java_COMPILER, CMAKE_Java_COMPILER_ENV_VAR,...
>and not CMAKE_JAVA_COMPILER, and it seems to be source of pbs.
>is there a reason for no using upper case names?
>
>I used a shell script to put all the _Java_ in _JAVA_ in CMake source
>and it was fine but then I got into trouble with the file created in the
>build/CMakeFiles:
>CMakeJavaCompiler.cmake because CMake looks for CMakeJAVACompiler.cmake
>If I create a symbolic link, it is alright, but it is not really a
>solution. I could not find where this file was created or how this name
>was built.
>
>I may not be very clear (and the problem is not very clear to me) but I
>was wondering if anyone had similar problems or an idea of solution.
>
>Sorry if it has already been discussed, I tried to browse the mailing
>list archive, but did not see this topic.

When you enable the project for Java, use Java and not Java, and things should work.
PROJECT(hello Java)

In CMake/Tests/Java you can see an example.
I think there is a typo in the docs at some point that says to use JAVA.

-Bill



More information about the CMake mailing list