]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
openturns windows - use MinGW instead of MSBuild
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 16 Mar 2021 15:30:54 +0000 (16:30 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 16 Mar 2021 15:30:54 +0000 (16:30 +0100)
products/compil_scripts/openturns.bat
products/openturns.pyconf

index b229e3b3d5251741872aae019bcce4e2e103dbed..ea2eca68ffd9e6de3d13d40d7dce0aff483fbebf 100644 (file)
@@ -18,47 +18,90 @@ REM clean BUILD directory
 if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR%
 mkdir %BUILD_DIR%
 cd %BUILD_DIR%
-
-SET CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/%
+set path=%MINGW_ROOT_DIR%\bin;%path%
+set CMAKE_OPTIONS=
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/%
 SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE:STRING=%PRODUCT_BUILD_TYPE%
 SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DPYTHON_EXECUTABLE=%PYTHON_ROOT_DIR:\=/%/python.exe
-SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64"
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DLAPACK_LIBRARIES=%LAPACK_ROOT_DIR:\=/%/lib/liblapack.dll
+SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBLAS_LIBRARIES=%LAPACK_ROOT_DIR:\=/%/lib/libblas.dll
+REM SET CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="Visual Studio 15 2017 Win64"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_SIZEOF_VOID_P=8
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_Fortran_COMPILER=%MINGW_ROOT_DIR:\=/%/bin/gfortran.exe
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_EXE_LINKER_FLAGS="-Wl,--allow-multiple-definition"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_SH="CMAKE_SH-NOTFOUND"
+set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR="MinGW Makefiles"
 
 cd %BUILD_DIR%
 
 echo.
-echo --------------------------------------------------------------------------
-echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
-echo --------------------------------------------------------------------------
-
+echo *********************************************************************
+echo *** cmake %CMAKE_OPTIONS}%
+echo *********************************************************************
 %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
 if NOT %ERRORLEVEL% == 0 (
-    echo ERROR on CMake
+    echo "ERROR on cmake"
     exit 1
 )
 
 echo.
-echo --------------------------------------------------------------------------
-echo *** msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE%  /p:Platform=x64
-echo --------------------------------------------------------------------------
-
-msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64
+echo *********************************************************************
+echo *** mingw32-make
+echo *********************************************************************
+echo.
+mingw32-make
 if NOT %ERRORLEVEL% == 0 (
-    echo ERROR on msbuild ALL_BUILD.vcxproj
+    echo ERROR on mingw32-make
     exit 2
 )
 
 echo.
-echo --------------------------------------------------------------------------
-echo *** msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE%  /p:Platform=x64
-echo --------------------------------------------------------------------------
-
-msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE%  /p:Platform=x64
+echo *********************************************************************
+echo *** installation...
+echo *********************************************************************
+echo.
+mingw32-make install
 if NOT %ERRORLEVEL% == 0 (
-    echo ERROR on msbuild INSTALL.vcxproj
+    echo ERROR on mingw32-make install
     exit 3
 )
 
+
+
+
+REM echo.
+REM echo --------------------------------------------------------------------------
+REM echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+REM echo --------------------------------------------------------------------------
+
+REM %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR%
+REM if NOT %ERRORLEVEL% == 0 (
+    REM echo ERROR on CMake
+    REM exit 1
+REM )
+
+REM echo.
+REM echo --------------------------------------------------------------------------
+REM echo *** msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE%  /p:Platform=x64
+REM echo --------------------------------------------------------------------------
+
+REM msbuild %MAKE_OPTIONS% ALL_BUILD.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=x64
+REM if NOT %ERRORLEVEL% == 0 (
+    REM echo ERROR on msbuild ALL_BUILD.vcxproj
+    REM exit 2
+REM )
+
+REM echo.
+REM echo --------------------------------------------------------------------------
+REM echo *** msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE%  /p:Platform=x64
+REM echo --------------------------------------------------------------------------
+
+REM msbuild %MAKE_OPTIONS% INSTALL.vcxproj /p:Configuration=%PRODUCT_BUILD_TYPE%  /p:Platform=x64
+REM if NOT %ERRORLEVEL% == 0 (
+    REM echo ERROR on msbuild INSTALL.vcxproj
+    REM exit 3
+REM )
+
 taskkill /F /IM "mspdbsrv.exe"
 
 echo.
index 3c33339ce7c47a84418d772a713d71c1c25927d2..d12cf87154674cbd26f434a15f20934c413e083a 100644 (file)
@@ -8,7 +8,7 @@ default :
     {
        env_script : $name + ".py"
     }
-    depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen']
+    depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen','pthreads']
     build_depend : ["cmake", "swig"]
     patches : []
     source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name