-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add subfolders to build scripts, make test config build only tes…
…t target
- Loading branch information
1 parent
159ad42
commit 81089c6
Showing
17 changed files
with
41 additions
and
53 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 |
---|---|---|
|
@@ -59,15 +59,6 @@ source_group( | |
FILES ${SOURCES} | ||
) | ||
|
||
add_library( | ||
${PROJECT_NAME} | ||
STATIC | ||
${SOURCES} | ||
.clang-format | ||
) | ||
|
||
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) | ||
|
||
function (configure_target TARGET_NAME) | ||
target_compile_definitions( | ||
${TARGET_NAME} | ||
|
@@ -144,24 +135,22 @@ function (configure_target TARGET_NAME) | |
else() | ||
CPMAddPackage("gh:herumi/[email protected]") | ||
endif() | ||
|
||
target_link_libraries( | ||
${TARGET_NAME} | ||
PUBLIC | ||
xbyak::xbyak | ||
) | ||
endif() | ||
|
||
target_precompile_headers( | ||
${TARGET_NAME} | ||
PRIVATE | ||
include/SFSE/Impl/PCH.h | ||
) | ||
endfunction() | ||
|
||
configure_target(${PROJECT_NAME}) | ||
|
||
if (SFSE_BUILD_TESTS) | ||
if(SFSE_BUILD_TESTS) | ||
# add a custom library target that just builds test.cpp | ||
add_library( | ||
${PROJECT_NAME}-test | ||
|
@@ -171,9 +160,18 @@ if (SFSE_BUILD_TESTS) | |
${CMAKE_CURRENT_SOURCE_DIR}/test/test.cpp | ||
) | ||
configure_target(${PROJECT_NAME}-test) | ||
set(PROJECT_NAME ${PROJECT_NAME}-test) | ||
else() | ||
add_library( | ||
${PROJECT_NAME} | ||
STATIC | ||
${SOURCES} | ||
.clang-format | ||
) | ||
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) | ||
configure_target(${PROJECT_NAME}) | ||
endif() | ||
|
||
|
||
if(USING_VCPKG) | ||
install( | ||
TARGETS ${PROJECT_NAME} | ||
|
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 |
---|---|---|
|
@@ -760,4 +760,5 @@ namespace REL | |
|
||
#include "RE/F/FormTypes.h" | ||
#include "RE/M/msvc.h" | ||
|
||
#undef cdecl // Workaround for Clang. |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-debug-clang-cl-ninja-cpm | ||
cmake --build "%~dp0/../build" --config Debug | ||
cmake -B "%~dp0/../build/build-debug-clang-cl-ninja-cpm" -S "%~dp0/../CommonLibSF" --preset=build-debug-clang-cl-ninja-cpm | ||
cmake --build "%~dp0/../build/build-debug-clang-cl-ninja-cpm" --config Debug |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-debug-clang-cl-ninja-vcpkg | ||
cmake --build "%~dp0/../build" --config Debug | ||
cmake -B "%~dp0/../build/build-debug-clang-cl-ninja-vcpkg" -S "%~dp0/../CommonLibSF" --preset=build-debug-clang-cl-ninja-vcpkg | ||
cmake --build "%~dp0/../build/build-debug-clang-cl-ninja-vcpkg" --config Debug |
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,3 @@ | ||
echo off | ||
cmake -B "%~dp0/../build/build-debug-msvc-ninja-cpm-test" -S "%~dp0/../CommonLibSF" --preset=build-debug-msvc-ninja-cpm -DSFSE_BUILD_TESTS=true | ||
cmake --build "%~dp0/../build/build-debug-msvc-ninja-cpm-test" --config Debug |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-debug-msvc-ninja-cpm | ||
cmake --build "%~dp0/../build" --config Debug | ||
cmake -B "%~dp0/../build/build-debug-msvc-ninja-cpm" -S "%~dp0/../CommonLibSF" --preset=build-debug-msvc-ninja-cpm | ||
cmake --build "%~dp0/../build/build-debug-msvc-ninja-cpm" --config Debug |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-debug-msvc-ninja-vcpkg | ||
cmake --build "%~dp0/../build" --config Debug | ||
cmake -B "%~dp0/../build/build-debug-msvc-ninja-vcpkg" -S "%~dp0/../CommonLibSF" --preset=build-debug-msvc-ninja-vcpkg | ||
cmake --build "%~dp0/../build/build-debug-msvc-ninja-vcpkg" --config Debug |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-clang-cl-ninja-cpm -DSFSE_BUILD_TESTS=true | ||
cmake --build "%~dp0/../build" --config Release | ||
cmake -B "%~dp0/../build/build-release-clang-cl-ninja-cpm-test" -S "%~dp0/../CommonLibSF" --preset=build-release-clang-cl-ninja-cpm -DSFSE_BUILD_TESTS=true | ||
cmake --build "%~dp0/../build/build-release-clang-cl-ninja-cpm-test" --config Release |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-clang-cl-ninja-cpm | ||
cmake --build "%~dp0/../build" --config Release | ||
cmake -B "%~dp0/../build/build-release-clang-cl-ninja-cpm" -S "%~dp0/../CommonLibSF" --preset=build-release-clang-cl-ninja-cpm | ||
cmake --build "%~dp0/../build/build-release-clang-cl-ninja-cpm" --config Release |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-clang-cl-ninja-vcpkg | ||
cmake --build "%~dp0/../build" --config Release | ||
cmake -B "%~dp0/../build/build-release-clang-cl-ninja-vcpkg" -S "%~dp0/../CommonLibSF" --preset=build-release-clang-cl-ninja-vcpkg | ||
cmake --build "%~dp0/../build/build-release-clang-cl-ninja-vcpkg" --config Release |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-msvc-ninja-cpm -DSFSE_BUILD_TESTS=true | ||
cmake --build "%~dp0/../build" --config Release | ||
cmake -B "%~dp0/../build/build-release-msvc-ninja-cpm-test" -S "%~dp0/../CommonLibSF" --preset=build-release-msvc-ninja-cpm -DSFSE_BUILD_TESTS=true | ||
cmake --build "%~dp0/../build/build-release-msvc-ninja-cpm-test" --config Release |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-msvc-ninja-cpm | ||
cmake --build "%~dp0/../build" --config Release | ||
cmake -B "%~dp0/../build/build-release-msvc-ninja-cpm" -S "%~dp0/../CommonLibSF" --preset=build-release-msvc-ninja-cpm | ||
cmake --build "%~dp0/../build/build-release-msvc-ninja-cpm" --config Release |
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,4 +1,3 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-release-msvc-ninja-vcpkg | ||
cmake --build "%~dp0/../build" --config Release | ||
cmake -B "%~dp0/../build/build-release-msvc-ninja-vcpkg" -S "%~dp0/../CommonLibSF" --preset=build-release-msvc-ninja-vcpkg | ||
cmake --build "%~dp0/../build/build-release-msvc-ninja-vcpkg" --config Release |
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,3 +1,2 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-debug-clang-cl-msvc-cpm | ||
cmake -B "%~dp0/../build/build-debug-clang-cl-msvc-cpm" -S "%~dp0/../CommonLibSF" --preset=build-debug-clang-cl-msvc-cpm |
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,3 +1,2 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-debug-clang-cl-msvc-vcpkg | ||
cmake -B "%~dp0/../build/build-debug-clang-cl-msvc-vcpkg" -S "%~dp0/../CommonLibSF" --preset=build-debug-clang-cl-msvc-vcpkg |
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,3 +1,2 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-debug-msvc-msvc-cpm | ||
cmake -B "%~dp0/../build/build-debug-msvc-msvc-cpm" -S "%~dp0/../CommonLibSF" --preset=build-debug-msvc-msvc-cpm |
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,3 +1,2 @@ | ||
echo off | ||
rd /s /q "%~dp0/../build" | ||
cmake -B "%~dp0/../build" -S "%~dp0/../CommonLibSF" --preset=build-debug-msvc-msvc-vcpkg | ||
cmake -B "%~dp0/../build/build-debug-msvc-msvc-vcpkg" -S "%~dp0/../CommonLibSF" --preset=build-debug-msvc-msvc-vcpkg |