-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Move to simple default builds
* Remove individual feature flags in favor of a single `KPXC_MINIMAL` flag that removes advanced features from the build. Basic features are no longer guarded by feature flags. * Basic features: Auto-Type, Yubikey, KeeShare * Advanced features include: Browser (and passkeys), SSH Agent, and Secret Service * Networking, Documentation, and Update Checking remain as feature flags to accommodate various distro requirements. This change also cleans up the main CMakeLists.txt by re-arranging some content and placing macros into a dedicated include file. The minimum CMake version was bumped to 3.16.0 to conform to our minimum Ubuntu support of Focal (20.04). This also allows us to default to C++20, we fall back to C++17 for Qt versions less than 5.15.0 due to lack of support. Lastly this change removes the KEEPASSXC_BUILD_TYPE="PreRelease" which is never used. We only support "Snapshot" and "Release" now.
- Loading branch information
1 parent
9e29b5c
commit cfa94f6
Showing
76 changed files
with
687 additions
and
1,153 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Copyright (C) 2024 KeePassXC Team <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 or (at your option) | ||
# version 3 of the License. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
macro(add_gcc_compiler_cxxflags FLAGS) | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}") | ||
endif() | ||
endmacro() | ||
|
||
macro(add_gcc_compiler_cflags FLAGS) | ||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAGS}") | ||
endif() | ||
endmacro() | ||
|
||
macro(add_gcc_compiler_flags FLAGS) | ||
add_gcc_compiler_cxxflags("${FLAGS}") | ||
add_gcc_compiler_cflags("${FLAGS}") | ||
endmacro() | ||
|
||
# Copies of above macros that first ensure the compiler understands a given flag | ||
# Because check_*_compiler_flag() sets -D with name, need to provide "safe" FLAGNAME | ||
macro(check_add_gcc_compiler_cxxflag FLAG FLAGNAME) | ||
check_cxx_compiler_flag("${FLAG}" CXX_HAS${FLAGNAME}) | ||
if(CXX_HAS${FLAGNAME}) | ||
add_gcc_compiler_cxxflags("${FLAG}") | ||
endif() | ||
endmacro() | ||
|
||
macro(check_add_gcc_compiler_cflag FLAG FLAGNAME) | ||
check_c_compiler_flag("${FLAG}" CC_HAS${FLAGNAME}) | ||
if(CC_HAS${FLAGNAME}) | ||
add_gcc_compiler_cflags("${FLAG}") | ||
endif() | ||
endmacro() | ||
|
||
# This is the "front-end" for the above macros | ||
# Optionally takes additional parameter(s) with language to check (currently "C" or "CXX") | ||
macro(check_add_gcc_compiler_flag FLAG) | ||
string(REGEX REPLACE "[-=]" "_" FLAGNAME "${FLAG}") | ||
set(check_lang_spec ${ARGN}) | ||
list(LENGTH check_lang_spec num_extra_args) | ||
set(langs C CXX) | ||
if(num_extra_args GREATER 0) | ||
set(langs "${check_lang_spec}") | ||
endif() | ||
if("C" IN_LIST langs) | ||
check_add_gcc_compiler_cflag("${FLAG}" "${FLAGNAME}") | ||
endif() | ||
if("CXX" IN_LIST langs) | ||
check_add_gcc_compiler_cxxflag("${FLAG}" "${FLAGNAME}") | ||
endif() | ||
endmacro() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <sys/ptrace.h> | ||
#include <sys/types.h> | ||
|
||
int main() | ||
{ | ||
ptrace(PT_DENY_ATTACH, 0, 0, 0); | ||
return 0; | ||
} |
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
Oops, something went wrong.