File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ target_link_libraries(${lib_name}
2929 core
3030)
3131
32+ target_compile_definitions (${lib_name} PUBLIC "USE_CMAKE_GENERATED_EXPORT_HEADER" )
33+
3234include ("GenerateExportHeader" )
3335generate_export_header(${lib_name}
3436 EXPORT_MACRO_NAME TORCHTRT_API
Original file line number Diff line number Diff line change 77 */
88#pragma once
99
10+ #if defined(USE_CMAKE_GENERATED_EXPORT_HEADER)
11+ #include < torch_tensorrt_export.h>
12+ #else
1013#if defined(__GNUC__)
1114#define TORCHTRT_API __attribute__ ((__visibility__(" default" )))
1215#define TORCHTRT_HIDDEN __attribute__ ((__visibility__(" hidden" )))
1316#else
14- // This can be used also if defined(__GNUC__) but is generated by CMake
15- // and will be missing when compiling with Bazel
16- #include < torch_tensorrt_export.h>
17+ #define TORCHTRT_API
18+ #define TORCHTRT_HIDDEN
1719#endif // defined(__GNUC__)
20+ #endif // defined(USE_CMAKE_GENERATED_EXPORT_HEADER)
1821
1922// Does this need to be gaurded or something?
2023#define XSTR (x ) #x
You can’t perform that action at this time.
0 commit comments