I'm using Android Studio 2.3 beta 3. I put message(AUTHOR_WARNING "Hello CMake, hello Android")
In my CMakeLists.txt
But I saw this message only few times when rebuilding project in Android Studio. In most cases there's no "Hello CMake, hello Android"
string in Gradle Console after build finishes. I've tried resync gradle and clean/rebuild project, still no expected output.
I have some problems with my build (I think it's incorrect paths) so my goal - to print CMake variables in compile time to better understand what is actually going on.
CMake
messages are only at generation time (when CMake
is used to generate your project / Makefile).
One way to get CMake
to generate is to go to retrieve the build folder and the CMakeCache.txt
file in it, and then:
CMakeCache.txt
file and checking the value of the CMAKE_COMMAND
variableCMakeCache.txt
directory<path_to_cmake_found_at_point_1> .
Note: The build folder should have a CMakeCache.txt
file. The above will not work unless it does.