summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xa.out (renamed from cmake-build-debug/program)bin52696 -> 51928 bytes
-rw-r--r--cmake-build-debug/.ninja_depsbin19688 -> 0 bytes
-rw-r--r--cmake-build-debug/.ninja_log23
-rw-r--r--cmake-build-debug/CMakeCache.txt363
-rw-r--r--cmake-build-debug/CMakeFiles/program.dir/main.c.obin0 -> 18712 bytes
-rw-r--r--cmake-build-debug/Testing/Temporary/LastTest.log4
-rw-r--r--cmake-build-debug/build.ninja142
-rw-r--r--cmake-build-debug/cmake_install.cmake57
-rw-r--r--folder/anotherfile0
-rw-r--r--folder/newfile.txt0
-rw-r--r--folder/thefolder/fileA0
-rw-r--r--folder/thefolder/fileB0
-rw-r--r--folder/thefolder/fileC0
-rw-r--r--main.c97
14 files changed, 58 insertions, 628 deletions
diff --git a/cmake-build-debug/program b/a.out
index 66e8bbb..749370d 100755
--- a/cmake-build-debug/program
+++ b/a.out
Binary files differ
diff --git a/cmake-build-debug/.ninja_deps b/cmake-build-debug/.ninja_deps
deleted file mode 100644
index a496b3c..0000000
--- a/cmake-build-debug/.ninja_deps
+++ /dev/null
Binary files differ
diff --git a/cmake-build-debug/.ninja_log b/cmake-build-debug/.ninja_log
deleted file mode 100644
index 96ca768..0000000
--- a/cmake-build-debug/.ninja_log
+++ /dev/null
@@ -1,23 +0,0 @@
-# ninja log v6
-2 247 1740082014330084017 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-247 372 1740082014575379482 program ddf45f8a5c0d42d
-4 236 1740220897014988236 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-237 357 1740220897247113834 program ddf45f8a5c0d42d
-2 240 1740221025791837800 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-240 370 1740221026029114077 program ddf45f8a5c0d42d
-3 243 1740224227027392987 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-243 395 1740224227267350516 program ddf45f8a5c0d42d
-6 229 1740254802938845002 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-229 364 1740254803161377753 program ddf45f8a5c0d42d
-2 53 1740254819648654296 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-53 82 1740254819699608732 program ddf45f8a5c0d42d
-5 280 1740255409965330176 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-281 412 1740255410240941618 program ddf45f8a5c0d42d
-1 202 1740255437104581673 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-202 308 1740255437305637510 program ddf45f8a5c0d42d
-2 41 1740255449001281837 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-42 70 1740255449040904723 program ddf45f8a5c0d42d
-1 222 1740256119969249200 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-223 352 1740256120190732751 program ddf45f8a5c0d42d
-1 211 1740257255120464172 CMakeFiles/program.dir/main.c.o 857d70be1ede4dfe
-211 340 1740257255330667633 program ddf45f8a5c0d42d
diff --git a/cmake-build-debug/CMakeCache.txt b/cmake-build-debug/CMakeCache.txt
deleted file mode 100644
index 6e5c097..0000000
--- a/cmake-build-debug/CMakeCache.txt
+++ /dev/null
@@ -1,363 +0,0 @@
-# This is the CMakeCache file.
-# For build in directory: /Users/nsrddyn/Documents/UnixShell/cmake-build-debug
-# It was generated by CMake: /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake
-# 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=CMAKE_ADDR2LINE-NOTFOUND
-
-//Path to a program.
-CMAKE_AR:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/ar
-
-//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=/Library/Developer/CommandLineTools/usr/bin/c++
-
-//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
-
-//C compiler
-CMAKE_C_COMPILER:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/cc
-
-//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
-
-//Path to a program.
-CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
-
-//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=/Users/nsrddyn/Documents/UnixShell/cmake-build-debug/CMakeFiles/pkgRedirects
-
-//Path to a program.
-CMAKE_INSTALL_NAME_TOOL:FILEPATH=/usr/bin/install_name_tool
-
-//Install path prefix, prepended onto install directories.
-CMAKE_INSTALL_PREFIX:PATH=/usr/local
-
-//Path to a program.
-CMAKE_LINKER:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/ld
-
-//No help, variable specified on the command line.
-CMAKE_MAKE_PROGRAM:UNINITIALIZED=/Applications/CLion.app/Contents/bin/ninja/mac/aarch64/ninja
-
-//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=/Library/Developer/CommandLineTools/usr/bin/nm
-
-//Path to a program.
-CMAKE_OBJCOPY:FILEPATH=CMAKE_OBJCOPY-NOTFOUND
-
-//Path to a program.
-CMAKE_OBJDUMP:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/objdump
-
-//Build architectures for OSX
-CMAKE_OSX_ARCHITECTURES:STRING=
-
-//Minimum OS X version to target for deployment (at runtime); newer
-// APIs weak linked. Set to empty string for default value.
-CMAKE_OSX_DEPLOYMENT_TARGET:STRING=
-
-//The product will be built against the headers and libraries located
-// inside the indicated SDK.
-CMAKE_OSX_SYSROOT:PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX15.2.sdk
-
-//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=unixshell
-
-//Path to a program.
-CMAKE_RANLIB:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/ranlib
-
-//Path to a program.
-CMAKE_READELF:FILEPATH=CMAKE_READELF-NOTFOUND
-
-//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=/Library/Developer/CommandLineTools/usr/bin/strip
-
-//Path to a program.
-CMAKE_TAPI:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/tapi
-
-//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
-
-//Value Computed by CMake
-unixshell_BINARY_DIR:STATIC=/Users/nsrddyn/Documents/UnixShell/cmake-build-debug
-
-//Value Computed by CMake
-unixshell_IS_TOP_LEVEL:STATIC=ON
-
-//Value Computed by CMake
-unixshell_SOURCE_DIR:STATIC=/Users/nsrddyn/Documents/UnixShell
-
-
-########################
-# 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=/Users/nsrddyn/Documents/UnixShell/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=30
-//Patch version of cmake used to create the current loaded cache
-CMAKE_CACHE_PATCH_VERSION:INTERNAL=5
-//Path to CMake executable.
-CMAKE_COMMAND:INTERNAL=/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake
-//Path to cpack program executable.
-CMAKE_CPACK_COMMAND:INTERNAL=/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cpack
-//Path to ctest program executable.
-CMAKE_CTEST_COMMAND:INTERNAL=/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/ctest
-//ADVANCED property for variable: CMAKE_CXX_COMPILER
-CMAKE_CXX_COMPILER-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_C_COMPILER
-CMAKE_C_COMPILER-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_DLLTOOL
-CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
-//Executable file format
-CMAKE_EXECUTABLE_FORMAT:INTERNAL=MACHO
-//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=/Users/nsrddyn/Documents/UnixShell
-//ADVANCED property for variable: CMAKE_INSTALL_NAME_TOOL
-CMAKE_INSTALL_NAME_TOOL-ADVANCED:INTERNAL=1
-//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_READELF
-CMAKE_READELF-ADVANCED:INTERNAL=1
-//Path to CMake installation.
-CMAKE_ROOT:INTERNAL=/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30
-//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_TAPI
-CMAKE_TAPI-ADVANCED:INTERNAL=1
-//uname command
-CMAKE_UNAME:INTERNAL=/usr/bin/uname
-//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
-CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
-
diff --git a/cmake-build-debug/CMakeFiles/program.dir/main.c.o b/cmake-build-debug/CMakeFiles/program.dir/main.c.o
new file mode 100644
index 0000000..a376f06
--- /dev/null
+++ b/cmake-build-debug/CMakeFiles/program.dir/main.c.o
Binary files differ
diff --git a/cmake-build-debug/Testing/Temporary/LastTest.log b/cmake-build-debug/Testing/Temporary/LastTest.log
index 225e1e8..6267674 100644
--- a/cmake-build-debug/Testing/Temporary/LastTest.log
+++ b/cmake-build-debug/Testing/Temporary/LastTest.log
@@ -1,3 +1,3 @@
-Start testing: Feb 23 12:12 CET
+Start testing: Feb 25 21:22 CET
----------------------------------------------------------
-End testing: Feb 23 12:12 CET
+End testing: Feb 25 21:22 CET
diff --git a/cmake-build-debug/build.ninja b/cmake-build-debug/build.ninja
deleted file mode 100644
index 1ac3a1a..0000000
--- a/cmake-build-debug/build.ninja
+++ /dev/null
@@ -1,142 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Ninja" Generator, CMake Version 3.30
-
-# This file contains all the build statements describing the
-# compilation DAG.
-
-# =============================================================================
-# Write statements declared in CMakeLists.txt:
-#
-# Which is the root file.
-# =============================================================================
-
-# =============================================================================
-# Project: unixshell
-# 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 = /Users/nsrddyn/Documents/UnixShell/cmake-build-debug/
-# =============================================================================
-# Object build statements for EXECUTABLE target program
-
-
-#############################################
-# Order-only phony target for program
-
-build cmake_object_order_depends_target_program: phony || .
-
-build CMakeFiles/program.dir/main.c.o: C_COMPILER__program_unscanned_Debug /Users/nsrddyn/Documents/UnixShell/main.c || cmake_object_order_depends_target_program
- DEP_FILE = CMakeFiles/program.dir/main.c.o.d
- FLAGS = -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.2.sdk -fcolor-diagnostics
- OBJECT_DIR = CMakeFiles/program.dir
- OBJECT_FILE_DIR = CMakeFiles/program.dir
-
-
-# =============================================================================
-# Link build statements for EXECUTABLE target program
-
-
-#############################################
-# Link the executable program
-
-build program: C_EXECUTABLE_LINKER__program_Debug CMakeFiles/program.dir/main.c.o
- FLAGS = -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.2.sdk
- OBJECT_DIR = CMakeFiles/program.dir
- POST_BUILD = :
- PRE_LINK = :
- TARGET_FILE = program
- TARGET_PDB = program.dbg
-
-
-#############################################
-# Utility command for edit_cache
-
-build CMakeFiles/edit_cache.util: CUSTOM_COMMAND
- COMMAND = cd /Users/nsrddyn/Documents/UnixShell/cmake-build-debug && /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake -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 = cd /Users/nsrddyn/Documents/UnixShell/cmake-build-debug && /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake --regenerate-during-build -S/Users/nsrddyn/Documents/UnixShell -B/Users/nsrddyn/Documents/UnixShell/cmake-build-debug
- DESC = Running CMake to regenerate build system...
- pool = console
- restat = 1
-
-build rebuild_cache: phony CMakeFiles/rebuild_cache.util
-
-# =============================================================================
-# Target aliases.
-
-# =============================================================================
-# Folder targets.
-
-# =============================================================================
-
-#############################################
-# Folder: /Users/nsrddyn/Documents/UnixShell/cmake-build-debug
-
-build all: phony program
-
-# =============================================================================
-# Built-in targets
-
-
-#############################################
-# Re-run CMake if any of its inputs changed.
-
-build build.ninja: RERUN_CMAKE | /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeCInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeCXXInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeCommonLanguageInclude.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeGenericSystem.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeInitializeConfigs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeLanguageInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeSystemSpecificInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeSystemSpecificInitialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/CMakeCommonCompilerMacros.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/GNU.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-Clang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-Clang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Darwin-Initialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Darwin.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/UnixPaths.cmake /Users/nsrddyn/Documents/UnixShell/CMakeLists.txt CMakeCache.txt CMakeFiles/3.30.5/CMakeCCompiler.cmake CMakeFiles/3.30.5/CMakeCXXCompiler.cmake CMakeFiles/3.30.5/CMakeSystem.cmake
- pool = console
-
-
-#############################################
-# A missing CMake input file is not an error.
-
-build /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeCInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeCXXInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeCommonLanguageInclude.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeGenericSystem.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeInitializeConfigs.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeLanguageInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeSystemSpecificInformation.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/CMakeSystemSpecificInitialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/CMakeCommonCompilerMacros.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Compiler/GNU.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-AppleClang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-AppleClang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-Clang-C.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-Clang-CXX.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Apple-Clang.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Darwin-Initialize.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/Darwin.cmake /Applications/CLion.app/Contents/bin/cmake/mac/aarch64/share/cmake-3.30/Modules/Platform/UnixPaths.cmake /Users/nsrddyn/Documents/UnixShell/CMakeLists.txt CMakeCache.txt CMakeFiles/3.30.5/CMakeCCompiler.cmake CMakeFiles/3.30.5/CMakeCXXCompiler.cmake CMakeFiles/3.30.5/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/cmake-build-debug/cmake_install.cmake b/cmake-build-debug/cmake_install.cmake
deleted file mode 100644
index 530ae40..0000000
--- a/cmake-build-debug/cmake_install.cmake
+++ /dev/null
@@ -1,57 +0,0 @@
-# Install script for directory: /Users/nsrddyn/Documents/UnixShell
-
-# Set the install prefix
-if(NOT DEFINED CMAKE_INSTALL_PREFIX)
- set(CMAKE_INSTALL_PREFIX "/usr/local")
-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 path to fallback-tool for dependency-resolution.
-if(NOT DEFINED CMAKE_OBJDUMP)
- set(CMAKE_OBJDUMP "/Library/Developer/CommandLineTools/usr/bin/objdump")
-endif()
-
-if(CMAKE_INSTALL_COMPONENT)
- if(CMAKE_INSTALL_COMPONENT MATCHES "^[a-zA-Z0-9_.+-]+$")
- set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
- else()
- string(MD5 CMAKE_INST_COMP_HASH "${CMAKE_INSTALL_COMPONENT}")
- set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INST_COMP_HASH}.txt")
- unset(CMAKE_INST_COMP_HASH)
- endif()
-else()
- set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
-endif()
-
-if(NOT CMAKE_INSTALL_LOCAL_ONLY)
- string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
- "${CMAKE_INSTALL_MANIFEST_FILES}")
- file(WRITE "/Users/nsrddyn/Documents/UnixShell/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
- "${CMAKE_INSTALL_MANIFEST_CONTENT}")
-endif()
diff --git a/folder/anotherfile b/folder/anotherfile
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/folder/anotherfile
diff --git a/folder/newfile.txt b/folder/newfile.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/folder/newfile.txt
diff --git a/folder/thefolder/fileA b/folder/thefolder/fileA
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/folder/thefolder/fileA
diff --git a/folder/thefolder/fileB b/folder/thefolder/fileB
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/folder/thefolder/fileB
diff --git a/folder/thefolder/fileC b/folder/thefolder/fileC
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/folder/thefolder/fileC
diff --git a/main.c b/main.c
index d8accff..f0f2e94 100644
--- a/main.c
+++ b/main.c
@@ -48,7 +48,7 @@ void remove_dir(const char *path); // trying to delete the folder and the files
void copy_files(const char *arg);
// void move_files(struct split_arg argument);
-void move_files(const char* arg);
+void move_files(const char *arg);
void print_cdirectory(const char *arg);
@@ -56,6 +56,8 @@ void change_directory(const char *path);
void change_ownership(const char *path);
+void make_file(const char *path);
+
void clear(const char *arg);
void echo(const char *arg);
@@ -73,6 +75,7 @@ struct exec_command CommandsList[] = {
{"pwd", print_cdirectory},
{"cd", change_directory},
{"clr", clear},
+ {"mkfile", make_file},
{"echo", echo},
{"exit", exit_}
};
@@ -109,6 +112,19 @@ struct split_arg split_argument(struct command argument) {
return new_argument;
}
+int main(void) {
+ clear("");
+ // ReSharper disable once CppDFAEndlessLoop
+ while (1) {
+ printf("\n$ ");
+
+ char *input = malloc(sizeof(char) * MAX_COMMAND_LENGTH);
+ fgets(input, MAX_COMMAND_LENGTH, stdin);
+ exec_command(input);
+ free(input);
+ }
+}
+
void exec_command(char *input) {
const struct command user_command = split_command(input);
@@ -147,35 +163,41 @@ void list(const char *path) {
closedir(dP);
}
+// extra function to check if a file is a directory or another type of file, so return 0 if directory, else return 1;
+int if_directory(const char *path) {
+ struct stat info;
+
+ if (stat(path, &info) != 0) {
+ perror("failed to get info stat about the given file");
+ };
+
+ return S_ISDIR(info.st_mode) ? 1 : 0;
+}
+
void remove_dir(const char *path) {
- if (rmdir(path) != 0) {
- printf("directory not empty");
- }
- else {
- struct dirent *entry;
- // cant be a const because inserting it into the readdir functions causes a warning becasue it expects a non const dir variable
- DIR *dP = opendir("/");
- printf("opended the directory");
+ if (rmdir(path) == 0) {
+ printf("successfully deleted the directory");
+ } else {
+ DIR *dP = opendir(path);
+ printf("opened the directory");
if (dP == NULL) {
perror("failed to open the directory to delete the files recursively");
-
- }
- else {
-
- while ((entry = readdir(dP)) != NULL && rmdir(path) != 0){
- if (strcmp(entry->d_name, "." ) == 0 || strcmp(entry->d_name, "..")== 0){
- printf("%p",entry->d_name);
- continue;
- }
- else if (remove(entry->d_name) != 0) {
- printf("%p", entry->d_name);
- perror("failed to delete the directory 02");
+ } else {
+ struct dirent *entry;
+ while ((entry = readdir(dP)) != NULL) {
+ const char *new_path = entry->d_name;
+ if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) {
+ continue;
+ } else if ((if_directory(entry->d_name) == 0)) {
+ remove_dir(new_path);
+ } else if (unlink(entry->d_name) != 0) {
+ perror("failed to remove the file 003");
}
}
+ closedir(dP);
}
- printf("%p", dP);
- closedir(dP);
+ printf("successfully finished the removal of %s", path);
}
}
@@ -190,6 +212,13 @@ void remove_file(const char *path) {
}
}
+void make_file(const char *path) {
+ const FILE *new_file = fopen(path, "w");
+ if (new_file == NULL) {
+ perror("failed to create the new file");
+ }
+}
+
void change_ownership(const char *path) {
if (chmod(path,S_IRWXU) != 0) {
perror("failed to get ownership of the file");
@@ -202,7 +231,7 @@ void copy_files(const char *arg) {
// split the argument into the source and destination
// make a copy of the source file in the destination file
int c;
- struct split_arg argument = split_argument((struct command){.arg = (char *)arg});
+ struct split_arg argument = split_argument((struct command){.arg = (char *) arg});
FILE *pold_file = fopen(argument.source, "r");
if (pold_file == NULL) {
@@ -224,8 +253,7 @@ void copy_files(const char *arg) {
}
void move_files(const char *arg) {
-
- struct split_arg argument = split_argument((struct command){.arg = (char *)arg});
+ struct split_arg argument = split_argument((struct command){.arg = (char *) arg});
if (remove(argument.source) != 0) {
perror("failed while trying to move the file");
@@ -247,10 +275,6 @@ void echo(const char *arg) {
printf("%s\n", arg);
}
-void exit_(const char *arg) {
- exit(0);
-}
-
void print_cdirectory(const char *arg) {
char *current_working_directory = getcwd(NULL, 0);
printf("%s", current_working_directory);
@@ -263,15 +287,6 @@ void change_directory(const char *path) {
perror("path not found");
}
-int main(void) {
- clear("");
- // ReSharper disable once CppDFAEndlessLoop
- while (1) {
- printf("\n$ ");
-
- char *input = malloc(sizeof(char) * MAX_COMMAND_LENGTH);
- fgets(input, MAX_COMMAND_LENGTH, stdin);
- exec_command(input);
- free(input);
- }
+void exit_(const char *arg) {
+ exit(0);
}