Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teem fix #5

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f1cf08b
Merge pull request #24 from BRAINSia/master
Jun 25, 2014
9e733b1
ENH: Clean-up build options
hjmjohnson Jun 25, 2014
a7db3c0
ENH: Make compliant with standard extension layout.
hjmjohnson Jun 25, 2014
78602f2
ENH: Required to have no variables in the EXTENSION_ variables.
hjmjohnson Jun 25, 2014
28ae406
COMP: Remove unneeded call to "cmake_policy"
jcfr Jun 27, 2014
7ddf1d6
COMP: Remove duplicated MacOSX platform checks
jcfr Jun 27, 2014
ef99a10
COMP: Remove redundant directory includes in ukf/CMakeLists.txt
jcfr Jun 27, 2014
f2db291
COMP: Remove unused CMakeLists.txt in SuperBuild folder
jcfr Jun 27, 2014
c974435
COMP: Simplify inclusion of SlicerExecutionModel package
jcfr Jun 27, 2014
10d35cc
COMP: Simplify how standalone/superbuild and extension case are diffe…
jcfr Jun 27, 2014
38f7b08
COMP: Consistently find teem library
jcfr Jun 27, 2014
4348ad5
STYLE: Use consistent indentation in all CMakeLists.txt
jcfr Jun 27, 2014
d795c7a
STYLE: Remove unused code from Eigen external project
jcfr Jun 27, 2014
8595414
COMP: Fix build error disabling Eigen Qt dependency
jcfr Jun 27, 2014
55666fb
COMP: Update teem project to allow use of system teem.
jcfr Jun 27, 2014
66845d0
COMP: Simplify management of output and install directories
jcfr Jun 27, 2014
b5eb9b0
COMP: Simplify passing of variable to external projects
jcfr Jun 27, 2014
efb1f8e
Merge pull request #28 from jcfr/simplify-buildsystem-and-fix-configu…
Jun 27, 2014
0e8268e
COMP: Ensure CMAKE flags are passed down to all external project.
jcfr Jun 27, 2014
7ce7877
Merge pull request #29 from jcfr/fix-relocation-build-error
Jun 27, 2014
cd27d33
BUG: fixing some bugs in computedispersion.cxx
Jul 2, 2014
cf25b45
COMP: Fix vtk fiber bundle writer
Jul 11, 2014
9f812bd
Merge pull request #34 from Chaircrusher/FixVTKPolyDataWriter
hjmjohnson Jul 11, 2014
c4d9408
BUG: always write out DDF as THE scalar data for a fiber bundleOther …
Jul 15, 2014
90a6cdb
Merge pull request #35 from Chaircrusher/FixVTKPolyDataWriter
Jul 16, 2014
b101af8
Changed acknowledgments, contributors and some default settings in th…
Jul 19, 2014
f1c201f
Fixing Teem library path for the Slicer Extension
Jul 25, 2014
ae47992
Fixed a typo in previous commit
Jul 25, 2014
88c9d23
Updated list of contributors
Jul 25, 2014
74766a5
Updated list of contributors #2
Jul 25, 2014
18d71bb
One more change to the UKFTractography XML, suggested by Ron
Jul 28, 2014
63ad71a
COMP: fix linking to teem on linux
Aug 12, 2014
96adff7
COMP: conditionally search for Teem library
Aug 12, 2014
4aa3c5b
Merge pull request #37 from Chaircrusher/FixTeemLink
Aug 12, 2014
b487297
BUG: inverted test for Slicer build
Aug 18, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 2.8.9) #2.8.9 needed for ExternalProject Simplification
cmake_policy(VERSION 2.8.9)

set(PRIMARY_PROJECT_NAME UKFTractography)

Expand All @@ -19,13 +18,37 @@ set(PRIMARY_PROJECT_NAME UKFTractography)
# Phase II: Build the ${PRIMARY_PROJECT_NAME}, referencing the support
# packages built in Phase I.
#-----------------------------------------------------------------------------
option(${PRIMARY_PROJECT_NAME}_SUPERBUILD "Build ${PRIMARY_PROJECT_NAME} and the projects it depends on via SuperBuild.cmake." ON)

