Skip to content

Commit

Permalink
Pass more linker flags to sundials cmake
Browse files Browse the repository at this point in the history
Previous, CFLAGS had an override, ignoring the user CFLAGS and setting
them to -lm, which is a linker flag, giving warnings. This has been
changed to also pass the library directory which is needed for OSX.
It was also tested to properly use linker flags instead of cmake cflags,
but this break the test suite.
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed May 11, 2016
1 parent d171643 commit 4d5ce50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.common
Expand Up @@ -413,7 +413,7 @@ clean-sqlite3:
# build sundials
sundials: 3rdParty/sundials/CMakeLists.txt umfpack
mkdir -p 3rdParty/sundials/build
cd 3rdParty/sundials/build && $(CMAKE) .. -G $(CMAKE_TARGET) -DCMAKE_VERBOSE_MAKEFILE:Bool=ON -DCMAKE_INSTALL_PREFIX=`pwd` -DKLU_ENABLE:Bool=ON -DKLU_LIBRARY_DIR="$(OMBUILDDIR)/../OMCompiler/3rdParty/SuiteSparse/build/" -DKLU_INCLUDE_DIR="$(OMBUILDDIR)/include/omc/c/suitesparse/Include/" -DCMAKE_C_FLAGS="-lm" $(SUITESPARSE_LIBS) $(IS_MINGW32) $(IS_MINGW64) -DSUITESPARSECONFIG_LIBRARY=""
cd 3rdParty/sundials/build && $(CMAKE) .. -G $(CMAKE_TARGET) -DCMAKE_VERBOSE_MAKEFILE:Bool=ON -DCMAKE_INSTALL_PREFIX=`pwd` -DKLU_ENABLE:Bool=ON -DKLU_LIBRARY_DIR="$(builddir_lib_omc)" -DKLU_INCLUDE_DIR="$(OMBUILDDIR)/include/omc/c/suitesparse/Include/" -DCMAKE_C_FLAGS="$(CFLAGS) -lm -L $(builddir_lib_omc)" $(SUITESPARSE_LIBS) $(IS_MINGW32) $(IS_MINGW64) -DSUITESPARSECONFIG_LIBRARY=""
$(MAKE) -C 3rdParty/sundials/build install
# adrpo: do not copy the headers as they are not needed!
mkdir -p $(OMBUILDDIR)/include/omc/c/sundials
Expand Down

0 comments on commit 4d5ce50

Please sign in to comment.