Mik
Mik

Reputation: 31

Android Studio 3.2: where is cmake message() output displayed?

I'm new to Android Studio. I'm working on a project that has a relevant C++ part which relies on a cmakelist.txt file. Is there a way to display the output coming from some message(STATUS …..) commands placed into my cmakelist.txt during the sync phase? What I have in mind is something similar to the "cmake" view in CLion IDE.

Upvotes: 3

Views: 1953

Answers (3)

c z
c z

Reputation: 9027

What the output file is named seems to be different for me, so I guess it keeps changing.

I found the output by including this in my CMakeLists.txt:

message(STATUS "TEST STATUS")

Building, and then running:

fgrep "TEST STATUS" -r .

From my project directory.

The manoeuvring required to get the even most basic of information from the build pretty much sums up Android development.

Upvotes: 4

Nimitz14
Nimitz14

Reputation: 2338

The output is actually in .cxx/cmake/debug/$ANDROID_ABI

Upvotes: 1

Gerry
Gerry

Reputation: 1233

It should be in $your-proj/$your-module/.externalNativeBuild/cmake/debug/$ARCH/cmake_build_output.txt, where

  • $your-module by default is "app", yours might differ
  • $ARCH is your CPU arch-type (armeabi-v7a, arm64-v8a x86_64 etc)

In the same directory, you could see other two files that are useful for debugging

  • cmake_build_command.txt
  • android_gradle_build.json

In the future releases, the ".externalNativeBuiold" directory name/location might change; but for now, it is the name of the directory.

Upvotes: 1

Related Questions