From 000eb3d322920da3591d0cc4d17fd5d6478faf07 Mon Sep 17 00:00:00 2001
From: Guilherme Amadio <amadio@cern.ch>
Date: Mon, 24 Sep 2018 11:24:13 +0200
Subject: [PATCH] [TMVA] Update CMakeLists.txt for RMVA

- Remove file globbing
- Inherit options from RInterface
---
 tmva/rmva/CMakeLists.txt | 39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/tmva/rmva/CMakeLists.txt b/tmva/rmva/CMakeLists.txt
index 331f383cdfb..7b83352eb14 100644
--- a/tmva/rmva/CMakeLists.txt
+++ b/tmva/rmva/CMakeLists.txt
@@ -1,24 +1,25 @@
 ############################################################################
 # CMakeLists.txt file for building ROOT R package
 ############################################################################
-#Autor: Omar Andres Zapata Mesa 31/05/2013,14/07/2014
-
-set(libname RMVA)
-
-include_directories(${R_INCLUDE_DIRS})
-
-set(R_HEADERS ${CMAKE_SOURCE_DIR}/tmva/rmva/inc/TMVA/RMethodBase.h 
-              ${CMAKE_SOURCE_DIR}/tmva/rmva/inc/TMVA/MethodC50.h
-              ${CMAKE_SOURCE_DIR}/tmva/rmva/inc/TMVA/MethodRSNNS.h
-              ${CMAKE_SOURCE_DIR}/tmva/rmva/inc/TMVA/MethodRSVM.h
-              ${CMAKE_SOURCE_DIR}/tmva/rmva/inc/TMVA/MethodRXGB.h
-              )
-
-ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-overloaded-virtual)
 
 ROOT_STANDARD_LIBRARY_PACKAGE(RMVA
-                              HEADERS ${R_HEADERS}
-                              LIBRARIES ${R_LIBRARIES}
-                              DICTIONARY_OPTIONS -I${R_INCLUDE_DIR}
-                              DEPENDENCIES Core Matrix Thread RIO RInterface TMVA)
-target_include_directories(RMVA BEFORE PRIVATE ${R_INCLUDE_DIR})
+  HEADERS
+    TMVA/MethodC50.h
+    TMVA/MethodRSNNS.h
+    TMVA/MethodRSVM.h
+    TMVA/MethodRXGB.h
+    TMVA/RMethodBase.h
+  SOURCES
+    src/MethodC50.cxx
+    src/MethodRSNNS.cxx
+    src/MethodRSVM.cxx
+    src/MethodRXGB.cxx
+    src/RMethodBase.cxx
+  DEPENDENCIES
+    Core
+    Matrix
+    RInterface
+    RIO
+    Thread
+    TMVA
+)
-- 
GitLab