Skip to content

Commit 4d1b415

Browse files
committed
Merge branch 'release/Version-4.46'
2 parents cc55de1 + e9c47d9 commit 4d1b415

File tree

959 files changed

+126116
-42815
lines changed

Some content is hidden

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

959 files changed

+126116
-42815
lines changed

.github/workflows/copasi_se.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
shell: bash
8282
working-directory: ${{github.workspace}}
8383
run: |
84-
curl -L http://bqfrank.spdns.org/Files/test-suite.zip -o test-suite.zip
84+
curl -L https://copasi.org/static/test-suite.zip -o test-suite.zip
8585
unzip -n -qq test-suite.zip
8686
8787
- name: Configure COPASI (mac)

CMakeLists.txt

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2019 - 2025 by Pedro Mendes, Rector and Visitors of the
1+
# Copyright (C) 2019 - 2026 by Pedro Mendes, Rector and Visitors of the
22
# University of Virginia, University of Heidelberg, and University
33
# of Connecticut School of Medicine.
44
# All rights reserved.
@@ -28,7 +28,7 @@
2828
###############################################################################
2929

3030
# we need at least cmake 2.8 for the FindLAPACK functions
31-
cmake_minimum_required (VERSION 2.8.12...3.19.1)
31+
cmake_minimum_required(VERSION 2.8...3.19)
3232

3333
if(POLICY CMP0048)
3434
cmake_policy(SET CMP0048 NEW)
@@ -129,9 +129,10 @@ if (NOT WIN32 AND PREFER_STATIC)
129129
endif()
130130

131131
if (CMAKE_MAJOR_VERSION LESS 3 OR CMAKE_MINOR_VERSION LESS 1)
132-
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11")
132+
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++20")
133133
else()
134-
set(CMAKE_CXX_STANDARD 11)
134+
set(CMAKE_CXX_STANDARD 20)
135+
set(CMAKE_CXX_EXTENSIONS OFF)
135136
endif()
136137

