Add Intersect object as a way to report where a ray intersect another object and which one it is. Add an Object base class for all object that can be rendered. Add the Sphere object.
18 lines
696 B
CMake
18 lines
696 B
CMake
project(DoRayTested)
|
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
find_package(Threads REQUIRED)
|
|
|
|
set(TESTS_SRC tuple_test.cpp colour_test.cpp canvas_test.cpp matrix_test.cpp transformation_test.cpp ray_test.cpp
|
|
intersect_test.cpp sphere_test.cpp)
|
|
|
|
add_executable(testMyRays)
|
|
target_include_directories(testMyRays PUBLIC ${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
|
|
target_include_directories(testMyRays PUBLIC ../source/include)
|
|
target_sources(testMyRays PRIVATE ${TESTS_SRC})
|
|
target_link_libraries(testMyRays gtest gtest_main rayonnement Threads::Threads)
|
|
|
|
gtest_discover_tests(testMyRays
|
|
WORKING_DIRECTORY ${PROJECT_DIR}
|
|
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${PROJECT_DIR}"
|
|
) |