[libcxx-commits] [libcxx] [libc++][doc] Use installed std modules in external projects. (PR #80601)

Runzhong Li via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 9 08:10:18 PST 2024


================
@@ -168,51 +174,82 @@ This is a small sample program that uses the module ``std``. It consists of a
   #
   # Import the modules from libc++
   #
+  include(std.cmake)
+
+  add_executable(main main.cpp)
+
+.. code-block:: cmake
 
+  # std.cmake
   include(FetchContent)
   FetchContent_Declare(
-    std
-    URL "file://${LIBCXX_BUILD}/modules/c++/v1/"
+    std_module
+    URL "file://${LIBCXX_INSTALLED_DIR}/share/libc++/v1"
----------------
a858438680 wrote:

These are not intended. I'm not quite good at git. The rebase messed everything and I failed to recheck this. I will fix these things.

https://github.com/llvm/llvm-project/pull/80601


More information about the libcxx-commits mailing list