Skip to content
Snippets Groups Projects
Commit 1bae5d71 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed compile visibility issue

parent 9a5e0331
No related branches found
No related tags found
1 merge request!16Unified interface for attributes
This commit is part of merge request !16. Comments created here will be created in the context of that merge request.
......@@ -68,7 +68,7 @@ target_compile_features(${module_name} PRIVATE cxx_std_14)
target_compile_options(${module_name} PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
-Wall -Wextra -Wold-style-cast -Winline -pedantic -Werror=narrowing -Wshadow $<$<BOOL:${WERROR}>:-Werror>>)
-Wall -Wextra -Wold-style-cast -Winline -pedantic -Werror=narrowing -fvisibility=hidden -Wshadow $<$<BOOL:${WERROR}>:-Werror>>)
target_compile_options(${module_name} PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:
/W4>)
......
......@@ -183,6 +183,10 @@ private:
#ifdef PYBIND
// Stores C++ attributes (copy) and Python-only attributes
// Code should be compiled with -fvisibility=hidden
// See https://pybind11.readthedocs.io/en/stable/faq.html:
// “‘SomeClass’ declared with greater visibility than the type of its
// field ‘SomeClass::member’ [-Wattributes]”
std::map<std::string, py::object> mAttrsPy;
#endif
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment