From df96969b76f075bd9ce14c303659595c747c7223 Mon Sep 17 00:00:00 2001 From: Valentina Kats Date: Mon, 23 May 2022 17:26:06 +0200 Subject: [PATCH] Added pkg-config support info to GSG (#543) (#582) Signed-off-by: Dylan Benito (cherry picked from commit 527fbca672c95e853f9d3728f7f7fccc9cc87a1a) Co-authored-by: Dylan --- documentation/library_guide/onedpl_gsg.rst | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/documentation/library_guide/onedpl_gsg.rst b/documentation/library_guide/onedpl_gsg.rst index 1180dbb132a..ea5d822085d 100644 --- a/documentation/library_guide/onedpl_gsg.rst +++ b/documentation/library_guide/onedpl_gsg.rst @@ -43,6 +43,32 @@ To use tested C++ standard APIs, you need to include the corresponding C++ stand and use the ``std`` namespace. +pkg-config Support +================== + +The pkg-config program is used to retrieve information about your installed libraries, and +to compile and link against one or more libraries. + +Use pkg-config with |onedpl_short| +---------------------------------- + +Use pkg-config with the ``--cflags`` flag to get the include path to the oneDPL directory: + +.. code:: cpp + + dpcpp test.cpp $(pkg-config --cflags dpl) + +The ``--msvc-syntax`` flag is required when you use a Microsoft Visual C++* compiler. +This flag converts your compiling and linking flags to the appropriate form: + +.. code:: cpp + + dpcpp test.cpp $(pkg-config --msvc-syntax --cflags dpl) + +.. note:: + Use the pkg-config tool to get rid of large hard-coded paths and make compilation more portable. + + Usage Examples ==============