pthreads
parent
d06240c2c5
commit
828cbeeecb
|
@ -7,6 +7,9 @@ option(ENABLE_TSAN "Enable the thread data race sanitizer" OFF)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
|
find_package(Threads)
|
||||||
|
|
||||||
option(BUILD_PARSE OFF)
|
option(BUILD_PARSE OFF)
|
||||||
option(BUILD_PROFILING OFF)
|
option(BUILD_PROFILING OFF)
|
||||||
option(BUILD_NBT OFF)
|
option(BUILD_NBT OFF)
|
||||||
|
@ -23,6 +26,16 @@ add_executable(insane_dns ${PROJECT_BUILD_FILES})
|
||||||
|
|
||||||
target_link_libraries(insane_dns BLT)
|
target_link_libraries(insane_dns BLT)
|
||||||
|
|
||||||
|
if(THREADS_HAVE_PTHREAD_ARG)
|
||||||
|
# annoying hack for asio on sandcastle
|
||||||
|
set_property(TARGET insane_dns PROPERTY COMPILE_OPTIONS "-pthread")
|
||||||
|
set_property(TARGET insane_dns PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread")
|
||||||
|
endif()
|
||||||
|
if(CMAKE_THREAD_LIBS_INIT)
|
||||||
|
target_link_libraries(insane_dns "${CMAKE_THREAD_LIBS_INIT}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
target_compile_options(insane_dns PRIVATE -Wall -Werror -Wpedantic -Wno-comment -Wno-format)
|
target_compile_options(insane_dns PRIVATE -Wall -Werror -Wpedantic -Wno-comment -Wno-format)
|
||||||
target_link_options(insane_dns PRIVATE -Wall -Werror -Wpedantic -Wno-comment -Wno-format)
|
target_link_options(insane_dns PRIVATE -Wall -Werror -Wpedantic -Wno-comment -Wno-format)
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -4,7 +4,7 @@
|
||||||
6 7548 1698352014994362013 CMakeFiles/insane_dns.dir/src/main.cpp.o 727da43cdbc82421
|
6 7548 1698352014994362013 CMakeFiles/insane_dns.dir/src/main.cpp.o 727da43cdbc82421
|
||||||
8 4855 1698249273492987213 libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler_v2.cpp.o 4f10bd0279063873
|
8 4855 1698249273492987213 libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler_v2.cpp.o 4f10bd0279063873
|
||||||
8 4299 1698249272936972914 libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o 66984105eaba6834
|
8 4299 1698249272936972914 libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o 66984105eaba6834
|
||||||
0 51 1698362776514136027 build.ninja 6eaded2198e1472a
|
0 51 1698364327441880111 build.ninja 6eaded2198e1472a
|
||||||
5 2141 1698249270784916812 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/format.cpp.o 9a4151eb8a13165e
|
5 2141 1698249270784916812 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/format.cpp.o 9a4151eb8a13165e
|
||||||
8 4025 1698351288619677206 libraries/BLT/CMakeFiles/BLT.dir/src/blt/parse/argparse.cpp.o 30865d3aadfb703
|
8 4025 1698351288619677206 libraries/BLT/CMakeFiles/BLT.dir/src/blt/parse/argparse.cpp.o 30865d3aadfb703
|
||||||
2075 2313 1698352009762451033 libraries/BLT/libBLT.a 806d74f40324f232
|
2075 2313 1698352009762451033 libraries/BLT/libBLT.a 806d74f40324f232
|
||||||
|
@ -15,3 +15,10 @@
|
||||||
8 3589 1698249272228954565 libraries/BLT/CMakeFiles/BLT.dir/src/blt/nbt/nbt.cpp.o 741b5851e86130d2
|
8 3589 1698249272228954565 libraries/BLT/CMakeFiles/BLT.dir/src/blt/nbt/nbt.cpp.o 741b5851e86130d2
|
||||||
5 1734 1698249270376906050 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/filesystem.cpp.o 5171d83ac5d9e0dc
|
5 1734 1698249270376906050 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/filesystem.cpp.o 5171d83ac5d9e0dc
|
||||||
7 1711 1698352009170461123 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/assert.cpp.o 2ae218d9777469fd
|
7 1711 1698352009170461123 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/assert.cpp.o 2ae218d9777469fd
|
||||||
|
8 1374 1698364331181784570 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/string.cpp.o 2e3de5470fa27489
|
||||||
|
7 1462 1698364331269782326 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/filesystem.cpp.o 5171d83ac5d9e0dc
|
||||||
|
8 2274 1698364332077761730 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/loader.cpp.o 3bb9d28d25c10d3b
|
||||||
|
7 2341 1698364332145759998 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/assert.cpp.o 2ae218d9777469fd
|
||||||
|
10 3017 1698364332817742883 libraries/BLT/CMakeFiles/BLT.dir/src/blt/nbt/nbt.cpp.o 741b5851e86130d2
|
||||||
|
9 3821 1698364333617722522 libraries/BLT/CMakeFiles/BLT.dir/src/blt/profiling/profiler.cpp.o 66984105eaba6834
|
||||||
|
10 4201 1698364333993712955 libraries/BLT/CMakeFiles/BLT.dir/src/blt/parse/argparse.cpp.o 30865d3aadfb703
|
||||||
|
|
|
@ -384,6 +384,8 @@ CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||||
//Name of generator toolset.
|
//Name of generator toolset.
|
||||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||||
|
//Test CMAKE_HAVE_LIBC_PTHREAD
|
||||||
|
CMAKE_HAVE_LIBC_PTHREAD:INTERNAL=1
|
||||||
//Source directory with the top level CMakeLists.txt file for this
|
//Source directory with the top level CMakeLists.txt file for this
|
||||||
// project
|
// project
|
||||||
CMAKE_HOME_DIRECTORY:INTERNAL=/home/brett/Documents/code/c++/Insane_DNS
|
CMAKE_HOME_DIRECTORY:INTERNAL=/home/brett/Documents/code/c++/Insane_DNS
|
||||||
|
@ -447,6 +449,8 @@ CMAKE_STRIP-ADVANCED:INTERNAL=1
|
||||||
CMAKE_UNAME:INTERNAL=/usr/bin/uname
|
CMAKE_UNAME:INTERNAL=/usr/bin/uname
|
||||||
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
|
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
|
||||||
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
||||||
|
//Details about finding Threads
|
||||||
|
FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()]
|
||||||
//ADVANCED property for variable: ZLIB_INCLUDE_DIR
|
//ADVANCED property for variable: ZLIB_INCLUDE_DIR
|
||||||
ZLIB_INCLUDE_DIR-ADVANCED:INTERNAL=1
|
ZLIB_INCLUDE_DIR-ADVANCED:INTERNAL=1
|
||||||
//ADVANCED property for variable: ZLIB_LIBRARY_DEBUG
|
//ADVANCED property for variable: ZLIB_LIBRARY_DEBUG
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
/usr/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/opt/brett/jetbrains/clion-install/bin/ninja/linux/x64/ninja -D ENABLE_ADDRSAN=ON -G Ninja -S /home/brett/Documents/code/c++/Insane_DNS -B /home/brett/Documents/code/c++/Insane_DNS/cmake-build-debug
|
/usr/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/opt/brett/jetbrains/clion-install/bin/ninja/linux/x64/ninja -D ENABLE_ADDRSAN=ON -G Ninja -S /home/brett/Documents/code/c++/Insane_DNS -B /home/brett/Documents/code/c++/Insane_DNS/cmake-build-debug
|
||||||
|
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
|
||||||
|
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
|
||||||
|
-- Found Threads: TRUE
|
||||||
Found Parallel Hashmaps
|
Found Parallel Hashmaps
|
||||||
Standard Files /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/assert.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/filesystem.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/format.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/loader.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/logging.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/string.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/system.cpp
|
Standard Files /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/assert.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/filesystem.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/format.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/loader.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/logging.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/string.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/std/system.cpp
|
||||||
Profiler Files /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/profiling/profiler.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/profiling/profiler_v2.cpp
|
Profiler Files /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/profiling/profiler.cpp;/home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/src/blt/profiling/profiler_v2.cpp
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Start testing: Oct 26 19:26 EDT
|
Start testing: Oct 26 19:52 EDT
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
End testing: Oct 26 19:26 EDT
|
End testing: Oct 26 19:52 EDT
|
||||||
|
|
|
@ -270,14 +270,14 @@ build libraries/BLT/all: phony libraries/BLT/libBLT.a
|
||||||
#############################################
|
#############################################
|
||||||
# Re-run CMake if any of its inputs changed.
|
# Re-run CMake if any of its inputs changed.
|
||||||
|
|
||||||
build build.ninja: RERUN_CMAKE | /home/brett/Documents/code/c++/Insane_DNS/CMakeLists.txt /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/CMakeLists.txt /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/include/blt/config.h.in /usr/share/cmake-3.25/Modules/CMakeCInformation.cmake /usr/share/cmake-3.25/Modules/CMakeCXXInformation.cmake /usr/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake /usr/share/cmake-3.25/Modules/CMakeGenericSystem.cmake /usr/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake /usr/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake /usr/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake /usr/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake /usr/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU-C.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU-CXX.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU.cmake /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake /usr/share/cmake-3.25/Modules/FindPackageMessage.cmake /usr/share/cmake-3.25/Modules/FindZLIB.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU-C.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU-CXX.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU.cmake /usr/share/cmake-3.25/Modules/Platform/Linux.cmake /usr/share/cmake-3.25/Modules/Platform/UnixPaths.cmake /usr/share/cmake-3.25/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.25.1/CMakeCCompiler.cmake CMakeFiles/3.25.1/CMakeCXXCompiler.cmake CMakeFiles/3.25.1/CMakeSystem.cmake
|
build build.ninja: RERUN_CMAKE | /home/brett/Documents/code/c++/Insane_DNS/CMakeLists.txt /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/CMakeLists.txt /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/include/blt/config.h.in /usr/share/cmake-3.25/Modules/CMakeCInformation.cmake /usr/share/cmake-3.25/Modules/CMakeCXXInformation.cmake /usr/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake /usr/share/cmake-3.25/Modules/CMakeGenericSystem.cmake /usr/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake /usr/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake /usr/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake /usr/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake /usr/share/cmake-3.25/Modules/CheckCSourceCompiles.cmake /usr/share/cmake-3.25/Modules/CheckIncludeFile.cmake /usr/share/cmake-3.25/Modules/CheckLibraryExists.cmake /usr/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU-C.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU-CXX.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU.cmake /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake /usr/share/cmake-3.25/Modules/FindPackageMessage.cmake /usr/share/cmake-3.25/Modules/FindThreads.cmake /usr/share/cmake-3.25/Modules/FindZLIB.cmake /usr/share/cmake-3.25/Modules/Internal/CheckSourceCompiles.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU-C.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU-CXX.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU.cmake /usr/share/cmake-3.25/Modules/Platform/Linux.cmake /usr/share/cmake-3.25/Modules/Platform/UnixPaths.cmake /usr/share/cmake-3.25/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.25.1/CMakeCCompiler.cmake CMakeFiles/3.25.1/CMakeCXXCompiler.cmake CMakeFiles/3.25.1/CMakeSystem.cmake
|
||||||
pool = console
|
pool = console
|
||||||
|
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
# A missing CMake input file is not an error.
|
# A missing CMake input file is not an error.
|
||||||
|
|
||||||
build /home/brett/Documents/code/c++/Insane_DNS/CMakeLists.txt /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/CMakeLists.txt /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/include/blt/config.h.in /usr/share/cmake-3.25/Modules/CMakeCInformation.cmake /usr/share/cmake-3.25/Modules/CMakeCXXInformation.cmake /usr/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake /usr/share/cmake-3.25/Modules/CMakeGenericSystem.cmake /usr/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake /usr/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake /usr/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake /usr/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake /usr/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU-C.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU-CXX.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU.cmake /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake /usr/share/cmake-3.25/Modules/FindPackageMessage.cmake /usr/share/cmake-3.25/Modules/FindZLIB.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU-C.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU-CXX.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU.cmake /usr/share/cmake-3.25/Modules/Platform/Linux.cmake /usr/share/cmake-3.25/Modules/Platform/UnixPaths.cmake /usr/share/cmake-3.25/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.25.1/CMakeCCompiler.cmake CMakeFiles/3.25.1/CMakeCXXCompiler.cmake CMakeFiles/3.25.1/CMakeSystem.cmake: phony
|
build /home/brett/Documents/code/c++/Insane_DNS/CMakeLists.txt /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/CMakeLists.txt /home/brett/Documents/code/c++/Insane_DNS/libraries/BLT/include/blt/config.h.in /usr/share/cmake-3.25/Modules/CMakeCInformation.cmake /usr/share/cmake-3.25/Modules/CMakeCXXInformation.cmake /usr/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake /usr/share/cmake-3.25/Modules/CMakeGenericSystem.cmake /usr/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake /usr/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake /usr/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake /usr/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake /usr/share/cmake-3.25/Modules/CheckCSourceCompiles.cmake /usr/share/cmake-3.25/Modules/CheckIncludeFile.cmake /usr/share/cmake-3.25/Modules/CheckLibraryExists.cmake /usr/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU-C.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU-CXX.cmake /usr/share/cmake-3.25/Modules/Compiler/GNU.cmake /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake /usr/share/cmake-3.25/Modules/FindPackageMessage.cmake /usr/share/cmake-3.25/Modules/FindThreads.cmake /usr/share/cmake-3.25/Modules/FindZLIB.cmake /usr/share/cmake-3.25/Modules/Internal/CheckSourceCompiles.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU-C.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU-CXX.cmake /usr/share/cmake-3.25/Modules/Platform/Linux-GNU.cmake /usr/share/cmake-3.25/Modules/Platform/Linux.cmake /usr/share/cmake-3.25/Modules/Platform/UnixPaths.cmake /usr/share/cmake-3.25/Modules/SelectLibraryConfigurations.cmake CMakeCache.txt CMakeFiles/3.25.1/CMakeCCompiler.cmake CMakeFiles/3.25.1/CMakeCXXCompiler.cmake CMakeFiles/3.25.1/CMakeSystem.cmake: phony
|
||||||
|
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -66,7 +66,7 @@ static constexpr bool NON_STRICT_REPLACE_ALL = true;
|
||||||
// was going to add TCP and ad blocking support
|
// was going to add TCP and ad blocking support
|
||||||
// that also isn't going to happen now.
|
// that also isn't going to happen now.
|
||||||
/** list of web address to download the ad block lists from */
|
/** list of web address to download the ad block lists from */
|
||||||
static constexpr std::vector<std::string> BLOCK_LISTS{};
|
static BLT_CPP20_CONSTEXPR std::vector<std::string> BLOCK_LISTS{};
|
||||||
/** true -> block ad DNS requests ; false -> do nothing */
|
/** true -> block ad DNS requests ; false -> do nothing */
|
||||||
static constexpr bool BLOCK_ADS = false;
|
static constexpr bool BLOCK_ADS = false;
|
||||||
/** true -> send back the REPLACEMENT_IP() ; false -> send back a fail state in the DNS request. */
|
/** true -> send back the REPLACEMENT_IP() ; false -> send back a fail state in the DNS request. */
|
||||||
|
|
Loading…
Reference in New Issue