[CMake] Python project using Cmake

srinivas boppu srinivas.boppu at gmail.com
Wed Oct 21 16:21:35 EDT 2015


Hi Matthew Keeler,

Thanks for your quick reply. My project is a pure python project. I wanted
to use cmake and ctest for testing my individual python modules. Later on,
I might have some "tcl" scripts and may be some c++ sources in the same
project.

It would be great, if you could share your pure python project details and
the macros or related documents.

Thanks and Regards,
Srinivas Boppu




On Wed, Oct 21, 2015 at 9:52 PM, Matthew Keeler <mkeeler at tenable.com> wrote:

> What are you trying to do? Are you trying to build Python C extensions? If
> so then the FindPythonLibs module will help you in that regard. It will
> determine if the Python development files are installed and populate
> variables with the necessary paths to provide to link_directories and
> include_directories.
> https://cmake.org/cmake/help/v3.3/module/FindPythonLibs.html
>
> Additionally there is the FindPythonInterp module which will find the
> Python interpreter for invoking via custom commands or execute_process.
> https://cmake.org/cmake/help/v3.3/module/FindPythonInterp.html
>
> Also if you aren’t actually compiling any C/C++ code it will speed up
> build system generation if you specify the languages as NONE during the
> project command invocation. That behavior is documented at:
> https://cmake.org/cmake/help/v3.3/command/project.html
>
> In the past I have used cmake even for pure Python projects to just get
> the benefits of generic packaging with cpack and to be able to use ctest.
> If this is the case for you then you may end up defining a bunch of
> functions/macros to do all the work as I did.
>
> --
> Matt Keeler
>
> On October 21, 2015 at 11:28:28, srinivas boppu (srinivas.boppu at gmail.com)
> wrote:
>
> Hello All,
>
> I am new to cmake and its build and ctest system. I read some where that
> cmake default look for c++ compiler and we need to modify/configure the
> cmake to recongize the python files.
> I googled for the same but I couldn't find any concrete and complete
> example.
> Any pointers in this regard would be useful.
>
> Thanks in advance.
>
> --
> Apologizing doesn't mean U r wrong & the other is right,It means that U
> value the relationship more than Ur ego...
>
> --
>
> 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
>
>


-- 
Apologizing doesn't mean U r wrong & the other is right,It means that U
value the relationship more than Ur ego...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151022/17d24a66/attachment.html>


More information about the CMake mailing list