diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-27 20:01:56 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-27 20:01:56 (GMT) |
commit | 00230147fa314745cf3a928166a7454b3688116f (patch) | |
tree | e05e89d697713d51d5ee9184c93e24a6aadf7e27 /Modules/FindKDE3.cmake | |
parent | 883c96ba64145d67af7f79fa4ca11f6bfd713201 (diff) | |
download | CMake-00230147fa314745cf3a928166a7454b3688116f.zip CMake-00230147fa314745cf3a928166a7454b3688116f.tar.gz CMake-00230147fa314745cf3a928166a7454b3688116f.tar.bz2 |
ENH: move changes from main tree
Diffstat (limited to 'Modules/FindKDE3.cmake')
-rw-r--r-- | Modules/FindKDE3.cmake | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake index f1545a0..12ab449 100644 --- a/Modules/FindKDE3.cmake +++ b/Modules/FindKDE3.cmake @@ -83,16 +83,22 @@ SET(KDE3_DEFINITIONS -DQT_CLEAN_NAMESPACE -D_GNU_SOURCE) #only on linux, but NOT e.g. on FreeBSD: IF(CMAKE_SYSTEM_NAME MATCHES "Linux") SET (KDE3_DEFINITIONS ${KDE3_DEFINITIONS} -D_XOPEN_SOURCE=500 -D_BSD_SOURCE) - 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 -fno-exceptions -fno-check-new -fno-common") + SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -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 -Wformat-security -fno-exceptions -fno-check-new -fno-common") ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") # works on FreeBSD, NOT tested on NetBSD and OpenBSD IF (CMAKE_SYSTEM_NAME MATCHES BSD) - 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") + SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -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 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") ENDIF (CMAKE_SYSTEM_NAME MATCHES BSD) +# if no special buildtype is selected, add -O2 as default optimization +IF (NOT CMAKE_BUILD_TYPE) + SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") + SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") +ENDIF (NOT CMAKE_BUILD_TYPE) + #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") |