add my own language-name using standard functions

classic Classic list List threaded Threaded
3 messages Options
Hex
Reply | Threaded
Open this post in threaded view
|

add my own language-name using standard functions

Hex

dear community,

I want to make a module for a language that is not supported by CMake.

are there any restrictions in using add_executable for any language other than C / C++,

must the build be constructed very similar to C language?

I was looking into Java module for reference and noted that it is defining its own functions for build. Since overriding standard CMake functions is discouraged and add_executable seems to be hard coded (not a CMake module) I believe that I have to create my own functions like add_verilog_configuration, target_link_verilog_library and alike. 



--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: add my own language-name using standard functions

Kyle Edwards
On Fri, 2019-07-19 at 21:30 +0100, hex wrote:

> dear community,
> I want to make a module for a language that is not supported by
> CMake. 
> are there any restrictions in using add_executable for any language
> other than C / C++, 
> must the build be constructed very similar to C language?
> I was looking into Java module for reference and noted that it is
> defining its own functions for build. Since overriding standard CMake
> functions is discouraged and add_executable seems to be hard coded
> (not a CMake module) I believe that I have to create my own functions
> like add_verilog_configuration, target_link_verilog_library and
> alike. 

All of the languages have different rules for building, linking, etc.
and many of these rules are encoded in native C++ rather than in CMake
script.

If you would like to add Verilog support to CMake, please open an issue
on GitLab so we can track the progress.

Kyle
--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: add my own language-name using standard functions

J. Caleb Wherry
Also, I would not suggest using the Java language support as reference as it is not a first class supported language. As you said, it defines custom functions and macros to do everything.

I would suggest you look at the C# support as it is a first class language (meaning: you can add it to your project statement along with C and CXX or use enable language). It is only supported for the Visual Studio Generator but it should give you a lot better starting point than the Java stuff.

-Caleb

On Fri, Jul 19, 2019 at 4:43 PM Kyle Edwards <[hidden email]> wrote:
On Fri, 2019-07-19 at 21:30 +0100, hex wrote:
> dear community,
> I want to make a module for a language that is not supported by
> CMake. 
> are there any restrictions in using add_executable for any language
> other than C / C++, 
> must the build be constructed very similar to C language?
> I was looking into Java module for reference and noted that it is
> defining its own functions for build. Since overriding standard CMake
> functions is discouraged and add_executable seems to be hard coded
> (not a CMake module) I believe that I have to create my own functions
> like add_verilog_configuration, target_link_verilog_library and
> alike. 

All of the languages have different rules for building, linking, etc.
and many of these rules are encoded in native C++ rather than in CMake
script.

If you would like to add Verilog support to CMake, please open an issue
on GitLab so we can track the progress.

Kyle
--

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:
https://cmake.org/mailman/listinfo/cmake
--
Sent from my iPhone SE

--

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:
https://cmake.org/mailman/listinfo/cmake