2014-05-15 10:08 GMT+02:00 Nicolas Desprès <nicolas.desp...@gmail.com>:
> Hi,
>
> I am planning to develop a python generator of CMakeLists.txt file for
> easier integration in an already existing tool. This approach is different
> from the others approaches consisting in binding the CMake language in a
> foreign languages. Lua, Javascript and Python have already been tried
> without success to my knowledge. Generating CMakeLists.txt files seems a
> simpler approach to me since the CMake language is very stable and it keeps
> the two projects separated. Finally it reaches the same goal since the idea
> behind binding CMake in a foreign language is too gain a more general
> purpose and feature full language with a larger standard library.
>
> To assist in such a task the CMake language could provide a command similar
> to the #line directive found in the C-pre-processor. Changing the filename
> and line number in the CMakeLists.txt file would make the generator able to
> transparently run CMake behind the scene while the errors reported by CMake
> would still refer to the generator input file written by the user.
>
> The last time I checked I could not find such a feature in CMake.

Did you check those var:
CMAKE_CURRENT_LIST_DIR
CMAKE_CURRENT_LIST_FILE
CMAKE_CURRENT_LIST_LINE

message(STATUS "${CMAKE_CURRENT_LIST_LINE}: ${CMAKE_CURRENT_LIST_FILE}
Your message")

should print the line number and filename with "Your message".

Is it the kind of feature you are looking for?


>  I am realizing that since version 3 is still under development it might be a 
> good
> occasion to show up and mention it here. I think that it is not a big change
> to CMake and that it should not overload the maintenance process. I hope it
> is not too late for such a proposal since the 5th candidate has just been
> released.

CMake 3 is in RC process I doubt that adding new feature is possible
at this stage.


-- 
Erk
L'élection n'est pas la démocratie -- http://www.le-message.org
-- 

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/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to