summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-06-16 13:55:04 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2023-06-16 18:19:24 +0200
commitf1096ae7c68f95dc7858905367efb34f4921e84c (patch)
tree79901fbdf9c211f923dcdd7555277864655f9959
parent04972f1e134d585a7633d04c9bf7a6d38a4d4315 (diff)
downloadrules-cc-f1096ae7c68f95dc7858905367efb34f4921e84c.tar.gz
doc: Use C++ sources in tutorial
... as libssl.a is C++ as well.
-rw-r--r--doc/being-consumed-by-cmake.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/being-consumed-by-cmake.md b/doc/being-consumed-by-cmake.md
index 8dd48ce..b4e0bc5 100644
--- a/doc/being-consumed-by-cmake.md
+++ b/doc/being-consumed-by-cmake.md
@@ -92,10 +92,10 @@ $
Example: Consume the installed `ssl` Library with CMake
-------------------------------------------------------
-As an example, a minimal `main.c` file is created that depends on the
+As an example, a minimal `main.cpp` file is created that depends on the
`ssl` library.
-``` {.c srcname="main.c"}
+``` {.cpp srcname="main.cpp"}
#include <openssl/evp.h>
int main(int argc, char** argv) {
@@ -116,7 +116,7 @@ project(test_ssl)
find_package(PkgConfig REQUIRED)
pkg_check_modules(SSL REQUIRED ssl)
-add_executable(main main.c)
+add_executable(main main.cpp)
target_include_directories(main PRIVATE ${SSL_INCLUDE_DIRS})
target_compile_options(main PRIVATE ${SSL_CFLAGS_OTHER})
target_link_directories(main PRIVATE ${SSL_LIBRARY_DIRS})
@@ -152,7 +152,7 @@ $ cmake -DCMAKE_PREFIX_PATH=/tmp/just_ssl -S . -B /tmp/test_ssl
-- Generating done
-- Build files have been written to: /tmp/test_ssl
$ cmake --build /tmp/test_ssl
-[ 50%] Building CXX object CMakeFiles/main.dir/main.c.o
+[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
[100%] Linking CXX executable main
[100%] Built target main
$