-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync extra cmake from upstream KDE and KDAB (#279)
- Loading branch information
Allen Winter
authored
Jan 7, 2024
1 parent
36f7b98
commit e70a798
Showing
6 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# SPDX-FileCopyrightText: 2021-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# SPDX-FileCopyrightText: 2021 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
@@ -36,9 +36,10 @@ endif() | |
|
||
# Do not treat the operator name keywords and, bitand, bitor, compl, not, or and xor as synonyms as keywords. | ||
# They're not supported under Visual Studio out of the box thus using them limits the portability of code | ||
if(CMAKE_COMPILER_IS_GNUCXX OR | ||
CMAKE_C_COMPILER_ID MATCHES "Clang" OR | ||
(CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)) | ||
if(CMAKE_COMPILER_IS_GNUCXX | ||
OR CMAKE_C_COMPILER_ID MATCHES "Clang" | ||
OR (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT WIN32) | ||
) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-operator-names") | ||
endif() | ||
|
||
|
@@ -61,9 +62,10 @@ if(CYGWIN) | |
add_definitions(-D_GNU_SOURCE) | ||
endif() | ||
|
||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) OR | ||
(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE) OR | ||
(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)) | ||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) | ||
OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE) | ||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32) | ||
) | ||
# Linker warnings should be treated as errors | ||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_SHARED_LINKER_FLAGS}") | ||
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_MODULE_LINKER_FLAGS}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# SPDX-FileCopyrightText: 2021-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# SPDX-FileCopyrightText: 2021 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
@@ -21,7 +21,10 @@ endif() | |
function(kd_append_if condition value) | ||
if(${condition}) | ||
foreach(variable ${ARGN}) | ||
set(${variable} "${${variable}} ${value}" PARENT_SCOPE) | ||
set(${variable} | ||
"${${variable}} ${value}" | ||
PARENT_SCOPE | ||
) | ||
endforeach() | ||
endif() | ||
endfunction() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# SPDX-FileCopyrightText: 2012-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# SPDX-FileCopyrightText: 2012 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|