diff --git a/CMakeLists.txt b/CMakeLists.txt index c254a755..495bf37b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -543,30 +543,23 @@ if (COOLPROP_SCILAB_SWIG_MODULE) ${CMAKE_SOURCE_DIR}/include/AbstractState.h ) set(SCILAB_INCLUDE_PATH "$ENV{SCILAB_ROOT}/include") - - foreach (_headerFile ${APP_SOURCES}) - get_filename_component(_dir ${_headerFile} PATH) - list (APPEND APP_INCLUDE_DIRS ${_dir}) - endforeach() - list(REMOVE_DUPLICATES APP_INCLUDE_DIRS) set(I_FILE "${CMAKE_SOURCE_DIR}/src/CoolProp.i") - JOIN("${APP_SOURCES}" "," SWIG_SOURCES) - include_directories(${APP_INCLUDE_DIRS}) include_directories(${SCILAB_INCLUDE_PATH}) include_directories(${SCILAB_INCLUDE_PATH}/scilab) - JOIN("${APP_INCLUDE_DIRS}" ";-I" SWIG_INCLUDES) - - set(SWIG_OPTIONS "-addsources;${SWIG_SOURCES};-buildverbositylevel;2;-addcflags;\"-I${SWIG_INCLUDES}\"") - message("${SWIG_OPTIONS}") + set(SWIG_OPTIONS "-nobuilder") SET_SOURCE_FILES_PROPERTIES(${I_FILE} PROPERTIES SWIG_FLAGS "${SWIG_OPTIONS}") SET_SOURCE_FILES_PROPERTIES(${I_FILE} PROPERTIES CPLUSPLUS ON) - SWIG_ADD_MODULE(CoolProp scilab ${I_FILE}) + list(APPEND APP_SOURCES gw_CoolProp.c) + set_source_files_properties(gw_CoolProp.c PROPERTIES GENERATED TRUE) + + SWIG_ADD_MODULE(CoolProp scilab ${I_FILE} ${APP_SOURCES}) add_dependencies (CoolProp generate_headers) + endif() if (COOLPROP_MATLAB_SWIG_MODULE) diff --git a/Web/develop/buildbot.rst b/Web/develop/buildbot.rst index 8441df4e..1fa153fa 100644 --- a/Web/develop/buildbot.rst +++ b/Web/develop/buildbot.rst @@ -79,7 +79,9 @@ steps on a Windows machine:: Please repeat the steps above for both 32bit and 64bit Python environments. In addition to the Python tools, you also need the Microsoft compilers. Please -install Visual Studio 2010 for Python 3.4 and Visual Studio 2008 for Python 2.7. +install Visual Studio 2010 for Python 3.4 and Visual Studio 2008 for Python 2.7. +The latter requires ServicePack 1, otherwise your are going to get quite cryptic +error messages during compilation. On a Linux system, things only change a little bit:: diff --git a/dev/buildbot/master/master.cfg b/dev/buildbot/master/master.cfg index 77cc72bb..3144d977 100644 --- a/dev/buildbot/master/master.cfg +++ b/dev/buildbot/master/master.cfg @@ -764,14 +764,23 @@ for platform in ['OSX', 'linux', 'windows']: ) c['builders'].append( - BuilderConfig(name="32bitDLL-linux", - slavenames=["OSX-slave"], - factory = cmake_slave('32BIT_SHARED_LIBRARY_LINUX', - test = False, - platform = 'OSX' - ) - ) - ) + BuilderConfig(name="32bitDLL-OSX",slavenames=["OSX-slave"], + factory = cmake_slave( + '32BIT_SHARED_LIBRARY_LINUX', + test = False, + platform = 'OSX') + ) +) + +c['builders'].append( + BuilderConfig(name="32bitDLL-Linux",slavenames=["linux32-slave"], + factory = cmake_slave( + '32BIT_SHARED_LIBRARY_LINUX', + test = False, + platform = 'linux') + ) +) + c['builders'].append( BuilderConfig(name="32bitCdeclDLL-windows", slavenames=["windows-slave"], diff --git a/dev/scripts/build_swig_scilab.py b/dev/scripts/build_swig_scilab.py index 086c09b2..f855c143 100755 --- a/dev/scripts/build_swig_scilab.py +++ b/dev/scripts/build_swig_scilab.py @@ -6,10 +6,14 @@ else: subprocess.call('git pull', shell = True, cwd = 'swig-scilab', stdout = sys.stdout, stderr = sys.stderr) os.chdir('swig-scilab') if not glob.glob('pcre-*.tar.gz'): - wget.download('ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.gz') + for rev in ['8.34','8.35','8.36']: + try: + wget.download('ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-'+rev+'.tar.gz'); break + except: + pass subprocess.check_call('Tools/pcre-build.sh', shell = True, stdout = sys.stdout, stderr = sys.stderr) subprocess.check_call('./autogen.sh', shell = True, stdout = sys.stdout, stderr = sys.stderr) subprocess.check_call('./configure --disable-ccache --with-scilab-inc=${SCILAB_HOME}/include --with-scilab=${SCILAB_HOME}/bin/scilab-cli --prefix=${PWD}/swig-scilab-bin', shell = True, stdout = sys.stdout, stderr = sys.stderr) subprocess.check_call('make', shell = True, stdout = sys.stdout, stderr = sys.stderr) subprocess.check_call('make install', shell = True, stdout = sys.stdout, stderr = sys.stderr) -subprocess.check_call('cp swig swig3.0', shell = True, stdout = sys.stdout, stderr = sys.stderr, cwd='swig-scilab-bin') +subprocess.check_call('cp swig swig3.0', shell = True, stdout = sys.stdout, stderr = sys.stderr, cwd='swig-scilab-bin/bin') diff --git a/src/CoolProp.i b/src/CoolProp.i index 5aea1164..e504745c 100644 --- a/src/CoolProp.i +++ b/src/CoolProp.i @@ -24,7 +24,8 @@ namespace std { } // -%rename(CoolProp_SimpleState) CoolProp::SimpleState; +%rename(SS) CoolProp::SimpleState; +%rename(PED) CoolProp::PhaseEnvelopeData; // This stuff will get included verbatim in CoolProp_wrap %{