Skip to content

Commit

Permalink
completed exercise2 -read a sample text, clean the data, count the nu…
Browse files Browse the repository at this point in the history
…mber of words and write to file
  • Loading branch information
Oluwaseun Jimoh authored and yusufjimoh committed Jun 3, 2024
1 parent bc7e867 commit c1083da
Show file tree
Hide file tree
Showing 43 changed files with 1,230 additions and 4,518 deletions.
6 changes: 5 additions & 1 deletion .idea/newstarter.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Jenkins/buildscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
try:
WORKSPACE = os.environ["WORKSPACE"]
except KeyError:
print("WORKSPACE environment variable not found.\nThe build script assumes that a WORKSPACE environment variable points at the root of the source directory.")
print("WORKSPACE environment variable not found.\nThe builds script assumes that a WORKSPACE environment variable points at the root of the source directory.")
sys.exit(1)

PROJECTS_ROOT = os.path.abspath(os.path.join(WORKSPACE, "exercises-cpp"))
Expand Down Expand Up @@ -98,7 +98,7 @@ def build(build_root):
Build the code in the build_root directory
"""
if is_windows():
cmd = ["cmake", "--build", build_root, "--", "/nologo",
cmd = ["cmake", "--builds", build_root, "--", "/nologo",
"/verbosity:minimal", "/p:Configuration=Release"]
else:
cmd = make_scl_command(["make", "-C", build_root])
Expand All @@ -113,12 +113,12 @@ def check_build_is_sane():
generate_project(src_dir, dest_dir)
print("Checking a sample project can be built")
if build(dest_dir) != 0:
raise RuntimeError("Cannot build sample project")
raise RuntimeError("Cannot builds sample project")

################### Main #########################################################


# Always perform a clean build
# Always perform a clean builds
if os.path.exists(BUILDS_ROOT):
print(f"Removing {BUILDS_ROOT}")
shutil.rmtree(BUILDS_ROOT)
Expand All @@ -132,7 +132,7 @@ def check_build_is_sane():
check_build_is_sane()

if len(dirnames) == 0:
raise RuntimeError("No projects found to build")
raise RuntimeError("No projects found to builds")

statuses = []
for dirname in dirnames:
Expand Down
4 changes: 4 additions & 0 deletions exercises-cpp/jimoh_yusuf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<<<<<<< HEAD
cmake_minimum_required ( VERSION 3.5 )
=======
cmake_minimum_required ( VERSION 3.14 )
>>>>>>> e139231 (completed exercise2 -read a sample text, clean the data, count the number of words and write to file)

project(newstarter)

Expand Down
22 changes: 22 additions & 0 deletions exercises-cpp/jimoh_yusuf/ex01_basics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<<<<<<< HEAD
cmake_minimum_required ( VERSION 3.5)
=======
cmake_minimum_required ( VERSION 2.8.5 )
>>>>>>> e139231 (completed exercise2 -read a sample text, clean the data, count the number of words and write to file)

###############################################################################
# Setup
Expand All @@ -7,24 +11,42 @@ cmake_minimum_required ( VERSION 3.5)
project ( WordCounter )

# Find custom cmake modules
<<<<<<< HEAD
set ( CMAKE_MODULE_PATH "../../../CMake")

# Common setup

=======
set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../CMake")

# Common setup
include ( CommonSetup )
>>>>>>> e139231 (completed exercise2 -read a sample text, clean the data, count the number of words and write to file)

###############################################################################
# Executable
###############################################################################

set ( SRC_FILES
<<<<<<< HEAD
src/main.cpp
=======
src/main.cpp
>>>>>>> e139231 (completed exercise2 -read a sample text, clean the data, count the number of words and write to file)
# add any additional source files here
)

set ( HDR_FILES
<<<<<<< HEAD


# add any additional header files here
)

add_executable ( WordCounter ${SRC_FILES} ${HDR_FILES})
=======
# add any additional header files here
)

add_executable ( WordCounter ${SRC_FILES} ${HDR_FILES} )
>>>>>>> e139231 (completed exercise2 -read a sample text, clean the data, count the number of words and write to file)
Loading

0 comments on commit c1083da

Please sign in to comment.