File tree Expand file tree Collapse file tree 8 files changed +39
-13
lines changed
Library/PAX_SAPIENTICA/Type Expand file tree Collapse file tree 8 files changed +39
-13
lines changed Original file line number Diff line number Diff line change 4343 sudo apt-get update
4444 sudo apt-get install libsfml-dev
4545 sudo apt-get install cmake
46- sudo apt-get install g++
46+
47+ - name : Check g++ version
48+ run : g++ --version
4749
4850 - name : Configure CMake
4951 run : |
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ namespace paxs {
9191 y /= t;
9292 return *this ;
9393 }
94- constexpr auto operator <=>(const Vector2<T>& v) const noexcept = default ;
94+ auto operator <=>(const Vector2<T>& v) const noexcept = default ;
9595
9696 // / @brief Get the length of the vector
9797 // / @brief べクトルの長さを取得。
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.16)
22project (PAX_SAPIENTICA)
33include (CTest )
44set (CMAKE_CXX_STANDARD 20)
5+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
56
67if (NOT CMAKE_BUILD_TYPE )
78 set (CMAKE_BUILD_TYPE Release)
@@ -27,17 +28,10 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
2728 endif ()
2829endif ()
2930
30- include_directories (${CMAKE_SOURCE_DIR} /../Library )
31-
32- get_filename_component (PARENT_DIR ${CMAKE_SOURCE_DIR} DIRECTORY )
33- add_definitions (-DPROJECT_ROOT_PATH= \"${PARENT_DIR} \" )
34-
3531add_subdirectory (GeographicDataToSimulationGrid )
3632add_subdirectory (IncludeTest )
3733add_subdirectory (IntegrationTest )
3834add_subdirectory (UnitTest )
3935
40- add_subdirectory(../ExternalLibrary/googletest ${CMAKE_BINARY_DIR} /googletest)
41-
4236enable_testing ()
4337
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.16 )
2+ set (CMAKE_CXX_STANDARD 20)
3+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
4+
15set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR} /bin)
6+ include_directories (${CMAKE_CURRENT_SOURCE_DIR} /../../Library )
27
38file (GLOB_RECURSE LIB_HEADERS RELATIVE "${CMAKE_SOURCE_DIR} /../Library" "${CMAKE_SOURCE_DIR} /../Library/*.hpp" )
49
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.16 )
2+ set (CMAKE_CXX_STANDARD 20)
3+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
4+
15set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR} /bin)
2- include_directories (${CMAKE_CURRENT_SOURCE_DIR} /../../ExternalLibrary/googletest/googletest/include )
6+ include_directories (
7+ ${CMAKE_CURRENT_SOURCE_DIR} /../../Library
8+ ${CMAKE_CURRENT_SOURCE_DIR} /../../ExternalLibrary/googletest/googletest/include
9+ )
310
411add_executable (EnvironmentTest source /EnvironmentTest.cpp )
512add_executable (WindowTest source /WindowTest.cpp )
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.16 )
2+ set (CMAKE_CXX_STANDARD 20)
3+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
4+
15set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR} /bin)
2- include_directories (${CMAKE_CURRENT_SOURCE_DIR} /../../ExternalLibrary/googletest/googletest/include )
6+ include_directories (
7+ ${CMAKE_CURRENT_SOURCE_DIR} /../../Library
8+ ${CMAKE_CURRENT_SOURCE_DIR} /../../ExternalLibrary/googletest/googletest/include
9+ )
10+
11+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /../../ExternalLibrary/googletest ${CMAKE_BINARY_DIR} /googletest )
12+
13+ add_definitions (-DPROJECT_ROOT_PATH= \"${CMAKE_CURRENT_SOURCE_DIR} /../..\" )
314
415set(TEST_SOURCE_DIR " ${CMAKE_CURRENT_SOURCE_DIR} /source ")
516
Original file line number Diff line number Diff line change 99
1010##########################################################################################*/
1111
12+ #include < iostream>
13+ #include < string>
14+
1215#include < gtest/gtest.h>
1316
1417#include < PAX_SAPIENTICA/File.hpp>
1518
19+ #ifdef PROJECT_ROOT_PATH
1620const std::string root = PROJECT_ROOT_PATH;
1721const std::string prefix = root + " /Project/UnitTest/data/File" ;
22+ #else
23+ const std::string prefix = " ../data/File" ;
24+ #endif // PROJECT_ROOT_PATH
1825
1926TEST (FileUnitTest, readFile) {
2027 const std::string file_path = prefix + " /test_file.txt" ;
Original file line number Diff line number Diff line change 33SET SCRIPT_DIR = %~dp0
44
55:: Create build directory
6- cmake -S" %SCRIPT_DIR% ..\Project" -B" %SCRIPT_DIR% ..\build"
6+ cmake -S" %SCRIPT_DIR% ..\Project" -B" %SCRIPT_DIR% ..\build" -DCMAKE_BUILD_TYPE=Release
77
88:: Build the project
99cmake --build " %SCRIPT_DIR% ..\build"
1010
1111:: Change directory to build and execute ctest
1212cd " %SCRIPT_DIR% ..\build"
13- ctest
13+ ctest -C Release
You can’t perform that action at this time.
0 commit comments