Skip to content
Permalink
Browse files

Merge pull request #7176 from nyalldawson/cmp0040

Don't use old policy for CMP0040
  • Loading branch information
m-kuhn committed Jun 5, 2018
2 parents b69389b + bd0ec6e commit d9336c24e7f7f7ef5735cea9304f687f19bc58d6
Showing with 0 additions and 10 deletions.
  1. +0 −10 python/CMakeLists.txt
@@ -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)
@@ -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}

0 comments on commit d9336c2

Please sign in to comment.
You can’t perform that action at this time.