mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Added Fortran wrappers to build slaves
This commit is contained in:
@@ -52,7 +52,7 @@ For git, your best best is the installer from http://msysgit.github.io/. Check
|
||||
C:\Users\XXXX>git --version
|
||||
git version 1.9.4.msysgit.0
|
||||
|
||||
For the C++ compiler, the options are a bit more complicated. There are multiple (binary incompatible) versions of Visual Studio, as well as G++ ports for windows (MinGW). Unless you are compiling the python wrappers, you can compile with MinGW, so you should obtain the `MinGW installer <http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download>`_ and run it. You should install all the packages available, and you must install to a path without spaces. ``C:\MinGW`` is recommended as an installation path.
|
||||
For the C++ compiler, the options are a bit more complicated. There are multiple (binary incompatible) versions of Visual Studio, as well as G++ ports for windows (MinGW). Unless you are compiling the python wrappers, you can compile with MinGW, so you should obtain the `MinGW installer <http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download>`_ and run it. You should install all the packages available, and you must install to a path without spaces. ``C:\MinGW`` is recommended as an installation path. Be sure to add the binaries in ``C:\MinGW\bin\`` to your PATH variable.
|
||||
|
||||
If you are compiling for Python 2.7, you can install Visual Studio 2008 Express from `VS2008Express installer <http://go.microsoft.com/?linkid=7729279>`_.
|
||||
Make sure you install ServicePack 1, otherwise your are going to get quite cryptic error messages during compilation.
|
||||
|
||||
@@ -48,7 +48,7 @@ c['change_source'].append(GitPoller(
|
||||
from buildbot.process.factory import BuildFactory
|
||||
from buildbot.steps.source.git import Git
|
||||
from buildbot.steps.shell import ShellCommand
|
||||
from buildbot.steps.slave import MakeDirectory, RemoveDirectory
|
||||
from buildbot.steps.slave import MakeDirectory, RemoveDirectory, CopyDirectory
|
||||
from buildbot.steps.transfer import DirectoryUpload, FileDownload
|
||||
from buildbot.process import properties
|
||||
|
||||
@@ -368,6 +368,39 @@ def cmakeFactory(mod_name = None, gitMode = 'incremental', install = True, pre_c
|
||||
compress="bz2"))
|
||||
return factory
|
||||
|
||||
|
||||
def fortranFactory(platform=1):
|
||||
working_folder = "build/build" # Same as in cmakeFactory
|
||||
fortran_folder = "build/wrappers/Fortran/detailed_example" #
|
||||
#
|
||||
if platform==platformID["windows"]:
|
||||
cmake_args = ["-DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON","-G", "\"MinGW Makefiles\""]
|
||||
cp_cmd = "copy /Y *.f90 ..\\..\\..\\build"
|
||||
add_libs = ""
|
||||
elif platform==platformID["linux"]:
|
||||
cmake_args = ["-DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON"]
|
||||
cp_cmd = "cp *.f90 ../../../build/"
|
||||
add_libs = " -ldl"
|
||||
else:
|
||||
raise ValueError("Unknown Fortran platform: {0}".format(platform))
|
||||
|
||||
# Create the factory to add the actions to
|
||||
factory = cmakeFactory(cmake_args=cmake_args,install=False,test=False)
|
||||
#
|
||||
#factory.addStep(CopyDirectory(src=fortran_folder, dest=working_folder))
|
||||
factory.addStep(ShellCommand(command=cp_cmd,
|
||||
workdir = fortran_folder,haltOnFailure = True))
|
||||
factory.addStep(ShellCommand(
|
||||
command="gfortran -c -Wall cpinterface.f90 cool_fortran_bind.f90",
|
||||
workdir = working_folder,haltOnFailure = True))
|
||||
factory.addStep(ShellCommand(
|
||||
command="gfortran -o main *.o libCoolProp.a -lstdc++"+add_libs,
|
||||
workdir = working_folder,haltOnFailure = True))
|
||||
factory.addStep(ShellCommand(
|
||||
command="main",
|
||||
workdir = working_folder,haltOnFailure = False))
|
||||
#
|
||||
return factory
|
||||
|
||||
|
||||
|
||||
@@ -680,14 +713,33 @@ for slave in pythonSlaves:
|
||||
# )
|
||||
# )
|
||||
|
||||
windowsDTUslave.pyact[getIDstr("windows", "32bit", 0 )] = "\"C:\\Program Files (x86)\\Miniconda32_27\\Scripts\\activate.bat\""
|
||||
windowsDTUslave.pyact[getIDstr("windows", "64bit", 0 )] = "\"C:\\Program Files\\Miniconda64_27\\Scripts\\activate.bat\""
|
||||
windowsDTUslave.pyenv[getIDstr("windows", 0 , "py27")] = "CoolProp27"
|
||||
|
||||
#c['builders'].append(
|
||||
#BuilderConfig(name="StaticLibrary-binaries-windows-32bit-MinGW-ExternC",
|
||||
# slavenames=["windows-DTU-slave"],
|
||||
# factory = cmakeFactory(cmake_args=[
|
||||
# "-DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON",
|
||||
# "-G", "\"MinGW Makefiles\""],
|
||||
# install = False)
|
||||
# )
|
||||
# )
|
||||
c['builders'].append(
|
||||
BuilderConfig(name="StaticLibrary-binaries-windows-32bit-MinGW-ExternC",
|
||||
slavenames=["windows-DTU-slave"],
|
||||
factory = cmakeFactory(cmake_args=[
|
||||
"-DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON",
|
||||
"-G", "MinGW Makefiles"])
|
||||
)
|
||||
)
|
||||
BuilderConfig(
|
||||
name="Fortran-executable-windows-32bit-MinGW-ExternC",
|
||||
slavenames=["windows-DTU-slave"],
|
||||
factory = fortranFactory(platform=platformID["windows"])
|
||||
)
|
||||
)
|
||||
c['builders'].append(
|
||||
BuilderConfig(
|
||||
name="Fortran-executable-linux-32bit-GCC-ExternC",
|
||||
slavenames=["linux32-slave"],
|
||||
factory = fortranFactory(platform=platformID["linux"])
|
||||
)
|
||||
)
|
||||
|
||||
#Common boring 64-bit modules for windows, linux and OSX
|
||||
### OSX
|
||||
|
||||
Reference in New Issue
Block a user