Skip to content

Commit 8b020bb

Browse files
authored
Merge pull request #31 from virtualcell/nonchombo-build
Nonchombo build
2 parents 603ace6 + bb4fe00 commit 8b020bb

File tree

86 files changed

+1454
-1429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1454
-1429
lines changed

.github/workflows/cd.yml

Lines changed: 291 additions & 215 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/build-dockcross-win64/
33
/.project
44
/.cproject
5-
/svnversion.txt
65
/build-win64/
76
/.DS_Store
87
/build-linux64/
@@ -14,6 +13,7 @@
1413
/singularity/
1514
/cmake-build*
1615
/build*
16+
/debug-build*
1717
/.idea/
1818
/nfsim/
1919
/all_solvers/*

CMakeLists.txt

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@
44
#
55
##############################################
66
if (APPLE)
7-
set(CMAKE_OSX_ARCHITECTURES "x86_64")
7+
execute_process(COMMAND uname -m OUTPUT_VARIABLE PROCESSOR_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
8+
message("Processor Architecture: ${PROCESSOR_ARCHITECTURE}")
9+
if (PROCESSOR_ARCHITECTURE STREQUAL "arm64")
10+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__arm64__")
11+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__arm64__")
12+
set(CMAKE_OSX_ARCHITECTURES "arm64")
13+
else()
14+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__x86_64__")
15+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__x86_64__")
16+
set(CMAKE_OSX_ARCHITECTURES "x86_64")
17+
endif()
818
# set(CMAKE_Fortran_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=10.7" CACHE PATH "")
919
# set(CMAKE_OSX_DEPLOYMENT_TARGET "10.7" CACHE PATH "")
1020
#############################################
@@ -31,7 +41,7 @@ elseif (LINUX)
3141
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
3242
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
3343
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
34-
endif()
44+
endif()
3545
endif()
3646

3747
cmake_minimum_required(VERSION 3.13)
@@ -45,10 +55,6 @@ if(POLICY CMP0057)
4555
cmake_policy(SET CMP0057 NEW)
4656
endif()
4757

48-
set(SVERSION "unversionedbuild")
49-
message("svnversion ${SVERSION}")
50-
add_definitions(-DSVNVERSION=svn${SVERSION})
51-
5258
#include (LocalJNI.cmake)
5359

5460
set(RULE_MESSAGES OFF)
@@ -152,10 +158,8 @@ endif()
152158
set(WINDOWS FALSE)
153159
if (${CMAKE_SYSTEM_NAME} MATCHES Windows)
154160
set(WINDOWS TRUE)
155-
# set(WIN32 TRUE)
156-
if (${CMAKE_GENERATOR} MATCHES "Unix Makefiles")
157-
set(MINGW TRUE)
158-
endif (${CMAKE_GENERATOR} MATCHES "Unix Makefiles")
161+
set(WIN32 TRUE)
162+
set(MINGW TRUE)
159163
endif()
160164

161165
set (ARCH_64bit FALSE)
@@ -240,6 +244,9 @@ if (${OPTION_TARGET_MOVINGBOUNDARY_SOLVER} OR
240244
add_subdirectory(hdf5-1.8.11)
241245
else()
242246
set(HDF5_USE_STATIC_LIBRARIES ON)
247+
if(WINDOWS OR WIN32 OR WIN64)
248+
set(HDF5_USE_STATIC_LIBRARIES OFF)
249+
endif ()
243250
#CMakeList.txt that comes with hdf5 switches library name if compiled with debug
244251
find_package(HDF5 COMPONENTS HL CXX C)
245252
set(HDF_VERSION ${HDF5_VERSION})

ExpressionParser/DivideByZeroException.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef DIVIDEBYZEROEXCEPTION_H
2-
#define DIVIDEBYZEROEXCEPTION_CPP
2+
#define DIVIDEBYZEROEXCEPTION_H
33

44
#include "ExpressionException.h"
55

FronTierLib/front/fgb3d.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3838

3939
#include <front/fdecs.h>
4040

41+
#ifdef WIN64
42+
double drand48_windows()
43+
{
44+
const long NUM_RAND = RAND_MAX+1;
45+
const double RAND_TOTAL_MAX = NUM_RAND*NUM_RAND - 1.0;
46+
long r = (NUM_RAND)*rand()+rand();
47+
return r / RAND_TOTAL_MAX;
48+
}
49+
#define drand48 drand48_windows
50+
#endif
51+
4152
LOCAL boolean track_comp_and_repair3d(int*,int*,int*,INTERFACE*,Front*);
4253
LOCAL boolean repair_intfc3d_in_box(INTERFACE*,int*,int*,Front*);
4354
LOCAL boolean set_reconstruction_boxes(int*,int*,int**,int,RECT_BOX**,

FronTierLib/front/fprotos.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,7 @@ IMPORT void strip_bdry_curves(INTERFACE*, int);
703703
IMPORT void cut_surface(SURFACE*,boolean (*func)(POINTER,double*),POINTER,boolean);
704704
IMPORT void install_hsbdry_on_surface(SURFACE*,int);
705705
IMPORT boolean surfaces_matched(SURFACE*,SURFACE*);
706+
IMPORT void install_subdomain_bdry_curves(INTERFACE*);
706707

707708
/* fscat3d2.c*/
708709
IMPORT boolean f_intfc_communication3d2(Front*);
@@ -888,6 +889,7 @@ IMPORT void tangent(POINT*,BOND*,CURVE*,double*,Front*);
888889
IMPORT void user_print_rp_node(RP_NODE*,RPROBLEM*);
889890
IMPORT void user_print_rproblem(RPROBLEM*);
890891
IMPORT void user_free_rp_node(RP_NODE*,RPROBLEM*);
892+
IMPORT void assign_curve_boundary_type(CURVE*,int,int*);
891893

