Skip to content

Commit 46311f1

Browse files
gcuendet-cognexgcuendet
authored andcommitted
Use the export macros generated by CMake on Windows
Signed-off-by: Gabriel Cuendet <[email protected]>
1 parent 6a0c550 commit 46311f1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cpp/include/torch_tensorrt/macros.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
#define TORCHTRT_API __attribute__((__visibility__("default")))
1212
#define TORCHTRT_HIDDEN __attribute__((__visibility__("hidden")))
1313
#else
14-
#define TORCHTRT_API
15-
#define TORCHTRT_HIDDEN
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 <torchtrt_export.h>
1617
#endif // defined(__GNUC__)
1718

1819
// Does this need to be gaurded or something?
@@ -31,4 +32,4 @@ namespace torch_tensorrt {
3132
namespace torchscript {}
3233
namespace ts = torchscript;
3334
} // namespace torch_tensorrt
34-
namespace torchtrt = torch_tensorrt;
35+
namespace torchtrt = torch_tensorrt;

0 commit comments

Comments
 (0)