#-----------------------------------------------------------------------------
set(EXTENSION_NAME UKFTractography)
set(EXTENSION_HOMEPAGE "http://www.nitrc.org/plugins/mwiki/index.php/ukftractography:MainPage")
set(EXTENSION_CATEGORY "Diffusion.Tractography")
set(EXTENSION_CONTRIBUTORS "Yogesh Rathi, Stefan Lienhard, Yinpeng Li, Martin Styner, Ipek Oguz, Yundi Shi, Christian Baumgartner, Ryan Eckbo, Kent Williams, Hans Johnson, Peter Savadjiev, Carl-Fredrik Westin")
set(EXTENSION_MAJOR_VERSION 1)
set(EXTENSION_MINOR_VERSION 2)
set(EXTENSION_PATCH_VERSION 0)
set(EXTENSION_STATUS "Alpha")
set(EXTENSION_DEPENDS "Eigen")
set(EXTENSION_DESCRIPTION "This module traces fibers in a DWI Volume using the multiple tensor unscented Kalman Filter methology. ")
set(EXTENSION_LICENSE_SHORT_DESCRIPTION "Quadratic Programming Library QuadProg++ has LGPL or GPL")
set(EXTENSION_ICONURL "http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Extensions/Testing/CLIExtensionTemplate/CLIExtensionTemplate.png?revision=19437&view=co")
set(EXTENSION_SCREENSHOTURLS "http://wiki.slicer.org/slicerWiki/images/a/ab/Slicer-r19441-CLIExtensionTemplate-screenshot.png http://wiki.slicer.org/slicerWiki/images/1/1e/Slicer-r19441-CLIExtensionTemplate-screenshot-2.png")

#-----------------------------------------------------------------------------
if(${PRIMARY_PROJECT_NAME}_BUILD_SLICER_EXTENSION)
set(default_superbuild_value OFF)
else()
set(default_superbuild_value ON)
endif()

#-----------------------------------------------------------------------------
option(${PRIMARY_PROJECT_NAME}_SUPERBUILD "Build ${PRIMARY_PROJECT_NAME} and the projects it depends on via SuperBuild.cmake." ${default_superbuild_value})
mark_as_advanced(${PRIMARY_PROJECT_NAME}_SUPERBUILD)

#-----------------------------------------------------------------------------
# Superbuild script
#-----------------------------------------------------------------------------
if(${PRIMARY_PROJECT_NAME}_SUPERBUILD AND NOT ${PRIMARY_PROJECT_NAME}_BUILD_SLICER_EXTENSION)
if(${PRIMARY_PROJECT_NAME}_SUPERBUILD)
project(SuperBuild_${PRIMARY_PROJECT_NAME}) # <- NOTE: Project name for pre-requisites is different form main project
include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake")
return()
Expand Down
53 changes: 18 additions & 35 deletions Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ enable_language(CXX)
include(CMakeDependentOption)
include(Artichoke)

#-----------------------------------------------------------------------------
# Build option(s)
#-----------------------------------------------------------------------------

option(${PRIMARY_PROJECT_NAME}_INSTALL_DEVELOPMENT "Install development support include and libraries for external packages." OFF)
mark_as_advanced(${PRIMARY_PROJECT_NAME}_INSTALL_DEVELOPMENT)

Expand All @@ -25,10 +29,6 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

#-----------------------------------------------------------------------------
# Build option(s)
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Update CMake module path
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -71,31 +71,15 @@ if(NOT COMMAND SETIFEMPTY)
endmacro()
endif()

#
# if you're building as a Slicer extension, this stuff
# overrides the defaults being set up for the Extension.
if(UKFTractography_SUPERBUILD AND NOT ${PRIMARY_PROJECT_NAME}_BUILD_SLICER_EXTENSION)

