Distinguish between system headers and project headers.
authorJan Olszak <j.olszak@samsung.com>
Fri, 23 Nov 2012 14:01:55 +0000 (15:01 +0100)
committerGerrit Code Review <gerrit2@kim11>
Fri, 30 Nov 2012 14:58:27 +0000 (23:58 +0900)
[Issue#] During compilation system and project headers were included the same way.
[Bug] N/A
[Cause] N/A
[Solution] Use -isystem flag to include system headers. In CMake files it's done by INCLUDE_DIRECTORY( SYSTEM ... ).
[Verification] Build. No warnings from system headers.

Change-Id: Ide041328bc7240d6875943067c272baeb5671dfd

src/CMakeLists.txt

index 28ccf32..665095d 100644 (file)
@@ -104,32 +104,38 @@ ADD_DEFINITIONS("-DSEP_INSTALLER")
 
 
 PKG_CHECK_MODULES(INSTALLER_STATIC_DEP
-    libxml-2.0
-    openssl
     dpl-efl
-    cert-svc-vcore
     dpl-event-efl
     dpl-utils-efl
     dpl-wrt-dao-ro
     dpl-wrt-dao-rw
     dpl-encryption
+    wrt-plugins-types
+    pkgmgr-installer
+    pkgmgr-parser
+    REQUIRED
+)
+
+PKG_CHECK_MODULES(SYS_INSTALLER_STATIC_DEP
+    libxml-2.0
+    openssl
+    cert-svc-vcore
     security-install
     ecore-x
     xmlsec1
     libidn
     libiri
     libpcrecpp
-    wrt-plugins-types
     ail
     elementary
-    pkgmgr-installer
-    pkgmgr-parser
     tapi
     shortcut
     capi-appfw-app-manager
     drm-service-core-intel
     REQUIRED
-    )
+)
+
+INCLUDE_DIRECTORIES( SYSTEM ${SYS_INSTALLER_STATIC_DEP_INCLUDE_DIRS})
 
 INCLUDE_DIRECTORIES(
     ${INSTALLER_DEP_INCLUDES}
@@ -143,9 +149,12 @@ ADD_LIBRARY(${TARGET_INSTALLER_STATIC} STATIC
 
 ADD_DEFINITIONS(${INSTALLER_STATIC_DEP_CFLAGS})
 ADD_DEFINITIONS(${INSTALLER_STATIC_DEP_CFLAGS_OTHERS})
+ADD_DEFINITIONS(${SYS_INSTALLER_STATIC_DEP_CFLAGS})
+ADD_DEFINITIONS(${SYS_INSTALLER_STATIC_DEP_CFLAGS_OTHERS})
 
 TARGET_LINK_LIBRARIES(${TARGET_INSTALLER_STATIC}
     ${INSTALLER_STATIC_DEP_LIBRARIES} "-ldl"
+    ${SYS_INSTALLER_STATIC_DEP_LIBRARIES} "-ldl"
     )
 
 ADD_SUBDIRECTORY(pkg-manager)