Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
70bca94c
Commit
70bca94c
authored
Dec 31, 2020
by
Laurent Montel
😁
Browse files
Make compile with cmake UNITY support
parent
b8a976fd
Pipeline
#45875
passed with stage
in 10 minutes and 42 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
70bca94c
...
...
@@ -112,6 +112,17 @@ add_definitions(-DQT_NO_KEYWORDS)
set
(
CMAKECONFIG_INSTALL_DIR
"
${
CMAKECONFIG_INSTALL_PREFIX
}
/KPimItinerary"
)
set
(
KDE_INSTALL_INCLUDEDIR_PIM
${
KDE_INSTALL_INCLUDEDIR
}
/KPim
)
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
(
src
)
if
(
BUILD_TESTING
)
add_subdirectory
(
autotests
)
...
...
src/CMakeLists.txt
View file @
70bca94c
...
...
@@ -97,6 +97,9 @@ ecm_qt_declare_logging_category(kitinerary_lib_srcs HEADER compare-logging.h IDE
ecm_qt_declare_logging_category
(
kitinerary_lib_srcs HEADER validator-logging.h IDENTIFIER KItinerary::ValidatorLog CATEGORY_NAME org.kde.kitinerary.extractorValidator
)
add_library
(
KPimItinerary
${
kitinerary_lib_srcs
}
)
if
(
COMPILE_WITH_UNITY_CMAKE_SUPPORT
)
set_target_properties
(
KPimItinerary PROPERTIES UNITY_BUILD ON
)
endif
()
add_library
(
KPim::Itinerary ALIAS KPimItinerary
)
generate_export_header
(
KPimItinerary BASE_NAME KItinerary
)
set_target_properties
(
KPimItinerary PROPERTIES
...
...
src/knowledgedb-generator/CMakeLists.txt
View file @
70bca94c
...
...
@@ -18,7 +18,6 @@ target_include_directories(generate-knowledgedb PRIVATE
${
CMAKE_CURRENT_BINARY_DIR
}
/..
)
target_link_libraries
(
generate-knowledgedb PRIVATE Qt5::Network Qt5::Gui KOSM
)
# extract all elements we are interested in (airports, terminals, stations at airports)
osm_filter
(
OUTPUT airports.o5m FILTER --keep=\"iata=* or aeroway=terminal or public_transport=station or railway=station or railway=halt or railway=tram_stop\"
)
...
...
src/mergeutil.cpp
View file @
70bca94c
...
...
@@ -526,7 +526,7 @@ static Ticket mergeValue(const Ticket &lhs, const Ticket &rhs)
return
t
;
}
static
bool
v
alueIsNull
(
const
QVariant
&
v
)
static
bool
checkV
alueIsNull
(
const
QVariant
&
v
)
{
if
(
v
.
type
()
==
qMetaTypeId
<
float
>
())
{
return
std
::
isnan
(
v
.
toFloat
());
...
...
@@ -580,7 +580,7 @@ QVariant MergeUtil::merge(const QVariant &lhs, const QVariant &rhs)
rv
=
merge
(
prop
.
readOnGadget
(
lhs
.
constData
()),
rv
);
}
if
(
!
v
alueIsNull
(
rv
))
{
if
(
!
checkV
alueIsNull
(
rv
))
{
prop
.
writeOnGadget
(
res
.
data
(),
rv
);
}
}
...
...
src/osm/CMakeLists.txt
View file @
70bca94c
...
...
@@ -7,3 +7,6 @@ add_library(KOSM STATIC
target_include_directories
(
KOSM PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/..>"
)
target_link_libraries
(
KOSM PUBLIC Qt5::Core
)
if
(
COMPILE_WITH_UNITY_CMAKE_SUPPORT
)
set_target_properties
(
KOSM PROPERTIES UNITY_BUILD ON
)
endif
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment