diff --git a/.gitignore b/.gitignore index 7b50090..b785756 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /cmake-build-debug/ *.exe +/课程设计/ diff --git a/CMakeLists.txt b/CMakeLists.txt index ac7a61e..4ccbfb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,3 +5,4 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) add_subdirectory(level1) +add_subdirectory(课程设计) \ No newline at end of file diff --git a/level0/CMakeLists.txt b/level0/CMakeLists.txt new file mode 100644 index 0000000..6ccfd96 --- /dev/null +++ b/level0/CMakeLists.txt @@ -0,0 +1,3 @@ +project(level1) + +add_executable(p01_running_letter p01_running_letter/main.c) \ No newline at end of file diff --git a/level0/bubbleSort/CMakeLists.txt b/level0/bubbleSort/CMakeLists.txt new file mode 100644 index 0000000..510a85b --- /dev/null +++ b/level0/bubbleSort/CMakeLists.txt @@ -0,0 +1,3 @@ +project(level0) + +add_executable(bubbleSort) \ No newline at end of file diff --git a/level0/main.c b/level0/main.c new file mode 100644 index 0000000..2d06c49 --- /dev/null +++ b/level0/main.c @@ -0,0 +1,28 @@ +#include +int main() +{ + int vc[10]={163,347,45,346,775,512,856,411,195,685}; //An array for example. + + int count = -1; + while(count != 0){ + count = 0; + for(int i = 0;i<9;i++){ + if(vc[i]>vc[i+1]){ + int temp; + + temp = vc[i+1]; + vc[i+1] = vc[i]; + vc[i] = temp; + + count++; + } + } + } + + //Show the result. + for(int i=0;i<10;i++){ + printf("vc[%d]=%d ",i,vc[i]); + } + + return 0; +} \ No newline at end of file diff --git a/level1/CMakeLists.txt b/level1/CMakeLists.txt index 7c004e8..af05f9a 100644 --- a/level1/CMakeLists.txt +++ b/level1/CMakeLists.txt @@ -1,10 +1,13 @@ project(level1) - +add_compile_options(-finput-charset=utf-8 -fexec-charset=gbk) add_executable(p01_running_letter p01_running_letter/main.c) add_executable(p02_is_prime p02_is_prime/main.c) -add_executable(p03_all_primes p03_all_primes/main.c) +add_executable(p03_all_primes p03_all_primes/main.c + p03_all_primes/isPrime.h + p03_all_primes/isPrime.h + p03_all_primes/isPrime.c) add_executable(p04_goldbach p04_goldbach/main.c) @@ -14,8 +17,21 @@ add_executable(p06_hanoi p06_hanoi/main.c) add_executable(p07_maze p07_maze/main.c) -add_executable(p08_push_boxes p08_push_boxes/main.c) +add_executable(p08_push_boxes p08_push_boxes/main.c + p08_push_boxes/gameFunction.c + p08_push_boxes/gameFunction.h + p08_push_boxes/shellControl.h + p08_push_boxes/shellControl.c + p08_push_boxes/maploader.c + p08_push_boxes/maploader.h) + +add_executable(p09_linked_list p09_linked_list/main.c + p09_linked_list/linked_list.c + p09_linked_list/linked_list.h) -add_executable(p09_linked_list p09_linked_list/main.c) +add_executable(p10_warehouse p10_warehouse/main.c + p10_warehouse/shellControl.c + p10_warehouse/shellControl.h + p10_warehouse/function.c + p10_warehouse/function.h) -add_executable(p10_warehouse p10_warehouse/main.c) \ No newline at end of file diff --git a/level1/cmake-build-debug/.cmake/api/v1/query/cache-v2 b/level1/cmake-build-debug/.cmake/api/v1/query/cache-v2 new file mode 100644 index 0000000..e69de29 diff --git a/level1/cmake-build-debug/.cmake/api/v1/query/cmakeFiles-v1 b/level1/cmake-build-debug/.cmake/api/v1/query/cmakeFiles-v1 new file mode 100644 index 0000000..e69de29 diff --git a/level1/cmake-build-debug/.cmake/api/v1/query/codemodel-v2 b/level1/cmake-build-debug/.cmake/api/v1/query/codemodel-v2 new file mode 100644 index 0000000..e69de29 diff --git a/level1/cmake-build-debug/.cmake/api/v1/query/toolchains-v1 b/level1/cmake-build-debug/.cmake/api/v1/query/toolchains-v1 new file mode 100644 index 0000000..e69de29 diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/cache-v2-e9cff4a5af7679e44032.json b/level1/cmake-build-debug/.cmake/api/v1/reply/cache-v2-e9cff4a5af7679e44032.json new file mode 100644 index 0000000..a599044 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/cache-v2-e9cff4a5af7679e44032.json @@ -0,0 +1,1347 @@ +{ + "entries" : + [ + { + "name" : "CMAKE_ADDR2LINE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/addr2line.exe" + }, + { + "name" : "CMAKE_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/ar.exe" + }, + { + "name" : "CMAKE_BACKWARDS_COMPATIBILITY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "For backwards compatibility, what version of CMake commands and syntax should this version of CMake try to support." + } + ], + "type" : "STRING", + "value" : "2.4" + }, + { + "name" : "CMAKE_BUILD_TYPE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..." + } + ], + "type" : "STRING", + "value" : "Debug" + }, + { + "name" : "CMAKE_CACHEFILE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "This is the directory where this CMakeCache.txt was created" + } + ], + "type" : "INTERNAL", + "value" : "c:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug" + }, + { + "name" : "CMAKE_CACHE_MAJOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Major version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "3" + }, + { + "name" : "CMAKE_CACHE_MINOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Minor version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "26" + }, + { + "name" : "CMAKE_CACHE_PATCH_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Patch version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "4" + }, + { + "name" : "CMAKE_COLOR_DIAGNOSTICS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Enable colored diagnostics throughout." + } + ], + "type" : "BOOL", + "value" : "ON" + }, + { + "name" : "CMAKE_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake executable." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cmake.exe" + }, + { + "name" : "CMAKE_CPACK_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to cpack program executable." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cpack.exe" + }, + { + "name" : "CMAKE_CTEST_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to ctest program executable." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/ctest.exe" + }, + { + "name" : "CMAKE_CXX_COMPILER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "CXX compiler" + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/c++.exe" + }, + { + "name" : "CMAKE_CXX_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/gcc-ar.exe" + }, + { + "name" : "CMAKE_CXX_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/gcc-ranlib.exe" + }, + { + "name" : "CMAKE_CXX_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "-g" + }, + { + "name" : "CMAKE_CXX_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "-O3 -DNDEBUG" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_CXX_STANDARD_LIBRARIES", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Libraries linked by default with all C++ applications." + } + ], + "type" : "STRING", + "value" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32" + }, + { + "name" : "CMAKE_C_COMPILER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "C compiler" + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/gcc.exe" + }, + { + "name" : "CMAKE_C_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/gcc-ar.exe" + }, + { + "name" : "CMAKE_C_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/gcc-ranlib.exe" + }, + { + "name" : "CMAKE_C_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "-g" + }, + { + "name" : "CMAKE_C_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "-O3 -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_C_STANDARD_LIBRARIES", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Libraries linked by default with all C applications." + } + ], + "type" : "STRING", + "value" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32" + }, + { + "name" : "CMAKE_DLLTOOL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/dlltool.exe" + }, + { + "name" : "CMAKE_EXECUTABLE_FORMAT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Executable file format" + } + ], + "type" : "INTERNAL", + "value" : "Unknown" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXPORT_COMPILE_COMMANDS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Enable/Disable output of compile commands during generation." + } + ], + "type" : "BOOL", + "value" : "" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of external makefile project generator." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_FIND_PACKAGE_REDIRECTS_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake." + } + ], + "type" : "STATIC", + "value" : "C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/pkgRedirects" + }, + { + "name" : "CMAKE_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator." + } + ], + "type" : "INTERNAL", + "value" : "Ninja" + }, + { + "name" : "CMAKE_GENERATOR_INSTANCE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Generator instance identifier." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_PLATFORM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator platform." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_TOOLSET", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator toolset." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GNUtoMS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Convert GNU import libraries to MS format (requires Visual Studio)" + } + ], + "type" : "BOOL", + "value" : "OFF" + }, + { + "name" : "CMAKE_HOME_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Source directory with the top level CMakeLists.txt file for this project" + } + ], + "type" : "INTERNAL", + "value" : "C:/Users/l/CLionProjects/c2023-a/level1" + }, + { + "name" : "CMAKE_INSTALL_PREFIX", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Install path prefix, prepended onto install directories." + } + ], + "type" : "PATH", + "value" : "C:/Program Files (x86)/level1" + }, + { + "name" : "CMAKE_LINKER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/ld.exe" + }, + { + "name" : "CMAKE_MAKE_PROGRAM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "make program" + } + ], + "type" : "FILEPATH", + "value" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/ninja/win/x64/ninja.exe" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_NM", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/nm.exe" + }, + { + "name" : "CMAKE_NUMBER_OF_MAKEFILES", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "number of local generators" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_OBJCOPY", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/objcopy.exe" + }, + { + "name" : "CMAKE_OBJDUMP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/objdump.exe" + }, + { + "name" : "CMAKE_PLATFORM_INFO_INITIALIZED", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Platform information initialized" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_PROJECT_DESCRIPTION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_HOMEPAGE_URL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_NAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "level1" + }, + { + "name" : "CMAKE_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/ranlib.exe" + }, + { + "name" : "CMAKE_RC_COMPILER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "RC compiler" + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/windres.exe" + }, + { + "name" : "CMAKE_RC_COMPILER_WORKS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_RC_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags for Windows Resource Compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_RC_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags for Windows Resource Compiler during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_RC_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags for Windows Resource Compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_RC_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags for Windows Resource Compiler during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_RC_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags for Windows Resource Compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_READELF", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/readelf.exe" + }, + { + "name" : "CMAKE_ROOT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake installation." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SKIP_INSTALL_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when installing shared libraries, but are added when building." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_SKIP_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when using shared libraries." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STRIP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "D:/mingw64/bin/strip.exe" + }, + { + "name" : "CMAKE_VERBOSE_MAKEFILE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo." + } + ], + "type" : "BOOL", + "value" : "FALSE" + }, + { + "name" : "EXECUTABLE_OUTPUT_PATH", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Single output directory for building all executables." + } + ], + "type" : "PATH", + "value" : "" + }, + { + "name" : "LIBRARY_OUTPUT_PATH", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Single output directory for building all libraries." + } + ], + "type" : "PATH", + "value" : "" + }, + { + "name" : "_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "linker supports push/pop state" + } + ], + "type" : "INTERNAL", + "value" : "TRUE" + }, + { + "name" : "level1_BINARY_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug" + }, + { + "name" : "level1_IS_TOP_LEVEL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "ON" + }, + { + "name" : "level1_SOURCE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "C:/Users/l/CLionProjects/c2023-a/level1" + } + ], + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-c54416dc196075de1a21.json b/level1/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-c54416dc196075de1a21.json new file mode 100644 index 0000000..9629252 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-c54416dc196075de1a21.json @@ -0,0 +1,160 @@ +{ + "inputs" : + [ + { + "path" : "CMakeLists.txt" + }, + { + "isGenerated" : true, + "path" : "cmake-build-debug/CMakeFiles/3.26.4/CMakeSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeSystemSpecificInitialize.cmake" + }, + { + "isGenerated" : true, + "path" : "cmake-build-debug/CMakeFiles/3.26.4/CMakeCCompiler.cmake" + }, + { + "isGenerated" : true, + "path" : "cmake-build-debug/CMakeFiles/3.26.4/CMakeCXXCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeSystemSpecificInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeGenericSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeInitializeConfigs.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/WindowsPaths.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake" + }, + { + "isGenerated" : true, + "path" : "cmake-build-debug/CMakeFiles/3.26.4/CMakeRCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeRCInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-windres.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-C-ABI.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCXXInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU-CXX.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX-ABI.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake" + } + ], + "kind" : "cmakeFiles", + "paths" : + { + "build" : "C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug", + "source" : "C:/Users/l/CLionProjects/c2023-a/level1" + }, + "version" : + { + "major" : 1, + "minor" : 0 + } +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-af293e497193bb34e170.json b/level1/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-af293e497193bb34e170.json new file mode 100644 index 0000000..25d5839 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-af293e497193bb34e170.json @@ -0,0 +1,137 @@ +{ + "configurations" : + [ + { + "directories" : + [ + { + "build" : ".", + "jsonFile" : "directory-.-Debug-d0094a50bb2071803777.json", + "projectIndex" : 0, + "source" : ".", + "targetIndexes" : + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ] + } + ], + "name" : "Debug", + "projects" : + [ + { + "directoryIndexes" : + [ + 0 + ], + "name" : "level1", + "targetIndexes" : + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ] + } + ], + "targets" : + [ + { + "directoryIndex" : 0, + "id" : "p01_running_letter::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p01_running_letter-Debug-67d8052e5b6bcbb108f6.json", + "name" : "p01_running_letter", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "p02_is_prime::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p02_is_prime-Debug-d250d0dd29186f8450c5.json", + "name" : "p02_is_prime", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "p03_all_primes::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p03_all_primes-Debug-1155fc035063964fc83b.json", + "name" : "p03_all_primes", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "p04_goldbach::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p04_goldbach-Debug-f4f2f0f8438f2852946d.json", + "name" : "p04_goldbach", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "p05_encrypt_decrypt::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p05_encrypt_decrypt-Debug-c079b4803aff599d7611.json", + "name" : "p05_encrypt_decrypt", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "p06_hanoi::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p06_hanoi-Debug-01189dcd811536b328f7.json", + "name" : "p06_hanoi", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "p07_maze::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p07_maze-Debug-06a64fc336cd3e0a7b08.json", + "name" : "p07_maze", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "p08_push_boxes::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p08_push_boxes-Debug-3ce0588c154134c302e3.json", + "name" : "p08_push_boxes", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "p09_linked_list::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p09_linked_list-Debug-7fd40016a31e73a8b19b.json", + "name" : "p09_linked_list", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "p10_warehouse::@6890427a1f51a3e7e1df", + "jsonFile" : "target-p10_warehouse-Debug-ddc6dbad3d7bb12d9eda.json", + "name" : "p10_warehouse", + "projectIndex" : 0 + } + ] + } + ], + "kind" : "codemodel", + "paths" : + { + "build" : "C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug", + "source" : "C:/Users/l/CLionProjects/c2023-a/level1" + }, + "version" : + { + "major" : 2, + "minor" : 5 + } +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/directory-.-Debug-d0094a50bb2071803777.json b/level1/cmake-build-debug/.cmake/api/v1/reply/directory-.-Debug-d0094a50bb2071803777.json new file mode 100644 index 0000000..3a67af9 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/directory-.-Debug-d0094a50bb2071803777.json @@ -0,0 +1,14 @@ +{ + "backtraceGraph" : + { + "commands" : [], + "files" : [], + "nodes" : [] + }, + "installers" : [], + "paths" : + { + "build" : ".", + "source" : "." + } +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/index-2023-10-26T05-13-26-0889.json b/level1/cmake-build-debug/.cmake/api/v1/reply/index-2023-10-26T05-13-26-0889.json new file mode 100644 index 0000000..932309d --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/index-2023-10-26T05-13-26-0889.json @@ -0,0 +1,108 @@ +{ + "cmake" : + { + "generator" : + { + "multiConfig" : false, + "name" : "Ninja" + }, + "paths" : + { + "cmake" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cmake.exe", + "cpack" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cpack.exe", + "ctest" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/ctest.exe", + "root" : "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26" + }, + "version" : + { + "isDirty" : false, + "major" : 3, + "minor" : 26, + "patch" : 4, + "string" : "3.26.4", + "suffix" : "" + } + }, + "objects" : + [ + { + "jsonFile" : "codemodel-v2-af293e497193bb34e170.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 5 + } + }, + { + "jsonFile" : "cache-v2-e9cff4a5af7679e44032.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "cmakeFiles-v1-c54416dc196075de1a21.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + { + "jsonFile" : "toolchains-v1-b538481a5beece8318e4.json", + "kind" : "toolchains", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + ], + "reply" : + { + "cache-v2" : + { + "jsonFile" : "cache-v2-e9cff4a5af7679e44032.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + "cmakeFiles-v1" : + { + "jsonFile" : "cmakeFiles-v1-c54416dc196075de1a21.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + "codemodel-v2" : + { + "jsonFile" : "codemodel-v2-af293e497193bb34e170.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 5 + } + }, + "toolchains-v1" : + { + "jsonFile" : "toolchains-v1-b538481a5beece8318e4.json", + "kind" : "toolchains", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + } +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p01_running_letter-Debug-67d8052e5b6bcbb108f6.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p01_running_letter-Debug-67d8052e5b6bcbb108f6.json new file mode 100644 index 0000000..f0fdf0a --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p01_running_letter-Debug-67d8052e5b6bcbb108f6.json @@ -0,0 +1,113 @@ +{ + "artifacts" : + [ + { + "path" : "p01_running_letter.exe" + }, + { + "path" : "p01_running_letter.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 3, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0 + ] + } + ], + "id" : "p01_running_letter::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p01_running_letter", + "nameOnDisk" : "p01_running_letter.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p01_running_letter/main.c", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p02_is_prime-Debug-d250d0dd29186f8450c5.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p02_is_prime-Debug-d250d0dd29186f8450c5.json new file mode 100644 index 0000000..42196ec --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p02_is_prime-Debug-d250d0dd29186f8450c5.json @@ -0,0 +1,113 @@ +{ + "artifacts" : + [ + { + "path" : "p02_is_prime.exe" + }, + { + "path" : "p02_is_prime.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 5, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0 + ] + } + ], + "id" : "p02_is_prime::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p02_is_prime", + "nameOnDisk" : "p02_is_prime.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p02_is_prime/main.c", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p03_all_primes-Debug-1155fc035063964fc83b.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p03_all_primes-Debug-1155fc035063964fc83b.json new file mode 100644 index 0000000..2a1285f --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p03_all_primes-Debug-1155fc035063964fc83b.json @@ -0,0 +1,133 @@ +{ + "artifacts" : + [ + { + "path" : "p03_all_primes.exe" + }, + { + "path" : "p03_all_primes.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 7, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0, + 2 + ] + } + ], + "id" : "p03_all_primes::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p03_all_primes", + "nameOnDisk" : "p03_all_primes.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 2 + ] + }, + { + "name" : "Header Files", + "sourceIndexes" : + [ + 1 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p03_all_primes/main.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : "p03_all_primes/isPrime.h", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p03_all_primes/isPrime.c", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p04_goldbach-Debug-f4f2f0f8438f2852946d.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p04_goldbach-Debug-f4f2f0f8438f2852946d.json new file mode 100644 index 0000000..d7408ab --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p04_goldbach-Debug-f4f2f0f8438f2852946d.json @@ -0,0 +1,113 @@ +{ + "artifacts" : + [ + { + "path" : "p04_goldbach.exe" + }, + { + "path" : "p04_goldbach.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 12, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0 + ] + } + ], + "id" : "p04_goldbach::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p04_goldbach", + "nameOnDisk" : "p04_goldbach.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p04_goldbach/main.c", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p05_encrypt_decrypt-Debug-c079b4803aff599d7611.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p05_encrypt_decrypt-Debug-c079b4803aff599d7611.json new file mode 100644 index 0000000..424b4e9 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p05_encrypt_decrypt-Debug-c079b4803aff599d7611.json @@ -0,0 +1,113 @@ +{ + "artifacts" : + [ + { + "path" : "p05_encrypt_decrypt.exe" + }, + { + "path" : "p05_encrypt_decrypt.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 14, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0 + ] + } + ], + "id" : "p05_encrypt_decrypt::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p05_encrypt_decrypt", + "nameOnDisk" : "p05_encrypt_decrypt.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p05_encrypt_decrypt/main.c", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p06_hanoi-Debug-01189dcd811536b328f7.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p06_hanoi-Debug-01189dcd811536b328f7.json new file mode 100644 index 0000000..ae4e7d1 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p06_hanoi-Debug-01189dcd811536b328f7.json @@ -0,0 +1,113 @@ +{ + "artifacts" : + [ + { + "path" : "p06_hanoi.exe" + }, + { + "path" : "p06_hanoi.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 16, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0 + ] + } + ], + "id" : "p06_hanoi::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p06_hanoi", + "nameOnDisk" : "p06_hanoi.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p06_hanoi/main.c", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p07_maze-Debug-06a64fc336cd3e0a7b08.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p07_maze-Debug-06a64fc336cd3e0a7b08.json new file mode 100644 index 0000000..bd89fb9 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p07_maze-Debug-06a64fc336cd3e0a7b08.json @@ -0,0 +1,113 @@ +{ + "artifacts" : + [ + { + "path" : "p07_maze.exe" + }, + { + "path" : "p07_maze.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 18, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0 + ] + } + ], + "id" : "p07_maze::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p07_maze", + "nameOnDisk" : "p07_maze.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p07_maze/main.c", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p08_push_boxes-Debug-3ce0588c154134c302e3.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p08_push_boxes-Debug-3ce0588c154134c302e3.json new file mode 100644 index 0000000..0b66d36 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p08_push_boxes-Debug-3ce0588c154134c302e3.json @@ -0,0 +1,161 @@ +{ + "artifacts" : + [ + { + "path" : "p08_push_boxes.exe" + }, + { + "path" : "p08_push_boxes.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 20, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0, + 1, + 4, + 5 + ] + } + ], + "id" : "p08_push_boxes::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p08_push_boxes", + "nameOnDisk" : "p08_push_boxes.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 1, + 4, + 5 + ] + }, + { + "name" : "Header Files", + "sourceIndexes" : + [ + 2, + 3, + 6 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p08_push_boxes/main.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p08_push_boxes/gameFunction.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : "p08_push_boxes/gameFunction.h", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : "p08_push_boxes/shellControl.h", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p08_push_boxes/shellControl.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p08_push_boxes/maploader.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : "p08_push_boxes/maploader.h", + "sourceGroupIndex" : 1 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p09_linked_list-Debug-7fd40016a31e73a8b19b.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p09_linked_list-Debug-7fd40016a31e73a8b19b.json new file mode 100644 index 0000000..42bd1c4 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p09_linked_list-Debug-7fd40016a31e73a8b19b.json @@ -0,0 +1,133 @@ +{ + "artifacts" : + [ + { + "path" : "p09_linked_list.exe" + }, + { + "path" : "p09_linked_list.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 28, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0, + 1 + ] + } + ], + "id" : "p09_linked_list::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p09_linked_list", + "nameOnDisk" : "p09_linked_list.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 1 + ] + }, + { + "name" : "Header Files", + "sourceIndexes" : + [ + 2 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p09_linked_list/main.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p09_linked_list/linked_list.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : "p09_linked_list/linked_list.h", + "sourceGroupIndex" : 1 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/target-p10_warehouse-Debug-ddc6dbad3d7bb12d9eda.json b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p10_warehouse-Debug-ddc6dbad3d7bb12d9eda.json new file mode 100644 index 0000000..7f9f338 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/target-p10_warehouse-Debug-ddc6dbad3d7bb12d9eda.json @@ -0,0 +1,147 @@ +{ + "artifacts" : + [ + { + "path" : "p10_warehouse.exe" + }, + { + "path" : "p10_warehouse.pdb" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_compile_options" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 32, + "parent" : 0 + }, + { + "command" : 1, + "file" : 0, + "line" : 2, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-g -fdiagnostics-color=always" + }, + { + "backtrace" : 2, + "fragment" : "-finput-charset=utf-8" + }, + { + "backtrace" : 2, + "fragment" : "-fexec-charset=gbk" + } + ], + "language" : "C", + "sourceIndexes" : + [ + 0, + 1, + 3 + ] + } + ], + "id" : "p10_warehouse::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-g", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32", + "role" : "libraries" + } + ], + "language" : "C" + }, + "name" : "p10_warehouse", + "nameOnDisk" : "p10_warehouse.exe", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 1, + 3 + ] + }, + { + "name" : "Header Files", + "sourceIndexes" : + [ + 2, + 4 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p10_warehouse/main.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p10_warehouse/shellControl.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : "p10_warehouse/shellControl.h", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "p10_warehouse/function.c", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : "p10_warehouse/function.h", + "sourceGroupIndex" : 1 + } + ], + "type" : "EXECUTABLE" +} diff --git a/level1/cmake-build-debug/.cmake/api/v1/reply/toolchains-v1-b538481a5beece8318e4.json b/level1/cmake-build-debug/.cmake/api/v1/reply/toolchains-v1-b538481a5beece8318e4.json new file mode 100644 index 0000000..04ec245 --- /dev/null +++ b/level1/cmake-build-debug/.cmake/api/v1/reply/toolchains-v1-b538481a5beece8318e4.json @@ -0,0 +1,133 @@ +{ + "kind" : "toolchains", + "toolchains" : + [ + { + "compiler" : + { + "id" : "GNU", + "implicit" : + { + "includeDirectories" : + [ + "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include", + "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed", + "D:/mingw64/x86_64-w64-mingw32/include" + ], + "linkDirectories" : + [ + "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0", + "D:/mingw64/lib/gcc", + "D:/mingw64/x86_64-w64-mingw32/lib", + "D:/mingw64/lib" + ], + "linkFrameworkDirectories" : [], + "linkLibraries" : + [ + "mingw32", + "gcc", + "moldname", + "mingwex", + "advapi32", + "shell32", + "user32", + "kernel32", + "iconv", + "mingw32", + "gcc", + "moldname", + "mingwex" + ] + }, + "path" : "D:/mingw64/bin/gcc.exe", + "version" : "8.1.0" + }, + "language" : "C", + "sourceFileExtensions" : + [ + "c", + "m" + ] + }, + { + "compiler" : + { + "id" : "GNU", + "implicit" : + { + "includeDirectories" : + [ + "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++", + "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32", + "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward", + "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include", + "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed", + "D:/mingw64/x86_64-w64-mingw32/include" + ], + "linkDirectories" : + [ + "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0", + "D:/mingw64/lib/gcc", + "D:/mingw64/x86_64-w64-mingw32/lib", + "D:/mingw64/lib" + ], + "linkFrameworkDirectories" : [], + "linkLibraries" : + [ + "stdc++", + "mingw32", + "gcc_s", + "gcc", + "moldname", + "mingwex", + "advapi32", + "shell32", + "user32", + "kernel32", + "iconv", + "mingw32", + "gcc_s", + "gcc", + "moldname", + "mingwex" + ] + }, + "path" : "D:/mingw64/bin/c++.exe", + "version" : "8.1.0" + }, + "language" : "CXX", + "sourceFileExtensions" : + [ + "C", + "M", + "c++", + "cc", + "cpp", + "cxx", + "mm", + "mpp", + "CPP", + "ixx", + "cppm" + ] + }, + { + "compiler" : + { + "implicit" : {}, + "path" : "D:/mingw64/bin/windres.exe" + }, + "language" : "RC", + "sourceFileExtensions" : + [ + "rc", + "RC" + ] + } + ], + "version" : + { + "major" : 1, + "minor" : 0 + } +} diff --git a/level1/cmake-build-debug/CMakeCache.txt b/level1/cmake-build-debug/CMakeCache.txt new file mode 100644 index 0000000..26950fa --- /dev/null +++ b/level1/cmake-build-debug/CMakeCache.txt @@ -0,0 +1,420 @@ +# This is the CMakeCache file. +# For build in directory: c:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug +# It was generated by CMake: C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cmake.exe +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=D:/mingw64/bin/addr2line.exe + +//Path to a program. +CMAKE_AR:FILEPATH=D:/mingw64/bin/ar.exe + +//For backwards compatibility, what version of CMake commands and +// syntax should this version of CMake try to support. +CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4 + +//Choose the type of build, options are: None Debug Release RelWithDebInfo +// MinSizeRel ... +CMAKE_BUILD_TYPE:STRING=Debug + +//Enable colored diagnostics throughout. +CMAKE_COLOR_DIAGNOSTICS:BOOL=ON + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=D:/mingw64/bin/c++.exe + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=D:/mingw64/bin/gcc-ar.exe + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=D:/mingw64/bin/gcc-ranlib.exe + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Libraries linked by default with all C++ applications. +CMAKE_CXX_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + +//C compiler +CMAKE_C_COMPILER:FILEPATH=D:/mingw64/bin/gcc.exe + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=D:/mingw64/bin/gcc-ar.exe + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=D:/mingw64/bin/gcc-ranlib.exe + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Libraries linked by default with all C applications. +CMAKE_C_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=D:/mingw64/bin/dlltool.exe + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= + +//Value Computed by CMake. +CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/pkgRedirects + +//Convert GNU import libraries to MS format (requires Visual Studio) +CMAKE_GNUtoMS:BOOL=OFF + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/level1 + +//Path to a program. +CMAKE_LINKER:FILEPATH=D:/mingw64/bin/ld.exe + +//make program +CMAKE_MAKE_PROGRAM:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/ninja/win/x64/ninja.exe + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=D:/mingw64/bin/nm.exe + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=D:/mingw64/bin/objcopy.exe + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=D:/mingw64/bin/objdump.exe + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=level1 + +//Path to a program. +CMAKE_RANLIB:FILEPATH=D:/mingw64/bin/ranlib.exe + +//RC compiler +CMAKE_RC_COMPILER:FILEPATH=D:/mingw64/bin/windres.exe + +//Flags for Windows Resource Compiler during all build types. +CMAKE_RC_FLAGS:STRING= + +//Flags for Windows Resource Compiler during DEBUG builds. +CMAKE_RC_FLAGS_DEBUG:STRING= + +//Flags for Windows Resource Compiler during MINSIZEREL builds. +CMAKE_RC_FLAGS_MINSIZEREL:STRING= + +//Flags for Windows Resource Compiler during RELEASE builds. +CMAKE_RC_FLAGS_RELEASE:STRING= + +//Flags for Windows Resource Compiler during RELWITHDEBINFO builds. +CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_READELF:FILEPATH=D:/mingw64/bin/readelf.exe + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=D:/mingw64/bin/strip.exe + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Single output directory for building all executables. +EXECUTABLE_OUTPUT_PATH:PATH= + +//Single output directory for building all libraries. +LIBRARY_OUTPUT_PATH:PATH= + +//Value Computed by CMake +level1_BINARY_DIR:STATIC=C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug + +//Value Computed by CMake +level1_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +level1_SOURCE_DIR:STATIC=C:/Users/l/CLionProjects/c2023-a/level1 + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=26 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=4 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cmake.exe +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cpack.exe +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/ctest.exe +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES +CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES +CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Ninja +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/l/CLionProjects/c2023-a/level1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_COMPILER +CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1 +CMAKE_RC_COMPILER_WORKS:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS +CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG +CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL +CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE +CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO +CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//linker supports push/pop piece +_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE + diff --git a/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeCCompiler.cmake b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeCCompiler.cmake new file mode 100644 index 0000000..ddf375c --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeCCompiler.cmake @@ -0,0 +1,72 @@ +set(CMAKE_C_COMPILER "D:/mingw64/bin/gcc.exe") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "8.1.0") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17") +set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") +set(CMAKE_C17_COMPILE_FEATURES "c_std_17") +set(CMAKE_C23_COMPILE_FEATURES "") + +set(CMAKE_C_PLATFORM_ID "MinGW") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU") +set(CMAKE_C_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "D:/mingw64/bin/ar.exe") +set(CMAKE_C_COMPILER_AR "D:/mingw64/bin/gcc-ar.exe") +set(CMAKE_RANLIB "D:/mingw64/bin/ranlib.exe") +set(CMAKE_C_COMPILER_RANLIB "D:/mingw64/bin/gcc-ranlib.exe") +set(CMAKE_LINKER "D:/mingw64/bin/ld.exe") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "") +set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_C_LIBRARY_ARCHITECTURE "") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed;D:/mingw64/x86_64-w64-mingw32/include") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "mingw32;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc;moldname;mingwex") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0;D:/mingw64/lib/gcc;D:/mingw64/x86_64-w64-mingw32/lib;D:/mingw64/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeCXXCompiler.cmake b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeCXXCompiler.cmake new file mode 100644 index 0000000..dbdfbc2 --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeCXXCompiler.cmake @@ -0,0 +1,83 @@ +set(CMAKE_CXX_COMPILER "D:/mingw64/bin/c++.exe") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "8.1.0") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") +set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") +set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20") +set(CMAKE_CXX23_COMPILE_FEATURES "") + +set(CMAKE_CXX_PLATFORM_ID "MinGW") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU") +set(CMAKE_CXX_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "D:/mingw64/bin/ar.exe") +set(CMAKE_CXX_COMPILER_AR "D:/mingw64/bin/gcc-ar.exe") +set(CMAKE_RANLIB "D:/mingw64/bin/ranlib.exe") +set(CMAKE_CXX_COMPILER_RANLIB "D:/mingw64/bin/gcc-ranlib.exe") +set(CMAKE_LINKER "D:/mingw64/bin/ld.exe") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + +foreach (lang C OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID_RUN) + foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) + list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) + endforeach() + endif() +endforeach() + +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "8") +set(CMAKE_CXX_COMPILER_ABI "") +set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed;D:/mingw64/x86_64-w64-mingw32/include") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;mingw32;gcc_s;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc_s;gcc;moldname;mingwex") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0;D:/mingw64/lib/gcc;D:/mingw64/x86_64-w64-mingw32/lib;D:/mingw64/lib") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeDetermineCompilerABI_C.bin b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeDetermineCompilerABI_C.bin new file mode 100644 index 0000000..e69de29 diff --git a/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeDetermineCompilerABI_CXX.bin b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeDetermineCompilerABI_CXX.bin new file mode 100644 index 0000000..e69de29 diff --git a/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeRCCompiler.cmake b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeRCCompiler.cmake new file mode 100644 index 0000000..1a052cd --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeRCCompiler.cmake @@ -0,0 +1,6 @@ +set(CMAKE_RC_COMPILER "D:/mingw64/bin/windres.exe") +set(CMAKE_RC_COMPILER_ARG1 "") +set(CMAKE_RC_COMPILER_LOADED 1) +set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC) +set(CMAKE_RC_OUTPUT_EXTENSION .obj) +set(CMAKE_RC_COMPILER_ENV_VAR "RC") diff --git a/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeSystem.cmake b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeSystem.cmake new file mode 100644 index 0000000..e1deade --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/3.26.4/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Windows-10.0.22621") +set(CMAKE_HOST_SYSTEM_NAME "Windows") +set(CMAKE_HOST_SYSTEM_VERSION "10.0.22621") +set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") + + + +set(CMAKE_SYSTEM "Windows-10.0.22621") +set(CMAKE_SYSTEM_NAME "Windows") +set(CMAKE_SYSTEM_VERSION "10.0.22621") +set(CMAKE_SYSTEM_PROCESSOR "AMD64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/level1/cmake-build-debug/CMakeFiles/3.26.4/CompilerIdC/CMakeCCompilerId.c b/level1/cmake-build-debug/CMakeFiles/3.26.4/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000..88155ff --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/3.26.4/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,866 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__open_xl__) && defined(__clang__) +# define COMPILER_ID "IBMClang" +# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) +# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) +# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) + + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TASKING__) +# define COMPILER_ID "Tasking" + # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000) + # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100) +# define COMPILER_VERSION_INTERNAL DEC(__VERSION__) + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) +# define COMPILER_ID "LCC" +# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100) +# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100) +# if defined(__LCC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) +# endif +# if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define SIMULATE_ID "GNU" +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(_ADI_COMPILER) +# define COMPILER_ID "ADSP" +#if defined(__VERSIONNUM__) + /* __VERSIONNUM__ = 0xVVRRPPTT */ +# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) +# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) +# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) +# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +# elif defined(_ADI_COMPILER) +# define PLATFORM_ID "ADSP" + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +# elif defined(__ADSPSHARC__) +# define ARCHITECTURE_ID "SHARC" + +# elif defined(__ADSPBLACKFIN__) +# define ARCHITECTURE_ID "Blackfin" + +#elif defined(__TASKING__) + +# if defined(__CTC__) || defined(__CPTC__) +# define ARCHITECTURE_ID "TriCore" + +# elif defined(__CMCS__) +# define ARCHITECTURE_ID "MCS" + +# elif defined(__CARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__CARC__) +# define ARCHITECTURE_ID "ARC" + +# elif defined(__C51__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__CPCP__) +# define ARCHITECTURE_ID "PCP" + +# else +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if !defined(__STDC__) && !defined(__clang__) +# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) +# define C_VERSION "90" +# else +# define C_VERSION +# endif +#elif __STDC_VERSION__ > 201710L +# define C_VERSION "23" +#elif __STDC_VERSION__ >= 201710L +# define C_VERSION "17" +#elif __STDC_VERSION__ >= 201000L +# define C_VERSION "11" +#elif __STDC_VERSION__ >= 199901L +# define C_VERSION "99" +#else +# define C_VERSION "90" +#endif +const char* info_language_standard_default = + "INFO" ":" "standard_default[" C_VERSION "]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/level1/cmake-build-debug/CMakeFiles/3.26.4/CompilerIdCXX/CMakeCXXCompilerId.cpp b/level1/cmake-build-debug/CMakeFiles/3.26.4/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..746b167 --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/3.26.4/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,855 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__open_xl__) && defined(__clang__) +# define COMPILER_ID "IBMClang" +# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) +# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) +# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) + + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TASKING__) +# define COMPILER_ID "Tasking" + # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000) + # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100) +# define COMPILER_VERSION_INTERNAL DEC(__VERSION__) + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) +# define COMPILER_ID "LCC" +# define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100) +# define COMPILER_VERSION_MINOR DEC(__LCC__ % 100) +# if defined(__LCC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) +# endif +# if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define SIMULATE_ID "GNU" +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(_ADI_COMPILER) +# define COMPILER_ID "ADSP" +#if defined(__VERSIONNUM__) + /* __VERSIONNUM__ = 0xVVRRPPTT */ +# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) +# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) +# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) +# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +# elif defined(_ADI_COMPILER) +# define PLATFORM_ID "ADSP" + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +# elif defined(__ADSPSHARC__) +# define ARCHITECTURE_ID "SHARC" + +# elif defined(__ADSPBLACKFIN__) +# define ARCHITECTURE_ID "Blackfin" + +#elif defined(__TASKING__) + +# if defined(__CTC__) || defined(__CPTC__) +# define ARCHITECTURE_ID "TriCore" + +# elif defined(__CMCS__) +# define ARCHITECTURE_ID "MCS" + +# elif defined(__CARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__CARC__) +# define ARCHITECTURE_ID "ARC" + +# elif defined(__C51__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__CPCP__) +# define ARCHITECTURE_ID "PCP" + +# else +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_standard_default = "INFO" ":" "standard_default[" +#if CXX_STD > 202002L + "23" +#elif CXX_STD > 201703L + "20" +#elif CXX_STD >= 201703L + "17" +#elif CXX_STD >= 201402L + "14" +#elif CXX_STD >= 201103L + "11" +#else + "98" +#endif +"]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} diff --git a/level1/cmake-build-debug/CMakeFiles/CMakeConfigureLog.yaml b/level1/cmake-build-debug/CMakeFiles/CMakeConfigureLog.yaml new file mode 100644 index 0000000..c0f3b0d --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/CMakeConfigureLog.yaml @@ -0,0 +1,554 @@ + +--- +events: + - + kind: "message-v1" + backtrace: + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineSystem.cmake:204 (message)" + - "CMakeLists.txt:1 (project)" + message: | + The system is: Windows - 10.0.22621 - AMD64 + - + kind: "message-v1" + backtrace: + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:17 (message)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCCompiler.cmake:123 (CMAKE_DETERMINE_COMPILER_ID)" + - "CMakeLists.txt:1 (project)" + message: | + Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. + Compiler: D:/mingw64/bin/gcc.exe + Build flags: + Id flags: + + The output was: + 0 + + + Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe" + + The C compiler identification is GNU, found in: + C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/3.26.4/CompilerIdC/a.exe + + - + kind: "message-v1" + backtrace: + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:17 (message)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:64 (__determine_compiler_id_test)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCXXCompiler.cmake:126 (CMAKE_DETERMINE_COMPILER_ID)" + - "CMakeLists.txt:1 (project)" + message: | + Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. + Compiler: D:/mingw64/bin/c++.exe + Build flags: + Id flags: + + The output was: + 0 + + + Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe" + + The CXX compiler identification is GNU, found in: + C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/3.26.4/CompilerIdCXX/a.exe + + - + kind: "try_compile-v1" + backtrace: + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:1 (project)" + checks: + - "Detecting C compiler ABI info" + directories: + source: "C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-nv3cs4" + binary: "C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-nv3cs4" + cmakeVariables: + CMAKE_C_FLAGS: "" + buildResult: + variable: "CMAKE_C_ABI_COMPILED" + cached: true + stdout: | + Change Dir: C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-nv3cs4 + + Run Build Command(s):C:/Program Files/JetBrains/CLion 2023.2.1/bin/ninja/win/x64/ninja.exe -v cmTC_0ab5c && [1/2] D:\\mingw64\\bin\\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj -c "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompilerABI.c" + Using built-in specs. + COLLECT_GCC=D:\\mingw64\\bin\\gcc.exe + Target: x86_64-w64-mingw32 + Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib ' + Thread model: win32 + gcc version 8.1.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project) + COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona' + D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/cc1.exe -quiet -v -iprefix D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/ -U_REENTRANT C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj -version -fdiagnostics-color=always -o C:\\Users\\l\\AppData\\Local\\Temp\\ccql5RX1.s + GNU C17 (x86_64-win32-seh-rev0, Built by MinGW-W64 project) version 8.1.0 (x86_64-w64-mingw32) + compiled by GNU C version 8.1.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + + GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 + ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include" + ignoring nonexistent directory "C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../include" + ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed" + ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include" + ignoring nonexistent directory "C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/mingw/include" + #include "..." search starts here: + #include <...> search starts here: + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include + End of search list. + GNU C17 (x86_64-win32-seh-rev0, Built by MinGW-W64 project) version 8.1.0 (x86_64-w64-mingw32) + compiled by GNU C version 8.1.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + + GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 + Compiler executable checksum: bb117049c51d03d971e874cfcb35cac9 + COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona' + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj C:\\Users\\l\\AppData\\Local\\Temp\\ccql5RX1.s + GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30 + COMPILER_PATH=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/;D:/mingw64/bin/../libexec/gcc/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ + LIBRARY_PATH=D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/;D:/mingw64/bin/../lib/gcc/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../ + COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona' + [2/2] cmd.exe /C "cd . && D:\\mingw64\\bin\\gcc.exe -v CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj -o cmTC_0ab5c.exe -Wl,--out-implib,libcmTC_0ab5c.dll.a -Wl,--major-image-version,0,--minor-image-version,0 && cd ." + Using built-in specs. + COLLECT_GCC=D:\\mingw64\\bin\\gcc.exe + COLLECT_LTO_WRAPPER=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe + Target: x86_64-w64-mingw32 + Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib ' + Thread model: win32 + gcc version 8.1.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project) + COMPILER_PATH=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/;D:/mingw64/bin/../libexec/gcc/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ + LIBRARY_PATH=D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/;D:/mingw64/bin/../lib/gcc/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../ + COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_0ab5c.exe' '-mtune=core2' '-march=nocona' + D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/collect2.exe -plugin D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/liblto_plugin-0.dll -plugin-opt=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\\Users\\l\\AppData\\Local\\Temp\\ccQs9pu2.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_0ab5c.exe D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0 -LD:/mingw64/bin/../lib/gcc -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../.. CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj --out-implib libcmTC_0ab5c.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o + COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_0ab5c.exe' '-mtune=core2' '-march=nocona' + + exitCode: 0 + - + kind: "message-v1" + backtrace: + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake:127 (message)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:1 (project)" + message: | + Parsed C implicit include dir info: rv=done + found start of include info + found start of implicit include info + add: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include] + add: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed] + add: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include] + end of search list found + collapse include dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include] + collapse include dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed] + collapse include dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include] ==> [D:/mingw64/x86_64-w64-mingw32/include] + implicit include dirs: [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed;D:/mingw64/x86_64-w64-mingw32/include] + + + - + kind: "message-v1" + backtrace: + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake:152 (message)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:1 (project)" + message: | + Parsed C implicit link information: + link line regex: [^( *|.*[/\\])(ld\\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)] + ignore line: [Change Dir: C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-nv3cs4] + ignore line: [] + ignore line: [Run Build Command(s):C:/Program Files/JetBrains/CLion 2023.2.1/bin/ninja/win/x64/ninja.exe -v cmTC_0ab5c && [1/2] D:\\mingw64\\bin\\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj -c "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompilerABI.c"] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=D:\\mingw64\\bin\\gcc.exe] + ignore line: [Target: x86_64-w64-mingw32] + ignore line: [Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib '] + ignore line: [Thread model: win32] + ignore line: [gcc version 8.1.0 (x86_64-win32-seh-rev0 Built by MinGW-W64 project) ] + ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona'] + ignore line: [ D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/cc1.exe -quiet -v -iprefix D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/ -U_REENTRANT C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj -version -fdiagnostics-color=always -o C:\\Users\\l\\AppData\\Local\\Temp\\ccql5RX1.s] + ignore line: [GNU C17 (x86_64-win32-seh-rev0 Built by MinGW-W64 project) version 8.1.0 (x86_64-w64-mingw32)] + ignore line: [ compiled by GNU C version 8.1.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.18-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include"] + ignore line: [ignoring nonexistent directory "C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../include"] + ignore line: [ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed"] + ignore line: [ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include"] + ignore line: [ignoring nonexistent directory "C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/mingw/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include] + ignore line: [End of search list.] + ignore line: [GNU C17 (x86_64-win32-seh-rev0 Built by MinGW-W64 project) version 8.1.0 (x86_64-w64-mingw32)] + ignore line: [ compiled by GNU C version 8.1.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.18-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: bb117049c51d03d971e874cfcb35cac9] + ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona'] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj C:\\Users\\l\\AppData\\Local\\Temp\\ccql5RX1.s] + ignore line: [GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30] + ignore line: [COMPILER_PATH=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/] + ignore line: [D:/mingw64/bin/../libexec/gcc/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/] + ignore line: [LIBRARY_PATH=D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/] + ignore line: [D:/mingw64/bin/../lib/gcc/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../] + ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona'] + ignore line: [[2/2] cmd.exe /C "cd . && D:\\mingw64\\bin\\gcc.exe -v CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj -o cmTC_0ab5c.exe -Wl --out-implib libcmTC_0ab5c.dll.a -Wl --major-image-version 0 --minor-image-version 0 && cd ."] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=D:\\mingw64\\bin\\gcc.exe] + ignore line: [COLLECT_LTO_WRAPPER=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe] + ignore line: [Target: x86_64-w64-mingw32] + ignore line: [Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib '] + ignore line: [Thread model: win32] + ignore line: [gcc version 8.1.0 (x86_64-win32-seh-rev0 Built by MinGW-W64 project) ] + ignore line: [COMPILER_PATH=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/] + ignore line: [D:/mingw64/bin/../libexec/gcc/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/] + ignore line: [LIBRARY_PATH=D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/] + ignore line: [D:/mingw64/bin/../lib/gcc/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_0ab5c.exe' '-mtune=core2' '-march=nocona'] + link line: [ D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/collect2.exe -plugin D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/liblto_plugin-0.dll -plugin-opt=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\\Users\\l\\AppData\\Local\\Temp\\ccQs9pu2.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_0ab5c.exe D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0 -LD:/mingw64/bin/../lib/gcc -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../.. CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj --out-implib libcmTC_0ab5c.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] + arg [D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/collect2.exe] ==> ignore + arg [-plugin] ==> ignore + arg [D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/liblto_plugin-0.dll] ==> ignore + arg [-plugin-opt=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe] ==> ignore + arg [-plugin-opt=-fresolution=C:\\Users\\l\\AppData\\Local\\Temp\\ccQs9pu2.res] ==> ignore + arg [-plugin-opt=-pass-through=-lmingw32] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_eh] ==> ignore + arg [-plugin-opt=-pass-through=-lmoldname] ==> ignore + arg [-plugin-opt=-pass-through=-lmingwex] ==> ignore + arg [-plugin-opt=-pass-through=-lmsvcrt] ==> ignore + arg [-plugin-opt=-pass-through=-ladvapi32] ==> ignore + arg [-plugin-opt=-pass-through=-lshell32] ==> ignore + arg [-plugin-opt=-pass-through=-luser32] ==> ignore + arg [-plugin-opt=-pass-through=-lkernel32] ==> ignore + arg [-plugin-opt=-pass-through=-liconv] ==> ignore + arg [-plugin-opt=-pass-through=-lmingw32] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_eh] ==> ignore + arg [-plugin-opt=-pass-through=-lmoldname] ==> ignore + arg [-plugin-opt=-pass-through=-lmingwex] ==> ignore + arg [-plugin-opt=-pass-through=-lmsvcrt] ==> ignore + arg [--sysroot=C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64] ==> ignore + arg [-m] ==> ignore + arg [i386pep] ==> ignore + arg [-Bdynamic] ==> search dynamic + arg [-o] ==> ignore + arg [cmTC_0ab5c.exe] ==> ignore + arg [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] + arg [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o] ==> obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0] + arg [-LD:/mingw64/bin/../lib/gcc] ==> dir [D:/mingw64/bin/../lib/gcc] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../..] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../..] + arg [CMakeFiles/cmTC_0ab5c.dir/CMakeCCompilerABI.c.obj] ==> ignore + arg [--out-implib] ==> ignore + arg [libcmTC_0ab5c.dll.a] ==> ignore + arg [--major-image-version] ==> ignore + arg [0] ==> ignore + arg [--minor-image-version] ==> ignore + arg [0] ==> ignore + arg [-lmingw32] ==> lib [mingw32] + arg [-lgcc] ==> lib [gcc] + arg [-lgcc_eh] ==> lib [gcc_eh] + arg [-lmoldname] ==> lib [moldname] + arg [-lmingwex] ==> lib [mingwex] + arg [-lmsvcrt] ==> lib [msvcrt] + arg [-ladvapi32] ==> lib [advapi32] + arg [-lshell32] ==> lib [shell32] + arg [-luser32] ==> lib [user32] + arg [-lkernel32] ==> lib [kernel32] + arg [-liconv] ==> lib [iconv] + arg [-lmingw32] ==> lib [mingw32] + arg [-lgcc] ==> lib [gcc] + arg [-lgcc_eh] ==> lib [gcc_eh] + arg [-lmoldname] ==> lib [moldname] + arg [-lmingwex] ==> lib [mingwex] + arg [-lmsvcrt] ==> lib [msvcrt] + arg [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] ==> obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] + remove lib [gcc_eh] + remove lib [msvcrt] + remove lib [gcc_eh] + remove lib [msvcrt] + collapse obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> [D:/mingw64/x86_64-w64-mingw32/lib/crt2.o] + collapse obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o] + collapse obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0] + collapse library dir [D:/mingw64/bin/../lib/gcc] ==> [D:/mingw64/lib/gcc] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib] ==> [D:/mingw64/x86_64-w64-mingw32/lib] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib] ==> [D:/mingw64/lib] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib] ==> [D:/mingw64/x86_64-w64-mingw32/lib] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../..] ==> [D:/mingw64/lib] + implicit libs: [mingw32;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc;moldname;mingwex] + implicit objs: [D:/mingw64/x86_64-w64-mingw32/lib/crt2.o;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] + implicit dirs: [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0;D:/mingw64/lib/gcc;D:/mingw64/x86_64-w64-mingw32/lib;D:/mingw64/lib] + implicit fwks: [] + + + - + kind: "try_compile-v1" + backtrace: + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:1 (project)" + checks: + - "Detecting CXX compiler ABI info" + directories: + source: "C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-iei9t5" + binary: "C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-iei9t5" + cmakeVariables: + CMAKE_CXX_FLAGS: "" + buildResult: + variable: "CMAKE_CXX_ABI_COMPILED" + cached: true + stdout: | + Change Dir: C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-iei9t5 + + Run Build Command(s):C:/Program Files/JetBrains/CLion 2023.2.1/bin/ninja/win/x64/ninja.exe -v cmTC_ab248 && [1/2] D:\\mingw64\\bin\\c++.exe -fdiagnostics-color=always -v -o CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj -c "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCXXCompilerABI.cpp" + Using built-in specs. + COLLECT_GCC=D:\\mingw64\\bin\\c++.exe + Target: x86_64-w64-mingw32 + Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib ' + Thread model: win32 + gcc version 8.1.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project) + COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona' + D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/cc1plus.exe -quiet -v -iprefix D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/ -U_REENTRANT C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj -version -fdiagnostics-color=always -o C:\\Users\\l\\AppData\\Local\\Temp\\ccbHdtYa.s + GNU C++14 (x86_64-win32-seh-rev0, Built by MinGW-W64 project) version 8.1.0 (x86_64-w64-mingw32) + compiled by GNU C version 8.1.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + + GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 + ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++" + ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32" + ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward" + ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include" + ignoring nonexistent directory "C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../include" + ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed" + ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include" + ignoring nonexistent directory "C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/mingw/include" + #include "..." search starts here: + #include <...> search starts here: + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++ + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32 + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include + End of search list. + GNU C++14 (x86_64-win32-seh-rev0, Built by MinGW-W64 project) version 8.1.0 (x86_64-w64-mingw32) + compiled by GNU C version 8.1.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + + GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 + Compiler executable checksum: 768151575aea5e2fb63ae2dd7f500530 + COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona' + D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj C:\\Users\\l\\AppData\\Local\\Temp\\ccbHdtYa.s + GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30 + COMPILER_PATH=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/;D:/mingw64/bin/../libexec/gcc/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ + LIBRARY_PATH=D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/;D:/mingw64/bin/../lib/gcc/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../ + COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona' + [2/2] cmd.exe /C "cd . && D:\\mingw64\\bin\\c++.exe -v CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj -o cmTC_ab248.exe -Wl,--out-implib,libcmTC_ab248.dll.a -Wl,--major-image-version,0,--minor-image-version,0 && cd ." + Using built-in specs. + COLLECT_GCC=D:\\mingw64\\bin\\c++.exe + COLLECT_LTO_WRAPPER=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe + Target: x86_64-w64-mingw32 + Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib ' + Thread model: win32 + gcc version 8.1.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project) + COMPILER_PATH=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/;D:/mingw64/bin/../libexec/gcc/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ + LIBRARY_PATH=D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/;D:/mingw64/bin/../lib/gcc/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/;D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../ + COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_ab248.exe' '-shared-libgcc' '-mtune=core2' '-march=nocona' + D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/collect2.exe -plugin D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/liblto_plugin-0.dll -plugin-opt=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\\Users\\l\\AppData\\Local\\Temp\\ccDXCD2f.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_ab248.exe D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0 -LD:/mingw64/bin/../lib/gcc -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../.. CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj --out-implib libcmTC_ab248.dll.a --major-image-version 0 --minor-image-version 0 -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o + COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_ab248.exe' '-shared-libgcc' '-mtune=core2' '-march=nocona' + + exitCode: 0 + - + kind: "message-v1" + backtrace: + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake:127 (message)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:1 (project)" + message: | + Parsed CXX implicit include dir info: rv=done + found start of include info + found start of implicit include info + add: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++] + add: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32] + add: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward] + add: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include] + add: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed] + add: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include] + end of search list found + collapse include dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++] + collapse include dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32] + collapse include dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward] + collapse include dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include] + collapse include dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed] + collapse include dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include] ==> [D:/mingw64/x86_64-w64-mingw32/include] + implicit include dirs: [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed;D:/mingw64/x86_64-w64-mingw32/include] + + + - + kind: "message-v1" + backtrace: + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeDetermineCompilerABI.cmake:152 (message)" + - "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)" + - "CMakeLists.txt:1 (project)" + message: | + Parsed CXX implicit link information: + link line regex: [^( *|.*[/\\])(ld\\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\\]+-)?ld|collect2)[^/\\]*( |$)] + ignore line: [Change Dir: C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-iei9t5] + ignore line: [] + ignore line: [Run Build Command(s):C:/Program Files/JetBrains/CLion 2023.2.1/bin/ninja/win/x64/ninja.exe -v cmTC_ab248 && [1/2] D:\\mingw64\\bin\\c++.exe -fdiagnostics-color=always -v -o CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj -c "C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCXXCompilerABI.cpp"] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=D:\\mingw64\\bin\\c++.exe] + ignore line: [Target: x86_64-w64-mingw32] + ignore line: [Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib '] + ignore line: [Thread model: win32] + ignore line: [gcc version 8.1.0 (x86_64-win32-seh-rev0 Built by MinGW-W64 project) ] + ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona'] + ignore line: [ D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/cc1plus.exe -quiet -v -iprefix D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/ -U_REENTRANT C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj -version -fdiagnostics-color=always -o C:\\Users\\l\\AppData\\Local\\Temp\\ccbHdtYa.s] + ignore line: [GNU C++14 (x86_64-win32-seh-rev0 Built by MinGW-W64 project) version 8.1.0 (x86_64-w64-mingw32)] + ignore line: [ compiled by GNU C version 8.1.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.18-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++"] + ignore line: [ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32"] + ignore line: [ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward"] + ignore line: [ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include"] + ignore line: [ignoring nonexistent directory "C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../include"] + ignore line: [ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed"] + ignore line: [ignoring duplicate directory "D:/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include"] + ignore line: [ignoring nonexistent directory "C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/mingw/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include] + ignore line: [End of search list.] + ignore line: [GNU C++14 (x86_64-win32-seh-rev0 Built by MinGW-W64 project) version 8.1.0 (x86_64-w64-mingw32)] + ignore line: [ compiled by GNU C version 8.1.0 GMP version 6.1.2 MPFR version 4.0.1 MPC version 1.1.0 isl version isl-0.18-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: 768151575aea5e2fb63ae2dd7f500530] + ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona'] + ignore line: [ D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj C:\\Users\\l\\AppData\\Local\\Temp\\ccbHdtYa.s] + ignore line: [GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30] + ignore line: [COMPILER_PATH=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/] + ignore line: [D:/mingw64/bin/../libexec/gcc/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/] + ignore line: [LIBRARY_PATH=D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/] + ignore line: [D:/mingw64/bin/../lib/gcc/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../] + ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona'] + ignore line: [[2/2] cmd.exe /C "cd . && D:\\mingw64\\bin\\c++.exe -v CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj -o cmTC_ab248.exe -Wl --out-implib libcmTC_ab248.dll.a -Wl --major-image-version 0 --minor-image-version 0 && cd ."] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=D:\\mingw64\\bin\\c++.exe] + ignore line: [COLLECT_LTO_WRAPPER=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe] + ignore line: [Target: x86_64-w64-mingw32] + ignore line: [Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-win32-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib '] + ignore line: [Thread model: win32] + ignore line: [gcc version 8.1.0 (x86_64-win32-seh-rev0 Built by MinGW-W64 project) ] + ignore line: [COMPILER_PATH=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/] + ignore line: [D:/mingw64/bin/../libexec/gcc/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/] + ignore line: [LIBRARY_PATH=D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/] + ignore line: [D:/mingw64/bin/../lib/gcc/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/] + ignore line: [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_ab248.exe' '-shared-libgcc' '-mtune=core2' '-march=nocona'] + link line: [ D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/collect2.exe -plugin D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/liblto_plugin-0.dll -plugin-opt=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\\Users\\l\\AppData\\Local\\Temp\\ccDXCD2f.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_ab248.exe D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0 -LD:/mingw64/bin/../lib/gcc -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib -LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../.. CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj --out-implib libcmTC_ab248.dll.a --major-image-version 0 --minor-image-version 0 -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] + arg [D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/collect2.exe] ==> ignore + arg [-plugin] ==> ignore + arg [D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/liblto_plugin-0.dll] ==> ignore + arg [-plugin-opt=D:/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe] ==> ignore + arg [-plugin-opt=-fresolution=C:\\Users\\l\\AppData\\Local\\Temp\\ccDXCD2f.res] ==> ignore + arg [-plugin-opt=-pass-through=-lmingw32] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lmoldname] ==> ignore + arg [-plugin-opt=-pass-through=-lmingwex] ==> ignore + arg [-plugin-opt=-pass-through=-lmsvcrt] ==> ignore + arg [-plugin-opt=-pass-through=-ladvapi32] ==> ignore + arg [-plugin-opt=-pass-through=-lshell32] ==> ignore + arg [-plugin-opt=-pass-through=-luser32] ==> ignore + arg [-plugin-opt=-pass-through=-lkernel32] ==> ignore + arg [-plugin-opt=-pass-through=-liconv] ==> ignore + arg [-plugin-opt=-pass-through=-lmingw32] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lmoldname] ==> ignore + arg [-plugin-opt=-pass-through=-lmingwex] ==> ignore + arg [-plugin-opt=-pass-through=-lmsvcrt] ==> ignore + arg [--sysroot=C:/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64] ==> ignore + arg [-m] ==> ignore + arg [i386pep] ==> ignore + arg [-Bdynamic] ==> search dynamic + arg [-o] ==> ignore + arg [cmTC_ab248.exe] ==> ignore + arg [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] + arg [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o] ==> obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0] + arg [-LD:/mingw64/bin/../lib/gcc] ==> dir [D:/mingw64/bin/../lib/gcc] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib] + arg [-LD:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../..] ==> dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../..] + arg [CMakeFiles/cmTC_ab248.dir/CMakeCXXCompilerABI.cpp.obj] ==> ignore + arg [--out-implib] ==> ignore + arg [libcmTC_ab248.dll.a] ==> ignore + arg [--major-image-version] ==> ignore + arg [0] ==> ignore + arg [--minor-image-version] ==> ignore + arg [0] ==> ignore + arg [-lstdc++] ==> lib [stdc++] + arg [-lmingw32] ==> lib [mingw32] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lmoldname] ==> lib [moldname] + arg [-lmingwex] ==> lib [mingwex] + arg [-lmsvcrt] ==> lib [msvcrt] + arg [-ladvapi32] ==> lib [advapi32] + arg [-lshell32] ==> lib [shell32] + arg [-luser32] ==> lib [user32] + arg [-lkernel32] ==> lib [kernel32] + arg [-liconv] ==> lib [iconv] + arg [-lmingw32] ==> lib [mingw32] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lmoldname] ==> lib [moldname] + arg [-lmingwex] ==> lib [mingwex] + arg [-lmsvcrt] ==> lib [msvcrt] + arg [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] ==> obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] + remove lib [msvcrt] + remove lib [msvcrt] + collapse obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> [D:/mingw64/x86_64-w64-mingw32/lib/crt2.o] + collapse obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o] + collapse obj [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0] ==> [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0] + collapse library dir [D:/mingw64/bin/../lib/gcc] ==> [D:/mingw64/lib/gcc] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib] ==> [D:/mingw64/x86_64-w64-mingw32/lib] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib] ==> [D:/mingw64/lib] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib] ==> [D:/mingw64/x86_64-w64-mingw32/lib] + collapse library dir [D:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../..] ==> [D:/mingw64/lib] + implicit libs: [stdc++;mingw32;gcc_s;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc_s;gcc;moldname;mingwex] + implicit objs: [D:/mingw64/x86_64-w64-mingw32/lib/crt2.o;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/crtbegin.o;D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/crtend.o] + implicit dirs: [D:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0;D:/mingw64/lib/gcc;D:/mingw64/x86_64-w64-mingw32/lib;D:/mingw64/lib] + implicit fwks: [] + + +... diff --git a/level1/cmake-build-debug/CMakeFiles/TargetDirectories.txt b/level1/cmake-build-debug/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000..3e7718a --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,12 @@ +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p01_running_letter.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p02_is_prime.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p03_all_primes.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p04_goldbach.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p05_encrypt_decrypt.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p06_hanoi.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p07_maze.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p08_push_boxes.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p09_linked_list.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/p10_warehouse.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/edit_cache.dir +C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/CMakeFiles/rebuild_cache.dir diff --git a/level1/cmake-build-debug/CMakeFiles/clion-Debug-log.txt b/level1/cmake-build-debug/CMakeFiles/clion-Debug-log.txt new file mode 100644 index 0000000..c18c4fa --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/clion-Debug-log.txt @@ -0,0 +1,20 @@ +"C:\Program Files\JetBrains\CLion 2023.2.1\bin\cmake\win\x64\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2023.2.1/bin/ninja/win/x64/ninja.exe" -G Ninja -S C:\Users\l\CLionProjects\c2023-a\level1 -B C:\Users\l\CLionProjects\c2023-a\level1\cmake-build-debug +CMake Warning (dev) at CMakeLists.txt:1 (project): + cmake_minimum_required() should be called prior to this top-level project() + call. Please see the cmake-commands(7) manual for usage documentation of + both commands. +This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Warning (dev) in CMakeLists.txt: + No cmake_minimum_required command is present. A line of code such as + + cmake_minimum_required(VERSION 3.26) + + should be added at the top of the file. The version specified may be lower + if you wish to support older CMake versions for this project. For more + information run "cmake --help-policy CMP0000". +This warning is for project developers. Use -Wno-dev to suppress it. + +-- Configuring done (0.1s) +-- Generating done (0.0s) +-- Build files have been written to: C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug diff --git a/level1/cmake-build-debug/CMakeFiles/clion-environment.txt b/level1/cmake-build-debug/CMakeFiles/clion-environment.txt new file mode 100644 index 0000000..bb13438 --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/clion-environment.txt @@ -0,0 +1,4 @@ +ToolSet: w64 6.0 (local)@D:\mingw64 +Options: + +Options:-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2023.2.1/bin/ninja/win/x64/ninja.exe \ No newline at end of file diff --git a/level1/cmake-build-debug/CMakeFiles/cmake.check_cache b/level1/cmake-build-debug/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/level1/cmake-build-debug/CMakeFiles/rules.ninja b/level1/cmake-build-debug/CMakeFiles/rules.ninja new file mode 100644 index 0000000..0d1d629 --- /dev/null +++ b/level1/cmake-build-debug/CMakeFiles/rules.ninja @@ -0,0 +1,235 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.26 + +# This file contains all the rules used to get the outputs files +# built from the input files. +# It is included in the main 'build.ninja'. + +# ============================================================================= +# Project: level1 +# Configurations: Debug +# ============================================================================= +# ============================================================================= + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p01_running_letter_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p01_running_letter_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p02_is_prime_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p02_is_prime_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p03_all_primes_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p03_all_primes_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p04_goldbach_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p04_goldbach_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p05_encrypt_decrypt_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p05_encrypt_decrypt_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p06_hanoi_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p06_hanoi_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p07_maze_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p07_maze_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p08_push_boxes_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p08_push_boxes_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p09_linked_list_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p09_linked_list_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for compiling C files. + +rule C_COMPILER__p10_warehouse_unscanned_Debug + depfile = $DEP_FILE + deps = gcc + command = D:\mingw64\bin\gcc.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building C object $out + + +############################################# +# Rule for linking C executable. + +rule C_EXECUTABLE_LINKER__p10_warehouse_Debug + command = cmd.exe /C "$PRE_LINK && D:\mingw64\bin\gcc.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE -Wl,--out-implib,$TARGET_IMPLIB -Wl,--major-image-version,0,--minor-image-version,0 $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking C executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for running custom commands. + +rule CUSTOM_COMMAND + command = $COMMAND + description = $DESC + + +############################################# +# Rule for re-running cmake. + +rule RERUN_CMAKE + command = "C:\Program Files\JetBrains\CLion 2023.2.1\bin\cmake\win\x64\bin\cmake.exe" --regenerate-during-build -SC:\Users\l\CLionProjects\c2023-a\level1 -BC:\Users\l\CLionProjects\c2023-a\level1\cmake-build-debug + description = Re-running CMake... + generator = 1 + + +############################################# +# Rule for cleaning all built files. + +rule CLEAN + command = "C:\Program Files\JetBrains\CLion 2023.2.1\bin\ninja\win\x64\ninja.exe" $FILE_ARG -t clean $TARGETS + description = Cleaning all built files... + + +############################################# +# Rule for printing all primary targets available. + +rule HELP + command = "C:\Program Files\JetBrains\CLion 2023.2.1\bin\ninja\win\x64\ninja.exe" -t targets + description = All primary targets available: + diff --git a/level1/cmake-build-debug/Testing/Temporary/LastTest.log b/level1/cmake-build-debug/Testing/Temporary/LastTest.log new file mode 100644 index 0000000..79a125c --- /dev/null +++ b/level1/cmake-build-debug/Testing/Temporary/LastTest.log @@ -0,0 +1,3 @@ +Start testing: Oct 26 13:13 й׼ʱ +---------------------------------------------------------- +End testing: Oct 26 13:13 й׼ʱ diff --git a/level1/cmake-build-debug/build.ninja b/level1/cmake-build-debug/build.ninja new file mode 100644 index 0000000..50cb38c --- /dev/null +++ b/level1/cmake-build-debug/build.ninja @@ -0,0 +1,508 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.26 + +# This file contains all the build statements describing the +# compilation DAG. + +# ============================================================================= +# Write statements declared in CMakeLists.txt: +# +# Which is the root file. +# ============================================================================= + +# ============================================================================= +# Project: level1 +# Configurations: Debug +# ============================================================================= + +############################################# +# Minimal version of Ninja required by this file + +ninja_required_version = 1.5 + + +############################################# +# Set configuration variable for custom commands. + +CONFIGURATION = Debug +# ============================================================================= +# Include auxiliary files. + + +############################################# +# Include rules file. + +include CMakeFiles/rules.ninja + +# ============================================================================= + +############################################# +# Logical path to working directory; prefix for absolute paths. + +cmake_ninja_workdir = C$:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/ +# ============================================================================= +# Object build statements for EXECUTABLE target p01_running_letter + + +############################################# +# Order-only phony target for p01_running_letter + +build cmake_object_order_depends_target_p01_running_letter: phony || CMakeFiles/p01_running_letter.dir + +build CMakeFiles/p01_running_letter.dir/p01_running_letter/main.obj: C_COMPILER__p01_running_letter_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p01_running_letter/main.c || cmake_object_order_depends_target_p01_running_letter + DEP_FILE = CMakeFiles\p01_running_letter.dir\p01_running_letter\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p01_running_letter.dir + OBJECT_FILE_DIR = CMakeFiles\p01_running_letter.dir\p01_running_letter + + +# ============================================================================= +# Link build statements for EXECUTABLE target p01_running_letter + + +############################################# +# Link the executable p01_running_letter.exe + +build p01_running_letter.exe: C_EXECUTABLE_LINKER__p01_running_letter_Debug CMakeFiles/p01_running_letter.dir/p01_running_letter/main.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p01_running_letter.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p01_running_letter.exe + TARGET_IMPLIB = libp01_running_letter.dll.a + TARGET_PDB = p01_running_letter.exe.dbg + +# ============================================================================= +# Object build statements for EXECUTABLE target p02_is_prime + + +############################################# +# Order-only phony target for p02_is_prime + +build cmake_object_order_depends_target_p02_is_prime: phony || CMakeFiles/p02_is_prime.dir + +build CMakeFiles/p02_is_prime.dir/p02_is_prime/main.obj: C_COMPILER__p02_is_prime_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p02_is_prime/main.c || cmake_object_order_depends_target_p02_is_prime + DEP_FILE = CMakeFiles\p02_is_prime.dir\p02_is_prime\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p02_is_prime.dir + OBJECT_FILE_DIR = CMakeFiles\p02_is_prime.dir\p02_is_prime + + +# ============================================================================= +# Link build statements for EXECUTABLE target p02_is_prime + + +############################################# +# Link the executable p02_is_prime.exe + +build p02_is_prime.exe: C_EXECUTABLE_LINKER__p02_is_prime_Debug CMakeFiles/p02_is_prime.dir/p02_is_prime/main.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p02_is_prime.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p02_is_prime.exe + TARGET_IMPLIB = libp02_is_prime.dll.a + TARGET_PDB = p02_is_prime.exe.dbg + +# ============================================================================= +# Object build statements for EXECUTABLE target p03_all_primes + + +############################################# +# Order-only phony target for p03_all_primes + +build cmake_object_order_depends_target_p03_all_primes: phony || CMakeFiles/p03_all_primes.dir + +build CMakeFiles/p03_all_primes.dir/p03_all_primes/main.obj: C_COMPILER__p03_all_primes_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p03_all_primes/main.c || cmake_object_order_depends_target_p03_all_primes + DEP_FILE = CMakeFiles\p03_all_primes.dir\p03_all_primes\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p03_all_primes.dir + OBJECT_FILE_DIR = CMakeFiles\p03_all_primes.dir\p03_all_primes + +build CMakeFiles/p03_all_primes.dir/p03_all_primes/isPrime.obj: C_COMPILER__p03_all_primes_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p03_all_primes/isPrime.c || cmake_object_order_depends_target_p03_all_primes + DEP_FILE = CMakeFiles\p03_all_primes.dir\p03_all_primes\isPrime.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p03_all_primes.dir + OBJECT_FILE_DIR = CMakeFiles\p03_all_primes.dir\p03_all_primes + + +# ============================================================================= +# Link build statements for EXECUTABLE target p03_all_primes + + +############################################# +# Link the executable p03_all_primes.exe + +build p03_all_primes.exe: C_EXECUTABLE_LINKER__p03_all_primes_Debug CMakeFiles/p03_all_primes.dir/p03_all_primes/main.obj CMakeFiles/p03_all_primes.dir/p03_all_primes/isPrime.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p03_all_primes.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p03_all_primes.exe + TARGET_IMPLIB = libp03_all_primes.dll.a + TARGET_PDB = p03_all_primes.exe.dbg + +# ============================================================================= +# Object build statements for EXECUTABLE target p04_goldbach + + +############################################# +# Order-only phony target for p04_goldbach + +build cmake_object_order_depends_target_p04_goldbach: phony || CMakeFiles/p04_goldbach.dir + +build CMakeFiles/p04_goldbach.dir/p04_goldbach/main.obj: C_COMPILER__p04_goldbach_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p04_goldbach/main.c || cmake_object_order_depends_target_p04_goldbach + DEP_FILE = CMakeFiles\p04_goldbach.dir\p04_goldbach\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p04_goldbach.dir + OBJECT_FILE_DIR = CMakeFiles\p04_goldbach.dir\p04_goldbach + + +# ============================================================================= +# Link build statements for EXECUTABLE target p04_goldbach + + +############################################# +# Link the executable p04_goldbach.exe + +build p04_goldbach.exe: C_EXECUTABLE_LINKER__p04_goldbach_Debug CMakeFiles/p04_goldbach.dir/p04_goldbach/main.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p04_goldbach.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p04_goldbach.exe + TARGET_IMPLIB = libp04_goldbach.dll.a + TARGET_PDB = p04_goldbach.exe.dbg + +# ============================================================================= +# Object build statements for EXECUTABLE target p05_encrypt_decrypt + + +############################################# +# Order-only phony target for p05_encrypt_decrypt + +build cmake_object_order_depends_target_p05_encrypt_decrypt: phony || CMakeFiles/p05_encrypt_decrypt.dir + +build CMakeFiles/p05_encrypt_decrypt.dir/p05_encrypt_decrypt/main.obj: C_COMPILER__p05_encrypt_decrypt_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p05_encrypt_decrypt/main.c || cmake_object_order_depends_target_p05_encrypt_decrypt + DEP_FILE = CMakeFiles\p05_encrypt_decrypt.dir\p05_encrypt_decrypt\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p05_encrypt_decrypt.dir + OBJECT_FILE_DIR = CMakeFiles\p05_encrypt_decrypt.dir\p05_encrypt_decrypt + + +# ============================================================================= +# Link build statements for EXECUTABLE target p05_encrypt_decrypt + + +############################################# +# Link the executable p05_encrypt_decrypt.exe + +build p05_encrypt_decrypt.exe: C_EXECUTABLE_LINKER__p05_encrypt_decrypt_Debug CMakeFiles/p05_encrypt_decrypt.dir/p05_encrypt_decrypt/main.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p05_encrypt_decrypt.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p05_encrypt_decrypt.exe + TARGET_IMPLIB = libp05_encrypt_decrypt.dll.a + TARGET_PDB = p05_encrypt_decrypt.exe.dbg + +# ============================================================================= +# Object build statements for EXECUTABLE target p06_hanoi + + +############################################# +# Order-only phony target for p06_hanoi + +build cmake_object_order_depends_target_p06_hanoi: phony || CMakeFiles/p06_hanoi.dir + +build CMakeFiles/p06_hanoi.dir/p06_hanoi/main.obj: C_COMPILER__p06_hanoi_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p06_hanoi/main.c || cmake_object_order_depends_target_p06_hanoi + DEP_FILE = CMakeFiles\p06_hanoi.dir\p06_hanoi\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p06_hanoi.dir + OBJECT_FILE_DIR = CMakeFiles\p06_hanoi.dir\p06_hanoi + + +# ============================================================================= +# Link build statements for EXECUTABLE target p06_hanoi + + +############################################# +# Link the executable p06_hanoi.exe + +build p06_hanoi.exe: C_EXECUTABLE_LINKER__p06_hanoi_Debug CMakeFiles/p06_hanoi.dir/p06_hanoi/main.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p06_hanoi.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p06_hanoi.exe + TARGET_IMPLIB = libp06_hanoi.dll.a + TARGET_PDB = p06_hanoi.exe.dbg + +# ============================================================================= +# Object build statements for EXECUTABLE target p07_maze + + +############################################# +# Order-only phony target for p07_maze + +build cmake_object_order_depends_target_p07_maze: phony || CMakeFiles/p07_maze.dir + +build CMakeFiles/p07_maze.dir/p07_maze/main.obj: C_COMPILER__p07_maze_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p07_maze/main.c || cmake_object_order_depends_target_p07_maze + DEP_FILE = CMakeFiles\p07_maze.dir\p07_maze\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p07_maze.dir + OBJECT_FILE_DIR = CMakeFiles\p07_maze.dir\p07_maze + + +# ============================================================================= +# Link build statements for EXECUTABLE target p07_maze + + +############################################# +# Link the executable p07_maze.exe + +build p07_maze.exe: C_EXECUTABLE_LINKER__p07_maze_Debug CMakeFiles/p07_maze.dir/p07_maze/main.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p07_maze.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p07_maze.exe + TARGET_IMPLIB = libp07_maze.dll.a + TARGET_PDB = p07_maze.exe.dbg + +# ============================================================================= +# Object build statements for EXECUTABLE target p08_push_boxes + + +############################################# +# Order-only phony target for p08_push_boxes + +build cmake_object_order_depends_target_p08_push_boxes: phony || CMakeFiles/p08_push_boxes.dir + +build CMakeFiles/p08_push_boxes.dir/p08_push_boxes/main.obj: C_COMPILER__p08_push_boxes_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p08_push_boxes/main.c || cmake_object_order_depends_target_p08_push_boxes + DEP_FILE = CMakeFiles\p08_push_boxes.dir\p08_push_boxes\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p08_push_boxes.dir + OBJECT_FILE_DIR = CMakeFiles\p08_push_boxes.dir\p08_push_boxes + +build CMakeFiles/p08_push_boxes.dir/p08_push_boxes/gameFunction.obj: C_COMPILER__p08_push_boxes_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p08_push_boxes/gameFunction.c || cmake_object_order_depends_target_p08_push_boxes + DEP_FILE = CMakeFiles\p08_push_boxes.dir\p08_push_boxes\gameFunction.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p08_push_boxes.dir + OBJECT_FILE_DIR = CMakeFiles\p08_push_boxes.dir\p08_push_boxes + +build CMakeFiles/p08_push_boxes.dir/p08_push_boxes/shellControl.obj: C_COMPILER__p08_push_boxes_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p08_push_boxes/shellControl.c || cmake_object_order_depends_target_p08_push_boxes + DEP_FILE = CMakeFiles\p08_push_boxes.dir\p08_push_boxes\shellControl.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p08_push_boxes.dir + OBJECT_FILE_DIR = CMakeFiles\p08_push_boxes.dir\p08_push_boxes + +build CMakeFiles/p08_push_boxes.dir/p08_push_boxes/maploader.obj: C_COMPILER__p08_push_boxes_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p08_push_boxes/maploader.c || cmake_object_order_depends_target_p08_push_boxes + DEP_FILE = CMakeFiles\p08_push_boxes.dir\p08_push_boxes\maploader.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p08_push_boxes.dir + OBJECT_FILE_DIR = CMakeFiles\p08_push_boxes.dir\p08_push_boxes + + +# ============================================================================= +# Link build statements for EXECUTABLE target p08_push_boxes + + +############################################# +# Link the executable p08_push_boxes.exe + +build p08_push_boxes.exe: C_EXECUTABLE_LINKER__p08_push_boxes_Debug CMakeFiles/p08_push_boxes.dir/p08_push_boxes/main.obj CMakeFiles/p08_push_boxes.dir/p08_push_boxes/gameFunction.obj CMakeFiles/p08_push_boxes.dir/p08_push_boxes/shellControl.obj CMakeFiles/p08_push_boxes.dir/p08_push_boxes/maploader.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p08_push_boxes.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p08_push_boxes.exe + TARGET_IMPLIB = libp08_push_boxes.dll.a + TARGET_PDB = p08_push_boxes.exe.dbg + +# ============================================================================= +# Object build statements for EXECUTABLE target p09_linked_list + + +############################################# +# Order-only phony target for p09_linked_list + +build cmake_object_order_depends_target_p09_linked_list: phony || CMakeFiles/p09_linked_list.dir + +build CMakeFiles/p09_linked_list.dir/p09_linked_list/main.obj: C_COMPILER__p09_linked_list_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p09_linked_list/main.c || cmake_object_order_depends_target_p09_linked_list + DEP_FILE = CMakeFiles\p09_linked_list.dir\p09_linked_list\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p09_linked_list.dir + OBJECT_FILE_DIR = CMakeFiles\p09_linked_list.dir\p09_linked_list + +build CMakeFiles/p09_linked_list.dir/p09_linked_list/linked_list.obj: C_COMPILER__p09_linked_list_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p09_linked_list/linked_list.c || cmake_object_order_depends_target_p09_linked_list + DEP_FILE = CMakeFiles\p09_linked_list.dir\p09_linked_list\linked_list.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p09_linked_list.dir + OBJECT_FILE_DIR = CMakeFiles\p09_linked_list.dir\p09_linked_list + + +# ============================================================================= +# Link build statements for EXECUTABLE target p09_linked_list + + +############################################# +# Link the executable p09_linked_list.exe + +build p09_linked_list.exe: C_EXECUTABLE_LINKER__p09_linked_list_Debug CMakeFiles/p09_linked_list.dir/p09_linked_list/main.obj CMakeFiles/p09_linked_list.dir/p09_linked_list/linked_list.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p09_linked_list.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p09_linked_list.exe + TARGET_IMPLIB = libp09_linked_list.dll.a + TARGET_PDB = p09_linked_list.exe.dbg + +# ============================================================================= +# Object build statements for EXECUTABLE target p10_warehouse + + +############################################# +# Order-only phony target for p10_warehouse + +build cmake_object_order_depends_target_p10_warehouse: phony || CMakeFiles/p10_warehouse.dir + +build CMakeFiles/p10_warehouse.dir/p10_warehouse/main.obj: C_COMPILER__p10_warehouse_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p10_warehouse/main.c || cmake_object_order_depends_target_p10_warehouse + DEP_FILE = CMakeFiles\p10_warehouse.dir\p10_warehouse\main.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p10_warehouse.dir + OBJECT_FILE_DIR = CMakeFiles\p10_warehouse.dir\p10_warehouse + +build CMakeFiles/p10_warehouse.dir/p10_warehouse/shellControl.obj: C_COMPILER__p10_warehouse_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p10_warehouse/shellControl.c || cmake_object_order_depends_target_p10_warehouse + DEP_FILE = CMakeFiles\p10_warehouse.dir\p10_warehouse\shellControl.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p10_warehouse.dir + OBJECT_FILE_DIR = CMakeFiles\p10_warehouse.dir\p10_warehouse + +build CMakeFiles/p10_warehouse.dir/p10_warehouse/function.obj: C_COMPILER__p10_warehouse_unscanned_Debug C$:/Users/l/CLionProjects/c2023-a/level1/p10_warehouse/function.c || cmake_object_order_depends_target_p10_warehouse + DEP_FILE = CMakeFiles\p10_warehouse.dir\p10_warehouse\function.obj.d + FLAGS = -g -fdiagnostics-color=always -finput-charset=utf-8 -fexec-charset=gbk + OBJECT_DIR = CMakeFiles\p10_warehouse.dir + OBJECT_FILE_DIR = CMakeFiles\p10_warehouse.dir\p10_warehouse + + +# ============================================================================= +# Link build statements for EXECUTABLE target p10_warehouse + + +############################################# +# Link the executable p10_warehouse.exe + +build p10_warehouse.exe: C_EXECUTABLE_LINKER__p10_warehouse_Debug CMakeFiles/p10_warehouse.dir/p10_warehouse/main.obj CMakeFiles/p10_warehouse.dir/p10_warehouse/shellControl.obj CMakeFiles/p10_warehouse.dir/p10_warehouse/function.obj + FLAGS = -g + LINK_LIBRARIES = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = CMakeFiles\p10_warehouse.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_FILE = p10_warehouse.exe + TARGET_IMPLIB = libp10_warehouse.dll.a + TARGET_PDB = p10_warehouse.exe.dbg + + +############################################# +# Utility command for edit_cache + +build CMakeFiles/edit_cache.util: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D C:\Users\l\CLionProjects\c2023-a\level1\cmake-build-debug && "C:\Program Files\JetBrains\CLion 2023.2.1\bin\cmake\win\x64\bin\cmake.exe" -E echo "No interactive CMake dialog available."" + DESC = No interactive CMake dialog available... + restat = 1 + +build edit_cache: phony CMakeFiles/edit_cache.util + + +############################################# +# Utility command for rebuild_cache + +build CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D C:\Users\l\CLionProjects\c2023-a\level1\cmake-build-debug && "C:\Program Files\JetBrains\CLion 2023.2.1\bin\cmake\win\x64\bin\cmake.exe" --regenerate-during-build -SC:\Users\l\CLionProjects\c2023-a\level1 -BC:\Users\l\CLionProjects\c2023-a\level1\cmake-build-debug" + DESC = Running CMake to regenerate build system... + pool = console + restat = 1 + +build rebuild_cache: phony CMakeFiles/rebuild_cache.util + +# ============================================================================= +# Target aliases. + +build p01_running_letter: phony p01_running_letter.exe + +build p02_is_prime: phony p02_is_prime.exe + +build p03_all_primes: phony p03_all_primes.exe + +build p04_goldbach: phony p04_goldbach.exe + +build p05_encrypt_decrypt: phony p05_encrypt_decrypt.exe + +build p06_hanoi: phony p06_hanoi.exe + +build p07_maze: phony p07_maze.exe + +build p08_push_boxes: phony p08_push_boxes.exe + +build p09_linked_list: phony p09_linked_list.exe + +build p10_warehouse: phony p10_warehouse.exe + +# ============================================================================= +# Folder targets. + +# ============================================================================= + +############################################# +# Folder: C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug + +build all: phony p01_running_letter.exe p02_is_prime.exe p03_all_primes.exe p04_goldbach.exe p05_encrypt_decrypt.exe p06_hanoi.exe p07_maze.exe p08_push_boxes.exe p09_linked_list.exe p10_warehouse.exe + +# ============================================================================= +# Unknown Build Time Dependencies. +# Tell Ninja that they may appear as side effects of build rules +# otherwise ordered by order-only dependencies. + +# ============================================================================= +# Built-in targets + + +############################################# +# Re-run CMake if any of its inputs changed. + +build build.ninja: RERUN_CMAKE | C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCXXInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeGenericSystem.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeInitializeConfigs.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeRCInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeSystemSpecificInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeSystemSpecificInitialize.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/CMakeCommonCompilerMacros.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU-C.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU-CXX.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-C-ABI.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-C.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX-ABI.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-windres.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/WindowsPaths.cmake C$:/Users/l/CLionProjects/c2023-a/level1/CMakeLists.txt CMakeCache.txt CMakeFiles/3.26.4/CMakeCCompiler.cmake CMakeFiles/3.26.4/CMakeCXXCompiler.cmake CMakeFiles/3.26.4/CMakeRCCompiler.cmake CMakeFiles/3.26.4/CMakeSystem.cmake + pool = console + + +############################################# +# A missing CMake input file is not an error. + +build C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCXXInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeCommonLanguageInclude.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeGenericSystem.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeInitializeConfigs.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeLanguageInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeRCInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeSystemSpecificInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/CMakeSystemSpecificInitialize.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/CMakeCommonCompilerMacros.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU-C.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU-CXX.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Compiler/GNU.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-C-ABI.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-C.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX-ABI.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU-CXX.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-GNU.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows-windres.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/Windows.cmake C$:/Program$ Files/JetBrains/CLion$ 2023.2.1/bin/cmake/win/x64/share/cmake-3.26/Modules/Platform/WindowsPaths.cmake C$:/Users/l/CLionProjects/c2023-a/level1/CMakeLists.txt CMakeCache.txt CMakeFiles/3.26.4/CMakeCCompiler.cmake CMakeFiles/3.26.4/CMakeCXXCompiler.cmake CMakeFiles/3.26.4/CMakeRCCompiler.cmake CMakeFiles/3.26.4/CMakeSystem.cmake: phony + + +############################################# +# Clean all the built files. + +build clean: CLEAN + + +############################################# +# Print all primary targets available. + +build help: HELP + + +############################################# +# Make the all target the default. + +default all diff --git a/level1/cmake-build-debug/cmake_install.cmake b/level1/cmake-build-debug/cmake_install.cmake new file mode 100644 index 0000000..7f7f751 --- /dev/null +++ b/level1/cmake-build-debug/cmake_install.cmake @@ -0,0 +1,49 @@ +# Install script for directory: C:/Users/l/CLionProjects/c2023-a/level1 + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/level1") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "Debug") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "D:/mingw64/bin/objdump.exe") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "C:/Users/l/CLionProjects/c2023-a/level1/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/level1/p01_running_letter/main.c b/level1/p01_running_letter/main.c index f84d224..a653a91 100644 --- a/level1/p01_running_letter/main.c +++ b/level1/p01_running_letter/main.c @@ -1,6 +1,27 @@ -#include +#include +#include int main() { - printf("hello world!\n"); + char c1 = '$'; + char c2 = ' '; + + while (1) { + for (int i = 0; i < 200; i++) { + for (int a = 0; a < i; a++) { + printf("%c", c2); + } + printf("%c", c1); + system("cls"); + } + + for (int i = 199; i >= 0; i--) { + for (int a = i; a >= 0; a--) { + printf("%c", c2); + } + printf("%c", c1); + system("cls"); + + } + } return 0; } \ No newline at end of file diff --git a/level1/p02_is_prime/main.c b/level1/p02_is_prime/main.c index f84d224..b1c0c3a 100644 --- a/level1/p02_is_prime/main.c +++ b/level1/p02_is_prime/main.c @@ -1,6 +1,19 @@ -#include +#include int main() { - printf("hello world!\n"); + int n = 0; + int isPrime = 1; + scanf("%d",&n); + for(int i=2;i +#include +#include +#include "isPrime.h" int main() { - printf("hello world!\n"); + clock_t start_t,end_t; + double total_t; + start_t = clock(); + + for (int i = 2;i<=1000;i++){ + if(isPrime(i)){ + printf("%d\n",i); + } + } + + end_t = clock(); + total_t = (double)(end_t - start_t)/CLOCKS_PER_SEC; + printf("The total running time: %lfs",total_t); return 0; } \ No newline at end of file diff --git a/level1/p04_goldbach/main.c b/level1/p04_goldbach/main.c index f84d224..5d081ad 100644 --- a/level1/p04_goldbach/main.c +++ b/level1/p04_goldbach/main.c @@ -1,6 +1,59 @@ -#include +#include +int isPrime(int n); int main() { - printf("hello world!\n"); + //定义哥德巴赫猜想:在认为 1 也为素数的情况下,每个大于 2 的整数都可以写成 3 个素数之和。 + //在2-100内验证哥德巴赫猜想的正确性。 + int prime[26]={[0]=1}; + //为prime数组逐一赋值2-99内所有素数。 + int count = 1; + for (int i = 2;i<100;i++){ + if(isPrime(i)){ + count ++; + prime[count - 1] = i; + } + } + + int base[98]={0};//验证的范围数组,98个元素均初始化为0。 + //计算所有prime数组中任意3个素数和。有重复计算:D。 + for(int a = 0;a < 26;a++){ + for(int b = 0;b < 26;b++){ + for(int c = 0;c <26;c++){ + int result = prime[a]+prime[b]+prime[c]; + if(2 + + + + + + + \ No newline at end of file diff --git a/level1/p05_encrypt_decrypt/.idea/p05_encrypt_decrypt.iml b/level1/p05_encrypt_decrypt/.idea/p05_encrypt_decrypt.iml new file mode 100644 index 0000000..bc2cd87 --- /dev/null +++ b/level1/p05_encrypt_decrypt/.idea/p05_encrypt_decrypt.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/level1/p05_encrypt_decrypt/.idea/vcs.xml b/level1/p05_encrypt_decrypt/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/level1/p05_encrypt_decrypt/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/level1/p05_encrypt_decrypt/main.c b/level1/p05_encrypt_decrypt/main.c index f84d224..1702308 100644 --- a/level1/p05_encrypt_decrypt/main.c +++ b/level1/p05_encrypt_decrypt/main.c @@ -1,6 +1,69 @@ -#include +#include +#include +#include + +char* encrypt(char *_clear); +char* decrypt(char *_cypher); +char* getstring(); + int main() { - printf("hello world!\n"); + printf("Enter the clear text which you want to encrypt:"); + char *clear = getstring(); + printf("The text you entered is:%s\n", clear); + char *cypher = encrypt(clear); + printf("The cypher is:%s\n", cypher); + + printf("Enter the clear text which you want to decrypt:"); + char *cypher1 = getstring(); + printf("The text you entered is:%s\n", cypher1); + char *clear2 = decrypt(cypher1); + printf("The clear text is:%s\n",clear2); + return 0; +} + + +char* encrypt(char *_clear){ + int len = (int)(strlen(_clear) + 1); + char *cypher = (char*)malloc(len); + strcpy(cypher,_clear); + for (int i = 0;i < len - 1;i++){ + cypher[i] += i + 1; + } + return cypher; +} + +char* decrypt(char *_cypher){ + int len = (int)(strlen(_cypher) + 1); + char *clear = (char*)malloc(len); + strcpy(clear,_cypher); + for (int i = 0;i < len - 1;i++){ + clear[i] -= i + 1; + } + return clear; +} + +char* getstring(){ + char *str = NULL; + char *str_temp = NULL; + int i = 1; + str = (char*)malloc((i+1)*sizeof(char)); + while ( '\n' != (str[i-1] = getwchar()) ){ + i++; + str[i-1] = '\0'; + str_temp = (char*)malloc(strlen(str) + 1); + strcpy(str_temp,str); + free(str); + str = (char*)malloc((i+1)*sizeof(char)); + if(str == NULL){ + free(str_temp); + printf("Lack of memory.\n"); + return NULL; + } + strcpy(str,str_temp); + free(str_temp); + } + str[i-1] = '\0';//替换\n为\0。 + return str; } \ No newline at end of file diff --git a/level1/p06_hanoi/main.c b/level1/p06_hanoi/main.c index f84d224..1f57261 100644 --- a/level1/p06_hanoi/main.c +++ b/level1/p06_hanoi/main.c @@ -1,6 +1,25 @@ -#include +#include -int main() { - printf("hello world!\n"); +void hanoi(int layer,char a,char b,char c); + +int main(){ + int layer = 0; + char a = 'A',b = 'B',c ='C'; + printf("Set the number of layers of the hanoi to be solved:\n"); + scanf("%d",&layer); + printf("Condition:A:%d B:0 C:0 Target:A:0 B:0 C:%d\n" + "The steps are shown below:\n",layer,layer); + hanoi(layer,a,b,c); return 0; +} + +//a:base b:temporary c:target +void hanoi(int layer,char a,char b,char c){ + if (layer == 1) { + printf("%c -> %c\n",a,c); + return; + } + hanoi(layer - 1,a,c,b);//将base柱本层以上所有层,移到temporary柱暂存。 + printf("%c -> %c\n",a,c);//将base柱本层,移到target柱。 + hanoi(layer - 1,b,a,c);//将所有在temporary柱的暂存层,移到target柱。 } \ No newline at end of file diff --git a/level1/p07_maze/main.c b/level1/p07_maze/main.c index f84d224..0b22fe8 100644 --- a/level1/p07_maze/main.c +++ b/level1/p07_maze/main.c @@ -1,6 +1,117 @@ -#include +#include +#include +#include -int main() { - printf("hello world!\n"); +//ɿִļWindowsնУClionնС +//If it's unrecognizable above,please change the code format to GBK. +typedef struct{ + int x; + int y; +} point; + +enum direction{Up,Down,Left,Right}; +void gotoxy(int x, int y); +void playermove(char (*walls)[10],point *player,enum direction a); +void setmap(char (*walls)[10],const point *player,const point *exit); +void gameover(); + +int main(){ + point player={2,9}; + point exit={3,0}; + char walls[10][10]={{1,1,1,1,1,1,1,1,1,1}, + {1,0,0,0,0,1,0,0,0,1}, + {1,0,1,1,1,1,0,1,0,1}, + {1,0,0,0,0,0,0,1,0,1}, + {1,1,1,1,1,0,1,1,1,1}, + {1,0,0,0,1,0,0,0,0,1}, + {1,0,1,1,1,1,1,0,1,1}, + {1,0,1,0,0,0,0,0,0,1}, + {1,0,0,0,1,1,1,1,1,1}, + {1,1,1,1,1,1,1,1,1,1}, + }; + while (exit.x != player.x || exit.y != player.y){ + setmap(&walls,&player,&exit); + int input = getch(); + switch(input){ + case 'W': playermove(&walls,&player,Up);break; + case 'w': playermove(&walls,&player,Up);break; + case 'S': playermove(&walls,&player,Down);break; + case 's': playermove(&walls,&player,Down);break; + case 'A': playermove(&walls,&player,Left);break; + case 'a': playermove(&walls,&player,Left);break; + case 'D': playermove(&walls,&player,Right);break; + case 'd': playermove(&walls,&player,Right);break; + default: break; + } + } + gameover(); return 0; -} \ No newline at end of file +} + +void gotoxy(int x, int y) +{ + HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); + COORD coord; + coord.X = x; + coord.Y = y; + SetConsoleCursorPosition(handle, coord); +} + +void setmap(char (*walls)[10],const point *player,const point *exit){ + + for(int i = 0; i < 10; i++){ + for(int j = 0; j < 10; j++){ + if( *(walls[i]+j) == (char)1 ){ + gotoxy(2 * j,i); + printf(""); + } + } + } + + *(walls[exit->y]+exit->x) = (char)0; + *(walls[player->y]+player->x) = (char)0; + gotoxy(2*exit->x,exit->y); + printf(" "); + gotoxy(2*player->x,player->y); + printf(""); +} + +void playermove(char (*walls)[10],point *player,enum direction a){ + point next; + next.y = player->y; + next.x = player->x; + switch (a){ + case Up: next.y--;break; + case Down: next.y++;break; + case Left: next.x--;break; + case Right: next.x++;break; + default: break; + } + + int collision = 0; + + if (*(walls[next.y]+next.x) == (char)1){ + collision = 1; + } + if (next.y > 9 || next.x > 9 || next.y < 0 || next.x < 0){ + collision = 1; + } + + if (collision){ + return; + } + else{ + gotoxy(2*player->x,player->y); + printf(" "); + player->x = next.x; + player->y = next.y; + } +} + +void gameover(){ + gotoxy(2*13,5); + printf("Game Over"); + gotoxy(27,4); + printf("Success!"); + getch(); +} \ No newline at end of file diff --git a/level1/p07_maze/main.exe b/level1/p07_maze/main.exe new file mode 100644 index 0000000..083a189 Binary files /dev/null and b/level1/p07_maze/main.exe differ diff --git a/level1/p08_push_boxes/gameFunction.c b/level1/p08_push_boxes/gameFunction.c new file mode 100644 index 0000000..f6bde5a --- /dev/null +++ b/level1/p08_push_boxes/gameFunction.c @@ -0,0 +1,95 @@ +#include +#include +#include "shellControl.h" + +typedef struct{ + int x; + int y; +} point; + +enum direction{Up,Down,Left,Right}; + +void setmap(char (*walls)[10],const point *player,point target[],int targets){ + + for(int i = 0; i < 10; i++){ + for(int j = 0; j < 10; j++){ + gotoxy(2 * j,i); + switch( *(walls[i]+j) ){ + case (char)1:printf("■");break; + case (char)2:printf("□");break; + default:break; + } + } + } + + for(int i = 0; i < targets; i++){ + if(*(walls[target[i].y]+target[i].x) == (char)0){ + gotoxy(2*target[i].x,target[i].y); + printf("×"); + } + } + + gotoxy(2*player->x,player->y); + printf("♀"); +} + +void playermove(char (*walls)[10],point *player,enum direction a){ + point next,next2; + next2.y = next.y = player->y; + next2.x = next.x = player->x; + switch (a){ + case Up: next.y--;next2.y-=2;break; + case Down: next.y++;next2.y+=2;break; + case Left: next.x--;next2.x-=2;break; + case Right: next.x++;next2.x+=2;break; + default: break; + } + + if (*(walls[next.y]+next.x) == (char)1){ + return; + } + + if (*(walls[next.y]+next.x) == (char)0 || *(walls[next.y]+next.x) == (char)-2){ + gotoxy(2*player->x,player->y); + printf(" "); + player->x = next.x; + player->y = next.y; + return; + } + + if (*(walls[next.y]+next.x) == (char)2){ + if(*(walls[next2.y]+next2.x)==(char)1 || *(walls[next2.y]+next2.x)==(char)2){ + return; + } else{ + *(walls[next2.y]+next2.x) = (char)2; + *(walls[next.y]+next.x) = (char)0; + + gotoxy(2*player->x,player->y); + printf(" "); + player->x = next.x; + player->y = next.y; + return; + + } + } + +} + +int allBack(char (*walls)[10],point target[],int targets){ + int allBack = 1; + for(int i = 0; i < targets; i++){ + if(*(walls[target[i].y]+target[i].x) != (char)2){ + allBack = 0; + } + } + return allBack; +}; +void gameover(int step){ + gotoxy(27,2); + printf("Steps:%d",step); + gotoxy(27,4); + printf("Success!"); + gotoxy(2*13,5); + printf("Game Over"); + getch(); +} \ No newline at end of file diff --git a/level1/p08_push_boxes/gameFunction.h b/level1/p08_push_boxes/gameFunction.h new file mode 100644 index 0000000..d4165ef --- /dev/null +++ b/level1/p08_push_boxes/gameFunction.h @@ -0,0 +1,13 @@ +#ifndef C2023_CHALLENGE_GAMEFUNCTION_H +#define C2023_CHALLENGE_GAMEFUNCTION_H +typedef struct{ + int x; + int y; +} point; + +enum direction{Up,Down,Left,Right}; +void playermove(char (*walls)[10],point *player,enum direction a); +void setmap(char (*walls)[10],const point *player,point target[],int targets); +int allBack(char (*walls)[10],point target[],int targets); +void gameover(int step); +#endif //C2023_CHALLENGE_GAMEFUNCTION_H diff --git a/level1/p08_push_boxes/main.c b/level1/p08_push_boxes/main.c index f84d224..6080d32 100644 --- a/level1/p08_push_boxes/main.c +++ b/level1/p08_push_boxes/main.c @@ -1,6 +1,125 @@ -#include +#include +#include +#include +#include "gameFunction.h" + +//请生成可执行文件,用Windows的终端运行,勿用Clion的内置终端运行。 +//If it's unrecognizable above,please change the code format to GBK. + +int main(){ + int decision; + printf("Select one map to play.\nOptions:1 2 3\n"); + scanf("%d",&decision); + char mapname[10]={"Error"}; + switch (decision) { + case 1:{char temp[10] = "map1.txt";strcpy(mapname,temp);};break; + case 2:{char temp[10] = "map2.txt";strcpy(mapname,temp);};break; + case 3:{char temp[10] = "map3.txt";strcpy(mapname,temp);};break; + default:break; + } + system("cls"); + + FILE *map = fopen(mapname, "r+"); + if (map) { + point player; + for (int i; (i = fgetc(map)) != ':';); + fscanf(map, "%d,%d", &player.x, &player.y); + + int targets; + for (char i; (i = fgetc(map)) != ':';); + fscanf(map, "%d", &targets); + + point target[targets]; + for (char i; (i = fgetc(map)) != ':';); + for (int count = 0; count < targets * 2;) { + char i = fgetc(map); + if (i == ',') { + continue; + } + count++; + if (count % 2) { + fseek(map, -1, SEEK_CUR); + fscanf(map, "%1d", &target[(count + 1) / 2 - 1].x); + } else { + fseek(map, -1, SEEK_CUR); + fscanf(map, "%1d", &target[count / 2 - 1].y); + } + } + + char walls[10][10]; + + for (char i; (i = fgetc(map)) != ':';); + fgetc(map); + for (int i = 0,j = 0,c; (c = fgetc(map)) != '.';) { + if (c == '\n') { + i++; + j = 0; + } else { + fseek(map, -1, SEEK_CUR); + fscanf(map, "%1d", &walls[i][j]); + j++; + } + } + + int step = 0; + while (allBack(walls,target,targets)!=1){ + setmap(walls,&player,target,targets); + int input = getch(); + switch(input){ + case 'W': playermove(walls,&player,Up);break; + case 'w': playermove(walls,&player,Up);break; + case 'S': playermove(walls,&player,Down);break; + case 's': playermove(walls,&player,Down);break; + case 'A': playermove(walls,&player,Left);break; + case 'a': playermove(walls,&player,Left);break; + case 'D': playermove(walls,&player,Right);break; + case 'd': playermove(walls,&player,Right);break; + default: break; + } + step++; + } + + setmap(walls,&player,target,targets); + gameover(step); + + for (int i = 0; (i = fgetc(map)) != ':';); + int l_step = ftell(map); + fseek(map,0,SEEK_CUR); + for(int i = 0; i < (SEEK_END-l_step); i++) { + fprintf(map," "); + } + fseek(map,0,l_step); + fprintf(map,"%d",step); + + fclose(map); + } else { + printf("Fail To Open The Map."); + getch(); + } + + //version2 target[] failed. + /*point player; + int targets; + point *target = NULL;//not sure to be enough space for the list. + char (*walls)[10]=NULL; + + load("map1.txt",&player,&targets,target,walls);*/ + + //version 1 + /*point player={5,5}; + point target[]={4,1,5,1,6,1}; + int targets = 3; + char walls[10][10]={{0,1,1,1,1,1,1,1,0,0}, + {0,1,0,0,0,0,0,1,0,0}, + {0,1,0,0,0,1,1,1,1,0}, + {1,1,1,0,0,0,0,0,1,0}, + {1,0,0,0,1,2,1,0,1,0}, + {1,0,2,2,1,0,0,0,1,0}, + {1,0,0,0,1,1,1,1,1,0}, + {1,1,1,1,1,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0}, + };*/ -int main() { - printf("hello world!\n"); return 0; } \ No newline at end of file diff --git a/level1/p08_push_boxes/map1.txt b/level1/p08_push_boxes/map1.txt new file mode 100644 index 0000000..5104231 --- /dev/null +++ b/level1/p08_push_boxes/map1.txt @@ -0,0 +1,15 @@ +player:5,5 +targets:3 +target:4,1,5,1,6,1 +walls: +0111111100 +0100000100 +0100011110 +1110000010 +1000121010 +1022100010 +1000111110 +1111100000 +0000000000 +0000000000. +steps: \ No newline at end of file diff --git a/level1/p08_push_boxes/map2.txt b/level1/p08_push_boxes/map2.txt new file mode 100644 index 0000000..11b36b7 --- /dev/null +++ b/level1/p08_push_boxes/map2.txt @@ -0,0 +1,15 @@ +player:5,6 +targets:3 +target:6,2,6,3,6,4 +walls: +1111111100 +1000100100 +1010120100 +1000020100 +1010120100 +1000100100 +1111100100 +0000111100 +0000000000 +0000000000. +steps: \ No newline at end of file diff --git a/level1/p08_push_boxes/map3.txt b/level1/p08_push_boxes/map3.txt new file mode 100644 index 0000000..2d09335 --- /dev/null +++ b/level1/p08_push_boxes/map3.txt @@ -0,0 +1,15 @@ +player:1,3 +targets:3 +target:4,2,4,4,4,6 +walls: +0011110000 +0010011111 +1110010001 +1000200001 +1011211111 +1000200100 +1110000100 +0010011100 +0011110000 +0000000000. +steps: \ No newline at end of file diff --git a/level1/p08_push_boxes/maploader.c b/level1/p08_push_boxes/maploader.c new file mode 100644 index 0000000..d1e9a10 --- /dev/null +++ b/level1/p08_push_boxes/maploader.c @@ -0,0 +1,85 @@ +#include + +typedef struct { + int x; + int y; +}point; + +void load(char* file, point *_player, int* _targets,point *_target, char (*_walls)[10]){ + FILE *map = fopen(file, "r"); + if (map) { +//fscanf(map,"%*[^:]:%d,%d\n%*[^:]:%d\n",&player.x,&player.y,&targets); + point player; + for (int i; (i = fgetc(map)) != ':';); + fscanf(map, "%d,%d", &player.x, &player.y); + + int targets; + for (char i; (i = fgetc(map)) != ':';); + fscanf(map, "%d", &targets); + + point target[targets]; + for (char i; (i = fgetc(map)) != ':';); + for (int count = 0; count < targets * 2;) { + char i = fgetc(map); + if (i == ',') { + continue; + } + + count++; + + if (count % 2) { + fseek(map, -1, SEEK_CUR); + fscanf(map, "%1d", &target[(count + 1) / 2 - 1].x); + } else { + fseek(map, -1, SEEK_CUR); + fscanf(map, "%1d", &target[count / 2 - 1].y); + } + } + + int walls[10][10] = {0}; + int i = 0; + int j = 0; + + for (char i; (i = fgetc(map)) != ':';); + fgetc(map); + for (char c; (c = fgetc(map)) != '.';) { + if (c == '\n') { + i++; + j = 0; + } else { + fseek(map, -1, SEEK_CUR); + fscanf(map, "%1d", &walls[i][j]); + j++; + } + } + + /*printf("x:%d\n", player.x); + printf("y:%d\n", player.y); + printf("targets:%d\n", targets); + + for (int i = 0; i < targets; i++) { + printf("target[%d].x = %d\n", i, target[i].x); + printf("target[%d].y = %d\n", i, target[i].y); + }; + + for (int i = 0; i < 10; i++) { + for (int j = 0; j < 10; j++) { + printf("%d", walls[i][j]); + } + printf("\n"); + }*/ + + *_player = player; + *_targets = targets; + _target = target; + for (int i = 0; i < 10; i++) { + for (int j = 0; j < 10; j++) { + *(_walls[i] + j) = walls[i][j]; + } + } + + fclose(map); + } else { + printf("Fail"); + } +} \ No newline at end of file diff --git a/level1/p08_push_boxes/maploader.h b/level1/p08_push_boxes/maploader.h new file mode 100644 index 0000000..2650a3c --- /dev/null +++ b/level1/p08_push_boxes/maploader.h @@ -0,0 +1,4 @@ +#ifndef C2023_CHALLENGE_MAPLOADER_H +#define C2023_CHALLENGE_MAPLOADER_H +void load(char* file, point *_player, int* _targets,point *_target, char (*_walls)[10]); +#endif //C2023_CHALLENGE_MAPLOADER_H \ No newline at end of file diff --git a/level1/p08_push_boxes/shellControl.c b/level1/p08_push_boxes/shellControl.c new file mode 100644 index 0000000..b0891e6 --- /dev/null +++ b/level1/p08_push_boxes/shellControl.c @@ -0,0 +1,10 @@ +#include + +void gotoxy(int x, int y) +{ + HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); + COORD coord; + coord.X = x; + coord.Y = y; + SetConsoleCursorPosition(handle, coord); +} \ No newline at end of file diff --git a/level1/p08_push_boxes/shellControl.h b/level1/p08_push_boxes/shellControl.h new file mode 100644 index 0000000..92e741b --- /dev/null +++ b/level1/p08_push_boxes/shellControl.h @@ -0,0 +1,4 @@ +#ifndef C2023_CHALLENGE_SHELLCONTROL_H +#define C2023_CHALLENGE_SHELLCONTROL_H +void gotoxy(int x, int y); +#endif //C2023_CHALLENGE_SHELLCONTROL_H diff --git a/level1/p09_linked_list/linked_list.c b/level1/p09_linked_list/linked_list.c new file mode 100644 index 0000000..6d66519 --- /dev/null +++ b/level1/p09_linked_list/linked_list.c @@ -0,0 +1,107 @@ +#include +#include + +typedef struct _node{ + int value; + struct _node *next; +} Node; + +typedef struct { + Node *head; + Node *tail; +} List; + +void listAdd(List* pList,int value) { + Node *p = (Node *) malloc(sizeof(Node)); + p->value = value; + p->next = NULL; + pList->tail = p; + + Node *last = NULL; + if( pList->head ){ + last = pList->head; + while(last->next){ + last = last->next; + } + last->next = p; + } else{ + pList->head = p; + } +} + +void listPrint(List *pList){ + for(Node *p = pList->head;p;p = p->next){ + printf("%d ",p->value); + } + printf("\n"); +} + +int listFind(List *pList,int target,int times){ + int count = 0; + int serial = 0; + for (Node *p = pList->head;p;p = p->next){ + serial ++; + if(p->value == target){ + count++; + if(count == times){ + break; + } + } + } + return count == times?serial:-1; +} +void listShow(List *pList,int target){ + int serial = 0; + int count = 0; + printf("The serial numbers of the founded \"%d\":",target); + for(Node *p = pList->head; p; p = p->next){ + serial++; + if(p->value == target){ + printf("%d ",serial); + count ++; + } + } + if(count == 0){ + printf("Not Found."); + } + printf("\n"); +} + +void listReverse(List* pList){ + + Node *p1 = NULL; + Node *p2 = NULL; + Node *p3 = NULL; + + if(pList->head) { + p3 = pList->head; + int length = 1; + while (p3->next && length < 3) { + length++; + p1 = p2; + p2 = p3; + p3 = p3->next; + } + if (p2 == NULL) { + return; + } else if (p1 == NULL){ + p3->next = p2; + p2->next = NULL; + } else { + p1->next = NULL; + p2->next = p1; + while(p3->next){ + p1 = p2; + p2 = p3; + p3 = p3->next; + p2 ->next = p1; + } + p3->next = p2; + } + Node *temp = pList->head; + pList->head = pList->tail; + pList->tail = temp; + }else{ + return; + } +} \ No newline at end of file diff --git a/level1/p09_linked_list/linked_list.h b/level1/p09_linked_list/linked_list.h new file mode 100644 index 0000000..42ffa61 --- /dev/null +++ b/level1/p09_linked_list/linked_list.h @@ -0,0 +1,18 @@ +#ifndef _LINKED_LIST_ +#define _LINKED_LIST_ +typedef struct _node{ + int value; + struct _node *next; +} Node; + +typedef struct { + Node *head; + Node *tail; +} List; + +void listAdd(List* pList,int value); +void listPrint(List *pList); +void listShow(List *pList,int target); +int listFind(List *pList,int target,int times); +void listReverse(List* pList); +#endif \ No newline at end of file diff --git a/level1/p09_linked_list/main.c b/level1/p09_linked_list/main.c index f84d224..391593e 100644 --- a/level1/p09_linked_list/main.c +++ b/level1/p09_linked_list/main.c @@ -1,6 +1,30 @@ -#include +#include +#include "linked_list.h" int main() { - printf("hello world!\n"); + List list1={NULL,NULL}; + int length = 0; + int value = 0; + + printf("The length:"); + scanf("%d",&length); + printf("Enter the value in order:\n"); + for(int i = 0;i +#include +#include "shellControl.h" +#include +#include + +typedef struct { + char category[32]; + char model[32]; + char quantity[32]; +} Item; + +void menu(int* choice); +void showlist(); +void warehouse(); +void ex_warehouse(); +Item* creat_item(); + +void menu(int* choice){ + system("cls"); + + gotoxy(16,0); + printf("Warehouse Menu");//mid:16 + 14/2 = 23 + + //① ② ③ ④ + gotoxy(16,1); + printf("1. Show the list"); + gotoxy(16,2); + printf("2. Warehouse"); + gotoxy(16,3); + printf("3. Ex-warehouse"); + gotoxy(16,4); + printf("4. Exit"); + + int tempChoice = *choice; + *choice = 0; + + gotoxy(15,tempChoice); + printf(">");//▶ + while(*choice == 0){ + int input = getch(); + + gotoxy(15,tempChoice); + printf(" "); + + switch(input){ + case '1': tempChoice = 1;break; + case '2': tempChoice = 2;break; + case '3': tempChoice = 3;break; + case '4': tempChoice = 4;break; + case 13:*choice = tempChoice;break;//when \n is inputted. + default:break; + } + gotoxy(15,tempChoice); + printf(">");//▶ + } + system("cls"); + + return; +} + +void showlist(){ + FILE *list = fopen("warehouse.txt","r+"); + + if(list){ + int input = 0; + while((input = fgetc(list))!=EOF){ + if( input == '#') { + char sCategory[32] = {'\0'}; + fseek(list, -1, SEEK_CUR); + fscanf(list, "#%[^:]:", sCategory); + printf("%s:\n", sCategory); + for (int input2; (input2 = fgetc(list)) != '.' && input2 != EOF;) { + fseek(list, -1, SEEK_CUR); + char sModel[32] = {'\0'}; + char sQuantity[32] = {'\0'}; + fscanf(list, "%[^,],%[^;];", sModel, sQuantity); + fseek(list, 0, SEEK_CUR); + printf(" %s: %s\n", sModel, sQuantity); + } + } + } + fclose(list); + } else{ + printf("Loading Failure."); + return; + } + +} + +void warehouse(){ + FILE *list = fopen("warehouse.txt","r+"); + if(list){ + Item *in = creat_item(); + + printf("Warehouse:Add Items\n"); + printf("Category:"); + scanf("%32s",in->category); + printf("Model:"); + scanf("%32s",in->model); + printf("Quantity:"); + scanf("%32s",in->quantity); + + if(atoi(in->quantity)<=0){ + printf("Invalid quantity."); + return; + } + //Tell whether the category to be warehoused has existed. + char temp[32]={'\0'}; + int notExist = 0; + do{ + for(int i;(i=fgetc(list))!='#';){ + if(i == EOF){ + notExist = 1; + break; + } + }; + fseek(list,0,SEEK_CUR); + fscanf(list,"%[^:]:",temp); + }while(notExist == 0 && strcmp(temp, in->category) != 0); + + if(notExist){ + fseek(list,0,SEEK_CUR); + fprintf(list,"\n#%s:%s,%s;.",in->category,in->model,in->quantity); + fclose(list); + }else{ + //Search the item and quantity,no matter existing or not. + int destination = 0; + char temp2[32] = {'\0'}; + char quantity[32] = {'\0'}; + do{ + int next; + if((next = fgetc(list)) == '.'){ + destination = ftell(list) - 2; + break; + }else{ + destination = ftell(list) - 2; + fseek(list,-1,SEEK_CUR); + fscanf(list,"%[^,],%[^;];",temp2,quantity); + } + }while(strcmp(temp2,in->model)!=0); + + char sNewQuantity[32] = {'\0'}; + if(strcmp(temp2,in->model)!=0){ + strcpy(sNewQuantity,in->quantity); + }else{ + int newQuantity = atoi(quantity) + atoi(in->quantity); + itoa(newQuantity, sNewQuantity, 10); + } + + FILE *new = fopen("new","w+"); + if(new){ + rewind(list); + while(ftell(list)<=destination){ + fputc(fgetc(list),new); + } + + fprintf(new,"%s,%s;",in->model,sNewQuantity); + + for(int i;(i=fgetc(list))!=';';){ + if(i == '.'){ + fseek(list,-1,SEEK_CUR); + break; + } + }; + + while(fgetc(list)!=EOF){ + fseek(list,-1,SEEK_CUR); + fputc(fgetc(list),new); + } + fclose(list); + fclose(new); + remove("warehouse.txt"); + rename("new","warehouse.txt"); + }else{ + fclose(list); + printf("Fail to creat the temporary file."); + } + + } + printf("Added %s:%s to %s",in->model,in->quantity,in->category); + }else{ + printf("Loading Failure."); + return; + } + +} +void ex_warehouse(){ + FILE *list = fopen("warehouse.txt","r+"); + if(list){ + Item *in = creat_item(); + + printf("Ex-warehouse:Delete Items\n"); + printf("Category:"); + scanf("%32s",in->category); + printf("Model:"); + scanf("%32s",in->model); + printf("Quantity:"); + scanf("%32s",in->quantity); + + if(atoi(in->quantity)<=0){ + printf("Invalid quantity."); + return; + } + char temp[32]={'\0'}; + int notExist = 0; + int p_category; + do{ + for(int i;(i=fgetc(list))!='#';){ + if(i == EOF){ + notExist = 1; + break; + } + } + fseek(list,0,SEEK_CUR); + p_category = ftell(list); + fscanf(list,"%[^:]:",temp); + }while(notExist == 0 && strcmp(temp, in->category) != 0); + + if(notExist){ + printf("The category doesn't exist."); + fclose(list); + + }else{ + int itemExist = 1; + int destination = 0; + char temp2[32] = {'\0'}; + char quantity[32] = {'\0'}; + do{ + int next; + if((next = fgetc(list)) == '.'){ + itemExist = 0; + break; + }else{ + destination = ftell(list) - 2; + fseek(list,-1,SEEK_CUR); + fscanf(list,"%[^,],%[^;];",temp2,quantity); + } + }while(strcmp(temp2,in->model)!=0); + + + if(itemExist){ + int newQuantity = atoi(quantity) - atoi(in->quantity); + + if(newQuantity < 0){ + fclose(list); + printf("No enough items for ex-warehousing."); + return; + } + + char sNewQuantity[32] = {'\0'}; + itoa(newQuantity,sNewQuantity,10); + + FILE *new = fopen("new","w+"); + if(new){ + //Write the new quantity(it maybe 0 and then not write). + rewind(list); + while(ftell(list)<=destination){ + fputc(fgetc(list),new); + } + if(newQuantity>0) { + fprintf(new, "%s,%s;", in->model, sNewQuantity); + } + for(int i;(i=fgetc(list))!=';';){ + if(i == '.'){ + fseek(list,-1,SEEK_CUR); + break; + } + } + while(fgetc(list)!=EOF){ + fseek(list,-1,SEEK_CUR); + fputc(fgetc(list),new); + } + //Delete the possible empty category. + fseek(new,p_category-1,SEEK_SET); + for(int i;(i= fgetc(new))!=':';); + + if(fgetc(new)=='.'){ + fclose(new); + FILE *new2 = fopen("new","w+"); + if(new2) { + rewind(list); + destination = p_category - 2; + while (ftell(list) < destination) { + fputc(fgetc(list), new2); + + } + for (int i; (i = fgetc(list)) != '.';); + while (fgetc(list) != EOF) { + fseek(list, -1, SEEK_CUR); + fputc(fgetc(list), new2); + + } + fclose(new2); + }else{ + printf("Fail to creat new2."); + } + }else{ + fclose(new); + } + printf("Ex-warehoused %s:%s from %s",in->category,in->model,in->quantity); + + fclose(list); + remove("warehouse.txt"); + rename("new","warehouse.txt"); + }else{ + printf("Fail to creat the temporary file."); + fclose(list); + } + }else{ + printf("The item doesn't exist."); + fclose(list); + } + } + }else{ + printf("Loading Failure."); + } +} + +Item* creat_item() { + Item *item = (Item *) malloc(sizeof(Item)); + + for (int i = 0; i < 32; i++) { + item->category[i] = '\0'; + item->model[i] = '\0'; + item->quantity[i] = '\0'; + } + + return item; +} \ No newline at end of file diff --git a/level1/p10_warehouse/function.h b/level1/p10_warehouse/function.h new file mode 100644 index 0000000..1b05ba1 --- /dev/null +++ b/level1/p10_warehouse/function.h @@ -0,0 +1,14 @@ +#ifndef C2023_CHALLENGE_FUNCTION_H +#define C2023_CHALLENGE_FUNCTION_H +typedef struct { + char category[32]; + char model[32]; + char quantity[32]; +} Item; + +void menu(int* choice); +void showlist(); +void warehouse(); +void ex_warehouse(); +Item* creat_item(); +#endif //C2023_CHALLENGE_FUNCTION_H diff --git a/level1/p10_warehouse/main.c b/level1/p10_warehouse/main.c index f84d224..fd0f768 100644 --- a/level1/p10_warehouse/main.c +++ b/level1/p10_warehouse/main.c @@ -1,6 +1,27 @@ -#include +#include +#include +#include "function.h" int main() { - printf("hello world!\n"); - return 0; + int choice = 1; + while(1) { + menu(&choice); + switch (choice) { + case 1: + showlist(); + break; + case 2: + warehouse(); + break; + case 3: + ex_warehouse(); + break; + case 4: + exit(0); + break; + default: + break; + } + getch(); + } } \ No newline at end of file diff --git a/level1/p10_warehouse/shellControl.c b/level1/p10_warehouse/shellControl.c new file mode 100644 index 0000000..b0891e6 --- /dev/null +++ b/level1/p10_warehouse/shellControl.c @@ -0,0 +1,10 @@ +#include + +void gotoxy(int x, int y) +{ + HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); + COORD coord; + coord.X = x; + coord.Y = y; + SetConsoleCursorPosition(handle, coord); +} \ No newline at end of file diff --git a/level1/p10_warehouse/shellControl.h b/level1/p10_warehouse/shellControl.h new file mode 100644 index 0000000..92e741b --- /dev/null +++ b/level1/p10_warehouse/shellControl.h @@ -0,0 +1,4 @@ +#ifndef C2023_CHALLENGE_SHELLCONTROL_H +#define C2023_CHALLENGE_SHELLCONTROL_H +void gotoxy(int x, int y); +#endif //C2023_CHALLENGE_SHELLCONTROL_H diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/CMakeLists.txt" "b/\350\257\276\347\250\213\350\256\276\350\256\241/CMakeLists.txt" new file mode 100644 index 0000000..d9be9f2 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/CMakeLists.txt" @@ -0,0 +1,58 @@ +cmake_minimum_required(VERSION 3.26) + +project(gobang C) + +set(CMAKE_C_STANDARD 11) + +add_compile_options(-finput-charset=utf-8 -fexec-charset=gbk -mwindows -lpthread) + +find_package(raylib) + +add_executable(gobang "work/Former Codes/main.c") +target_link_libraries(${PROJECT_NAME} raylib) + +add_executable(work work/test.c + work/stack_point.c + work/stack_point.h + work/linked_hash_value_list.c + work/linked_hash_value_list.c + work/linked_hash_value_list.h + work/MT199937.c + work/MT199937.h + work/hash_table.c + work/hash_table.h + work/Zobrist.c + work/Zobrist.h + work/evaluate_func.c + work/evaluate_func.h + work/board_control.c + work/board_control.h + work/generate.c + work/generate.h) +target_link_libraries(work raylib) + +add_executable(gui work/gui.c + work/stack_point.c + work/stack_point.h + work/test.c + work/test.h + work/defination.h + work/linked_hash_value_list.c + work/linked_hash_value_list.h + work/MT199937.c + work/MT199937.h + work/hash_table.c + work/hash_table.h + work/Zobrist.c + work/Zobrist.h + work/evaluate_func.c + work/evaluate_func.h + work/board_control.c + work/board_control.h + work/generate.c + work/generate.h) +target_link_libraries(gui raylib) + +set(CMAKE_BUILD_TYPE Release) + +#set (CMAKE_C_FLAGS "-mwindows") \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/PPT/\344\272\224\345\255\220\346\243\213AI_\350\257\276\347\250\213\350\256\276\350\256\241.pptx" "b/\350\257\276\347\250\213\350\256\276\350\256\241/PPT/\344\272\224\345\255\220\346\243\213AI_\350\257\276\347\250\213\350\256\276\350\256\241.pptx" new file mode 100644 index 0000000..016ea44 Binary files /dev/null and "b/\350\257\276\347\250\213\350\256\276\350\256\241/PPT/\344\272\224\345\255\220\346\243\213AI_\350\257\276\347\250\213\350\256\276\350\256\241.pptx" differ diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/PPT/\345\256\236\351\252\214\346\212\245\345\221\212.doc" "b/\350\257\276\347\250\213\350\256\276\350\256\241/PPT/\345\256\236\351\252\214\346\212\245\345\221\212.doc" new file mode 100644 index 0000000..f7889ab Binary files /dev/null and "b/\350\257\276\347\250\213\350\256\276\350\256\241/PPT/\345\256\236\351\252\214\346\212\245\345\221\212.doc" differ diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/README.md" "b/\350\257\276\347\250\213\350\256\276\350\256\241/README.md" index cb6d088..684e760 100644 --- "a/\350\257\276\347\250\213\350\256\276\350\256\241/README.md" +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/README.md" @@ -10,4 +10,29 @@ - [五子棋AI算法](https://blog.csdn.net/lihongxun945/category_6089493.html) - [蒙特卡洛树搜索 MCTS 入门](http://nooverfit.com/wp/%E8%92%99%E7%89%B9%E5%8D%A1%E6%B4%9B%E6%A0%91%E6%90%9C%E7%B4%A2-mcts-%E5%85%A5%E9%97%A8/) -- [面向初学者的蒙特卡洛树搜索MCTS详解及其实现](https://www.daimajiaoliu.com/daima/4795138e3900404) \ No newline at end of file +- [面向初学者的蒙特卡洛树搜索MCTS详解及其实现](https://www.daimajiaoliu.com/daima/4795138e3900404) + +## Gobang AI 简介 +### 目录 +- Former Codes + - 一些函数的历史版本 + - 注:可忽略 +- Logs + - 是一些程序调试的简单日志 + - 曾用于错误分析,以及性能分析和优化 + - 注:可忽略 +- Work + - 图形界面是gui.c,也相当于整个程序的main.c,运行时选择gui.c这个目标。 + - test.c是递归函数 + - 其他文件是各个类型的函数,包括估值系统、栈、哈希表、着点生成、梅森旋转算法、Zobrist键值计算。 + - linked_hash_value_list.c是被抛弃的功能,速度过慢,只在初期尝试的时候被使用过,不影响整体功能。 +- 课程设计的介绍PPT + - PPT 简介 +### 备注 +- raylib图形库已引入,若不能运行,尝试配置好Clion工具链 + +``-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake`` + +或者直接在课程设计/gui.exe/ 中找到gui.exe运行 +- 默认编译为Release模式 +- 感谢指导,完美结课 \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/gui_4.exe" "b/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/gui_4.exe" new file mode 100644 index 0000000..2ad373c Binary files /dev/null and "b/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/gui_4.exe" differ diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/gui_6.exe" "b/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/gui_6.exe" new file mode 100644 index 0000000..eceb988 Binary files /dev/null and "b/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/gui_6.exe" differ diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/icon.png" "b/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/icon.png" new file mode 100644 index 0000000..2ee6860 Binary files /dev/null and "b/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/icon.png" differ diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/raylib.dll" "b/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/raylib.dll" new file mode 100644 index 0000000..f7e87ff Binary files /dev/null and "b/\350\257\276\347\250\213\350\256\276\350\256\241/gui.exe/raylib.dll" differ diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Former Codes/early.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Former Codes/early.c" new file mode 100644 index 0000000..58ffaa4 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Former Codes/early.c" @@ -0,0 +1,494 @@ +#include "../defination.h" + +Point traverse_old(int (*b)[15], enum piece sideMax, enum type type, Point *step, float *pSuperiorLimit, int layer, int layerLimit) {//layer 为上层层数 + enum piece side = type == Max ? sideMax : -sideMax;//根据当前层的类型,确定相应棋子类型。 + float superiorLimit;//复制指针的值,指针仅用于修改上层的最终值。 + //!可否不创建变量,直接使用指针并兼容第一层? + //!:默认搜索2层以上,不含2层。 + + if(layer >= 2) { + superiorLimit = *(pSuperiorLimit); + changePiece(b, step, -side);//在上层指定的位置下入上一层的棋子-side。所有layer>=2的层return前必定先还原所下步。 + + float value = isStepTerminate(b, step, sideMax, -side);//对上层指定的位置进行评估,判断上层类型棋子所下位置是否终结对局。 + if (value) { + Point result = {step->x, step->y};//返回本层所下的棋子位置坐标。 + + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + changePiece(b,step,Empty); + return result; + } + + //到达层限制,仅判断是否修改上层值,必定结束,不需判断是否剪枝。 + if(layer == layerLimit){ + value = evaluate(b,sideMax); + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + changePiece(b,step,Empty); + return *step; + } + + } + + Range range = limit(b); + + //printf("%d,%d,%d,%d",range.Xmin,range.Xmax,range.Ymin,range.Ymax); + float limit = type == Max ? -INFINITY : INFINITY;//遍历所有子节点后,limit的值为节点所下步的最终值。 + Point resultStep = {7,7};//仅有第一层需要用于返回最优下一步。 + //遍历子节点 + for (int i = range.Xmin; i <= range.Xmax; i++) { + for (int j = range.Ymin; j <= range.Ymax; j++) { + if (*(b[j] + i) == Empty) { + float former_limit = limit;//仅用于第一层判断limit是否被下层改变,若改变则同步更改resultStep。 + Point nextStep = {i, j}; + + //temp_step在2层以上不会被实际使用,在2层最终会参与选出最优步返回给第1层。 + Point temp_step = traverse_old(b, sideMax, type == Max ? Min : Max, &nextStep, &limit,layer+1,layerLimit);//不断确定当前层的值limit + + //对2层以上 alpha-beta剪枝 或 修改上层值limit 第二层 返回最优Step结果记录 + if(layer >= 2) { + if (type == Max) { + if (limit >= superiorLimit) { + changePiece(b,step,Empty);// + return *step;//返回任意值,目的为提前结束该节点。因为首个节点为Max,可能返回INFINITY时对应的步作为resultStep。 + } + } else { + if (limit <= superiorLimit) { + changePiece(b,step,Empty); + return *step; + } + } + } + + if(layer == 1) { + printf("V(%d,%d)=%f\n", i,j,limit); + } + if(layer == 1 && limit != former_limit){ + printf("limit:%f ",limit); + printf("former_limit:%f\n",former_limit); + resultStep = temp_step; + printf("Changed Result to (%d,%d)\n",resultStep.x,resultStep.y); + } + } + } + } + + //对于完成全部可能搜索,搜索子节点完成过程中本节点未从上节点剪枝的情况,还原棋盘,结束。对上层limit的值的更新已经在搜索确定本层值地的过程中同步完成。 + if(layer >= 2){ + *(pSuperiorLimit) = limit; + changePiece(b,step,Empty); + return *step; + } + + if(layer == 1){ + return resultStep; + } + +} +Point traverse_01(int (*b)[15], enum piece sideMax, enum type type, Point *step, float *pSuperiorLimit, int layer, int layerLimit) {//layer 为上层层数 + enum piece side = type == Max ? sideMax : -sideMax;//根据当前层的类型,确定相应棋子类型。 + float superiorLimit;//复制指针的值,指针仅用于修改上层的最终值。 + //!可否不创建变量,直接使用指针并兼容第一层? + //!:默认搜索2层以上,不含2层。 + + if(layer >= 2) { + superiorLimit = *(pSuperiorLimit); + changePiece(b, step, -side);//在上层指定的位置下入上一层的棋子-side。所有layer>=2的层return前必定先还原所下步。 + + float value = isStepTerminate(b, step, sideMax, -side);//对上层指定的位置进行评估,判断上层类型棋子所下位置是否终结对局。 + if (value) { + Point result = {step->x, step->y};//返回本层所下的棋子位置坐标。 + + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + changePiece(b,step,Empty); + return result; + } + + //到达层限制,仅判断是否修改上层值,必定结束,不需判断是否剪枝。 + if(layer == layerLimit){ + value = evaluate(b,sideMax); + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + changePiece(b,step,Empty); + return *step; + } + + } + + Range range = limit(b); + + //printf("%d,%d,%d,%d",range.Xmin,range.Xmax,range.Ymin,range.Ymax); + float limit = type == Max ? -INFINITY : INFINITY;//遍历所有子节点后,limit的值为节点所下步的最终值。 + Point resultStep = {7,7};//仅有第一层需要用于返回最优下一步。 + //遍历子节点 + for (int i = range.Xmin; i <= range.Xmax; i++) { + for (int j = range.Ymin; j <= range.Ymax; j++) { + if (*(b[j] + i) == Empty) { + float former_limit = limit;//仅用于第一层判断limit是否被下层改变,若改变则同步更改resultStep。 + Point nextStep = {i, j}; + + //temp_step在2层以上不会被实际使用,在2层最终会参与选出最优步返回给第1层。 + Point temp_step = traverse(b, sideMax, type == Max ? Min : Max, &nextStep, &limit,layer+1,layerLimit);//不断确定当前层的值limit + + //对2层以上 alpha-beta剪枝 或 修改上层值limit 第二层 返回最优Step结果记录 + if(layer >= 2) { + if (type == Max) { + if (limit >= superiorLimit) { + changePiece(b,step,Empty);// + return *step;//返回任意值,目的为提前结束该节点。因为首个节点为Max,可能返回INFINITY时对应的步作为resultStep。 + } + } else { + if (limit <= superiorLimit) { + changePiece(b,step,Empty); + return *step; + } + } + } + + if(layer == 1) { + printf("V(%d,%d)=%f\n", i,j,limit); + } + if(layer == 1 && limit != former_limit){ + printf("limit:%f ",limit); + printf("former_limit:%f\n",former_limit); + resultStep = temp_step; + printf("Changed Result to (%d,%d)\n",resultStep.x,resultStep.y); + } + } + } + } + //对于完成全部可能搜索,搜索子节点完成过程中本节点未从上节点剪枝的情况,还原棋盘,结束。对上层limit的值的更新已经在搜索确定本层值地的过程中同步完成。 + if(layer >= 2){ + *(pSuperiorLimit) = limit; + changePiece(b,step,Empty); + return *step; + } + + if(layer == 1){ + return resultStep; + } + +} +Point traverse_02(int (*b)[15], enum piece sideMax, enum type type, Point *step, float *pSuperiorLimit, int layer, int layerLimit) {//layer 为上层层数 + enum piece side = type == Max ? sideMax : -sideMax;//根据当前层的类型,确定相应棋子类型。 + float superiorLimit;//复制指针的值,指针仅用于修改上层的最终值。 + //!可否不创建变量,直接使用指针并兼容第一层? + //!:默认搜索2层以上,不含2层。 + + if(layer >= 2) { + superiorLimit = *(pSuperiorLimit); + changePiece(b, step, -side);//在上层指定的位置下入上一层的棋子-side。所有layer>=2的层return前必定先还原所下步。 + + float value = isStepTerminate(b, step, sideMax, -side);//对上层指定的位置进行评估,判断上层类型棋子所下位置是否终结对局。 + if (value) { + Point result = {step->x, step->y};//返回本层所下的棋子位置坐标。 + + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + changePiece(b,step,Empty); + return result; + } + + //到达层限制,仅判断是否修改上层值,必定结束,不需判断是否剪枝。 + if(layer == layerLimit){ + value = evaluate(b,sideMax); + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + changePiece(b,step,Empty); + return *step; + } + + } + + Range range = limit(b); + Stack *search_list = generate(b,range,side); + + float limit = type == Max ? -INFINITY : INFINITY;//遍历所有子节点后,limit的值为节点所下步的最终值。 + Point resultStep = {7,7};//仅有第一层需要用于返回最优下一步。 + //遍历子节点 + while(search_list->count){ + Point nextStep = stack_pop(search_list); + float former_limit = limit;//仅用于第一层判断limit是否被下层改变,若改变则同步更改resultStep。 + + //temp_step在2层以上不会被实际使用,在2层最终会参与选出最优步返回给第1层。 + Point temp_step = traverse(b, sideMax, type == Max ? Min : Max, &nextStep, &limit, layer + 1, + layerLimit);//不断确定当前层的值limit + + //对2层以上 alpha-beta剪枝 或 修改上层值limit 第二层 返回最优Step结果记录 + if (layer >= 2) { + if (type == Max) { + if (limit > superiorLimit) { + changePiece(b, step, Empty); + delete_stack(search_list); + return *step;//返回任意值,目的为提前结束该节点。因为首个节点为Max,可能返回INFINITY时对应的步作为resultStep。 + } + } else { + if (limit < superiorLimit) { + changePiece(b, step, Empty); + delete_stack(search_list); + return *step; + } + } + } + + if (layer == 1) { + printf("V(%d,%d)=%f\n", nextStep.x, nextStep.y, limit); + } + if (layer == 1 && limit != former_limit) { + printf("limit:%f ", limit); + printf("former_limit:%f\n", former_limit); + resultStep = temp_step; + printf("Changed Result to (%d,%d)\n", resultStep.x, resultStep.y); + } + + } + + delete_stack(search_list); + + //对于完成全部可能搜索,搜索子节点完成过程中本节点未从上节点剪枝的情况,还原棋盘,结束。对上层limit的值的更新已经在搜索确定本层值地的过程中同步完成。 + if(layer >= 2){ + *(pSuperiorLimit) = limit; + changePiece(b,step,Empty); + return *step; + } + + if(layer == 1){ + if(pSuperiorLimit){//如果提供了值地址,则返回最优位置对应值 + *pSuperiorLimit = limit; + } + return resultStep; + } + +} +Point traverse3(int (*b)[15], enum piece sideMax, enum type type, Point *step, float *pSuperiorLimit, int layer, int layerLimit, unsigned long long (*randomSet)[15][2], unsigned long long *hashKey, HashTable *hashTable, Data *dataBefore) {//layer 为上层层数 + enum piece side = type == Max ? sideMax : -sideMax;//根据当前层的类型,确定相应棋子类型。 + float superiorLimit;//复制指针的值,指针仅用于修改上层的最终值。 + //!可否不创建变量,直接使用指针并兼容第一层? + //!:默认搜索2层以上,不含2层。 + + if(layer >= 2) { + superiorLimit = *(pSuperiorLimit); + changePiece(b, step, -side);//在上层指定的位置下入上一层的棋子-side。所有layer>=2的层return前必定先还原所下步。 + changeHash(hashKey, randomSet, step, -side);//下入棋子后,相应地更新hashKey + + //首先尝试从Zobrist置换表中寻找可能的重复局面,若找到则直接带入值,判断是否修改上层值。 + if(HashMatch(hashTable,*hashKey)){ + float value = hashTableExtractValue(hashTable, *hashKey); +// printf("Find Hash:%u Value:%f\n", *hashKey, value); + + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + changePiece(b,step,Empty); + changeHash(hashKey, randomSet, step, -side); + return *step; + } + + float value = isStepTerminate(b, step, sideMax, -side);//对上层指定的位置进行评估,判断上层类型棋子所下位置是否终结对局。 + if (value) { + + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + hashTableStore(hashTable,(Hash_value){*hashKey,value}); +// printf("Save Hash:%u Value:%f (terminated)\n",*hashKey,value); + + changePiece(b,step,Empty); + changeHash(hashKey, randomSet, step, -side); + return *step; + } + + //!:考虑在上一层提前判断,避免多次判断 + //到达层限制,仅判断是否修改上层值,必定结束,不需判断是否剪枝。 + if(layer == layerLimit){ + value = evaluate(b,sideMax); + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + hashTableStore(hashTable,(Hash_value){*hashKey,value}); +// printf("Save Hash:%u Value:%f (layer limit)\n",*hashKey,value); + + changePiece(b,step,Empty); + changeHash(hashKey, randomSet, step, -side); + return *step; + } + + } + + Data data; + //确定搜索范围 + Range range; + if(layer == 1) { + range = limit(b); + }else{ + range = re_limit(*(dataBefore->pRange), step); + } + data.pRange = ⦥ + + //着点生成与排序 + + Point_Value* result[15*15] = {NULL}; + data.result = result; + Stack *search_list=NULL; + if(layer == 1) { + search_list = generate(b, range, side, result); + }else{ + search_list = regenerate(b, dataBefore->pRange, &range, side, step, result, dataBefore->result); + } + //遍历子节点 + float limit = type == Max ? -INFINITY : INFINITY;//遍历所有子节点后,limit的值为节点所下步的最终值。 + Point resultStep = {7,7};//仅有第一层需要用于返回最优下一步。 + while(search_list->count){ + Point nextStep = stack_pop(search_list); + float former_limit = limit;//仅用于第一层判断limit是否被下层改变,若改变则同步更改resultStep。 + + //temp_step在2层以上不会被实际使用,在2层最终会参与选出最优步返回给第1层。 + traverse3(b, sideMax, type == Max ? Min : Max, &nextStep, &limit, layer + 1, + layerLimit,randomSet,hashKey,hashTable,&data);//不断确定当前层的值limit + + //对2层以上 alpha-beta剪枝 或 修改上层值limit 第二层 返回最优Step结果记录 + if (layer >= 2) { + if (type == Max) { + if (limit > superiorLimit) { + changePiece(b, step, Empty); + changeHash(hashKey, randomSet, step, -side); + delete_stack(search_list); + for(int i = 0;i<225;i++){ + if(result[i]) + { + free(result[i]); + } + } + if(layer == 2){ + printf("V(%d,%d)=%f\n", step->x, step->y, limit); + } + return *step;//返回任意值,目的为提前结束该节点。因为首个节点为Max,可能返回INFINITY时对应的步作为resultStep。 + } + } else { + if (limit < superiorLimit) { + changePiece(b, step, Empty); + changeHash(hashKey, randomSet, step, -side); + delete_stack(search_list); + for(int i = 0;i<225;i++){ + if(result[i]) + { + free(result[i]); + } + } + if(layer == 2){ + printf("V(%d,%d)=%f\n", step->x, step->y, limit); + } + return *step; + } + } + } + + if (layer == 1 && limit != former_limit) { + printf("limit:%f ", limit); + printf("former_limit:%f\n", former_limit); + resultStep = nextStep; + printf("Changed Result to (%d,%d)\n", resultStep.x, resultStep.y); + } + + } + + delete_stack(search_list); + for(int i = 0;i<225;i++){ + if(result[i]) + { + free(result[i]); + } + } + + if(layer == 2){ + printf("V(%d,%d)=%f\n", step->x, step->y, limit); + } + //对于完成全部可能搜索,搜索子节点完成过程中本节点未从上节点剪枝的情况,还原棋盘,结束。对上层limit的值的更新已经在搜索确定本层值地的过程中同步完成。 + if(layer >= 2){ + *(pSuperiorLimit) = limit; + hashTableStore(hashTable,(Hash_value){*hashKey,limit}); +// printf("Save Hash:%u Value:%f \n",*hashKey,limit); + changePiece(b,step,Empty); + changeHash(hashKey, randomSet, step, -side); + return *step; + } + + if(layer == 1){ + if(pSuperiorLimit){//如果提供了值地址,则返回最优位置对应值 + *pSuperiorLimit = limit; + } + return resultStep; + } + +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Former Codes/main.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Former Codes/main.c" new file mode 100644 index 0000000..86c4308 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Former Codes/main.c" @@ -0,0 +1,378 @@ +#include +#include +#include +#include "raylib.h" + +typedef struct { + int x; + int y; +} Point; + +//每一个局面的下一步搜索范围如何确定? +typedef struct { + int Xmin; + int Xmax; + int Ymin; + int Ymax; +} Range; + +enum piece { + Empty = 0, Black = 1, White = -1 +}; +enum type { + Max, Min +}; + +int evaluate(int (*b)[15],enum piece sideMax); +int evaluate_line(int (*b)[15], Point point, int dx, int dy, enum piece sideMax); +Point traverse(int (*b)[15], enum piece sideMax, enum type type, Point *step, int *pSuperiorLimit, int layer, int layerLimit); +Range limit(int (*b)[15]);//4位range数组用于储存矩形搜索范围Ymin,Ymax,Xmin,Xmax。 +void changePiece(int (*b)[15], Point *point, enum piece piece); +void getInput(Point *input); +int pow_int(int x, int y); + +int main() { + int board[15][15] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + }; + Range range = {0, 14, 0, 14}; + enum piece sideMax, sideMin; + sideMax = sideMin = Empty; + + //双方选择棋子 + sideMax = Black; + sideMin = White; + + Point input = {7, 9};//后续应检查/确保输入坐标有效性。 + + //第一步的决定,并将两种情况都由第一步推进至输入方下完棋,方便后续统一开始遍历博弈树。 + if (sideMax == Black) {//机器先手 + *(board[7] + 7) = Black; + + void getInput(Point *input); + *(board[input.y] + input.x) = White; + } else {//输入方先手 + *(board[input.y] + input.x) = Black; + } + + limit(board); + + + return 0; +} + +int evaluate(int (*b)[15], enum piece sideMax) { + //value在各方向的分值。行r,列c,左上->右下diag_1,右上->左下diag_2。 + int value; + value = 0; + + Point start = {0, 0}; + for (start.x = 0, start.y = 0; start.x < 14; start.x++) { + value += evaluate_line(b, start, 0, 1, sideMax);//纵向 + } + for (start.x = 0, start.y = 0; start.y < 15; start.y++) { + value += evaluate_line(b, start, 1, 0, sideMax);//横向 + } + + for(start.x = 0,start.y = 0; start.y<15;start.y++){ + if( start.y >= 4){//限制条件用于排除部分不可能形成五连的区域 + value += evaluate_line(b, start, 1, -1, sideMax);//右上 + } + if(start.y <= 10){ + value += evaluate_line(b, start, 1, 1, sideMax);//右下 + } + } + for(start.x = 14,start.y = 0;start.y < 15;start.y++){ + if( start.y >= 4 && start.y != 14){//限制范围,并避免重复计算对角线的估值。 + value += evaluate_line(b, start, -1, -1, sideMax);//左上 + } + if(start.y != 0 && start.y <=10 ){ + value += evaluate_line(b, start, -1, 1, sideMax);//左下 + } + } + return value; +} +int evaluate_line(int (*b)[15], Point point, int dx, int dy, enum piece sideMax) { + enum piece temp_side = Empty; + int empty_before = 0; + int count = 0; + int value = 0; + //一条线上的推进和估值 + for (int i = point.x, j = point.y; 0 <= i && i <= 14 && 0 <= j && j <= 14; i += dx, j += dy) { + //末位无法通过下一位是否相异触发结算,首先单列处理。 + if (i + dx < 0 || i + dx > 14 || j + dy < 0 || j + dy > 14) { + //前一位为空 + if (temp_side == Empty) { + int sideNumber = *(b[j] + i) == sideMax ? 1 : -1;//当前与sideMax相同棋子得分为正,不同为负。 + if (*(b[j] + i) != Empty) { + //结算 单侧空1个棋子。 + value += pow_int(10, count - 1) * sideNumber * 1; + break; + } + } else if (*(b[j] + i) == temp_side) {//前一位不为空并且本位与前一位相同,需要算入本位时 + int sideNumber = temp_side == sideMax ? 1 : -1;//前一位与sideMax相同棋子得分为正,不同为负。 + count++; + //结算估值 单侧空或无空 + if (empty_before) { + value += pow_int(10, count - 1) * sideNumber * 1; + break; + }//双侧无空为0,r不增加。 + } + } + + if (*(b[j] + i) == temp_side) { + //相同棋子,无需估值,只需累计黑白棋子或者跳过空棋子。 + if (*(b[j] + i) == Empty) { + empty_before = 1;//确保首个为空时empty_before正常更新为1 + continue; + } else { + count++; + } + + } else { + //遇到相异棋子,可能进行一次估值,并清空count。 + if (temp_side != Empty) { + int sideNumber = temp_side == sideMax ? 1 : -1;//与sideMax相同棋子得分为正,不同为负。 + + if (empty_before && *(b[j] + i) == Empty) { + //两侧有空 + value += pow_int(10, count - 1) * sideNumber * 2; + + } else if (empty_before || *(b[j] + i) == Empty) { + //单侧有空 + value += pow_int(10, count - 1) * sideNumber * 1; + }//两侧不空 ,0值 + + empty_before = 0;//前一位不为空,对当前位置更新empty_before + count = 0;//相异且前一个不为空则最终清空原计数。 + } + + if (*(b[j] + i) == Empty) { + empty_before = 1; + } else { + count++; + } + + temp_side = *(b[j] + i); + } + + } + + return value; +}//!缺少INFIITY的情况。 +int pow_int(int x, int y){ + int result = 1; + for(int i = 0; i < y;i++){ + result *= x; + } + return result; +} + +int isStepTerminate(int (*b)[15], Point *step,enum piece sideMax,enum piece side){ + int Xmin, Xmax, Ymin, Ymax; + Xmin = Xmax = step->x; + Ymin = Ymax = step->y;//搜索范围初始为当次Step坐标。 + + Xmin = Xmin - 4 >= 0 ? Xmin - 4 : 0; + Ymin = Ymin - 4 >= 0 ? Ymin - 4 : 0; + Xmax = Xmax + 4 <= 14 ? Xmax + 4 : 14; + Ymax = Ymax + 4 <= 14 ? Ymax + 4 : 14;//确定上下左右搜索范围。 + + for(int i=Xmin,j = step->y,count = 0;i<=Xmax;i++){ + if(*(b[j]+i) == side){ + count++; + }else{ + count = 0; + } + if(count == 5){ + return sideMax == side? INFINITY:-INFINITY;//该步已终结对局。/sideMax*side*INFINITY + } + } + + for(int i=step->x,j = Ymin,count = 0;j<=Ymax;j++){ + if(*(b[j]+i) == side){ + count++; + }else{ + count = 0; + } + if(count == 5){ + return sideMax == side? INFINITY:-INFINITY;//该步已终结对局。/sideMax*side*INFINITY + } + } + + //计算斜线搜索的2个起点。左上到右下:l1:y=x-step->x+step->y 右上到左下:l2:y=-x+step->x+step->y 注意:棋盘坐标系与常规坐标系y轴方向不同。 + Point p1,p2; + p2.x = max(Xmin,-Ymin+step->x+step->y); + p2.y = -p2.x+step->x+step->y; + + p1.x = min(Xmax,Ymin+step->x-step->y); + p1.y = p1.x-step->x+step->y; + + for (int i = p1.x, j = p1.y, count = 0; i <= Xmax && j <= Ymax; i++, j++) { + if(*(b[j]+i) == side){ + count++; + }else{ + count = 0; + } + if(count == 5){ + return sideMax == side? INFINITY:-INFINITY;//该步已终结对局。/sideMax*side*INFINITY + } + } + + for (int i = p2.x, j = p2.y, count = 0; i>=Xmin && j <= Ymax; i--, j++) { + if(*(b[j]+i) == side){ + count++; + }else{ + count = 0; + } + if(count == 5){ + return sideMax == side? INFINITY:-INFINITY;//该步已终结对局。/sideMax*side*INFINITY + } + } + + return 0; +} + +Range limit(int (*b)[15]) { + int Xmin, Xmax, Ymin, Ymax; + Xmin = Ymin = 14; + Xmax = Ymax = 0;//将最小值组Xmin,Ymin赋值最大初始化,最大值组相反处理,方便后续搜索时直接与i,j比较确定最终值。 + + for (int i = 0; i < 15; i++) { + for (int j = 0; j < 15; j++) { + if (*(b[i] + j) != Empty) { + Xmin = min(Xmin, j); + Ymin = min(Xmin, j); + + Xmax = max(Xmax, j); + Ymax = max(Xmax, j); + } + } + } + + //根据已有棋子范围,x和y轴方向均扩充5格,并确保最终range不越界。 + Range range; + range.Xmin = Xmin - 5 >= 0 ? Xmin - 5 : 0; + range.Xmax = Xmax + 5 <= 14 ? Xmax + 5 : 14; + range.Ymin = Ymin - 5 >= 0 ? Ymin - 5 : 0; + range.Ymax = Ymax + 5 <= 14 ? Ymax + 5 : 14; + return range; +} + +void changePiece(int (*b)[15], Point *point, enum piece piece) { + *(b[point->y] + point->x) = piece; +} + +Point traverse(int (*b)[15], enum piece sideMax, enum type type, Point *step, int *pSuperiorLimit, int layer, int layerLimit) {//layer 为上层层数 + enum piece side = type == Max ? sideMax : -sideMax;//根据当前层的类型,确定相应棋子类型。 + int superiorLimit;//复制指针的值,指针仅用于修改上层的最终值。 + //!可否不创建变量,直接使用指针并兼容第一层? + + //!:默认层数 > 2。 + + if(layer >= 2) { + superiorLimit = *(pSuperiorLimit); + changePiece(b, step, -side);//!:本节点结束需要还原,所有layer>=2的层return前必定先还原所下步。在上层指定的位置下入上一层的棋子-side。 + + int value = isStepTerminate(b, step, sideMax, -side);//对上层指定的步进行评估,判断上层类型棋子所下步是否终结对局。 + if (value) { + Point result = {step->x, step->y};//返回本层所下的棋子位置坐标。 + + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + + changePiece(b,step,Empty); + return result; + } + + //到达层限制,仅判断是否修改上层值,必定结束,不需判断是否剪枝。 + if(layer == layerLimit){ + value = evaluate(b,sideMax); + if (type == Max) { + if (value < superiorLimit) { + *(pSuperiorLimit) = value; + } + } else { + if (value > superiorLimit) { + *(pSuperiorLimit) = value; + } + } + changePiece(b,step,Empty); + return *step; + } + + } + + Range range = limit(b); + + int limit = type == Max ? -INFINITY : INFINITY;//遍历所有子节点后,limit的值为节点所下步的最终值。 + Point resultStep = {-1,-1};//仅有第一层需要用于返回最优下一步。 + //遍历子节点 + for (int i = range.Xmin; i <= range.Xmax; i++) { + for (int j = range.Ymin; j <= range.Ymax; j++) { + if (*(b[j] + i) == Empty) { + int former_limit = limit;//仅用于第一层判断limit是否被下层改变,若改变则同步更改resultStep。 + Point nextStep = {i, j}; + + //temp_step在2层以上不会被实际使用,在2层最终会参与选出最优步返回给第1层。 + Point temp_step = traverse(b, sideMax, type == Max ? Min : Max, &nextStep, &limit,layer+1,layerLimit);//不断确定当前层的值limit + + //对2层以上 alpha-beta剪枝 或 修改上层值limit 第二层 返回最优Step结果记录 + if(layer >= 2) { + if (type == Max) { + if (limit >= superiorLimit) { + changePiece(b,step,Empty);// + return *step;//返回任意值,目的为提前结束该节点。因为首个节点为Max,可能返回INFINITY时对应的步作为resultStep。 + } + } else { + if (limit <= superiorLimit) { + changePiece(b,step,Empty); + return *step; + } + } + } + + if(layer == 1 && limit != former_limit){ + resultStep = temp_step; + } + } + } + } + //对于完成全部可能搜索,搜索子节点完成过程中本节点未从上节点剪枝的情况,还原棋盘,结束。对上层limit的值的更新已经在搜索确定本层值地的过程中同步完成。 + if(layer >= 2){ + *(pSuperiorLimit) = limit; + changePiece(b,step,Empty); + return *step; + } + + if(layer == 1){ + return resultStep; + } + +} + +void getInput(Point *input) { + scanf("%2d,%2d", input->x, input->y);//查重,查越界。 +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/12.13" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/12.13" new file mode 100644 index 0000000..e6e6129 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/12.13" @@ -0,0 +1,178 @@ +C:\Users\l\CLionProjects\gobang\cmake-build-debug\gui.exe +INFO: Initializing raylib 4.5 +INFO: Supported raylib modules: +INFO: > rcore:..... loaded (mandatory) +INFO: > rlgl:...... loaded (mandatory) +INFO: > rshapes:... loaded (optional) +INFO: > rtextures:. loaded (optional) +INFO: > rtext:..... loaded (optional) +INFO: > rmodels:... loaded (optional) +INFO: > raudio:.... loaded (optional) +INFO: DISPLAY: Device initialized successfully +INFO: > Display size: 2560 x 1440 +INFO: > Screen size: 800 x 600 +INFO: > Render size: 800 x 600 +INFO: > Viewport offsets: 0, 0 +INFO: GLAD: OpenGL extensions loaded successfully +INFO: GL: Supported extensions count: 402 +INFO: GL: OpenGL device information: +INFO: > Vendor: NVIDIA Corporation +INFO: > Renderer: NVIDIA GeForce RTX 4060 Laptop GPU/PCIe/SSE2 +INFO: > Version: 3.3.0 NVIDIA 546.17 +INFO: > GLSL: 3.30 NVIDIA via Cg compiler +INFO: GL: VAO extension detected, VAO functions loaded successfully +INFO: GL: NPOT textures extension detected, full NPOT textures supported +INFO: GL: DXT compressed textures supported +INFO: GL: ETC2/EAC compressed textures supported +INFO: TEXTURE: [ID 1] Texture loaded successfully (1x1 | R8G8B8A8 | 1 mipmaps) +INFO: TEXTURE: [ID 1] Default texture loaded successfully +INFO: SHADER: [ID 1] Vertex shader compiled successfully +INFO: SHADER: [ID 2] Fragment shader compiled successfully +INFO: SHADER: [ID 3] Program shader loaded successfully +INFO: SHADER: [ID 3] Default shader loaded successfully +INFO: RLGL: Render batch vertex buffers loaded successfully in RAM (CPU) +INFO: RLGL: Render batch vertex buffers loaded successfully in VRAM (GPU) +INFO: RLGL: Default OpenGL state initialized successfully +INFO: TEXTURE: [ID 2] Texture loaded successfully (128x128 | GRAY_ALPHA | 1 mipmaps) +INFO: FONT: Default font loaded successfully (224 glyphs) +INFO: TIMER: Target time per frame: 16.667 milliseconds +Layer:1 1 times re_gen +Layer:2 0 times re_gen +Layer:3 0 times re_gen +Layer:4 0 times re_gen +Layer:5 0 times re_gen +Layer:6 0 times re_gen +Layer:7 0 times re_gen +Generate Time 0.000000 +Time: 0.000000 s +Zobrist Replace Time:0.000000 +Total:0 nodes +zobrist_match:0 times +Layer 1 Hash Conflicts:0 +Layer 2 Hash Conflicts:0 +Layer 3 Hash Conflicts:0 +Layer 4 Hash Conflicts:0 +Layer 5 Hash Conflicts:0 +Layer 6 Hash Conflicts:0 +Layer 7 Hash Conflicts:0 +V(7,8)=103.000000 +limit:103.000000 former_limit:-1.#INF00 +Changed Result to (7,8) +V(8,7)=103.000000 +V(5,6)=96.000000 +V(6,5)=96.000000 +V(6,8)=94.000000 +V(6,7)=80.000000 +V(5,7)=123.000000 +limit:123.000000 former_limit:103.000000 +Changed Result to (5,7) +V(8,6)=94.000000 +V(7,6)=80.000000 +V(7,5)=123.000000 +V(8,8)=94.000000 +V(5,5)=96.000000 +V(7,10)=103.000000 +V(4,10)=103.000000 +V(7,9)=96.000000 +V(6,9)=103.000000 +V(5,9)=87.000000 +V(3,9)=103.000000 +V(4,8)=96.000000 +V(10,7)=103.000000 +V(9,7)=103.000000 +V(4,7)=103.000000 +V(9,6)=103.000000 +V(4,6)=80.000000 +V(3,6)=103.000000 +V(9,5)=87.000000 +V(10,4)=103.000000 +V(8,4)=96.000000 +V(7,4)=103.000000 +V(6,4)=96.000000 +V(9,3)=103.000000 +V(6,3)=103.000000 +V(11,11)=103.000000 +V(7,11)=103.000000 +V(3,11)=103.000000 +V(10,10)=103.000000 +V(6,10)=71.000000 +V(2,10)=103.000000 +V(11,7)=103.000000 +V(10,6)=71.000000 +V(3,3)=103.000000 +V(10,11)=103.000000 +V(9,11)=103.000000 +V(8,11)=103.000000 +V(6,11)=103.000000 +V(5,11)=80.000000 +V(4,11)=103.000000 +V(2,11)=103.000000 +V(11,10)=103.000000 +V(9,10)=110.000000 +V(8,10)=112.000000 +V(5,10)=80.000000 +V(3,10)=103.000000 +V(11,9)=103.000000 +V(10,9)=110.000000 +V(9,9)=87.000000 +V(8,9)=96.000000 +V(4,9)=96.000000 +V(2,9)=103.000000 +V(11,8)=103.000000 +V(10,8)=112.000000 +V(9,8)=87.000000 +V(5,8)=80.000000 +V(3,8)=103.000000 +V(2,8)=103.000000 +V(3,7)=96.000000 +V(2,7)=103.000000 +V(11,6)=103.000000 +V(2,6)=103.000000 +V(11,5)=80.000000 +V(10,5)=80.000000 +V(8,5)=96.000000 +V(4,5)=103.000000 +V(3,5)=71.000000 +V(2,5)=103.000000 +V(11,4)=103.000000 +V(9,4)=96.000000 +V(5,4)=103.000000 +V(4,4)=103.000000 +V(3,4)=103.000000 +V(2,4)=103.000000 +V(11,3)=103.000000 +V(10,3)=103.000000 +V(8,3)=103.000000 +V(7,3)=96.000000 +V(5,3)=71.000000 +V(4,3)=103.000000 +V(2,3)=103.000000 +V(11,2)=103.000000 +V(10,2)=103.000000 +V(9,2)=103.000000 +V(8,2)=103.000000 +V(7,2)=103.000000 +V(6,2)=103.000000 +V(5,2)=103.000000 +V(4,2)=103.000000 +V(3,2)=103.000000 +V(2,2)=103.000000 +Layer:1 1 times re_gen +Layer:2 98 times re_gen +Layer:3 687 times re_gen +Layer:4 26968 times re_gen +Layer:5 201717 times re_gen +Layer:6 4181299 times re_gen +Layer:7 0 times re_gen +Generate Time 166.696000 +Time: 219.232000 s +Zobrist Replace Time:0.556000 +Total:4410769 nodes +zobrist_match:23069 times +Layer 1 Hash Conflicts:0 +Layer 2 Hash Conflicts:0 +Layer 3 Hash Conflicts:0 +Layer 4 Hash Conflicts:0 +Layer 5 Hash Conflicts:0 +Layer 6 Hash Conflicts:0 +Layer 7 Hash Conflicts:456425 \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/Layer_log A" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/Layer_log A" new file mode 100644 index 0000000..2717352 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/Layer_log A" @@ -0,0 +1,232 @@ +V(7,8)=87.000000 +limit:87.000000 former_limit:-1.#INF00 +Changed Result to (7,8) +V(8,7)=87.000000 +V(5,6)=17.000000 +V(6,5)=17.000000 +V(6,8)=103.000000 +limit:103.000000 former_limit:87.000000 +Changed Result to (6,8) +V(6,7)=87.000000 +V(5,7)=33.000000 +V(8,6)=103.000000 +V(7,6)=87.000000 +V(7,5)=33.000000 +V(8,8)=38.000000 +V(5,5)=24.000000 +V(7,10)=24.000000 +V(4,10)=24.000000 +V(7,9)=40.000000 +V(6,9)=40.000000 +V(5,9)=24.000000 +V(3,9)=24.000000 +V(4,8)=24.000000 +V(10,7)=24.000000 +V(9,7)=40.000000 +V(4,7)=24.000000 +V(9,6)=40.000000 +V(4,6)=24.000000 +V(3,6)=24.000000 +V(9,5)=24.000000 +V(10,4)=24.000000 +V(8,4)=24.000000 +V(7,4)=24.000000 +V(6,4)=24.000000 +V(9,3)=24.000000 +V(6,3)=24.000000 +V(11,11)=24.000000 +V(7,11)=24.000000 +V(3,11)=24.000000 +V(10,10)=24.000000 +V(6,10)=24.000000 +V(2,10)=24.000000 +V(11,7)=24.000000 +V(10,6)=24.000000 +V(3,3)=24.000000 +V(10,11)=24.000000 +V(9,11)=24.000000 +V(8,11)=24.000000 +V(6,11)=24.000000 +V(5,11)=24.000000 +V(4,11)=24.000000 +V(2,11)=24.000000 +V(11,10)=24.000000 +V(9,10)=24.000000 +V(8,10)=24.000000 +V(5,10)=24.000000 +V(3,10)=24.000000 +V(11,9)=24.000000 +V(10,9)=24.000000 +V(9,9)=24.000000 +V(8,9)=31.000000 +V(4,9)=24.000000 +V(2,9)=24.000000 +V(11,8)=24.000000 +V(10,8)=24.000000 +V(9,8)=31.000000 +V(5,8)=40.000000 +V(3,8)=24.000000 +V(2,8)=24.000000 +V(3,7)=24.000000 +V(2,7)=24.000000 +V(11,6)=24.000000 +V(2,6)=24.000000 +V(11,5)=24.000000 +V(10,5)=24.000000 +V(8,5)=40.000000 +V(4,5)=24.000000 +V(3,5)=24.000000 +V(2,5)=24.000000 +V(11,4)=24.000000 +V(9,4)=24.000000 +V(5,4)=24.000000 +V(4,4)=24.000000 +V(3,4)=24.000000 +V(2,4)=24.000000 +V(11,3)=24.000000 +V(10,3)=24.000000 +V(8,3)=24.000000 +V(7,3)=24.000000 +V(5,3)=24.000000 +V(4,3)=24.000000 +V(2,3)=24.000000 +V(11,2)=24.000000 +V(10,2)=24.000000 +V(9,2)=24.000000 +V(8,2)=24.000000 +V(7,2)=24.000000 +V(6,2)=24.000000 +V(5,2)=24.000000 +V(4,2)=24.000000 +V(3,2)=24.000000 +V(2,2)=24.000000 +Layer:1 1 times re_gen +Layer:2 98 times re_gen +Layer:3 524 times re_gen +Layer:4 14358 times re_gen +Layer:5 0 times re_gen +Layer:6 0 times re_gen +Layer:7 0 times re_gen +Generate Time 0.382000 +Time: 0.526000 s +Zobrist Replace Time:0.000000 +Total:175678 nodes +zobrist_match:0 times + + + +V(7,8)=103.000000 +limit:103.000000 former_limit:-1.#INF00 +Changed Result to (7,8) +V(8,7)=103.000000 +V(5,6)=96.000000 +V(6,5)=96.000000 +V(6,8)=94.000000 +V(6,7)=80.000000 +V(5,7)=123.000000 +limit:123.000000 former_limit:103.000000 +Changed Result to (5,7) +V(8,6)=94.000000 +V(7,6)=80.000000 +V(7,5)=123.000000 +V(8,8)=94.000000 +V(5,5)=96.000000 +V(7,10)=103.000000 +V(4,10)=103.000000 +V(7,9)=96.000000 +V(6,9)=103.000000 +V(5,9)=87.000000 +V(3,9)=103.000000 +V(4,8)=96.000000 +V(10,7)=103.000000 +V(9,7)=103.000000 +V(4,7)=103.000000 +V(9,6)=103.000000 +V(4,6)=80.000000 +V(3,6)=103.000000 +V(9,5)=87.000000 +V(10,4)=103.000000 +V(8,4)=96.000000 +V(7,4)=103.000000 +V(6,4)=96.000000 +V(9,3)=103.000000 +V(6,3)=103.000000 +V(11,11)=103.000000 +V(7,11)=103.000000 +V(3,11)=103.000000 +V(10,10)=103.000000 +V(6,10)=71.000000 +V(2,10)=103.000000 +V(11,7)=103.000000 +V(10,6)=71.000000 +V(3,3)=103.000000 +V(10,11)=103.000000 +V(9,11)=103.000000 +V(8,11)=103.000000 +V(6,11)=103.000000 +V(5,11)=80.000000 +V(4,11)=103.000000 +V(2,11)=103.000000 +V(11,10)=103.000000 +V(9,10)=110.000000 +V(8,10)=112.000000 +V(5,10)=80.000000 +V(3,10)=103.000000 +V(11,9)=103.000000 +V(10,9)=110.000000 +V(9,9)=87.000000 +V(8,9)=96.000000 +V(4,9)=96.000000 +V(2,9)=103.000000 +V(11,8)=103.000000 +V(10,8)=112.000000 +V(9,8)=87.000000 +V(5,8)=80.000000 +V(3,8)=103.000000 +V(2,8)=103.000000 +V(3,7)=96.000000 +V(2,7)=103.000000 +V(11,6)=103.000000 +V(2,6)=103.000000 +V(11,5)=80.000000 +V(10,5)=80.000000 +V(8,5)=96.000000 +V(4,5)=103.000000 +V(3,5)=71.000000 +V(2,5)=103.000000 +V(11,4)=103.000000 +V(9,4)=96.000000 +V(5,4)=103.000000 +V(4,4)=103.000000 +V(3,4)=103.000000 +V(2,4)=103.000000 +V(11,3)=103.000000 +V(10,3)=103.000000 +V(8,3)=103.000000 +V(7,3)=96.000000 +V(5,3)=71.000000 +V(4,3)=103.000000 +V(2,3)=103.000000 +V(11,2)=103.000000 +V(10,2)=103.000000 +V(9,2)=103.000000 +V(8,2)=103.000000 +V(7,2)=103.000000 +V(6,2)=103.000000 +V(5,2)=103.000000 +V(4,2)=103.000000 +V(3,2)=103.000000 +V(2,2)=103.000000 +Layer:1 1 times re_gen +Layer:2 98 times re_gen +Layer:3 687 times re_gen +Layer:4 26973 times re_gen +Layer:5 202482 times re_gen +Layer:6 4270022 times re_gen +Layer:7 0 times re_gen +Generate Time 109.895000 +Time: 145.337000 s +Zobrist Replace Time:0.000000 +Total:41259726 nodes +zobrist_match:0 times +Hash Conflicts:468335 \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/Layer_log B" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/Layer_log B" new file mode 100644 index 0000000..a053835 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/Layer_log B" @@ -0,0 +1,232 @@ +V(7,8)=87.000000 +limit:87.000000 former_limit:-1.#INF00 +Changed Result to (7,8) +V(8,7)=87.000000 +V(5,6)=17.000000 +V(6,5)=17.000000 +V(6,8)=103.000000 +limit:103.000000 former_limit:87.000000 +Changed Result to (6,8) +V(6,7)=87.000000 +V(5,7)=24.000000 +V(8,6)=103.000000 +V(7,6)=87.000000 +V(7,5)=24.000000 +V(8,8)=38.000000 +V(5,5)=24.000000 +V(7,10)=24.000000 +V(4,10)=24.000000 +V(7,9)=24.000000 +V(6,9)=40.000000 +V(5,9)=24.000000 +V(3,9)=24.000000 +V(4,8)=24.000000 +V(10,7)=24.000000 +V(9,7)=24.000000 +V(4,7)=24.000000 +V(9,6)=40.000000 +V(4,6)=24.000000 +V(3,6)=24.000000 +V(9,5)=24.000000 +V(10,4)=24.000000 +V(8,4)=24.000000 +V(7,4)=24.000000 +V(6,4)=24.000000 +V(9,3)=24.000000 +V(6,3)=24.000000 +V(11,11)=24.000000 +V(7,11)=24.000000 +V(3,11)=24.000000 +V(10,10)=24.000000 +V(6,10)=24.000000 +V(2,10)=24.000000 +V(11,7)=24.000000 +V(10,6)=24.000000 +V(3,3)=24.000000 +V(10,11)=24.000000 +V(9,11)=24.000000 +V(8,11)=24.000000 +V(6,11)=24.000000 +V(5,11)=24.000000 +V(4,11)=24.000000 +V(2,11)=24.000000 +V(11,10)=24.000000 +V(9,10)=24.000000 +V(8,10)=24.000000 +V(5,10)=24.000000 +V(3,10)=24.000000 +V(11,9)=24.000000 +V(10,9)=24.000000 +V(9,9)=24.000000 +V(8,9)=31.000000 +V(4,9)=24.000000 +V(2,9)=24.000000 +V(11,8)=24.000000 +V(10,8)=24.000000 +V(9,8)=31.000000 +V(5,8)=40.000000 +V(3,8)=24.000000 +V(2,8)=24.000000 +V(3,7)=24.000000 +V(2,7)=24.000000 +V(11,6)=24.000000 +V(2,6)=24.000000 +V(11,5)=24.000000 +V(10,5)=24.000000 +V(8,5)=40.000000 +V(4,5)=24.000000 +V(3,5)=24.000000 +V(2,5)=24.000000 +V(11,4)=24.000000 +V(9,4)=24.000000 +V(5,4)=24.000000 +V(4,4)=24.000000 +V(3,4)=24.000000 +V(2,4)=24.000000 +V(11,3)=24.000000 +V(10,3)=24.000000 +V(8,3)=24.000000 +V(7,3)=24.000000 +V(5,3)=24.000000 +V(4,3)=24.000000 +V(2,3)=24.000000 +V(11,2)=24.000000 +V(10,2)=24.000000 +V(9,2)=24.000000 +V(8,2)=24.000000 +V(7,2)=24.000000 +V(6,2)=24.000000 +V(5,2)=24.000000 +V(4,2)=24.000000 +V(3,2)=24.000000 +V(2,2)=24.000000 +Layer:1 1 times re_gen +Layer:2 98 times re_gen +Layer:3 524 times re_gen +Layer:4 42785 times re_gen +Layer:5 0 times re_gen +Layer:6 0 times re_gen +Layer:7 0 times re_gen +Generate Time 1.232000 +Time: 1.482000 s +Zobrist Replace Time:0.030000 +Total:223353 nodes +zobrist_match:2954 times + + + +Hash Conflicts:0V(7,8)=103.000000 +limit:103.000000 former_limit:-1.#INF00 +Changed Result to (7,8) +V(8,7)=103.000000 +V(5,6)=96.000000 +V(6,5)=96.000000 +V(6,8)=94.000000 +V(6,7)=80.000000 +V(5,7)=123.000000 +limit:123.000000 former_limit:103.000000 +Changed Result to (5,7) +V(8,6)=94.000000 +V(7,6)=80.000000 +V(7,5)=123.000000 +V(8,8)=94.000000 +V(5,5)=103.000000 +V(7,10)=103.000000 +V(4,10)=103.000000 +V(7,9)=96.000000 +V(6,9)=103.000000 +V(5,9)=87.000000 +V(3,9)=103.000000 +V(4,8)=96.000000 +V(10,7)=103.000000 +V(9,7)=87.000000 +V(4,7)=103.000000 +V(9,6)=103.000000 +V(4,6)=80.000000 +V(3,6)=103.000000 +V(9,5)=87.000000 +V(10,4)=103.000000 +V(8,4)=96.000000 +V(7,4)=103.000000 +V(6,4)=119.000000 +V(9,3)=103.000000 +V(6,3)=103.000000 +V(11,11)=103.000000 +V(7,11)=103.000000 +V(3,11)=103.000000 +V(10,10)=103.000000 +V(6,10)=71.000000 +V(2,10)=103.000000 +V(11,7)=103.000000 +V(10,6)=110.000000 +V(3,3)=103.000000 +V(10,11)=103.000000 +V(9,11)=103.000000 +V(8,11)=103.000000 +V(6,11)=103.000000 +V(5,11)=103.000000 +V(4,11)=103.000000 +V(2,11)=103.000000 +V(11,10)=103.000000 +V(9,10)=103.000000 +V(8,10)=110.000000 +V(5,10)=110.000000 +V(3,10)=103.000000 +V(11,9)=103.000000 +V(10,9)=103.000000 +V(9,9)=103.000000 +V(8,9)=110.000000 +V(4,9)=103.000000 +V(2,9)=103.000000 +V(11,8)=103.000000 +V(10,8)=103.000000 +V(9,8)=110.000000 +V(5,8)=80.000000 +V(3,8)=103.000000 +V(2,8)=103.000000 +V(3,7)=103.000000 +V(2,7)=103.000000 +V(11,6)=103.000000 +V(2,6)=103.000000 +V(11,5)=103.000000 +V(10,5)=110.000000 +V(8,5)=96.000000 +V(4,5)=103.000000 +V(3,5)=71.000000 +V(2,5)=103.000000 +V(11,4)=103.000000 +V(9,4)=103.000000 +V(5,4)=103.000000 +V(4,4)=103.000000 +V(3,4)=103.000000 +V(2,4)=103.000000 +V(11,3)=103.000000 +V(10,3)=103.000000 +V(8,3)=103.000000 +V(7,3)=103.000000 +V(5,3)=71.000000 +V(4,3)=103.000000 +V(2,3)=103.000000 +V(11,2)=103.000000 +V(10,2)=103.000000 +V(9,2)=103.000000 +V(8,2)=103.000000 +V(7,2)=103.000000 +V(6,2)=103.000000 +V(5,2)=103.000000 +V(4,2)=103.000000 +V(3,2)=103.000000 +V(2,2)=103.000000 +Layer:1 1 times re_gen +Layer:2 98 times re_gen +Layer:3 603 times re_gen +Layer:4 18442 times re_gen +Layer:5 127744 times re_gen +Layer:6 9951158 times re_gen +Layer:7 0 times re_gen +Generate Time 280.225000 +Time: 336.180000 s +Zobrist Replace Time:4.582000 +Total:40052646 nodes +zobrist_match:2104467 times +Hash Conflicts:0 \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/a" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/a" new file mode 100644 index 0000000..8b55a27 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/a" @@ -0,0 +1,155 @@ +1:(2,5) +2:(3,5) +3:(4,5) +4:(5,5) +5:(7,5) +6:(8,5) +7:(9,5) +8:(10,5) +9:(6,1) +10:(6,2) +11:(6,3) +12:(6,4) +13:(6,6) +14:(6,7) +15:(6,8) +16:(6,9) +17:(2,1) +18:(3,2) +19:(4,3) +20:(5,4) +21:(8,7) +22:(9,8) +23:(10,9) +24:(10,1) +25:(9,2) +26:(8,3) +27:(7,4) +28:(4,7) +29:(3,8) +30:(2,9) +31:(1,6) +32:(2,6) +33:(3,6) +34:(4,6) +35:(8,6) +36:(9,6) +37:(5,2) +38:(5,3) +39:(5,7) +40:(5,8) +41:(5,9) +42:(5,10) +43:(1,2) +44:(2,3) +45:(3,4) +46:(7,8) +47:(8,9) +48:(9,10) +49:(1,10) +50:(10,6) +51:(11,6) +52:(7,2) +53:(7,3) +54:(7,7) +55:(7,9) +56:(7,10) +57:(11,10) +58:(11,2) +59:(10,3) +60:(9,4) +61:(4,9) +62:(3,10) + + 3 3 3 + 3 3 3 3 3 3 3 + 3 3 3 3 3 3 3 + 3 3 3 3 3 + 3 3 3 3 1 3 3 3 3 + 3 3 3 3 1 3 1 3 3 3 3 + 3 3 3 3 3 + 3 3 3 3 3 + 3 3 3 3 3 3 3 + 3 3 3 3 3 3 + + + + +63:(2,5) +64:(3,5) +65:(4,5) +66:(5,5) +67:(7,5) +68:(8,5) +69:(9,5) +70:(10,5) +71:(2,1) +72:(3,2) +73:(4,3) +74:(5,4) +75:(8,7) +76:(10,9) +77:(10,1) +78:(9,2) +79:(8,3) +80:(7,4) +81:(4,7) +82:(2,9) +83:(1,6) +84:(2,6) +85:(3,6) +86:(4,6) +87:(8,6) +88:(9,6) +89:(5,2) +90:(5,3) +91:(5,7) +92:(5,9) +93:(5,10) +94:(1,2) +95:(2,3) +96:(3,4) +97:(8,9) +98:(9,10) +99:(1,10) +100:(10,6) +101:(11,6) +102:(7,2) +103:(7,3) +104:(7,7) +105:(7,9) +106:(7,10) +107:(11,10) +108:(11,2) +109:(10,3) +110:(9,4) +111:(4,9) +112:(3,10) +113:(2,8) +114:(4,8) +115:(8,8) +116:(10,8) +117:(6,10) +118:(6,11) +119:(6,12) +120:(2,4) +121:(8,10) +122:(9,11) +123:(10,12) +124:(10,4) +125:(4,10) +126:(3,11) +127:(2,12) + + 3 3 3 + 3 3 3 3 3 3 3 + 3 3 3 3 3 3 3 + 3 3 3 3 3 3 3 + 3 3 3 3 1 3 3 3 3 + 3 3 3 3 1 3 1 3 3 3 3 + 3 3 3 3 3 + 3 3 3 3 1 3 3 3 3 + 3 3 3 3 3 3 3 + 3 3 3 3 3 3 3 3 3 + 3 3 3 + 3 3 3 \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/b" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/b" new file mode 100644 index 0000000..dd57bde --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/b" @@ -0,0 +1,33 @@ +1 Old_empty +(3,7) +(4,7) +(5,7) +(6,7) +(8,7) +(9,7) +(10,7) +(11,7) +(7,3) +(7,4) +(7,5) +(7,6) +(7,8) +(7,9) +(7,10) +(7,11) +(3,3) +(4,4) +(5,5) +(6,6) +(8,8) +(9,9) +(10,10) +(11,11) +(11,3) +(10,4) +(9,5) +(8,6) +(6,8) +(5,9) +(4,10) +(3,11) \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/fixed_excess_nodes" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/fixed_excess_nodes" new file mode 100644 index 0000000..0c80c1b --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Logs/fixed_excess_nodes" @@ -0,0 +1,121 @@ +V(7,8)=-58.000000 +limit:-58.000000 former_limit:-1.#INF00 +Changed Result to (7,8) +V(8,7)=-58.000000 +V(5,6)=-61.000000 +V(6,5)=-61.000000 +V(6,8)=-92.000000 +V(6,7)=-79.000000 +V(5,7)=16.000000 +limit:16.000000 former_limit:-58.000000 +Changed Result to (5,7) +V(8,6)=-92.000000 +V(7,6)=-79.000000 +V(7,5)=16.000000 +V(8,8)=-92.000000 +V(5,5)=-72.000000 +V(7,10)=7.000000 +V(4,10)=-16.000000 +V(7,9)=-39.000000 +V(6,9)=-65.000000 +V(5,9)=-72.000000 +V(3,9)=-18.000000 +V(4,8)=-9.000000 +V(10,7)=7.000000 +V(9,7)=0.000000 +V(4,7)=7.000000 +V(9,6)=-65.000000 +V(4,6)=-95.000000 +V(3,6)=-18.000000 +V(9,5)=-72.000000 +V(10,4)=-16.000000 +V(8,4)=-9.000000 +V(7,4)=7.000000 +V(6,4)=-16.000000 +V(9,3)=-18.000000 +V(6,3)=-18.000000 +V(11,11)=-18.000000 +V(7,11)=7.000000 +V(3,11)=-18.000000 +V(10,10)=-9.000000 +V(6,10)=-111.000000 +V(2,10)=-18.000000 +V(11,7)=7.000000 +V(10,6)=-111.000000 +V(3,3)=-18.000000 +V(10,11)=7.000000 +V(9,11)=14.000000 +V(8,11)=-18.000000 +V(6,11)=-2.000000 +V(5,11)=14.000000 +V(4,11)=0.000000 +V(2,11)=0.000000 +V(11,10)=7.000000 +V(9,10)=7.000000 +V(8,10)=5.000000 +V(5,10)=-95.000000 +V(3,10)=0.000000 +V(11,9)=14.000000 +V(10,9)=7.000000 +V(9,9)=14.000000 +V(8,9)=-72.000000 +V(4,9)=-72.000000 +V(2,9)=-18.000000 +V(11,8)=-18.000000 +V(10,8)=5.000000 +V(9,8)=-72.000000 +V(5,8)=-77.000000 +V(3,8)=-2.000000 +V(2,8)=0.000000 +V(3,7)=-72.000000 +V(2,7)=-18.000000 +V(11,6)=-2.000000 +V(2,6)=-18.000000 +V(11,5)=14.000000 +V(10,5)=-95.000000 +V(8,5)=-65.000000 +V(4,5)=7.000000 +V(3,5)=-88.000000 +V(2,5)=0.000000 +V(11,4)=7.000000 +V(9,4)=-72.000000 +V(5,4)=7.000000 +V(4,4)=-2.000000 +V(3,4)=7.000000 +V(2,4)=-18.000000 +V(11,3)=-18.000000 +V(10,3)=0.000000 +V(8,3)=-2.000000 +V(7,3)=-72.000000 +V(5,3)=-88.000000 +V(4,3)=7.000000 +V(2,3)=-18.000000 +V(11,2)=0.000000 +V(10,2)=-18.000000 +V(9,2)=-18.000000 +V(8,2)=0.000000 +V(7,2)=-18.000000 +V(6,2)=-18.000000 +V(5,2)=0.000000 +V(4,2)=-18.000000 +V(3,2)=-18.000000 +V(2,2)=0.000000 +Layer:1 1 times re_gen +Layer:2 98 times re_gen +Layer:3 676 times re_gen +Layer:4 25390 times re_gen +Layer:5 175467 times re_gen +Layer:6 5254523 times re_gen +Layer:7 0 times re_gen +Generate Time 122.704000 +Time: 150.974000 s +Zobrist Replace Time:0.000000 +Total:5456154 nodes +zobrist_match:0 times +Layer 1 Hash Conflicts:0 +Layer 2 Hash Conflicts:0 +Layer 3 Hash Conflicts:0 +Layer 4 Hash Conflicts:0 +Layer 5 Hash Conflicts:0 +Layer 6 Hash Conflicts:0 +Layer 7 Hash Conflicts:0 \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/MT199937.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/MT199937.c" new file mode 100644 index 0000000..92aa40b --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/MT199937.c" @@ -0,0 +1,47 @@ +#include + +#define MT19937_N 624 +#define MT19937_M 397 +#define MT19937_R 31 +#define MT19937_A 0x9908B0DFUL +#define MT19937_U 11 +#define MT19937_S 7 +#define MT19937_B 0x9D2C5680UL +#define MT19937_T 15 +#define MT19937_C 0xEFC60000UL +#define MT19937_L 18 +#define MT19937_F 1812433253UL + +static unsigned int mt[MT19937_N]; +static int index = MT19937_N + 1; + +void mt19937_init(unsigned int seed) { + mt[0] = seed; + for (int i = 1; i < MT19937_N; i++) { + mt[i] = (MT19937_F * (mt[i - 1] ^ (mt[i - 1] >> 30)) + i); + } +} + +unsigned int mt19937_generate() { + if (index >= MT19937_N) { + for (int i = 0; i < MT19937_N - MT19937_M; i++) { + unsigned int x = (mt[i] & 0x80000000UL) | (mt[i + 1] & 0x7FFFFFFFUL); + mt[i] = mt[i + MT19937_M] ^ (x >> 1) ^ ((x & 1) * MT19937_A); + } + for (int i = MT19937_N - MT19937_M; i < MT19937_N - 1; i++) { + unsigned int x = (mt[i] & 0x80000000UL) | (mt[i + 1] & 0x7FFFFFFFUL); + mt[i] = mt[i + (MT19937_M - MT19937_N)] ^ (x >> 1) ^ ((x & 1) * MT19937_A); + } + unsigned int x = (mt[MT19937_N - 1] & 0x80000000UL) | (mt[0] & 0x7FFFFFFFUL); + mt[MT19937_N - 1] = mt[MT19937_M - 1] ^ (x >> 1) ^ ((x & 1) * MT19937_A); + index = 0; + } + + unsigned int y = mt[index++]; + y ^= (y >> MT19937_U); + y ^= (y << MT19937_S) & MT19937_B; + y ^= (y << MT19937_T) & MT19937_C; + y ^= (y >> MT19937_L); + + return y; +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/MT199937.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/MT199937.h" new file mode 100644 index 0000000..9ea1733 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/MT199937.h" @@ -0,0 +1,5 @@ +#ifndef WORK_MT199937_GPT_H +#define WORK_MT199937_GPT_H +void mt19937_init(unsigned int seed); +unsigned int mt19937_generate(); +#endif //WORK_MT199937_GPT_H diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/README.md" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/README.md" new file mode 100644 index 0000000..ba9b682 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/README.md" @@ -0,0 +1,23 @@ +## Gobang AI 简介 +### 目录 +- Former Codes + - 一些函数的历史版本 + - 注:可忽略 +- Logs + - 是一些程序调试的简单日志 + - 曾用于错误分析,以及性能分析和优化 + - 注:可忽略 +- Work + - 图形界面是gui.c,也相当于整个程序的main.c,运行时选择gui.c这个目标。 + - test.c是递归函数 + - 其他文件是各个类型的函数,包括估值系统、栈、哈希表、着点生成、梅森旋转算法、Zobrist键值计算。 + - linked_hash_value_list.c是被抛弃的功能,速度过慢,只在初期尝试的时候被使用过,不影响整体功能。 +- 课程设计的介绍PPT + - PPT 简介 +### 备注 + - raylib库已引入,若不能运行,尝试配置好Clion工具链 + + ``-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake`` + + - 默认编译为Release模式 + - 感谢指导,完美结课 \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/ToDoList.md" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/ToDoList.md" new file mode 100644 index 0000000..f69230b --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/ToDoList.md" @@ -0,0 +1,32 @@ +1.test: +- [x] 向isStepTerminate与evaluate_line中加入活四判定为必胜的情况。 +- [ ] 路径选择机制:有利最短,不利最长。 +- [ ] 单侧不可能成5的伪活3优化/单侧不能成5的伪眠3优化 +- [ ] 冲4延伸 +- [x] Range limit()可以考虑局部刷新,traverse多一个参数range +- [x] evaluate_line()增加终点限制,射线改为线段 +- [ ] 将被剪枝的未定值节点的终止值与剩余搜索栈储存到哈希表中,避免相同局面的部分重复计算 + +2.gui: +- [x] 增加胜利判别 +- [ ] 增加悔棋、提前结束选择gui +- [ ] 显示5连棋子,最新下的棋子,棋子顺序编号 +- [ ] 调整棋盘 + +启发式搜索 +- [x] 评估一个位置 +- [x] 储存分值与排序 +- [x] 出现对方下后己方必输的位置(活3 变 活4,双活3),只搜索这些必输位。 + +局部更新 +- [x] 搜索范围限制 +- [x] 启发式搜索中点的评估和排序 +- [x] 全局估值 + +Bug: +- [x] 使用内存随棋数大量增加 + +置换表可能的问题原因: +- [ ] 随机数质量不足,Zobrist 哈希值存在冲突 +- [ ] 储存到置换表中的分值可能不合理 +- [ ] 导致末分支点激增的未知原因 \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Zobrist.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Zobrist.c" new file mode 100644 index 0000000..655b3fa --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Zobrist.c" @@ -0,0 +1,16 @@ +#include +#include "defination.h" +#include "MT199937.h" +void randomFill(unsigned long long (*b)[15][2]){ + mt19937_init((unsigned)time(NULL)); + for(int i = 0; i < 15; i++){ + for ( int j = 0; j < 15; j++){ + b[i][j][0] = ((unsigned long long)mt19937_generate()<<32)|mt19937_generate(); + b[i][j][1] = ((unsigned long long)mt19937_generate()<<32)|mt19937_generate(); + } + } +} + +void changeHash(unsigned long long *hashKey,unsigned long long (*hashMap)[15][2],Point *step,enum piece side){ + *hashKey ^= hashMap[step->y][step->x][side == Black?0:1]; +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/Zobrist.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Zobrist.h" new file mode 100644 index 0000000..8ba9686 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/Zobrist.h" @@ -0,0 +1,6 @@ +#ifndef GOBANG_ZOBRIST_H +#define GOBANG_ZOBRIST_H +#include "defination.h" +void randomFill(unsigned long long (*b)[15][2]); +void changeHash(unsigned long long *hashKey,unsigned long long (*hashMap)[15][2],Point *step,enum piece side); +#endif //GOBANG_ZOBRIST_H \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/board_control.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/board_control.c" new file mode 100644 index 0000000..89ee17f --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/board_control.c" @@ -0,0 +1,5 @@ +#include "defination.h" + +void changePiece(int (*b)[15], Point *point, enum piece piece) { + *(b[point->y] + point->x) = piece; +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/board_control.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/board_control.h" new file mode 100644 index 0000000..90b8924 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/board_control.h" @@ -0,0 +1,7 @@ +#ifndef GOBANG_BOARD_CONTROL_H +#define GOBANG_BOARD_CONTROL_H +#include "defination.h" + +void changePiece(int (*b)[15], Point *point, enum piece piece); + +#endif //GOBANG_BOARD_CONTROL_H diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/defination.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/defination.h" new file mode 100644 index 0000000..e391b9a --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/defination.h" @@ -0,0 +1,59 @@ +#ifndef GOBANG_DEFINATION_H +#define GOBANG_DEFINATION_H +#include +enum piece { + Empty = 0, Black = 1, White = -1 +}; +enum type { + Max, Min +}; +typedef struct { + int x; + int y; +} Point; + +//每一个局面的下一步搜索范围如何确定? +typedef struct { + int Xmin; + int Xmax; + int Ymin; + int Ymax; +} Range; + +typedef struct { + Point point; + float value; +}Point_Value; + +typedef struct { + Point point; + int step; +} Point_step; + +typedef struct { + unsigned long long hash; + float value; + int count_step; + int depth; + bool isSearchFinished; + Point nextPoint; +}Hash_value; + +typedef struct { + Point_Value *data; + Point_Value *sequence[225]; +} GenData; + +typedef struct { + Range *pRange; + GenData *old_sequence; + float score; +} Data; + +typedef struct { + Point *influenced_empty_old; + GenData *old_sequence; + float score; +}newData; + +#endif //GOBANG_DEFINATION_H \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/evaluate_func.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/evaluate_func.c" new file mode 100644 index 0000000..407b452 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/evaluate_func.c" @@ -0,0 +1,403 @@ +#include +#include +#include "defination.h" +#include "board_control.h" +#include + +float pow_float(int x, int y); +float evaluate_line(int (*b)[15], Point point, int dx, int dy, enum piece sideMax); +float evaluate_point(int (*b)[15],Point *step,enum piece side); +float evaluate(int (*b)[15], enum piece sideMax); +float re_evaluate(int (*b)[15],enum piece sideMax,Point *step,enum piece side,float score); +float isStepTerminate(int (*b)[15], Point *step, enum piece sideMax, enum piece side); + +float pow_float(int x, int y) { + if(y < 0){//估值函数的设定 + return 0; + } + float result = 1; + for (int i = 0; i < y; i++) { + result *= x; + } + return result; +} + +float evaluate(int (*b)[15], enum piece sideMax) { + //value在各方向的分值。行r,列c,左上->右下diag_1,右上->左下diag_2。 + float value; + value = 0; + + Point start = {0, 0}; + for (start.x = 0, start.y = 0; start.x < 14; start.x++) { + value += evaluate_line(b, start, 0, 1, sideMax);//纵向 + } + for (start.x = 0, start.y = 0; start.y < 15; start.y++) { + value += evaluate_line(b, start, 1, 0, sideMax);//横向 + } + + for(start.x = 0,start.y = 0; start.y<15;start.y++){ + if( start.y >= 4){//限制条件用于排除部分不可能形成五连的区域 + value += evaluate_line(b, start, 1, -1, sideMax);//右上 + } + if(start.y <= 10){ + value += evaluate_line(b, start, 1, 1, sideMax);//右下 + } + } + for(start.x = 14,start.y = 0;start.y < 15;start.y++){ + if( start.y >= 4 && start.y != 14){//限制范围,并避免重复计算对角线的估值。 + value += evaluate_line(b, start, -1, -1, sideMax);//左上 + } + if(start.y != 0 && start.y <=10 ){ + value += evaluate_line(b, start, -1, 1, sideMax);//左下 + } + } + return value; +} + +float evaluate_line(int (*b)[15], Point point, int dx, int dy, enum piece sideMax) { + enum piece temp_side = Empty; + int empty_before = 0; + int count = 0; + float value = 0; + //一条线上的推进和估值 + for (int i = point.x, j = point.y; 0 <= i && i <= 14 && 0 <= j && j <= 14; i += dx, j += dy) { + //末位不为空,无法通过下一位是否相异触发结算,首先单列处理。 + if (i + dx < 0 || i + dx > 14 || j + dy < 0 || j + dy > 14) { + //前一位为空 + if (temp_side == Empty) {//前一位为空 + float sideNumber = *(b[j] + i) == sideMax ? 1 : -1;//当前与sideMax相同棋子得分为正,不同为负。 + if (*(b[j] + i) != Empty) { + //结算 单侧空1个棋子。 + value += pow_float(10, count - 1) * sideNumber * 1; + break; + } + } else if (*(b[j] + i) == temp_side) {//前一位不为空并且本位与前一位相同,需要算入本位时 + float sideNumber = temp_side == sideMax ? 1 : -1;//前一位与sideMax相同棋子得分为正,不同为负。 + count++; + //结算估值 单侧空或无空 + if (empty_before) { + if(count<5) { + value += pow_float(10, count - 1) * sideNumber * 1; + }else{//若5连估值无限 + value = sideNumber == 1? INFINITY:-INFINITY; + } + break; + }//双侧无空为0,r不增加。 + } + } + + if (*(b[j] + i) == temp_side) { + //相同棋子,无需估值,只需累计黑白棋子或者跳过空棋子。 + if (*(b[j] + i) == Empty) { + empty_before = 1;//确保首个为空时empty_before正常更新为1 + continue; + } else { + count++; + } + + } else { + //遇到相异棋子,可能进行一次估值,并清空count。 + if (temp_side != Empty) { + float sideNumber = temp_side == sideMax ? 1 : -1;//与sideMax相同棋子得分为正,不同为负。 + + if (empty_before && *(b[j] + i) == Empty) { + //两侧有空 + if(count < 4){ + value += pow_float(10, count - 1) * sideNumber * 2; + }else{//活四与活五的估值 + value = sideNumber == 1?INFINITY:-INFINITY; + } + + } else if (empty_before || *(b[j] + i) == Empty) { + //单侧有空 + if (count < 5) { + value += pow_float(10, count - 1) * sideNumber * 1; + }else{ + value = sideNumber == 1?INFINITY:-INFINITY; + } + }else{ + //两侧不空 ,0值或无限 + if (count == 5){ + value = sideNumber == 1?INFINITY:-INFINITY; + } + } + + empty_before = 0;//前一位不为空,对当前位置更新empty_before + count = 0;//相异且前一个不为空则最终清空原计数。 + } + + if (*(b[j] + i) == Empty) { + empty_before = 1; + } else { + count++; + } + + temp_side = *(b[j] + i); + } + + } + + return value; +} + +float evaluate_line_range(int (*b)[15], Point point, int dx, int dy, Range range,enum piece sideMax) { + enum piece temp_side = Empty; + int empty_before = 0; + int count = 0; + float value = 0; + //一条线上的推进和估值 + for (int i = point.x, j = point.y; range.Xmin <= i && i <= range.Xmax && range.Ymin <= j && j <= range.Ymax; i += dx, j += dy) { + //末位不为空,无法通过下一位是否相异触发结算,首先单列处理。 + if (i + dx < range.Xmin || i + dx > range.Xmax || j + dy < range.Ymin || j + dy > range.Ymax) { + //前一位为空 + if (temp_side == Empty) {//前一位为空 + float sideNumber = *(b[j] + i) == sideMax ? 1 : -1;//当前与sideMax相同棋子得分为正,不同为负。 + if (*(b[j] + i) != Empty) { + //结算 单侧空1个棋子。 + value += pow_float(10, count - 1) * sideNumber * 1; + break; + } + } else if (*(b[j] + i) == temp_side) {//前一位不为空并且本位与前一位相同,需要算入本位时 + float sideNumber = temp_side == sideMax ? 1 : -1;//前一位与sideMax相同棋子得分为正,不同为负。 + count++; + //结算估值 单侧空或无空 + if (empty_before) { + if(count<5) { + value += pow_float(10, count - 1) * sideNumber * 1; + }else{//若5连估值无限 + value = sideNumber == 1? INFINITY:-INFINITY; + } + break; + }//双侧无空为0,r不增加。 + } + } + + if (*(b[j] + i) == temp_side) { + //相同棋子,无需估值,只需累计黑白棋子或者跳过空棋子。 + if (*(b[j] + i) == Empty) { + empty_before = 1;//确保首个为空时empty_before正常更新为1 + continue; + } else { + count++; + } + + } else { + //遇到相异棋子,可能进行一次估值,并清空count。 + if (temp_side != Empty) { + float sideNumber = temp_side == sideMax ? 1 : -1;//与sideMax相同棋子得分为正,不同为负。 + + if (empty_before && *(b[j] + i) == Empty) { + //两侧有空 + if(count < 4){ + value += pow_float(10, count - 1) * sideNumber * 2; + }else{//活四与活五的估值 + value = sideNumber == 1?INFINITY:-INFINITY; + } + + } else if (empty_before || *(b[j] + i) == Empty) { + //单侧有空 + if (count < 5) { + value += pow_float(10, count - 1) * sideNumber * 1; + }else{ + value = sideNumber == 1?INFINITY:-INFINITY; + } + }else{ + //两侧不空 ,0值或无限 + if (count == 5){ + value = sideNumber == 1?INFINITY:-INFINITY; + } + } + + empty_before = 0;//前一位不为空,对当前位置更新empty_before + count = 0;//相异且前一个不为空则最终清空原计数。 + } + + if (*(b[j] + i) == Empty) { + empty_before = 1; + } else { + count++; + } + + temp_side = *(b[j] + i); + } + + } + + return value; +} + +float isStepTerminate(int (*b)[15], Point *step, enum piece sideMax, enum piece side) { + int Xmin, Xmax, Ymin, Ymax; + Xmin = Xmax = step->x; + Ymin = Ymax = step->y;//搜索范围初始为当次Step坐标。 + + Xmin = Xmin - 4 >= 0 ? Xmin - 4 : 0; + Ymin = Ymin - 4 >= 0 ? Ymin - 4 : 0; + Xmax = Xmax + 4 <= 14 ? Xmax + 4 : 14; + Ymax = Ymax + 4 <= 14 ? Ymax + 4 : 14;//确定上下左右搜索范围。 + + for (int i = Xmin, j = step->y, count = 0; i <= Xmax; i++) { + if (*(b[j] + i) == side) { + count++; + } else { + count = 0; + } + if (count == 5) { + return sideMax == side ? INFINITY : -INFINITY;//该步已终结对局。/sideMax*side*INFINITY + } + } + + for (int i = step->x, j = Ymin, count = 0; j <= Ymax; j++) { + if (*(b[j] + i) == side) { + count++; + } else { + count = 0; + } + if (count == 5) { + return sideMax == side ? INFINITY : -INFINITY;//该步已终结对局。/sideMax*side*INFINITY + } + } + + //计算斜线搜索的2个起点。左上到右下:l1:y=x-step->x+step->y 右上到左下:l2:y=-x+step->x+step->y 注意:棋盘坐标系与常规坐标系y轴方向不同。 + Point p1, p2; + p2.x = min(Xmax, -Ymin + step->x + step->y); + p2.y = -p2.x + step->x + step->y; + + p1.x = max(Xmin, Ymin + step->x - step->y); + p1.y = p1.x - step->x + step->y; + + for (int i = p1.x, j = p1.y, count = 0; i <= Xmax && j <= Ymax; i++, j++) { + if (*(b[j] + i) == side) { + count++; + } else { + count = 0; + } + if (count == 5) { + return sideMax == side ? INFINITY : -INFINITY;//该步已终结对局。/sideMax*side*INFINITY + } + } + + for (int i = p2.x, j = p2.y, count = 0; i >= Xmin && j <= Ymax; i--, j++) { + if (*(b[j] + i) == side) { + count++; + } else { + count = 0; + } + if (count == 5) { + return sideMax == side ? INFINITY : -INFINITY;//该步已终结对局。/sideMax*side*INFINITY + } + } + + return 0; +} + +float evaluate_point(int (*b)[15],Point *step,enum piece side){ + int Xmin, Xmax, Ymin, Ymax; + //确定上下左右搜索范围。 + Xmin = step->x - 4 >= 0 ? step->x - 4 : 0; + Ymin = step->y - 4 >= 0 ? step->y - 4 : 0; + Xmax = step->x + 4 <= 14 ? step->x + 4 : 14; + Ymax = step->y + 4 <= 14 ? step->y + 4 : 14; + Range range = {Xmin,Xmax,Ymin,Ymax}; + + Point left = {Xmin,step->y}; + Point up = {step->x,Ymin}; + + //计算斜线搜索的2个起点。左上到右下:l1:y=x-step->x+step->y 右上到左下:l2:y=-x+step->x+step->y 注意:棋盘坐标系与常规坐标系y轴方向不同。 + Point left_up, right_up; + right_up.x = min(Xmax, -Ymin + step->x + step->y); + right_up.y = -right_up.x + step->x + step->y; + + left_up.x = max(Xmin, Ymin + step->x - step->y); + left_up.y = left_up.x - step->x + step->y; + + + //若下己方棋子,正值收益 + changePiece(b,step,side); + float value_self = 0; + if(left_up.x <= 10) { + value_self += evaluate_line_range(b, left_up, 1, 1, range, side); + } + if(right_up.x >= 4) { + value_self += evaluate_line_range(b, right_up, -1, 1, range, side); + } + value_self += evaluate_line_range(b,left,1,0,range,side); + value_self += evaluate_line_range(b,up,0,1,range,side); + + //若下敌方棋子,负值损失 + changePiece(b,step,-side); + float value_rival = 0; + if(left_up.x <= 10) { + value_rival += evaluate_line_range(b, left_up, 1, 1, range, -side); + } + if(right_up.x >= 4) { + value_rival += evaluate_line_range(b, right_up, -1, 1, range, -side); + } + value_rival += evaluate_line_range(b,left,1,0,range,-side); + value_rival += evaluate_line_range(b,up,0,1,range,-side); + + changePiece(b,step,Empty); + + return value_self>value_rival? value_self:value_rival; +} + +float re_evaluate(int (*b)[15],enum piece sideMax,Point *step,enum piece side,float score){ + //默认前提为传入的b已经下入新步Step + Point left = {0,step->y}; + Point up = {step->x,0}; + + Point left_up, right_up; + + right_up.x = min(14, step->x + step->y); + right_up.y = -right_up.x + step->x + step->y; + + left_up.x = max(0, step->x - step->y); + left_up.y = left_up.x - step->x + step->y; + + changePiece(b,step,Empty); + float temp_old_score; + //evaluate 4lines = score_old + temp_old_score = evaluate_line(b,left,1,0,sideMax); + if(temp_old_score == INFINITY || temp_old_score == -INFINITY){ + changePiece(b,step,side); + return evaluate(b,sideMax); + } + score -= temp_old_score; + + temp_old_score = evaluate_line(b,up,0,1,sideMax); + if(temp_old_score == INFINITY || temp_old_score == -INFINITY){ + changePiece(b,step,side); + return evaluate(b,sideMax); + } + score -= temp_old_score; + + if(left_up.x <= 10){ + temp_old_score = evaluate_line(b,left_up,1,1,sideMax); + if(temp_old_score == INFINITY || temp_old_score == -INFINITY){ + changePiece(b,step,side); + return evaluate(b,sideMax); + } + score -= temp_old_score; + } + + if(right_up.x >=4){ + temp_old_score = evaluate_line(b,right_up,-1,1,sideMax); + if(temp_old_score == INFINITY || temp_old_score == -INFINITY){ + changePiece(b,step,side); + return evaluate(b,sideMax); + } + score -= temp_old_score; + } + + changePiece(b,step,side); + //evaluate 4lines = score_new + score += evaluate_line(b,left,1,0,sideMax); + score += evaluate_line(b,up,0,1,sideMax); + if(left_up.x <= 10){ + score += evaluate_line(b,left_up,1,1,sideMax); + } + if(right_up.x >=4){ + score += evaluate_line(b,right_up,-1,1,sideMax); + } + return score; +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/evaluate_func.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/evaluate_func.h" new file mode 100644 index 0000000..cb14fdf --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/evaluate_func.h" @@ -0,0 +1,11 @@ +#ifndef GOBANG_EVALUATE_FUNC_H +#define GOBANG_EVALUATE_FUNC_H +#include "defination.h" +float pow_float(int x, int y); +float evaluate_line(int (*b)[15], Point point, int dx, int dy, enum piece sideMax); +float evaluate_line_range(int (*b)[15], Point point, int dx, int dy,Range range,enum piece sideMax); +float evaluate_point(int (*b)[15],Point *step,enum piece side); +float evaluate(int (*b)[15], enum piece sideMax); +float re_evaluate(int (*b)[15],enum piece sideMax,Point *step,enum piece side,float score); +float isStepTerminate(int (*b)[15], Point *step, enum piece sideMax, enum piece side); +#endif //GOBANG_EVALUATE_FUNC_H diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/generate.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/generate.c" new file mode 100644 index 0000000..6687bd4 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/generate.c" @@ -0,0 +1,713 @@ +#include +#include +#include +#include +#include +#include "defination.h" +#include "evaluate_func.h" +#include "stack_point.h" +#include "hash_table.h" +#include "Zobrist.h" +Range limit(int (*b)[15]) { + int Xmin, Xmax, Ymin, Ymax; + Xmin = Ymin = 14; + Xmax = Ymax = 0;//将最小值组Xmin,Ymin赋值最大初始化,最大值组相反处理,方便后续搜索时直接与i,j比较确定最终值。 + + for (int i = 0; i < 15; i++) { + for (int j = 0; j < 15; j++) { + if (*(b[i] + j) != Empty) { + Xmin = min(Xmin, j); + Ymin = min(Ymin, i); + + Xmax = max(Xmax, j); + Ymax = max(Ymax, i); + } + } + } + + //根据已有棋子范围,x和y轴方向均扩充5格,并确保最终range不越界。 + Range range; + range.Xmin = Xmin - 4 >= 0 ? Xmin - 4 : 0; + range.Xmax = Xmax + 4 <= 14 ? Xmax + 4 : 14; + range.Ymin = Ymin - 4 >= 0 ? Ymin - 4 : 0; + range.Ymax = Ymax + 4 <= 14 ? Ymax + 4 : 14; + return range; +} + +Range re_limit(Range range,Point *step){ + int p_Xmax = step->x + 4 <= 14? step->x+4:14; + int p_Ymax = step->y + 4 <= 14? step->y+4:14; + int p_Xmin = step->x - 4 >= 0? step->x - 4:0; + int p_Ymin = step->y - 4 >= 0? step->y - 4:0; + + range.Xmin = min(p_Xmin,range.Xmin); + range.Xmax = max(p_Xmax,range.Xmax); + range.Ymin = min(p_Ymin,range.Ymin); + range.Ymax = max(p_Ymax,range.Ymax); + + return (Range){range.Xmin,range.Xmax,range.Ymin,range.Ymax}; +} + +bool isPointInfluenced(Point point,Point step){ + int Xmin = max(step.x-4,0); + int Xmax = min(step.x+4,14); + int Ymin = max(step.y-4,0); + int Ymax = min(step.y+4,14); + //不在新点周边范围内 + if(point.x Xmax){ + return false; + } + + if(point.y Ymax){ + return false; + } + //不在新点米子方向上 + if(point.x != step.x && point.y != step.y && point.y != point.x - step.x + step.y && point.y != -point.x +step.x +step.y){ + return false; + } + + return true; +} + +Stack* generate_old(int (*b)[15], Range range,enum piece side){ + + Point_Value *values[15 * 15] = {NULL}; + int count = 0; + + for(int i = range.Ymin; i <= range.Ymax; i++){ + for(int j = range.Xmin;j <= range.Xmax; j++){ + + if(*(b[i]+j) == Empty){ + Point step = {j,i}; + Point_Value *temp = NULL; + + values[count] = temp = (Point_Value*)malloc(sizeof(Point_Value)); + temp->point.x = j; + temp->point.y = i; + temp->value = evaluate_point(b,&step,side); + + //由小至大插入排序各个V_Point* + int target = 0; + for(; target < count; target++){ + if(values[target]->value > values[count]->value){ + break; + } + } + + for(int n = count;n>target;n--){ + values[n] = values[n-1]; + } + + values[target] = temp; + + count ++; + } + + } + } + + Stack *stack = create_stack(count); + for(int i = 0; i < count; i ++){ + stack_push(stack,values[i]->point); + free(values[i]); + } + + return stack; +} + +float generateRoughScore(int (*board)[15],enum piece side,enum piece sideMax,Point *step,HashTable *hashTable,unsigned long long (*randomSet)[15][2],unsigned long long *hashKey,int depthRequired){ + changeHash(hashKey,randomSet,step,side); + if(HashMatch(hashTable,*hashKey)){ + Hash_value *p = hashTableGetAddress(hashTable,*hashKey); + if(p->depth >= depthRequired){ + return side == sideMax?p->value:-p->value; + } + }else{ + return evaluate_point(board,step,side); + } + changeHash(hashKey,randomSet,step,side); +} + +Stack* generate(int (*b)[15], Range range, enum piece side,enum piece sideMax, GenData *result,HashTable *hashTable,unsigned long long (*randomSet)[15][2],unsigned long long *hashKey,int depthRequired){ + result->data = (Point_Value*) malloc(225 * sizeof(Point_Value)); + int count = 0; + int existInfinity = 0; + + for(int i = range.Ymin; i <= range.Ymax; i++){ + for(int j = range.Xmin;j <= range.Xmax; j++){ + + if(*(b[i]+j) == Empty){ + Point step = {j,i}; + Point_Value *temp = NULL; + + result->sequence[count] = temp = result->data + count; + temp->point = step; + temp->value = evaluate_point(b,&step,side); +// changeHash(hashKey,randomSet,&step,side); +// if(HashMatch(hashTable,*hashKey)){ +// Hash_value *p = hashTableGetAddress(hashTable,*hashKey); +// if(p->depth >= depthRequired){ +// temp->value = p->value; +// } +// }else{ +// temp->value = evaluate_point(b,&step,side); +// } +// changeHash(hashKey,randomSet,&step,side); +// generateRoughScore(b,side,sideMax,&step,hashTable,randomSet,hashKey,depthRequired); + + if(temp->value == INFINITY){ + existInfinity = 1; + } + + //由小至大插入排序各个V_Point* + //!插入排序 + int target = 0; + for(; target < count; target++){ + if(result->sequence[target]->value > result->sequence[count]->value){ + break; + } + } + + for(int n = count;n>target;n--){ + result->sequence[n] = result->sequence[n-1]; + } + + result->sequence[target] = temp; + + count ++; + } + + } + } + + Stack *stack = create_stack(count); + if(existInfinity){ + for(int i = 0; i < count; i ++){ + if(result->sequence[i]->value == INFINITY){//某些位置被下子后会决定局面,则只搜索这些位置 + stack_push(stack,result->sequence[i]->point); + } + } + }else{ + for(int i = 0; i < count; i ++){ + stack_push(stack,result->sequence[i]->point); + } + } + + return stack; +} + +Stack* regenerate(int (*b)[15], Range *pRangeBefore, Range *range, enum piece side, Point *step, GenData *result, GenData *GenDataBefore,HashTable *hashTable,unsigned long long (*randomSet)[15][2],unsigned long long *hashKey,int depthRequired){ + int SIZE_FORMER = 225; + + Point_Value *data = (Point_Value*) malloc(450*sizeof (Point_Value )); + + Point_Value *old_sequence_copy[15 * 15] = {NULL};//former中的地址还会传给上层的可能的其他待搜索节点,为防止破坏former,先对former中数据进行复制 + + int count_old_sequence = 0; + for(int i = 0; GenDataBefore->sequence[i]; i++){ + old_sequence_copy[i] = data + count_old_sequence; + old_sequence_copy[i]->value = GenDataBefore->sequence[i]->value; + old_sequence_copy[i]->point = GenDataBefore->sequence[i]->point; + count_old_sequence++; + } + + //将新步以及受到新步影响的空点的原值从old_sequence_copy中剔除 + int count_delete = 0; + for(int i = 0; old_sequence_copy[i]; i++){ + //former_copy中只含空点和新步(即上层所有空点)的值,不需判断受影响点是否为空 + if(isPointInfluenced(old_sequence_copy[i]->point, *step)){ + old_sequence_copy[i]=NULL; + count_delete++; + } + } + + //Range Comparing and evaluate the new points. + //评估新增区域各点时限制条件为 > 或 < ,用于避免重复评估旧区域的边界点 + Point_Value *newPoints[15*15]; + int count_new = 0; + + int count_dif_boundary = 0; + Range possibleDelta = {0};//当新range与旧RangeBefore存在2个不同边界时,额外有一部分范围需要搜索。 + + if(pRangeBefore->Xmin != range->Xmin){ + possibleDelta.Xmin = range->Xmin; + possibleDelta.Xmax = pRangeBefore->Xmin-1; + count_dif_boundary++; + + for(int j = pRangeBefore->Ymin; j <= pRangeBefore ->Ymax ; j++){ + for(int i = range->Xmin; i < pRangeBefore->Xmin;i++){ + //判断用于排除当前步在新范围内的情况,避免错误的重复搜索 + if(b[j][i] == Empty) { + newPoints[count_new] = data + SIZE_FORMER + count_new; + newPoints[count_new]->point = (Point) {i, j}; + newPoints[count_new]->value = evaluate_point(b, &(newPoints[count_new]->point), side); + + count_new++; + } + } + } + } + + if(pRangeBefore->Xmax != range ->Xmax){ + possibleDelta.Xmin = pRangeBefore->Xmax+1; + possibleDelta.Xmax = range->Xmax; + count_dif_boundary++; + for(int j = pRangeBefore->Ymin; j <= pRangeBefore ->Ymax ; j++){ + for(int i = pRangeBefore->Xmax + 1; i <= range->Xmax;i++){ + + if(b[j][i] == Empty) { + newPoints[count_new] = data + SIZE_FORMER + count_new; + newPoints[count_new]->point = (Point) {i, j}; + newPoints[count_new]->value = evaluate_point(b, &(newPoints[count_new]->point), side); + + count_new++; + } + } + } + } + + if(pRangeBefore->Ymin != range ->Ymin){ + possibleDelta.Ymin = range->Ymin; + possibleDelta.Ymax = pRangeBefore->Ymin - 1; + count_dif_boundary++; + for(int j = range->Ymin; j < pRangeBefore->Ymin; j++){ + for(int i = pRangeBefore->Xmin; i <= pRangeBefore->Xmax; i++){ + if(b[j][i] == Empty) { + newPoints[count_new] = data + SIZE_FORMER + count_new; + newPoints[count_new]->point = (Point) {i, j}; + newPoints[count_new]->value = evaluate_point(b, &(newPoints[count_new]->point), side); + + count_new++; + } + } + } + } + + if(pRangeBefore->Ymax != range ->Ymax){ + possibleDelta.Ymin = pRangeBefore->Ymax + 1; + possibleDelta.Ymax = range->Ymax; + count_dif_boundary++; + for(int j = pRangeBefore->Ymax + 1; j<= range->Ymax; j++){ + for(int i = pRangeBefore->Xmin; i <= pRangeBefore->Xmax; i++){ + if(b[j][i] == Empty) { + newPoints[count_new] = data + SIZE_FORMER + count_new; + newPoints[count_new]->point = (Point) {i, j}; + newPoints[count_new]->value = evaluate_point(b, &(newPoints[count_new]->point), side); + + count_new++; + } + } + } + } + + if(count_dif_boundary == 2){ + for(int j = possibleDelta.Ymin; j <= possibleDelta.Ymax; j++){ + for(int i = possibleDelta.Xmin; i <= possibleDelta.Xmax; i++){ + if(b[j][i] == Empty) { + newPoints[count_new] = data + SIZE_FORMER + count_new; + newPoints[count_new]->point = (Point) {i, j}; + newPoints[count_new]->value = evaluate_point(b, &(newPoints[count_new]->point), side); + + count_new++; + } + } + } + } + + //重新评估原区域中受到新步影响的空点 + for(int j = pRangeBefore->Ymin; j <= pRangeBefore->Ymax; j++) { + for (int i = pRangeBefore->Xmin; i <= pRangeBefore->Xmax; i++){ + if(b[j][i] == Empty && isPointInfluenced((Point){i,j},*step)){ + newPoints[count_new] = data + SIZE_FORMER + count_new; + newPoints[count_new]->point = (Point) {i, j}; + newPoints[count_new]->value = evaluate_point(b, &(newPoints[count_new]->point), side); + + count_new++; + } + } + } + + //对newPoints插入排序 + for(int i = 0; i < count_new;i++){ + Point_Value *temp = newPoints[i]; + int target = 0; + for(; target < i; target++){ + if(newPoints[target]->value > newPoints[i]->value){ + break; + } + } + + for(int n = i;n>target;n--){ + newPoints[n] = newPoints[n-1]; + } + + newPoints[target] = temp; + } + + //按值大小,各点在result中排序并合并 + int tag_former = 0, tag_new = 0,tag_result = 0; + while (tag_former < count_old_sequence && tag_new < count_new) { + if(old_sequence_copy[tag_former] == NULL){ + tag_former++; + continue; + } + if(newPoints[tag_new]==NULL){ + tag_new++; + continue; + } + + if(old_sequence_copy[tag_former]->value < newPoints[tag_new]->value){ + result->sequence[tag_result++] = old_sequence_copy[tag_former++]; + } else if(old_sequence_copy[tag_former]->value == newPoints[tag_new]->value){ + result->sequence[tag_result++] = old_sequence_copy[tag_former++]; + result->sequence[tag_result++] = newPoints[tag_new++]; + }else{ + result->sequence[tag_result++] = newPoints[tag_new++]; + } + } + + if(tag_former != count_old_sequence && tag_new == count_new){ + while (tag_former < count_old_sequence){ + if(old_sequence_copy[tag_former] == NULL){ + tag_former++; + continue; + } + result->sequence[tag_result++] = old_sequence_copy[tag_former++]; + } + }else if(tag_former == count_old_sequence && tag_new != count_new){ + while(tag_newsequence[tag_result++] = newPoints[tag_new++]; + } + } + + result->data = data; + Stack *stack = create_stack(tag_result); + + if(result->sequence[tag_result-1]->value == INFINITY){ + for (int i = 0; i < tag_result; i++) { + if(result->sequence[i]->value == INFINITY) { + stack_push(stack, result->sequence[i]->point); + } + } + }else { + for (int i = 0; i < tag_result; i++) { + stack_push(stack, result->sequence[i]->point); + } + } + return stack; +} + +Stack* generate_new(int (*b)[15],enum piece side, GenData *result,Point **influenced_empty) { + result->data = (Point_Value *) malloc(225 * sizeof(Point_Value)); + int count = 0; + int existInfinity = 0; + + for (int i = 0; influenced_empty[i]; i++) { + Point step = *influenced_empty[i]; + Point_Value *temp = NULL; + + result->sequence[count] = temp = result->data + count; + temp->point = step; + temp->value = evaluate_point(b, &step, side); + + if (temp->value == INFINITY) { + existInfinity = 1; + } + + //由小至大插入排序各个V_Point* + //!插入排序 + int target = 0; + for (; target < count; target++) { + if (result->sequence[target]->value > result->sequence[count]->value) { + break; + } + } + + for (int n = count; n > target; n--) { + result->sequence[n] = result->sequence[n - 1]; + } + + result->sequence[target] = temp; + + count++; + } + + + Stack *stack = create_stack(count); + if(existInfinity){ + for(int i = 0; i < count; i ++){ + if(result->sequence[i]->value == INFINITY){//某些位置被下子后会决定局面,则只搜索这些位置 + stack_push(stack,result->sequence[i]->point); + } + } + }else{ + for(int i = 0; i < count; i ++){ + stack_push(stack,result->sequence[i]->point); + } + } + + return stack; +} + +Stack* regenerate_new(int (*b)[15],Point **influenced_empty, enum piece side, Point *step, GenData *result, GenData *GenDataBefore){ + int SIZE_FORMER = 225; + + Point_Value *data = (Point_Value*) malloc(450*sizeof (Point_Value )); + + Point_Value *old_sequence_copy[15*15] = {NULL};//former中的地址还会传给上层的可能的其他待搜索节点,为防止破坏former,先对former中数据进行复制 + Point_Value *old_sequence_influenced[15*15] = {NULL}; + int count_copy = 0; + int count_old_sequence = 0; + int count_old_influenced = 0; + for(int i = 0; GenDataBefore->sequence[i]; i++){ + if(!isPointInfluenced(GenDataBefore->sequence[i]->point, *step)){//旧空点中未受影响的部分 + data[count_copy] = *GenDataBefore->sequence[i]; + + old_sequence_copy[count_old_sequence] = data + count_copy; + count_copy++; + count_old_sequence++; + }else if(GenDataBefore->sequence[i]->point.x != step->x || GenDataBefore->sequence[i]->point.y != step->y) {//旧空点中受影响且不为所下新步的部分 + data[count_copy] = *GenDataBefore->sequence[i]; + + old_sequence_influenced[count_old_influenced] = data + count_copy;//同时额外记录到受影响的序列中 + count_copy++; + count_old_influenced++; + } + } + + //重新评估原区域中受到新步影响的空点 + for(int i = 0; i < count_old_influenced; i++){ + old_sequence_influenced[i]->value = evaluate_point(b,&(old_sequence_influenced[i]->point),side); + } + + //评估新增的空点 利用新空点序列只是在原序列后增添空点的特性,确定新增的部分 新空点序列的原序列部分为前count_old_sequence个 + Point_Value *newPoints[15*15] = {NULL}; + int count_new = 0; + for(int i = count_copy; influenced_empty[i]; i++){ + newPoints[count_new] = data + count_copy + count_new; + newPoints[count_new]->point = *influenced_empty[i]; + newPoints[count_new]->value = evaluate_point(b,influenced_empty[i],side); + count_new++; + } + + //将old_sequence_influenced与newPoints序列合并 + for(int i = 0; i < count_old_influenced;i++){ + newPoints[count_new + i] = old_sequence_influenced[i]; + } + count_new += count_old_influenced; + + //对合并后的newPoints插入排序 + for(int i = 0; i < count_new;i++){ + Point_Value *temp = newPoints[i]; + int target = 0; + for(; target < i; target++){ + if(newPoints[target]->value > newPoints[i]->value){ + break; + } + } + + for(int n = i;n>target;n--){ + newPoints[n] = newPoints[n-1]; + } + + newPoints[target] = temp; + } + +// printf("New Points:\n"); +// for(int i = 0;i point.x,newPoints[i]->point.y); +// } +// printf("Copy_old Points:\n"); +// for(int i = 0;i point.x,old_sequence_copy[i]->point.y); +// } + + //按值大小,各点在result中排序并合并 + int tag_former = 0, tag_new = 0,tag_result = 0; + while (tag_former < count_old_sequence && tag_new < count_new) { + if(old_sequence_copy[tag_former] == NULL){ + tag_former++; + continue; + } + if(newPoints[tag_new]==NULL){ + tag_new++; + continue; + } + + if(old_sequence_copy[tag_former]->value < newPoints[tag_new]->value){ + result->sequence[tag_result++] = old_sequence_copy[tag_former++]; + } else if(old_sequence_copy[tag_former]->value == newPoints[tag_new]->value){ + result->sequence[tag_result++] = old_sequence_copy[tag_former++]; + result->sequence[tag_result++] = newPoints[tag_new++]; + }else{ + result->sequence[tag_result++] = newPoints[tag_new++]; + } + } + + if(tag_former != count_old_sequence && tag_new == count_new){ + while (tag_former < count_old_sequence){ + if(old_sequence_copy[tag_former] == NULL){ + tag_former++; + continue; + } + result->sequence[tag_result++] = old_sequence_copy[tag_former++]; + } + }else if(tag_former == count_old_sequence && tag_new != count_new){ + while(tag_newsequence[tag_result++] = newPoints[tag_new++]; + } + } + + result->data = data; + Stack *stack = create_stack(tag_result); + + if(result->sequence[tag_result-1]->value == INFINITY){ + for (int i = 0; i < tag_result; i++) { + if(result->sequence[i]->value == INFINITY) { + stack_push(stack, result->sequence[i]->point); + } + } + }else { + for (int i = 0; i < tag_result; i++) { + stack_push(stack, result->sequence[i]->point); + } + } + return stack; +} + +void find_nearby_empty(int (*b)[15],Point step,Point **empty,Point **pData){ + int Xmin = max(step.x - 4, 0); + int Xmax = min(step.x + 4, 14); + int Ymin = max(step.y - 4, 0); + int Ymax = min(step.y + 4, 14); + + Point left = {Xmin,step.y}; + Point up = {step.x,Ymin}; + + //计算斜线搜索的2个起点。左上到右下:l1:y=x-step->x+step->y 右上到左下:l2:y=-x+step->x+step->y 注意:棋盘坐标系与常规坐标系y轴方向不同。 + Point left_up, right_up; + right_up.x = min(Xmax, -Ymin + step.x + step.y); + right_up.y = -right_up.x + step.x + step.y; + + left_up.x = max(Xmin, Ymin + step.x - step.y); + left_up.y = left_up.x - step.x + step.y; + + *pData = (Point*) malloc(32 * sizeof (Point)); + Point *data = *pData; + int count = 0; + for(int i = left.y, j = left.x; j <= Xmax; j++){ + if(b[i][j] == Empty){ + data[count] = (Point){j, i}; + empty[count] = data + count; + count ++; + } + } + + for(int i = up.y,j = up.x;i<= Ymax;i++){ + if(b[i][j] == Empty){ + data[count] = (Point){j, i}; + empty[count] = data + count; + count++; + } + } + + for(int i = left_up.y, j = left_up.x;i<= Ymax && j <= Xmax; i++,j++){ + if(b[i][j] == Empty){ + data[count] = (Point){j, i}; + empty[count] = data + count; + count++; + } + } + + for(int i = right_up.y, j = right_up.x;i<=Ymax && j>= Xmin; i++, j--){ + if(b[i][j] == Empty){ + data[count] = (Point){j, i}; + empty[count] = data + count; + count++; + } + } +} + +void find_influenced_empty(int (*b)[15], Point **influenced_empty, Point **pData_all){ + *pData_all = (Point*) malloc(225*sizeof (Point)); + Point *data_all = *pData_all; + int count_empty = 0; + int count_step = 0; + for(int i = 0; i< 15; i++){ + for(int j = 0; j<15; j++){ + if(b[i][j] != Empty){ + count_step++; + Point step = {j,i}; + Point *data = NULL; + Point *empty[32] = {NULL}; + find_nearby_empty(b,step,empty,&data); + for(int k = 0; k < 32; k++){ + if(empty[k]){ + if(count_empty == 0){ + data_all[count_empty] = *empty[k]; + influenced_empty[count_empty] = data_all + count_empty; + count_empty++; + }else { + int duplicate = 0; + for (int q = 0; q < count_empty; q++) { + if (influenced_empty[q]->x == empty[k]->x && influenced_empty[q]->y == empty[k]->y) { + duplicate = 1; + break; + } + } + if(!duplicate) { + data_all[count_empty] = *empty[k]; + influenced_empty[count_empty] = data_all + count_empty; + count_empty++; + } + } + } + } + free(data); + } + } + } +} + +void re_find_influenced_empty(int (*b)[15],Point *new_step, Point **influenced_empty, Point **pData_all,Point **influenced_empty_old){ + *pData_all = (Point*) malloc(225*sizeof (Point)); + Point *data_all = *pData_all; + int count_empty = 0; + for(int i = 0;influenced_empty_old[i];i++){//influenced_empty_old不可能满225个非NULL指针,不会越界 + if(influenced_empty_old[i]->x != new_step->x || influenced_empty_old[i]->y != new_step->y){ + data_all[count_empty] = *influenced_empty_old[i]; + influenced_empty[count_empty] = data_all + count_empty; + count_empty++; + } + } + + Point *data = NULL; + Point *new_empty[32] = {NULL}; + + find_nearby_empty(b, *new_step, new_empty, &data);//要求寻找周边空位前new_step已不为Empty + + for(int k = 0; k < 32; k++){ + if(new_empty[k]){ + if(count_empty == 0){ + data_all[count_empty] = *new_empty[k]; + influenced_empty[count_empty] = data_all + count_empty; + count_empty++; + }else { + int duplicate = 0; + for (int q = 0; q < count_empty; q++) { + if (influenced_empty[q]->x == new_empty[k]->x && influenced_empty[q]->y == new_empty[k]->y) { + duplicate = 1; + break; + } + } + if(!duplicate) { + data_all[count_empty] = *new_empty[k]; + influenced_empty[count_empty] = data_all + count_empty; + count_empty++; + } + } + } + } + + free(data); +} diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/generate.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/generate.h" new file mode 100644 index 0000000..7b62771 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/generate.h" @@ -0,0 +1,20 @@ +#ifndef GOBANG_GENERATE_H +#define GOBANG_GENERATE_H +#include +#include +#include "defination.h" +#include "stack_point.h" +#include "hash_table.h" + +Range limit(int (*b)[15]); +Range re_limit(Range range,Point *step); +Stack* generate(int (*b)[15], Range range, enum piece side,enum piece sideMax,GenData *result,HashTable *hashTable,unsigned long long (*randomSet)[15][2],unsigned long long *hashKey,int depthRequired); +Stack* generate_old(int (*b)[15], Range range,enum piece side); +Stack* regenerate(int (*b)[15], Range *pRangeBefore, Range *range, enum piece side, Point *step, GenData *result, GenData *GenDataBefore,HashTable *hashTable,unsigned long long (*randomSet)[15][2],unsigned long long *hashKey,int depthRequired); +void find_nearby_empty(int (*b)[15],Point step,Point **empty,Point **pData); +void find_influenced_empty(int (*b)[15], Point **influenced_empty, Point **pData_all); +void re_find_influenced_empty(int (*b)[15],Point *new_step, Point **influenced_empty, Point **pData_all,Point **influenced_empty_old); + +Stack* generate_new(int (*b)[15],enum piece side, GenData *result,Point **influenced_empty); +Stack* regenerate_new(int (*b)[15],Point **influenced_empty, enum piece side, Point *step, GenData *result, GenData *GenDataBefore); +#endif //GOBANG_GENERATE_H \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/gui.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/gui.c" new file mode 100644 index 0000000..2a9103b --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/gui.c" @@ -0,0 +1,354 @@ +#include +#include +#include +#include "defination.h" +#include "raylib.h" +#include "stack_point.h" +#include "test.h" +#include "hash_table.h" + +int Monitor; +int MonitorWidth; +int MonitorHeight; + +int count_nodes = 0; +int count_match = 0; +int count_conflict[7] = {0}; +int count_gen[7] = {0}; +clock_t total[5] = {0}; +clock_t start_t[5] = {0}; +clock_t end_t[5] = {0}; + +void drawBoard(float sizeWidth, float sizeHeight, int (*b)[15],Stack* sequence){ + + float ratio = sizeWidth/MonitorWidth*2;//全屏则比例为2;相对窗口化大小的比例。 + Color ColorBoard = {230,170,90,100}; + Rectangle BoardRec = {(sizeWidth - sizeHeight) / 2 + 10, 10, sizeHeight - 20, sizeHeight - 20}; + DrawRectangleRec(BoardRec, ColorBoard); + + float BoardLineThick = 5*ratio; + float SubLineThick = 2*ratio; + DrawRectangleLinesEx(BoardRec, BoardLineThick, BLACK); + + //各竖线位置的间隔距离 + float DeltaLine = (BoardRec.height-BoardLineThick*2)/16; + + //Note:线的位置不是中心位置,实际绘制有偏差,待后续调整。 + //竖线 + for(float i = 1; i <= 15 ;i++){ + Vector2 LineStartPos= {BoardRec.x +BoardLineThick + i * DeltaLine,BoardRec.y + BoardLineThick + DeltaLine}; + Vector2 LineEndtPos= {BoardRec.x +BoardLineThick + i * DeltaLine,BoardRec.y+BoardRec.height - BoardLineThick - DeltaLine}; + DrawLineEx(LineStartPos,LineEndtPos,SubLineThick,BLACK); + } + + //横线 + for(float i = 1; i <= 15 ;i++){ + Vector2 LineStartPos= {BoardRec.x + BoardLineThick + DeltaLine,BoardRec.y +BoardLineThick + i * DeltaLine}; + Vector2 LineEndtPos= {BoardRec.x + BoardRec.width - BoardLineThick - DeltaLine,BoardRec.y +BoardLineThick + i * DeltaLine}; + DrawLineEx(LineStartPos,LineEndtPos,SubLineThick,BLACK); + } + + + //画棋子 + Vector2 PiecePosition; + //标出最新棋子 + Point LatestPiece = stack_pop(sequence); + Color colorMark = (Color) {0, 121, 241, 100}; + PiecePosition.x = BoardRec.x +BoardLineThick + (LatestPiece.x+1) * DeltaLine; + PiecePosition.y = BoardRec.y +BoardLineThick + (LatestPiece.y+1) * DeltaLine; + DrawCircleV(PiecePosition,DeltaLine/10*11/2,colorMark); + stack_push(sequence,LatestPiece); + //画棋子 + for(int i = 0;i<15;i++){ + for(int j = 0 ;j < 15; j++){ + Color color; + switch (*(b[j]+i)) { + case Black: + color = BLACK; + break; + case White: + color = WHITE; + break; + default: + continue; + } + PiecePosition.x = BoardRec.x +BoardLineThick + (i+1) * DeltaLine; + PiecePosition.y = BoardRec.y +BoardLineThick + (j+1) * DeltaLine; + + DrawCircleV(PiecePosition,DeltaLine/10*9/2,color); + + //DrawCircleGradient(PiecePosition.x, PiecePosition.y, DeltaLine/10*9/2, WHITE, color); + } + } +} + +Point getNewPiece(float sizeWidth, float sizeHeight, int (*b)[15],enum piece *side,Stack *sequence,unsigned long long *hashKey,unsigned long long (*randomSet)[15][2]){ + + Rectangle BoardRec = {(sizeWidth - sizeHeight) / 2 + 10, 10, sizeHeight - 20, sizeHeight - 20}; + + float ratio = sizeWidth/MonitorWidth*2;//全屏则比例为2;相对窗口化大小的比例。 + float BoardLineThick = 5*ratio; + float SubLineThick = 2*ratio; + + int DeltaLine = BoardRec.height/16; + + if(IsMouseButtonPressed(MOUSE_BUTTON_LEFT)){ + + int x,y; + x = y = -1; //默认值-1,无效的数组坐标。 + + int mouseX = GetMouseX(); + int mouseY = GetMouseY(); + + for(int i = 0; i <16; i++){ + //从边界起,如果在第 i 条竖线的右边,i+1的左边 + if(BoardRec.x +BoardLineThick + (i + 1) * DeltaLine > mouseX){ + if(BoardRec.x +BoardLineThick + (i + 0.5) * DeltaLine > mouseX){ + x = i - 1;// -1 换算为数组的下标 + } else{ + x = i+1 - 1;// -1 换算为数组的下标 + } + //检验合法性 + if(x<0 || x>14){ + x = -1; + } + break; + } + } + + for(int j = 0; j < 16; j++){ + //从边界起,如果在第 j 条竖线的右边,j+1的左边 + if(BoardRec.y +BoardLineThick + (j + 1) * DeltaLine > mouseY){ + if(BoardRec.y +BoardLineThick + (j + 0.5) * DeltaLine > mouseY){ + y = j - 1;// -1 换算为数组的下标 + } else{ + y = j + 1 - 1;// -1 换算为数组的下标 + } + //检验合法性 + if(y<0 || y>14){ + y = -1; + } + break; + } + } + + if( x == -1 || y == -1){ + return (Point){x,y}; + } else{ + Point step = {-1,-1};//用于放入棋子后记录本步到次序栈sequence。 + switch ( *(b[y]+x) ){ + case Empty: + *(b[y]+x) = *side;//放入棋子 + + step.x = x; + step.y = y; + stack_push(sequence,step);//添加到所放入棋子的顺序栈 + + changeHash(hashKey,randomSet,&step,*side); + + *side *= -1; + break; + default: + break; + } + return step; + } + } +} + +void retract(int (*b)[15],Stack *sequence,unsigned long long hashKey,unsigned long long(*randomSet)[15][2],enum piece side){ + if(IsMouseButtonPressed(MOUSE_BUTTON_RIGHT)){ + + if(!is_empty(sequence)) { + Point retract = stack_pop(sequence); + *(b[retract.y] + retract.x) = Empty; + changeHash(&hashKey,randomSet,&retract,side); + + retract = stack_pop(sequence); + *(b[retract.y] + retract.x) = Empty; + changeHash(&hashKey,randomSet,&retract,-side); + } + + } +} + +int main(){ + int board[15][15] = {0}; +// int board[15][15] = { +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// +// }; +// int board[15][15] = { +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, +// 0, -1, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, +// 0, 0, 1, -1, 1, 1, 0, -1, -1, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 1, 0, 1, -1, 1, -1, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 1, -1, 1, 1, -1, 1, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 1, -1, 1, 1, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, -1, 1, -1, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// +// }; + Stack *sequence = create_stack(15*15); + + InitWindow(800,600,"Gobang"); + Image icon = LoadImage("icon.png"); + SetWindowIcon(icon); + + Monitor = GetCurrentMonitor(); + MonitorWidth = GetMonitorWidth(Monitor); + MonitorHeight = GetMonitorHeight(Monitor); + + int sizeWidth = MonitorWidth/2; + int sizeHeight = MonitorHeight/2; + + SetWindowSize(MonitorWidth/2,MonitorHeight/2); + SetWindowPosition(MonitorWidth/4,MonitorHeight/4); + + /*//全屏 + ToggleFullscreen(); + SetWindowSize(MonitorWidth,MonitorHeight); + sizeWidth = MonitorWidth; + sizeHeight = MonitorHeight;*/ + + + SetTargetFPS(60); + enum piece side = Black; + enum piece sideMax = Black; + enum piece win = Empty; + + unsigned long long randomSet[15][15][2] = {0}; + randomFill( randomSet); + HashTable* hashTable = hashTableInit(1000*1000); + unsigned long long hashKey = 0; + + while (!WindowShouldClose()){ + if(!win) { + BeginDrawing(); + + ClearBackground(WHITE); + DrawFPS(10, 10); + + if (side == sideMax) { + float value = 0; + int layerLimit = 5; + Point resultStep; + + //输出randomSet +// for(int i = 0; i < 15; i++){ +// for(int j = 0 ;j < 15 ;j ++){ +// printf("(%d,%d) : %d,%d ",j,i,randomSet[i][j][0],randomSet[i][j][1]); +// } +// printf("\n"); +// } + + //对整个棋盘先进行求hash,作为hashKey初始值。 +// for(int i = 0; i < 15; i++){ +// for(int j = 0 ;j < 15 ;j ++){ +// if(board[i][j] != Empty){ +// Point step ={j,i}; +// changeHash(&hashKey,randomSet,&step,board[i][j]); +// } +// } +// } + + //resultStep = traverse3(board, sideMax, Max, NULL, &value, 1, 5, randomSet, &hashKey, hashTable,NULL); + count_nodes = 0; + count_match = 0; + for(int i =0;i<7;i++){ + count_conflict[i] = 0; + count_gen[i]=0; + } + for(int i =0;i<5;i++){ + total[i] = 0; + start_t[i] = 0; + end_t[i] = 0; + } + + start_t[0] = clock(); + resultStep = traverse_new(board, sideMax, Max, NULL, NULL, &value, 1, 7, randomSet, &hashKey, hashTable,NULL); + + end_t[0] = clock(); + total[0] += end_t[0] - start_t[0]; + + for(int i =0;i<7;i++){ + printf("Layer:%d %d times re_gen\n",i+1,count_gen[i]); + } + printf("Generate Time %lf\n",(double)total[2]/CLOCKS_PER_SEC); + printf("Time: %lf s\nZobrist Replace Time:%lf\nTotal:%d nodes\nzobrist_match:%d times\n", (double)total[0]/CLOCKS_PER_SEC,(double)total[1]/CLOCKS_PER_SEC, count_nodes,count_match); + for(int i =0;i<7;i++){ + printf("Layer %d Hash Conflicts:%d\n",i+1,count_conflict[i]); + } + //迭代加深 +// for (int i = 3; i <= layerLimit; i += 2) { +// hashKey = 0; +// HashTable* hashTable = hashTableInit(1000*1000); +// resultStep = traverse3(board, sideMax, Max, NULL, &value, 1, i, randomSet, &hashKey, hashTable,NULL,NULL); +// if (value == INFINITY || value == -INFINITY) { +// break; +// } +// hashTableDelete(hashTable); +// printf("%d",i); +// } + + //hashTableDelete(hashTable); + changePiece(board, &resultStep, sideMax); + stack_push(sequence, resultStep); + side = -side; + } else { + //读取输入方的新棋子,并且压入栈中 + getNewPiece(sizeWidth, sizeHeight, board, &side, sequence,&hashKey,randomSet); + + retract(board, sequence,hashKey,randomSet,side); + } + + Point lastStep = stack_pop(sequence); + float w = isStepTerminate(board,&lastStep,-side,-side); + if(w == INFINITY){ + win = -side; + } + stack_push(sequence,lastStep); + + drawBoard(sizeWidth, sizeHeight, board, sequence); + + EndDrawing(); + }else{ + BeginDrawing(); + + ClearBackground(WHITE); + + drawBoard(sizeWidth, sizeHeight,board, sequence); + + char *EndWords = win == Black?"Black Wins":"White Wins"; + Color color = win == sideMax?(Color) {230, 41, 55, 200}:(Color) {0, 228, 48, 200}; + DrawText(EndWords,sizeWidth/2-265,sizeHeight/2-50,100,color); + + EndDrawing(); + } + } + + CloseWindow(); + + return 0; +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/hash_table.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/hash_table.c" new file mode 100644 index 0000000..54ad48e --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/hash_table.c" @@ -0,0 +1,55 @@ +#include +#include +#include "defination.h" +#include + +typedef struct { + Hash_value *data; + unsigned int num; +}HashTable; + +HashTable* hashTableInit(unsigned int num_Hash_value){ + HashTable *hashTable = (HashTable*) malloc(sizeof (HashTable)); + hashTable->data = (Hash_value*)malloc(num_Hash_value*sizeof (Hash_value)); + hashTable->num = num_Hash_value; + + return hashTable; +} + +bool HashMatch(HashTable *hashTable, unsigned long long hash){ + unsigned int offset = hash % hashTable->num;//Slow! Better? + return hashTable->data[offset].hash == hash; +} + +float hashTableExtractValue(HashTable *hashTable, unsigned long long hash){ + unsigned int offset = hash % hashTable->num;//Slow! Better? + return hashTable->data[offset].value; +} + +void hashTableStoreScore(HashTable *hashTable, Hash_value hash_value,int depth,int count_step){ + unsigned int offset = hash_value.hash % hashTable->num;//Slow! Better? + + hashTable->data[offset].hash = hash_value.hash; + hashTable->data[offset].value = hash_value.value; + hashTable->data[offset].count_step = count_step; + hashTable->data[offset].isSearchFinished = true; +} + +Hash_value* hashTableGetAddress(HashTable *hashTable, unsigned long long hash){ + unsigned int offset = hash % hashTable->num; + return &(hashTable->data[offset]); +} + +void hashTableStoreUnfinished(HashTable *hashTable, unsigned long long hash,float score, Point point,int depth, int count_step){ + unsigned int offset = hash % hashTable->num; + hashTable->data[offset].hash = hash; + hashTable->data[offset].value = score; + hashTable->data[offset].count_step = count_step; + hashTable->data[offset].nextPoint = point; + hashTable->data[offset].isSearchFinished = false; +} + +void hashTableDelete(HashTable *hashTable){ + free(hashTable->data); + free(hashTable); +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/hash_table.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/hash_table.h" new file mode 100644 index 0000000..9e6858c --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/hash_table.h" @@ -0,0 +1,18 @@ +#ifndef GOBANG_HASH_TABLE_H +#define GOBANG_HASH_TABLE_H +#include "defination.h" +#include +typedef struct { + Hash_value *data; + unsigned int num; +}HashTable; + +HashTable* hashTableInit(unsigned int num_Hash_value); +bool HashMatch(HashTable *hashTable, unsigned long long hash); +float hashTableExtractValue(HashTable *hashTable, unsigned long long hash); +Hash_value* hashTableGetAddress(HashTable *hashTable, unsigned long long hash); +void hashTableStoreScore(HashTable *hashTable, Hash_value hash_value,int depth,int count_step); +void hashTableStoreUnfinished(HashTable *hashTable, unsigned long long hash,float score,Point point,int depth,int count_step); +void hashTableDelete(HashTable *hashTable); + +#endif //GOBANG_HASH_TABLE_H diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/linked_hash_value_list.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/linked_hash_value_list.c" new file mode 100644 index 0000000..58db82c --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/linked_hash_value_list.c" @@ -0,0 +1,79 @@ +#include +#include +#include +#include "defination.h" + +typedef struct _node{ + struct _node *before; + Hash_value hash_value; + struct _node *next; +} Node; + +typedef struct { + Node *head; + Node *tail; +} List; + +void listAppend(List* pList, Hash_value hash_value) { + Node *p = (Node *) malloc(sizeof(Node)); + p->hash_value = hash_value; + p->before = pList->tail; + p->next = NULL; + pList->tail = p; + + Node *last = NULL; + if( pList->head ){ + p->before->next = p; + } else{ + pList->head = p; + } +} + +Hash_value* listSearchHash(List *pList,unsigned int hash){ + Hash_value *result = NULL; + Node *p = pList->head; + while (p){ + if(p->hash_value.hash == hash){ + result = &(p->hash_value); + } + p = p->next; + } + return result; +} + +bool isHashExist(List *pList,unsigned int hash){ + Node *p = pList->head; + while (p){ + if(p->hash_value.hash == hash){ + return true; + } + p = p->next; + } + return false; +} + +void listDeleteNode(List *pList , Node* pNode){ + Node *p = pList->head; + while (p){ + if(p == pNode){ + p->before->next = p->next; + free(p); + break; + } + p = p->next; + } +} + +void listDeleteAll(List *pList){ + Node *p = pList->head; + Node *temp = NULL; + while (p){ + temp = p->next; + free(p); + p = temp; + } +} + +bool isListEmpty(List *pList){ + return pList->head == NULL; +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/linked_hash_value_list.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/linked_hash_value_list.h" new file mode 100644 index 0000000..621e23b --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/linked_hash_value_list.h" @@ -0,0 +1,23 @@ +#ifndef _LINKED_HASH_VALUE_LIST_ +#define _LINKED_HASH_VALUE_LIST_ +#include +#include "defination.h" +typedef struct _node{ + struct _node *before; + Hash_value hash_value; + struct _node *next; +} Node; + +typedef struct { + Node *head; + Node *tail; +} List; + +void listAppend(List* pList, Hash_value hash_value); +Hash_value* listSearchHash(List *pList,unsigned int hash); +bool isHashExist(List *pList,unsigned int hash); +void listDeleteNode(List *pList , Node* pNode); +void listDeleteAll(List *pList); +bool isListEmpty(List *pList); + +#endif \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/stack_point.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/stack_point.c" new file mode 100644 index 0000000..8c3f105 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/stack_point.c" @@ -0,0 +1,45 @@ +#include +#include +#include "defination.h" + +typedef struct Stack { + Point *data; + int count; + int size; +} Stack; + +Stack *create_stack(int size); +bool is_empty(Stack *); +bool is_full(Stack *s); +void stack_push(Stack *s, Point value); +Point stack_pop(Stack *s); +void delete_stack(Stack *s); + +Stack *create_stack(int size) { + Stack *s = (Stack *) malloc(sizeof(Stack)); + s->count = 0; + s->size = size; + s->data = (Point *) malloc(size * sizeof(Point)); + return s; +} + +bool is_empty(Stack *s) { + return s->count == 0; +} + +bool is_full(Stack *s) { + return s->count == s->size; +} + +void stack_push(Stack *s, Point value) { + s->data[s->count++] = value; +} + +Point stack_pop(Stack *s) { + return s->data[--s->count]; +} + +void delete_stack(Stack *s){ + free(s->data); + free(s); +} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/stack_point.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/stack_point.h" new file mode 100644 index 0000000..4aefeb4 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/stack_point.h" @@ -0,0 +1,17 @@ +#ifndef GOBANG_STACK_POINT_H +#define GOBANG_STACK_POINT_H +#include +#include "defination.h" +typedef struct Stack { + Point *data; + int count; + int size; +} Stack; + +Stack *create_stack(int size); +bool is_empty(Stack *); +bool is_full(Stack *s); +void stack_push(Stack *s, Point value); +Point stack_pop(Stack *s); +void delete_stack(Stack *s); +#endif \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/test.c" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/test.c" new file mode 100644 index 0000000..4cb014b --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/test.c" @@ -0,0 +1,519 @@ +#include +#include +#include +#include +#include +#include "defination.h" +#include "board_control.h" +#include "evaluate_func.h" +#include "generate.h" +#include "stack_point.h" +#include "hash_table.h" +#include "Zobrist.h" +#include "MT199937.h" + +//extern int count_nodes; +//extern int count_match; +//extern int count_conflict[7]; +//extern int count_gen[7]; +//extern clock_t total[5]; +//extern clock_t start_t[5],end_t[5]; + +int count_nodes; +int count_match; +int count_conflict[7]; +int count_gen[7]; +clock_t total[5]; +clock_t start_t[5],end_t[5]; + +Point traverse_new(int (*b)[15], enum piece sideMax, enum type type, Point *step, int *pCount_step, float *pSuperiorLimit, int layer, int layerLimit, unsigned long long (*randomSet)[15][2], unsigned long long *hashKey, HashTable *hashTable, newData *dataBefore) {//layer 为上层层数 + enum piece side = type == Max ? sideMax : -sideMax;//根据当前层的类型,确定相应棋子类型。 + float superiorLimit;//复制指针的值,指针仅用于修改上层的最终值。 + //!可否不创建变量,直接使用指针并兼容第一层? + //!:默认搜索2层以上,不含2层。 + + Hash_value *unfinished = NULL; + if(layer >= 2) { + superiorLimit = *(pSuperiorLimit); + changePiece(b, step, -side);//在上层指定的位置下入上一层的棋子-side。所有layer>=2的层return前必定先还原所下步。 + changeHash(hashKey, randomSet, step, -side);//下入棋子后,相应地更新hashKey + + float value; + + //!:考虑在上一层提前判断,避免多次判断 + //到达层限制,仅判断是否修改上层值,必定结束,不需判断是否剪枝。 + if(layer == layerLimit){ + value = re_evaluate(b,sideMax,step,-side,dataBefore->score); + + if (type == Max) { + if (value <= superiorLimit) { + if(value == superiorLimit){ + if( superiorLimit > 0 && layer - 1 > *pCount_step){ + *pCount_step = layer - 1; + }else if (superiorLimit < 0 && layer - 1 <*pCount_step){ + *pCount_step = layer - 1; + } + } else { + *(pSuperiorLimit) = value; + *pCount_step = layer - 1; + } + } + } else { + if (value >= superiorLimit) { + if(value == superiorLimit){ + if(superiorLimit > 0 && layer - 1 <*pCount_step){ + *pCount_step = layer - 1; + }else if(superiorLimit < 0 && layer - 1 > *pCount_step){ + *pCount_step = layer - 1; + } + }else{ + *(pSuperiorLimit) = value; + *pCount_step = layer - 1; + } + } + } + + if(HashMatch(hashTable,*hashKey) && hashTableExtractValue(hashTable,*hashKey)!=value){ + count_conflict[layer-1]++; + } + hashTableStoreScore(hashTable, (Hash_value) {*hashKey, value},layerLimit - layer + 1,layer - 1); + + changePiece(b,step,Empty); + changeHash(hashKey, randomSet, step, -side); + return *step; + } + + //首先尝试从Zobrist置换表中寻找可能的重复局面,若找到则直接带入值,判断是否修改上层值。 + start_t[1] = clock(); + if(HashMatch(hashTable,*hashKey)){ + Hash_value *p = hashTableGetAddress(hashTable,*hashKey); + if(p->depth == layerLimit-layer+1) { + if (p->isSearchFinished) { + value = p->value; + if (type == Max) { + if (value <= superiorLimit) { + if(value == superiorLimit){ + if( superiorLimit > 0 && p->count_step > *pCount_step){ + *pCount_step = p->count_step; + }else if (superiorLimit < 0 && p->count_step <*pCount_step){ + *pCount_step = p->count_step; + } + } else { + *(pSuperiorLimit) = value; + *pCount_step = p->count_step; + } + } + } else { + if (value >= superiorLimit) { + if(value == superiorLimit){ + if(superiorLimit > 0 && p->count_step <*pCount_step){ + *pCount_step = p->count_step; + }else if(superiorLimit < 0 && p->count_step > *pCount_step){ + *pCount_step = p->count_step; + } + }else{ + *(pSuperiorLimit) = value; + *pCount_step = p->count_step; + } + } + } + + changePiece(b, step, Empty); + changeHash(hashKey, randomSet, step, -side); + return *step; + } else { + unfinished = p; + value = p->value; + if (type == Max) { + if (value > superiorLimit) { + changeHash(hashKey, randomSet, step, -side); + changePiece(b, step, Empty); + if (layer == 2) { + printf("V(%d,%d)=%f\n", step->x, step->y, value); + } + return *step;//返回任意值,目的为提前结束该节点。因为首个节点为Max,可能返回INFINITY时对应的步作为resultStep。 + } + } else { + if (value < superiorLimit) { + changeHash(hashKey, randomSet, step, -side); + changePiece(b, step, Empty); + if (layer == 2) { + printf("V(%d,%d)=%f\n", step->x, step->y, value); + } + return *step; + } + } + } + end_t[1] = clock(); + total[1] += end_t[1] - start_t[1]; + count_match++; + } + } + + end_t[1] = clock(); + total[1] += end_t[1] - start_t[1]; + count_nodes ++; + + value = isStepTerminate(b, step, sideMax, -side);//对上层指定的位置进行评估,判断上层类型棋子所下位置是否终结对局。 + if (value) { + + if (type == Max) { + if (value <= superiorLimit) { + if(value == superiorLimit){ + if( superiorLimit > 0 && layer - 1 > *pCount_step){ + *pCount_step = layer - 1; + }else if (superiorLimit < 0 && layer - 1 <*pCount_step){ + *pCount_step = layer - 1; + } + } else { + *(pSuperiorLimit) = value; + *pCount_step = layer - 1; + } + } + } else { + if (value >= superiorLimit) { + if(value == superiorLimit){ + if(superiorLimit > 0 && layer - 1 <*pCount_step){ + *pCount_step == layer - 1; + }else if(superiorLimit < 0 && layer - 1 > *pCount_step){ + *pCount_step == layer - 1; + } + }else{ + *(pSuperiorLimit) = value; + *pCount_step = layer - 1; + } + } + } + + if(HashMatch(hashTable,*hashKey) && hashTableExtractValue(hashTable,*hashKey)!=value){ + count_conflict[layer-1]++; + } + hashTableStoreScore(hashTable, (Hash_value) {*hashKey, value},layerLimit-layer+1,layer-1); + + changePiece(b,step,Empty); + changeHash(hashKey, randomSet, step, -side); + return *step; + } + + } + + start_t[2] = clock(); + count_gen[layer - 1] += 1; + + newData data; + + if(dataBefore){ + data.score = re_evaluate(b,sideMax,step,-side,dataBefore->score); + } else{ + data.score = evaluate(b,sideMax); + } + + //确定搜索范围 + Point *empty[225] = {NULL}; + Point *data_empty = NULL; + if(layer == 1) { + find_influenced_empty(b,empty,&data_empty); + }else{ + re_find_influenced_empty(b,step,empty,&data_empty,dataBefore->influenced_empty_old); + } + data.influenced_empty_old = empty; + + //着点生成与排序 + Stack *search_list=NULL; + GenData result = {NULL, {NULL}}; + data.old_sequence = &result; + if(layer == 1) { + search_list = generate_new(b,side,&result,empty); + }else{ + search_list = regenerate_new(b,empty,side,step,&result,dataBefore->old_sequence); + } + + end_t[2] = clock(); + total[2] += end_t[2] - start_t[2]; + + //遍历子节点 + float limit = type == Max ? -INFINITY : INFINITY;//遍历所有子节点后,limit的值为节点所下步的最终值。 + int count_step = 0; + Point resultStep = {7,7};//仅有第一层需要用于返回最优下一步。 + while(search_list->count){ + Point nextStep = stack_pop(search_list); + if(unfinished) { + if (unfinished->nextPoint.x != nextStep.x || unfinished->nextPoint.y != nextStep.y) { + continue; + } else{ + limit = unfinished->value; + count_step = unfinished->count_step; + } + } + float former_limit = limit;//仅用于第一层判断limit是否被下层改变,若改变则同步更改resultStep。 + int former_count_step = count_step; + + //temp_step在2层以上不会被实际使用,在2层最终会参与选出最优步返回给第1层。 + traverse_new(b, sideMax, type == Max ? Min : Max, &nextStep, &count_step, &limit, layer + 1, + layerLimit, randomSet, hashKey, hashTable, &data);//不断确定当前层的值limit + + //对2层以上 alpha-beta剪枝 或 修改上层值limit 第二层 返回最优Step结果记录 + if (layer >= 2) { + if (type == Max) { + if (limit > superiorLimit) { + hashTableStoreUnfinished(hashTable,*hashKey,limit,nextStep,layerLimit-layer+1,count_step); + changeHash(hashKey, randomSet, step, -side); + changePiece(b, step, Empty); + delete_stack(search_list); + free(result.data); + free(data_empty); + if(layer == 2){ + printf("V(%d,%d)=%f\n", step->x, step->y, limit); + } + return *step;//返回任意值,目的为提前结束该节点。因为首个节点为Max,可能返回INFINITY时对应的步作为resultStep。 + } + } else { + if (limit < superiorLimit) { + hashTableStoreUnfinished(hashTable,*hashKey,limit,nextStep,layerLimit-layer+1,count_step); + changeHash(hashKey, randomSet, step, -side); + changePiece(b, step, Empty); + delete_stack(search_list); + free(result.data); + free(data_empty); + if(layer == 2){ + printf("V(%d,%d)=%f\n", step->x, step->y, limit); + } + return *step; + } + } + } + + if (layer == 1){ + if(limit != former_limit) { + printf("better limit:%f ", limit); + resultStep = nextStep; + printf("Changed Result to (%d,%d)\n", resultStep.x, resultStep.y); + } else if(former_count_step != count_step){ + printf("better count_step:%d\n", count_step); + resultStep = nextStep; + printf("Changed Result to (%d,%d)\n", resultStep.x, resultStep.y); + } + } + + } + + delete_stack(search_list); + free(result.data); + free(data_empty); + + //对于完成全部可能搜索,搜索子节点完成过程中本节点未从上节点剪枝的情况,还原棋盘,结束。更新上层limit的值为本层值。 + if(layer >= 2){ + if(layer == 2){ + printf("V(%d,%d)=%f\n", step->x, step->y, limit); + } + if (type == Max) { + if(limit == superiorLimit){ + if( superiorLimit > 0 && layer - 1 > *pCount_step){ + *pCount_step = count_step; + }else if (superiorLimit < 0 && layer - 1 <*pCount_step){ + *pCount_step = count_step; + } + } else { + *(pSuperiorLimit) = limit; + *pCount_step = count_step; + } + } else { + if(limit == superiorLimit){ + if(superiorLimit > 0 && layer - 1 <*pCount_step){ + *pCount_step = count_step; + }else if(superiorLimit < 0 && layer - 1 > *pCount_step){ + *pCount_step = count_step; + } + }else{ + *(pSuperiorLimit) = limit; + *pCount_step = count_step; + } + } + if(HashMatch(hashTable,*hashKey) && hashTableExtractValue(hashTable,*hashKey)!=limit){ + count_conflict[layer-1]++; + } + hashTableStoreScore(hashTable, (Hash_value) {*hashKey, limit},layerLimit-layer+1,count_step); + + changePiece(b,step,Empty); + changeHash(hashKey, randomSet, step, -side); + return *step; + } + + if(layer == 1){ + if(pSuperiorLimit){//如果提供了值地址,则返回最优位置对应值 + *pSuperiorLimit = limit; + } + return resultStep; + } + +} + +void binary_print(unsigned long long num){ + unsigned long long mask = 0x8000000000000000; + for( ; mask; mask>>=1){ + printf("%d",num & mask?1:0); + } +} +//梅森旋转算法 32bit -> 64bit 测试 +//int main(){ +// unsigned long long randomSet[15][15][2] = {0}; +// randomFill(randomSet); +// for(int i = 0; i < 15; i++){ +// for(int j =0;j<15;j++){ +// printf("%lld ",randomSet[i][j][0]); +// printf("%lld\n",randomSet[i][j][1]); +// } +// } +// unsigned long long hashKey = 0; +// Point a = {5,5}; +// changeHash(&hashKey,randomSet,&a,Black); +// +// printf("%lld",hashKey); +// return 0; +//} + +//部分功能测试 +//int main(){ +// int b[15][15] = { +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// +// }; +// +// printf("begin\n"); +// for(int i =0;i<100000;i++) { +// Point *influenced_empty[225] = {NULL}; +// Point *data = NULL; +// find_influenced_empty(b, influenced_empty, &data); +// +// Stack *s; +// GenData result = {NULL, {NULL}}; +// s = generate_new(b, White, &result, influenced_empty); +// +// Point step = {6, 6}; +// changePiece(b, &step, Black); +// +// Point *influenced_empty_2[225] = {NULL}; +// Point *data_2 = NULL; +// re_find_influenced_empty(b, &step, influenced_empty_2, &data_2, influenced_empty); +// +// GenData result_2 = {NULL, {NULL}}; +// Stack *s_2; +// s_2 = regenerate_new(b, influenced_empty_2, Black, &step, &result_2, &result); +// +// free(data); +// free(data_2); +// free(result.data); +// free(result_2.data); +// delete_stack(s); +// delete_stack(s_2); +// } +// printf("finished\n"); +// +////对新空位计算与空位局部更新的测试 +//// Point *empty[225] = {NULL}; +//// Point *data = NULL; +//// find_influenced_empty(b, empty, data); +//// int count = 0; +//// for(int i =0;i<225;i++){ +//// if(empty[i]){ +//// count++; +//// b[empty[i]->y][empty[i]->x] = 3; +//// printf("%d:(%d,%d)\n",count,empty[i]->x,empty[i]->y); +//// } +//// } +//// for(int i =0 ; i<15; i++){ +//// for(int j =0; j<15;j++){ +//// if(b[i][j]!=0) { +//// printf("%d ", b[i][j]); +//// }else{ +//// printf(" "); +//// } +//// } +//// printf("\n"); +//// } +//// +//// for(int i =0;i<225;i++){ +//// if(empty[i]){ +//// b[empty[i]->y][empty[i]->x] = 0; +//// } +//// } +//// +//// Point new = {6,6}; +//// changePiece(b,&new,Black); +//// +//// Point *empty2[225] = {NULL}; +//// Point *data2 = NULL; +//// re_find_influenced_empty(b,&new,empty2,data2,empty); +//// +//// count = 0; +//// for(int i =0;i<225;i++){ +//// if(empty2[i]){ +//// count++; +//// b[empty2[i]->y][empty2[i]->x] = 3; +//// printf("%d:(%d,%d)\n",count,empty2[i]->x,empty2[i]->y); +//// } +//// } +//// +//// count = 0; +//// for(int i =0 ; i<15; i++){ +//// for(int j =0; j<15;j++){ +//// if(b[i][j]!=0) { +//// count++; +//// printf("%d ", b[i][j]); +//// }else{ +//// printf(" "); +//// } +//// } +//// printf("\n"); +//// } +//// printf("%d",count); +//// +//// free(data); +// +// +//// Range range = limit(b); +//// +//// Point_Value *result[15*15]={NULL}; +//// Stack *s = generate(b,range,Black,result); +//// +//// while(s->count){ +//// Point temp = stack_pop(s); +//// printf("(%d,%d) ",temp.x,temp.y); +//// } +// +//// Stack *stack = create_stack(1000*1000); +//// delete_stack(stack); +//// HashTable* hashTable = hashTableInit(1000); +//// hashTableDelete(hashTable); +//// +//// Point p1 = {8,2}; +//// float r1 = evaluate_point(b,&p1,Black); +//// Point p2 = {5,9}; +//// float r2 = evaluate_point(b,&p2,Black); +//// printf("%f,%f",r1,r2); +// +//// Range range = limit(b); +//// Point_Value **result[225] = {NULL}; +//// Stack *stack = generate(b,range,Black,result); +//// while(stack->count){ +//// Point temp = stack_pop(stack); +//// printf("(%d,%d)",temp.x,temp.y); +//// } +//// +//// Stack *s2 = regenerate(b,) +// return 0; +//} \ No newline at end of file diff --git "a/\350\257\276\347\250\213\350\256\276\350\256\241/work/test.h" "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/test.h" new file mode 100644 index 0000000..77b3353 --- /dev/null +++ "b/\350\257\276\347\250\213\350\256\276\350\256\241/work/test.h" @@ -0,0 +1,16 @@ +#ifndef GOBANG_TEST_H +#define GOBANG_TEST_H +#include "defination.h" +#include "board_control.h" +#include "evaluate_func.h" +#include "generate.h" +#include "stack_point.h" +#include "hash_table.h" +#include "Zobrist.h" + + +Point traverse_old(int (*b)[15], enum piece sideMax, enum type type, Point *step, float *pSuperiorLimit, int layer, int layerLimit); +Point traverse3(int (*b)[15], enum piece sideMax, enum type type, Point *step, float *pSuperiorLimit, int layer, int layerLimit, unsigned long long (*randomSet)[15][2], unsigned long long *hashKey, HashTable *hashTable, Data *dataBefore); +Point traverse(int (*b)[15], enum piece sideMax, enum type type, Point *step, float *pSuperiorLimit, int layer, int layerLimit, unsigned long long (*randomSet)[15][2], unsigned long long *hashKey, HashTable *hashTable, Data *dataBefore); +Point traverse_new(int (*b)[15], enum piece sideMax, enum type type, Point *step, int *pCount_step, float *pSuperiorLimit, int layer, int layerLimit, unsigned long long (*randomSet)[15][2], unsigned long long *hashKey, HashTable *hashTable, newData *dataBefore); +#endif