Skip to content

Conversation

@simbit18
Copy link
Contributor

Summary

Add:

Impact

Impact on user: NO

Impact on build: This PR Aligned Cmake with Make

Impact on hardware: NO

Impact on documentation: NO

Impact on security: NO

Impact on compatibility: NO

Testing

locally

D:\nuttxtmp\nuttx>cmake -B build -DBOARD_CONFIG=raspberrypi-4b:cgol -GNinja
-- Found Python3: C:/Users/bit/AppData/Local/Programs/Python/Python313/python.exe (found version "3.13.3") found components: Interpreter
-- Processing includes: D:/nuttxtmp/nuttx/boards/arm64/bcm2711/raspberrypi-4b/configs/cgol/defconfig -> D:/nuttxtmp/nuttx/build/.defconfig.processed
-- nuttx_add_subdirectory: Skipping cxx-oot-build
-- Initializing NuttX
--   ENV{PROCESSOR_ARCHITECTURE} = AMD64
  Select HOST_WINDOWS=y
  Select WINDOWS_NATIVE=y
--   CMake:  3.31.5
--   Ninja:  1.12.1
--   Board:  raspberrypi-4b
--   Config: cgol
--   Appdir: D:/nuttxtmp/apps
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- The ASM compiler identification is GNU
-- Found assembler: D:/nx20250410/tools/gcc-aarch64-none-elf/bin/aarch64-none-elf-gcc.exe
-- nuttx_add_subdirectory: Skipping cxx-oot-build
-- Configuring done (7.5s)
-- Generating done (2.3s)
-- Build files have been written to: D:/nuttxtmp/nuttx/build

D:\nuttxtmp\nuttx>cmake --build build
[1146/1148] Linking CXX executable nuttx
Memory region         Used Size  Region Size  %age Used
[1148/1148] Generating nuttx.hex

- Conway's Game of Life apache#3210

Signed-off-by: simbit18 <[email protected]>
@simbit18 simbit18 requested a review from linguini1 November 14, 2025 11:19
@acassis
Copy link
Contributor

acassis commented Nov 14, 2025

@simbit18 maybe we could create an automatic check: if a commit modify a Makefile but don't modify a CMakelist it raises an error

@simbit18
Copy link
Contributor Author

Hi @acassis Let's start from the assumption that you can't be familiar with both build systems (Make and CMake). Make is the official build system. So, in my opinion, you can't block a PR if it's not aligned with CMake. In any community, you need to help each other by sharing your hard work! :)

@acassis
Copy link
Contributor

acassis commented Nov 14, 2025

Hi @acassis Let's start from the assumption that you can't be familiar with both build systems (Make and CMake). Make is the official build system. So, in my opinion, you can't block a PR if it's not aligned with CMake. In any community, you need to help each other by sharing your hard work! :)

Yes, you are right! But in the other hand if we don't do it both building systems will be always out of sync. At some point we need to request support for board. Hmm, do you thing it is possible to have a script to keep CMake automatically synced with Make?

@xiaoxiang781216
Copy link
Contributor

xiaoxiang781216 commented Nov 14, 2025

Hi @acassis Let's start from the assumption that you can't be familiar with both build systems (Make and CMake). Make is the official build system. So, in my opinion, you can't block a PR if it's not aligned with CMake. In any community, you need to help each other by sharing your hard work! :)

If cmake script already exist, sync both build system is just simple copy and paste. I don't think there is any issue block the contributor sync them. The guide require that the contributor must fix the original coding style error and provide the full document, which is more work than sync build script.

@acassis
Copy link
Contributor

acassis commented Nov 14, 2025

Hi @acassis Let's start from the assumption that you can't be familiar with both build systems (Make and CMake). Make is the official build system. So, in my opinion, you can't block a PR if it's not aligned with CMake. In any community, you need to help each other by sharing your hard work! :)

If cmake script already exist, sync both build system is just simple copy and paste. I don't think there is any issue block the contributor sync them. The guide require that the contributor must fix the original coding style error and provide the full document, which is more work than sync build script.

Agree! I think this is something that should be done later or during to review (the someone remember to ask to it)

@simbit18
Copy link
Contributor Author

If cmake script already exist, sync both build system is just simple copy and paste. I don't think there is any issue block the contributor sync them. The guide require that the contributor must fix the original coding style error and provide the full document, which is more work than sync build script.

@acassis @xiaoxiang781216 Of course, if the CMakeList file exists, the change is minimal and easy to add.

I was referring to all existing arch and boards (and all new ones to come) that currently do not have the CMake build system.

@xiaoxiang781216
Copy link
Contributor

If cmake script already exist, sync both build system is just simple copy and paste. I don't think there is any issue block the contributor sync them. The guide require that the contributor must fix the original coding style error and provide the full document, which is more work than sync build script.

@acassis @xiaoxiang781216 Of course, if the CMakeList file exists, the change is minimal and easy to add.

I was referring to all existing arch and boards (and all new ones to come) that currently do not have the CMake build system.

the check could generate warning only when both CMakeLists.txt and Makefile exist.

@linguini1
Copy link
Contributor

Sorry @simbit18 , I copied from the snake demo so I figured there was no CMake support for games yet. My next step was actually to go back and add it for the games, thanks for beating me to it!

Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @simbit18 =)

@xiaoxiang781216 xiaoxiang781216 merged commit c7ac717 into apache:master Nov 14, 2025
40 checks passed
@simbit18 simbit18 deleted the simbit18-cgol branch November 14, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants