Skip to content

Commit

Permalink
Merge branch 'release/Version-4.43' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
shoops committed Mar 28, 2024
2 parents b9e2110 + 40954cd commit c9d3fe0
Show file tree
Hide file tree
Showing 343 changed files with 4,395 additions and 2,537 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/copasi_se.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Add msbuild to PATH (Windows)
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
run: ctest -C $BUILD_TYPE -V

- name: binary archive
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name:
copasi-se-${{ matrix.platform }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copasi_se_mp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
container: quay.io/pypa/manylinux_2_28_x86_64

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Create Build Environment
run: |
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
run: cmake --build . --config $BUILD_TYPE --target install

- name: binary archive
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name:
copasi-se-openmp-manylinux_2_28_x86_64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copasi_se_slackware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
container: andy5995/slackware-build-essential:15.0

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Create Build Environment
run: |
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
run: cmake --build . --config $BUILD_TYPE --target install

- name: binary archive
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name:
copasi-se-openmp-slackware
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*.app
*.bkp
*.patch
*.diff
*.rej
moc_*.cpp
ui_*.h
/build
Expand Down
112 changes: 70 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019 - 2023 by Pedro Mendes, Rector and Visitors of the
# Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
# University of Virginia, University of Heidelberg, and University
# of Connecticut School of Medicine.
# All rights reserved.
Expand Down Expand Up @@ -376,7 +376,7 @@ find_package(LIBCOMBINE REQUIRED)

if (ENABLE_FLEX_BISON)
find_package(FLEX REQUIRED)
find_package(BISON REQUIRED)
find_package(BISON REQUIRED)
set(FLEX_BINARY ${FLEX_EXECUTABLE})
set(FLEX_EXECUTABLE "${COPASI_SOURCE_DIR}/admin/flex.sh")
set(BISON_BINARY ${BISON_EXECUTABLE})
Expand Down Expand Up @@ -406,31 +406,56 @@ endif (ENABLE_JIT)
if (ENABLE_OMP)
set(USE_OMP 1)

if (APPLE)
find_package (OpenMP)
if(NOT OpenMP_FOUND)
# libomp 15.0+ from brew is keg-only, so have to search in other locations.
# See https://github.com/Homebrew/homebrew-core/issues/112107#issuecomment-1278042927.
execute_process(COMMAND brew --prefix libomp
OUTPUT_VARIABLE HOMEBREW_LIBOMP_PREFIX
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I${HOMEBREW_LIBOMP_PREFIX}/include")
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I${HOMEBREW_LIBOMP_PREFIX}/include")
set(OpenMP_C_LIB_NAMES omp)
set(OpenMP_CXX_LIB_NAMES omp)
set(OpenMP_omp_LIBRARY ${HOMEBREW_LIBOMP_PREFIX}/lib/libomp.dylib)
endif()
endif()

find_package (OpenMP REQUIRED)
include_directories(BEFORE ${OpenMP_INCLUDE_PATH})

include(CheckCXXSourceCompiles)

function(detect_code_compiled code macro msg)
message(STATUS "Detecting ${msg}")
check_cxx_source_compiles("${code}" "${macro}" FAIL_REGEX "warning")

if(${macro})
message(STATUS "Detecting ${msg} - supported")
else(${macro})
message(STATUS "Detecting ${msg} - not supported")
endif(${macro})
endfunction(detect_code_compiled)

# Detect std::optional
detect_code_compiled("
#include <omp.h>
int main()
{
omp_sched_t schedule = omp_sched_monotonic;
}"
OMP_HAVE_MONOTONIC
"omp_sched_monotonic")

if (OpenMP_CXX_SPEC_DATE GREATER_EQUAL "201811")
# OpenMP 5.0 will always have monotonic scheduling
set(OMP_HAVE_MONOTONIC 1 CACHE INTERNAL "" FORCE)
else()
# otherwise we need to check
include_directories(BEFORE ${OpenMP_INCLUDE_PATH} ${OpenMP_CXX_INCLUDE_DIRS})

include(CheckCXXSourceCompiles)

function(detect_code_compiled code macro msg)
message(STATUS "Detecting ${msg}")
check_cxx_source_compiles("${code}" "${macro}" FAIL_REGEX "warning")

if(${macro})
message(STATUS "Detecting ${msg} - supported")
else(${macro})
message(STATUS "Detecting ${msg} - not supported")
endif(${macro})
endfunction(detect_code_compiled)

# Detect std::optional
detect_code_compiled("
#include <omp.h>
int main()
{
omp_sched_t schedule = omp_sched_monotonic;
}"
OMP_HAVE_MONOTONIC
"omp_sched_monotonic")
endif()


endif(ENABLE_OMP)

# TODO raptor should be restricted to a version which is at least
Expand All @@ -457,7 +482,7 @@ if(BUILD_GUI)
if (QT_USE_TEXTBROSWSER)
set(QT_USE_TEXTBROWSER ON)
endif()

if (${SELECT_QT} MATCHES "Qt5" OR
${SELECT_QT} MATCHES "Qt6" OR
${SELECT_QT} MATCHES "Any")
Expand All @@ -473,20 +498,20 @@ if(BUILD_GUI)
find_package(QCP REQUIRED)
endif()
option(WITH_LEGACY_OPENGL "Use Legacy OpenGL visualization" OFF)

set (ADDITIONAL_QT5_MODULES)
if (QT5_USE_DATAVISUALIZATION)
set (ADDITIONAL_QT5_MODULES ${ADDITIONAL_QT5_MODULES} DataVisualization)
endif()
if (COPASI_USE_QTCHARTS)
set (ADDITIONAL_QT5_MODULES ${ADDITIONAL_QT5_MODULES} Charts)
endif()

if(${SELECT_QT} MATCHES "Qt6")
# for xml sax parser and qregex
set (ADDITIONAL_QT5_MODULES ${ADDITIONAL_QT5_MODULES} Core5Compat)
endif()


if (QT_USE_TEXTBROWSER)
QT_FIND_MODULES( Concurrent
Expand All @@ -496,7 +521,7 @@ if(BUILD_GUI)
Network
OpenGL
PrintSupport
Svg
Svg
Xml
${ADDITIONAL_QT5_MODULES}
)
Expand Down Expand Up @@ -547,7 +572,7 @@ if(BUILD_GUI)
set(COPASI_USE_QWT ON)
endif()
# check for qwtplot3d

if (NOT QT5_USE_DATAVISUALIZATION)
find_package(QWTPLOT3D REQUIRED)
endif()
Expand All @@ -564,7 +589,7 @@ if(BUILD_GUI)
option(ENABLE_SBW_INTEGRATION "Enable SBW Integration" ON)
if (ENABLE_SBW_INTEGRATION)
find_package(SBW REQUIRED)

# set up definitions for SBW
if(UNIX)
if(APPLE)
Expand Down Expand Up @@ -610,7 +635,7 @@ if (ENABLE_CSHARP OR ENABLE_JAVA OR ENABLE_PYTHON OR ENABLE_PERL OR ENABLE_OCTAV
endif ()

find_package(SWIG REQUIRED)

endif ()

option (ENABLE_TIME_SENS "Enables Time Sensitivities task in UI." ON)
Expand All @@ -637,7 +662,7 @@ option (BUILD_SBML_TESTSUITE "Build the program to run the new SBML testsuite."
option (BUILD_STOCHASTIC_TESTSUITE "Build the program to run the SBML stochastic testsuite." OFF)
option (BUILD_FRANKS_TESTSUITE "Build the program to run the Frank Bergmann's SBML tests." OFF)

option (BUILD_TESTS "Compiles CPPUNIT Testrunners." OFF)
option (BUILD_TESTS "Compiles CPPUNIT/Catch2 Testrunners." OFF)
mark_as_advanced(BUILD_TESTS)

if (BUILD_TESTS)
Expand Down Expand Up @@ -758,18 +783,21 @@ if(MSVC OR USING_INTEL)
endif(${flag_var} MATCHES "/Zi")

endforeach(flag_var)

if (MSVC AND WIN32 AND NOT MSVC_VERSION VERSION_LESS 142 AND CMAKE_VERSION VERSION_GREATER 3.13)
# enable edit & continue for debug builds of msvc
# enable edit & continue for debug builds of msvc
add_link_options($<$<CONFIG:Debug>:/INCREMENTAL>)
add_compile_options($<$<CONFIG:Debug>:/ZI>)

add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/EHsc>")
endif()
endif()

endif(MSVC OR USING_INTEL)


if (EMSCRIPTEN)
add_compile_options(-fexceptions)
add_link_options(-fexceptions -sINITIAL_MEMORY=65536000 -sALLOW_MEMORY_GROWTH=1)
endif(EMSCRIPTEN)

set(APPS "" CACHE INTERNAL "")
set(DIRS "${COPASI_DEPENDENCY_DIR}/bin;${COPASI_DEPENDENCY_DIR}/lib" CACHE INTERNAL "")
Expand Down Expand Up @@ -926,7 +954,7 @@ message(STATUS "-----------------------------------------------------------
Qt version = ${QT_VERSION}
Qt lib = ${QT_LIBRARIES}
Qt include = ${QT_INCLUDE_DIRS}
QWT version = ${QWT_VERSION_STRING} (0x${QWT_VERSION_NUMERIC})
QWT lib = ${QWT_LIBRARY}
QWT include = ${QWT_INCLUDE_DIR}
Expand All @@ -952,7 +980,7 @@ message(STATUS "-----------------------------------------------------------
NativeJIT lib = ${NATIVEJIT_LIBRARY}
NativeJIT include = ${NATIVEJIT_INCLUDE_DIR}
NativeJIT CXX Flags = ${NATIVEJIT_COMPILE_OPTIONS}
cpu_features lib = ${CPUFEATURES_LIBRARY}
cpu_features include = ${CPUFEATURES_INCLUDE_DIR}
Expand All @@ -976,7 +1004,7 @@ message(STATUS "-----------------------------------------------------------
JIT Compilation = ${ENABLE_JIT}
OpenMP = ${ENABLE_OMP}
CXX Flags = ${CMAKE_CXX_FLAGS}
CXX Flags = ${CMAKE_CXX_FLAGS}
Additional Defines = ${DirDefs}
Language Bindings:
Expand Down
4 changes: 4 additions & 0 deletions CMakeModules/FindEXPAT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ find_path(EXPAT_INCLUDE_DIR expat.h
PATHS $ENV{EXPAT_DIR}/include
$ENV{EXPAT_DIR}
${${_PROJECT_DEPENDENCY_DIR}}/include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)

if (NOT EXPAT_INCLUDE_DIR)
Expand All @@ -48,6 +49,7 @@ find_path(EXPAT_INCLUDE_DIR expat.h
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
endif ()

Expand All @@ -64,6 +66,7 @@ find_library(EXPAT_LIBRARY
${${_PROJECT_DEPENDENCY_DIR}}/lib64
${${_PROJECT_DEPENDENCY_DIR}}/lib
${${_PROJECT_DEPENDENCY_DIR}}
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)

if (NOT EXPAT_LIBRARY)
Expand All @@ -81,6 +84,7 @@ find_library(EXPAT_LIBRARY
/opt/csw/lib # Blastwave
/opt/lib
/usr/freeware/lib64
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)
endif()

Expand Down
2 changes: 2 additions & 0 deletions CMakeModules/FindICONV.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ FIND_PATH(ICONV_INCLUDE_DIR iconv.h
/usr/local/include
/opt/local/include
${${_PROJECT_DEPENDENCY_DIR}}/include
CMAKE_FIND_ROOT_PATH_BOTH
)

FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv
Expand All @@ -49,6 +50,7 @@ FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv
/opt/local/lib
${${_PROJECT_DEPENDENCY_DIR}}/${CMAKE_INSTALL_LIBDIR}
${${_PROJECT_DEPENDENCY_DIR}}/lib
CMAKE_FIND_ROOT_PATH_BOTH
)

IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
Expand Down
14 changes: 13 additions & 1 deletion CMakeModules/FindLIBSBML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,21 @@ endif()

message (VERBOSE "Looking for ${LIBSBML_LIBRARY_NAME}")

find_package(${LIBSBML_LIBRARY_NAME} CONFIG QUIET)

string(TOUPPER ${PROJECT_NAME} _UPPER_PROJECT_NAME)
set(_PROJECT_DEPENDENCY_DIR ${_UPPER_PROJECT_NAME}_DEPENDENCY_DIR)

find_package(${LIBSBML_LIBRARY_NAME} CONFIG QUIET
PATHS ${${_PROJECT_DEPENDENCY_DIR}}/lib/cmake
${${_PROJECT_DEPENDENCY_DIR}}/lib64/cmake
${CONAN_LIB_DIRS_LIBSBML}/cmake
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)

if (NOT ${LIBSBML_LIBRARY_NAME}_FOUND)
find_package(${LIBSBML_LIBRARY_NAME} CONFIG QUIET)
endif()

if (NOT ${LIBSBML_LIBRARY_NAME}_FOUND)
find_package(${LIBSBML_LIBRARY_NAME} CONFIG QUIET
PATHS /usr/lib/cmake
Expand All @@ -48,6 +58,7 @@ if (NOT ${LIBSBML_LIBRARY_NAME}_FOUND)
${${_PROJECT_DEPENDENCY_DIR}}/lib/cmake
${${_PROJECT_DEPENDENCY_DIR}}/lib64/cmake
${CONAN_LIB_DIRS_LIBSBML}/cmake
CMAKE_FIND_ROOT_PATH_BOTH
)
endif()

Expand Down Expand Up @@ -111,6 +122,7 @@ find_path(LIBSBML_INCLUDE_DIR sbml/SBase.h
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
CMAKE_FIND_ROOT_PATH_BOTH
NO_DEFAULT_PATH)

if (NOT LIBSBML_INCLUDE_DIR)
Expand Down
Loading

0 comments on commit c9d3fe0

Please sign in to comment.