Commit Graph
8 Commits
Author SHA1 Message Date
Atgeirr Flø Rasmussen 5519643aa4 Always set include-related CMake variables. 2017-10-26 10:51:18 +02:00
Arne Morten Kvarving cdbcb74e5e add static analysis support to buildsystem 2017-06-02 10:38:54 +02:00
Markus Blatt cd4c0f54fb Allow using external static libraries with BUILD_SHARED_LIBS=ON
Previously, this failed if one dependency was a static library compiled
without -fPIC. This is is the case for library libsuitesparseconfig on
Debian which has no dynamic alternative. The error messages read e.g.

```
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libsuitesparseconfig.a(SuiteSparse_config.o): relocation R_X86_64_PC32 against undefined symbol `malloc@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
```

With this patch we change the target_link_libraries call when using
BUILD_SHARED_LIBS=ON. We only pass the dynamic libraries as PUBLIC such
that they will get linked to the library. The static ones are passed as
INTERFACE libraries. This means that they will be automatically linked
to executables which link to the main library. Currently this transitive
linking will only work in the same module as we do not correctly export
libraries. But our build system explicitly links the others ones anyway.
2017-05-18 20:37:31 +02:00
Atgeirr Flø Rasmussen 2ee1224917 Make use of system includes for cross-module optional. 2016-11-21 11:08:38 +01:00
Atgeirr Flø Rasmussen 5344392b99 Silence warnings not from current module. 2016-11-08 10:46:35 +01:00
Joakim Hove 07266344bc Set target property POSITION_INDEPENDENT_CODE=True 2016-03-22 11:37:03 +01:00
Joakim Hove 65d49ef35a Updated to opm-core/master 2015-04-28 09:06:02 +02:00
Joakim Hove c78f9d3862 Added cmake/ directory from opm-core 2015-03-18 14:48:36 +01:00