Skip to content

Commit

Permalink
Use new behavior for CMP0053: it leads to the same results and is bet…
Browse files Browse the repository at this point in the history
…ter for forward compatibility of cmake.
  • Loading branch information
sgielen committed Dec 7, 2015
1 parent a2aefc3 commit 479da6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function(generate_version_h TARGET VERSION)
# constant rebuild of all files that depend on it
cmake_policy(PUSH)
if( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER "3.0")
cmake_policy(SET CMP0053 OLD)
cmake_policy(SET CMP0053 NEW)
endif()
file(WRITE ${CMAKE_BINARY_DIR}/${TARGET}_version.h.in
"\#define @TARGET@_VERSION \"@VERSION@\"\n"
Expand Down Expand Up @@ -56,7 +56,7 @@ endfunction()
function(generate_git_version_h TARGET VERSION)
cmake_policy(PUSH)
if( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER "3.0")
cmake_policy(SET CMP0053 OLD)
cmake_policy(SET CMP0053 NEW)
endif()
get_git_version(GIT_VERSION)
file(WRITE ${CMAKE_BINARY_DIR}/${TARGET}_version.h.in
Expand Down

0 comments on commit 479da6b

Please sign in to comment.