Complete Include Build Link Details

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

Complete Include Build Link Details

Satya Prakash Prasad

We have a project which we compile it thru CMAKE utility. Our projects has submodules and recently it was found that developers where introducing code dependency across sub modules.

Say we have submodule A and submodule B while main module C compiles both A and B and generates all the executable. As per the issue submodule B code is being used in submodule A. Though the code is compiling fine but this is highly dangerous of the dependency across sub modules.

Now how can I know via CMAKE (logs / report / traces / build etc anyway) utility which includes path / link paths are involved in which binaries. The over all objective is to break the dependency if any.

Is there a way to get any kind of details via CMAKE build process - the include / linking path level used for each binary (to trace libs across submodules being used for binaries)?


--

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
Reply | Threaded
Open this post in threaded view
|

Re: Complete Include Build Link Details

Micha Hergarden
On 19-09-17 16:24, Satya Prakash Prasad wrote:

We have a project which we compile it thru CMAKE utility. Our projects has submodules and recently it was found that developers where introducing code dependency across sub modules.

Say we have submodule A and submodule B while main module C compiles both A and B and generates all the executable. As per the issue submodule B code is being used in submodule A. Though the code is compiling fine but this is highly dangerous of the dependency across sub modules.

Now how can I know via CMAKE (logs / report / traces / build etc anyway) utility which includes path / link paths are involved in which binaries. The over all objective is to break the dependency if any.

Is there a way to get any kind of details via CMAKE build process - the include / linking path level used for each binary (to trace libs across submodules being used for binaries)?



Hello Satya,

Unfortunately you didn't say what language & buildsystem you are using? In my answer I am assuming c or c++: as far as I'm aware this list cannot (easily) be obtained from CMake. However, I suggest a tool such as 'include-what-you-use' from the Clang toolchain.
One of the issues with using CMake in this case is that it is possible to get a working build without adding a dependency for all the necessary files to the cmake files (e.g. by just assuming the needed files are in a certain location and including them directly in the source files).

Hth,
Micha

--

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

signature.asc (537 bytes) Download Attachment