### Set Installation Prefix Source: https://github.com/kkos/oniguruma/wiki/CMake-memo Configures the installation directory for the project. Use this to specify a custom location for installed files. ```bash cmake -DCMAKE_INSTALL_PREFIX=$HOME/tmp/xxx .. ``` -------------------------------- ### Install LLVM/Clang with Homebrew Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Mac-OSX Installs the LLVM compiler infrastructure, including Clang, which is required for building libFuzzer and Oniguruma with sanitizers. ```bash $ brew install --with-clang llvm ``` -------------------------------- ### Variable Syntax and Meta Character Example (SQL-like) Source: https://github.com/kkos/oniguruma/blob/master/index.html A C program showcasing the use of variable syntax and meta characters in Oniguruma, demonstrated with an SQL-like pattern matching example. ```c #include #include #define MAX_LEN 1024 int main() { int r; regex_tтелю; OnigErrorInfo einfo; char *pattern; char *str; OnigRegion *region; int i; pattern = "<\"[^\"]*\">\n"; str = "This is a <"test" > string."; r = onig_new(&телю, (UChar *)pattern, (UChar *)pattern + strlen(pattern), ONIG_OPTION_NONE, ONIG_ENCODING_ASCII, ONIG_SYNTAX_RUBY1.9, &einfo); if (r >= 0) { region = onig_region_new(); r = onureg(&телю, (UChar *)str, (UChar *)str + strlen(str), region, ONIG_OPTION_NONE); if (r >= 0) { for (i = 0; i < region->num; i++) { printf("Match found at %d-%d\n", region->beg[i], region->end[i]); printf(" -> %.*s\n", region->end[i] - region->beg[i], str + region->beg[i]); } } onig_region_free(region); } if (r < 0) { char sbuf[ONIG_MAX_ERROR_MESSAGE_LEN]; onig_error_code_to_str(sbuf, r); fprintf(stderr, "%s", sbuf); return(2); } onig_free(&телю); return 0; } ``` -------------------------------- ### Minimum Example Program Source: https://github.com/kkos/oniguruma/blob/master/index.html A basic C program demonstrating the minimal usage of the Oniguruma library. ```c #include #include int main() { int r; regex_tтелю; OnigErrorInfo einfo; char *pattern = "simple"; char *str = "simple string"; r = onig_new(&телю, (UChar *)pattern, (UChar *)pattern + 6, ONIG_OPTION_NONE, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo); if (r >= 0) { OnigRegion *region = onig_region_new(); r = onureg(&телю, (UChar *)str, (UChar *)str + 13, region, ONIG_OPTION_NONE); if (r >= 0) { printf("Match found at %d-%d\n", region->beg[0], region->end[0]); } onig_region_free(region); } if (r < 0) { char sbuf[ONIG_MAX_ERROR_MESSAGE_LEN]; onig_error_code_to_str(sbuf, r); fprintf(stderr, "%s", sbuf); return(2); } onig_free(&телю); return 0; } ``` -------------------------------- ### Generate Main Package Configuration File Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Configures the main 'Config.cmake' file using a template ('cmake/Config.cmake.in') and installs it to the specified destination. This file is used by other projects to find and use the installed library. ```cmake configure_package_config_file( "cmake/Config.cmake.in" "${project_config}" INSTALL_DESTINATION "${config_install_dir}" ) ``` -------------------------------- ### Install libfuzzer libraries Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Linux Copies the libfuzzer libraries to the /usr/local/lib directory for system-wide access. ```shell $ cd build/lib $ sudo cp libLLVMFuzzerNoMain.a /usr/local/lib/libLLVMFuzzer.a $ sudo cp libLLVMFuzzer.a /usr/local/lib/libLLVMFuzzerMain.a ``` -------------------------------- ### Install Oniguruma Targets Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Installs the Oniguruma library, including static libraries, runtime components, and header files. It also exports targets for use by other CMake projects. ```cmake install( TARGETS onig EXPORT "${TARGETS_EXPORT_NAME}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) ``` -------------------------------- ### Include GNUInstallDirs Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Includes the GNUInstallDirs module to define standard installation directories like CMAKE_INSTALL_LIBDIR, CMAKE_INSTALL_BINDIR, and CMAKE_INSTALL_INCLUDEDIR. ```cmake # Installation (https://github.com/forexample/package-example) # Introduce variables: # * CMAKE_INSTALL_LIBDIR # * CMAKE_INSTALL_BINDIR # * CMAKE_INSTALL_INCLUDEDIR include(GNUInstallDirs) ``` -------------------------------- ### Set Installation Directory for CMake Package Config Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Defines the installation directory for CMake package configuration files. This is typically within the lib/cmake/ directory. ```cmake set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") ``` -------------------------------- ### Run the Fuzzer with Input Directory Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Mac-OSX Executes the compiled libFuzzer-Oniguruma program. It takes an input directory containing seed corpus files to start the fuzzing process. ```bash $ mkdir in $ ./libfuzzer-onig in ``` -------------------------------- ### Determine PkgConfig Library Directory Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Sets the library directory for pkg-config, handling both absolute and relative installation paths to ensure correct library location information. ```cmake if(CMAKE_INSTALL_LIBDIR MATCHES "^/") set(onig_pkgconfig_libdir "${CMAKE_INSTALL_LIBDIR}") else() set(onig_pkgconfig_libdir "$\\{exec_prefix}/${CMAKE_INSTALL_LIBDIR}") endif() ``` -------------------------------- ### Define Exported Targets Name Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Sets the name for the exported targets in the CMake configuration files. This is used for linking against the installed library. ```cmake set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") ``` -------------------------------- ### Configure and build oniguruma Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Linux Configures the oniguruma project with clang and fuzzer sanitizers, then builds the library. ```shell $ cd oniguruma $ ./configure CC=clang LD=clang CFLAGS="-g -fsanitize=fuzzer,address" LDFLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=fuzzer,address" $ make ``` -------------------------------- ### Run libfuzzer-onig Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Linux Creates an input directory and runs the compiled libfuzzer-onig executable. ```shell $ mkdir in $ ./libffuzer-onig in ``` -------------------------------- ### Build libFuzzer from Source Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Mac-OSX Downloads the libFuzzer source code and compiles it into a static library. This library will be linked with the Oniguruma fuzzing target. ```bash $ svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer $ /usr/local/opt/llvm/bin/clang++ -c -g -O2 -std=c++11 Fuzzer/*.cpp -IFuzzer $ ar ruv libFuzzer.a Fuzzer*.o $ mv libFuzzer.a oniguruma ``` -------------------------------- ### Enable Testing Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt Enables the testing framework for the project. ```cmake enable_testing() ``` -------------------------------- ### Define Configuration File Names Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Sets the filenames for the generated package configuration files, including the version and main config files. ```cmake set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") ``` ```cmake set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") ``` -------------------------------- ### Build Windows Executable and Link Oniguruma Source: https://github.com/kkos/oniguruma/blob/master/windows/CMakeLists.txt Defines a Windows executable 'testc_windows' from 'testc.c' and links it against the 'onig' library. This is a standard build step for creating Windows applications that use the Oniguruma regex engine. ```cmake add_executable(testc_windows testc.c) target_link_libraries(testc_windows onig) ``` -------------------------------- ### Basic CMakeLists.txt for Oniguruma Executables Source: https://github.com/kkos/oniguruma/blob/master/sample/CMakeLists.txt This snippet defines the CMake build system for multiple C executables that depend on the Oniguruma library. It specifies the minimum required CMake version and project name, then adds each executable and links it to the 'onig' library. ```cmake cmake_minimum_required(VERSION 2.8) project(oniguruma_sample C) add_executable(crnl crnl.c) target_link_libraries(crnl onig) add_executable(callout callout.c) target_link_libraries(callout onig) add_executable(echo echo.c) target_link_libraries(echo onig) add_executable(count count.c) target_link_libraries(count onig) add_executable(encode encode.c) target_link_libraries(encode onig) add_executable(listcap listcap.c) target_link_libraries(listcap onig) add_executable(names names.c) target_link_libraries(names onig) add_executable(posix posix.c) target_link_libraries(posix onig) add_executable(simple simple.c) target_link_libraries(simple onig) add_executable(sql sql.c) target_link_libraries(sql onig) add_executable(syntax syntax.c) target_link_libraries(syntax onig) ``` -------------------------------- ### Build the libFuzzer-Oniguruma Executable Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Mac-OSX Compiles the main fuzzing executable by linking the Oniguruma library, the previously built libFuzzer static library, and the fuzzer entry point. Sanitizers are enabled here. ```bash $ cp contributed/libfuzzer-onig.cpp . $ /usr/local/opt/llvm/bin/clang++ -g libfuzzer-onig.cpp src/.libs/libonig.a libFuz\ zer.a -o libfuzzer-onig -fsanitize-coverage=edge -fsanitize=address ``` -------------------------------- ### Benchmark Results for Current Develop Branch Source: https://github.com/kkos/oniguruma/wiki/Benchmark-result-of-current-develop-branch Displays the performance results of the benchmark run on the current develop branch. It lists regular expressions and their execution times in milliseconds. ```text file size: 20045118, str len: 20045118 /Twain/: 19.8 msec. /(?i)Twain/: 56.7 msec. /[a-z]shing/: 16.1 msec. /Huck[a-zA-Z]+|Saw[a-zA-Z]+/: 78.2 msec. /\b\w+nn\b/: 1126.5 msec. /[a-q][^u-z]{13}x/: 110.6 msec. /Tom|Sawyer|Huckleberry|Finn/: 85.6 msec. /(?i)Tom|Sawyer|Huckleberry|Finn/: 625.8 msec. /.{0,2}(Tom|Sawyer|Huckleberry|Finn)/: 256.3 msec. /.{2,4}(Tom|Sawyer|Huckleberry|Finn)/: 370.7 msec. /Tom.{10,25}river|river.{10,25}Tom/: 127.8 msec. /[a-zA-Z]+ing/: 1080.1 msec. /\s[a-zA-Z]{0,12}ing\s/: 111.1 msec. /([A-Za-z]awyer|[A-Za-z]inn)\s/: 272.9 msec. /["'][^"']{0,30}[?!\.]["']/: 129.4 msec. ``` -------------------------------- ### Run Benchmark on Version 6.9.0 Source: https://github.com/kkos/oniguruma/wiki/Benchmark-result-of-current-develop-branch Executes the benchmark script on version 6.9.0 of Oniguruma. This provides performance metrics for comparison with the develop branch. ```bash 6.9.0 [benchmark]$ ./bench ``` -------------------------------- ### Benchmark Results for Version 6.9.0 Source: https://github.com/kkos/oniguruma/wiki/Benchmark-result-of-current-develop-branch Displays the performance results of the benchmark run on version 6.9.0. It lists regular expressions and their execution times in milliseconds for comparison. ```text file size: 20045118, str len: 20045118 /Twain/: 17.9 msec. /(?i)Twain/: 181.8 msec. /[a-z]shing/: 16.1 msec. /Huck[a-zA-Z]+|Saw[a-zA-Z]+/: 77.9 msec. /\b\w+nn\b/: 1179.2 msec. /[a-q][^u-z]{13}x/: 2001.9 msec. /Tom|Sawyer|Huckleberry|Finn/: 88.3 msec. /(?i)Tom|Sawyer|Huckleberry|Finn/: 928.5 msec. /.{0,2}(Tom|Sawyer|Huckleberry|Finn)/: 478.2 msec. /.{2,4}(Tom|Sawyer|Huckleberry|Finn)/: 742.3 msec. /Tom.{10,25}river|river.{10,25}Tom/: 130.0 msec. /[a-zA-Z]+ing/: 1214.8 msec. /\s[a-zA-Z]{0,12}ing\s/: 132.6 msec. /([A-Za-z]awyer|[A-Za-z]inn)\s/: 292.0 msec. /["'][^"']{0,30}[?!\.]["']/: 138.0 msec. ``` -------------------------------- ### Configure Oniguruma for Sanitized Builds Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Mac-OSX Configures the Oniguruma build system to use Clang and enable AddressSanitizer (ASan) and coverage instrumentation. This is crucial for effective fuzzing. ```bash $ cd oniguruma $ make clean $ ./configure CC=/usr/local/opt/llvm/bin/clang CFLAGS="-g -fsanitize-coverage=edge\ -fsanitize=address" LDFLAGS="-fsanitize-coverage=edge -fsanitize=address -L/us\ r/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib" ``` -------------------------------- ### Run Benchmark on Current Develop Branch Source: https://github.com/kkos/oniguruma/wiki/Benchmark-result-of-current-develop-branch Executes the benchmark script on the current develop branch of Oniguruma. This provides performance metrics for various regex patterns. ```bash Current develop branch [benchmark]$ ./bench ``` -------------------------------- ### Generate Package Version Configuration File Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Uses the 'write_basic_package_version_file' function to create a 'ConfigVersion.cmake' file. This file is essential for CMake's package management and specifies version compatibility. ```cmake write_basic_package_version_file( "${version_config}" COMPATIBILITY SameMajorVersion ) ``` -------------------------------- ### Add Options Test Executable for MSVC Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt Adds a test executable for option handling and links it with the Oniguruma library. Includes MSVC-specific compile options for UTF-8. ```cmake add_executable(test_options test_options.c) target_link_libraries(test_options onig) if(MSVC) target_compile_options(test_options PRIVATE /utf-8) endif(MSVC) ``` -------------------------------- ### GCC Version Information on Mac OSX Source: https://github.com/kkos/oniguruma/wiki/Benchmark-result-of-current-develop-branch Shows the GCC version and configuration details on a Mac OSX system. This information is relevant for understanding the compilation environment of the benchmarks. ```bash $ gcc --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-in\ clude-dir=/usr/include/c++/4.2.1 Apple LLVM version 10.0.0 (clang-1000.10.44.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ``` -------------------------------- ### Add Syntax Test Executable for MSVC Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt Adds a test executable for syntax checking and links it with the Oniguruma library. Includes MSVC-specific compile options for UTF-8. ```cmake add_executable(test_syntax test_syntax.c) target_link_libraries(test_syntax onig) if(MSVC) target_compile_options(test_syntax PRIVATE /utf-8) endif(MSVC) ``` -------------------------------- ### Compile libfuzzer-onig Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Linux Compiles the libfuzzer-onig executable using clang++, linking against the oniguruma library and the libfuzzer main library. ```shell $ cd contributed $ clang++ libfuzzer-onig.cpp ../src/.libs/libonig.a /usr/local/lib/libLLVMFuzzerMain.a -o libfuzzer-onig -fsanitize-coverage=trace-pc-guard -fsanitize=fuzzer,address ``` -------------------------------- ### GNU GCC Compiler Options Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Sets the Wall warning option for GCC compiler. ```cmake elseif(CMAKE_COMPILER_IS_GNUCC) target_compile_options(onig PRIVATE -Wall ) endif() ``` -------------------------------- ### Run Fuzzer with Custom Options Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Mac-OSX Executes the libFuzzer-Oniguruma program with specific runtime options, such as timeout and memory limits, and a different input directory. The '-max_len=XXX' option is a placeholder for a desired maximum input length. ```bash $ mkdir inXXX $ ./libfuzzer-onig -timeout=20 -rss_limit_mb=4000 -max_len=XXX inXXX ``` -------------------------------- ### Add Unicode Test Executable Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt Adds a test executable for Unicode handling and links it with the Oniguruma library. ```cmake add_executable(testcu testu.c) target_link_libraries(testcu onig) ``` -------------------------------- ### Compile Oniguruma Source: https://github.com/kkos/oniguruma/wiki/How-to-make-libfuzzer-oniguruma-program-on-Mac-OSX Compiles the Oniguruma library after configuration. This step ensures the library is ready to be linked with the fuzzer. ```bash $ make ``` -------------------------------- ### Include CMakePackageConfigHelpers Module Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Includes the CMake module that provides helper functions for creating package configuration files, such as 'write_basic_package_version_file'. ```cmake include(CMakePackageConfigHelpers) ``` -------------------------------- ### Parse SOVERSION from configure.ac Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Extracts SOVERSION information from the LTVERSION variable in configure.ac using string manipulation and regex. Sets target properties for SOVERSION, VERSION, and related version components. ```cmake file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" LTVERSION REGEX "^LTVERSION *= *\"?[0-9]+:[0-9]+:[0-9]+\"?") string(REGEX REPLACE "^LTVERSION *= *\"?([0-9]+:[0-9]+:[0-9]+)\"?.*$" "\1" LTVERSION "${LTVERSION}") string(REGEX REPLACE "^([0-9]+):([0-9]+):([0-9]+)" "\1" LTCURRENT ${LTVERSION}) string(REGEX REPLACE "^([0-9]+):([0-9]+):([0-9]+)" "\2" LTREVISION ${LTVERSION}) string(REGEX REPLACE "^([0-9]+):([0-9]+):([0-9]+)" "\3" LTAGE ${LTVERSION}) math(EXPR ONIG_SOVERSION "${LTCURRENT} - ${LTAGE}") set_target_properties(onig PROPERTIES SOVERSION "${ONIG_SOVERSION}" VERSION "${ONIG_SOVERSION}.${LTAGE}.${LTREVISION}") ``` -------------------------------- ### Add Regset Test Executable for MSVC Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt Adds a test executable for register set functionality and links it with the Oniguruma library. Includes MSVC-specific compile options for UTF-8. ```cmake add_executable(test_regset test_regset.c) target_link_libraries(test_regset onig) if(MSVC) target_compile_options(test_regset PRIVATE /utf-8) endif(MSVC) ``` -------------------------------- ### Add Backreference Test Executable for MSVC Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt Adds a test executable for backreference functionality and links it with the Oniguruma library. Includes MSVC-specific compile options for UTF-8. ```cmake add_executable(test_back test_back.c) target_link_libraries(test_back onig) if(MSVC) target_compile_options(test_back PRIVATE /utf-8) endif(MSVC) ``` -------------------------------- ### Add UTF-8 Test Executable for MSVC Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt Adds a test executable for UTF-8 functionality and links it with the Oniguruma library. Includes MSVC-specific compile options for UTF-8. ```cmake add_executable(test_utf8 test_utf8.c) target_link_libraries(test_utf8 onig) if(MSVC) target_compile_options(test_utf8 PRIVATE /utf-8) endif(MSVC) ``` -------------------------------- ### Add POSIX API Test Executable Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt Adds a test executable for POSIX API functionality if the ENABLE_POSIX_API flag is set, linking it with the Oniguruma library. ```cmake if(ENABLE_POSIX_API) add_executable(testp testp.c) target_link_libraries(testp onig) endif() ``` -------------------------------- ### Define Generated Files Directory Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Specifies a directory within the build tree where generated files, such as configuration files, will be placed. ```cmake set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") ``` -------------------------------- ### Add EUC Test Executable for Non-MSVC Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt Adds a test executable for EUC encoding on non-MSVC systems and links it with the Oniguruma library. Applies compiler warnings for Clang/GNU. ```cmake if(NOT MSVC) # EUC add_executable(testc testc.c) target_link_libraries(testc onig) if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU") target_compile_options(testc PRIVATE -Wall -Wno-invalid-source-encoding) endif() endif(NOT MSVC) ``` -------------------------------- ### MSVC Compiler Options Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Applies specific compile options for MSVC, including warning level and static runtime configurations based on build type. Also sets inline definition for older VS versions. ```cmake if(MSVC) target_compile_options(onig PRIVATE #/W4 ) if(MSVC_STATIC_RUNTIME) target_compile_options(onig PRIVATE $<$:/MT> $<$:/MTd> $<$:/MT> $<$:/MTd> ) endif() if(MSVC_VERSION LESS_EQUAL "1800") # <= VS2013 target_compile_definitions(onig PRIVATE -Dinline=__inline ) endif() endif() ``` -------------------------------- ### Set Character Set Compile Options for Non-MSVC Source: https://github.com/kkos/oniguruma/blob/master/windows/CMakeLists.txt Configures specific character set options for the compiler when not using MSVC (e.g., MinGW). This ensures correct handling of character encodings like CP932 for input and execution. ```cmake if(NOT MSVC) target_compile_options(testc_windows PRIVATE -finput-charset=cp932 -fexec-charset=cp932 ) endif(NOT MSVC) ``` -------------------------------- ### Define Namespace for Targets Source: https://github.com/kkos/oniguruma/blob/master/CMakeLists.txt Defines a namespace prefix for the project's targets, commonly used in CMake for clarity and to avoid name collisions. ```cmake set(namespace "${PROJECT_NAME}::") ``` -------------------------------- ### Conditional Build for Older MSVC Versions Source: https://github.com/kkos/oniguruma/blob/master/test/CMakeLists.txt This block prevents building tests on MSVC versions older than VS2015, which lack the '/utf-8' option. ```cmake if(MSVC) if(MSVC_VERSION LESS "1900") # < VS2015, no "/utf-8" option, can not build test return() endif() endif() ``` -------------------------------- ### OnigSyntaxType Structure Definition Source: https://github.com/kkos/oniguruma/blob/master/doc/SYNTAX.md Defines the structure used to configure Oniguruma's regex syntax, including operator flags, behavior settings, default options, and metacharacter tables. ```C typedef struct { unsigned int op; unsigned int op2; unsigned int behavior; OnigOptionType options; /* default option */ OnigMetaCharTableType meta_char_table; } OnigSyntaxType; ``` -------------------------------- ### Disable POSIX API Source: https://github.com/kkos/oniguruma/wiki/CMake-memo Disables the POSIX API during the CMake configuration. Use this when POSIX compatibility is not required or needs to be avoided. ```bash cmake -DENABLE_POSIX_API=OFF .. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.