diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f1a9ff..c412be1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,323 +1,323 @@ #----------------------------------------------------------------------------- # This is the root RTToolbox CMakeList file. #----------------------------------------------------------------------------- PROJECT(RTToolbox) CMAKE_MINIMUM_REQUIRED(VERSION 3.1) # RTToolbox version number. SET(RTToolbox_VERSION_MAJOR "5") SET(RTToolbox_VERSION_MINOR "1") SET(RTToolbox_VERSION_PATCH "0") # Version string should not include patch level. The major.minor is # enough to distinguish available features of the toolbox. SET(RTToolbox_VERSION_STRING "${RTToolbox_VERSION_MAJOR}.${RTToolbox_VERSION_MINOR}") SET(RTToolbox_FULL_VERSION_STRING "${RTToolbox_VERSION_MAJOR}.${RTToolbox_VERSION_MINOR}.${RTToolbox_VERSION_PATCH}") # default build type SET(CMAKE_BUILD_TYPE Release) MARK_AS_ADVANCED(BUILD_SHARED_LIBS) IF (WIN32) IF (MSVC_VERSION LESS 1800) MESSAGE(FATAL_ERROR "RTToolbox requires at least Visual Studio 2013.") ENDIF() add_definitions(-D_SCL_SECURE_NO_WARNINGS) ELSE (WIN32) IF (CMAKE_COMPILER_IS_GNUCC) IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0) MESSAGE(AUTHOR_WARNING "RTToolbox requires at leas GCC 4.8. GCC 5.x and 6.x were not tested. You are using GCC " ${CMAKE_CXX_COMPILER_VERSION} ". This compiler version might not work.") ENDIF() ENDIF() ENDIF(WIN32) IF(COMMAND CMAKE_POLICY) # Enable old CMake behaviour when dealing with export_library_dependencies(). # This is necessary to avoid warnings in CMake versions # greater than 3.0 # See http://www.cmake.org/cmake/help/v3.0/policy/CMP0033.html CMAKE_POLICY(SET CMP0033 OLD) IF(POLICY CMP0062) CMAKE_POLICY(SET CMP0062 OLD) ENDIF() ENDIF(COMMAND CMAKE_POLICY) #----------------------------------------------------------------------------- # CMake Function(s) and Macro(s) #----------------------------------------------------------------------------- include(cmake/MacroParseArguments.cmake) include(cmake/rttbMacroCreateModuleConf.cmake) include(cmake/rttbMacroCreateModule.cmake) include(cmake/rttbMacroCreateApplication.cmake) include(cmake/rttbMacroCheckModule.cmake) include(cmake/rttbMacroUseModule.cmake) include(cmake/rttbMacroCreateTestModule.cmake) include(cmake/rttbFunctionOrganizeSources.cmake) include(cmake/rttbMacroCreateApplicationTests.cmake) #----------------------------------------------------------------------------- # Basis config RTTB module infrastructure #----------------------------------------------------------------------------- set(RTTB_MODULES_CONF_DIR ${RTToolbox_BINARY_DIR}/modulesConf CACHE INTERNAL "Modules Conf") set(RTTB_MODULES_PACKAGE_DEPENDS_DIR ${RTToolbox_SOURCE_DIR}/cmake/PackageDepends) set(MODULES_PACKAGE_DEPENDS_DIRS ${RTTB_MODULES_PACKAGE_DEPENDS_DIR}) #----------------------------------------------------------------------------- # Testing setup # Configure Dart testing support. This should be done before any # MESSAGE(FATAL_ERROR ...) commands are invoked. #----------------------------------------------------------------------------- #build no tests as default OPTION(BUILD_TESTING "build tests" OFF) IF(BUILD_TESTING) SET(CTEST_NEW_FORMAT 1) INCLUDE(CTest) ENABLE_TESTING() CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/cmake/RemoveTemporaryFiles.cmake.in ${RTToolbox_BINARY_DIR}/cmake/RemoveTemporaryFiles.cmake @ONLY IMMEDIATE) CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/cmake/rttbSampleBuildTest.cmake.in ${RTToolbox_BINARY_DIR}/cmake/rttbSampleBuildTest.cmake @ONLY) CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/cmake/CTestCustom.ctest.in ${RTToolbox_BINARY_DIR}/cmake/CTestCustom.ctest @ONLY) FILE(WRITE ${RTToolbox_BINARY_DIR}/CTestCustom.cmake "INCLUDE(\"${RTToolbox_BINARY_DIR}/cmake/CTestCustom.ctest\")\n") SET(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard") MARK_AS_ADVANCED(BUILDNAME) ENDIF(BUILD_TESTING) #----------------------------------------------------------------------------- # Output directories. #----------------------------------------------------------------------------- IF(NOT LIBRARY_OUTPUT_PATH) SET (LIBRARY_OUTPUT_PATH ${RTToolbox_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries.") ENDIF(NOT LIBRARY_OUTPUT_PATH) IF(NOT EXECUTABLE_OUTPUT_PATH) SET (EXECUTABLE_OUTPUT_PATH ${RTToolbox_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables.") ENDIF(NOT EXECUTABLE_OUTPUT_PATH) MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH) MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) SET(RTToolbox_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}") SET(RTToolbox_EXECUTABLE_PATH "${EXECUTABLE_OUTPUT_PATH}") #----------------------------------------------------------------------------- # Find Doxygen. #----------------------------------------------------------------------------- FIND_PROGRAM(DOXYGEN_EXECUTABLE "doxygen") #----------------------------------------------------------------------------- # Installation vars. # RTToolbox_INSTALL_BIN_DIR - binary dir (executables) # RTToolbox_INSTALL_LIB_DIR - library dir (libs) # RTToolbox_INSTALL_INCLUDE_DIR - include dir (headers) # RTToolbox_INSTALL_NO_DEVELOPMENT - do not install development files # RTToolbox_INSTALL_NO_RUNTIME - do not install runtime files # RTToolbox_INSTALL_NO_DOCUMENTATION - do not install documentation files #----------------------------------------------------------------------------- IF(NOT RTTOOLBOX_INSTALL_BIN_DIR) SET(RTTOOLBOX_INSTALL_BIN_DIR "bin") ENDIF(NOT RTTOOLBOX_INSTALL_BIN_DIR) IF(NOT RTTOOLBOX_INSTALL_LIB_DIR) SET(RTTOOLBOX_INSTALL_LIB_DIR "lib") ENDIF(NOT RTTOOLBOX_INSTALL_LIB_DIR) IF(NOT RTTOOLBOX_INSTALL_PACKAGE_DIR) SET(RTTOOLBOX_INSTALL_PACKAGE_DIR "lib") ENDIF(NOT RTTOOLBOX_INSTALL_PACKAGE_DIR) IF(NOT RTTOOLBOX_INSTALL_INCLUDE_DIR) SET(RTTOOLBOX_INSTALL_INCLUDE_DIR "include") ENDIF(NOT RTTOOLBOX_INSTALL_INCLUDE_DIR) IF(NOT RTTOOLBOX_INSTALL_NO_DEVELOPMENT) SET(RTTOOLBOX_INSTALL_NO_DEVELOPMENT 0) ENDIF(NOT RTTOOLBOX_INSTALL_NO_DEVELOPMENT) IF(NOT RTTOOLBOX_INSTALL_NO_RUNTIME) SET(RTTOOLBOX_INSTALL_NO_RUNTIME 0) ENDIF(NOT RTTOOLBOX_INSTALL_NO_RUNTIME) IF(NOT RTTOOLBOX_INSTALL_NO_DOCUMENTATION) SET(RTTOOLBOX_INSTALL_NO_DOCUMENTATION 0) ENDIF(NOT RTTOOLBOX_INSTALL_NO_DOCUMENTATION) SET(RTTOOLBOX_INSTALL_NO_LIBRARIES) IF(RTTOOLBOX_BUILD_SHARED_LIBS) IF(RTTOOLBOX_INSTALL_NO_RUNTIME AND RTTOOLBOX_INSTALL_NO_DEVELOPMENT) SET(RTTOOLBOX_INSTALL_NO_LIBRARIES 1) ENDIF(RTTOOLBOX_INSTALL_NO_RUNTIME AND RTTOOLBOX_INSTALL_NO_DEVELOPMENT) ELSE(RTTOOLBOX_BUILD_SHARED_LIBS) IF(RTTOOLBOX_INSTALL_NO_DEVELOPMENT) SET(RTTOOLBOX_INSTALL_NO_LIBRARIES 1) ENDIF(RTTOOLBOX_INSTALL_NO_DEVELOPMENT) ENDIF(RTTOOLBOX_BUILD_SHARED_LIBS) # set RTToolbox_DIR so it can be used by subprojects SET(RTToolbox_DIR "${CMAKE_BINARY_DIR}" CACHE INTERNAL "RTToolbox dir to be used by subprojects") #----------------------------------------------------------------------------- # DCMTK MT-Flag treat #----------------------------------------------------------------------------- option(RTTB_DCMTK_COMPLIANCE_ENFORCE_MT "This enforces the whole RTToolbox to be compiled with /MT,/MTd to be compliant with DCMTK" OFF) string(FIND ${CMAKE_GENERATOR} "Visual Studio" RTTB_VS_USED) if(RTTB_DCMTK_COMPLIANCE_ENFORCE_MT AND RTTB_VS_USED EQUAL 0) message(STATUS "Enforce DCMTK compliance: /MT and /MTd flags are used") string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) message(STATUS "CMAKE_C_FLAGS_DEBUG set to: ${CMAKE_C_FLAGS_DEBUG}") string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) message(STATUS "CMAKE_C_FLAGS_RELEASE set to: ${CMAKE_C_FLAGS_RELEASE}") string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL}) message(STATUS "CMAKE_C_FLAGS_MINSIZEREL set to: ${CMAKE_C_FLAGS_MINSIZEREL}") string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO}) message(STATUS "CMAKE_C_FLAGS_RELWITHDEBINFO set to: ${CMAKE_C_FLAGS_RELWITHDEBINFO}") string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) message(STATUS "CMAKE_CXX_FLAGS_DEBUG set to: ${CMAKE_CXX_FLAGS_DEBUG}") string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) message(STATUS "CMAKE_CXX_FLAGS_RELEASE set to: ${CMAKE_CXX_FLAGS_RELEASE}") string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_MINSIZEREL}) message(STATUS "CMAKE_CXX_FLAGS_MINSIZEREL set to: ${CMAKE_CXX_FLAGS_MINSIZEREL}") string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}) message(STATUS "CMAKE_CXX_FLAGS_RELWITHDEBINFO set to: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") endif() #----------------------------------------------------------------------------- # Advanced RTToolbox configuration #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # RTToolbox build configuration options. IF (NOT RTTB_CXX_STANDARD) set(RTTB_CXX_STANDARD 11) ENDIF (NOT RTTB_CXX_STANDARD) set(CMAKE_CXX_STANDARD ${RTTB_CXX_STANDARD} CACHE STRING "") set(CMAKE_CXX_STANDARD_REQUIRED 1) OPTION(CMAKE_CXX_EXTENSIONS "" ON) MARK_AS_ADVANCED(CMAKE_CXX_STANDARD CMAKE_CXX_STANDARD_REQUIRED CMAKE_CXX_EXTENSIONS) IF (WIN32) OPTION(BUILD_SHARED_LIBS "Build RTToolbox with shared libraries." OFF) ELSE (WIN32) OPTION(BUILD_SHARED_LIBS "Build RTToolbox with shared libraries." ON) ENDIF (WIN32) IF(NOT BUILD_SHARED_LIBS) IF(UNIX) MESSAGE(FATAL_ERROR "RTToolbox currently does not support a static build on unix like systems. We are working on that...") ENDIF(UNIX) ENDIF(NOT BUILD_SHARED_LIBS) SET(RTTB_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) #Raise warning level (MSVC has W3 default warning level) IF (WIN32) IF(NOT BUILD_SHARED_LIBS) set(CMAKE_CXX_FLAGS "/W4 /EHsc") ENDIF() ELSE() IF (CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_CXX_FLAGS "-W4") + set(CMAKE_CXX_FLAGS "-Wall") ENDIF() ENDIF() IF(NOT RTToolbox_NO_LIBRARY_VERSION) # This setting of SOVERSION assumes that any API change # will increment either the minor or major version number of RTToolbox. SET(RTToolbox_LIBRARY_PROPERTIES VERSION "${RTToolbox_VERSION_MAJOR}.${RTToolbox_VERSION_MINOR}.${RTToolbox_VERSION_PATCH}" SOVERSION "${RTToolbox_VERSION_MAJOR}.${RTToolbox_VERSION_MINOR}" ) ENDIF(NOT RTToolbox_NO_LIBRARY_VERSION) #----------------------------------------------------------------------------- # Configure files with settings for use by the build. # #----------------------------------------------------------------------------- CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/RTToolboxConfigure.h.in ${RTToolbox_BINARY_DIR}/RTToolboxConfigure.h) IF(NOT RTTOOLBOX_INSTALL_NO_DEVELOPMENT) INSTALL(FILES ${RTToolbox_BINARY_DIR}/RTToolboxConfigure.h DESTINATION ${RTTOOLBOX_INSTALL_INCLUDE_DIR} COMPONENT Development) ENDIF(NOT RTTOOLBOX_INSTALL_NO_DEVELOPMENT) #----------------------------------------------------------------------------- # The entire RTToolbox tree should use the same include path #----------------------------------------------------------------------------- #Default include dir. Others dirs will be defined by activated subprojects INCLUDE_DIRECTORIES(${RTToolbox_BINARY_DIR}) LINK_DIRECTORIES(${LIBARY_OUTPUT_PATH}) #Prepare the correct target information export by the subprojects SET(RTToolbox_TARGETS_FILE "${RTToolbox_BINARY_DIR}/RTToolboxTargets.cmake") FILE(WRITE ${RTToolbox_TARGETS_FILE} "# Generated by CMake, do not edit!") #----------------------------------------------------------------------------- # Dispatch the build into the proper subdirectories. #----------------------------------------------------------------------------- OPTION(BUILD_All_Modules "All modules will be built" OFF) OPTION(BUILD_Apps "Determine if the CLI applications will be generated." OFF) MESSAGE (STATUS "generating Project RTToolbox") ADD_SUBDIRECTORY (code) IF (BUILD_Apps) ADD_SUBDIRECTORY (apps) ENDIF() IF (BUILD_TESTING) ADD_SUBDIRECTORY (testing) ENDIF (BUILD_TESTING) ADD_SUBDIRECTORY (documentation) #----------------------------------------------------------------------------- # Help other projects use RTToolbox. #----------------------------------------------------------------------------- EXPORT(PACKAGE RTToolbox) # Copy the UseRTToolbox.cmake file to the binary tree for backward compatability. CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/UseRTToolbox.cmake.in ${RTToolbox_BINARY_DIR}/UseRTToolbox.cmake COPYONLY IMMEDIATE) # Save library dependencies. EXPORT_LIBRARY_DEPENDENCIES(${RTToolbox_BINARY_DIR}/RTToolboxLibraryDepends.cmake) # Create the RTToolboxConfig.cmake file containing the RTToolbox configuration. INCLUDE (${RTToolbox_SOURCE_DIR}/rttbGenerateRTToolboxConfig.cmake) IF(NOT RTToolbox_INSTALL_NO_DEVELOPMENT) INSTALL(FILES ${RTToolbox_BINARY_DIR}/RTToolboxConfig.cmake ${RTToolbox_BINARY_DIR}/RTToolboxTargets.cmake ${RTToolbox_BINARY_DIR}/RTToolboxLibraryDepends.cmake ${RTToolbox_BINARY_DIR}/UseRTToolbox.cmake DESTINATION ${RTTOOLBOX_INSTALL_PACKAGE_DIR} COMPONENT Development ) ENDIF(NOT RTToolbox_INSTALL_NO_DEVELOPMENT) diff --git a/documentation/RTToolbox_build.txt b/documentation/RTToolbox_build.txt index 071fd6b..6ff1b02 100644 --- a/documentation/RTToolbox_build.txt +++ b/documentation/RTToolbox_build.txt @@ -1,204 +1,206 @@ /** \page Build Build instructions \tableofcontents \section tests Compiler tests RTToolbox is currently tested with the following compilers (only x64): - Visual Studio 2013 - Visual Studio 2015 - GCC 4.9 Other compiler versions or other compilers may or may not work. \note The apps can't be compiled with Visual Studio 2010. \section linking Static/Dynamic library support Can be changed with advanced option \c BUILD_SHARED_LIBS \warning building RTToolbox as dynamic library under windows and as static library under Linux is an experimental feature. \section thirdPartyLibraries Needed Third Party Libraries Please load and compile the following third party libraries/tools: \subsection required Required - CMake (version 3.1 or higher) - boost (version 1.58.0 or higher) \subsection optional Optional - DCMTK (with RT support - 3.6.1_20121102 or newer) - if you want DICOM support - ITK (version 4.4 or higher) - if you want DoseInterpolation support with \c itk::Transform or ITK File IO support - MatchPoint (version 0.12 or higher) - if you want DoseInterpolation support with MatchPoint Registration objects) - doxygen - if you want to generate a source code documentation \subsection installing Third party installation Instruction \note To make sure everything runs smoothly, please make sure that all libraries and the RTToolbox are either compiled with \c /MD or \c /MT flags. If third party library packages cannot be found automatically, CMake will ask for them. Please give the location of the binary folder, where the libraries where built for boost, DCMTK, ITK and MatchPoint. \subsubsection boost Boost Build (using the same compiler options as RTToolbox, usually \c STATIC LINKING and x64 architecture). The following components are needed: - \c filesystem, -- \c regex, - \c system, -- \c thread, -- \c regex and +- \c thread and - \c program_options. \subsubsection DCMTK DCMTK For Windows: To compile DCMTK with \c /MD flags (standard for all other libs), you need to patch the CMAKE options of DCMTK (PathToDCMTK\CMake\dcmtkPrepare.cmake), either by replacing \c "/MT" with \c "/MD" or by explicitly replacing lines 135 to 171 with the following lines: \code{.cmake} IF(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS AND NOT BUILD_SHARED_LIBS) # settings for Microsoft Visual Studio IF(CMAKE_GENERATOR MATCHES "Visual Studio .*") # get Visual Studio Version STRING(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" VS_VERSION "${CMAKE_GENERATOR}") # these settings never change even for C or C++ SET(CMAKE_C_FLAGS_DEBUG "/MDd /Z7 /Od") SET(CMAKE_C_FLAGS_RELEASE "/DNDEBUG /MD /O2") SET(CMAKE_C_FLAGS_MINSIZEREL "/DNDEBUG /MD /O2") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/DNDEBUG /MDd /Z7 /Od") SET(CMAKE_CXX_FLAGS_DEBUG "/MDd /Z7 /Od") SET(CMAKE_CXX_FLAGS_RELEASE "/DNDEBUG /MD /O2") SET(CMAKE_CXX_FLAGS_MINSIZEREL "/DNDEBUG /MD /O2") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/DNDEBUG /MDd /Z7 /Od") # specific settings for the various Visual Studio versions IF(VS_VERSION EQUAL 6) SET(CMAKE_C_FLAGS "/nologo /W3 /GX /Gy /YX") SET(CMAKE_CXX_FLAGS "/nologo /W3 /GX /Gy /YX /Zm500") # /Zm500 increments heap size which is needed on some system to compile templates in dcmimgle ENDIF(VS_VERSION EQUAL 6) IF(VS_VERSION EQUAL 7) SET(CMAKE_C_FLAGS "/nologo /W3 /Gy") SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy") ENDIF(VS_VERSION EQUAL 7) IF(VS_VERSION GREATER 7) SET(CMAKE_C_FLAGS "/nologo /W3 /Gy /EHsc") SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy /EHsc") ENDIF(VS_VERSION GREATER 7) ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio .*") ENDIF(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS AND NOT BUILD_SHARED_LIBS) \endcode Then build DCMTK. \c BUILD_APPS can be switched off. \subsubsection ITK ITK -Build ITK. The default configuration is fine. +Ensure that CMAKE_CXX_STANDARD=11. +Build ITK. \warning Only use one ITK version consistently throughout all libraries and RTToolbox! Otherwise, linker errors will occur. +\warning ensure that compiler enables C++11 features \subsubsection MatchPoint MatchPoint -Build MatchPoint. The default configuration is fine. +Ensure that CMAKE_CXX_STANDARD=11. +Build MatchPoint. \warning Only use one ITK version consistently throughout all libraries and RTToolbox! Otherwise, linker errors will occur. +\warning ensure that compiler enables C++11 features \section installation RT-Toolbox installation Instruction \subsection build Configure/Build RTToolbox \subsubsection Modules Modules - Configure with CMake - Set \c BOOST_INCLUDE_DIR and \c BOOST_DIR to the main boost directory (where "boost_build.jam" is located) - Select all packages you like to build (Parameters \c "BUILD_*" ; e.g. \c BUILD_IO_Dicom). - \c BUILD_IO_Dicom: Reading and writing of DICOM-RT files - \c BUILD_IO_HELAX: Reading of Helax DICOM files - \c BUILD_IO_ITK: Generic reading/writing with ITK - \c BUILD_Interpolation: Dose Interpolation - \c BUILD_InterpolationMatchPointTransformation: Dose Interpolation with Match Point registration support. - \c BUILD_Masks: Voxelization support - \c BUILD_Masks_Legacy: Legacy voxelization support. - \c BUILD_Models: Calculation of dosimetrical models like TCP, NTCP etc. Some modules of RT-Toolbox are mandatory (e.g. \c RTTBCore) and build automatically. \warning The \c BUILD_Masks_Legacy module is not supported anymore and may yield to wrong results. \note \c BUILD_All_Modules builds all modules (except Apps, Testing modules and Masks_Legacy). \subsubsection Apps Apps If you want to use the RTTB command line apps, select \c BUILD_Apps. You can select out of five apps: - \c BioModelCalc: calculate the radiobiological effect based on dose - \c DoseAcc: Do dose accumulation - \c DoseMap: Do dose mapping - \c DoseTool: Compute Dose statistics and DVH - \c VoxelizerTool: Voxelize an RTSTRUCT file \note The apps can't be compiled with Visual Studio 2010. - Generate CMake configuration - Build RTToolbox and have fun! \subsubsection optionalDependencies Optional third party dependencies - If you select \c BUILD_IO_DICOM, the configuration will ask you for the DCMTK main directory (parameter \c DCMTK_DIR; where you have built DCMTK). - If you select \c BUILD_Interpolation or \c BUILD_IO_ITK, set \c ITK_DIR to the binary directory of ITK. - If you select \c BUILD_InterpolationMatchPointTransformation, set \c MatchPoint_DIR to the binary directory of MatchPoint. \note If you have built DCMTK as out source build you have to also set the CMake parameter \c DCMTK_SOURCE_DIR to the root directory of the DCMTK source. \subsection testRTTB Testing RTToolbox CTest is used as testing framework. See their documentation for general testing questions. - Enable \c BUILD_TESTING - Configure with CMake - Enable tests of interest - Generate CMake configuration - Run tests (build \c RUN_TESTS project or call \c ctest in commandline) to ensure that everything is correct. \note \c BUILD_Tester_All builds all test modules. \subsection documentation Documentation Generate the documentation using doxygen and the configuration found in "RTTB_binary_dir/documentation/doxygen.config". \subsection examples Examples - Enable \c BUILD_TESTING - Enable \c BUILD_RTToolbox_Test_examples - Run tests (build \c RUN_TESTS project or call \c ctest in commandline) to also run the examples. These examples (located in testing/examples/) are a good starting point for own projects and show basic functionality of RTToolbox like DVH generation. -**/ \ No newline at end of file +**/ diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt index ee66e97..ae08331 100644 --- a/testing/CMakeLists.txt +++ b/testing/CMakeLists.txt @@ -1,106 +1,107 @@ MESSAGE(STATUS "processing RTToolbox testing code") # Testing branch PROJECT(RTTBTesting) #----------------------------------------------------------------------------- # extract and build Litmus #----------------------------------------------------------------------------- include(ExternalProject) message(STATUS "Litmus will be automatically downloaded and built.") set(LITMUS_SOURCE_DIR "${CMAKE_BINARY_DIR}/external/Litmus-src") set(LITMUS_BUILD_DIR "${CMAKE_BINARY_DIR}/external/Litmus-build") set(LITMUS_CMAKE_DIR "${CMAKE_BINARY_DIR}/external/Litmus-cmake") IF ((BUILD_Tester_Interpolation AND BUILD_InterpolationMatchPointTransformation) OR (BUILD_Tester_IO AND BUILD_IO_ITK) OR (BUILD_Tester_Apps AND BUILD_App_DoseTool)) set(ENABLE_ITK "-DLIT_ENABLE_ITK_SUPPORT:BOOL=ON") set(ITK_DIRECTORY "-DITK_DIR:STRING=${ITK_DIR}") ENDIF() #extract and build Litmus ExternalProject_Add( Litmus URL ${RTToolbox_SOURCE_DIR}/utilities/Litmus/Litmus.tar.gz URL_HASH SHA1=ca064c95e44b84542966523b4a3814554af30b49 SOURCE_DIR ${LITMUS_SOURCE_DIR} BINARY_DIR ${LITMUS_BUILD_DIR} PREFIX ${LITMUS_CMAKE_DIR} INSTALL_COMMAND "" UPDATE_COMMAND "" # Don't update SVN on every build CMAKE_ARGS -DBUILD_TESTING:BOOL=OFF + -DCMAKE_CXX_STANDARD=11 ${ENABLE_ITK} ${ITK_DIRECTORY} ) set(RTTBDATA_DIR "${CMAKE_BINARY_DIR}/external/RTTBData") set(TEST_DATA_ROOT ${RTTBDATA_DIR}) #download RTTB data message(STATUS "RTTBdata will be automatically downloaded.") ExternalProject_Add( RTTBData SOURCE_DIR ${RTTBDATA_DIR} GIT_REPOSITORY "ssh://git@phabricator.mitk.org:2222/source/rttb-data.git" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" ) #----------------------------------------------------------------------------- # Configure Testing branch #----------------------------------------------------------------------------- MAKE_DIRECTORY(${RTTBTesting_BINARY_DIR}/Temporary) OPTION(BUILD_Tester_All "All testing modules will be built" OFF) MESSAGE(STATUS "Process All Tests...") #----------------------------------------------------------------------------- # Include sub directories #----------------------------------------------------------------------------- OPTION(BUILD_Tester_Core "build project on/off" OFF) OPTION(BUILD_Tester_Examples "build project on/off" OFF) OPTION(BUILD_Tester_Algorithms "build project on/off" OFF) OPTION(BUILD_Tester_Models "build project on/off" OFF) OPTION(BUILD_Tester_IO "build project on/off" OFF) OPTION(BUILD_Tester_Masks "build project on/off" OFF) OPTION(BUILD_Tester_Interpolation "build project on/off" OFF) OPTION(BUILD_Tester_Apps "build project on/off" OFF) OPTION(BUILD_Tester_Validation "build project on/off" OFF) IF(BUILD_Tester_All OR BUILD_Tester_Core) ADD_SUBDIRECTORY(core) ENDIF() IF(BUILD_Tester_All OR BUILD_Tester_Examples) ADD_SUBDIRECTORY(examples) ENDIF() IF(BUILD_Tester_All OR BUILD_Tester_Algorithms) ADD_SUBDIRECTORY(algorithms) ENDIF() IF(BUILD_Tester_All OR BUILD_Tester_Models) ADD_SUBDIRECTORY(models) ENDIF() IF(BUILD_Tester_All OR BUILD_Tester_IO) ADD_SUBDIRECTORY(io) ENDIF() IF(BUILD_Tester_All OR BUILD_Tester_Masks) ADD_SUBDIRECTORY(masks) ENDIF() IF(BUILD_Tester_All OR BUILD_Tester_Interpolation) ADD_SUBDIRECTORY(interpolation) ENDIF() IF(BUILD_Tester_All OR BUILD_Tester_Validation) ADD_SUBDIRECTORY(validation) ENDIF() IF(BUILD_Tester_All OR BUILD_Tester_Apps) ADD_SUBDIRECTORY(apps) ENDIF() diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt~ similarity index 100% copy from testing/CMakeLists.txt copy to testing/CMakeLists.txt~