TubeTK/Build Instructions: Difference between revisions
From KitwarePublic
< TubeTK
Jump to navigationJump to search
No edit summary |
|||
Line 52: | Line 52: | ||
*** The -Weffc++ option might be over-kill, but I'd like to try it at first... | *** The -Weffc++ option might be over-kill, but I'd like to try it at first... | ||
** CMAKE_C_FLAGS:STRING=-W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings | ** CMAKE_C_FLAGS:STRING=-W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings | ||
= References = | |||
* Superbuild and EXTERNAL_PROJECTS | |||
** Dave Cole's article in the October Kitware Source [http://www.kitware.com/products/archive/kitware_quarterly1009.pdf] | |||
** |
Revision as of 18:44, 7 February 2010
Prerequisites
Current Requirements
ITK
Can be built by TubeTK using superbuild, or...
BUILD_SHARED_LIBS = OFF (or ON, but libs are VERY small in ITK because of templates) ITK_USE_LIBXML2 = ON ITK_USE_REVIEW = ON ITK_USE_OPTIMIZED_REGISTRATION_METHODS = ON ITK_USE_TRANSFORM_IO_FACTORIES = ON CMAKE_CXX_FLAGS = -fPIC CMAKE_C_FLAGS = -fPIC
The last two (adding -fPIC to both c and cxx flags) can be ignored if you build with shared libs ON.
Future Requirements
Qt 4.6
- Tips for installing Open Source Qt to run with Visual Studio
- Open a visual studio command shell.
- Go to the Qt source directory and run "configure -platform win32-msvc2005". This will tell Qt to prepare itself for being compiled by the Visual Studio compiler. If you use another version of VS than 2005, replace win32-msvc-2005 with the appropriate one.
- Type "nmake" and take a break when it compiles.
- Add QMAKESPEC=win32-msvc2005 as a system environment variable and add QTDIR=your_dir into the system path. It is done.
- Tips for installing Qt on Linux
- apt-get qt4
VTK
BUILD_SHARED_LIBS = ON VTK_USE_GUISupport = ON VTK_USE_QVTK
CMake Variables
- TubeTK_USE_SUPERBUILD
- If "ON", then cmake will fetch and compile TCLAP, ModuleDescriptionParser, and GenerateCLP from the Slicer3 svn repository. Also, will enable the variable TubeTK_SUPERBUILD_ITK
- If "OFF", then will enable GenerateCLP_DIR and ITK_DIR
- TubeTK_SUPERBUILD_ITK
- If "ON", then cmake will fetch and compile ITK as part of the build process.
- If "OFF", then will enable ITK_DIR
Compilation Options
- A summary of warning options for gcc and g++ are given at:
- For Linux developers (and Linux dashboard machines) we recommend:
- CMAKE_CXX_FLAGS:STRING=-W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Woverloaded-virtual -Weffc++
- The -Weffc++ option might be over-kill, but I'd like to try it at first...
- CMAKE_C_FLAGS:STRING=-W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings
- CMAKE_CXX_FLAGS:STRING=-W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Woverloaded-virtual -Weffc++
References
- Superbuild and EXTERNAL_PROJECTS
- Dave Cole's article in the October Kitware Source [1]