@@ -11,9 +11,11 @@ endif(COMMAND cmake_policy)
1111
1212project (MOOSE)
1313
14+ set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake_modules" )
1415include (CheckCXXCompiler.cmake)
1516include (CheckIncludeFileCXX)
1617include (FindPkgConfig)
18+ include (GetRevision)
1719
1820# If from command line, version info is not passed, use the git to generate a
1921# version file. If GIT fails, use the previous known version.
@@ -27,14 +29,18 @@ if( (NOT MOOSE_VERSION) AND GIT_EXEC)
2729 OUTPUT_VARIABLE MOOSE_VERSION
2830 OUTPUT_STRIP_TRAILING_WHITESPACE
2931 )
30- elseif ( (NOT MOOSE_VERSION) AND (NOT GIT_EXEC) )
32+ endif ( )
33+
34+ # Default to current date.
35+ if ( (NOT MOOSE_VERSION) )
3136 NOW(TIMESTAMP)
3237 set (MOOSE_VERSION "nightly-${TIMESTAMP} " )
3338elseif (MOOSE_VERSION)
3439 message (STATUS "+ Using user specified VERSION = ${MOOSE_VERSION} " )
3540else ()
3641 message (FATAL_ERROR "Could not determine MOOSE_VERSION" )
3742endif ( )
43+
3844add_definitions ( -DMOOSE_VERSION="${MOOSE_VERSION} " )
3945message ( STATUS "MOOSE Version ${MOOSE_VERSION} " )
4046
@@ -98,9 +104,6 @@ option(WITH_MPI "Enable Openmpi support" OFF)
98104option (WITH_BOOST "Use boost library instead of GSL" OFF )
99105option (WITH_GSL "Use gsl-library. Alternative is WITH_BOOST" ON )
100106
101- ################################# CMKAE MACROS #################################
102-
103- set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake_modules" )
104107
105108############################ BUILD CONFIGURATION #################################
106109
0 commit comments