فهرست منبع

CMake: Fix BuildMetalib on CMake 3.0.2

CMake now tests out correctly on 3.0.2 again.
Sam Edwards 7 سال پیش
والد
کامیت
b8fa692e2f
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      cmake/macros/BuildMetalib.cmake

+ 8 - 0
cmake/macros/BuildMetalib.cmake

@@ -131,6 +131,14 @@ function(add_component_library target_name)
   endforeach()
   endforeach()
 
 
   if(BUILD_METALIBS)
   if(BUILD_METALIBS)
+    # CMake 3.0.2 doesn't like .I/.N/.T files!  We let it know that they're only
+    # headers.
+    foreach(source ${sources})
+      if(source MATCHES "\\.[INT]$")
+        set_source_files_properties(${source} PROPERTIES HEADER_FILE_ONLY ON)
+      endif()
+    endforeach(source)
+
     add_library("${target_name}" OBJECT ${sources})
     add_library("${target_name}" OBJECT ${sources})
   else()
   else()
     add_library("${target_name}" ${sources})
     add_library("${target_name}" ${sources})