-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some CMake scripts: - All, Build, Run, Test, SetDebug, SetRelease
- Loading branch information
Showing
10 changed files
with
106 additions
and
37 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
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 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 |
---|---|---|
@@ -1,15 +1,5 @@ | ||
- **Add Cmake scripts to build, run and test** | ||
. | ||
|
||
- **Refactor Cmake scripts** | ||
. | ||
|
||
- **Implement all** | ||
. | ||
|
||
- **Implement debug, release** | ||
. | ||
|
||
--- | ||
- **Use 'ubuntu-latest' in CI again** | ||
Use 'ubuntu-latest' in CI again when it will be 'ubuntu-24.04', Probably after October 30th , 2024 |
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,15 @@ | ||
cmake_minimum_required(VERSION 3.28) | ||
|
||
|
||
execute_process(COMMAND cmake -P cmake/Setup.cmake | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
execute_process(COMMAND cmake -P cmake/Build.cmake | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
execute_process(COMMAND cmake -P cmake/Run.cmake | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
execute_process(COMMAND cmake -P cmake/Test.cmake | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) |
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.28) | ||
|
||
if(EXISTS "./build/BuildType/Release") | ||
execute_process(COMMAND cmake --preset=conan-release | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
execute_process(COMMAND cmake --build --preset=conan-release | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
elseif(EXISTS "./build/BuildType/Debug") | ||
execute_process(COMMAND cmake --preset=conan-debug | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
execute_process(COMMAND cmake --build --preset=conan-debug | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
else() | ||
message(FATAL_ERROR "BuildType has not been found") | ||
endif() |
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,16 @@ | ||
cmake_minimum_required(VERSION 3.28) | ||
|
||
get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
string(REPLACE " " "_" ProjectId ${ProjectId}) | ||
|
||
if(EXISTS "./build/BuildType/Release") | ||
execute_process(COMMAND "./build/Release/src/app/${ProjectId}" | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
elseif(EXISTS "./build/BuildType/Debug") | ||
execute_process(COMMAND "./build/Debug/src/app/${ProjectId}" | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
else() | ||
message(FATAL_ERROR "BuildType has not been found") | ||
endif() |
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,11 @@ | ||
cmake_minimum_required(VERSION 3.28) | ||
|
||
if(NOT EXISTS "./build/BuildType/") | ||
file(MAKE_DIRECTORY "./build/BuildType/") | ||
endif() | ||
|
||
if(EXISTS "./build/BuildType/Release") | ||
file(RENAME "./build/BuildType/Release" "./build/BuildType/Debug") | ||
elseif(NOT EXISTS "./build/BuildType/Debug") | ||
file(TOUCH "./build/BuildType/Debug") | ||
endif() |
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,11 @@ | ||
cmake_minimum_required(VERSION 3.28) | ||
|
||
if(NOT EXISTS "./build/BuildType/") | ||
file(MAKE_DIRECTORY "./build/BuildType/") | ||
endif() | ||
|
||
if(EXISTS "./build/BuildType/Debug") | ||
file(RENAME "./build/BuildType/Debug" "./build/BuildType/Release") | ||
elseif(NOT EXISTS "./build/BuildType/Release") | ||
file(TOUCH "./build/BuildType/Release") | ||
endif() |
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 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,16 @@ | ||
cmake_minimum_required(VERSION 3.28) | ||
|
||
get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
string(REPLACE " " "_" ProjectId ${ProjectId}) | ||
|
||
if(EXISTS "./build/BuildType/Release") | ||
execute_process(COMMAND "./build/Release/test/${ProjectId}Test" | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
elseif(EXISTS "./build/BuildType/Debug") | ||
execute_process(COMMAND "./build/Debug/test/${ProjectId}Test" | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY) | ||
else() | ||
message(FATAL_ERROR "BuildType has not been found") | ||
endif() |