Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jimoh yusuf exercises #93

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ builds/*
*.exe
*.out
*.app

.vs/
../.idea/
.idea/
8 changes: 8 additions & 0 deletions .idea/.gitignore

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

1 change: 1 addition & 0 deletions .idea/.name

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

103 changes: 103 additions & 0 deletions .idea/editor.xml

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

10 changes: 10 additions & 0 deletions .idea/misc.xml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/newstarter.iml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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
10 changes: 10 additions & 0 deletions exercises-cpp/jimoh_yusuf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<<<<<<< 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)

add_subdirectory ( ex01_basics )
add_subdirectory ( ex02_oo_basics )
3 changes: 3 additions & 0 deletions exercises-cpp/jimoh_yusuf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This directory contains the template CMake projects for each of the exercises.

Do not write your code for the exercises in here. Instead, make a copy of the directory containing this file and name your new directory `firstname_surname`. The CMake files contain relative paths so the new directory should be at the same level as the parent `template` directory.
52 changes: 52 additions & 0 deletions exercises-cpp/jimoh_yusuf/ex01_basics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<<<<<<< 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
###############################################################################
# Name
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)
Binary file not shown.
Loading
Loading