The solution is to add the POSITION_INDENPENDENT_CODE target property
to the C and Fortran convenience library targets.
Thanks again for the help,
nick
On Mon, Aug 4, 2014 at 3:35 PM, Nicolas Bock wrote:
> Hi Chuck,
>
> I am building both static and shared libraries using the object files.
> Af
Hi Chuck,
I am building both static and shared libraries using the object files.
After splitting the Fortran and C source as you suggest, I get the
following linker error:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/spammpack-serial-C.dir/spamm_get_ti
Hi Chuck,
seems a bit hackish, but works for me :)
Thanks for the trick!
nick
On Fri, Aug 1, 2014 at 12:37 PM, Chuck Atkins wrote:
> Hi Nick,
>
> You could split your target in to two object libraries that combine into a
> singe "real" library:
>
> add_library(foo_f OBJECT ${FOO_F_SOURCES})
>
Hi Nick,
You could split your target in to two object libraries that combine into a
singe "real" library:
add_library(foo_f OBJECT ${FOO_F_SOURCES})
# set necessary compile flags specific to the Fortran components
# on the foo_f target
add_library(foo_c OBJECT ${FOO_C_SOURCES})
# set necessary c
Hi,
I am building a library containing Fortran and C sources. I would like
to add language specific compile flags without affecting the global
compile flags:
set_target_properties( foo PROPERTIES C_FLAGS "-fopenmp" Fortran_FLAGS
"-openmp" )
However, it seems there is only COMPILE_FLAGS which pre