diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-01-22 21:30:26 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-01-22 21:30:26 +0000 |
commit | 22228526d004d33f669d287643f0a07477a72b1e (patch) | |
tree | 731cb2319b5a4391568b19bc83ddbe6fb087f16a | |
parent | 5c4afe434448c1d6248c7212294b6c37ae2cdeb3 (diff) | |
download | extra-cmake-modules-22228526d004d33f669d287643f0a07477a72b1e.tar.gz extra-cmake-modules-22228526d004d33f669d287643f0a07477a72b1e.tar.bz2 |
it seems strtoll doesn't work opn FreeBSD with -ansi
Alex
svn path=/trunk/KDE/kdesdk/cmake/; revision=501434
-rw-r--r-- | modules/FindKDE4.cmake | 12 | ||||
-rw-r--r-- | modules/KDE4Macros.cmake | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/modules/FindKDE4.cmake b/modules/FindKDE4.cmake index e0099107..8553ef9f 100644 --- a/modules/FindKDE4.cmake +++ b/modules/FindKDE4.cmake @@ -49,22 +49,26 @@ SET(QT_AND_KDECORE_LIBS ${QT_QTCORE_LIBRARY} kdecore) # not used in Qt4: QT_NO_COMPAT, QT_CLEAN_NAMESPACE, QT_THREAD_SUPPORT SET(KDE4_DEFINITIONS -DQT3_SUPPORT -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -DQT_NO_TRANSLATION -D_REENTRANT ) -SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-common") -SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") #only on linux, but not e.g. on FreeBSD: IF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") SET(KDE4_DEFINITIONS ${KDE4_DEFINITIONS} -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE) + SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc") + SET(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc") + SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-common") + SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") SET(KDE4_DEFINITIONS ${KDE4_DEFINITIONS} -D_GNU_SOURCE) + SET(CMAKE_SHARED_LINKER_FLAGS "-avoid-version -lc") + SET(CMAKE_MODULE_LINKER_FLAGS "-avoid-version -lc") + SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-common") + SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") #SET(CMAKE_SHARED_LINKER_FLAGS "-avoid-version -module -Wl,--no-undefined -Wl,--allow-shlib-undefined") -SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc") -SET(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc") SET(KDE4_DIR /opt/kde4) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 8cbeb6f8..e3503b33 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -106,8 +106,8 @@ MACRO(KDE4_ADD_KCFG_FILES _sources) ADD_CUSTOM_COMMAND(OUTPUT ${_src_FILE} COMMAND ${KDE4_KCFGC_EXECUTABLE} - ARGS ${_kcfg_FILE} ${_tmp_FILE} - DEPENDS ${_tmp_FILE} ) + ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} ${_tmp_FILE} + DEPENDS ${_tmp_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} ) SET(${_sources} ${${_sources}} ${_src_FILE}) |