|
1 | 1 | cmake_minimum_required(VERSION 3.20) |
2 | | -project(cpp_tutorials LANGUAGES CXX) |
| 2 | +project(cpp_tutorials LANGUAGES CXX C) |
3 | 3 |
|
4 | 4 | # This project uses per-config output directories, so it requires a |
5 | 5 | # multi-config generator. Ninja Multi-Config is the recommended choice. |
@@ -62,6 +62,7 @@ endif() |
62 | 62 | # --------------------------------------------------------------------------- |
63 | 63 | add_executable(pointers src/pointers/pointers.cpp) |
64 | 64 | add_executable(string src/string.cpp) |
| 65 | +add_executable(format src/format.cpp) |
65 | 66 | add_executable(exception_handling src/exception_handling.cpp) |
66 | 67 | add_executable(assert src/assert.cpp) |
67 | 68 | add_executable(return_abort_exit src/return_abort_exit.cpp) |
@@ -90,9 +91,11 @@ add_executable(iterator_loop src/iterator_loop.cpp) |
90 | 91 | add_executable(function_pointer src/function_pointer.cpp) |
91 | 92 | add_executable(bind src/bind.cpp) |
92 | 93 | add_executable(function src/function.cpp) |
| 94 | +add_executable(functions src/functions.cpp) |
93 | 95 | add_executable(lambda src/lambda.cpp) |
94 | 96 | add_executable(unions src/unions.cpp) |
95 | 97 | add_executable(basic_IO_operation_streams src/basic_IO_operation_filesystem_streams_reading_writing_files_formating_output_cin_cout_scanf_printf_gets_puts_getline.cpp) |
| 98 | +add_executable(filesystem src/filesystem.cpp) |
96 | 99 | add_executable(const_constexpr_mutable src/const_constexpr_mutable.cpp) |
97 | 100 | add_executable(literals src/literals.cpp) |
98 | 101 | add_executable(ternary src/ternary.cpp) |
@@ -162,6 +165,14 @@ add_executable(circular_dependency |
162 | 165 | src/class/circular_dependency/classA.cpp |
163 | 166 | src/class/circular_dependency/classB.cpp) |
164 | 167 |
|
| 168 | +# extern: cross-TU global variable and extern "C" linkage to a C function. |
| 169 | +add_executable(extern_variable |
| 170 | + src/extern/variable/main.cpp |
| 171 | + src/extern/variable/global.cpp) |
| 172 | +add_executable(extern_function |
| 173 | + src/extern/function/main.cpp |
| 174 | + src/extern/function/foo.c) |
| 175 | + |
165 | 176 | # --------------------------------------------------------------------------- |
166 | 177 | # Advanced C++ concepts / idioms |
167 | 178 | # --------------------------------------------------------------------------- |
|
0 commit comments