-
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.
- Loading branch information
0 parents
commit a8b88b6
Showing
6 changed files
with
792 additions
and
0 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,5 @@ | ||
# Set line ending conversion for all text files | ||
* text=auto eol=lf | ||
|
||
# Prevent conversion for .cmd files | ||
*.cmd text eol=crlf |
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,12 @@ | ||
# Build output directories | ||
/bin | ||
/build | ||
/cmake-build-debug | ||
/cmake-build-release | ||
/out | ||
/target | ||
|
||
# Personal IDE config files | ||
.idea | ||
.vs | ||
.vscode |
Large diffs are not rendered by default.
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,49 @@ | ||
@echo off | ||
|
||
setlocal enabledelayedexpansion | ||
|
||
@REM Check if an argument is provided and validate it | ||
if "%~1"=="" ( | ||
@REM If no arguments are provided, set build type to Debug | ||
set "build_type=Debug" | ||
set "install=false" | ||
) else ( | ||
@REM Convert the argument to lowercase | ||
set "build_type=%~1" | ||
set "build_type=!build_type:~0,1!!build_type:~1!" | ||
|
||
@REM Check if the provided argument is either Release or Debug | ||
if /I "!build_type!"=="release" ( | ||
set "build_type=Release" | ||
) else if /I "!build_type!"=="debug" ( | ||
set "build_type=Debug" | ||
) else if /I "!build_type!"=="install" ( | ||
set "install=true" | ||
) else ( | ||
echo Error: Invalid build type '%~1'. | ||
echo Please specify either 'Release' or 'Debug'. | ||
exit /b 1 | ||
) | ||
) | ||
|
||
@REM Set build directory | ||
set "build_dir=build\%build_type%" | ||
|
||
if /I "!install!"=="true" ( | ||
@REM Build type message | ||
echo Installation... | ||
|
||
cmake -S . -B %build_dir% -DLIB_INSTALL=ON | ||
cmake --install %build_dir% | ||
) else ( | ||
@REM Build type message | ||
echo Build type: %build_type% | ||
|
||
@REM Run cmake with the appropriate build type | ||
cmake -S . -B %build_dir% -G "Ninja" -DCMAKE_BUILD_TYPE=%build_type% -DDEVELOPMENT=ON | ||
|
||
@REM Build the targets | ||
cmake --build %build_dir% --parallel 16 | ||
) | ||
|
||
endlocal |
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,44 @@ | ||
#!/bin/bash | ||
|
||
# Check if an argument is provided and validate it | ||
if [[ "$#" -eq 1 ]]; then | ||
# Convert the argument to lowercase | ||
build_type=$(echo "$1" | tr '[:upper:]' '[:lower:]') | ||
|
||
# Check if the provided argument is either Release or Debug | ||
if [ $build_type == "release" ]; then | ||
build_type="Release" | ||
elif [ $build_type == "debug" ]; then | ||
build_type="Debug" | ||
elif [ $build_type == "install" ]; then | ||
install="true" | ||
else | ||
echo "Error: Invalid build type '$build_type'." | ||
echo "Please specify either 'Release' or 'Debug'." | ||
exit 1 | ||
fi | ||
elif [ "$#" -eq 0 ]; then | ||
# If no arguments are provided, set build type to Debug | ||
build_type="Debug" | ||
install="false" | ||
fi | ||
|
||
# Set build directory | ||
build_dir="build/$build_type/" | ||
|
||
if [ $install == "true" ]; then | ||
# Build type message | ||
echo "Installation..." | ||
|
||
cmake -S . -B $build_dir -DLIB_INSTALL=ON | ||
cmake --install $build_dir | ||
else | ||
# Build type message | ||
echo "Build type: $build_type" | ||
|
||
# Run cmake with the appropriate build type | ||
cmake -S . -B $build_dir -G "Ninja" -DCMAKE_BUILD_TYPE=$build_type -DDEVELOPMENT=ON | ||
|
||
# Build the targets | ||
cmake --build $build_dir --parallel 16 | ||
fi |
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,8 @@ | ||
@PACKAGE_INIT@ | ||
|
||
set(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../..") | ||
|
||
set_and_check(PACKAGE_INCLUDE_INSTALL_DIR "${PACKAGE_PREFIX_DIR}/include") | ||
set_and_check(PACKAGE_CMAKE_INSTALL_DIR "${PACKAGE_PREFIX_DIR}/lib/cmake/caitlyn-test") | ||
|
||
include("${PACKAGE_CMAKE_INSTALL_DIR}/CaitlynTestTargets.cmake") |