From d26fd1c536267b3ee440721fe20ed7890587f152 Mon Sep 17 00:00:00 2001 From: program-- Date: Wed, 3 Jan 2024 12:17:16 -0800 Subject: [PATCH] cmake: revert visibility modification to just sloth --- CMakeLists.txt | 1 + cmake/ExternalSubdirectory.cmake | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c7528137e3..d74f940dbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -181,6 +181,7 @@ if(NGEN_WITH_EXTERN_SLOTH) GIT_UPDATE "${NGEN_EXT_DIR}/sloth" IMPORTS slothmodel ) + set_target_properties(slothmodel PROPERTIES CXX_VISIBILITY_PRESET default) endif() # ----------------------------------------------------------------------------- diff --git a/cmake/ExternalSubdirectory.cmake b/cmake/ExternalSubdirectory.cmake index c12721d755..9e16c3aa84 100644 --- a/cmake/ExternalSubdirectory.cmake +++ b/cmake/ExternalSubdirectory.cmake @@ -20,11 +20,7 @@ function(add_external_subdirectory) endif() if(EXTERNAL_TARGET_IMPORTS STREQUAL "") - if(TARGET ${EXTERNAL_TARGET_IMPORTS}) - set_target_properties(${EXTERNAL_TARGET_IMPORTS} - PROPERTIES - CXX_VISIBILITY_PRESET default) - else() + if(NOT TARGET ${EXTERNAL_TARGET_IMPORTS}) message(FATAL_ERROR "Target `${EXTERNAL_TARGET_IMPORTS}` could not be found from subdirectory ${EXTERNAL_TARGET_SOURCE}") endif() endif()