diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index a89a38bb..1e367690 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,4 +1,2 @@ -# automoc comes now from kdesupport, Alex - add_subdirectory(modules) diff --git a/cmake/modules/FindKDE4Internal.cmake b/cmake/modules/FindKDE4Internal.cmake index 31c41ad2..24bdd7c9 100644 --- a/cmake/modules/FindKDE4Internal.cmake +++ b/cmake/modules/FindKDE4Internal.cmake @@ -147,7 +147,6 @@ # # The following user adjustable options are provided: # -# KDE4_ENABLE_FINAL - enable KDE-style enable-final all-in-one-compilation # KDE4_BUILD_TESTS - enable this to build the testcases # KDE4_ENABLE_FPIE - enable it to use gcc Position Independent Executables feature # KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR - only present for CMake >= 2.6.3, defaults to TRUE @@ -178,13 +177,11 @@ # # KDE4_ADD_PLUGIN ( name [WITH_PREFIX] file1 ... fileN ) # Create a KDE plugin (KPart, kioslave, etc.) from the given source files. -# It supports KDE4_ENABLE_FINAL. # If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't. # # KDE4_ADD_KDEINIT_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN) # Create a KDE application in the form of a module loadable via kdeinit. # A library named kdeinit_ will be created and a small executable which links to it. -# It supports KDE4_ENABLE_FINAL # If the executable doesn't have a GUI, use the option NOGUI. By default on OS X # application bundles are created, with the NOGUI option no bundles but simple executables # are created. Under Windows this flag is also necessary to separate between applications @@ -194,7 +191,6 @@ # # KDE4_ADD_EXECUTABLE (name [NOGUI] [TEST] [RUN_UNINSTALLED] file1 ... fileN) # Equivalent to ADD_EXECUTABLE(), but additionally adds some more features: -# -support for KDE4_ENABLE_FINAL # -automatic RPATH handling # If the executable doesn't have a GUI, use the option NOGUI. By default on OS X # application bundles are created, with the NOGUI option no bundles but simple executables @@ -208,8 +204,7 @@ # to the proper location when installing, so RUN_UNINSTALLED is not necessary anymore). # # KDE4_ADD_LIBRARY (name [STATIC | SHARED | MODULE ] file1 ... fileN) -# Equivalent to ADD_LIBRARY(). Additionally it supports KDE4_ENABLE_FINAL, -# sets LINK_INTERFACE_LIBRARIES target property empty. +# Equivalent to ADD_LIBRARY(). Additionally it sets LINK_INTERFACE_LIBRARIES target property empty. # The RPATH is set according to the global RPATH settings as set up by FindKDE4Internal.cmake # (CMAKE_SKIP_BUILD_RPATH=FALSE, CMAKE_BUILD_WITH_INSTALL_RPATH=FALSE, CMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE) # Under Windows it adds a -DMAKE__LIB definition to the compilation. @@ -598,7 +593,6 @@ endif(NOT PHONON_FOUND) ##################### provide some options ########################################## -option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation") option(KDE4_BUILD_TESTS "Build the tests" ON) set(KDE4_SERIALIZE_TOOL "" CACHE STRING "Tool to serialize resource-intensive commands in parallel builds") @@ -618,10 +612,6 @@ option(KDE4_ENABLE_FPIE "Enable platform supports PIE linking") ##################### some more settings ########################################## -if( KDE4_ENABLE_FINAL) - add_definitions(-DKDE_USE_FINAL) -endif(KDE4_ENABLE_FINAL) - # If we are building ! kdelibs, check where kdelibs are installed. # If they are installed in a directory which contains "lib64", we default to "64" for LIB_SUFFIX, # so the current project will by default also go into lib64. diff --git a/cmake/modules/KDE4Macros.cmake b/cmake/modules/KDE4Macros.cmake index 6ad642b1..b03b27ff 100644 --- a/cmake/modules/KDE4Macros.cmake +++ b/cmake/modules/KDE4Macros.cmake @@ -5,7 +5,6 @@ # KDE4_ADD_KCFG_FILES # _KDE4_SET_CUSTOM_TARGET_PROPERTY # _KDE4_GET_CUSTOM_TARGET_PROPERTY -# KDE4_CREATE_FINAL_FILES # KDE4_ADD_PLUGIN # KDE4_ADD_KDEINIT_EXECUTABLE # KDE4_ADD_UNIT_TEST @@ -14,7 +13,6 @@ # KDE4_UPDATE_ICONCACHE # KDE4_INSTALL_ICONS # KDE4_REMOVE_OBSOLETE_CMAKE_FILES -# KDE4_NO_ENABLE_FINAL # KDE4_ADD_APP_ICON # KDE4_CREATE_MANPAGE # KDE4_CREATE_BASIC_CMAKE_VERSION_FILE (function) @@ -351,33 +349,6 @@ macro (KDE4_INSTALL_ICONS _defaultpath ) endmacro (KDE4_INSTALL_ICONS) -# For all C++ sources a big source file which includes all the files -# is created. -# This is not done for the C sources, they are just gathered in a separate list -# because they are usually not written by KDE and as such not intended to be -# compiled all-in-one. -macro (KDE4_CREATE_FINAL_FILES _filenameCPP _filesExcludedFromFinalFile ) - set(${_filesExcludedFromFinalFile}) - file(WRITE "${_filenameCPP}" "//autogenerated file\n") - foreach (_current_FILE ${ARGN}) - get_filename_component(_abs_FILE "${_current_FILE}" ABSOLUTE) - # don't include any generated files in the final-file - # because then cmake will not know the dependencies - get_source_file_property(_isGenerated "${_abs_FILE}" GENERATED) - if (_isGenerated) - list(APPEND ${_filesExcludedFromFinalFile} "${_abs_FILE}") - else (_isGenerated) - # only put C++ files in the final-file - if("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") - file(APPEND "${_filenameCPP}" "#include \"${_abs_FILE}\"\n") - else("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") - list(APPEND ${_filesExcludedFromFinalFile} "${_abs_FILE}") - endif("${_abs_FILE}" MATCHES ".+\\.(cpp|cc|cxx|C)$") - endif (_isGenerated) - endforeach (_current_FILE) - -endmacro (KDE4_CREATE_FINAL_FILES) - # This macro doesn't set up the RPATH related options for executables anymore, # since now (wioth cmake 2.6) just the full RPATH is used always for everything. # It does create wrapper shell scripts for the executables. @@ -497,12 +468,7 @@ macro (KDE4_ADD_PLUGIN _target_NAME ) add_definitions(-DQT_STATICPLUGIN) endif("${_add_lib_param}" STREQUAL "STATIC") - if (KDE4_ENABLE_FINAL) - kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) - add_library(${_target_NAME} ${_add_lib_param} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) - else (KDE4_ENABLE_FINAL) - add_library(${_target_NAME} ${_add_lib_param} ${_SRCS}) - endif (KDE4_ENABLE_FINAL) + add_library(${_target_NAME} ${_add_lib_param} ${_SRCS}) if (NOT _with_pre) set_target_properties(${_target_NAME} PROPERTIES PREFIX "") @@ -592,12 +558,7 @@ macro (KDE4_ADD_KDEINIT_EXECUTABLE _target_NAME ) # library instead against the executable, under windows we want to have everything in the executable, but for compatibility we have to # keep the library there- - if (KDE4_ENABLE_FINAL) - kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/kdeinit_${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) - add_library(kdeinit_${_target_NAME} SHARED ${CMAKE_CURRENT_BINARY_DIR}/kdeinit_${_target_NAME}_final_cpp.cpp ${_separate_files}) - else (KDE4_ENABLE_FINAL) - add_library(kdeinit_${_target_NAME} SHARED ${_SRCS}) - endif (KDE4_ENABLE_FINAL) + add_library(kdeinit_${_target_NAME} SHARED ${_SRCS}) set_target_properties(kdeinit_${_target_NAME} PROPERTIES OUTPUT_NAME kdeinit4_${_target_NAME}) @@ -738,12 +699,7 @@ macro (KDE4_ADD_EXECUTABLE _target_NAME) set(_add_executable_param ${_add_executable_param} EXCLUDE_FROM_ALL) endif (_test AND NOT KDE4_BUILD_TESTS) - if (KDE4_ENABLE_FINAL) - kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) - add_executable(${_target_NAME} ${_add_executable_param} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) - else (KDE4_ENABLE_FINAL) - add_executable(${_target_NAME} ${_add_executable_param} ${_SRCS}) - endif (KDE4_ENABLE_FINAL) + add_executable(${_target_NAME} ${_add_executable_param} ${_SRCS}) IF (KDE4_ENABLE_UAC_MANIFEST) _kde4_add_manifest(${_target_NAME}) @@ -777,12 +733,7 @@ macro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE) set(_SRCS ${_first_SRC} ${ARGN}) - if (KDE4_ENABLE_FINAL) - kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) - add_library(${_target_NAME} ${_add_lib_param} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) - else (KDE4_ENABLE_FINAL) - add_library(${_target_NAME} ${_add_lib_param} ${_SRCS}) - endif (KDE4_ENABLE_FINAL) + add_library(${_target_NAME} ${_add_lib_param} ${_SRCS}) # for shared libraries a -DMAKE_target_LIB is required string(TOUPPER ${_target_NAME} _symbol) @@ -840,16 +791,6 @@ macro(KDE4_REMOVE_OBSOLETE_CMAKE_FILES) endmacro(KDE4_REMOVE_OBSOLETE_CMAKE_FILES) -macro(KDE4_NO_ENABLE_FINAL _project_name) - if(KDE4_ENABLE_FINAL) - set(KDE4_ENABLE_FINAL OFF) - remove_definitions(-DKDE_USE_FINAL) - message(STATUS "You used enable-final argument but \"${_project_name}\" doesn't support it. Try to fix compile it and remove KDE4_NO_ENABLE_FINAL macro. Thanks") - - endif(KDE4_ENABLE_FINAL) -endmacro(KDE4_NO_ENABLE_FINAL _project_name) - - macro(KDE4_CREATE_EXPORTS_HEADER _outputFile _libName) string(TOUPPER ${_libName} _libNameUpperCase) string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _libNameUpperCase ${_libNameUpperCase}) diff --git a/cmake/modules/kde4uic.cmake b/cmake/modules/kde4uic.cmake index 1d402aeb..01e227fb 100644 --- a/cmake/modules/kde4uic.cmake +++ b/cmake/modules/kde4uic.cmake @@ -21,8 +21,6 @@ IF (_uic_CONTENTS) #replace tr218n("") with QString::null to avoid warning from KLocale STRING(REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" ) STRING(REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" ) - #replace image15_data with img15_filename to make enable_final work - STRING(REGEX REPLACE "image([0-9]+)_data" "img\\1_${KDE_UIC_BASENAME}" _uic_CONTENTS "${_uic_CONTENTS}") #fixup include guard STRING(REGEX REPLACE "#ifndef " "#ifndef UI_" _uic_CONTENTS "${_uic_CONTENTS}") STRING(REGEX REPLACE "#define " "#define UI_" _uic_CONTENTS "${_uic_CONTENTS}") diff --git a/kdecore/CMakeLists.txt b/kdecore/CMakeLists.txt index c95b97ac..10f2231b 100644 --- a/kdecore/CMakeLists.txt +++ b/kdecore/CMakeLists.txt @@ -312,14 +312,9 @@ set(kdecore_LIB_SRCS ${kdecore_LIB_SRCS} util/kshareddatacache.cpp) set(kdecore_OPTIONAL_LIBS ${kdecore_OPTIONAL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) # KSharedDataCache uses exceptions as of 4.8.4, the rest of kdecore -# doesn't. Try to enable exceptions only for that file, except for -# enable-final builds where set_source_files_properties doesn't work. -if(KDE4_ENABLE_FINAL) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") -else() - set_source_files_properties(util/kshareddatacache.cpp +# doesn't. Try to enable exceptions only for that file. +set_source_files_properties(util/kshareddatacache.cpp PROPERTIES COMPILE_FLAGS "${KDE4_ENABLE_EXCEPTIONS}") -endif() if (NOT Q_WS_X11 AND NOT Q_WS_QWS) add_definitions(-DNO_DISPLAY) diff --git a/plasma/CMakeLists.txt b/plasma/CMakeLists.txt index 488503a1..482c26d0 100644 --- a/plasma/CMakeLists.txt +++ b/plasma/CMakeLists.txt @@ -1,6 +1,3 @@ -# strange conversion error in pushbutton.cpp -kde4_no_enable_final(plasma) - if(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION) set(PLASMA_NO_KDEWEBKIT TRUE) set(PLASMA_NO_SOLID TRUE) diff --git a/solid/CMakeLists.txt b/solid/CMakeLists.txt index e3ab51f8..480ca2a2 100644 --- a/solid/CMakeLists.txt +++ b/solid/CMakeLists.txt @@ -3,10 +3,5 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ) -# Cannot compile with enable-final because of too many "using namespace" in -# .cpp files, leading to conflicts e.g. between -# Solid::Backends::Hal::AcAdapter and Solid::Ifaces::AcAdapter -kde4_no_enable_final(solid) - add_subdirectory( solid ) add_subdirectory( tests )