Commit e689178a authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Disabled linking to the VTK library and enabled all mesh tests for CUDA even for nvcc

parent 6b579ed9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ update( const MatrixPointer& matrixPointer )
      throw 1;
   }
#else
   throw std::runtime_error("The program was not compiled with the CUSPARSE library. Pass -DHAVE_CUSPARSE -lcusparse to the compiler.")
   throw std::runtime_error("The program was not compiled with the CUSPARSE library. Pass -DHAVE_CUSPARSE -lcusparse to the compiler.");
#endif
#else
   throw Exceptions::CudaSupportMissing();
@@ -295,7 +295,7 @@ solve( const Vector1& b, Vector2& x ) const

   return true;
#else
   throw std::runtime_error("The program was not compiled with the CUSPARSE library. Pass -DHAVE_CUSPARSE -lcusparse to the compiler.")
   throw std::runtime_error("The program was not compiled with the CUSPARSE library. Pass -DHAVE_CUSPARSE -lcusparse to the compiler.");
#endif
#else
   throw Exceptions::CudaSupportMissing();
+17 −18
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ TARGET_LINK_LIBRARIES( BoundaryTagsTest
                           ${GTEST_BOTH_LIBRARIES}
                           tnl )

if( BUILD_CUDA AND ${CMAKE_CXX_COMPILER} MATCHES ".*clang\\+\\+" )
if( BUILD_CUDA )
   CUDA_ADD_EXECUTABLE( MeshTest MeshTest.cu
                        OPTIONS ${CXX_TESTS_FLAGS} )
   TARGET_LINK_LIBRARIES( MeshTest
@@ -48,27 +48,26 @@ ADD_TEST( MeshEntityTest ${EXECUTABLE_OUTPUT_PATH}/MeshEntityTest${CMAKE_EXECUTA
## Tests with VTK
##

find_package( VTK )
if( VTK_FOUND )
   include(${VTK_USE_FILE})
#find_package( VTK )
#if( VTK_FOUND )
#   include(${VTK_USE_FILE})
#
#   AddCompilerFlag( "-DHAVE_VTK " )
#   SET( VTK_COMMON_LIBRARIES vtkCommonCore ; vtkIOLegacy )
#endif( VTK_FOUND )

   AddCompilerFlag( "-DHAVE_VTK " )
   SET( VTK_COMMON_LIBRARIES vtkCommonCore ; vtkIOLegacy )
endif( VTK_FOUND )

# FIXME: compilation fails with nvcc (CUDA 9.0)
#if( BUILD_CUDA AND ${CMAKE_CXX_COMPILER} MATCHES ".*clang\\+\\+" )
#   CUDA_ADD_EXECUTABLE( MeshReaderTest MeshReaderTest.cu
#                        OPTIONS ${CXX_TESTS_FLAGS} )
#   TARGET_LINK_LIBRARIES( MeshReaderTest
#                           ${GTEST_BOTH_LIBRARIES}
#                           ${VTK_COMMON_LIBRARIES}
#                           tnl )
#else()
if( BUILD_CUDA )
   CUDA_ADD_EXECUTABLE( MeshReaderTest MeshReaderTest.cu
                        OPTIONS ${CXX_TESTS_FLAGS} )
   TARGET_LINK_LIBRARIES( MeshReaderTest
                           ${GTEST_BOTH_LIBRARIES}
                           ${VTK_COMMON_LIBRARIES}
                           tnl )
else()
   ADD_EXECUTABLE( MeshReaderTest MeshReaderTest.cpp )
   TARGET_COMPILE_OPTIONS( MeshReaderTest PRIVATE ${CXX_TESTS_FLAGS} )
   TARGET_LINK_LIBRARIES( MeshReaderTest
                           ${GTEST_BOTH_LIBRARIES}
                           ${VTK_COMMON_LIBRARIES}
                           tnl )
#endif()
endif()