Skip to content

Commit d7c9382

Browse files
author
Dilawar Singh
committed
Fixed revision issue.
1 parent 1c1bbe0 commit d7c9382

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ endif(COMMAND cmake_policy)
1111

1212
project(MOOSE)
1313

14+
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
1415
include(CheckCXXCompiler.cmake)
1516
include(CheckIncludeFileCXX)
1617
include(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}" )
3338
elseif(MOOSE_VERSION)
3439
message(STATUS "+ Using user specified VERSION = ${MOOSE_VERSION}" )
3540
else()
3641
message(FATAL_ERROR "Could not determine MOOSE_VERSION" )
3742
endif( )
43+
3844
add_definitions( -DMOOSE_VERSION="${MOOSE_VERSION}")
3945
message( STATUS "MOOSE Version ${MOOSE_VERSION}" )
4046

@@ -98,9 +104,6 @@ option(WITH_MPI "Enable Openmpi support" OFF)
98104
option(WITH_BOOST "Use boost library instead of GSL" OFF)
99105
option(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

Comments
 (0)