Comments (15)
Yes, this seems to be a windows feature - my build suffers from this also. Something in there is forcing a clean rebuild... @jamesadevine is it possible to test a ninja-less build with just cmake?
from codal.
Nothing forces a clean rebuild. The script enters the build folder and executes ninja
.
from codal.
Is there a way to not use ninja though? As a means to honing in on the cause of the problem?
from codal.
Ah I see, you can use whatever build system you want...
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -G \"Ninja\"
Change Ninja to any other supported one listed here:
https://cmake.org/cmake/help/v3.0/manual/cmake-generators.7.html#command-line-build-tool-generators
There are not many options for windows, and make runs really slowly.
I imagine this is specific to ninja as partial rebuilding is supported on Mac using make.
ninja -d explain
will help diagnose the cause.
from codal.
Ta. Yes, just looking. make doesn't run slowly compared to a clean rebuild all the time . ;)
I've just been digging and it seems to come down to one header file that (I guess) is being regenerated every build, which in turn makes everything look dirty. My windows logs are full of:
ninja explain: output libraries/mbed-classic/CMakeFiles/mbed-classic.dir/targets/hal/TARGET_Atmel/TARGET_SAM_CortexM0P/spi_api.c.obj older than most recent input C:/git/CircuitPlayground/codal/build/codal_extra_definitions.h (535300971 vs 535301080)
ninja explain: libraries/mbed-classic/CMakeFiles/mbed-classic.dir/targets/hal/TARGET_Atmel/TARGET_SAM_CortexM0P/spi_api.c.obj is dirty
ninja explain: output libraries/mbed-classic/CMakeFiles/mbed-classic.dir/targets/hal/TARGET_Atmel/TARGET_SAM_CortexM0P/us_ticker.c.obj older than most recent input C:/git/CircuitPlayground/codal/build/codal_extra_definitions.h (535300971 vs 535301080)
ninja explain: libraries/mbed-classic/CMakeFiles/mbed-classic.dir/targets/hal/TARGET_Atmel/TARGET_SAM_CortexM0P/us_ticker.c.obj is dirty
.
.
.
from codal.
I'll have a look to see if we can do something more optimised with that header file.
from codal.
ok - quick test then... Could you just run ninja
in the build folder, and see if that partially rebuilds?
from codal.
already tried that - it doesn't rebuild, just relinks the final binaries...
Anything magical about "codal_extra_definitions.h" in the build process?
from codal.
Could you replace the similar looking code at line 175, with this:
# create a header file from the definitions specified in JSON
if("${CODAL_DEFINITIONS}" STRGREATER "")
set(EXTRA_INCLUDES_NEW_PATH "${PROJECT_SOURCE_DIR}/build/codal_extra_definitions_new.h")
set(EXTRA_INCLUDES_PATH "${PROJECT_SOURCE_DIR}/build/codal_extra_definitions.h")
file(WRITE "${EXTRA_INCLUDES_NEW_PATH}" ${CODAL_DEFINITIONS})
configure_file(${EXTRA_INCLUDES_PATH} ${EXTRA_INCLUDES_NEW_PATH} COPYONLY)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${EXTRA_INCLUDES_PATH}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${EXTRA_INCLUDES_PATH}")
endif()
And report back?
from codal.
yes, I was just looking slightly askew at that code. Will try now.
from codal.
It looks like make does its' diff process differently to ninja.
from codal.
yup - that fixes it for me.
from codal.
Great, will push.
from codal.
Thanks James.
from codal.
from codal.
Related Issues (20)
- CODAL should protect all interfaces against null pointers
- ManagedString constructor for char incorrect
- add @tannewt HOT 1
- SERIAL_DEBUG undefined reference in SAMD21DAC.cpp HOT 3
- AnalogButton support for AnalogSensor HOT 3
- Optimise Cortex M0 context switch HOT 2
- X, Y axis are swapped for the Circuit Playground Rev G HOT 3
- Support for debouncing in Level detector
- Support for deep sleep
- rethink error codes/panics HOT 1
- Add capability for additional libs to be specified in codal.json
- Delete Timer listeners
- ATMEGA328P_ARDUINO_UNO: ARM assembler error HOT 3
- Slow down of loop when servo used HOT 2
- VSCode support in generated layout
- Override hard fault handlers
- Display codal version in output
- build.py `--revision` flag from microbit-v2-samples HOT 2
- Device should seed random generator HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codal.