Giter Club home page Giter Club logo

Comments (3)

gsjaardema avatar gsjaardema commented on August 19, 2024 1

It is historical -- there are many users here that always want to link with a static exodus library. Instead of building two separate installations, we build both static and shared exodus if shared libs are requested.

There are two different compile objects for the shared and static exodus library. If you watch the build, you will see it doing two separate compilations -- one for the static library and one for the objects in the shared library.

from seacas.

gdsjaar avatar gdsjaar commented on August 19, 2024

from seacas.

nschloe avatar nschloe commented on August 19, 2024

In seacas, it will build both a static and shared version of the exodus library.

Ah, funny. Typically if you're building shared and static versions of a library, you'll also want different compile objects for the object files involved (e.g., -fPIC and friends). Looking at the CMake code, I see

if (${CMAKE_PROJECT_NAME} STREQUAL "SEACASProj")
   # Many users of the SEACAS installations still want a static exodus library...
   if (BUILD_SHARED_LIBS)
      ADD_LIBRARY(
              exodus_static
              STATIC
              ${SOURCES} ${DEP_SOURCES}
      )
      set_target_properties(exodus_static PROPERTIES OUTPUT_NAME exodus)
      INSTALL(TARGETS exodus_static DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
   endif(BUILD_SHARED_LIBS)

   # For backwards compatability, the C exodus library was called libexoIIv2c.a
   # Create a symbolic link from libexodus.a to libexoIIv2c.a -- do only for static lib
   InstallSymLink(libexodus.a ${CMAKE_INSTALL_PREFIX}/lib/libexoIIv2c.a)
endif()

so if BUILD_SHARED_LIBS, two library versions are built. Not sure if this is the right thing to do. After all, anyone gets static libraries if you don't specify BUILD_SHARED_LIBS (or set it to FALSE).

In any case, this is your call. Feel free to close.

from seacas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.