#-----------------------------------------------------------------------------
SETIFEMPTY(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
SETIFEMPTY(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
SETIFEMPTY(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)

#-----------------------------------------------------------------------------
SETIFEMPTY(CMAKE_INSTALL_LIBRARY_DESTINATION lib)
SETIFEMPTY(CMAKE_INSTALL_ARCHIVE_DESTINATION lib)
SETIFEMPTY(CMAKE_INSTALL_RUNTIME_DESTINATION bin)

set(SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION ${CMAKE_INSTALL_RUNTIME_DESTINATION})
set(SlicerExecutionModel_DEFAULT_CLI_INSTALL_LIBRARY_DESTINATION ${CMAKE_INSTALL_LIBRARY_DESTINATION})
set(SlicerExecutionModel_DEFAULT_CLI_INSTALL_ARCHIVE_DESTINATION ${CMAKE_INSTALL_ARCHIVE_DESTINATION})
endif()

# these apparently need to be set to something;
SETIFEMPTY(SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION bin)
SETIFEMPTY(SlicerExecutionModel_DEFAULT_CLI_INSTALL_LIBRARY_DESTINATION lib)
SETIFEMPTY(SlicerExecutionModel_DEFAULT_CLI_INSTALL_ARCHIVE_DESTINATION lib)
#-----------------------------------------------------------------------------
SETIFEMPTY(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
SETIFEMPTY(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
SETIFEMPTY(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)

#-----------------------------------------------------------------------------
SETIFEMPTY(CMAKE_INSTALL_LIBRARY_DESTINATION lib)
SETIFEMPTY(CMAKE_INSTALL_ARCHIVE_DESTINATION lib)
SETIFEMPTY(CMAKE_INSTALL_RUNTIME_DESTINATION bin)

#-------------------------------------------------------------------------
# Augment compiler flags
Expand All @@ -108,13 +92,6 @@ if("${CMAKE_CXX_COMPILER}${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang.*")
set(CMAKE_COMPILER_IS_CLANGXX ON CACHE BOOL "compiler is CLang")
endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ITK_REQUIRED_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ITK_REQUIRED_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")


#-----------------------------------------------------------------------------
# Add needed flag for gnu on linux like enviroments to build static common libs
# suitable for linking with shared object libs.
Expand All @@ -127,3 +104,9 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
endif()
endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ITK_REQUIRED_C_FLAGS}" CACHE STRING "CMake C Flags" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ITK_REQUIRED_CXX_FLAGS}" CACHE STRING "CMake CXX Flags" FORCE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}" CACHE STRING "CMake Linker Flags" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}" CACHE STRING "CMake shared linker Flags" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}" CACHE STRING "CMake module linker Flags" FORCE)

51 changes: 10 additions & 41 deletions CompressedSensing/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,48 +1,17 @@
cmake_minimum_required(VERSION 2.8.7)

#-----------------------------------------------------------------------------
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
message("Boost_INCLUDE_DIRS=${Boost_INCLUDE_DIRS}")
#-----------------------------------------------------------------------------
set(MODULE_NAME CompressedSensing)

#-----------------------------------------------------------------------------
if(NOT Slicer_SOURCE_DIR AND NOT UKFTractography_SuperBuild)
find_package(Slicer REQUIRED)
include(${Slicer_USE_FILE})
endif()

if(NOT SlicerExecutionModel_FOUND)
find_package(SlicerExecutionModel REQUIRED)
include(${SlicerExecutionModel_USE_FILE})
endif()

if(NOT Teem_FOUND)
find_package(Teem REQUIRED)
include(${Teem_USE_FILE})
endif()

if(NOT ITK_FOUND)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
endif()

if(NOT GenerateCLP_FOUND)
find_package(GenerateCLP REQUIRED)
include(${GenerateCLP_USE_FILE})
endif()

if(NOT VTK_FOUND)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
endif()
set(MODULE_NAME CompressedSensing)

#-----------------------------------------------------------------------------
set(MODULE_INCLUDE_DIRECTORIES
${Teem_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)

include_directories( ${MODULE_INCLUDE_DIRECTORIES} )
${Teem_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)

set(MODULE_SRCS
CompressedSensing.cxx
Expand All @@ -59,10 +28,10 @@ set(MODULE_SRCS
)

set(MODULE_TARGET_LIBRARIES
${ITK_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${TEEM_LIB}
${VTK_LIBRARIES}
${ITK_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${TEEM_LIB} ${ZLIB_LIBRARIES}
${VTK_LIBRARIES}
)

#-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion CompressedSensing/Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ add_test(NAME fibertractdispersion
--writeUnCompressed
--inputFiberBundle ${BASELINE}/1T_fiber.vtk
--outputFiberBundle ${TESTING_RESULTS_DIRECTORY}/${CLP}_1T_fiber.vtk
)
)
Loading