Hello, I'm trying to create a simple exercise, a definition for a virtual language "X" that will be used side-by-side with C and C++. There are some restrictions on the level of compatibility with C/C++. For instance, the objects of this language aren't directly compatible with C and C++ but then there is a virtual application "X linker/librarian" that is capable of converting X objects into C objects generating a standard C lib (note the absence of a temporary objects in the C format, this is important).
Now, the project is composed of a subproject of type language X, that generate a lib, another subproject that generate another lib (a C one) and then the base project that should link libc with libx to create an executable. proj/libx/CMakeLists.txt -> define: project(libx X) -> generate prefixlibx.a proj/libc/CMakeLists.txt -> define: project(libc C) -> generate libc.a proj/app/CMakeLists.txt -> define: project(app C) -> generate exec.elf that links libc.a and prefixlibx.a Everything _almost_ work the way I want, with exception of the librarian/linker. If I force in CMakeDetermineXCompiler.cmake the CMAKE_AR to "xar" and "xranlib", it will use then to do the libx AND libc. If I do not force CMAKE_AR and let find_program determine, it will use "ar" for both libc AND libx. Why can't I use CMAKE_AR as "xar" inside a X project that is inside a C project? I think that if something like CMAKE_<LANG>_AR and others existed, we would be able to do more complex things for example (enabling the use of < > variables). All this is only hypothetical and I'm using this to understand better CMake and try to map how I can _implement_ _new_ languages and toolsets to use with our custom tools. Here is a link to my repository where I added this cmake test: https://github.com/fungos/cmake_langx Thank you Danny Grein
-- 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