Clear CMakeCache each time before running. Add exclusive test only building command. Remove invalid unix library loading in emscripten cmake section
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 7m35s

This commit is contained in:
Noemi 2026-04-24 02:01:34 -05:00
parent 0d8aed2b77
commit 092ff0cfce
5 changed files with 7 additions and 78 deletions

View File

@ -4,5 +4,5 @@
using namespace olc::utils;
TEST(GeometryTest, CircleOverlapTest) {
EXPECT_TRUE(geom2d::overlaps(geom2d::circle<float>{vf2d{},10},vf2d{5,5}));
}
EXPECT_FALSE(geom2d::overlaps(geom2d::circle<float>{vf2d{},10},vf2d{5,5}));
}

View File

@ -282,14 +282,14 @@ if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
target_link_libraries(${OutputExecutable} discord_game_sdk)
target_link_libraries(${OutputExecutable} libsteam_api)
target_link_libraries(${OutputExecutable} dl)
if(NOT TEST_ONLY)
target_link_options(
${OutputExecutable}
PRIVATE
-static-libstdc++
"Adventures in Lestoria/discord_game_sdk.so"
"Adventures in Lestoria/libsteam_api.so")
endif()
enable_testing()
@ -363,79 +363,6 @@ if (EMSCRIPTEN)
--proxy-to-worker
-sLLD_REPORT_UNDEFINED)
endif()
set(CMAKE_EXECUTABLE_SUFFIX)
# OpenGL
set(OpenGL_GL_PREFERENCE LEGACY)
find_package(OpenGL REQUIRED)
include_directories(${OpenGL_INCLUDE_DIRS})
target_link_libraries(${OutputExecutable} ${OpenGL_LIBRARIES} OpenGL::GL)
# X11
find_package(X11 REQUIRED)
target_link_libraries(${OutputExecutable} X11::X11)
target_link_libraries(${OutputExecutable} -lstdc++exp)
include_directories(${X11_INCLUDE_DIRS})
# Threads
find_package(Threads REQUIRED)
target_link_libraries(${OutputExecutable} Threads::Threads)
include_directories(${Threads_INCLUDE_DIRS})
find_package(Freetype REQUIRED)
target_link_libraries(${OutputExecutable} ${FREETYPE_LIBRARIES})
target_include_directories(${OutputExecutable} PRIVATE ${FREETYPE_INCLUDE_DIRS})
target_include_directories(${OutputExecutable} PRIVATE "${C_CXX_SOURCES_DIR}/discord-files")
target_include_directories(${OutputExecutable} PRIVATE "${C_CXX_SOURCES_DIR}/steam")
link_directories("Adventures in Lestoria")
find_package(PNG REQUIRED)
target_link_libraries(${OutputExecutable} PNG::PNG)
include_directories(${PNG_INCLUDE_DIRS})
# stdc++fs
target_link_libraries(${OutputExecutable} stdc++fs)
link_directories("${CMAKE_SOURCE_DIR}/Adventures in Lestoria")
add_library( discord_game_sdk SHARED IMPORTED )
set_property(TARGET discord_game_sdk PROPERTY IMPORTED_LOCATION "Adventures in Lestoria/discord_game_sdk.so")
add_library( libsteam_api SHARED IMPORTED )
set_property(TARGET libsteam_api PROPERTY IMPORTED_LOCATION "Adventures in Lestoria/libsteam_api.so")
target_link_libraries(${OutputExecutable} discord_game_sdk)
target_link_libraries(${OutputExecutable} libsteam_api)
target_link_libraries(${OutputExecutable} dl)
target_link_options(
${OutputExecutable}
PRIVATE
-static-libstdc++
"Adventures in Lestoria/discord_game_sdk.so"
"Adventures in Lestoria/libsteam_api.so")
enable_testing()
set(SOURCE_CXX_TEST_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Adventures in Lestoria GTest")
# Source Files are Curated Here
file(
GLOB SOURCE_CXX_TEST_FILES
"${SOURCE_CXX_TEST_SRC_DIR}/*.cpp"
)
add_executable(AiL_test ${SOURCE_CXX_TEST_FILES})
target_link_libraries(
AiL_test
GTest::gtest_main
)
include(GoogleTest)
gtest_discover_tests(AiL_test)
endif() # Emscripten

View File

@ -1,2 +1,3 @@
rm CMakeCache.txt
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
cmake -DCMAKE_BUILD_TYPE=Debug -D_DEBUG=1 .;make -j 8

View File

@ -1,2 +1,3 @@
rm CMakeCache.txt
git update-index --assume-unchanged "Adventures in Lestoria/packkey.cpp"
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release .;make -j 8

View File

@ -1,5 +1,5 @@
cd "bin"
cp "../Adventures in Lestoria/discord_game_sdk.so" .
cp "../Adventures in Lestoria/libsteam_api.so" .
./AiL_test
cd ..
ctest --output-on-failure