[CMake] Using CMake to compile non-standard languages

Konstantin Tokarev annulen at yandex.ru
Tue Jan 16 05:50:25 EST 2018



16.01.2018, 13:39, "Jakob van Bethlehem" <jsvanbethlehem at gmail.com>:
> Dear all,
>
> Currently I'm trying to make a case to convert the pure makefile-based build environment at my company into cmake. This is a rather extensive build environment, which takes care of many things automatically through a whole set of internally created tools. I still believe we can do better with CMake, but I need to make a strong case.
>
> The main problem is that we have (very old) code in an obsure languange called 'Ratfor'. How can I tell CMake how to compile files written in that language?

1. Create variable with list of source files
2. Iterate through it in cycle and use add_custom_command for each file, defining compilation rule

Note that unlike Make, CMake doesn't have any counterpart of suffix or template user-defined rules, so you have to use cycles.

>
> Sincerely,
> Jakob van Bethlehem
>
> ,--
>
> 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


-- 
Regards,
Konstantin


More information about the CMake mailing list