Export the generated react-native NativeModules
as a CMake Project.
Generating the related files through CMake is a bit more involved,
so just present the generated files with a pretty bow.
Depends on D4301
Paths
| Differential D4302 Authored by • jon on Jun 19 2022, 3:55 PM.
Details Summary Export the generated react-native NativeModules Generating the related files through CMake is a bit more involved, Depends on D4301 Test Plan nix develop && cd native/cpp/ && mkdir build && cd build && cmake .. && make
Diff Detail
Event TimelineHerald added subscribers: • abosh, atul, • adrian and 2 others. · View Herald TranscriptJun 19 2022, 3:55 PM2022-06-19 15:55:23 (UTC-7) Harbormaster returned this revision to the author for changes because remote builds failed.Jun 19 2022, 4:06 PM2022-06-19 16:06:39 (UTC-7) • jon added a child revision: D4304: [services] Attempt new header layout.Jun 20 2022, 8:25 AM2022-06-20 08:25:05 (UTC-7) Harbormaster returned this revision to the author for changes because remote builds failed.Jun 22 2022, 8:34 PM2022-06-22 20:34:32 (UTC-7) Harbormaster returned this revision to the author for changes because remote builds failed.Jul 3 2022, 9:25 AM2022-07-03 09:25:05 (UTC-7) • jon added a child revision: D4432: [nix] Add fbjni.Jul 3 2022, 10:39 AM2022-07-03 10:39:59 (UTC-7) • jon added a child revision: D4447: Update modules build after changes to master.Jul 5 2022, 11:56 AM2022-07-05 11:56:52 (UTC-7) Harbormaster failed remote builds in B10393: Diff 14303!Jul 7 2022, 3:47 PM2022-07-07 15:47:24 (UTC-7) Comment Actions Resigning since I'm usually not a good person to set as a first-pass reviewer. Exceptions here Comment Actions Not able to test this locally because I can't get nix to work at the moment, but it looks right to me. Some of these CMakeLists.txt files assume that dependencies like gRPC and OpenSSL and whatever are available on the machine and can be found. This seems like a reasonable assumption when everything is under Nix, but could we include calls to FetchContent (https://cmake.org/cmake/help/latest/module/FetchContent.html) to fetch the dependencies in case they aren't on the machine to keep things more portable?
This revision is now accepted and ready to land.Jul 14 2022, 8:59 PM2022-07-14 20:59:20 (UTC-7) Comment Actions
Yea, that doesn't seem too unreasonable. But there is a long term maintenance burden with doing this, as there's a need to maintain two configuration which may be out-of-sync. However, falling back to pulling from a repo doesn't seem too bad. I can create a task to do so.
ashoat added inline comments.
This revision now requires changes to proceed.Jul 15 2022, 1:01 PM2022-07-15 13:01:06 (UTC-7) • jon removed a parent revision: D4301: Add top-level cpp CMake Project.Aug 12 2022, 4:22 PM2022-08-12 16:22:58 (UTC-7)
Revision Contents
Diff 14118 native/cpp/CommonCpp/_generated/CMakeLists.txt
native/cpp/CommonCpp/_generated/NativeModules.h
native/cpp/CommonCpp/_generated/NativeModules.cpp
|