137138
CHECK_FUNCTION_EXISTS(strptime HAVE_STRPTIME)
@@ -261,7 +262,7 @@ option(CLAPACK_NO_BLASWRAP "If defined the NO_BLASWRAP compile option will be ad
261262
set (ENABLE_JIT_DEFAULT OFF)
262263

263264
if (APPLE)
264-
if (CMAKE_OSX_ARCHITECTURES STREQUAL arm64)
265+
if (CMAKE_OSX_ARCHITECTURES STREQUAL arm64 OR (NOT CMAKE_OSX_ARCHITECTURES AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64"))
265266
set (ENABLE_JIT_DEFAULT OFF)
266267
else()
267268
set (ENABLE_JIT_DEFAULT ON)
@@ -390,8 +391,20 @@ endif ()
390391
include_directories(BEFORE ${CLAPACK_INCLUDE_DIR})
391392
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LAPACK_CFLAGS}")
392393

394+
option(COPASI_USE_CROSSGUID "Use CrossGUID for UUID generation" OFF)
395+
if (COPASI_USE_CROSSGUID)
393396
find_package(CROSSGUID REQUIRED)
394397
include_directories(BEFORE ${CROSSGUID_INCLUDE_DIR})
398+
SET(UUID_MESSAGE "
399+
UUID library = CrossGUID
400+
crossguid Libs = ${CROSSGUID_LIBRARY}
401+
cross include = ${CROSSGUID_INCLUDE_DIR}
402+
")
403+
else()
404+
SET(UUID_MESSAGE "
405+
UUID library = stduuid
406+
")
407+
endif()
395408

396409
if (ENABLE_JIT)
397410
find_package(NATIVEJIT REQUIRED)
@@ -492,10 +505,22 @@ if(BUILD_GUI)
492505
option(QT5_USE_WEBENGINE "Use QWebEngine instead of the deprecated QtWebKit for notes" OFF)
493506
option(QT5_USE_DATAVISUALIZATION "Use Qt5DataVisualization instead of the deprecated QwtPlot3D" ON)
494507
if (QT5_USE_DATAVISUALIZATION)
495-
option(WITH_DATAVISUALIZATION_NAMESPACES "The DataVisualization modeule uses c++ namespaces" ON)
508+
# compile a test program against the datavisualization
509+
# to figure out whether the namespace flag is needed
510+
if (NOT DEFINED WITH_DATAVISUALIZATION_NAMESPACES)
511+
check_cxx_source_compiles("
512+
#include <QtDataVisualization/Q3DSurface>
513+
int main() {
514+
QtDataVisualization::Q3DSurface surface;
515+
return 0;
516+
}"
517+
DATAVISUALIZATION_USES_NAMESPACES)
518+
519+
option(WITH_DATAVISUALIZATION_NAMESPACES "The DataVisualization modeule uses c++ namespaces" ${DATAVISUALIZATION_USES_NAMESPACES})
520+
endif()
496521
endif()
497522
option(COPASI_USE_QTCHARTS "Use QtCharts instead of the Qwt" OFF)
498-
option(COPASI_USE_QCUSTOMPLOT "Use QCustomPlot instead of the Qwt" OFF)
523+
option(COPASI_USE_QCUSTOMPLOT "Use QCustomPlot instead of the Qwt" ON)
499524
if (COPASI_USE_QCUSTOMPLOT)
500525
find_package(QCP REQUIRED)
501526
endif()
@@ -509,7 +534,7 @@ if(BUILD_GUI)
509534
set (ADDITIONAL_QT5_MODULES ${ADDITIONAL_QT5_MODULES} Charts)
510535
endif()
511536

512-
if(${SELECT_QT} MATCHES "Qt6")
537+
if(${SELECT_QT} MATCHES "Qt6" OR SELECT_QT STREQUAL "Any")
513538
# for xml sax parser and qregex
514539
set (ADDITIONAL_QT5_MODULES ${ADDITIONAL_QT5_MODULES} Core5Compat)
515540
endif()
@@ -947,8 +972,7 @@ message(STATUS "-----------------------------------------------------------
947972
LAPACK LDFLAGS = ${CLAPACK_LINKER_FLAGS}
948973
LAPACK include = ${CLAPACK_INCLUDE_DIR}
949974
950-
crossguid Libs = ${CROSSGUID_LIBRARY}
951-
cross include = ${CROSSGUID_INCLUDE_DIR}
975+
${UUID_MESSAGE}
952976
953977
Expat version = ${EXPAT_VERSION}
954978
Expat Libs = ${EXPAT_LIBRARY}

CMakeModules/FindCPUFEATURES.cmake

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2020 - 2022 by Pedro Mendes, Rector and Visitors of the
1+
# Copyright (C) 2020 - 2026 by Pedro Mendes, Rector and Visitors of the
22
# University of Virginia, University of Heidelberg, and University
33
# of Connecticut School of Medicine.
44
# All rights reserved.
@@ -16,16 +16,28 @@
1616
string(TOUPPER ${PROJECT_NAME} _UPPER_PROJECT_NAME)
1717
set(_PROJECT_DEPENDENCY_DIR ${_UPPER_PROJECT_NAME}_DEPENDENCY_DIR)
1818

19-
find_package(CPUFEATURES CONFIG REQUIRED
19+
find_package(CPUFEATURES CONFIG QUIET
2020
CONFIGS CpuFeaturesConfig.cmake
2121
PATHS $ENV{CPUFEATURES_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake
2222
${${_PROJECT_DEPENDENCY_DIR}}/${CMAKE_INSTALL_LIBDIR}/cmake
2323
${${_PROJECT_DEPENDENCY_DIR}}/lib/cmake
2424
/usr/${CMAKE_INSTALL_LIBDIR}/cmake
2525
${CONAN_LIB_DIRS_CPUFEATURES}/cmake
26-
PATH_SUFFIXES CpuFeatures
26+
PATH_SUFFIXES CpuFeatures
27+
NO_DEFAULT_PATH
2728
)
2829

30+
find_package(CPUFEATURES CONFIG QUIET
31+
CONFIGS CpuFeaturesConfig.cmake
32+
PATHS $ENV{CPUFEATURES_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake
33+
${${_PROJECT_DEPENDENCY_DIR}}/${CMAKE_INSTALL_LIBDIR}/cmake
34+
${${_PROJECT_DEPENDENCY_DIR}}/lib/cmake
35+
/usr/${CMAKE_INSTALL_LIBDIR}/cmake
36+
${CONAN_LIB_DIRS_CPUFEATURES}/cmake
37+
PATH_SUFFIXES CpuFeatures
38+
)
39+
40+
2941
if (NOT CPUFEATURES_FOUND)
3042
message(VERBOSE "cpu_features Fallback $ENV{CPUFEATURES_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake")
3143
# Fallback if no CONFIG is found
@@ -49,7 +61,7 @@ if (NOT CPUFEATURES_FOUND)
4961
endif (NOT CPUFEATURES_INCLUDE_DIR)
5062

5163
find_library(CPUFEATURES_LIBRARY
52-
NAMES cpu_features
64+
NAMES cpu_features cpu_features.lib
5365
PATHS $ENV{CPUFEATURES_DIR}/lib
5466
$ENV{CPUFEATURES_DIR}
5567
${${_PROJECT_DEPENDENCY_DIR}}/${CMAKE_INSTALL_LIBDIR}
@@ -67,7 +79,18 @@ if (NOT CPUFEATURES_FOUND)
6779

6880
if (NOT CPUFEATURES_LIBRARY)
6981
find_library(CPUFEATURES_LIBRARY
70-
NAMES cpu_features)
82+
NAMES cpu_features cpu_features.lib
83+
PATHS $ENV{CPUFEATURES_DIR}/lib
84+
$ENV{CPUFEATURES_DIR}
85+
${${_PROJECT_DEPENDENCY_DIR}}/${CMAKE_INSTALL_LIBDIR}
86+
${${_PROJECT_DEPENDENCY_DIR}}/lib
87+
${${_PROJECT_DEPENDENCY_DIR}})
88+
endif (NOT CPUFEATURES_LIBRARY)
89+
90+
91+
if (NOT CPUFEATURES_LIBRARY)
92+
find_library(CPUFEATURES_LIBRARY
93+
NAMES cpu_features cpu_features.lib)
7194
endif (NOT CPUFEATURES_LIBRARY)
7295

7396
set(CPUFEATURES_FOUND ${CPUFEATURES_LIBRARY})
@@ -87,6 +110,10 @@ else ()
87110
get_target_property(CPUFEATURES_LIBRARY CpuFeatures::cpu_features IMPORTED_LOCATION_NOCONFIG)
88111
endif()
89112

113+
if (NOT CPUFEATURES_LIBRARY)
114+
get_target_property(CPUFEATURES_LIBRARY CpuFeatures::cpu_features IMPORTED_LOCATION_RELWITHDEBINFO)
115+
endif()
116+
90117
get_target_property(CPUFEATURES_INTERFACE_LINK_LIBRARIES CpuFeatures::cpu_features INTERFACE_LINK_LIBRARIES)
91118

92119
if (CPUFEATURES_INTERFACE_LINK_LIBRARIES)

CMakeModules/FindNATIVEJIT.cmake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2020 - 2022 by Pedro Mendes, Rector and Visitors of the
1+
# Copyright (C) 2020 - 2026 by Pedro Mendes, Rector and Visitors of the
22
# University of Virginia, University of Heidelberg, and University
33
# of Connecticut School of Medicine.
44
# All rights reserved.
@@ -113,6 +113,10 @@ else ()
113113
get_target_property(NATIVEJIT_LIBRARY NativeJIT IMPORTED_LOCATION_DEBUG)
114114
endif()
115115

116+
if (NOT NATIVEJIT_LIBRARY)
117+
get_target_property(NATIVEJIT_LIBRARY NativeJIT IMPORTED_LOCATION_RELWITHDEBINFO)
118+
endif()
119+
116120
if (NOT NATIVEJIT_LIBRARY)
117121
get_target_property(NATIVEJIT_LIBRARY NativeJIT IMPORTED_LOCATION_NOCONFIG)
118122
endif()
@@ -129,6 +133,10 @@ else ()
129133
get_target_property(CODEGEN_LIBRARY CodeGen IMPORTED_LOCATION_DEBUG)
130134
endif()
131135

136+
if (NOT CODEGEN_LIBRARY)
137+
get_target_property(CODEGEN_LIBRARY CodeGen IMPORTED_LOCATION_RELWITHDEBINFO)
138+
endif()
139+
132140
if (NOT CODEGEN_LIBRARY)
133141
get_target_property(CODEGEN_LIBRARY CodeGen IMPORTED_LOCATION_NOCONFIG)
134142
endif()

CMakeModules/FindZLIB.cmake

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2022 - 2024 by Pedro Mendes, Rector and Visitors of the
1+
# Copyright (C) 2022 - 2026 by Pedro Mendes, Rector and Visitors of the
22
# University of Virginia, University of Heidelberg, and University
33
# of Connecticut School of Medicine.
44
# All rights reserved.
@@ -43,11 +43,12 @@ if (NOT (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) OR NOT ZLIB_FOUND)
4343
NO_DEFAULT_PATH)
4444

4545
if (NOT ZLIB_INCLUDE_DIR)
46-
find_path(ZLIB_INCLUDE_DIR zlib.h zlib/zlib.h)
46+
find_path(ZLIB_INCLUDE_DIR zlib.h zlib/zlib.h
47+
CMAKE_FIND_ROOT_PATH_BOTH )
4748
endif ()
4849

4950
find_library(ZLIB_LIBRARY
50-
NAMES zdll.lib z zlib.lib libzlib zlib libzlib.a
51+
NAMES zdll.lib z zlib.lib libzlib zlib libzlib.a libzdll.a
5152
PATHS $ENV{ZLIB_DIR}/lib
5253
$ENV{ZLIB_DIR}/lib-dbg
5354
$ENV{ZLIB_DIR}
@@ -65,7 +66,8 @@ if (NOT (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) OR NOT ZLIB_FOUND)
6566
NO_DEFAULT_PATH)
6667

6768
if (NOT ZLIB_LIBRARY)
68-
find_library(ZLIB_LIBRARY NAMES zdll.lib z zlib.lib libzlib zlib libzlib.a)
69+
find_library(ZLIB_LIBRARY NAMES zdll.lib z zlib.lib libzlib zlib libzlib.a libzdll.a
70+
CMAKE_FIND_ROOT_PATH_BOTH )
6971
endif ()
7072

7173
if (NOT WIN32)
@@ -80,6 +82,24 @@ if (NOT (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) OR NOT ZLIB_FOUND)
8082
endif (PC_ZLIB_FOUND)
8183
endif (NOT WIN32)
8284

85+
86+
# make sure that we have a valid zip library
87+
file(TO_CMAKE_PATH "${ZLIB_LIBRARY}" LIBZ_CMAKE_PATH)
88+
include (CheckLibraryExists)
89+
check_library_exists("${LIBZ_CMAKE_PATH}" "gzopen" "" LIBZ_FOUND_SYMBOL)
90+
if(NOT LIBZ_FOUND_SYMBOL)
91+
# this is odd, but on windows this check always fails! must be a
92+
# bug in the current cmake version so for now only issue this
93+
# warning on linux
94+
if(UNIX)
95+
message(WARNING
96+
"The chosen zlib library does not appear to be valid because it is
97+
missing certain required symbols. Please check that ${LIBZ_LIBRARY} is
98+
the correct zlib library. For details about the error, please see
99+
CMakeError.log or CMakeConfigureLog.yaml in the build directory.")
100+
endif()
101+
endif()
102+
83103
mark_as_advanced(ZLIB_INCLUDE_DIR ZLIB_LIBRARY)
84104

85105
endif () # Check for cached values

ChooseQtVersion.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2019 - 2023 by Pedro Mendes, Rector and Visitors of the
1+
# Copyright (C) 2019 - 2026 by Pedro Mendes, Rector and Visitors of the
22
# University of Virginia, University of Heidelberg, and University
33
# of Connecticut School of Medicine.
44
# All rights reserved.
@@ -8,7 +8,7 @@
88
# of Connecticut School of Medicine.
99
# All rights reserved.
1010

11-
cmake_minimum_required (VERSION 2.8.12...3.19.1)
11+
cmake_minimum_required(VERSION 2.8...3.19)
1212

1313
set(SELECT_QT "Any" CACHE STRING "The prefered Qt version one of: Qt6, Qt5, Qt4 or Any" )
1414
if (DEFINED SELECT_QT)

LinuxTGZ/COPASI.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (C) 2019 - 2025 by Pedro Mendes, Rector and Visitors of the
2+
# Copyright (C) 2019 - 2026 by Pedro Mendes, Rector and Visitors of the
33
# University of Virginia, University of Heidelberg, and University
44
# of Connecticut School of Medicine.
55
# All rights reserved.
@@ -123,6 +123,10 @@ if [ -n "${COPASI_LINUXDEPLOYQT}" ]; then
123123
echo "running linuxdeployqt"
124124
echo ${COPASI_LINUXDEPLOYQT} ./CopasiUI -always-overwrite -bundle-non-qt-libs -qmake=`which qmake` -extra-plugins=platforms/libqxcb.so
125125
${COPASI_LINUXDEPLOYQT} ./CopasiUI -always-overwrite -bundle-non-qt-libs -qmake=`which qmake` -extra-plugins=platforms/libqxcb.so
126+
if [ -n "${EXTRA_LIBS}" ]; then
127+
# copy all files from extra_libs to lib
128+
cp -r ${EXTRA_LIBS}/* lib/
129+
fi;
126130
popd
127131
fi
128132

7.13 KB
Binary file not shown.

0 commit comments

Comments
 (0)