Skip to content

Commit

Permalink
- update for msvc hpcom code generation
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21742 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Marcus Walther committed Aug 4, 2014
1 parent 4968dc2 commit c5b3732
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Compiler/Template/CodegenCppHpcom.tpl
Expand Up @@ -1512,14 +1512,15 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
let libsPos1 = if not dirExtra then libsStr //else ""
let libsPos2 = if dirExtra then libsStr // else ""
let ParModelicaLibs = if acceptParModelicaGrammar() then '-lOMOCLRuntime -lOpenCL' // else ""
let &extraCflags = buffer match sopt case SOME(s as SIMULATION_SETTINGS(__)) then
let extraCflags = match sopt case SOME(s as SIMULATION_SETTINGS(__)) then
'<%match s.method
case "inline-euler" then "-D_OMC_INLINE_EULER "
case "inline-rungekutta" then "-D_OMC_INLINE_RK "
case "dassljac" then "-D_OMC_JACOBIAN "%>'

let &extraCflags += if stringEq(type,"openmp") then " /openmp" else ""
let &extraCflags += if Flags.isSet(Flags.HPCOM_ANALYZATION_MODE) then ' /DANALYZATION_MODE /I"$(SUNDIALS_INCLUDE)" /I"$(SUNDIALS_INCLUDE)/kinsol" /I"$(SUNDIALS_INCLUDE)/nvector"' else ""
let &extraHPCOMflags = buffer ""
let &extraHPCOMflags += if stringEq(type,"openmp") then "/openmp" else " "
let &extraHPCOMflags += if Flags.isSet(Flags.HPCOM_ANALYZATION_MODE) then '/DANALYZATION_MODE /I"$(SUNDIALS_INCLUDE)" /I"$(SUNDIALS_INCLUDE)/kinsol" /I"$(SUNDIALS_INCLUDE)/nvector"' else ""
<<
# Makefile generated by OpenModelica

Expand All @@ -1537,7 +1538,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
# /I - Include Directories
# /DNOMINMAX - Define NOMINMAX (does what it says)
# /TP - Use C++ Compiler
CFLAGS= /ZI /Od /EHa /MP /fp:except /I"<%makefileParams.omhome%>/include/omc/cpp/Core/" /I"<%makefileParams.omhome%>/include/omc/cpp/" -I. <%makefileParams.includes%> -I"$(BOOST_INCLUDE)" /I. /DNOMINMAX /TP /DNO_INTERACTIVE_DEPENDENCY
CFLAGS= /ZI /Od /EHa /MP /fp:except /I"<%makefileParams.omhome%>/include/omc/cpp/Core/" /I"<%makefileParams.omhome%>/include/omc/cpp/" -I. <%makefileParams.includes%> -I"$(BOOST_INCLUDE)" /I. /DNOMINMAX /TP /DNO_INTERACTIVE_DEPENDENCY <%extraHPCOMflags%>

CPPFLAGS = /DOMC_BUILD
# /ZI enable Edit and Continue debug info
Expand Down

0 comments on commit c5b3732

Please sign in to comment.