[libcxx-commits] [libcxx] [libc++][doc] Use installed std modules in external projects. (PR #80601)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Mar 9 04:30:41 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"
----------------
mordante wrote:
This part of the example should use the `${LIBCXX_BUILD}` right? Are the other parts of the changes in this part intended?
https://github.com/llvm/llvm-project/pull/80601
More information about the libcxx-commits
mailing list