Commit 479a8f0b authored by fmg005's avatar fmg005

modified cmd cmake file to use target_include_directories function

parent 75df6c9b
cmake_minimum_required(VERSION 3.9.4)
list(APPEND CMAKE_MODULE_PATH "/home/farooq/Programming/pulse/builds/install")
project(cmd)
find_path(CONFIG++_INCLUDE_DIR libconfig.h++ /usr/include /usr/local/include)
find_library(CONFIG++_LIBRARY NAMES config++ PATH /usr/lib /usr/local/lib)
include_directories(include)
# source files directory -> handle multiple controllers
set(CMD_SRC_DIR src)
set(CMD_SRC_DIR src_ctrl2)
# source files
set(MY_SOURCE_FILES
......@@ -25,23 +25,16 @@ set(MY_SOURCE_FILES
add_executable(cmd ${MY_SOURCE_FILES})
## This is how you connect that executable to Pulse
# Find the Pulse package
# Again, set Pulse_DIR to the install directory with the PulseConfig.cmake file, or make the developer set this when building the code
find_package(Pulse REQUIRED NO_MODULE) # If you don't, CMake will halt here
# You will now have access to all the variables set in the PulseConfig.cmake in the Pulse install directory
# Go open it and look through to see what you have
find_package(Pulse REQUIRED NO_MODULE)
#include directories
target_include_directories(cmd PRIVATE ${Pulse_INCLUDE_DIRS})
target_include_directories(cmd PRIVATE ${CONFIG++_INCLUDE_DIR})
# Some debug libraries have different names than the release libs
target_include_directories(cmd PRIVATE include/)
#libraries
target_link_libraries(cmd debug "${Pulse_DEBUG_LIBS}")
target_link_libraries(cmd optimized "${Pulse_LIBS}")
target_link_libraries(cmd optimized "${CONFIG++_LIBRARY}")
# That is it, your program is now linked to Pulse
install(TARGETS cmd RUNTIME DESTINATION ${Pulse_INSTALL}/bin)
......@@ -85,7 +85,7 @@ int main(){
t1 = clock();
Simulation("Gus");
Simulation("Jeff");
t2 = clock();
......
......@@ -12,12 +12,12 @@ Controller::Controller(CMD::Environment* env, PhysiologyData* data, std::map<str
// Initalize algorithm configuration variables
currentNorepiInfusionRate = 0;
SalineInfusionRate = 75.0;
maxNorepinephrineInfusionRate = 112.5;
SalineInfusionRate = 50.0;
maxNorepinephrineInfusionRate = 84;
targetMAPRangeMax = 80.0;
targetMAPRangeMin = 75.0;
MAPIncreaseThreshold = 85;
percentOfRate = 0;
MAPIncreaseThreshold = 80;
percentOfRate = 0.875;
currentMAP = 0;
/* The first action the controller should take is initialize infusions */
......
......@@ -85,7 +85,7 @@ int main(){
t1 = clock();
Simulation("Gus");
Simulation("ExtremeFemale");
t2 = clock();
......
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