Commit b70ecfea authored by Mohcine Chraibi's avatar Mohcine Chraibi

Port vs Brew configs

parent 4f89900b
......@@ -111,18 +111,44 @@ if(DOXYGEN_FOUND)
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)
#http://stackoverflow.com/questions/1487752/how-do-i-instruct-cmake-to-look-for-libraries-installed-by-macports
if(APPLE)
# Detect if the "port" command is valid on this system; if so, return full path
execute_process(COMMAND which port RESULT_VARIABLE DETECT_MACPORTS OUTPUT_VARIABLE MACPORTS_PREFIX ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if (${DETECT_MACPORTS} EQUAL 0)
# "/opt/local/bin/port" doesn't have libs, so we get the parent directory
get_filename_component(MACPORTS_PREFIX ${MACPORTS_PREFIX} DIRECTORY)
# "/opt/local/bin" doesn't have libs, so we get the parent directory
get_filename_component(MACPORTS_PREFIX ${MACPORTS_PREFIX} DIRECTORY)
# "/opt/local" is where MacPorts lives, add `/lib` suffix and link
link_directories(${MACPORTS_PREFIX}/lib)
message(STATUS "Macports detected: ${MACPORTS_PREFIX}/lib")
# SET(CMAKE_SYSTEM_NAME Darwin)
# # Add MacPorts
# INCLUDE_DIRECTORIES(/opt/local/include)
# LINK_DIRECTORIES(/opt/local/lib)
SET(CMAKE_SYSTEM_NAME Darwin)
else()
# Recommendation, also add a "brew --prefix" custom command to detect a homebrew build environment
execute_process(COMMAND brew --prefix RESULT_VARIABLE DETECT_BREW OUTPUT_VARIABLE BREW_PREFIX ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${DETECT_BREW} EQUAL 0)
link_directories(${BREW_PREFIX})
message(STATUS "Brew detected: ${BREW_PREFIX}")
endif()
endif()
endif(APPLE)
# Add MacPorts
INCLUDE_DIRECTORIES(/opt/local/include)
LINK_DIRECTORIES(/opt/local/lib)
#set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib)
#set(Boost_INCLUDE_DIR /opt/local/include/boost)
#set(Boost_LIBRARY_DIR /usr/local/src/boost_1_46_1/stage/lib)
# in case boost is a non-default location
# SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:/win32libs/boost")
# SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:/win32libs/boost/lib")
find_package(Boost REQUIRED )
#include_directories(${Boost_INCLUDE_DIR})
# find the correct OpenMP flag
FIND_PACKAGE(OpenMP)
......@@ -387,8 +413,14 @@ add_library ( core STATIC ${source_files} )
add_executable( jpscore main.cpp )
if(Boost_FOUND)
message(STATUS "BOOST FOUND: " ${Boost_LIBRARIES})
target_link_libraries(jpscore ${Boost_LIBRARIES})
message(STATUS "BOOST FOUND: " ${Boost_LIBRARIES})
message(STATUS "Boost_LIBRARY_DIRS: " ${Boost_LIBRARY_DIRS})
message(STATUS "Boost_INCLUDE_DIR: " ${Boost_INCLUDE_DIR})
message(STATUS "Boost_LIB_VERSION: " ${Boost_LIB_VERSION})
link_directories(${Boost_LIBRARY_DIRS})
include_directories(${Boost_INCLUDE_DIR})
# todo: is this necessary?
#target_link_libraries(jpscore ${Boost_LIBRARIES})
endif()
target_link_libraries(jpscore core )
......@@ -397,9 +429,9 @@ if(WIN32)
target_link_libraries (jpscore core wsock32)
endif(WIN32)
if(CGAL_FOUND)
target_link_libraries (jpscore ${CGAL_CORE_LIBRARY})
endif(CGAL_FOUND)
# if(CGAL_FOUND)
# target_link_libraries (jpscore ${CGAL_CORE_LIBRARY})
# endif(CGAL_FOUND)
#protocol buffer
#find_package(Protobuf)
......@@ -522,7 +554,7 @@ if(BUILD_TESTING OR BUILD_CPPUNIT_TEST)
# test if code compiles and runs default setting. Takes about 30 seconds
link_directories(${Boost_LIBRARY_DIRS})
# link_directories(${Boost_LIBRARY_DIRS})
foreach (test_src ${test_files})
GET_FILENAME_COMPONENT(test ${test_src} NAME_WE)
add_executable( ${test} ${test_src})
......@@ -554,4 +586,4 @@ if(BUILD_TESTING)
endif(PYTHONINTERP_FOUND)
endif(BUILD_TESTING)
install (TARGETS jpscore DESTINATION bin)
install (TARGETS jpscore DESTINATION bin)
\ No newline at end of file
......@@ -77,14 +77,15 @@
<!--persons information and distribution -->
<agents operational_model_id="3">
<agents_distribution>
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="50" goal_id="0" router_id="1" x_max="10.1775"/>
<group group_id="2" agent_parameter_id="1" room_id="0" subroom_id="0" number="50" goal_id="1" router_id="1" x_max="10.1775"/>
<group group_id="3" agent_parameter_id="1" room_id="0" subroom_id="0" number="50" goal_id="2" router_id="1" x_min="26.1775"/>
<group group_id="4" agent_parameter_id="1" room_id="0" subroom_id="0" number="50" goal_id="3" router_id="1" x_min="26.1775"/>
<group group_id="1000" agent_parameter_id="1" room_id="0" subroom_id="0" number="5" goal_id="0" router_id="1" x_max="10.1775"/>
<group group_id="2000" agent_parameter_id="1" room_id="0" subroom_id="0" number="5" goal_id="1" router_id="1" x_max="10.1775"/>
<group group_id="3000" agent_parameter_id="1" room_id="0" subroom_id="0" number="5" goal_id="2" router_id="1" x_min="26.1775"/>
<group group_id="4000" agent_parameter_id="1" room_id="0" subroom_id="0" number="5" goal_id="3" router_id="1" x_min="26.1775"/>
</agents_distribution>
<!-- <agents_sources><!-- frequency in persons/seconds -->
<!-- <source id="1" frequency="2" agents_max="20" group_id="1" caption="source 1" /> -->
<!-- </agents_sources> -->
<!-- <agents_sources> -->
<!-- frequency in persons/seconds -->
<!-- <source id="1" frequency="2" agents_max="20" group_id="1" caption="source 1" /> -->
<!-- </agents_sources> -->
</agents>
......
......@@ -46,7 +46,7 @@
</routing>
<!--persons information and distribution -->
<agents operational_model_id="3">
<agents operational_model_id="4">
<agents_distribution>
<group group_id="2" agent_parameter_id="1" room_id="0" subroom_id="0" number="250" goal_id="0" router_id="1"/>
<!-- <group group_id="0" room_id="1" subroom_id="0" number="4" goal_id="0" router_id="1" route_id="" /> -->
......@@ -63,7 +63,7 @@
<model_parameters>
<solver>euler</solver>
<stepsize>0.001</stepsize>
<exit_crossing_strategy>1</exit_crossing_strategy>
<exit_crossing_strategy>6</exit_crossing_strategy>
<linkedcells enabled="true" cell_size="2.2" />
<force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
<force_wall nu="0." dist_max="3" disteff_max="2" interpolation_width="0.1" />
......@@ -105,26 +105,26 @@
</agent_parameters>
</model>
<model operational_model_id="4" description="gradnav">
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>6</exit_crossing_strategy>
<floorfield delta_h="0.0625" wall_avoid_distance="0.5" use_wall_avoidance="true" />
<linkedcells enabled="true" cell_size="4.2" />
<force_ped nu="3" b="1.0" c="3.0" />
<force_wall nu="1" b="0.70" c="3.0" />
<anti_clipping slow_down_distance="1." />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.24" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.1" sigma="0.001" />
</agent_parameters>
</model>
<model operational_model_id="4" description="gradnav">
<model_parameters>
<solver>euler</solver>
<stepsize>0.01</stepsize>
<exit_crossing_strategy>6</exit_crossing_strategy>
<floorfield delta_h="0.0625" wall_avoid_distance="0.5" use_wall_avoidance="true" />
<linkedcells enabled="true" cell_size="4.2" />
<force_ped nu="3" b="1.0" c="3.0" />
<force_wall nu="1" b="0.70" c="3.0" />
<anti_clipping slow_down_distance="1." />
</model_parameters>
<agent_parameters agent_parameter_id="1">
<v0 mu="1.24" sigma="0.0" />
<bmax mu="0.25" sigma="0.001" />
<bmin mu="0.20" sigma="0.001" />
<amin mu="0.18" sigma="0.001" />
<tau mu="0.5" sigma="0.001" />
<atau mu="0.1" sigma="0.001" />
</agent_parameters>
</model>
</operational_models>
<route_choice_models>
......
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