Skip to content

Commit

Permalink
Enabling exporting symbols on windows
Browse files Browse the repository at this point in the history
Small fix to allow for the built library to be used in windows pytorch#728
  • Loading branch information
philipNoonan authored Jun 18, 2019
1 parent c94a158 commit 1dc8cde
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ file(GLOB_RECURSE HEADERS torchvision/csrc/vision.h)
file(GLOB_RECURSE MODELS_HEADERS torchvision/csrc/models/*.h)
file(GLOB_RECURSE MODELS_SOURCES torchvision/csrc/models/*.h torchvision/csrc/models/*.cpp)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library (${PROJECT_NAME} SHARED ${MODELS_SOURCES})
target_link_libraries(${PROJECT_NAME} "${TORCH_LIBRARIES}")

Expand Down

0 comments on commit 1dc8cde

Please sign in to comment.