Loading CMakeLists.txt +18 −17 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ if( WITH_CUDA STREQUAL "yes" ) if( WITH_CUBLAS STREQUAL "yes" ) message( "Enabling CUBLAS." ) set( HAVE_CUBLAS TRUE) set( HAVE_CUBLAS "#define HAVE_CUBLAS" ) set( HAVE_CUBLAS "#define HAVE_CUBLAS 1" ) endif( WITH_CUBLAS STREQUAL "yes" ) #### Loading @@ -102,10 +102,10 @@ if( WITH_CUDA STREQUAL "yes" ) DOC "CUSP headers." ) if( ${CUSP_INCLUDE_DIR} STREQUAL "CUSP_INCLUDE_DIR-NOTFOUND" ) message( "CUSP not found." ) set( HAVE_CUSP "//#define HAVE_CUSP" ) set( HAVE_CUSP "//#define HAVE_CUSP 1" ) else() message( "CUSP found. -- ${CUSP_INCLUDE_DIR}" ) set( HAVE_CUSP "#define HAVE_CUSP" ) set( HAVE_CUSP "#define HAVE_CUSP 1" ) cuda_include_directories( ${CUSP_INCLUDE_DIR} ) endif() Loading @@ -120,10 +120,10 @@ if( WITH_CUDA STREQUAL "yes" ) DOC "CUSPARSE headers." ) if( ${CUSPARSE_INCLUDE_DIR} STREQUAL "CUSPARSE_INCLUDE_DIR-NOTFOUND" ) message( "CUSPARSE not found." ) set( HAVE_CUSPARSE "//#define HAVE_CUSPARSE" ) set( HAVE_CUSPARSE "//#define HAVE_CUSPARSE 1" ) else() message( "CUSPARSE found. -- ${CUSPARSE_INCLUDE_DIR}" ) set( HAVE_CUSPARSE "#define HAVE_CUSPARSE" ) set( HAVE_CUSPARSE "#define HAVE_CUSPARSE 1" ) cuda_include_directories( ${CUSPARSE_INCLUDE_DIR} ) set( CUSPARSE_LIBRARY "${CUDA_cusparse_LIBRARY}" ) endif() Loading Loading @@ -157,27 +157,28 @@ endif() find_package( DCMTK ) if( DCMTK_FOUND ) set( HAVE_DCMTK_H "#define HAVE_DCMTK_H" ) set( HAVE_DCMTK_H "#define HAVE_DCMTK_H 1" ) include_directories( ${DCMTK_INCLUDE_DIRS} ) set( HAVE_DCMTK TRUE) else() set( HAVE_DCMTK_H "//#define HAVE_DCMTK_H" ) set( HAVE_DCMTK_H "//#define HAVE_DCMTK_H 1" ) endif() find_package( PNG ) if( PNG_FOUND ) set( HAVE_PNG_H "#define HAVE_PNG_H" ) set( HAVE_PNG_H "#define HAVE_PNG_H 1" ) include_directories( ${PNG_INCLUDE_DIRS} ) else() set( HAVE_PNG_H "//#define HAVE_PNG_H" ) set( HAVE_PNG_H "//#define HAVE_PNG_H 1" ) set( PNG_LIBRARIES "" ) endif() find_package( JPEG ) if( JPEG_FOUND ) set( HAVE_JPEG_H "#define HAVE_JPEG_H" ) set( HAVE_JPEG_H "#define HAVE_JPEG_H 1" ) include_directories( ${JPEG_INCLUDE_DIRS} ) else() set( HAVE_JPEG_H "//#define HAVE_JPEG_H" ) set( HAVE_JPEG_H "//#define HAVE_JPEG_H 1" ) set( JPEG_LIBRARIES "" ) endif() Loading @@ -191,10 +192,10 @@ find_path( SYS_TIME_INCLUDE_DIR sys/time.h DOC "System timer headers." ) if( ${SYS_TIME_INCLUDE_DIR} STREQUAL "SYS_TIME_INCLUDE_DIR-NOTFOUND" ) message( "Missing header file sys/time.h" ) set( HAVE_SYS_TIME_H "//#define HAVE_SYS_TIME_H" ) set( HAVE_SYS_TIME_H "//#define HAVE_SYS_TIME_H 1" ) else() include_directories( ${SYS_TIME_INCLUDE_DIR}/tnl-${tnlVersion} ) set( HAVE_SYS_TIME_H "#define HAVE_SYS_TIME_H" ) set( HAVE_SYS_TIME_H "#define HAVE_SYS_TIME_H 1" ) endif() find_path( SYS_RESOURCE_INCLUDE_DIR sys/resource.h Loading @@ -203,10 +204,10 @@ find_path( SYS_RESOURCE_INCLUDE_DIR sys/resource.h DOC "System resources headers." ) if( ${SYS_RESOURCE_INCLUDE_DIR} STREQUAL "SYS_RESOURCE_INCLUDE_DIR-NOTFOUND" ) message( "Missing header file sys/time.h" ) set( HAVE_SYS_RESOURCE_H "//#define HAVE_SYS_RESOURCE_H" ) set( HAVE_SYS_RESOURCE_H "//#define HAVE_SYS_RESOURCE_H 1" ) else() include_directories( ${SYS_RESOURCE_INCLUDE_DIR}/tnl-${tnlVersion} ) set( HAVE_SYS_RESOURCE_H "#define HAVE_SYS_RESOURCE_H" ) set( HAVE_SYS_RESOURCE_H "#define HAVE_SYS_RESOURCE_H 1" ) endif() #### Loading Loading @@ -246,7 +247,7 @@ if( WITH_TESTS STREQUAL "yes" ) if( ${CPPUNIT_INCLUDE_DIR} STREQUAL "CPPUNIT_INCLUDE_DIR-NOTFOUND" ) message( "CPPUNIT not found." ) set( HAVE_CPPUNIT "//#define HAVE_CPPUNIT" ) set( HAVE_CPPUNIT "//#define HAVE_CPPUNIT 1" ) else( ${CPPUNIT_INCLUDE_DIR} STREQUAL "CPPUNIT_INCLUDE_DIR-NOTFOUND" ) message( "CPPUNIT headers found -- ${CPPUNIT_INCLUDE_DIR}" ) if(CPPUNIT_LIBRARY) Loading @@ -255,7 +256,7 @@ if( WITH_TESTS STREQUAL "yes" ) set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} ${CMAKE_DL_LIBS}) set(CPPUNIT_DEBUG_LIBRARIES ${CPPUNIT_DEBUG_LIBRARY} ${CMAKE_DL_LIBS}) set( HAVE_CPPUNIT "#define HAVE_CPPUNIT" ) set( HAVE_CPPUNIT "#define HAVE_CPPUNIT 1" ) endif(CPPUNIT_LIBRARY) endif( ${CPPUNIT_INCLUDE_DIR} STREQUAL "CPPUNIT_INCLUDE_DIR-NOTFOUND" ) ENABLE_TESTING() Loading build +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ do --cmake-only=* ) CMAKE_ONLY="${option#*=}" ;; --verbose ) VERBOSE="VERBOSE=1" ;; --root-dir=* ) ROOT_DIR="${option#*=}" ;; --dcmtk-dir=* ) DCMTK_DIR="${option#*=}" ;; --help ) HELP="yes" ;; * ) echo "Unknown option ${option}. Use --help for more information." Loading @@ -67,6 +68,7 @@ then echo " --build-jobs=NUM Number of processes to be used for the build. It is set to a number of CPU cores by default." echo " --verbose It enables verbose build." echo " --root-dir=PATH Path to the TNL source code root dir." echo " --dcmtk-dir=PATH Path to the DCMTK (Dicom Toolkit) root dir." echo " --help Write this help." exit 1 fi Loading @@ -81,6 +83,7 @@ ${CMAKE} ${ROOT_DIR} \ -DWITH_CUBLAS=${WITH_CUBLAS} \ -DWITH_TESTS=${WITH_TESTS} \ -DPETSC_DIR=${PETSC_DIR} \ -DDCMTK_DIR=${DCMTK_DIR} \ -DWITH_TEMPLATE_INSTANTIATION=${WITH_TEMPLATE_INSTANTIATION} \ -DINSTANTIATE_FLOAT=${INSTANTIATE_FLOAT} \ -DINSTANTIATE_DOUBLE=${INSTANTIATE_DOUBLE} \ Loading src/CMakeLists.txt +7 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ endif( BUILD_CUDA ) SET_TARGET_PROPERTIES( tnl${debugExt}-${tnlVersion} PROPERTIES SOVERSION 0 VERSION ${tnlVersion} ) TARGET_LINK_LIBRARIES( tnl${debugExt}-${tnlVersion} ${DCMTK_LIBRARIES}) INSTALL( TARGETS tnl${debugExt}-${tnlVersion} DESTINATION lib ) Loading @@ -65,10 +68,12 @@ IF( BUILD_MPI ) SET_TARGET_PROPERTIES( tnl-mpi${debugExt}-${tnlVersion} PROPERTIES SOVERSION 0 VERSION ${tnlVersion} ) # SET_TARGET_PROPERTIES( tnl-mpi${debugExt}-${tnlVersion} # LINK_INTERFACE_LIBRARIES "") TARGET_LINK_LIBRARIES( tnl-mpi${debugExt}-${tnlVersion} ${MPI_LIBRARIES} ) INSTALL( TARGETS tnl-mpi${debugExt}-${tnlVersion} DESTINATION lib ) ENDIF() Loading src/core/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ IF( BUILD_CUDA ) ${tnl_core_containers_CUDA__SOURCES} ${tnl_core_cuda_CUDA__SOURCES} ${tnl_core_vectors_CUDA__SOURCES} ${tnl_core_images_CUDA__SOURCES} ${common_SOURCES} ${CURRENT_DIR}/tnlCuda.cu ${CURRENT_DIR}/tnlCudaDeviceInfo.cu Loading @@ -67,6 +68,7 @@ set( tnl_core_SOURCES ${tnl_core_containers_SOURCES} ${tnl_core_cuda_SOURCES} ${tnl_core_vectors_SOURCES} ${tnl_core_images_SOURCES} ${common_SOURCES} ${CURRENT_DIR}/tnlCudaDeviceInfo.cpp PARENT_SCOPE ) Loading src/core/io/CMakeLists.txt +26 −4 Original line number Diff line number Diff line set( headers ) set( headers DicomHeader.h ImageInfoObj.h SeriesInfoObj.h tnlJPEGImage.h tnlPGMImage.h tnlPNGImage.h tnlRegionOfInterest.h DicomSeries.h PatientInfoObj.h tnlImage.h tnlJPEGImage_impl.h tnlPGMImage_impl.h tnlPNGImage_impl.h tnlRegionOfInterest_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/core/io ) #### # DCMTK currently does not support shared libraries. When it does _impl.h files # could be replaced with .cpp and DCMTK might be link with TNL. # if( HAVE_DCMTK ) set( common_SOURCES ) else() set( common_SOURCES ) endif() IF( BUILD_CUDA ) set( tnl_core_io_CUDA__SOURCES set( tnl_core_images_CUDA__SOURCES ${common_SOURCES} PARENT_SCOPE ) ELSE() set( tnl_core_io_SOURCES set( tnl_core_images_SOURCES ${common_SOURCES} PARENT_SCOPE ) ENDIF() Loading Loading
CMakeLists.txt +18 −17 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ if( WITH_CUDA STREQUAL "yes" ) if( WITH_CUBLAS STREQUAL "yes" ) message( "Enabling CUBLAS." ) set( HAVE_CUBLAS TRUE) set( HAVE_CUBLAS "#define HAVE_CUBLAS" ) set( HAVE_CUBLAS "#define HAVE_CUBLAS 1" ) endif( WITH_CUBLAS STREQUAL "yes" ) #### Loading @@ -102,10 +102,10 @@ if( WITH_CUDA STREQUAL "yes" ) DOC "CUSP headers." ) if( ${CUSP_INCLUDE_DIR} STREQUAL "CUSP_INCLUDE_DIR-NOTFOUND" ) message( "CUSP not found." ) set( HAVE_CUSP "//#define HAVE_CUSP" ) set( HAVE_CUSP "//#define HAVE_CUSP 1" ) else() message( "CUSP found. -- ${CUSP_INCLUDE_DIR}" ) set( HAVE_CUSP "#define HAVE_CUSP" ) set( HAVE_CUSP "#define HAVE_CUSP 1" ) cuda_include_directories( ${CUSP_INCLUDE_DIR} ) endif() Loading @@ -120,10 +120,10 @@ if( WITH_CUDA STREQUAL "yes" ) DOC "CUSPARSE headers." ) if( ${CUSPARSE_INCLUDE_DIR} STREQUAL "CUSPARSE_INCLUDE_DIR-NOTFOUND" ) message( "CUSPARSE not found." ) set( HAVE_CUSPARSE "//#define HAVE_CUSPARSE" ) set( HAVE_CUSPARSE "//#define HAVE_CUSPARSE 1" ) else() message( "CUSPARSE found. -- ${CUSPARSE_INCLUDE_DIR}" ) set( HAVE_CUSPARSE "#define HAVE_CUSPARSE" ) set( HAVE_CUSPARSE "#define HAVE_CUSPARSE 1" ) cuda_include_directories( ${CUSPARSE_INCLUDE_DIR} ) set( CUSPARSE_LIBRARY "${CUDA_cusparse_LIBRARY}" ) endif() Loading Loading @@ -157,27 +157,28 @@ endif() find_package( DCMTK ) if( DCMTK_FOUND ) set( HAVE_DCMTK_H "#define HAVE_DCMTK_H" ) set( HAVE_DCMTK_H "#define HAVE_DCMTK_H 1" ) include_directories( ${DCMTK_INCLUDE_DIRS} ) set( HAVE_DCMTK TRUE) else() set( HAVE_DCMTK_H "//#define HAVE_DCMTK_H" ) set( HAVE_DCMTK_H "//#define HAVE_DCMTK_H 1" ) endif() find_package( PNG ) if( PNG_FOUND ) set( HAVE_PNG_H "#define HAVE_PNG_H" ) set( HAVE_PNG_H "#define HAVE_PNG_H 1" ) include_directories( ${PNG_INCLUDE_DIRS} ) else() set( HAVE_PNG_H "//#define HAVE_PNG_H" ) set( HAVE_PNG_H "//#define HAVE_PNG_H 1" ) set( PNG_LIBRARIES "" ) endif() find_package( JPEG ) if( JPEG_FOUND ) set( HAVE_JPEG_H "#define HAVE_JPEG_H" ) set( HAVE_JPEG_H "#define HAVE_JPEG_H 1" ) include_directories( ${JPEG_INCLUDE_DIRS} ) else() set( HAVE_JPEG_H "//#define HAVE_JPEG_H" ) set( HAVE_JPEG_H "//#define HAVE_JPEG_H 1" ) set( JPEG_LIBRARIES "" ) endif() Loading @@ -191,10 +192,10 @@ find_path( SYS_TIME_INCLUDE_DIR sys/time.h DOC "System timer headers." ) if( ${SYS_TIME_INCLUDE_DIR} STREQUAL "SYS_TIME_INCLUDE_DIR-NOTFOUND" ) message( "Missing header file sys/time.h" ) set( HAVE_SYS_TIME_H "//#define HAVE_SYS_TIME_H" ) set( HAVE_SYS_TIME_H "//#define HAVE_SYS_TIME_H 1" ) else() include_directories( ${SYS_TIME_INCLUDE_DIR}/tnl-${tnlVersion} ) set( HAVE_SYS_TIME_H "#define HAVE_SYS_TIME_H" ) set( HAVE_SYS_TIME_H "#define HAVE_SYS_TIME_H 1" ) endif() find_path( SYS_RESOURCE_INCLUDE_DIR sys/resource.h Loading @@ -203,10 +204,10 @@ find_path( SYS_RESOURCE_INCLUDE_DIR sys/resource.h DOC "System resources headers." ) if( ${SYS_RESOURCE_INCLUDE_DIR} STREQUAL "SYS_RESOURCE_INCLUDE_DIR-NOTFOUND" ) message( "Missing header file sys/time.h" ) set( HAVE_SYS_RESOURCE_H "//#define HAVE_SYS_RESOURCE_H" ) set( HAVE_SYS_RESOURCE_H "//#define HAVE_SYS_RESOURCE_H 1" ) else() include_directories( ${SYS_RESOURCE_INCLUDE_DIR}/tnl-${tnlVersion} ) set( HAVE_SYS_RESOURCE_H "#define HAVE_SYS_RESOURCE_H" ) set( HAVE_SYS_RESOURCE_H "#define HAVE_SYS_RESOURCE_H 1" ) endif() #### Loading Loading @@ -246,7 +247,7 @@ if( WITH_TESTS STREQUAL "yes" ) if( ${CPPUNIT_INCLUDE_DIR} STREQUAL "CPPUNIT_INCLUDE_DIR-NOTFOUND" ) message( "CPPUNIT not found." ) set( HAVE_CPPUNIT "//#define HAVE_CPPUNIT" ) set( HAVE_CPPUNIT "//#define HAVE_CPPUNIT 1" ) else( ${CPPUNIT_INCLUDE_DIR} STREQUAL "CPPUNIT_INCLUDE_DIR-NOTFOUND" ) message( "CPPUNIT headers found -- ${CPPUNIT_INCLUDE_DIR}" ) if(CPPUNIT_LIBRARY) Loading @@ -255,7 +256,7 @@ if( WITH_TESTS STREQUAL "yes" ) set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} ${CMAKE_DL_LIBS}) set(CPPUNIT_DEBUG_LIBRARIES ${CPPUNIT_DEBUG_LIBRARY} ${CMAKE_DL_LIBS}) set( HAVE_CPPUNIT "#define HAVE_CPPUNIT" ) set( HAVE_CPPUNIT "#define HAVE_CPPUNIT 1" ) endif(CPPUNIT_LIBRARY) endif( ${CPPUNIT_INCLUDE_DIR} STREQUAL "CPPUNIT_INCLUDE_DIR-NOTFOUND" ) ENABLE_TESTING() Loading
build +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ do --cmake-only=* ) CMAKE_ONLY="${option#*=}" ;; --verbose ) VERBOSE="VERBOSE=1" ;; --root-dir=* ) ROOT_DIR="${option#*=}" ;; --dcmtk-dir=* ) DCMTK_DIR="${option#*=}" ;; --help ) HELP="yes" ;; * ) echo "Unknown option ${option}. Use --help for more information." Loading @@ -67,6 +68,7 @@ then echo " --build-jobs=NUM Number of processes to be used for the build. It is set to a number of CPU cores by default." echo " --verbose It enables verbose build." echo " --root-dir=PATH Path to the TNL source code root dir." echo " --dcmtk-dir=PATH Path to the DCMTK (Dicom Toolkit) root dir." echo " --help Write this help." exit 1 fi Loading @@ -81,6 +83,7 @@ ${CMAKE} ${ROOT_DIR} \ -DWITH_CUBLAS=${WITH_CUBLAS} \ -DWITH_TESTS=${WITH_TESTS} \ -DPETSC_DIR=${PETSC_DIR} \ -DDCMTK_DIR=${DCMTK_DIR} \ -DWITH_TEMPLATE_INSTANTIATION=${WITH_TEMPLATE_INSTANTIATION} \ -DINSTANTIATE_FLOAT=${INSTANTIATE_FLOAT} \ -DINSTANTIATE_DOUBLE=${INSTANTIATE_DOUBLE} \ Loading
src/CMakeLists.txt +7 −2 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ endif( BUILD_CUDA ) SET_TARGET_PROPERTIES( tnl${debugExt}-${tnlVersion} PROPERTIES SOVERSION 0 VERSION ${tnlVersion} ) TARGET_LINK_LIBRARIES( tnl${debugExt}-${tnlVersion} ${DCMTK_LIBRARIES}) INSTALL( TARGETS tnl${debugExt}-${tnlVersion} DESTINATION lib ) Loading @@ -65,10 +68,12 @@ IF( BUILD_MPI ) SET_TARGET_PROPERTIES( tnl-mpi${debugExt}-${tnlVersion} PROPERTIES SOVERSION 0 VERSION ${tnlVersion} ) # SET_TARGET_PROPERTIES( tnl-mpi${debugExt}-${tnlVersion} # LINK_INTERFACE_LIBRARIES "") TARGET_LINK_LIBRARIES( tnl-mpi${debugExt}-${tnlVersion} ${MPI_LIBRARIES} ) INSTALL( TARGETS tnl-mpi${debugExt}-${tnlVersion} DESTINATION lib ) ENDIF() Loading
src/core/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ IF( BUILD_CUDA ) ${tnl_core_containers_CUDA__SOURCES} ${tnl_core_cuda_CUDA__SOURCES} ${tnl_core_vectors_CUDA__SOURCES} ${tnl_core_images_CUDA__SOURCES} ${common_SOURCES} ${CURRENT_DIR}/tnlCuda.cu ${CURRENT_DIR}/tnlCudaDeviceInfo.cu Loading @@ -67,6 +68,7 @@ set( tnl_core_SOURCES ${tnl_core_containers_SOURCES} ${tnl_core_cuda_SOURCES} ${tnl_core_vectors_SOURCES} ${tnl_core_images_SOURCES} ${common_SOURCES} ${CURRENT_DIR}/tnlCudaDeviceInfo.cpp PARENT_SCOPE ) Loading
src/core/io/CMakeLists.txt +26 −4 Original line number Diff line number Diff line set( headers ) set( headers DicomHeader.h ImageInfoObj.h SeriesInfoObj.h tnlJPEGImage.h tnlPGMImage.h tnlPNGImage.h tnlRegionOfInterest.h DicomSeries.h PatientInfoObj.h tnlImage.h tnlJPEGImage_impl.h tnlPGMImage_impl.h tnlPNGImage_impl.h tnlRegionOfInterest_impl.h ) SET( CURRENT_DIR ${CMAKE_SOURCE_DIR}/src/core/io ) #### # DCMTK currently does not support shared libraries. When it does _impl.h files # could be replaced with .cpp and DCMTK might be link with TNL. # if( HAVE_DCMTK ) set( common_SOURCES ) else() set( common_SOURCES ) endif() IF( BUILD_CUDA ) set( tnl_core_io_CUDA__SOURCES set( tnl_core_images_CUDA__SOURCES ${common_SOURCES} PARENT_SCOPE ) ELSE() set( tnl_core_io_SOURCES set( tnl_core_images_SOURCES ${common_SOURCES} PARENT_SCOPE ) ENDIF() Loading