Skip to content

Commit

Permalink
Fix CMake warning: remove OLD behavior for policy CMP0005
Browse files Browse the repository at this point in the history
The OLD behavior for policy CMP0005 will be removed from a future version of CMake.

Signed-off-by: Steffen Pankratz <[email protected]>
  • Loading branch information
kratz00 authored and icculus committed Jun 24, 2023
1 parent 601fe66 commit 750ad58
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ ELSE(NOT BEOS)
PROJECT(MojoSetup CXX)
ENDIF(NOT BEOS)

# !!! FIXME: correct this to new policy and bump minimum cmake requirement.
IF(COMMAND CMAKE_POLICY)
# Use old policy when it comes to escaping macros,
# Specifically the one in quotes below.
CMAKE_POLICY(SET CMP0005 OLD)
ENDIF(COMMAND CMAKE_POLICY)


EXECUTE_PROCESS(
COMMAND hg tip --template hg-{rev}:{node|short}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
Expand Down Expand Up @@ -92,13 +84,13 @@ IF(NOT MOJOSETUP_HAVE_RESTRICT_KEYWORD)
#IF(MOJOSETUP_HAVE_GNU_RESTRICT_KEYWORD)
# ADD_DEFINITIONS(-Drestrict=__restrict__)
#ELSE(MOJOSETUP_HAVE_GNU_RESTRICT_KEYWORD)
ADD_DEFINITIONS("-Drestrict=\"\"")
ADD_DEFINITIONS(-Drestrict="")
#ENDIF(MOJOSETUP_HAVE_GNU_RESTRICT_KEYWORD)
ENDIF(NOT MOJOSETUP_HAVE_RESTRICT_KEYWORD)

ADD_DEFINITIONS(-D__MOJOSETUP__=1)
ADD_DEFINITIONS(-DAPPID=mojosetup)
ADD_DEFINITIONS(-DAPPREV="${MOJOSETUP_VERSION}")
ADD_DEFINITIONS(-DAPPREV=${MOJOSETUP_VERSION})
ADD_DEFINITIONS(-D_REENTRANT)
ADD_DEFINITIONS(-D_THREAD_SAFE)

Expand Down

0 comments on commit 750ad58

Please sign in to comment.