From: Nabil Ghodbane Date: Wed, 19 May 2021 07:10:09 +0000 (+0200) Subject: NLOPT - Windows - multi Visual X-Git-Tag: V9_7_0~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=91daaa31089da8e711912e06acfe588ab42b58f2;p=tools%2Fsat_salome.git NLOPT - Windows - multi Visual --- diff --git a/products/compil_scripts/nlopt.bat b/products/compil_scripts/nlopt.bat index 927a421..04ad47d 100644 --- a/products/compil_scripts/nlopt.bat +++ b/products/compil_scripts/nlopt.bat @@ -4,6 +4,19 @@ echo ########################################################################## echo nlopt %VERSION% echo ########################################################################## +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +SET PRODUCT_BUILD_TYPE=Release +if %SAT_DEBUG% == 1 ( + set PRODUCT_BUILD_TYPE=Debug +) + +set PLATFORM_TARGET=x64 +if defined SALOME_APPLICATION_NAME if %SALOME_APPLICATION_NAME% == URANIE ( + set PLATFORM_TARGET=Win32 +) if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% REM clean BUILD directory @@ -11,21 +24,25 @@ if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% mkdir %BUILD_DIR% cd %BUILD_DIR% +set CMAKE_OPTIONS= set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_INSTALL_PREFIX:STRING=%PRODUCT_INSTALL:\=/% -set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=Release +set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=%PRODUCT_BUILD_TYPE% set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DBUILD_SHARED_LIBS:BOOL=ON set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DNLOPT_MATLAB:BOOL=OFF set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DNLOPT_OCTAVE:BOOL=OFF set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DNLOPT_GUILE:BOOL=OFF set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DSWIG_EXECUTABLE=%SWIG_ROOT_DIR:\=/%/bin/swig.exe -set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR:STRING="Visual Studio 15 2017 Win64" - +if %PLATFORM_TARGET% == Win32 ( + set CMAKE_OPTIONS=%CMAKE_OPTIONS% -A Win32 -Thost=x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -g "Visual Studio 2019" +) else ( + set CMAKE_OPTIONS=%CMAKE_OPTIONS% -DCMAKE_GENERATOR:STRING=%CMAKE_GENERATOR% +) set MSBUILDDISABLENODEREUSE=1 echo. echo ********************************************************************* -echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% +echo *** %CMAKE_ROOT%\bin\cmake %CMAKE_OPTIONS% %SOURCE_DIR% echo ********************************************************************* echo. @@ -37,11 +54,11 @@ if NOT %ERRORLEVEL% == 0 ( echo. echo ********************************************************************* -echo *** msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 ALL_BUILD.vcxproj" +echo *** msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% ALL_BUILD.vcxproj" echo ********************************************************************* echo. -msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 ALL_BUILD.vcxproj +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% ALL_BUILD.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild gmsh.vcxproj exit 2 @@ -53,12 +70,11 @@ echo *** installation... echo ********************************************************************* echo. -msbuild %MAKE_OPTIONS% /p:Configuration=Release /p:Platform=x64 INSTALL.vcxproj +msbuild %MAKE_OPTIONS% /p:Configuration=%PRODUCT_BUILD_TYPE% /p:Platform=%PLATFORM_TARGET% INSTALL.vcxproj if NOT %ERRORLEVEL% == 0 ( echo ERROR on msbuild INSTALL.vcxproj exit 3 ) - echo. -echo ########## END \ No newline at end of file +echo ########## END