Skip to content

Build Problems when Upgrading from v3.5.9 to v3.6.0 #242

@CleanHit

Description

@CleanHit

In my CMakeList.txt I import SEAL v3.5.9 using:

include(FetchContent)
############################################################################################
# Get the SEAL Package
############################################################################################
message(CHECK_START "Fetching SEAL")
set(SEAL "seal")
FetchContent_Declare(
        ${SEAL}
        GIT_REPOSITORY  https://github.com/microsoft/SEAL
        GIT_TAG         v3.5.9
)

FetchContent_GetProperties(${SEAL})
if(NOT ${SEAL}_POPULATED)
    FetchContent_Populate(${SEAL})

    # Build shared libraries
    # Store the old value of the 'BUILD_SHARED_LIBS'
    set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS})
    # Make subproject to use 'BUILD_SHARED_LIBS=ON' setting.
    set(BUILD_SHARED_LIBS ON CACHE INTERNAL "Build SHARED libraries")
    message("Build SEAL shared lib is set to: ${BUILD_SHARED_LIBS}")
    add_subdirectory(${${SEAL}_SOURCE_DIR} ${${SEAL}_BINARY_DIR})
    if(${BUILD_SHARED_LIBS} STREQUAL "ON")
        set(SEAL_SHARED "seal_shared")
    endif()
    # Restore the old value of the parameter
    set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE)
endif()

It is being downloaded into <my_project_path>/cmake-build-debug/_deps/ with the sub folders seal-build, seal-src and seal-subbuild. I can bind it to my project using:

target_link_libraries(my-projrct PRIVATE
        ${SEAL}
)

After that SEAL is being built in seal-src on the first run and I can just import the library with #include <seal/seal.h> in my project. The problems start when I get v3.6.0, for some reason:

  1. #include <seal/seal.h> isn't being found anymore.
  2. It messes with my other project dependencies, they get downloaded and built under <my_project_path>/cmake-build-debug/_deps/seal-src/thirdparty/ instead of under <my_project_path>/cmake-build-debug/_deps/ as with v3.5.9.

I guess this behavior has something to do with the changes made to SEALs CMakeLists.txt file in v3.6.0, but I can't figure out what is causing this behavior that brakes my project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions