Skip to content

Commit

Permalink
Fix deprecated CMake TARGET/LOCATION property
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jun 11, 2017
1 parent c30d211 commit 29c25c1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$<TARGET_FILE:mrpt-perfdata2html>")
add_custom_target(documentation_performance_html
COMMAND ${PERF2HTML_GENERATED_EXE} "${MRPT_SOURCE_DIR}/doc/perf-data/"
WORKING_DIRECTORY ${MRPT_SOURCE_DIR}/
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ENDIF ()


# Run it:
GET_TARGET_PROPERTY(GENERATED_EXE test_${_TSTLIB} LOCATION)
SET(GENERATED_EXE "$<TARGET_FILE:test_${_TSTLIB}>")
ADD_CUSTOM_TARGET(run_tests_${_TSTLIB} COMMAND "${GENERATED_EXE}")
ADD_DEPENDENCIES(run_tests_${_TSTLIB} test_${_TSTLIB})
ADD_DEPENDENCIES(test run_tests_${_TSTLIB})
Expand Down

0 comments on commit 29c25c1

Please sign in to comment.