Skip to content

Commit

Permalink
Merge pull request #7176 from nyalldawson/cmp0040
Browse files Browse the repository at this point in the history
Don't use old policy for CMP0040
  • Loading branch information
m-kuhn committed Jun 5, 2018
2 parents b69389b + bd0ec6e commit d9336c2
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions python/CMakeLists.txt
Expand Up @@ -35,12 +35,6 @@ ADD_CUSTOM_TARGET(clean-staged-plugins
COMMAND ${CMAKE_COMMAND} -E remove_directory "${PYTHON_OUTPUT_DIRECTORY}/plugins"
)

IF(POLICY CMP0040) # in CMake 3.0.0+
# Skip 'TARGET signature of add_custom_command() must exist' warning, triggered by macro expansion
CMAKE_POLICY (PUSH) # see POP below (NOTE: must wrap related macros, which record policies)
CMAKE_POLICY (SET CMP0040 OLD) # temporary policy for staging/py_compile macros
ENDIF(POLICY CMP0040)

# Macro to byte-compile a target's staged Python resource(s)
MACRO(PY_COMPILE TARGET_NAME RESOURCE_PATHS)
IF(WITH_PY_COMPILE)
Expand Down Expand Up @@ -73,10 +67,6 @@ ADD_SUBDIRECTORY(pyplugin_installer)
ADD_SUBDIRECTORY(ext-libs)
ADD_SUBDIRECTORY(testing)

IF(POLICY CMP0040)
CMAKE_POLICY (POP) # see PUSH above
ENDIF(POLICY CMP0040)

INCLUDE_DIRECTORIES(SYSTEM
${PYTHON_INCLUDE_PATH}
${SIP_INCLUDE_DIR}
Expand Down

0 comments on commit d9336c2

Please sign in to comment.