Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,3 @@ before_script:
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.ci/travis_build_osx.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.ci/travis_build_linux.sh; fi

after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then\
mkdir _sdist && cd _sdist && cmake .. && make sdist && make upload_test;\
fi
21 changes: 10 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ if(WITH_ASAN AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address")
endif()

if(WITH_GSL)
set(WITH_BOOST OFF)
set(WITH_BOOST_ODE OFF)
elseif(WITH_BOOST)
set(WITH_BOOST_ODE ON)
set(WITH_GSL OFF)
endif()

################################### TARGETS ####################################

link_directories(${CMAKE_BINARY_DIR})
Expand All @@ -112,17 +120,6 @@ add_executable(moose.bin basecode/main.cpp)
################################### SETUP BUILD ################################
# default include paths.
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )

if(WITH_BOOST)
set(WITH_BOOST_ODE ON)
set(WITH_GSL OFF)
endif(WITH_BOOST)

# If using BOOST ODE2 library to solve ODE system, then don't use GSL.
if(WITH_BOOST_ODE)
set(WITH_GSL OFF)
endif(WITH_BOOST_ODE)

set_target_properties(libmoose PROPERTIES COMPILE_DEFINITIONS "MOOSE_LIB")
set_target_properties(libmoose PROPERTIES PREFIX "")

Expand Down Expand Up @@ -235,6 +232,7 @@ add_subdirectory(benchmarks)
add_subdirectory(kinetics)
add_subdirectory(synapse)
add_subdirectory(intfire)
add_subdirectory(external/libsoda)

###################################### LINKING #################################
list(APPEND MOOSE_LIBRARIES
Expand All @@ -255,6 +253,7 @@ list(APPEND MOOSE_LIBRARIES
signeur
diffusion
ksolve
lsoda
device
basecode
)
Expand Down
17 changes: 17 additions & 0 deletions basecode/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,22 @@ namespace moose {
if( p.size() == 0 )
return true;

#ifdef USE_BOOST_FILESYSTEM
try
{
boost::filesystem::path pdirs( p );
boost::filesystem::create_directories( pdirs );
LOG( moose::info, "Created directory " << p );
return true;
}
catch(const boost::filesystem::filesystem_error& e)
{
LOG( moose::warning, "create_directories(" << p << ") failed with "
<< e.code().message()
);
return false;
}
#else /* ----- not USE_BOOST_FILESYSTEM ----- */
string command( "mkdir -p ");
command += p;
int ret = system( command.c_str() );
Expand All @@ -163,6 +179,7 @@ namespace moose {
LOG( moose::warning, p << " is no directory" );
return false;
}
#endif /* ----- not USE_BOOST_FILESYSTEM ----- */
return true;
}

Expand Down
7 changes: 6 additions & 1 deletion basecode/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
#include <sstream>
#include <valarray>

#include "../randnum/RNG.h" /* Use inbuilt rng */

#ifdef USE_BOOST_FILESYSTEM
#include <boost/filesystem.hpp>
#endif

#include "randnum/RNG.h" /* Use inbuilt rng */
#include "../utility/print_function.hpp"

using namespace std;
Expand Down
7 changes: 3 additions & 4 deletions basecode/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ int testIndex = 0;
f; \
cout << std::right << " [DONE]" << endl; \

extern void testSync();
extern void testAsync();
extern void testSyncArray( unsigned int size, unsigned int method );
extern void testShell();
Expand Down Expand Up @@ -67,9 +66,9 @@ extern void testSigNeurProcess();
extern unsigned int initMsgManagers();
extern void destroyMsgManagers();
// void regressionTests();
#endif
extern void speedTestMultiNodeIntFireNetwork(
unsigned int size, unsigned int runsteps );
#endif // DO_UNIT_TESTS

extern void speedTestMultiNodeIntFireNetwork(unsigned int size, unsigned int runsteps);

#ifdef USE_SMOLDYN
extern void testSmoldyn();
Expand Down
12 changes: 7 additions & 5 deletions biophysics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ cmake_minimum_required(VERSION 2.8)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CheckCXXCompiler.cmake)

if(WITH_GSL)
find_package(GSL 1.16)
include_directories(${GSL_INCLUDE_DIRS})
elseif(WITH_BOOST_ODE)
find_package(Boost)
include_directories(${Boost_INCLUDE_DIRS})
endif(WITH_GSL)

set(BIOPHYSICS_SRCS
Expand Down Expand Up @@ -32,7 +36,6 @@ set(BIOPHYSICS_SRCS
ReadSwc.cpp
SynChan.cpp
NMDAChan.cpp
testBiophysics.cpp
IzhikevichNrn.cpp
DifShellBase.cpp
DifShell.cpp
Expand All @@ -48,10 +51,9 @@ set(BIOPHYSICS_SRCS
MarkovSolver.cpp
VClamp.cpp
Spine.cpp
MarkovOdeSolver.cpp
testBiophysics.cpp
)

if(WITH_GSL)
list(APPEND BIOPHYSICS_SRCS MarkovGslSolver.cpp)
endif(WITH_GSL)
add_library(biophysics ${BIOPHYSICS_SRCS})

add_library( biophysics ${BIOPHYSICS_SRCS} )
Loading