Skip to content

Commit

Permalink
ENH: test build action test with visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Brunner246 committed May 30, 2024
1 parent 266682a commit 0ba2ef1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions logging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@ target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog)
if(WIN32)
if(BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME}
PRIVATE LOGGER_API=__declspec(dllexport)
PRIVATE "LOGGER_API=__declspec(dllexport)"
INTERFACE "LOGGER_API=__declspec(dllimport)"
)
else()
target_compile_definitions(${PROJECT_NAME}
PUBLIC LOGGER_API
PUBLIC "LOGGER_API"
)
endif()
else()
if(BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME}
PRIVATE LOGGER_API=__attribute__((visibility("default")))
PRIVATE "LOGGER_API=__attribute__((visibility(\"default\")))"
INTERFACE "LOGGER_API=__attribute__((visibility(\"default\"))"
)
else()
target_compile_definitions(${PROJECT_NAME}
PUBLIC LOGGER_API
PUBLIC "LOGGER_API"
)
endif()
endif()

0 comments on commit 0ba2ef1

Please sign in to comment.