[llvm-commits] [lld] r173488 - in /lld/trunk/lib/ReaderWriter/ELF: CMakeLists.txt ELFTargets.h X86_64/CMakeLists.txt

Michael J. Spencer bigcheesegs at gmail.com
Fri Jan 25 12:50:01 PST 2013


Author: mspencer
Date: Fri Jan 25 14:50:01 2013
New Revision: 173488

URL: http://llvm.org/viewvc/llvm-project?rev=173488&view=rev
Log:
[CMake] Setup include dirs properly.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt
    lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h
    lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt

Modified: lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt?rev=173488&r1=173487&r2=173488&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt Fri Jan 25 14:50:01 2013
@@ -1,21 +1,3 @@
-file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
-
-foreach(dir ${all_valid_subdirs})
-    message(STATUS "AUTOADD ELFTarget = ${dir}")
-    if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
-        string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
-        include_directories(AFTER 
-                            ${CMAKE_CURRENT_SOURCE_DIR}/${dir_trimmed})
-    endif()
-endforeach(dir)
-
-foreach(dir ${all_valid_subdirs})
-    if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
-        string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
-        add_subdirectory(${dir_trimmed})
-    endif()
-endforeach(dir)
-
 add_lld_library(lldELF
   ELFTargetInfo.cpp
   HexagonReference.cpp
@@ -29,4 +11,16 @@
 
 target_link_libraries(lldELF
   lldReaderWriter
+  lldX86_64ELFTarget
   )
+
+include_directories(.)
+
+file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
+
+foreach(dir ${all_valid_subdirs})
+    if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
+        string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
+        add_subdirectory(${dir_trimmed})
+    endif()
+endforeach(dir)

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h?rev=173488&r1=173487&r2=173488&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFTargets.h Fri Jan 25 14:50:01 2013
@@ -9,9 +9,9 @@
 #ifndef LLD_READER_WRITER_ELF_TARGETS_H
 #define LLD_READER_WRITER_ELF_TARGETS_H
 
-#include "X86ELFTarget.h"
-#include "X86_64ELFTarget.h"
-#include "HexagonELFTarget.h"
-#include "PPCELFTarget.h"
+#include "X86/X86ELFTarget.h"
+#include "X86_64/X86_64ELFTarget.h"
+#include "Hexagon/HexagonELFTarget.h"
+#include "PPC/PPCELFTarget.h"
 
 #endif

Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt?rev=173488&r1=173487&r2=173488&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt Fri Jan 25 14:50:01 2013
@@ -1,5 +1,3 @@
 add_lld_library(lldX86_64ELFTarget
   X86_64TargetInfo.cpp
   )
-
-target_link_libraries(lldX86_64ELFTarget)





More information about the llvm-commits mailing list