-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
415 additions
and
312 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.26 FATAL_ERROR) | ||
project(winprefs) | ||
|
||
include(GNUInstallDirs) | ||
|
||
set(GCC_CLANG_SHARED_C_FLAGS "-fno-builtin;-std=gnu11") | ||
set(GCC_CLANG_DEBUG_C_FLAGS | ||
"-ggdb;\ | ||
-O0;\ | ||
-pedantic;\ | ||
-Wall;\ | ||
-Wdeprecated-declarations;\ | ||
-Wempty-body;\ | ||
-Werror;\ | ||
-Werror=conversion;\ | ||
-Werror=float-conversion;\ | ||
-Werror=implicit-function-declaration;\ | ||
-Werror=incompatible-pointer-types;\ | ||
-Werror=int-conversion;\ | ||
-Werror=return-type;\ | ||
-Werror=sign-conversion;\ | ||
-Wmissing-braces;\ | ||
-Wmissing-field-initializers;\ | ||
-Wno-missing-prototypes;\ | ||
-Wno-strict-prototypes;\ | ||
-Wno-trigraphs;\ | ||
-Wno-unknown-pragmas;\ | ||
-Wparentheses;\ | ||
-Wpointer-sign;\ | ||
-Wshadow;\ | ||
-Wsign-compare;\ | ||
-Wswitch;\ | ||
-Wuninitialized;\ | ||
-Wunknown-pragmas;\ | ||
-Wunreachable-code;\ | ||
-Wunused-function;\ | ||
-Wunused-label;\ | ||
-Wunused-parameter;\ | ||
-Wunused-value;\ | ||
-Wunused-variable") | ||
|
||
add_executable(winprefs main.c) | ||
if(CMAKE_COMPILER_IS_GNUCC OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang") | ||
target_compile_options( | ||
winprefs PRIVATE ${GCC_CLANG_SHARED_C_FLAGS} | ||
$<$<CONFIG:Debug>:${GCC_CLANG_DEBUG_C_FLAGS}>) | ||
endif() | ||
install(TARGETS winprefs DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
add_subdirectory(native) |
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,46 @@ | ||
include(GNUInstallDirs) | ||
|
||
set(GCC_CLANG_SHARED_C_FLAGS "-fno-builtin;-std=gnu2x") | ||
set(GCC_CLANG_DEBUG_C_FLAGS | ||
"-ggdb;\ | ||
-O0;\ | ||
-pedantic;\ | ||
-Wall;\ | ||
-Wdeprecated-declarations;\ | ||
-Wempty-body;\ | ||
-Werror;\ | ||
-Werror=conversion;\ | ||
-Werror=float-conversion;\ | ||
-Werror=implicit-function-declaration;\ | ||
-Werror=incompatible-pointer-types;\ | ||
-Werror=int-conversion;\ | ||
-Werror=return-type;\ | ||
-Werror=sign-conversion;\ | ||
-Wmissing-braces;\ | ||
-Wmissing-field-initializers;\ | ||
-Wno-missing-prototypes;\ | ||
-Wno-strict-prototypes;\ | ||
-Wno-trigraphs;\ | ||
-Wno-unknown-pragmas;\ | ||
-Wparentheses;\ | ||
-Wpointer-sign;\ | ||
-Wshadow;\ | ||
-Wsign-compare;\ | ||
-Wswitch;\ | ||
-Wuninitialized;\ | ||
-Wunknown-pragmas;\ | ||
-Wunreachable-code;\ | ||
-Wunused-function;\ | ||
-Wunused-label;\ | ||
-Wunused-parameter;\ | ||
-Wunused-value;\ | ||
-Wunused-variable") | ||
|
||
add_executable(winprefs constants.c main.c reg_command.c shell.c) | ||
if(CMAKE_COMPILER_IS_GNUCC OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang") | ||
target_link_options(winprefs PRIVATE -municode) | ||
target_compile_options( | ||
winprefs PRIVATE ${GCC_CLANG_SHARED_C_FLAGS} | ||
$<$<CONFIG:Debug>:${GCC_CLANG_DEBUG_C_FLAGS}>) | ||
endif() | ||
install(TARGETS winprefs DESTINATION ${CMAKE_INSTALL_BINDIR}) |
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,5 @@ | ||
#include "constants.h" | ||
|
||
const size_t MAX_KEY_LENGTH = 255; | ||
const size_t MAX_VALUE_NAME = 16383; | ||
const size_t CMD_MAX_COMMAND_LENGTH = 8191; |
Oops, something went wrong.