mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-26 17:16:20 +00:00
Changed: Don't generate revision.h anymore
--HG-- branch : develop
This commit is contained in:
parent
520eb941b1
commit
2fa0544912
4 changed files with 0 additions and 71 deletions
|
@ -94,7 +94,6 @@ NL_SETUP_BUILD_FLAGS()
|
|||
#Platform specifics
|
||||
|
||||
SETUP_EXTERNAL()
|
||||
NL_GEN_REVISION_H()
|
||||
|
||||
IF(WIN32)
|
||||
SET(WINSOCK2_LIB ws2_32.lib)
|
||||
|
|
|
@ -72,12 +72,3 @@ IF(SOURCE_DIR AND NOT DEFINED REVISION)
|
|||
MESSAGE(STATUS "Read revision ${REVISION} from file")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(SOURCE_DIR AND DEFINED REVISION)
|
||||
IF(EXISTS ${SOURCE_DIR}/revision.h.in)
|
||||
MESSAGE(STATUS "Revision: ${REVISION}")
|
||||
NOW(BUILD_DATE)
|
||||
CONFIGURE_FILE(${SOURCE_DIR}/revision.h.in revision.h.txt)
|
||||
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy revision.h.txt revision.h) # copy_if_different
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
|
|
@ -20,60 +20,6 @@ MACRO(NL_GEN_PC name)
|
|||
ENDIF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
||||
ENDMACRO(NL_GEN_PC)
|
||||
|
||||
###
|
||||
# Helper macro that generates revision.h from revision.h.in
|
||||
###
|
||||
MACRO(NL_GEN_REVISION_H)
|
||||
IF(EXISTS ${CMAKE_SOURCE_DIR}/revision.h.in)
|
||||
SET(TOOL_FOUND OFF)
|
||||
|
||||
IF(EXISTS "${CMAKE_SOURCE_DIR}/../.svn/")
|
||||
FIND_PACKAGE(Subversion)
|
||||
|
||||
IF(SUBVERSION_FOUND)
|
||||
SET(TOOL_FOUND ON)
|
||||
ENDIF(SUBVERSION_FOUND)
|
||||
ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/../.svn/")
|
||||
|
||||
IF(EXISTS "${CMAKE_SOURCE_DIR}/../.hg/")
|
||||
FIND_PACKAGE(Mercurial)
|
||||
|
||||
IF(MERCURIAL_FOUND)
|
||||
SET(TOOL_FOUND ON)
|
||||
ENDIF(MERCURIAL_FOUND)
|
||||
ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/../.hg/")
|
||||
|
||||
# if already generated
|
||||
IF(EXISTS ${CMAKE_SOURCE_DIR}/revision.h)
|
||||
# copy it
|
||||
MESSAGE(STATUS "Copying provided revision.h...")
|
||||
FILE(COPY ${CMAKE_SOURCE_DIR}/revision.h DESTINATION ${CMAKE_BINARY_DIR})
|
||||
SET(HAVE_REVISION_H ON)
|
||||
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/revision.h)
|
||||
|
||||
IF(TOOL_FOUND)
|
||||
# a custom target that is always built
|
||||
ADD_CUSTOM_TARGET(revision ALL
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DSOURCE_DIR=${CMAKE_SOURCE_DIR}
|
||||
-DROOT_DIR=${CMAKE_SOURCE_DIR}/..
|
||||
-DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/CMakeModules
|
||||
-P ${CMAKE_SOURCE_DIR}/CMakeModules/GetRevision.cmake)
|
||||
|
||||
# revision.h is a generated file
|
||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/revision.h
|
||||
PROPERTIES GENERATED TRUE
|
||||
HEADER_FILE_ONLY TRUE)
|
||||
SET(HAVE_REVISION_H ON)
|
||||
ENDIF(TOOL_FOUND)
|
||||
|
||||
IF(HAVE_REVISION_H)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
|
||||
ADD_DEFINITIONS(-DHAVE_REVISION_H)
|
||||
ENDIF(HAVE_REVISION_H)
|
||||
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/revision.h.in)
|
||||
ENDMACRO(NL_GEN_REVISION_H)
|
||||
|
||||
###
|
||||
#
|
||||
###
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef REVISION_H
|
||||
#define REVISION_H
|
||||
|
||||
#cmakedefine REVISION "${REVISION}"
|
||||
#cmakedefine BUILD_DATE "${BUILD_DATE}"
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue