Forráskód Böngészése

Minor cmake bug fix. (#929)

* Migrate unit tests back to the main repo.

* Minor bug fixes and getting unit test migrated.

* Minor cmake bug for unit tests.


Former-commit-id: 7ffcdfe5ffcc9c25eb2455c915793bd3b046f980
Qingnan Zhou 6 éve
szülő
commit
0bfa95b9d9
2 módosított fájl, 9 hozzáadás és 2 törlés
  1. 3 0
      CMakeLists.txt
  2. 6 2
      tests/CMakeLists.txt

+ 3 - 0
CMakeLists.txt

@@ -42,3 +42,6 @@ if(LIBIGL_BUILD_TUTORIALS)
 	add_subdirectory(tutorial)
 endif()
 
+if(LIBIGL_BUILD_TESTS)
+	add_subdirectory(tests)
+endif()

+ 6 - 2
tests/CMakeLists.txt

@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.1)
-project(libigl_tutorials)
+project(libigl_tests)
 message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}")
 message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
 
@@ -33,7 +33,11 @@ option(LIBIGL_WITH_PYTHON            "Use Python"         OFF)
 ### End
 
 ### Adding libIGL: choose the path to your local copy libIGL
-include(libigl)
+if(NOT TARGET igl_common)
+  include(libigl)
+else()
+  include(LibiglDownloadExternal)
+endif()
 
 ### Download data
 igl_download_test_data()