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

This passes locally.

parent 92f84221
No related branches found
No related tags found
No related merge requests found
......@@ -9,18 +9,18 @@ endif(POLICY CMP0048)
# version file. If GIT fails, use the previous known version.
find_program(GIT_EXEC "git")
message( STATUS "Looking for git ${GIT_EXEC}" )
if(VERSION_MOOSE)
message( STATUS "MOOSE version is set to ${VERSION_MOOSE} at build time" )
if(VERSION)
message( STATUS "MOOSE version is set to ${VERSION} at build time" )
elseif(GIT_EXEC)
message( STATUS "Getting version by reading git tags" )
execute_process(
COMMAND ${GIT_EXEC} describe --tags --long
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE VERSION_MOOSE
OUTPUT_VARIABLE VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif( )
message( STATUS "Building version ${VERSION_MOOSE}" )
message( STATUS "Building version ${VERSION}" )
# Prefix
message( STATUS "CMAKE_INSTALL_PREFIX= ${CMAKE_INSTALL_PREFIX}" )
......@@ -66,7 +66,8 @@ configure_file(
${PYMOOSE_BUILD_DIR}/build_moose-core.sh
)
# Build pymoose module.
# Build pymoose module, create bdist and and unarchive the bdist to
# PYMOOSE_INSTALL_DIR.
add_custom_target( moose-core DEPENDS ${OUTPUT_MOOSEBIN} )
add_custom_command( OUTPUT ${OUTPUT_MOOSEBIN}
COMMAND ${PYMOOSE_BUILD_DIR}/build_moose-core.sh
......@@ -74,6 +75,12 @@ add_custom_command( OUTPUT ${OUTPUT_MOOSEBIN}
COMMENT "Building pymoose in ${PYMOOSE_BUILD_DIR}"
VERBATIM
)
add_custom_command( TARGET moose-core POST_BUILD
COMMAND ${CMAKE_COMMAND} -E chdir ${PYMOOSE_INSTALL_DIR} tar xvf
${PYMOOSE_BUILD_DIR}/bdist/pymoose-${VERSION}.CMAKE.tar.gz
COMMENT "Unarchiving pymoose bdist"
VERBATIM
)
if(WITH_GUI)
# Now build moose-gui and moose-examples.
......@@ -135,7 +142,7 @@ add_custom_target(uninstall DEPENDS __uninstall_moose-core__ )
add_custom_command(OUTPUT __uninstall_moose-core__
COMMAND xargs rm -rf < install_manifest.txt
COMMAND pip uninstall -y moose
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_INSTALL_PREFIX}/bin/moose.bin
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_INSTALL_PREFIX}/bin/moosegui
)
if(WITH_GUI)
......
......@@ -7,10 +7,6 @@ set -e
# will play well with cmake. CMAKE replaces @FOO@ and ${FOO} with cmake variable
# values.
if [ ! -n "$MAKE" ]; then
MAKE=make -j4
fi
echo "Building pymoose and creating bdist."
export GSL_ROOT_DIR=@GSL_ROOT_DIR@
export HDF5_ROOT=@HDF5_ROOT@
......@@ -19,10 +15,10 @@ cmake -DCMAKE_INSTALL_PREFIX=@PYMOOSE_INSTALL_DIR@ \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_BOOST=@WITH_BOOST@ \
-DPYTHON_EXECUTABLE=@PYTHON_EXECUTABLE@ \
-DVERSION_MOOSE=@MOOSE_VERSION@ \
-DPYMOOSE_BDIST_DIR=@PYMOOSE_BDIST_DIR@ \
-DVERSION_MOOSE=@VERSION@ \
@CMAKE_PYMOOSE_ARGS@ \
@PYMOOSE_SOURCE_DIR@
$MAKE
make -j3
ctest --output-on-failure || echo "Some tests failed"
$MAKE bdist VERBOSE=1
make bdist
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