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 a3c0905 commit 10acf8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ] #
os: [ windows-latest ] # , ubuntu-latest, macos-latest
include:
- os: windows-latest
compiler: msvc
- os: ubuntu-latest
compiler: gcc
- os: macos-latest
compiler: clang
# - os: ubuntu-latest
# compiler: gcc
# - os: macos-latest
# compiler: clang
steps:
- name: Checkout code
uses: actions/[email protected]
Expand Down
6 changes: 1 addition & 5 deletions gtfs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,31 @@ target_link_libraries(${PROJECT_NAME}
spdlog::spdlog
)


if(WIN32)
if(BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME}
PRIVATE "GTFS_API=__declspec(dllexport)"
INTERFACE "GTFS_API=__declspec(dllimport)"
"LOGGER_API=__declspec(dllimport)"
)
else()
target_compile_definitions(${PROJECT_NAME}
PUBLIC "GTFS_API"
"LOGGER_API"
)
endif()
else()
if(BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME}
PRIVATE "GTFS_API=__attribute__((visibility(\"default\")))"
INTERFACE "GTFS_API"
"LOGGER_API=__attribute__((visibility(\"default\")))"
)
else()
target_compile_definitions(${PROJECT_NAME}
PUBLIC "GTFS_API"
"LOGGER_API"
)
endif()
endif()


# target_compile_definitions(${PROJECT_NAME} PRIVATE LIBRARY_EXPORTS)
message(BINARY_DIR: ${CMAKE_BINARY_DIR}/${PROJECT_NAME})
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
Expand Down

0 comments on commit 10acf8e

Please sign in to comment.