892894
#if defined(USE_OVERTURE)
893895
/* foverture_patch.c */

FronTierLib/intfc/imksurf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3939

4040
#include <intfc/int.h>
4141
#include <intfc/iprotos.h>
42+
#include <fprotos.h>
4243

4344
LOCAL void assign_blk_crx(BLK_CRX*,int,int,int,const EG_CRX*,boolean);
4445
LOCAL void assign_two_comp_domain(double (*func)(POINTER,double*),POINTER,

FronTierLib/util/simpleio.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6464
#include <sys/stat.h>
6565
#ifndef WIN32
6666
#include <sys/utsname.h>
67+
#else
68+
#include <process.h>
69+
#define getpid _getpid
6770
#endif
6871
static const char *scan_float_fmt = "%lf";
6972

IDAWin/VCellCVodeSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ void VCellCVodeSolver::cvodeSolve(bool bPrintProgress, FILE* outputFile, void (*
436436
if (outputCount * (NEQ + 1) * bytesPerSample > MaxFileSizeBytes){
437437
/* if more than one gigabyte, then fail */
438438
char msg[100];
439-
sprintf(msg, "output exceeded maximum %ld bytes", MaxFileSizeBytes);
439+
sprintf(msg, "output exceeded maximum %d bytes", MaxFileSizeBytes);
440440
throw VCell::Exception(msg);
441441
}
442442
writeData(Time, outputFile);

MBSolver/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ if (SUPPORTS_MATLAB)
99
option(BUILD_INCLUDE_MATLAB_DIRS "Include matlab integration directory" OFF)
1010
endif (SUPPORTS_MATLAB)
1111

12+
if (MINGW)
13+
add_definitions(-DMINGW)
14+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMINGW")
15+
endif (MINGW)
16+
1217
if(DEFINED CMAKE_BUILD_TYPE)
1318
SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
1419
else()

0 commit comments

Comments
 (0)