Some added protections
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Oct 2008 15:20:31 +0000 (15:20 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Oct 2008 15:20:31 +0000 (15:20 +0000)
cmake/modules/ALICEMacros.cmake
cmake/modules/FindROOT.cmake

index 96caee6..1f9d3c3 100644 (file)
@@ -69,7 +69,7 @@ Function (AddLibrary LIB SRCS DHDRS)
     Set(ASRCS ${SRCS} ${DICT})
     Root_Generate_Dictionary("${DHDRS}" "${LDEF}" "${DICT}" "${INCLUDE_DIRECTORIES}")
   Else(LDEF)
-    Message(STATUS "${LIB}LinkDef.h not found... probably building empty lib")
+    Message(STATUS "No ${LIB}LinkDef.h found... building lib with no ROOT dict")
     Set(ASRCS ${SRCS})
   Endif(LDEF)
 
index 74b47e2..5f55164 100644 (file)
@@ -27,19 +27,43 @@ Else (${ROOT_CONFIG} MATCHES "ROOT_CONFIG-NOTFOUND")
     COMMAND root-config --f77 
     OUTPUT_VARIABLE _f77 
     OUTPUT_STRIP_TRAILING_WHITESPACE)
-  Set(ENV{F77} ${_f77})
+  If(APPLE)
+    Execute_process(
+      COMMAND which ${_f77}
+      OUTPUT_VARIABLE _f77path
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    Set(ENV{F77} ${_f77path})
+  Else(APPLE)
+    Set(ENV{F77} ${_f77})
+  Endif(APPLE)
 
   Execute_process(
     COMMAND root-config --cc
     OUTPUT_VARIABLE _cc 
     OUTPUT_STRIP_TRAILING_WHITESPACE)
-  Set(ENV{CC} ${_cc})
+  If(APPLE)
+    Execute_process(
+      COMMAND which ${_cc}
+      OUTPUT_VARIABLE _ccpath
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    Set(ENV{CC} ${_ccpath})
+  Else(APPLE)
+    Set(ENV{CC} ${_cc})
+  Endif(APPLE)
 
   Execute_process(
     COMMAND root-config --cxx
     OUTPUT_VARIABLE _cxx
     OUTPUT_STRIP_TRAILING_WHITESPACE)
-  Set(ENV{CXX} ${_cxx})
+  If(APPLE)
+    Execute_process(
+      COMMAND which ${_cxx}
+      OUTPUT_VARIABLE _cxxpath
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    Set(ENV{CXX} ${_cxxpath})
+  Else(APPLE)
+    Set(ENV{CXX} ${_cxx})
+  Endif(APPLE)
 
   Execute_process(
     COMMAND root-config --version