Commit 79d22b33 authored by Aaron Bray's avatar Aaron Bray

Merge branch '2.x' into 'master'

2.1.0 Release

See merge request !16
parents d21eb92c e5294e82
......@@ -48,6 +48,9 @@ if(MSVC)
else()
set(PULSE_BUILD_CLR OFF)
endif()
set (PULSE_IL2CPP_PATCH OFF CACHE BOOL "Patch Protobuf C# to be compatible with the Unity IL2CPP compiler")
mark_as_advanced(PULSE_IL2CPP_PATCH)
if(SUPERBUILD)
include(SuperBuild.cmake)
else()
......
add_library(PulseC SHARED engine/cpp/PulseEngineC.h
engine/cpp/PulseEngineC.cpp)
add_library(PulseC SHARED engine/c/PulseEngineC.h
engine/c/PulseEngineC.cpp)
target_include_directories(PulseC PRIVATE ${CMAKE_BINARY_DIR}/schema/cpp/)
target_include_directories(PulseC PRIVATE ${CMAKE_BINARY_DIR}/schema/cpp/bind/)
......
......@@ -64,6 +64,7 @@ add_jar(PulseJava ${JAVA_FILES}
"${CMAKE_SOURCE_DIR}/jar/org.eclipse.jgit-4.11.0.201803080745-r.jar"
"${CMAKE_SOURCE_DIR}/jar/slf4j-api-1.7.25.jar"
"${CMAKE_SOURCE_DIR}/jar/slf4j-simple-1.7.25.jar"
"${CMAKE_SOURCE_DIR}/jar/error_prone_annotations-2.3.2.jar"
OUTPUT_NAME Pulse)
get_target_property(_jarFile PulseJava JAR_FILE)
add_custom_command(TARGET PulseJava POST_BUILD
......
......@@ -14,16 +14,16 @@ endif()
##################################
message( STATUS "External project - Eigen" )
set(eigen_VERSION "3.3.5" )
set(eigen_VERSION "3.3.7" )
set(eigen_SRC "${CMAKE_BINARY_DIR}/eigen/src/eigen")
set(eigen_Patch "${CMAKE_SOURCE_DIR}/cmake/eigen-patches")
ExternalProject_Add( eigen
PREFIX eigen
URL "http://bitbucket.org/eigen/eigen/get/${eigen_VERSION}.tar.gz"
URL_HASH MD5=ee48cafede2f51fe33984ff5c9f48026
UPDATE_COMMAND
COMMAND ${CMAKE_COMMAND} -Deigen_source=${eigen_SRC} -Deigen_patch=${eigen_Patch} -P ${CMAKE_SOURCE_DIR}/cmake/eigen-patches/Patch.cmake
URL_HASH MD5=f2a417d083fe8ca4b8ed2bc613d20f07
#UPDATE_COMMAND
# COMMAND ${CMAKE_COMMAND} -Deigen_source=${eigen_SRC} -Deigen_patch=${eigen_Patch} -P ${eigen_Patch}/Patch.cmake
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}"
CMAKE_ARGS
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
......@@ -64,16 +64,21 @@ list(APPEND Pulse_DEPENDENCIES log4cplus)
###################################################
message( STATUS "External project - protobuf" )
set(protobuf_VERSION "3.6.1" )
set(protobuf_MD5 "e09a2a7d3b34a271aedfc0b38ac2a4dc" )
#This is a working 3.7.0-rc2 hash, the tag is bunk :(
set(protobuf_VERSION "9e381c05f525ae7623573cdb0536a18904dab451" )#"v3.7.0-rc.2")
set(protobuf_MD5 "a5cf79b455ddb13e3001be89143b2bdd" )
set(protobuf_SRC "${CMAKE_BINARY_DIR}/protobuf/src/protobuf")
set(protobuf_Patch "${CMAKE_SOURCE_DIR}/cmake/protobuf-patches")
message(STATUS "Patching protobuf ${PULSE_IL2CPP_PATCH}")
ExternalProject_Add( protobuf
PREFIX protobuf
URL "https://github.com/google/protobuf/archive/v${protobuf_VERSION}.zip"
URL "https://github.com/google/protobuf/archive/${protobuf_VERSION}.zip"
URL_MD5 ${protobuf_MD5}
DOWNLOAD_DIR ${protobuf_SRC}
SOURCE_SUBDIR ./cmake
UPDATE_COMMAND
COMMAND ${CMAKE_COMMAND} -DPULSE_IL2CPP_PATCH=${PULSE_IL2CPP_PATCH} -Dprotobuf_source=${protobuf_SRC} -Dprotobuf_patch=${protobuf_Patch} -P ${protobuf_Patch}/Patch.cmake
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
......
......@@ -39,7 +39,8 @@ set(JAVA_CLASSPATH Pulse.jar
"@CMAKE_SOURCE_DIR@/jar/zip4j-1.3.1.jar"
"@CMAKE_SOURCE_DIR@/jar/org.eclipse.jgit-4.11.0.201803080745-r.jar"
"@CMAKE_SOURCE_DIR@/jar/slf4j-api-1.7.25.jar"
"@CMAKE_SOURCE_DIR@/jar/slf4j-simple-1.7.25.jar")
"@CMAKE_SOURCE_DIR@/jar/slf4j-simple-1.7.25.jar"
"@CMAKE_SOURCE_DIR@/jar/error_prone_annotations-2.3.2.jar")
if(NOT WIN32)
string(REPLACE ";" ":" JAVA_CLASSPATH "${JAVA_CLASSPATH}")
......@@ -63,22 +64,22 @@ elseif(TYPE STREQUAL "doxygen")
if(DOCS)
file(REMOVE ${DOCS})
endif()
file(COPY @CMAKE_SOURCE_DIR@/docs/Doxygen/bootstrap DESTINATION ./docs/html)
file(COPY @CMAKE_SOURCE_DIR@/docs/Doxygen/font-awesome-4.3.0 DESTINATION ./docs/html)
file(COPY @CMAKE_SOURCE_DIR@/docs/Images DESTINATION ./docs/html)
file(COPY "@CMAKE_SOURCE_DIR@/docs/Doxygen/bootstrap" DESTINATION ./docs/html)
file(COPY "@CMAKE_SOURCE_DIR@/docs/Doxygen/font-awesome-4.3.0" DESTINATION ./docs/html)
file(COPY "@CMAKE_SOURCE_DIR@/docs/Images" DESTINATION ./docs/html)
# These are run above
#execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.testing.validation.SystemValidation)
#execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.testing.validation.PatientValidation)
execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.datamodel.doxygen.DoxygenPreprocessor @CMAKE_SOURCE_DIR@/docs/Markdown ./docs/markdown)
execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.datamodel.doxygen.DoxygenPreprocessor @CMAKE_SOURCE_DIR@/docs/Methodology ./docs/markdown ./test_results/tables)
execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.datamodel.doxygen.Proto2Doxygen @CMAKE_SOURCE_DIR@/schema/proto ./docs/markdown)
execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.datamodel.doxygen.DoxygenPreprocessor "@CMAKE_SOURCE_DIR@/docs/Markdown" ./docs/markdown)
execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.datamodel.doxygen.DoxygenPreprocessor "@CMAKE_SOURCE_DIR@/docs/Methodology" ./docs/markdown ./test_results/tables)
execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.datamodel.doxygen.Proto2Doxygen "@CMAKE_SOURCE_DIR@/schema/proto" ./docs/markdown)
execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.datamodel.doxygen.CDM2MD ./docs/markdown)
execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.utilities.csv.plots.PlotDriver PlotRun.config)
execute_process(COMMAND doxygen ./docs/full.doxy)
elseif(TYPE STREQUAL "protoc")
execute_process(COMMAND ${CMAKE_COMMAND} -DSCHEMA_SRC:STRING=@SCHEMA_SRC@ -DSCHEMA_DST:STRING=@SCHEMA_DST@ -P @CMAKE_SOURCE_DIR@/schema/GenerateCDMBindings.cmake)
execute_process(COMMAND ${CMAKE_COMMAND} -DSCHEMA_SRC:STRING="@SCHEMA_SRC@" -DSCHEMA_DST:STRING="@SCHEMA_DST@" -P "@CMAKE_SOURCE_DIR@/schema/GenerateCDMBindings.cmake")
elseif(TYPE STREQUAL "updateBaselines")
execute_process(COMMAND ${CMAKE_COMMAND} --build @CMAKE_CURRENT_BINARY_DIR@ --target UpdateVerification)
execute_process(COMMAND ${CMAKE_COMMAND} --build "@CMAKE_CURRENT_BINARY_DIR@" --target UpdateVerification)
elseif(TYPE STREQUAL "rebase")
execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -Xmx900m -classpath "${JAVA_CLASSPATH}" com.kitware.physiology.testing.Rebase)
elseif(TYPE STREQUAL "FullReport")
......
......@@ -2,15 +2,13 @@
# FIND_PACKAGE(Pulse REQUIRED)
#
# This file will define the following variables:
# - Pulse_LIBS : The list of libraries to link against.
# - Pulse_DEBUG_LIBS : The list of debug libraries to link against.
# - Pulse_LIB_ROOT_DIR : The root library directory, libraries will be under a configuration
# : directory : 'release','debug','relwithdebinfo'
# : Use to link to pulse library builds of your choosing.
# - Pulse_LIB_DIR : The directory where lib files are of the same build type
# : as the including project.
# : Calling LINK_DIRECTORIES
# with this path is NOT needed.
# - Pulse_LIB_ROOT_DIR : The root library directory
# - PULSE_LIBRARIES : The list of both debug and release libraries.
: It is recommended to use this variable in your CMake file
: It will configure both debug and release build types for you.
: target_link_libraries(YourProject ${PULSE_LIBRARIES})
# - Pulse_RELEASE_LIBS : The list of release libraries.
# - Pulse_DEBUG_LIBS : The list of debug libraries.
# - Pulse_INCLUDE_DIRS : The Pulse include directories.
# - Pulse_VERSION : The version of this Pulse build. Example: "2.4.0"
# - Pulse_VERSION_MAJOR : Major version part of Pulse_VERSION. Example: "2"
......@@ -19,12 +17,13 @@
#
# ===================================================================================
set(Pulse_INSTALL "${Pulse_DIR}")
set(Pulse_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include"
"@CMAKE_INSTALL_PREFIX@/include/bind"
"@CMAKE_INSTALL_PREFIX@/include/cdm"
set(Pulse_INCLUDE_DIRS "${Pulse_INSTALL}/include"
"${Pulse_INSTALL}/include/bind"
"${Pulse_INSTALL}/include/cdm"
)
set(Pulse_LIB_ROOT_DIR "@CMAKE_INSTALL_PREFIX@/lib/")
set(Pulse_LIB_ROOT_DIR "${Pulse_INSTALL}/lib")
if(MSVC)
set(LOG4CPLUS_LIB "log4cplus")
......@@ -40,32 +39,35 @@ else()
set(LIB_ENDING "a")
endif()
set(Pulse_INSTALL "@CMAKE_INSTALL_PREFIX@")
set (WIN32_LIBS "")
if(WIN32)
list(APPEND WIN32_LIBS "ws2_32" "advapi32")
endif()
set(Pulse_LIBS "${Pulse_LIB_ROOT_DIR}/PulseEngine.${LIB_ENDING}"
set (PULSE_LIBRARIES "")
set(Pulse_RELEASE_LIBS "${Pulse_LIB_ROOT_DIR}/PulseEngine.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/CommonDataModel.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/DataModelBindings.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/${LOG4CPLUS_LIB}.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/libprotobuf.${LIB_ENDING}"
"${WIN32_LIBS}
)
set(Pulse_RELWITHDEBINFO_LIBS "${Pulse_LIB_ROOT_DIR}/PulseEnginedi.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/CommonDataModeldi.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/DataModelBindingsdi.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/${LOG4CPLUS_LIB}.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/libprotobuf.${LIB_ENDING}"
)
foreach(lib ${Pulse_RELEASE_LIBS})
list (APPEND PULSE_LIBRARIES optimized ${lib})
endforeach(lib)
set(Pulse_DEBUG_LIBS "${Pulse_LIB_ROOT_DIR}/PulseEngined.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/CommonDataModeld.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/DataModelBindingsd.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/${LOG4CPLUS_LIB}D.${LIB_ENDING}"
"${Pulse_LIB_ROOT_DIR}/libprotobufd.${LIB_ENDING}"
"${WIN32_LIBS}
)
if(WIN32)
list(APPEND Pulse_LIBS "ws2_32" "advapi32")
list(APPEND Pulse_DEBUG_LIBS "ws2_32" "advapi32")
endif()
foreach(lib ${Pulse_DEBUG_LIBS})
list (APPEND PULSE_LIBRARIES debug ${lib})
endforeach(lib)
set( Pulse_VERSION_MAJOR "@PULSE_VERSION_MAJOR@" )
set( Pulse_VERSION_MINOR "@PULSE_VERSION_MINOR@" )
......
#+
# This file is called as CMake -P script for the patch step of
# protobuf-patches/Patch.cmake protobuf_patch and protobuf_source are defined on the command
# line along with the call.
#-
message("Patching Protobuf ${protobuf_patch} AND ${protobuf_source}")
if(PULSE_IL2CPP_PATCH)
message("Applying protobuf PULSE_IL2CPP_PATCH")
# Patch Protobuf C# ReflectionUtil to be compatible with the Unity IL2CPP compiler
# This file address the issue where, in Unity, the il2cpp compiler is unable
# To properly generate code associated with protobuf enums.
# Protobuf reflection expects the enum to have a ctor, which it does not.
configure_file(
${protobuf_patch}/ReflectionUtil.cs
${protobuf_source}/csharp/src/Google.Protobuf/Reflection/ReflectionUtil.cs
COPYONLY
)
endif()
This diff is collapsed.
......@@ -7,7 +7,7 @@
Distributed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0.</a>
See accompanying <a href="https://gitlab.kitware.com/physiology/engine/blob/master/NOTICE">NOTICE</a> file for details.
For the latest new visit our <a href="https://blog.kitware.com/tag/pulse/">blog</a>
For the latest news visit our <a href="https://blog.kitware.com/tag/pulse/">blog</a>
There are @ref published on several systems and clinical scenarios.
......
......@@ -246,7 +246,7 @@ void PulseEngineC::SetupDefaultDataRequests()
eng->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("OxygenSaturation");
eng->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("EndTidalCarbonDioxidePressure", PressureUnit::mmHg);
eng->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("RespirationRate", FrequencyUnit::Per_min);
eng->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("SkinTemperature", TemperatureUnit::C);
eng->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("CoreTemperature", TemperatureUnit::C);
SESubstance* CO2 = eng->GetSubstanceManager().GetSubstance("CarbonDioxide");
eng->GetEngineTracker()->GetDataRequestManager().CreateGasCompartmentDataRequest("Carina",*CO2,"PartialPressure", PressureUnit::mmHg);
eng->GetEngineTracker()->GetDataRequestManager().CreatePhysiologyDataRequest("BloodVolume", VolumeUnit::mL);
......
......@@ -4,5 +4,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/guava-26.0-jre.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/gson-2.8.5.jar"/>
<classpathentry kind="var" path="SOURCE_DIR/jar/error_prone_annotations-2.3.2.jar"/>
<classpathentry kind="output" path="build/java"/>
</classpath>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment