how-to-export-cpp-library icon indicating copy to clipboard operation
how-to-export-cpp-library copied to clipboard

An OS-agnostic C++ library template in plain CMake.

Results 12 how-to-export-cpp-library issues
Sort by recently updated
recently updated
newest added

We have been requiring the use of CMake 3.16 for robotology repos since September 2020 (see https://github.com/robotology/robotology-superbuild/issues/462). Now it could be a good time to review this repo and requiring...

The `how-to-export-cpp-library` can use the [`cookiecutter`](https://github.com/audreyr/cookiecutter) so that it can provide a simple command-line user experience to download and configure the CMake project template.

enhancement
help wanted

The current version of the `LibTemplateCmake` [CMakeLists.txt](https://github.com/robotology/how-to-export-cpp-library/blob/master/src/LibTemplateCMake/CMakeLists.txt) uses [`PUBLIC_HEADER`](https://cmake.org/cmake/help/latest/prop_tgt/PUBLIC_HEADER.html) to list and install the header of the library. While this approach is clean and straightforward, the process does not preserve...

enhancement
help wanted

In my experience, having finer control over exported symbols is much better than exporting all of them (either via the default behavior of GCC-and-friends or via `WINDOWS_EXPORT_ALL_SYMBOLS`). Among these benefits:...

This can be set by a user by mistake. The global property is the trustworthy location for this information. Also set the standard build types as options on the build...

Original comment on this on reddit: https://www.reddit.com/r/cpp/comments/dnc0n2/how_to_export_c_library_an_osagnostic_c_library/f59vof1/ .

help wanted

The current README, for what concerns the YCM dependency, recommends either vendoring the three files we require, or installing YCM externally. Starting from CMake 3.11, as many of you already...

In https://github.com/abseil/abseil-cpp/issues/259#issuecomment-458997650 , a good point is made against setting `CMAKE_CXX_STANDARD` explicitly in libraries, in favor of just using `target_compile_features(mylib PUBLIC cxx_std_11)` to specify the minimum required standard language to...

help wanted
question

I noticed that we did not mention how to handle static variables in shared libraries in Windows. Unfortunately those are not handled by [`CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS`](https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/). While the blog post that we...

enhancement
help wanted