-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replacing Make/Kbuild with CMake #1488
Comments
Of the blocker todos, everything is done AFAICT except the documentation. Carles @SebastianBoe: |
Why Install CMake (>=3.7) ? Current apt version is way lower |
@Zarkopafilis I believe it's due to requiring add_custom_command() to use DEPFILE, which was introduced in CMake 3.7. The getting started guide gives you a step by step guide on installing CMake from cmake.org, and it's quite simple. |
Ok. Sidenote: On windows with MSYS it works with cmake 3.6.2.... on a
docker container with an ubuntu base image it did not.
…On Wed, Nov 15, 2017 at 11:47 PM, Carles Cufí ***@***.***> wrote:
@Zarkopafilis <https://github.com/zarkopafilis> I believe it's due to
requiring add_custom_command() to use DEPFILE, which was introduced in
CMake 3.7. The getting started guide gives you a step by step guide on
installing CMake from cmake.org, and it's quite simple.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1488 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFL1Mo-6TJjdc7c_2uTWgb_XHCUkwBuVks5s21wKgaJpZM4PWIUg>
.
--
Best Regards,
Theodoros 'Zarkopafilis' Ntakouris
+30 698 92 90 272 (Greece)
|
@Zarkopafilis that's because the CMake scripts detect that you're running MSYS and lower the required version. It's an exception in the case of MSYS, which doesn't support Ninja. This is temporary since we will soon switch to native CMake with Ninja and no MSYS at all on Windows. |
A bug in Zephyr prevents this from working currently, but it has been fixed in zephyrproject-rtos#1284. This just enables DHCP for platforms other than K64F. Also, a minor style/convention tweak. Fixes zephyrproject-rtos#1488 Signed-off-by: Geoff Gustafson <geoff@linux.intel.com>
This PR implements RFC: Replacing Make/Kbuild with CMake
The Gerrit feedback has been addressed, but the work is not complete. It is uploaded in an incomplete form to enable collaboration and early feedback.
Work In Progress
Blocker TODOs
TODOs that must be fixed before the PR is merged.
Have CMake recursively call CMake to build host tools instead ofHost tools will be provided in the SDK, non-SDK users will have to manually build Kconfig and add it to path.requiring the user to first invoke a seperate CMake build system to
build the host tools.
Non-blocker TODOs
TODOs that must be fixed, but may be delayed until after the PR is merged.
CMake. Currently minumum required version is 3.7, but the latest
Ubuntu LTS ships with 3.5. Supporting an older version would make it
easier for users to get started with Zephyr.
Un-classified TODOs
TODOs in need of being classified as Blocker or non-blocker.
with Zephyr CMakeLists.txt code. Currently they interact in a manner
very similair to how KBuild worked, but even though this worked for
KBuild, it might not be the best solution for a CMake build system.
In particular, consider the "bootloader use-case" of a multi-program
build.
supports a flag).
conventions in driver/ subsys/ ext/ CMakeLists.txt code.
Getting started
Install CMake (>=3.7)
Install Python 3 (>=3.4)
Optionally install Ninja, recommended for most users.
To enable Ninja add the flag -GNinja when calling cmake.
Windows
Open Windows Command Prompt:
Linux
$ source zephyr-env.sh
$ cd $ZEPHYR_BASE/scripts
$ mkdir build && cd build
$ cmake .. && make
$ export PREBUILT_HOST_TOOLS=$(pwd)
$ export BOARD=nrf52_pca10040
$ export ZEPHYR_SDK_INSTALL_DIR=
$ export ZEPHYR_GCC_VARIANT=zephyr
$ cd $ZEPHYR_BASE/samples/bluetooth/beacon
$ cmake -Bbuild -H.
$ cmake --build build
[0] Binary identical FW's before and after the CMake transition would
make verification easy. But it may not be what we really want.
[1] #1107 (comment)
The text was updated successfully, but these errors were encountered: