File tree Expand file tree Collapse file tree 9 files changed +66
-20
lines changed Expand file tree Collapse file tree 9 files changed +66
-20
lines changed Original file line number Diff line number Diff line change 2222#include < memory>
2323#include < string_view>
2424
25+ #include " iceberg/visibility.h"
26+
2527namespace iceberg {
2628
27- class Puffin {
29+ class ICEBERG_EXPORT Puffin {
2830 public:
2931 virtual ~Puffin () = default ;
3032 virtual std::string_view print () const = 0;
Original file line number Diff line number Diff line change 2222#include < memory>
2323#include < string_view>
2424
25+ #include " iceberg/visibility.h"
26+
2527namespace iceberg {
2628
27- class Table {
29+ class ICEBERG_EXPORT Table {
2830 public:
2931 virtual ~Table () = default ;
3032 virtual std::string_view print () const = 0;
Original file line number Diff line number Diff line change 1+ /*
2+ * Licensed to the Apache Software Foundation (ASF) under one
3+ * or more contributor license agreements. See the NOTICE file
4+ * distributed with this work for additional information
5+ * regarding copyright ownership. The ASF licenses this file
6+ * to you under the Apache License, Version 2.0 (the
7+ * "License"); you may not use this file except in compliance
8+ * with the License. You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing,
13+ * software distributed under the License is distributed on an
14+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+ * KIND, either express or implied. See the License for the
16+ * specific language governing permissions and limitations
17+ * under the License.
18+ */
19+
20+ #pragma once
21+
22+ #if defined(_WIN32 ) || defined(__CYGWIN__ )
23+ # ifdef ICEBERG_STATIC
24+ # define ICEBERG_EXPORT
25+ # else
26+ # ifdef ICEBERG_EXPORTING
27+ # define ICEBERG_EXPORT __declspec(dllexport)
28+ # else
29+ # define ICEBERG_EXPORT __declspec(dllimport)
30+ # endif
31+ # endif
32+ #else
33+ # define ICEBERG_EXPORT
34+ #endif
Original file line number Diff line number Diff line change @@ -73,11 +73,11 @@ add_iceberg_lib(iceberg_arrow
7373 ${ICEBERG_ARROW_SHARED_INSTALL_INTERFACE_LIBS} )
7474
7575if (ICEBERG_BUILD_STATIC AND WIN32 )
76- target_compile_definitions (iceberg_arrow_static PUBLIC ICEBERG_ARROW_STATIC )
76+ target_compile_definitions (iceberg_arrow_static PUBLIC ICEBERG_STATIC )
7777endif ()
7878
7979foreach (LIB_TARGET ${ICEBERG_ARROW_LIBRARIES} )
80- target_compile_definitions (${LIB_TARGET} PRIVATE ICEBERG_ARROW_EXPORTING )
80+ target_compile_definitions (${LIB_TARGET} PRIVATE ICEBERG_EXPORTING )
8181endforeach ()
8282
8383install (FILES "${CMAKE_CURRENT_SOURCE_DIR} /demo_arrow.h"
Original file line number Diff line number Diff line change 2121
2222#include < string>
2323
24- #ifdef _WIN32
25- # ifdef ICEBERG_ARROW_STATIC
26- # define ICEBERG_ARROW_EXPORT
27- # else
28- # ifdef ICEBERG_ARROW_EXPORTING
29- # define ICEBERG_ARROW_EXPORT __declspec (dllexport)
30- # else
31- # define ICEBERG_ARROW_EXPORT __declspec (dllimport)
32- # endif
33- # endif
34- #else
35- # define ICEBERG_ARROW_EXPORT
36- #endif
24+ #include " iceberg/visibility.h"
3725
3826namespace iceberg ::arrow {
3927
40- class ICEBERG_ARROW_EXPORT DemoArrow {
28+ class ICEBERG_EXPORT DemoArrow {
4129 public:
4230 std::string print () const ;
4331};
Original file line number Diff line number Diff line change @@ -21,5 +21,15 @@ set(ICEBERG_CORE_INCLUDES "${ICEBERG_API_DIR}")
2121add_iceberg_lib(iceberg_core
2222 SOURCES
2323 ${ICEBERG_CORE_SOURCES}
24+ OUTPUTS
25+ ICEBERG_CORE_LIBRARIES
2426 PRIVATE_INCLUDES
2527 ${ICEBERG_CORE_INCLUDES} )
28+
29+ if (ICEBERG_BUILD_STATIC AND WIN32 )
30+ target_compile_definitions (iceberg_core_static PUBLIC ICEBERG_STATIC)
31+ endif ()
32+
33+ foreach (LIB_TARGET ${ICEBERG_CORE_LIBRARIES} )
34+ target_compile_definitions (${LIB_TARGET} PRIVATE ICEBERG_EXPORTING)
35+ endforeach ()
Original file line number Diff line number Diff line change 2323
2424namespace iceberg {
2525
26- class DemoTable : public Table {
26+ class ICEBERG_EXPORT DemoTable : public Table {
2727 public:
2828 DemoTable () = default ;
2929 ~DemoTable () override = default ;
Original file line number Diff line number Diff line change @@ -21,5 +21,15 @@ set(ICEBERG_PUFFIN_INCLUDES "${ICEBERG_API_DIR}")
2121add_iceberg_lib(iceberg_puffin
2222 SOURCES
2323 ${ICEBERG_PUFFIN_SOURCES}
24+ OUTPUTS
25+ ICEBERG_PUFFIN_LIBRARIES
2426 PRIVATE_INCLUDES
2527 ${ICEBERG_PUFFIN_INCLUDES} )
28+
29+ if (ICEBERG_BUILD_STATIC AND WIN32 )
30+ target_compile_definitions (iceberg_puffin_static PUBLIC ICEBERG_STATIC)
31+ endif ()
32+
33+ foreach (LIB_TARGET ${ICEBERG_PUFFIN_LIBRARIES} )
34+ target_compile_definitions (${LIB_TARGET} PRIVATE ICEBERG_EXPORTING)
35+ endforeach ()
Original file line number Diff line number Diff line change 2323
2424namespace iceberg {
2525
26- class DemoPuffin : public Puffin {
26+ class ICEBERG_EXPORT DemoPuffin : public Puffin {
2727 public:
2828 DemoPuffin () = default ;
2929 ~DemoPuffin () override = default ;
You can’t perform that action at this time.
0 commit comments