Commit Graph

12 Commits

Author SHA1 Message Date
Arne Morten Kvarving
57bc9a8f02 added: add headers to library definition
for better IDE integration
2022-10-05 09:18:31 +02:00
Markus Blatt
3e22403cfe Make SOVERSION change with every release.
Previously the SOVERSION was the year which indicated a stable ABI
within each year. It is highly unlikely that or ABI is that
stable. Hence we stop pretending that it is and change the version
with every release.

Gbp-Pq: Name 0006-Make-SOVERSION-change-with-every-release.patch
2021-04-06 22:56:59 +02:00
Markus Blatt
05128745cf Some modules may still export definitions using -D, strip it. 2021-03-17 17:27:26 +01:00
Markus Blatt
a4f73a3a7c Use add_compile_definitions for newer CMake versions.
add_definitions is deprecated.
Note the new command does not need the -D qualifier but will detect
if there is one and act accordingly. This helps with package
configuration files that have "-DVAR" in their COMPILE_DEFINTIONS

As some packages actually already add the -D qualifier we now detect
that to be able to support old CMake version without
add_compile_definitions. In this case we prevent adding another -D
and use add_definitions.
2021-03-17 11:16:13 +01:00
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