Ask Your Question
4

How can I obtain compilation information per transaction unit using cmake?

asked 2022-09-25 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-21 17:00:00 +0000

bukephalos gravatar image

CMake does not directly provide compilation information per transaction unit. However, you can use the VERBOSE flag to enable compiler output during compilation, which will give you more information about the actions being performed during compilation.

To enable the VERBOSE flag in CMake, you can set the CMAKE_VERBOSE_MAKEFILE variable to ON in your CMakeLists.txt file:

set(CMAKE_VERBOSE_MAKEFILE ON)

This will enable verbose output during the build process, which should give you more information about the compilation process.

Alternatively, you can also use a build system like Ninja or Make which have built-in support for displaying verbose build output during compilation. To use these build systems with CMake, you can set the CMAKE_GENERATOR variable to the appropriate build system when configuring your project with CMake:

cmake -G Ninja

This will generate a build system using Ninja, which you can then use to build your project and see more detailed compilation information.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-09-25 11:00:00 +0000

Seen: 21 times

Last updated: Sep 21 '22