Fixed CMake always compile all issue: MSGSL being copied to native/src triggers file changes. New behavior: copying is only perform if /native/src/gsl does not exist.

This commit is contained in:
Wei Dai 2020-04-24 00:18:45 -07:00
Родитель 6e9e724633
Коммит 018fe6dced
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -614,7 +614,7 @@ endif()
# The following are executed post build
# In UNIX-like platforms copy Microsoft GSL include files into native/src
if(SEAL_USE_MSGSL AND NOT MSVC AND NOT CMAKE_HOST_WIN32)
if(SEAL_USE_MSGSL AND NOT MSVC AND NOT CMAKE_HOST_WIN32 AND NOT EXISTS ${SEAL_INCLUDES_BUILD_DIR}/gsl)
add_custom_command(TARGET seal POST_BUILD
COMMAND cp -r ${MSGSL_INCLUDE_DIR}/gsl ${SEAL_INCLUDES_BUILD_DIR})
endif()