From 10f44a17bab8f36f876fc72b4a26ef01d5d5cfc4 Mon Sep 17 00:00:00 2001
From: Guilherme Amadio <amadio@cern.ch>
Date: Fri, 8 Mar 2019 10:32:22 +0100
Subject: [PATCH] cmake: do not install test files

Tests are only meant to be run during the build,
not to be installed as part of ROOT.
---
 CMakeLists.txt                        |  1 -
 README/INSTALL                        |  2 --
 cmake/modules/RootConfiguration.cmake |  5 -----
 cmake/modules/RootInstallDirs.cmake   | 12 ------------
 config/Makefile.in                    |  1 -
 5 files changed, 21 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd86b11fb6c..26a332c93a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -474,7 +474,6 @@ if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_INSTALL_PREFIX)
      install(DIRECTORY ui5/    DESTINATION ${CMAKE_INSTALL_OPENUI5DIR})
   endif()                             
   install(DIRECTORY man/    DESTINATION ${CMAKE_INSTALL_MANDIR})
-  install(DIRECTORY test/      DESTINATION ${CMAKE_INSTALL_TESTDIR} COMPONENT tests)
   install(DIRECTORY tutorials/ DESTINATION ${CMAKE_INSTALL_TUTDIR} COMPONENT tests)
   install(DIRECTORY cmake/modules DESTINATION ${CMAKE_INSTALL_CMAKEDIR} PATTERN "Find*.cmake" EXCLUDE)
 endif()
diff --git a/README/INSTALL b/README/INSTALL
index 9bd1a70cabe..3074ca9fad8 100644
--- a/README/INSTALL
+++ b/README/INSTALL
@@ -209,8 +209,6 @@ Here's the complete list:
 * docdir (<prefix>/doc/root)
   Documentation, like the LICENCE, README, etc. files will be
   installed into this directory.
-* testdir (<docdir>/test)
-  The test applications and libraries will be installed here.
 * tutdir (<docdir>/tutorial)
   All the tutorials will be installed in this directory.
 
diff --git a/cmake/modules/RootConfiguration.cmake b/cmake/modules/RootConfiguration.cmake
index 2c881356291..a6c74fd3824 100644
--- a/cmake/modules/RootConfiguration.cmake
+++ b/cmake/modules/RootConfiguration.cmake
@@ -115,11 +115,6 @@ if(IS_ABSOLUTE ${CMAKE_INSTALL_DOCDIR})
 else()
   set(docdir ${prefix}/${CMAKE_INSTALL_DOCDIR})
 endif()
-if(IS_ABSOLUTE ${CMAKE_INSTALL_TESTDIR})
-  set(testdir ${CMAKE_INSTALL_TESTDIR})
-else()
-  set(testdir ${prefix}/${CMAKE_INSTALL_TESTDIR})
-endif()
 if(IS_ABSOLUTE ${CMAKE_INSTALL_TUTDIR})
   set(tutdir ${CMAKE_INSTALL_TUTDIR})
 else()
diff --git a/cmake/modules/RootInstallDirs.cmake b/cmake/modules/RootInstallDirs.cmake
index 1031e6571ac..a99b0d48148 100644
--- a/cmake/modules/RootInstallDirs.cmake
+++ b/cmake/modules/RootInstallDirs.cmake
@@ -18,7 +18,6 @@
 #  SRCDIR           - sources (DATAROOTDIR/src)
 #  FONTDIR          - fonts (DATAROOTDIR/fonts)
 #  DOCDIR           - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
-#  TESTDIR          - tests (DOCDIR/test)
 #  TUTDIR           - tutorials (DOCDIR/tutorials)
 #  ACLOCALDIR       - locale-dependent data (DATAROOTDIR/aclocal)
 #  CMAKEDIR         - cmake modules (DATAROOTDIR/cmake)
@@ -204,15 +203,6 @@ if(NOT CMAKE_INSTALL_DOCDIR)
   endif()
 endif()
 
-if(NOT CMAKE_INSTALL_TESTDIR)
-  set(CMAKE_INSTALL_TESTDIR "" CACHE PATH "root tests (DOCDIR/test)")
-  if(gnuinstall)
-    set(CMAKE_INSTALL_TESTDIR "${CMAKE_INSTALL_DOCDIR}/test")
-  else()
-    set(CMAKE_INSTALL_TESTDIR "test")
-  endif()
-endif()
-
 if(NOT CMAKE_INSTALL_TUTDIR)
   set(CMAKE_INSTALL_TUTDIR "" CACHE PATH "root tutorials (DOCDIR/tutorials)")
   if(gnuinstall)
@@ -239,7 +229,6 @@ mark_as_advanced(
   CMAKE_INSTALL_FONTDIR
   CMAKE_INSTALL_SRCDIR
   CMAKE_INSTALL_DOCDIR
-  CMAKE_INSTALL_TESTDIR
   CMAKE_INSTALL_TUTDIR
   CMAKE_INSTALL_ACLOCALDIR
   CMAKE_INSTALL_ELISPDIR
@@ -261,7 +250,6 @@ foreach(dir BINDIR
             FONTDIR
             SRCDIR
             DOCDIR
-            TESTDIR
             TUTDIR
             ACLOCALDIR
             ELISPDIR
diff --git a/config/Makefile.in b/config/Makefile.in
index 0b8a83bb0c7..d8b581cf929 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -89,7 +89,6 @@ MACRODIR       := @macrodir@
 SRCDIR         := @srcdir@
 ICONPATH       := @iconpath@
 DOCDIR         := @docdir@
-TESTDIR        := @testdir@
 TUTDIR         := @tutdir@
 ACLOCALDIR     := @aclocaldir@
 
-- 
GitLab