From 29c25c1da555693ec5876e662744a979304c30b7 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Sun, 11 Jun 2017 16:23:03 +0200 Subject: [PATCH] Fix deprecated CMake TARGET/LOCATION property --- CMakeLists.txt | 3 --- doc/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e6675ae67..4de7411c24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,9 +29,6 @@ if(COMMAND cmake_policy) if(POLICY CMP0053) cmake_policy(SET CMP0053 OLD) # Simplify variable reference and escape sequence evaluation. endif() - if(POLICY CMP0026) - cmake_policy(SET CMP0026 OLD) # Allow using the LOCATION target property. - endif() if(POLICY CMP0037) cmake_policy(SET CMP0037 OLD) # Allow defining target "test" endif() diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index c2c7c48430..875deec6aa 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -29,7 +29,7 @@ FIND_PACKAGE(Doxygen) # documentation_performance_html # -------------------------------- if(TARGET mrpt-perfdata2html) - GET_TARGET_PROPERTY(PERF2HTML_GENERATED_EXE mrpt-perfdata2html LOCATION) + SET(PERF2HTML_GENERATED_EXE "$") add_custom_target(documentation_performance_html COMMAND ${PERF2HTML_GENERATED_EXE} "${MRPT_SOURCE_DIR}/doc/perf-data/" WORKING_DIRECTORY ${MRPT_SOURCE_DIR}/ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cfcc7b9d25..0860b78725 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -91,7 +91,7 @@ ENDIF () # Run it: - GET_TARGET_PROPERTY(GENERATED_EXE test_${_TSTLIB} LOCATION) + SET(GENERATED_EXE "$") ADD_CUSTOM_TARGET(run_tests_${_TSTLIB} COMMAND "${GENERATED_EXE}") ADD_DEPENDENCIES(run_tests_${_TSTLIB} test_${_TSTLIB}) ADD_DEPENDENCIES(test run_tests_${_TSTLIB})