Changeset 13656


Ignore:
Timestamp:
Oct 3, 2019 2:35:14 PM (2 months ago)
Author:
randersson
Message:

#5819 Testing if overriding the variables for CasADi 32-bit with 64-bit values enables build of CasADi with 64-bit only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-5819/Makefile.am

    r13651 r13656  
    117117CMAKE_CASADI_COMPILER_ARGS64=-m64 -fpermissive
    118118
     119
     120if BUILD_WITH_PYTHON32
     121BUILD_WITH_PYTHON32_ARG=--force-32bit="true" --extra-c-flags="-mincoming-stack-boundary=2"
     122DEP_SUFFIX=
     123else
     124BUILD_WITH_PYTHON32_ARG=
     125DEP_SUFFIX=64
     126CASADI_BUILD_DIR=$(CASADI_BUILD_DIR64)
     127SWIGCHECK_BUILD_DIR=$(SWIGCHECK_BUILD_DIR64)
     128CMAKE_CASADI_CXX_FLAG=$(CMAKE_CASADI_CXX_FLAG64)
     129CMAKE_CASADI_COMPILER_ARGS=$(CMAKE_CASADI_COMPILER_ARGS64)
     130
     131CASADI_INST_DIR=$(CASADI_INST_DIR64)
     132CASADI_PLUGIN_INST_DIR=$(CASADI_PLUGIN_INST_DIR64)
     133CASADI_PYTHON_INST_DIR=$(CASADI_PYTHON_INST_DIR64)
     134MC_LIB=$(MC_LIB64)
     135MC_BUILD=$(MC_BUILD64)
     136COMPILE_WITH_IPOPT=$(COMPILE_WITH_IPOPT64)
     137COMPILE_WITH_IPOPT64=
     138IPOPT_HOME=$(IPOPT64_HOME)
     139
     140CMAKE_PYTHON_INCLUDE=$(CMAKE_PYTHON64_INCLUDE)
     141CMAKE_PYTHON_LIB=$(CMAKE_PYTHON_LIB64)
     142CMAKE_CASADI_ARGS=$(CMAKE_CASADI_ARGS64)
     143endif
     144
     145
    119146casadi_interface: install_casadi_interface
    120147build_casadi_interface: casadi modelicacasadi_wrapper
     
    128155    case $(build) in \
    129156    *-cygwin*|*-mingw*) \
    130     cmake $(MC_SRC_SWIG) -G "MSYS Makefiles" -DCMAKE_CXX_COMPILER_ARG1="-m32" -DCMAKE_CXX_FLAGS="-m32" \
     157    cmake $(MC_SRC_SWIG) -G "MSYS Makefiles" -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_CASADI_CXX_FLAG)" -DCMAKE_CXX_FLAGS="$(CMAKE_CASADI_CXX_FLAG)" \
    131158        -DIFCASADI_OUTDIR="$(MC_CASADI_BUILD)" -DCASADI_HOME="$(CASADI_HOME)" -DCASADI_BUILD_DIR="$(CASADI_BUILD_DIR)";; \
    132159    *) \
     
    141168    mkdir -p $(MC_BUILD64)/ifcasadi; \
    142169    cd $(MC_BUILD64)/ifcasadi; \
    143     cmake $(MC_SRC_SWIG) -G "MSYS Makefiles" -DCMAKE_CXX_COMPILER_ARG1="-m64" -DCMAKE_CXX_FLAGS="-m64" \
     170    cmake $(MC_SRC_SWIG) -G "MSYS Makefiles" -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_CASADI_CXX_FLAG64)" -DCMAKE_CXX_FLAGS="$(CMAKE_CASADI_CXX_FLAG64)" \
    144171        -DIFCASADI_OUTDIR="$(MC_CASADI_BUILD)" -DCASADI_HOME="$(CASADI_HOME)" -DCASADI_BUILD_DIR="$(CASADI_BUILD_DIR64)"; \
    145172    cd $(MC_BUILD64)/ifcasadi;  make
     
    198225    case $(build) in \
    199226    *-cygwin*|*-mingw*) \
    200     cmake $(MC_INTERFACE) -G "MSYS Makefiles" -DCMAKE_CXX_COMPILER_ARG1="-m32" -DCMAKE_CXX_FLAGS="-m32" \
     227    cmake $(MC_INTERFACE) -G "MSYS Makefiles" -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_CASADI_CXX_FLAG)" -DCMAKE_CXX_FLAGS="$(CMAKE_CASADI_CXX_FLAG)" \
    201228        -DMC_BUILD="$(MC_BUILD)" -DIPOPT_HOME="$(IPOPT_HOME)" -DCASADI_BUILD_DIR="$(CASADI_BUILD_DIR)" \
    202229        -DIFCASADI_JAR_BASE="$(JAVA_CASADI_BUILD_DIR)" -DCASADI_HOME="$(CASADI_HOME)" \
     
    215242    mkdir -p $(MC_BUILD64)/modelicacasadi_wrapper; \
    216243    cd $(MC_BUILD64)/modelicacasadi_wrapper; \
    217     cmake $(MC_INTERFACE) -G "MSYS Makefiles" -DCMAKE_CXX_COMPILER_ARG1="-m64" -DCMAKE_CXX_FLAGS="-m64" \
     244    cmake $(MC_INTERFACE) -G "MSYS Makefiles" -DCMAKE_CXX_COMPILER_ARG1="$(CMAKE_CASADI_CXX_FLAG64)" -DCMAKE_CXX_FLAGS="$(CMAKE_CASADI_CXX_FLAG64)" \
    218245        -DMC_BUILD="$(MC_BUILD64)" -DIPOPT_HOME="$(IPOPT64_HOME)" -DCASADI_BUILD_DIR="$(CASADI_BUILD_DIR64)" \
    219246        -DIFCASADI_JAR_BASE="$(JAVA_CASADI_BUILD_DIR)" -DCASADI_HOME="$(CASADI_HOME)" \
     
    269296else
    270297NUMPY_NO_MSVCR_ARG=
    271 endif
    272 
    273 if BUILD_WITH_PYTHON32
    274 BUILD_WITH_PYTHON32_ARG=--force-32bit="true" --extra-c-flags="-mincoming-stack-boundary=2"
    275 DEP_SUFFIX=
    276 else
    277 BUILD_WITH_PYTHON32_ARG=
    278 DEP_SUFFIX=64
    279298endif
    280299
Note: See TracChangeset for help on using the changeset viewer.