CMakeLists.txt 629 B

12345678910111213141516171819202122232425262728
  1. include(FetchContent)
  2. FetchContent_Declare(
  3. googletest
  4. GIT_REPOSITORY https://github.com/google/googletest.git
  5. GIT_TAG release-1.12.1
  6. )
  7. # For Windows: Prevent overriding the parent project's compiler/linker settings
  8. set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
  9. FetchContent_MakeAvailable(googletest)
  10. enable_testing()
  11. add_executable(
  12. Elleptic_integralsTest
  13. Elleptic_integralsTest.cpp
  14. )
  15. target_link_libraries(
  16. Elleptic_integralsTest
  17. GTest::gtest_main
  18. )
  19. target_include_directories(Elleptic_integralsTest PUBLIC ${PROJECT_SOURCE_DIR})
  20. include(GoogleTest)
  21. gtest_discover_tests(Elleptic_integralsTest)