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

Squashed 'moose-core/' changes from 74b43c3..815a79a

815a79a Fixed the VERSION file creation.

git-subtree-dir: moose-core
git-subtree-split: 815a79a9db1bbae73636a61ff77c5f347cb2255d
parent 36ca236d
No related branches found
No related tags found
No related merge requests found
...@@ -20,22 +20,22 @@ include(FindPkgConfig) ...@@ -20,22 +20,22 @@ include(FindPkgConfig)
set(VERSION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/VERSION) set(VERSION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/VERSION)
find_program(GIT_EXEC "git") find_program(GIT_EXEC "git")
message( STATUS "Looking for git ${GIT_EXEC}" ) message( STATUS "Looking for git ${GIT_EXEC}" )
if( (NOT _MOOSE_VERSION) AND GIT_EXEC) if( (NOT MOOSE_VERSION) AND GIT_EXEC)
execute_process( execute_process(
COMMAND ${GIT_EXEC} describe --tags --long COMMAND ${GIT_EXEC} describe --tags --long
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE _MOOSE_VERSION OUTPUT_VARIABLE MOOSE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
elseif(_MOOSE_VERSION) elseif(MOOSE_VERSION)
message(STATUS "+ Using user specified VERSION = ${_MOOSE_VERSION}" ) message(STATUS "+ Using user specified VERSION = ${MOOSE_VERSION}" )
file(WRITE ${VERSION_FILE} ${_MOOSE_VERSION}) file(WRITE ${VERSION_FILE} ${MOOSE_VERSION})
else( ) else( )
message(FATAL_ERROR "Could not determine _MOOSE_VERSION" ) message(FATAL_ERROR "Could not determine MOOSE_VERSION" )
endif( ) endif( )
add_definitions( -DMOOSE_VERSION="${_MOOSE_VERSION}") add_definitions( -DMOOSE_VERSION="${MOOSE_VERSION}")
message( STATUS "MOOSE Version ${_MOOSE_VERSION}" ) message( STATUS "MOOSE Version ${MOOSE_VERSION}" )
# This snippet is from LLVM project. # This snippet is from LLVM project.
# Sanity check our source directory to make sure that we are not trying to # Sanity check our source directory to make sure that we are not trying to
......
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