Changeset f0e38eb in OpenModelica


Ignore:
Timestamp:
2022-05-18T15:02:20+02:00 (2 years ago)
Author:
Mahder Gebremedhin <mahder.geb@…>
Children:
ffc3407d
Parents:
ba8ecc8
Message:

Fix warnings about multiple definition of OMC_HAVE_IPOPT

  • Define the macro in the Windows Makefile instead of the config header. It is supposed to be on always on OMDev/MinGW with the Makefiles build system

On linux with autoconf and with CMake on all platforms it can be turned
on and off depending on the availability of Fortran.

Location:
OMCompiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/SimulationRuntime/c/Makefile.common

    r627bacf rf0e38eb  
    1717
    1818CPPFLAGS = -I$(OMC_CONFIG_INC) -I$(top_builddir)/Compiler/runtime -I$(top_builddir)/3rdParty/gc/include -I$(top_builddir)/3rdParty/FMIL/install/include/ -I$(top_builddir)/3rdParty/lis-1.4.12/include/ -I$(builddir_inc)/sundials/ -I$(builddir_inc)/c/suitesparse/ $(CONFIG_CPPFLAGS) -DGC_REDIRECT_TO_LOCAL -DLINK_SUNDIALS_STATIC
     19
     20# On MinGW assume that we have ipopt. For linux this is actually checked and
     21# configured by autoconf.
     22ifeq (MINGW,$(findstring MINGW,$(shell uname)))
     23  CPPFLAGS += -DOMC_HAVE_IPOPT
     24endif
     25
    1926override CFLAGS += $(CPPFLAGS) $(CONFIG_CFLAGS) $(EXTRA_CFLAGS)
    2027# CXXFLAGS can include everything as before. For FMI we need to use relative paths since
  • OMCompiler/omc_config.h

    r627bacf rf0e38eb  
    119119#define WITH_SUNDIALS
    120120
    121 #if defined(__MINGW32__)
    122 #define OMC_HAVE_IPOPT
    123 #else
    124 /* Without IPOPT for MSVC */
    125 #endif
    126 
    127121#include "revision.h"
    128122
Note: See TracChangeset for help on using the changeset viewer.