Skip to content

Commit 2ff5e2e

Browse files
committed
sync depends and cleanup code
1 parent 0fe2430 commit 2ff5e2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+15196
-14058
lines changed

AppExec/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ add_executable(
1010
Appexec.manifest
1111
Appexec.rc)
1212

13-
if(PRIVEXEC_ENABLE_LTO)
14-
set_property(TARGET AppExec PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
15-
endif()
16-
1713
target_link_libraries(
1814
AppExec
1915
Exec

CMakeLists.txt

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,13 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
1414
Please delete them.")
1515
endif()
1616

17+
option(BUILD_TEST "build test" OFF)
18+
1719
set(CMAKE_C_STANDARD 17)
1820
set(CMAKE_CXX_STANDARD 23)
1921
set(CMAKE_CXX_STANDARD_REQUIRED YES)
2022

21-
set(PRIVEXEC_ENABLE_LTO OFF)
22-
include(CheckIPOSupported)
23-
check_ipo_supported(RESULT lto_supported OUTPUT error)
24-
if(lto_supported)
25-
message(STATUS "IPO/LTO supported")
26-
if(CMAKE_BUILD_TYPE STREQUAL "Release")
27-
set(PRIVEXEC_ENABLE_LTO ON)
28-
set(BELA_ENABLE_LTO ON)
29-
message(STATUS "IPO/LTO enabled")
30-
endif()
31-
endif()
23+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
3224

3325
if(MSVC)
3426
set(CMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT "MultiThreaded$<$<CONFIG:Debug>:Debug>")
@@ -112,6 +104,7 @@ add_subdirectory(lib/exec)
112104
add_subdirectory(AppExec)
113105
add_subdirectory(Privexec)
114106
add_subdirectory(wsudo)
115-
if(NOT PRIVEXEC_ENABLE_LTO)
107+
108+
if(BUILD_TEST)
116109
add_subdirectory(test/apc)
117-
endif()
110+
endif()

Privexec/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ add_executable(
99
Privexec.manifest
1010
Privexec.rc)
1111

12-
if(PRIVEXEC_ENABLE_LTO)
13-
set_property(TARGET Privexec PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
14-
endif()
15-
1612
target_link_libraries(
1713
Privexec
1814
Exec

Privexec/app.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
#include <PathCch.h>
1414
#include <string_view>
1515
#include <vector>
16-
#include <bela/phmap.hpp>
16+
#include <gtl/phmap.hpp>
1717

1818
namespace priv {
1919

2020
using wid_t = WELL_KNOWN_SID_TYPE;
21-
using alias_t = bela::flat_hash_map<std::wstring, std::wstring>;
21+
using alias_t = gtl::flat_hash_map<std::wstring, std::wstring>;
2222
std::wstring AppAliasFile();
2323
bool AppAliasInitialize(HWND hbox, priv::alias_t &alias);
2424
static constexpr const auto whitecolor = RGB(255, 255, 255);

lib/exec/appcontainer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <bela/base.hpp>
44
#include <bela/codecvt.hpp>
55
#include <bela/escapeargv.hpp>
6-
// #include <bela/phmap.hpp>
6+
// #include <gtl/phmap.hpp>
77
#define PUGIXML_HEADER_ONLY 1
88
#include <pugixml.hpp>
99
#include <sddl.h>

vendor/bela.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/fcharlie/bela/tree/d246bf431c77418bd52995706d3babb23c597a54
1+
https://github.com/fcharlie/bela/tree/2f4ee32be087c8e56d41121b71f35916edf55d21

vendor/bela/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
1616
Please delete them.")
1717
endif()
1818

19-
option(ENABLE_BELA_TEST "Enable test" OFF)
20-
option(BELA_ENABLE_LTO "bela enable LTO" OFF)
19+
option(BUILD_BELA_TEST "Enable test" OFF)
2120
option(BELA_ENABLE_ASSEMBLY_FILES "bela enable assembly files" OFF)
2221

2322
message(STATUS "CMAKE_ASM_COMPILER_ID ${CMAKE_ASM_COMPILER_ID}")
@@ -31,6 +30,7 @@ if(CMAKE_CXX_STANDARD LESS 23 OR CMAKE_CXX_STANDARD STREQUAL "98")
3130
endif()
3231

3332
set(CMAKE_CXX_STANDARD_REQUIRED YES)
33+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
3434

3535
if("^${CMAKE_SOURCE_DIR}$" STREQUAL "^${PROJECT_SOURCE_DIR}$")
3636
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
@@ -61,6 +61,6 @@ add_subdirectory(src/belatime)
6161
add_subdirectory(src/belaund)
6262
add_subdirectory(src/belahash)
6363
add_subdirectory(src/hazel)
64-
if(ENABLE_BELA_TEST)
64+
if(BUILD_BELA_TEST)
6565
add_subdirectory(test)
6666
endif()

vendor/bela/CMakeSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"inheritEnvironments": [ "msvc_x64_x64" ],
88
"buildRoot": "${projectDir}\\out\\build\\${name}",
99
"installRoot": "${projectDir}\\out\\install\\${name}",
10-
"cmakeCommandArgs": "-DENABLE_BELA_TEST=ON",
10+
"cmakeCommandArgs": "-DBUILD_BELA_TEST=ON",
1111
"buildCommandArgs": "",
1212
"ctestCommandArgs": "",
1313
"variables": []

vendor/bela/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![license badge](https://img.shields.io/github/license/fcharlie/bela.svg)](LICENSE)
44
[![Master Branch Status](https://github.com/fcharlie/bela/workflows/BelaCI/badge.svg)](https://github.com/fcharlie/bela/actions)
55

6-
Modern C++23 library collection, better development experience on Windows (10,11)
6+
Modern C++23 library collection, better development experience on Windows 11
77

88
A lot of the code supports wchar_t based on Abseil modifications, some of which come from Visual C++ STL.
99

vendor/bela/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ catch {
122122
}
123123
$env:CC = "cl"
124124
$env:CXX = "cl"
125-
$ExitCode = Execute -FilePath "cmake" -WD $WD -Arguments "-GNinja -DCMAKE_BUILD_TYPE=Release -DENABLE_BELA_TEST=ON .."
125+
$ExitCode = Execute -FilePath "cmake" -WD $WD -Arguments "-GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_BELA_TEST=ON .."
126126
if ($ExitCode -ne 0) {
127127
exit $ExitCode
128128
}

0 commit comments

Comments
 (0)