Changeset 3f33974 in OpenModelica


Ignore:
Timestamp:
2022-05-19T16:06:18+02:00 (23 months ago)
Author:
Mahder Gebremedhin <mahge@…>
Branches:
maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, master
Children:
bfad4b6b
Parents:
571ec93
git-author:
Mahder Gebremedhin <mahder.geb@…> (05/18/22 15:02:20)
git-committer:
Mahder Gebremedhin <mahge@…> (05/19/22 16:06:18)
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 r3f33974  
    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 r3f33974  
    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.