Commit 6278fa72 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix compile with cmake unity support

parent a5363487
Pipeline #44853 passed with stage
in 13 minutes and 13 seconds
......@@ -119,17 +119,16 @@ configure_file(knotes-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/knotes-version
if(BUILD_TESTING)
add_definitions(-DBUILD_TESTING)
endif()
#Laurent: disable for the moment
#option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" FALSE)
#set(COMPILE_WITH_UNITY_CMAKE_SUPPORT false)
#if (USE_UNITY_CMAKE_SUPPORT)
# if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
# message(STATUS "CMAKE version is less than 3.16.0 . We can't use cmake unify build support")
# else()
# set(COMPILE_WITH_UNITY_CMAKE_SUPPORT true)
# endif()
#endif()
option(USE_UNITY_CMAKE_SUPPORT "Use UNITY cmake support (speedup compile time)" FALSE)
set(COMPILE_WITH_UNITY_CMAKE_SUPPORT false)
if (USE_UNITY_CMAKE_SUPPORT)
if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
message(STATUS "CMAKE version is less than 3.16.0 . We can't use cmake unify build support")
else()
set(COMPILE_WITH_UNITY_CMAKE_SUPPORT true)
endif()
endif()
add_subdirectory(noteshared)
add_subdirectory(src)
add_subdirectory(notesagent)
......
......@@ -3,8 +3,8 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef NOTEUTILS_H
#define NOTEUTILS_H
#ifndef NOTESHARED_NOTEUTILS_H
#define NOTESHARED_NOTEUTILS_H
#include "noteshared_export.h"
#include <AkonadiCore/Item>
......@@ -26,4 +26,4 @@ public:
};
}
#endif // NOTEUTILS_H
#endif // NOTESHARED_NOTEUTILS_H
......@@ -126,7 +126,9 @@ install(TARGETS knotes ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
set(kcm_knotes_PART_SRCS configdialog/knotedisplayconfigwidget.cpp configdialog/knoteeditorconfigwidget.cpp configdialog/knotecollectionconfigwidget.cpp knotes_debug.cpp)
add_library(kcm_knote MODULE ${kcm_knotes_PART_SRCS} )
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(kcm_knote PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(kcm_knote knotesprivate KF5::AkonadiCore KF5::KCMUtils KF5::NewStuff notesharedprivate KF5::AkonadiNotes KF5::PimCommon KF5::I18n KF5::AkonadiWidgets)
install(TARGETS kcm_knote DESTINATION ${KDE_INSTALL_PLUGINDIR})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment