-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from hardingadonis/feature/cmake
Enhance: Implement CMake and more to your project
- Loading branch information
Showing
16 changed files
with
445 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup MSVC Developer Command Prompt | ||
uses: TheMrMilchmann/setup-msvc-dev@v3 | ||
with: | ||
arch: x64 | ||
|
||
- name: Install ninja-build tool | ||
uses: seanmiddleditch/gha-setup-ninja@v5 | ||
|
||
- name: Build project | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel | ||
cmake --build . --target install --config MinSizeRel | ||
- name: Zip the build | ||
run: | | ||
cd install | ||
7z a ../Operating-System-Project.x64.zip * | ||
- name: GH Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
name: Operating-System-Project | ||
tag_name: 1.0.0 | ||
files: | | ||
Operating-System-Project.x64.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
cmake_minimum_required(VERSION 3.10.2) | ||
|
||
project(Operating-System-Project VERSION 1.0.0) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
|
||
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install") | ||
|
||
add_executable(Operating-System-Project main.cpp) | ||
add_definitions(-DNOMINMAX) | ||
|
||
install(TARGETS Operating-System-Project RUNTIME DESTINATION .) | ||
|
||
add_subdirectory(Process) | ||
|
||
install(DIRECTORY Testcase/ DESTINATION Testcase FILES_MATCHING PATTERN "*") | ||
|
||
install(DIRECTORY Document/ DESTINATION Document FILES_MATCHING PATTERN "*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
cmake_minimum_required(VERSION 3.10.2) | ||
|
||
file(GLOB PROCESS_SOURCES *.cpp *.c) | ||
|
||
foreach(SOURCE_FILE ${PROCESS_SOURCES}) | ||
get_filename_component(EXECUTABLE_NAME ${SOURCE_FILE} NAME_WE) | ||
|
||
add_executable(${EXECUTABLE_NAME} ${SOURCE_FILE}) | ||
add_definitions(-D_CRT_SECURE_NO_WARNINGS) | ||
|
||
install(TARGETS ${EXECUTABLE_NAME} RUNTIME DESTINATION Process) | ||
endforeach() | ||
|
||
set_target_properties(countdown PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS") |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Oops, something went wrong.