Skip to content
Snippets Groups Projects
Commit ac2b19f1 authored by Dilawar Singh's avatar Dilawar Singh
Browse files

Merge branch 'master' of https://github.com/BhallaLab/moose

parents cbb80549 9be7ccd4
No related branches found
No related tags found
No related merge requests found
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(moose)
## Default install prefix. When building packages, such as on launchpad, we need
## to modify installation prefix.
if(DEVELOPER)
option(CMAKE_INSTALL_PREFIX "Install prefix" ${CMAKE_BINARY_DIR}/_install)
else()
option(CMAKE_INSTALL_PREFIX "Install prefix" /usr)
endif()
PROJECT(moose-all)
## intialize paths
set(MOOSE_CORE_DIR "${CMAKE_SOURCE_DIR}/moose-core")
set(MOOSE_CORE_BUILD_DIR ${CMAKE_BINARY_DIR}/_build_moose_core)
set(MOOSE_CORE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
FILE(MAKE_DIRECTORY ${MOOSE_CORE_BUILD_DIR})
set(DATA_DIR ${CMAKE_SOURCE_DIR}/data)
include(ExternalProject)
message("[INFO] Installtion directory is ${CMAKE_INSTALL_PREFIX}")
ExternalProject_Add( moose-core
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/__moose-core
SOURCE_DIR ${MOOSE_CORE_DIR}
# Extremely useful in packaging
#BINARY_DIR ${MOOSE_CORE_INSTALL_DIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
TEST_COMMAND ctest --output-on-failure
TEST_BEFORE_INSTALL 1
BUILD_IN_SOURCE 0
)
add_custom_command(OUTPUT __moose_core_built__
COMMAND ${CMAKE_COMMAND}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DDEBUG=OFF
${MOOSE_CORE_DIR}
COMMAND $(MAKE)
WORKING_DIRECTORY ${MOOSE_CORE_BUILD_DIR}
VERBATIM
)
add_custom_target(moose-all ALL
DEPENDS __moose_core_built__
)
install(CODE
"
execute_process(COMMAND ctest --output-on-failure
WORKING_DIRECTORY ${MOOSE_CORE_BUILD_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} install
WORKING_DIRECTORY ${MOOSE_CORE_BUILD_DIR})
"
)
## moose-gui
## TODO: moose-gui should be a python module.
set(MOOSE_GUI_DIR ${CMAKE_SOURCE_DIR}/moose-gui)
set(MOOSE_GUI_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/moose/gui)
add_custom_target(moose-gui ALL)
add_custom_command(TARGET moose-gui
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${MOOSE_GUI_DIR} ${MOOSE_GUI_INSTALL_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${DATA_DIR}/moosegui ${CMAKE_INSTALL_PREFIX}/bin/
install(DIRECTORY ${MOOSE_GUI_DIR}
DESTINATION lib/moose/gui
PATTERN ".git" EXCLUDE
)
install(PROGRAMS ${DATA_DIR}/moosegui
DESTINATION bin
)
## UNINSTALL
add_custom_target(uninstall
DEPENDS __uninstall_moose-core__ __uninstall_moose-gui__
)
add_custom_command(OUTPUT __uninstall_moose-core__
COMMAND make uninstall
WORKING_DIRECTORY ${MOOSE_CORE_BUILD_DIR}
)
add_custom_command(OUTPUT __uninstall_moose-gui__
COMMAND ${CMAKE_COMMAND} -E remove_directory
${CMAKE_INSTALL_PREFIX}/usr/lib/moose
COMMAND ${CMAKE_COMMAND} -R remove ${CMAKE_INSTALL_PREFIX}/bin/moosegui
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
Build Status - master (This is stable branch): [![Build Status - master](https://travis-ci.org/BhallaLab/moose.svg?branch=master)](https://travis-ci.org/BhallaLab/moose)
This is a meta repository of MOOSE simulator. It contains MOOSE, its GUI and
other sister projects a submodule. For more details about these projects, read
respective README files.
This is the meta repository of MOOSE simulator. It contains C++ core of MOOSE,
python scripting interface and its GUI.
# Install
For more details about these projects, read respective README files.
# Installation using cmake
First, run the `bootstrap` script. It will fetch the submodules and/or update
them. You should have `cmake` installed on your system to build and install
moose from this repository.
cmake .
make
sudo make install
To uninstall moose, do the following in the same directory where you ran
previous `make install` command.
sudo make uninstall
#!/bin/bash
# Bootstrap script. Run it to update the repo.
echo "- Updating submodules"
git submodule update --init
git submodule foreach git pull origin master
#!/bin/bash
( cd /usr/share/moose/gui && python mgui.py )
( cd /usr/lib/moose/gui && python mgui.py )
moose-core @ 3e6bf562
Subproject commit 02aabd788aba7cf3650a7751dff80f89c95f9b61
Subproject commit 3e6bf56253d762737a0584bbf8b2fcd8cb1b5eb8
moose-gui @ ee905e56
Subproject commit 46c19805bcb0b90c7fecdfa869dc37d304b0d6b7
Subproject commit ee905e56abb794c47cb0aabbb16010ac55b89e9d
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