Browse Source

[cmake] Use TARGET_LINK_LIBRARIES instead of LINK_FLAGS for library dependencies, also add -Wl,--as-needed to extra warnings (fixes #2448)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2875 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.33
Stefan Bühler 9 years ago
parent
commit
680b714543
  1. 1
      NEWS
  2. 23
      src/CMakeLists.txt

1
NEWS

@ -15,6 +15,7 @@ NEWS
* [mod_auth] fix base64_decode (#2484)
* fix some bugs found with canalyze (fixes #2484, thx Zhenbo Xu)
* fix undefined stuff found with clang
* [cmake] Use TARGET_LINK_LIBRARIES instead of LINK_FLAGS for library dependencies, also add -Wl,--as-needed to extra warnings (fixes #2448)
- 1.4.32 - 2012-11-21
* Code cleanup with clang/sparse (fixes #2437, thx kibi)

23
src/CMakeLists.txt

@ -34,8 +34,7 @@ IF(CMAKE_COMPILER_IS_GNUCC)
OPTION(BUILD_EXTRA_WARNINGS "extra warnings")
IF(BUILD_EXTRA_WARNINGS)
SET(WARN_FLAGS "-g -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security")
# -Wl,--as-needed
SET(WARN_FLAGS "-g -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security -Wl,--as-needed")
# -Werror -Wbad-function-cast -Wmissing-prototypes
ELSE(BUILD_EXTRA_WARNINGS)
SET(WARN_FLAGS "")
@ -498,24 +497,24 @@ ADD_AND_INSTALL_LIBRARY(mod_usertrack mod_usertrack.c)
ADD_AND_INSTALL_LIBRARY(mod_webdav mod_webdav.c)
IF(HAVE_PCRE_H)
ADD_TARGET_PROPERTIES(lighttpd LINK_FLAGS ${PCRE_LDFLAGS})
TARGET_LINK_LIBRARIES(lighttpd ${PCRE_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd COMPILE_FLAGS ${PCRE_CFLAGS})
ADD_TARGET_PROPERTIES(mod_rewrite LINK_FLAGS ${PCRE_LDFLAGS})
TARGET_LINK_LIBRARIES(mod_rewrite ${PCRE_LDFLAGS})
ADD_TARGET_PROPERTIES(mod_rewrite COMPILE_FLAGS ${PCRE_CFLAGS})
ADD_TARGET_PROPERTIES(mod_dirlisting LINK_FLAGS ${PCRE_LDFLAGS})
TARGET_LINK_LIBRARIES(mod_dirlisting ${PCRE_LDFLAGS})
ADD_TARGET_PROPERTIES(mod_dirlisting COMPILE_FLAGS ${PCRE_CFLAGS})
ADD_TARGET_PROPERTIES(mod_redirect LINK_FLAGS ${PCRE_LDFLAGS})
TARGET_LINK_LIBRARIES(mod_redirect ${PCRE_LDFLAGS})
ADD_TARGET_PROPERTIES(mod_redirect COMPILE_FLAGS ${PCRE_CFLAGS})
ADD_TARGET_PROPERTIES(mod_ssi LINK_FLAGS ${PCRE_LDFLAGS})
TARGET_LINK_LIBRARIES(mod_ssi ${PCRE_LDFLAGS})
ADD_TARGET_PROPERTIES(mod_ssi COMPILE_FLAGS ${PCRE_CFLAGS})
ADD_TARGET_PROPERTIES(mod_trigger_b4_dl LINK_FLAGS ${PCRE_LDFLAGS})
TARGET_LINK_LIBRARIES(mod_trigger_b4_dl ${PCRE_LDFLAGS})
ADD_TARGET_PROPERTIES(mod_trigger_b4_dl COMPILE_FLAGS ${PCRE_CFLAGS})
ENDIF(HAVE_PCRE_H)
ADD_TARGET_PROPERTIES(mod_magnet LINK_FLAGS ${LUA_LDFLAGS})
TARGET_LINK_LIBRARIES(mod_magnet ${LUA_LDFLAGS})
ADD_TARGET_PROPERTIES(mod_magnet COMPILE_FLAGS ${LUA_CFLAGS})
ADD_TARGET_PROPERTIES(mod_cml LINK_FLAGS ${LUA_LDFLAGS})
TARGET_LINK_LIBRARIES(mod_cml ${LUA_LDFLAGS})
ADD_TARGET_PROPERTIES(mod_cml COMPILE_FLAGS ${LUA_CFLAGS})
IF(HAVE_MYSQL_H AND HAVE_MYSQL)
@ -528,7 +527,7 @@ IF(HAVE_SQLITE3_H)
SET(L_MOD_WEBDAV ${L_MOD_WEBDAV} sqlite3)
ENDIF(HAVE_SQLITE3_H)
IF(HAVE_LIBXML_H)
SET_TARGET_PROPERTIES(mod_webdav PROPERTIES LINK_FLAGS ${XML2_LDFLAGS})
TARGET_LINK_LIBRARIES(mod_webdav ${XML2_LDFLAGS})
ENDIF(HAVE_LIBXML_H)
IF(HAVE_UUID_H)
IF(NEED_LIBUUID)
@ -607,7 +606,7 @@ IF(HAVE_LIBSSL AND HAVE_LIBCRYPTO)
ENDIF(HAVE_LIBSSL AND HAVE_LIBCRYPTO)
IF(WITH_LIBEV)
ADD_TARGET_PROPERTIES(lighttpd LINK_FLAGS ${LIBEV_LDFLAGS})
TARGET_LINK_LIBRARIES(lighttpd ${LIBEV_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd COMPILE_FLAGS ${LIBEV_CFLAGS})
ENDIF(WITH_LIBEV)

Loading…
Cancel
Save