question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move CmakeList.txt generation after clean task

See original GitHub issue

Thank you for the nice plugin! 👍

While trying to replace my own implementation with this, I ran in to a somewhat a problem, so maybe some one else is also experiencing this.

I like to sometimes run a clean task before building my project (mostly when deploying), and with that task in place the compiler game me an error that the file specified in the externalNativeJsonGenerator.makefile property does not exist. Some investigation revealed that the CMakeLists.txt is generated in the afterEvaluate callback witch is executed before the clean task, so on the clean task the file is deleted. So I was wondering if it is plausible of moving the generation after the clean task? Maybe it can be hooked to after/before preBuild task?

The issue can be simulated with the sample projects by running a clean when building ./gradlew sample:clean sample:assemble

A problem was found with the configuration of task ':sample:generateJsonModelDebug'.
> File '/Users/darius/workspace/android/Cipher.so/sample/build/cipher.so/cmake/CMakeLists.txt' specified for property 'externalNativeJsonGenerator.makefile' does not exist.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
linismecommented, Jan 17, 2018

@kibotu it looks like it’s caused by the file path, please try it again within the dev-SNAPSHOT channel

if still no work, show me more infos

0reactions
jyangcommented, Mar 11, 2018

I just encountered the same issue:

.../n4ma-hello/platforms/android/app/src/com/janeasystems/cdvnodejsmobile/jni/CMakeLists.txt' specified 
for property 'externalNativeJsonGenerator.makefile' does not exist.

Any progress on a fix?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Move CmakeList.txt generation after clean task #9 - GitHub
I like to sometimes run a clean task before building my project (mostly when deploying), and with that task in place the compiler...
Read more >
Looking for a 'cmake clean' command to clear up CMake output
So if I want to make clean , I can just rm -rf build . The "build" folder in the same directory as...
Read more >
After I slightly modified the CMakeLists, how can I clean and re ...
txt has been modified. You should be running cmake inside a build directory, and so if you want a completely clean build, you...
Read more >
CMake projects in Visual Studio | Microsoft Learn
CMake project files (such as CMakeLists.txt ) are consumed directly by Visual ... To make changes that persist after you clean the cache, ......
Read more >
add_custom_command — CMake 3.25.1 Documentation
This defines a command to generate specified OUTPUT file(s). A target created in the same directory ( CMakeLists.txt file) that specifies any output...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found