Re: [cmake-developers] Support of Scala language

2016-02-19 Thread Eric Wing
>>
>>If we're starting with support for a new language then we should
>>add it properly as a first-class language.  Eric and Michael (in Cc)
>>have been working on this for Swift and C# recently.  Likely there
>>is some overlap in design space.
>>

On 2/19/16, CHEVRIER, Marc  wrote:
> I agree. The right approach is to do an integration of Java in the same way
> as C or C++.
> But I don’t have currently enough CMake skills to do this work.
>
> Do you have some documentation explaining how language support is done in
> CMake ? And how specific behaviours of Java/Scala can be supported in
> CMake:
> * All sources composing a jar must be compiled all at once
> * A source file can produce an arbitrary number of binary files (.class)
> with various (and unpredictable) names.
>

Yes, for Swift, I think I'm going to need something similar to the all
sources at once thing. I'm avoiding this for the moment, but I'm told
the mechanism I'm relying on isn't guaranteed to work in the future.
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] Support of Scala language

2016-02-19 Thread CHEVRIER, Marc
I agree. The right approach is to do an integration of Java in the same way as 
C or C++.
But I don’t have currently enough CMake skills to do this work.

Do you have some documentation explaining how language support is done in CMake 
? And how specific behaviours of Java/Scala can be supported in CMake:
* All sources composing a jar must be compiled all at once
* A source file can produce an arbitrary number of binary files (.class) with 
various (and unpredictable) names.

Marc




On 18/02/16 16:06, "Brad King"  wrote:

>On 02/18/2016 06:28 AM, CHEVRIER, Marc wrote:
>> Currently, there is a module UseJava.cmake which mix two aspects:
>
>This module is not a good example of how to do a language in CMake.
>It somehow became the way to do Java in CMake because the builtin
>support for enable_language(Java) was never really made to work right.
>(It tries to do separate compilation which is not really generally
>possible in Java due to circular dependencies of nested classes.)
>
>If we're starting with support for a new language then we should
>add it properly as a first-class language.  Eric and Michael (in Cc)
>have been working on this for Swift and C# recently.  Likely there
>is some overlap in design space.
>
>-Brad
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] Support of Scala language

2016-02-18 Thread Brad King
On 02/18/2016 06:28 AM, CHEVRIER, Marc wrote:
> Currently, there is a module UseJava.cmake which mix two aspects:

This module is not a good example of how to do a language in CMake.
It somehow became the way to do Java in CMake because the builtin
support for enable_language(Java) was never really made to work right.
(It tries to do separate compilation which is not really generally
possible in Java due to circular dependencies of nested classes.)

If we're starting with support for a new language then we should
add it properly as a first-class language.  Eric and Michael (in Cc)
have been working on this for Swift and C# recently.  Likely there
is some overlap in design space.

-Brad
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] Support of Scala language

2016-02-18 Thread CHEVRIER, Marc

Hi,

I have just started to work to extend CMake to support Scala language.
This language is very similar to Java regarding compilation (scala compiler 
generates .class (java byte code)) and packaging  (binary files can be packaged 
in jar files) and is running as part of JVM infrastructure.

Currently, there is a module UseJava.cmake which mix two aspects:

  *   Jar management: add_jar, install_jar and find_jar
  *   Java specific stuff: doc, etc…

Now, regarding jar management, currently only Java language is supported but, 
with only very few changes, Scala can be supported as well. So it would be very 
nice to avoid to duplicate jar management for Scala support.

So, I submit the following proposal, regarding current Java and Scala support, 
to the discussion:

  *   Split current module UseJava.cmake into 2 modules:
 *   UseJar.cmake which will be in charge of jar management, including 
sources compilation (Java and Scala)
 *   UseJava.cmake, keep Java specific stuff and also include, for 
compatibility, module UseJar.cmake
  *   For Scala support, provide modules:
 *   FindScala.cmake (same functionality as FindJava.cmake)
 *   UseScala.cmake which can include UseJar.cmake and provides specific 
stuff (like create_scaladoc)

Comments are welcome…

Marc


-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers