Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moose
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sahil Moza
moose
Commits
6baece11
Commit
6baece11
authored
8 years ago
by
Dilawar Singh
Browse files
Options
Downloads
Patches
Plain Diff
Builds whole moose project.
parent
625917a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+53
-19
53 additions, 19 deletions
CMakeLists.txt
build_moose_core.sh.in
+7
-4
7 additions, 4 deletions
build_moose_core.sh.in
moose-core/CMakeLists.txt
+1
-1
1 addition, 1 deletion
moose-core/CMakeLists.txt
moose-core/VERSION
+1
-1
1 addition, 1 deletion
moose-core/VERSION
with
62 additions
and
25 deletions
CMakeLists.txt
+
53
−
19
View file @
6baece11
...
...
@@ -2,8 +2,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT
(
MOOSE
)
set
(
MOOSE_VERSION
"3.1.1"
)
include
(
ExternalProject
)
# Options to pass down to moose-core
option
(
WITH_DOC
"Build documentation"
OFF
)
...
...
@@ -12,45 +10,76 @@ option(WITH_BOOST "Use Boost libraries instead of GSL" OFF)
option
(
WITH_CUDA
"Use CUDA/GPU"
OFF
)
option
(
WITH_MPI
"Use MPI"
OFF
)
find_package
(
PythonInterp REQUIRED
)
add_custom_target
(
moose ALL
)
## intialize paths
set
(
MOOSE_CORE_SOURCE_DIR
"
${
CMAKE_SOURCE_DIR
}
/moose-core"
)
set
(
MOOSE_CORE_BUILD_DIR
${
CMAKE_BINARY_DIR
}
/_build_moose_core
)
set
(
MOOSE_CORE_INSTALL_DIR
${
CMAKE_BINARY_DIR
}
/_install_moose_core
)
file
(
MAKE_DIRECTORY
${
MOOSE_CORE_BUILD_DIR
}
)
set
(
DATA_DIR
${
CMAKE_SOURCE_DIR
}
/data
)
set
(
PYMOOSE_SOURCE_DIR
"
${
CMAKE_SOURCE_DIR
}
/moose-core"
)
set
(
PYMOOSE_BUILD_DIR
${
CMAKE_BINARY_DIR
}
/__moose_core_build
)
set
(
PYMOOSE_INSTALL_DIR
${
CMAKE_BINARY_DIR
}
/__moose_core_install
)
set
(
MOOSE_GUI_DIR
${
CMAKE_SOURCE_DIR
}
/moose-gui
)
set
(
MOOSE_GUI_INSTALL_DIR
${
CMAKE_BINARY_DIR
}
/__moose-gui_install
)
set
(
MOOSE_EXAMPLE_DIR
${
CMAKE_SOURCE_DIR
}
/moose-examples
)
set
(
MOOSE_EXAMPLE_INSTALL_DIR
${
CMAKE_BINARY_DIR
}
/__moose-examples_install
)
set
(
OUTPUT_MOOSEBIN
${
MOOSE_CORE_BUILD_DIR
}
/moose.bin
)
file
(
MAKE_DIRECTORY
${
PYMOOSE_BUILD_DIR
}
)
# Its a good target since we can not be sure of python module extension on
# different platform.
set
(
OUTPUT_MOOSEBIN
${
PYMOOSE_BUILD_DIR
}
/moose.bin
)
configure_file
(
${
CMAKE_SOURCE_DIR
}
/build_moose_core.sh.in
${
CMAKE_BINARY_DIR
}
/build_moose_core.sh
)
# Build pymoose module.
add_custom_target
(
moose-core ALL DEPENDS
${
OUTPUT_MOOSEBIN
}
)
add_custom_command
(
OUTPUT
${
OUTPUT_MOOSEBIN
}
COMMAND MAKE=$
(
MAKE
)
bash -c
${
CMAKE_BINARY_DIR
}
/build_moose_core.sh
VERBATIM
)
find_package
(
PythonInterp REQUIRED
)
# Now build moose-gui and moose-examples.
add_custom_target
(
gui ALL
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
MOOSE_GUI_DIR
}
${
MOOSE_GUI_INSTALL_DIR
}
COMMENT
"Building moose-gui"
VERBATIM
)
# Now copy moose-examples.
add_custom_command
(
TARGET gui POST_BUILD
COMAMND
${
CMAKE_COMMAND
}
-E copy_directory
${
MOOSE_EXAMPLE_DIR
}
${
MOOSE_EXAMPLE_INSTALL_DIR
}
VERBATIM
)
add_dependencies
(
moose moose-core gui
)
## moose-gui
## TODO: moose-gui should be a python module.
set
(
MOOSE_GUI_DIR
${
CMAKE_SOURCE_DIR
}
/moose-gui
)
install
(
DIRECTORY
${
MOOSE_
CORE_
INSTALL_DIR
}
/
install
(
DIRECTORY
${
PY
MOOSE_INSTALL_DIR
}
/
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
PATTERN
".git"
EXCLUDE
)
install
(
DIRECTORY
${
MOOSE_GUI_DIR
}
install
(
DIRECTORY
${
MOOSE_GUI_
INSTALL_
DIR
}
DESTINATION
${
CMAKE_INSTALL_PREFIX
}
/lib/moose/gui
PATTERN
".git"
EXCLUDE
)
configure_file
(
${
CMAKE_SOURCE_DIR
}
/cmake/moose.in
${
CMAKE_BINARY_DIR
}
/moose
)
install
(
PROGRAMS
${
CMAKE_
B
IN
ARY_DIR
}
/moose
DESTINATION bin
install
(
DIRECTORY
${
MOOSE_EXAMPLE_DIR
}
DESTINATION
${
CMAKE_IN
STALL_PREFIX
}
PATTERN
".git"
EXCLUDE
)
configure_file
(
${
CMAKE_SOURCE_DIR
}
/cmake/moose.in
${
CMAKE_BINARY_DIR
}
/moose
)
install
(
PROGRAMS
${
CMAKE_BINARY_DIR
}
/moose DESTINATION bin
)
## UNINSTALL
add_custom_target
(
uninstall
DEPENDS __uninstall_moose-core__ __uninstall_moose-gui__
...
...
@@ -65,16 +94,21 @@ add_custom_command(OUTPUT __uninstall_moose-core__
add_custom_command
(
OUTPUT __uninstall_moose-gui__
COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
${
CMAKE_INSTALL_PREFIX
}
/lib/moose/gui
COMMAND
${
CMAKE_COMMAND
}
-E remove
${
CMAKE_INSTALL_PREFIX
}
/bin/moose
gui
COMMAND
${
CMAKE_COMMAND
}
-E remove
${
CMAKE_INSTALL_PREFIX
}
/bin/moose
)
################################################################################
# CTEST
#################################################################################
enable_testing
(
)
add_test
(
NAME test_pymoose_sanity COMMAND
${
PYTHON_EXECUTABLE
}
-c
"import moose"
)
add_test
(
NAME test_moogli_sanity COMMAND
${
PYTHON_EXECUTABLE
}
-c
"import moogli"
)
add_test
(
NAME test_pymoose_sanity
COMMAND
${
PYTHON_EXECUTABLE
}
-c
"import moose"
)
add_test
(
NAME test_gui_sanity
COMMAND
${
PYTHON_EXECUTABLE
}
${
MOOSE_GUI_INSTALL_DIR
}
/mgui.py
WORKING_DIRECTORY
${
MOOSE_GUI_INSTALL_DIR
}
)
set_tests_properties
(
test_pymoose_sanity
test_moogli_sanity
PROPERTIES ENVIRONMENT
"PYTHONPATH=
${
MOOSE_
CORE_
BUILD_DIR
}
/python"
set_tests_properties
(
test_pymoose_sanity
PROPERTIES ENVIRONMENT
"PYTHONPATH=
${
PY
MOOSE_BUILD_DIR
}
/python"
)
This diff is collapsed.
Click to expand it.
build_moose_core.sh.in
+
7
−
4
View file @
6baece11
...
...
@@ -10,10 +10,13 @@ fi
echo
"Building MOOSE"
(
cd
@MOOSE_CORE_BUILD_DIR@
cmake
-DCMAKE_INSTALL_PREFIX
=
@MOOSE_CORE_INSTALL_DIR@
\
@CMAKE_MOOSE_CORE_ARGS@
\
@MOOSE_CORE_SOURCE_DIR@
export
GSL_ROOT_DIR
=
@GSL_ROOT_DIR@
export
HDF5_ROOT
=
@HDF5_ROOT@
cd
@PYMOOSE_BUILD_DIR@
cmake
-DCMAKE_INSTALL_PREFIX
=
@PYMOOSE_INSTALL_DIR@
\
-DCMAKE_BUILD_TYPE
=
Release
\
@CMAKE_PYMOOSE_ARGS@
\
@PYMOOSE_SOURCE_DIR@
$MAKE
ctest
-V
||
echo
"Some tests failed"
$MAKE
install
...
...
This diff is collapsed.
Click to expand it.
moose-core/CMakeLists.txt
+
1
−
1
View file @
6baece11
...
...
@@ -285,7 +285,7 @@ endif(WITH_BOOST)
# these two types because of --whole-archive option. See
# BhallaLab/moose-core#66,
if
(
WITH_GSL
)
message
(
STATUS
"Using
STATIC
gsl libraries:
${
GSL_LIBRARIES
}
"
)
message
(
STATUS
"Using gsl libraries:
${
GSL_LIBRARIES
}
"
)
foreach
(
GSL_LIB
${
GSL_LIBRARIES
}
)
if
(
GSL_LIB
)
get_filename_component
(
GSL_LIB_EXT
${
GSL_LIB
}
EXT
)
...
...
This diff is collapsed.
Click to expand it.
moose-core/VERSION
+
1
−
1
View file @
6baece11
3.1.1-66-gc180075
\ No newline at end of file
3.1.1-67-g5dd1e81
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment