From cd47f9b1a2c407b676cb115b6ae7fbf3547ca21a Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 5 Nov 2017 11:25:08 -0800 Subject: [PATCH] Add an IDE-friendly CMake target This adds the target build_root, which is a target that installs fish into a directory under the build path. --- CMakeFiles/Install.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeFiles/Install.cmake b/CMakeFiles/Install.cmake index 0d7180095..bcf486bc0 100644 --- a/CMakeFiles/Install.cmake +++ b/CMakeFiles/Install.cmake @@ -184,3 +184,9 @@ SET_PROPERTY(TARGET CHECK-FISH-BUILD-VERSION-FILE build_fish_pc test_prep tests_buildroot_target build_lexicon_filter PROPERTY FOLDER cmake/InstallTargets) + +# Make a target build_root that installs into the buildroot directory, for testing. +SET(BUILDROOT_DIR ${CMAKE_CURRENT_BINARY_DIR}/buildroot) +ADD_CUSTOM_TARGET(build_root + COMMAND DESTDIR=${BUILDROOT_DIR} ${CMAKE_COMMAND} + --build ${CMAKE_CURRENT_BINARY_DIR} --target install)