Correction make install (ITK interne)

Correction make install (ITK interne)

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -92,7 +92,9 @@
    			 ${ITK_INCLUDE_DIRS} )
 #   			${ITK_INCLUDE_DIRS_INSTALL_TREE} 	)
 ELSE(OTB_USE_EXTERNAL_ITK)
+#THOMAS
 	SET(OTB_INCLUDE_DIRS_INSTALL_TREE ${OTB_INCLUDE_DIRS_INSTALL_TREE}
-			${ITK_INCLUDE_DIRS_BUILD_TREE}
-			${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} )
+			${ITK_INCLUDE_DIRS_INSTALL_TREE} )
+#			${ITK_INCLUDE_DIRS_BUILD_TREE}
+#			${ITK_INCLUDE_DIRS_BUILD_TREE_CXX} )
 ENDIF(OTB_USE_EXTERNAL_ITK)


Enable fp-contract=fast for all NO_INVARIANCE builds

--- Source/cmake_core.cmake
+++ Source/cmake_core.cmake
@@ -164,9 +164,13 @@
     endif()

     if(${NO_INVARIANCE})
-            target_compile_definitions(${NAME}
-                PRIVATE
-                    ASTCENC_NO_INVARIANCE=1)
+        target_compile_definitions(${NAME}
+            PRIVATE
+                ASTCENC_NO_INVARIANCE=1)
+
+        target_compile_options(${NAME}
+            PRIVATE
+                $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-ffp-contract=fast>)
     endif()

     if(${CLI})
@@ -273,8 +277,7 @@
         if(${NO_INVARIANCE})
             target_compile_options(${NAME}
                 PRIVATE
-                    $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-mfma>
-                    $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-ffp-contract=fast>)
+                    $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-mfma>)
         endif()

     endif()


Fixing spelling error in a variable name.

--- Resources/IncludeMXADataModelSource.cmake
+++ Resources/IncludeMXADataModelSource.cmake
@@ -1,3 +1,4 @@
+MESSAGE (STATUS "IncludeMXADataModelSource.cmake")
 IF (NOT MXA_RESOURCES_DIR)
   GET_FILENAME_COMPONENT(MXA_RESOURCES_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
 ENDIF (NOT MXA_RESOURCES_DIR)
@@ -137,7 +138,7 @@
 SET (TIFF_SUPPORT "0")
 SET (XML_SUPPORT "0")
 SET (BUILD_TESTING "0")
-SET (BUILD_EXAMPELS "0")
+SET (BUILD_EXAMPLES "0")

 #-- Configure the Header file and then add the Binary Directory to the Includes list
 CONFIGURE_FILE(${MXA_SOURCE_DIR}/src/Common/MXAConfiguration.h.in


cmake: use the EGL CFLAGS in the waffle CFLAGS

Without them, the build will fail with a recent Mesa from the master
branch on a system without the X headers:

include/EGL/eglplatform.h:119:22: fatal error: X11/Xlib.h: No such file
or directory

Signed-off-by: Mircea Gherzan <c46ab63afa46e17ed4e2e2049c1f5b4741737e09@intel.com>
Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@intel.com>

--- cmake/Modules/WaffleDefineCompilerFlags.cmake
+++ cmake/Modules/WaffleDefineCompilerFlags.cmake
@@ -58,6 +58,10 @@
         # On MacOS, the SSE2 headers trigger this error.
         waffle_add_c_flag("-Werror=missing-prototypes" WERROR_MISSING_PROTOTYPES)
     endif()
+
+    if(egl_FOUND)
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${egl_CFLAGS_OTHER}")
+    endif(egl_FOUND)

     if(MINGW)
         # Avoid depending on MinGW runtime DLLs


Fix missing library when linking GLFW3

Fix missing library when linking GLFW3

--- modules/FindGLFW3.cmake
+++ modules/FindGLFW3.cmake
@@ -5,7 +5,7 @@
 # GLFW3_FOUND
 # GLFW3_INCLUDE_PATH
 # GLFW3_LIBRARY
-#
+#

 IF(WIN32)
     FIND_PATH( GLFW3_INCLUDE_PATH GLFW/glfw3.h
@@ -49,6 +49,9 @@
 INCLUDE(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(GLFW3 DEFAULT_MESSAGE GLFW3_LIBRARY GLFW3_INCLUDE_PATH)

+# Fix linker complaining about undefined references
+SET(GLFW3_LIBRARY ${GLFW3_LIBRARY} Xxf86vm)
+
 #SET(GLFW3_FOUND "NO")
 #IF(GLFW3_INCLUDE_PATH AND GLFW3_LIBRARY)
 #	SET(GLFW_LIBRARIES ${GLFW3_LIBRARY})


Fixed InstallDependencies in 1.8.1 for boost 1.50+

--HG--
branch : v1-8

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -180,7 +180,6 @@
       PATTERN "asio" EXCLUDE
       PATTERN "assign" EXCLUDE
       PATTERN "bimap" EXCLUDE
-      PATTERN "chrono" EXCLUDE
       PATTERN "circular_buffer" EXCLUDE
       PATTERN "compatibility" EXCLUDE
       PATTERN "concept_check" EXCLUDE
@@ -189,7 +188,6 @@
       PATTERN "filesystem" EXCLUDE
       PATTERN "flyweight" EXCLUDE
       PATTERN "format" EXCLUDE
-      PATTERN "functional" EXCLUDE
       PATTERN "fusion" EXCLUDE
       PATTERN "geometry" EXCLUDE
       PATTERN "gil" EXCLUDE
@@ -214,18 +212,15 @@
       PATTERN "ptr_container" EXCLUDE
       PATTERN "python" EXCLUDE
       PATTERN "random" EXCLUDE
-      PATTERN "ratio" EXCLUDE
       PATTERN "regex" EXCLUDE
       PATTERN "serialization" EXCLUDE
       PATTERN "signals" EXCLUDE
       PATTERN "signals2" EXCLUDE
       PATTERN "spirit" EXCLUDE
       PATTERN "statechart" EXCLUDE
-      PATTERN "system" EXCLUDE
       PATTERN "test" EXCLUDE
       PATTERN "timer" EXCLUDE
       PATTERN "tr1" EXCLUDE
-      PATTERN "typeof" EXCLUDE
       PATTERN "units" EXCLUDE
       PATTERN "unordered" EXCLUDE
       PATTERN "uuid" EXCLUDE


try fix cmake syntax

try fix cmake syntax

--- CMake/hoomd/HOOMDMPISetup.cmake
+++ CMake/hoomd/HOOMDMPISetup.cmake
@@ -67,12 +67,12 @@
 # https://gitlab.kitware.com/cmake/cmake/merge_requests/2529/diffs
 # additionally, since nvcc doesn't require -pthread (and hipcc doesn't like -Xcompiler), eliminate argument
 if (ENABLE_HIP)
-    string(REPLACE "-pthread" "$<$<COMPILE_LANGUAGE:CUDA>:,-pthread>"
+    string(REPLACE "-pthread" "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:-pthread>"
       _MPI_C_COMPILE_OPTIONS "${MPI_C_COMPILE_OPTIONS}")
     set_property(TARGET MPI::MPI_C PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_C_COMPILE_OPTIONS}")
     unset(_MPI_C_COMPILE_OPTIONS)

-    string(REPLACE "-pthread" "$<$<COMPILE_LANGUAGE:CUDA>:,-pthread>"
+    string(REPLACE "-pthread" "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:-pthread>"
       _MPI_CXX_COMPILE_OPTIONS "${MPI_CXX_COMPILE_OPTIONS}")
     set_property(TARGET MPI::MPI_CXX PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_CXX_COMPILE_OPTIONS}")
     unset(_MPI_CXX_COMPILE_OPTIONS)


remove line in cmake to remove lcov file

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -164,7 +164,7 @@
         COMMAND ${LCOV_PATH} -a ${Coverage_NAME}.base -a ${Coverage_NAME}.info --output-file ${Coverage_NAME}.total
         COMMAND ${LCOV_PATH} --remove ${Coverage_NAME}.total ${COVERAGE_EXCLUDES} --output-file ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned
         COMMAND ${GENHTML_PATH} -o ${Coverage_NAME} ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned
-        COMMAND ${CMAKE_COMMAND} -E remove ${Coverage_NAME}.base ${Coverage_NAME}.info ${Coverage_NAME}.total ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned
+        #COMMAND ${CMAKE_COMMAND} -E remove ${Coverage_NAME}.base ${Coverage_NAME}.info ${Coverage_NAME}.total ${PROJECT_BINARY_DIR}/${Coverage_NAME}.info.cleaned

         WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
         DEPENDS ${Coverage_DEPENDENCIES}


tribits: ma depends on apf_zoltan

tribits: ma depends on apf_zoltan

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -4,10 +4,10 @@
     gmi                 gmi             SS  REQUIRED
     mds                 mds             SS  REQUIRED
     parma               parma           SS  REQUIRED
+    apf_zoltan          zoltan          SS  REQUIRED
     ma                  ma              SS  REQUIRED
     spr                 spr             SS  REQUIRED
     apf_stk             stk             SS  REQUIRED
-    apf_zoltan          zoltan          SS  REQUIRED
 )

 SET(LIB_REQUIRED_DEP_PACKAGES)


minor fix

minor fix

--- cmake/qpp_examples.cmake
+++ cmake/qpp_examples.cmake
@@ -6,9 +6,9 @@
 #### Build all examples in ${EXAMPLE_FILES}
 add_custom_target(examples)
 foreach (FILE ${EXAMPLE_FILES})
-    get_filename_component(TARGET_NAME ${FILE} NAME)
+    get_filename_component(TARGET_NAME ${FILE} NAME_WE)
     #### Do not build "examples/matlab_io.cpp" if there's no MATLAB support
-    if (${TARGET_NAME} STREQUAL "matlab_io.cpp" AND NOT BUILD_WITH_MATLAB)
+    if (${TARGET_NAME} STREQUAL "matlab_io" AND NOT BUILD_WITH_MATLAB)
         continue()
     endif ()
     add_executable(${TARGET_NAME} EXCLUDE_FROM_ALL ${FILE})


cmake: Find opengl.

cmake: Find opengl.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -400,6 +400,13 @@
   vlc_module_add_link_libraries(qt4 ${Qt4_LIBRARIES} Qt4)
 endif(Qt4_FOUND)

+find_package(OpenGL)
+if(OPENGL_FOUND)
+  vlc_enable_modules(opengl)
+  vlc_add_module_compile_flag(opengl ${OPENGL_CFLAGS})
+  vlc_module_add_link_libraries(opengl ${OPENGL_LIBRARIES})
+endif(OPENGL_FOUND)
+
 set(CMAKE_REQUIRED_INCLUDES)

 ###########################################################


ManageTranslation: upload_po won't trigger pot_files rebuild

--- Modules/ManageTranslation.cmake
+++ Modules/ManageTranslation.cmake
@@ -337,6 +337,7 @@
 	## PO file
 	SET(_poFile "${poDir}/${_l}.po")
 	ADD_CUSTOM_COMMAND(OUTPUT ${_poFile}
+	    COMMAND ${CMAKE_BUILD_TOOL} ${targetName}_no_force
 	    COMMAND ${CMAKE_COMMAND}
 	    -D cmd=po_make
 	    -D "pot=${potFile}"
@@ -344,7 +345,6 @@
 	    -D "options=${msgmergeOpts}"
 	    -D "po_dir=${poDir}"
 	    -P ${CMAKE_FEDORA_MODULE_DIR}/ManageGettextScript.cmake
-	    DEPENDS ${potFile}
 	    COMMENT "Create ${_poFile} from ${potFile}"
 	    VERBATIM
 	    )


Check we have at least one real file in cache archive

--- cmake/modules/hunter_pack_directory.cmake
+++ cmake/modules/hunter_pack_directory.cmake
@@ -24,6 +24,12 @@
   list(LENGTH dir_list len)
   if(len EQUAL 0)
     hunter_internal_error("No objects in directory: ${dir_to_pack}")
+  endif()
+
+  file(GLOB_RECURSE files_list "${dir_to_pack}/*")
+  string(COMPARE EQUAL "${files_list}" "" no_files_found)
+  if(no_files_found)
+    hunter_internal_error("Package has not files to pack")
   endif()

   foreach(x ${dir_list})


Split off candidate-7.8.x

Split off candidate-7.8.x

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -4,8 +4,8 @@
 set ( HPCC_NAME "Nagios Monitoring" )
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
-set ( HPCC_MINOR 7 )
+set ( HPCC_MINOR 8 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
+set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


bump version number

bump version number

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(LeapIPC_VERSION 0.1.7)
+set(LeapIPC_VERSION 0.1.8)


Split off 8.2.14

Split off 8.2.14

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 13 )
+set ( HPCC_POINT 15 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


BUG: it was not possible to set ITK_DIR in ccmake when selecting USE_SYTEM_ITK to ON

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -25,27 +25,37 @@
 # SlicerMacroCheckExternalProjectDependency
 set(extProjName ITK) #The find_package known name
 set(proj      ITKv4) #This local name
+set(${extProjName}_REQUIRED_VERSION ${${extProjName}_VERSION_MAJOR})  #If a required version is necessary, then set this, else leave blank

 #if(${USE_SYSTEM_${extProjName}})
 #  unset(${extProjName}_DIR CACHE)
 #endif()

 # Sanity checks
-if(DEFINED ${extProjName}_DIR AND NOT EXISTS ${${extProjName}_DIR})
-  message(FATAL_ERROR "${extProjName}_DIR variable is defined but corresponds to non-existing directory (${${extProjName}_DIR})")
-endif()
-
-# Set dependency list
+#if(DEFINED ${extProjName}_DIR AND NOT EXISTS ${${extProjName}_DIR})
+#  message(FATAL_ERROR "${extProjName}_DIR variable is defined but corresponds to non-existing directory (${${extProjName}_DIR})")
+#endif()
 set(${proj}_DEPENDENCIES "")
-if(${PROJECT_NAME}_BUILD_DICOM_SUPPORT)
-  list(APPEND ${proj}_DEPENDENCIES DCMTK)
-endif()
-
-# Include dependent projects if any
-SlicerMacroCheckExternalProjectDependency(${proj})
-
-if(NOT ( DEFINED "${extProjName}_DIR" OR ( DEFINED "${USE_SYSTEM_${extProjName}}" AND NOT "${USE_SYSTEM_${extProjName}}" ) ) )
+
+if(NOT ( DEFINED "USE_SYSTEM_${extProjName}" AND "${USE_SYSTEM_${extProjName}}" ) )
   #message(STATUS "${__indent}Adding project ${proj}")
+  # Set dependency list
+  if(${PRIMARY_PROJECT_NAME}_BUILD_DICOM_SUPPORT)
+    list(APPEND ${proj}_DEPENDENCIES DCMTK)
+  endif()
+  if( ${PRIMARY_PROJECT_NAME}_BUILD_TIFF_SUPPORT )
+    list(APPEND ${proj}_DEPENDENCIES TIFF)
+  endif()
+  if( ${PRIMARY_PROJECT_NAME}_BUILD_JPEG_SUPPORT )
+    list(APPEND ${proj}_DEPENDENCIES JPEG)
+  endif()
+  if( ${PRIMARY_PROJECT_NAME}_BUILD_ZLIB_SUPPORT )
+    list(APPEND ${proj}_DEPENDENCIES zlib)
+  endif()
+
+
+  # Include dependent projects if any
+  SlicerMacroCheckExternalProjectDependency(${proj})

   # Set CMake OSX variable to pass down the external project
   set(CMAKE_OSX_EXTERNAL_PROJECT_ARGS)
@@ -55,25 +65,44 @@
       -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
       -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
   endif()
-
   ### --- Project specific additions here
-  set(${proj}_DCMTK_ARGS)
-  if(${PROJECT_NAME}_BUILD_DICOM_SUPPORT)
+  if(${PRIMARY_PROJECT_NAME}_BUILD_DICOM_SUPPORT)
     set(${proj}_DCMTK_ARGS
-      -DITK_USE_SYSTEM_DCMTK:BOOL=ON
       -DDCMTK_DIR:PATH=${DCMTK_DIR}
+      -DModule_ITKDCMTK:BOOL=ON
       -DModule_ITKIODCMTK:BOOL=ON
       )
   endif()

-  if(${PROJECT_NAME}_BUILD_FFTWF_SUPPORT)
+  if(${PRIMARY_PROJECT_NAME}_BUILD_FFTWF_SUPPORT)
     set(${proj}_FFTWF_ARGS
       -DITK_USE_FFTWF:BOOL=ON
       )
   endif()
-  if(${PROJECT_NAME}_BUILD_FFTWD_SUPPORT)
+  if(${PRIMARY_PROJECT_NAME}_BUILD_FFTWD_SUPPORT)
     set(${proj}_FFTWD_ARGS
       -DITK_USE_FFTWD:BOOL=ON
+      )
+  endif()
+  if( ${PRIMARY_PROJECT_NAME}_BUILD_TIFF_SUPPORT )
+    set(${proj}_TIFF_ARGS
+      -DITK_USE_SYSTEM_TIFF:BOOL=ON
+      -DTIFF_LIBRARY:FILEPATH=${TIFF_LIBRARY}
+      -DTIFF_INCLUDE_DIR:PATH=${TIFF_INCLUDE_DIR}
+       )
+  endif()
+  if( ${PRIMARY_PROJECT_NAME}_BUILD_JPEG_SUPPORT )
+    set(${proj}_JPEG_ARGS
+      -DITK_USE_SYSTEM_JPEG:BOOL=ON
+      -DJPEG_LIBRARY:FILEPATH=${JPEG_LIBRARY}
+      -DJPEG_INCLUDE_DIR:PATH=${JPEG_INCLUDE_DIR}
+      )
+  endif()
+  if( ${PRIMARY_PROJECT_NAME}_BUILD_ZLIB_SUPPORT )
+    set(${proj}_ZLIB_ARGS
+      -DITK_USE_SYSTEM_ZLIB:BOOL=ON
+      -DZLIB_INCLUDE_DIRS:STRING=${ZLIB_INCLUDE_DIRS}
+      -DZLIB_LIBRARIES:STRING=${ZLIB_LIBRARIES}
       )
   endif()

@@ -105,26 +134,27 @@
   string(REPLACE "-fopenmp" "" ITK_CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
   string(REPLACE "-fopenmp" "" ITK_CMAKE_CXX_FLAGS "${CMAKE_CX_FLAGS}")

-  if(NOT DEFINED git_protocol)
-      set(git_protocol "git")
-  endif()
+  find_package(ZLIB REQUIRED)
+
+  set(${proj}_INSTALL_PATH "${EXTERNAL_BINARY_DIRECTORY}/${proj}-install")

   set(${proj}_CMAKE_OPTIONS
       -DBUILD_TESTING:BOOL=OFF
       -DBUILD_EXAMPLES:BOOL=OFF
       -DCMAKE_INSTALL_PREFIX:PATH=${EXTERNAL_BINARY_DIRECTORY}/${proj}-install
       -DITK_LEGACY_REMOVE:BOOL=OFF
+      -DITK_FUTURE_LEGACY_REMOVE:=BOOL=ON
       -DITKV3_COMPATIBILITY:BOOL=ON
-      -DITK_BUILD_ALL_MODULES:BOOL=ON
-      -DITK_USE_REVIEW:BOOL=ON
+      -DITK_BUILD_DEFAULT_MODULES:BOOL=ON
+      -DModule_ITKReview:BOOL=ON
       #-DITK_INSTALL_NO_DEVELOPMENT:BOOL=ON
-      -DITK_BUILD_ALL_MODULES:BOOL=ON
       -DKWSYS_USE_MD5:BOOL=ON # Required by SlicerExecutionModel
       -DITK_WRAPPING:BOOL=OFF #${BUILD_SHARED_LIBS} ## HACK:  QUICK CHANGE
-      -DITK_USE_SYSTEM_DCMTK:BOOL=${${PROJECT_NAME}_BUILD_DICOM_SUPPORT}
-
-      -DFetch_MGHIO:BOOL=ON  # Allow building of the MGHIO classes
-
+      -DModule_MGHIO:BOOL=ON  # Allow building of the MGHIO classes
+      -DITK_USE_SYSTEM_DCMTK:BOOL=${${PRIMARY_PROJECT_NAME}_BUILD_DICOM_SUPPORT}
+      ${${proj}_TIFF_ARGS}
+      ${${proj}_JPEG_ARGS}
+      ${${proj}_ZLIB_ARGS}
       ${${proj}_DCMTK_ARGS}
       ${${proj}_WRAP_ARGS}
       ${${proj}_FFTWF_ARGS}
@@ -132,8 +162,8 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG 668714cf39f3287e7e08ee53bdc6ae057122b05c)
-  set(ITK_VERSION_ID ITK-4.3)
+  set(${proj}_GIT_TAG a316296e1ef188ce89b7a07dc61313afdad3cf30)
+  set(ITK_VERSION_ID ITK-4.6)

   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
@@ -147,8 +177,6 @@
     ${cmakeversion_external_update} "${cmakeversion_external_update_value}"
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
-      -Wno-dev
-      --no-warn-unused-cli
       ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
       ${COMMON_EXTERNAL_PROJECT_ARGS}
       ${${proj}_CMAKE_OPTIONS}
@@ -157,12 +185,17 @@
       ${${proj}_DEPENDENCIES}
   )
   set(${extProjName}_DIR ${EXTERNAL_BINARY_DIRECTORY}/${proj}-install/lib/cmake/${ITK_VERSION_ID})
+  if(${PRIMARY_PROJECT_NAME}_BUILD_FFTWF_SPPORT)
+    set(FFTWF_LIB ${EXTERNAL_BINARY_DIRECTORY}/${proj}-install/lib/${ITK_VERSION}/libfftw3f.a)
+    set(FFTW_INCLUDE_DIR ${EXTERNAL_BINARY_DIRECTORY}/${proj}-install/include/${ITK_VERSION}/Algorithms)
+  endif()
+  if(${PRIMARY_PROJECT_NAME}_BUILD_FFTWD_SPPORT)
+    set(FFTWD_LIB ${EXTERNAL_BINARY_DIRECTORY}/${proj}-install/lib/${ITK_VERSION}/libfftw3.a)
+    set(FFTW_INCLUDE_DIR ${EXTERNAL_BINARY_DIRECTORY}/${proj}-install/include/${ITK_VERSION}/Algorithms)
+  endif()
 else()
   if(${USE_SYSTEM_${extProjName}})
     find_package(${extProjName} ${ITK_VERSION_MAJOR} REQUIRED)
-    if(NOT ${extProjName}_DIR)
-      message(FATAL_ERROR "To use the system ${extProjName}, set ${extProjName}_DIR")
-    endif()
     message("USING the system ${extProjName}, set ${extProjName}_DIR=${${extProjName}_DIR}")
   endif()
   # The project is provided using ${extProjName}_DIR, nevertheless since other
@@ -171,6 +204,8 @@
 endif()

 list(APPEND ${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_VARS ${extProjName}_DIR:PATH)
+_expand_external_project_vars()
+set(COMMON_EXTERNAL_PROJECT_ARGS ${${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_ARGS})

 ProjectDependancyPop(CACHED_extProjName extProjName)
 ProjectDependancyPop(CACHED_proj proj)


STYLE: Use ITK Module MGHIO

STYLE: Use ITK Module MGHIO

This module is used now by default. BRAINStools requires it and this ITK is used during superbuild

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -109,11 +109,11 @@
       -DZLIB_LIBRARY:STRING=${ZLIB_LIBRARY}
       )
   endif()
-  if( USE_ITK_Module_MGHIO )
-    set( ${proj}_CMAKE_ADDITIONAL_OPTIONS
-      -DModule_MGHIO:BOOL=ON  # Allow building of the MGHIO classes
-      )
-  endif()
+
+  set( ${proj}_CMAKE_ADDITIONAL_OPTIONS
+    -DModule_MGHIO:BOOL=ON  # Allow building of the MGHIO classes
+    )
+
   set(${proj}_WRAP_ARGS)
   #if(foo)
     #set(${proj}_WRAP_ARGS


fallback from cooperlake to skylake if gcc<10


have to add local to make hunter look for config in local /cmake/Hunter/config.cmake

--- scripts/AddHunter.cmake
+++ scripts/AddHunter.cmake
@@ -23,7 +23,7 @@
   if(NOT HUNTER_ROOT AND "$ENV{HUNTER_ROOT}" STREQUAL "")
     set(HUNTER_ROOT "${ih_HUNTER_ROOT}" CACHE PATH "Hunter root dir")
   endif()
-  HunterGate(URL ${ih_URL} SHA1 ${ih_SHA1})
+  HunterGate(URL ${ih_URL} SHA1 ${ih_SHA1} LOCAL)
   if(NOT ih_NO_COOKOFF_RECIPES)
     set(HUNTER_REPOSITORY_cookoff_DIRECTORY ${GREAT_CMAKE_COOKOFF_HUNTER_RECIPES_DIR})
     set(HUNTER_REPOSITORY_cookoff_URL "local")


Add fast-math and neon flags on raspi

Add fast-math and neon flags on raspi

--- boards/rpi-proto-1/config.cmake
+++ boards/rpi-proto-1/config.cmake
@@ -1,3 +1,4 @@
 otto_include_board(parts/ui/egl)
 otto_include_board(parts/audio/rtaudio)
 set(OTTO_USE_FBCP ON)
+set(CMAKE_LINKER_FLAGS_RELEASE "${CMAKE_LINKER_FLAGS_RELEASE} -ffast-math -funsafe-math-optimizations -mfpu=neon-vfpv4")


Windows SpirePM build fix.

Windows SpirePM build fix.

--- src/CMake/SpirePM.cmake
+++ src/CMake/SpirePM.cmake
@@ -216,16 +216,16 @@
 function(_spm_build_target_output_dirs parent_var_to_update output_dir)

   set(outputs)
-  set(outputs $outputs "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${output_dir}")
-  set(outputs $outputs "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:STRING=${output_dir}")
-  set(outputs $outputs "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:STRING=${output_dir}")
+  set(outputs ${outputs} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${output_dir}")
+  set(outputs ${outputs} "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:STRING=${output_dir}")
+  set(outputs ${outputs} "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:STRING=${output_dir}")

   # Second, for multi-config builds (e.g. msvc)
   foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
     string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
-    set(outputs $outputs "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG}:STRING=${output_dir}")
-    set(outputs $outputs "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG}:STRING=${output_dir}")
-    set(outputs $outputs "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG}:STRING=${output_dir}")
+    set(outputs ${outputs} "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG}:STRING=${output_dir}")
+    set(outputs ${outputs} "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG}:STRING=${output_dir}")
+    set(outputs ${outputs} "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG}:STRING=${output_dir}")
   endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)

   set(${parent_var_to_update} ${outputs} PARENT_SCOPE)


COMP: Fixed Mac OSX wrapping configuration warning

FIXES: ITK-3430

- Fixed Mac OSX wrapping configuration warning about CMP0042 on foo
  project within the file of
  "CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake"
  by enabling the variable of "MACOSX_RPATH" by default.

- Here is the warning message:

  CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run
  "cmake --help-policy CMP0042" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:
    foo
  This warning is for project developers. Use -Wno-dev to suppress it.

Change-Id: I7bfeba2b1795e90ab6db2f9f1b46e1d8ce601a8a

--- CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake
+++ CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake
@@ -58,12 +58,19 @@
 int foo(void) {return bar()+1;}
 ")

+    if(APPLE AND ${CMAKE_VERSION} VERSION_GREATER 2.8.11)
+      set( _rpath_arg  "-DCMAKE_MACOSX_RPATH='${CMAKE_MACOSX_RPATH}'" )
+    else()
+      set( _rpath_arg )
+    endif()
+
     try_compile(${VARIABLE}
       "${test_project_dir}"
       "${test_project_dir}"
       undefined
       CMAKE_FLAGS
         "-DCMAKE_SHARED_LINKER_FLAGS='${CMAKE_SHARED_LINKER_FLAGS}'"
+        ${_rpath_arg}
       OUTPUT_VARIABLE output)

     set(${cache_var} "${cmake_flags_hash}" CACHE INTERNAL  "hashed try_compile flags")


BUG: Bump PerformanceBenchmarking to 2016-11-04

Log:

 Matt McCormick (3):
       ENH: Use local Debian mirror to improve package download reliability
       ENH: Add CircleCI Docker image caching
       BUG: Use include(CTest) instead of enable_testing

Change-Id: I152c72e7a66c450d55fab4c0a87274e7138afd17

--- Modules/Remote/PerformanceBenchmarking.remote.cmake
+++ Modules/Remote/PerformanceBenchmarking.remote.cmake
@@ -15,5 +15,5 @@
   http://insight-journal.org/browse/publication/972
 "
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPerformanceBenchmarking.git
-  GIT_TAG c86aa1a895b322374ce7a928bc2cec23c29b4b36
+  GIT_TAG c561a3b357dbd4e175d93eb5b6b544107a700393
   )


cmake: raise a fatal error when C compiler is not found

This commit introduces an early error in case a valid C compiler is not
found in the system.

This will help to early identify misconfigured systems with the error:
  C compiler <compiler> not found - Please check your toolchain
  installation

instead of an obscure error, such as:
No such file or directory: LIBGCC_FILE_NAME: ''

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/compiler/gcc/target.cmake
+++ cmake/compiler/gcc/target.cmake
@@ -6,6 +6,9 @@
 # GCC-based toolchains

 find_program(CMAKE_C_COMPILER ${CROSS_COMPILE}${CC} PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
+if(${CMAKE_C_COMPILER} STREQUAL CMAKE_C_COMPILER-NOTFOUND)
+  message(FATAL_ERROR "C compiler ${CROSS_COMPILE}${CC} not found - Please check your toolchain installation")
+endif()

 if(CONFIG_CPLUSPLUS)
   set(cplusplus_compiler ${CROSS_COMPILE}${C++})


Change behavior when searching for eigen3

By default, try to use CMake FIND_PACKAGE() instead of pkg-config to find
eigen3. If not found, by default, shown an error msg, and allow the user
to enable downloading it. This changes the previous behavior where the
lib was automatically downloaded without asking the user.

cc: #591

--- cmakemodules/script_eigen.cmake
+++ cmakemodules/script_eigen.cmake
@@ -6,18 +6,10 @@
 MARK_AS_ADVANCED(EIGEN_MATRIXBASE_PLUGIN)
 MARK_AS_ADVANCED(EIGEN_MATRIXBASE_PLUGIN_POST_IMPL)

-# By default: Use system version if pkg-config says it exists:
-SET(DEFAULT_EIGEN_USE_EMBEDDED_VERSION ON)
-IF(PKG_CONFIG_FOUND)
-	PKG_CHECK_MODULES(PKG_EIGEN3 QUIET eigen3)	# Find eigen3 with pkg-config:
-	# We require Eigen 3.2 minimum:
-	IF(${PKG_EIGEN3_FOUND} AND ${PKG_EIGEN3_VERSION} VERSION_GREATER "3.1.9")
-		# Use system version:
-		SET(DEFAULT_EIGEN_USE_EMBEDDED_VERSION OFF)
-	ENDIF()
-ENDIF(PKG_CONFIG_FOUND)
+# By default: Use system version
+FIND_PACKAGE(Eigen3 QUIET NO_MODULE)

-SET(EIGEN_USE_EMBEDDED_VERSION ${DEFAULT_EIGEN_USE_EMBEDDED_VERSION} CACHE BOOL "Use embedded Eigen3 version or system version")
+SET(EIGEN_USE_EMBEDDED_VERSION OFF CACHE BOOL "Download Eigen3 and use it instead of system version")
 IF (EIGEN_USE_EMBEDDED_VERSION)
 	# Include embedded version headers:
 	include(ExternalProject)
@@ -36,25 +28,17 @@
 	MARK_AS_ADVANCED(EIGEN_EMBEDDED_INCLUDE_DIR)

 	SET(MRPT_EIGEN_INCLUDE_DIR "${EIGEN_EMBEDDED_INCLUDE_DIR}")
-ELSE(EIGEN_USE_EMBEDDED_VERSION)
-	# Find Eigen headers in the system:
-	IF(NOT PKG_CONFIG_FOUND)
-		MESSAGE(SEND_ERROR "pkg-config is required for this operation!")
-	ELSE(NOT PKG_CONFIG_FOUND)
-		# Find eigen3 with pkg-config:
-		PKG_CHECK_MODULES(PKG_EIGEN3 QUIET eigen3)
-		IF(PKG_EIGEN3_FOUND)
-			SET(MRPT_EIGEN_INCLUDE_DIR "${PKG_EIGEN3_INCLUDE_DIRS}")
-		ELSE(PKG_EIGEN3_FOUND)
-			MESSAGE(SEND_ERROR "pkg-config was unable to find eigen3: install libeigen3-dev or enable EIGEN_USE_EMBEDDED_VERSION")
-		ENDIF(PKG_EIGEN3_FOUND)
-	ENDIF(NOT PKG_CONFIG_FOUND)
-ENDIF(EIGEN_USE_EMBEDDED_VERSION)
+ELSEIF(Eigen3_FOUND)
+	# Use system version
+	SET(MRPT_EIGEN_INCLUDE_DIR "${EIGEN3_INCLUDE_DIR}")
+ELSE()
+	MESSAGE(FATAL_ERROR "eigen3 is required to build MRPT! Either install it and set EIGEN3_DIR or enable the variable EIGEN_USE_EMBEDDED_VERSION to automatically download it now.")
+ENDIF()

 INCLUDE_DIRECTORIES("${MRPT_EIGEN_INCLUDE_DIR}")
 IF(EXISTS "${MRPT_EIGEN_INCLUDE_DIR}/unsupported/")
 	INCLUDE_DIRECTORIES("${MRPT_EIGEN_INCLUDE_DIR}/unsupported/")
-ENDIF(EXISTS "${MRPT_EIGEN_INCLUDE_DIR}/unsupported/")
+ENDIF()

 # Create variables just for the final summary of the configuration (see bottom of this file):
 SET(CMAKE_MRPT_HAS_EIGEN 1)        # Always, it's a fundamental dep.!
@@ -63,11 +47,10 @@
 IF(EIGEN_USE_EMBEDDED_VERSION)
 	SET(EIGEN_USE_EMBEDDED_VERSION_BOOL 1)
 	SET(CMAKE_MRPT_HAS_EIGEN_SYSTEM 0)
-ELSE(EIGEN_USE_EMBEDDED_VERSION)
+ELSE()
 	SET(EIGEN_USE_EMBEDDED_VERSION_BOOL 0)
 	SET(CMAKE_MRPT_HAS_EIGEN_SYSTEM 1)
-ENDIF(EIGEN_USE_EMBEDDED_VERSION)
-
+ENDIF()

 # Add directories as "-isystem" to avoid warnings with :
 SET(AUX_EIGEN_INCL_DIR ${MRPT_EIGEN_INCLUDE_DIR})


Fix exr core test options (#3610)

Fix exr core test options (#3610)

--- src/cmake/testing.cmake
+++ src/cmake/testing.cmake
@@ -265,14 +265,14 @@
          openexr-suite openexr-multires openexr-chroma
          openexr-v2 openexr-window perchannel oiiotool-deep)
     oiio_add_tests (${all_openexr_tests}
-                    ENVIRONMENT OPENIMAGEIO_OPTIONS="openexr:core=0"
+                    ENVIRONMENT OPENIMAGEIO_OPTIONS=openexr:core=0
                     IMAGEDIR openexr-images
                     URL http://github.com/AcademySoftwareFoundation/openexr-images)
     if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.1)
         # For OpenEXR >= 3.1, be sure to test with the core option on
         oiio_add_tests (${all_openexr_tests}
                         SUFFIX ".core"
-                        ENVIRONMENT OPENIMAGEIO_OPTIONS="openexr:core=1"
+                        ENVIRONMENT OPENIMAGEIO_OPTIONS=openexr:core=1
                         IMAGEDIR openexr-images
                         URL http://github.com/AcademySoftwareFoundation/openexr-images)
     endif ()


[FIX,INTERNAL] Fixing too verbose message in build system.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13984 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -455,7 +455,6 @@
         get_filename_component (BIN_NAME "${BIN_NAME}" NAME_WE)

         get_filename_component (FILE_NAME "${ENTRY}" NAME)
-        message (STATUS "FILE_NAME ${FILE_NAME}")
         if (NOT "${FILE_NAME}" MATCHES "^\\.")
             add_executable(${PREFIX}${BIN_NAME} ${ENTRY})
             target_link_libraries (${PREFIX}${BIN_NAME} ${SEQAN_LIBRARIES})


(CTH-309) Rename to pxp-agent: update vendor/cpp-pcp-client.cmake

Updating lib location to build/lib/ instead of lib/.

--- vendor/cpp-pcp-client.cmake
+++ vendor/cpp-pcp-client.cmake
@@ -15,4 +15,4 @@
 )
 externalproject_get_property(cpp-pcp-client SOURCE_DIR)
 set(CPP_PCP_CLIENT_INCLUDE_DIRS "${SOURCE_DIR}/src")
-set(CPP_PCP_CLIENT_LIB "${SOURCE_DIR}/lib/libcpp-pcp-client.so")
+set(CPP_PCP_CLIENT_LIB "${SOURCE_DIR}/build/lib/libcpp-pcp-client.so")


Fix bug CTK compilation with VS2010.

Fix bug CTK compilation with VS2010.

--- CMake/SuperBuild/External_CTK.cmake
+++ CMake/SuperBuild/External_CTK.cmake
@@ -57,10 +57,13 @@
   endif()

   ExternalProject_Add(${proj}
+    SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
+    BINARY_DIR ${CMAKE_BINARY_DIR}/${proj}-build
+    PREFIX ${proj}${ep_suffix}
     GIT_REPOSITORY "${git_protocol}://github.com/commontk/CTK.git"
     GIT_TAG "f57077ea855a614373b7a0dc398902650d71f14f"
-    SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
-    BINARY_DIR ${CMAKE_BINARY_DIR}/${proj}-build
+    UPDATE_COMMAND ""
+    INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
       -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}


build: add SPIDERMONKEY_ROOT var

build: add SPIDERMONKEY_ROOT var

--- CMakeModules/FindSpidermonkey.cmake
+++ CMakeModules/FindSpidermonkey.cmake
@@ -36,11 +36,15 @@
     -D${SPIDERMONKEY_PLATFORM} -DJS_C_STRINGS_ARE_UTF8
     CACHE STRING "Spidermonkey definitions")

-FIND_PATH(SPIDERMONKEY_INCLUDE_DIR js/jsapi.h)
+FIND_PATH(
+    SPIDERMONKEY_INCLUDE_DIR
+    js/jsapi.h
+    PATHS "${SPIDERMONKEY_ROOT}/include")

 FIND_LIBRARY(
     SPIDERMONKEY_LIBRARY
     NAMES js mozjs js32
+    PATHS "${SPIDERMONKEY_ROOT}/lib"
     DOC "Spidermonkey library")

 SET(SPIDERMONKEY_LIBRARIES ${SPIDERMONKEY_LIBRARY})


and again another CMake fix

and again another CMake fix

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -3,11 +3,13 @@

 cmake_minimum_required(VERSION 2.4)
 IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
-	cmake_policy(VERSION 2.4)
 	if(COMMAND CMAKE_POLICY)
+		cmake_policy(VERSION 2.4)
 		cmake_policy(SET CMP0005 OLD)
 		cmake_policy(SET CMP0003 OLD)
-		if(POLICY CMP0011)
+		# Policy CMP0011 was introduced in 2.6.3.
+		# We cannot do if(POLCY CMP0011) as a check because 2.4 would fail then.
+		if(${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 6 OR ${CMAKE_PATCH_VERSION} GREATER 2)
 			# We explicitly want to export variables here.
 			cmake_policy(SET CMP0011 OLD)
 		endif(POLICY CMP0011)


[FEATURE] Improving performance of FindSeqAn by caching the seqan version.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13373 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -365,39 +365,50 @@
 # Determine and set SEQAN_VERSION_* variables.
 # ----------------------------------------------------------------------------

-if (NOT CMAKE_CURRENT_LIST_DIR)  # CMAKE_CURRENT_LIST_DIR only from cmake 2.8.3.
-  get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-endif (NOT CMAKE_CURRENT_LIST_DIR)
-
-try_run(_SEQAN_RUN_RESULT
-        _SEQAN_COMPILE_RESULT
-        ${CMAKE_BINARY_DIR}/CMakeFiles/SeqAnVersion
-        ${CMAKE_CURRENT_LIST_DIR}/SeqAnVersion.cpp
-        CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${SEQAN_INCLUDE_DIRS}"
-        COMPILE_OUTPUT_VARIABLE _COMPILE_OUTPUT
-        RUN_OUTPUT_VARIABLE _RUN_OUTPUT)
-if (NOT _RUN_OUTPUT)
-  message("")
-  message("ERROR: Could not determine SeqAn version.")
-  message("COMPILE OUTPUT:")
-  message(${_COMPILE_OUTPUT})
-endif (NOT _RUN_OUTPUT)
-
-string(REGEX REPLACE ".*SEQAN_VERSION_MAJOR:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_MAJOR ${_RUN_OUTPUT})
-string(REGEX REPLACE ".*SEQAN_VERSION_MINOR:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_MINOR ${_RUN_OUTPUT})
-string(REGEX REPLACE ".*SEQAN_VERSION_PATCH:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_PATCH ${_RUN_OUTPUT})
-string(REGEX REPLACE ".*SEQAN_VERSION_PRE_RELEASE:([0-9a-zA-Z]+).*" "\\1" SEQAN_VERSION_PRE_RELEASE ${_RUN_OUTPUT})
-
-if (SEQAN_VERSION_PRE_RELEASE EQUAL 1)
-  set(SEQAN_VERSION_DEVELOPMENT "TRUE")
-else ()
-  set(SEQAN_VERSION_DEVELOPMENT "FALSE")
-endif ()
-
-set(SEQAN_VERSION_STRING "${SEQAN_VERSION_MAJOR}.${SEQAN_VERSION_MINOR}.${SEQAN_VERSION_PATCH}")
-if (SEQAN_VERSION_DEVELOPMENT)
-  set (SEQAN_VERSION_STRING "${SEQAN_VERSION_STRING}_dev")
-endif ()
+if (NOT DEFINED SEQAN_VERSION_STRING)
+  if (NOT CMAKE_CURRENT_LIST_DIR)  # CMAKE_CURRENT_LIST_DIR only from cmake 2.8.3.
+    get_filename_component (CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+  endif (NOT CMAKE_CURRENT_LIST_DIR)
+
+  try_run (_SEQAN_RUN_RESULT
+           _SEQAN_COMPILE_RESULT
+           ${CMAKE_BINARY_DIR}/CMakeFiles/SeqAnVersion
+           ${CMAKE_CURRENT_LIST_DIR}/SeqAnVersion.cpp
+           CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${SEQAN_INCLUDE_DIRS}"
+           COMPILE_OUTPUT_VARIABLE _COMPILE_OUTPUT
+           RUN_OUTPUT_VARIABLE _RUN_OUTPUT)
+  if (NOT _RUN_OUTPUT)
+    message ("")
+    message ("ERROR: Could not determine SeqAn version.")
+    message ("COMPILE OUTPUT:")
+    message (${_COMPILE_OUTPUT})
+  endif (NOT _RUN_OUTPUT)
+
+  string (REGEX REPLACE ".*SEQAN_VERSION_MAJOR:([0-9a-zA-Z]+).*" "\\1" _SEQAN_VERSION_MAJOR ${_RUN_OUTPUT})
+  string (REGEX REPLACE ".*SEQAN_VERSION_MINOR:([0-9a-zA-Z]+).*" "\\1" _SEQAN_VERSION_MINOR ${_RUN_OUTPUT})
+  string (REGEX REPLACE ".*SEQAN_VERSION_PATCH:([0-9a-zA-Z]+).*" "\\1" _SEQAN_VERSION_PATCH ${_RUN_OUTPUT})
+  string (REGEX REPLACE ".*SEQAN_VERSION_PRE_RELEASE:([0-9a-zA-Z]+).*" "\\1" _SEQAN_VERSION_PRE_RELEASE ${_RUN_OUTPUT})
+
+  if (SEQAN_VERSION_PRE_RELEASE EQUAL 1)
+    set (_SEQAN_VERSION_DEVELOPMENT "TRUE")
+  else ()
+    set (_SEQAN_VERSION_DEVELOPMENT "FALSE")
+  endif ()
+
+  set (_SEQAN_VERSION_STRING "${_SEQAN_VERSION_MAJOR}.${_SEQAN_VERSION_MINOR}.${_SEQAN_VERSION_PATCH}")
+  if (_SEQAN_VERSION_DEVELOPMENT)
+    set (_SEQAN_VERSION_STRING "${_SEQAN_VERSION_STRING}_dev")
+  endif ()
+
+  # Cache results.
+  set (SEQAN_VERSION_MAJOR "${_SEQAN_VERSION_MAJOR}" CACHE INTERNAL "SeqAn major version.")
+  set (SEQAN_VERSION_MINOR "${_SEQAN_VERSION_MINOR}" CACHE INTERNAL "SeqAn minor version.")
+  set (SEQAN_VERSION_PATCH "${_SEQAN_VERSION_PATCH}" CACHE INTERNAL "SeqAn patch version.")
+  set (SEQAN_VERSION_PRE_RELEASE "${_SEQAN_VERSION_PRE_RELEASE}" CACHE INTERNAL "Whether version is a pre-release version version.")
+  set (SEQAN_VERSION_STRING "${_SEQAN_VERSION_STRING}" CACHE INTERNAL "SeqAn version string.")
+
+  message (STATUS "  Determined version is ${SEQAN_VERSION_STRING}")
+endif (NOT DEFINED SEQAN_VERSION_STRING)

 # ----------------------------------------------------------------------------
 # Print Variables


CMake: added advanced options SALOME_BUILD_FOR_GCOV to add flags:     -fprofile-arcs     -ftest-coverage to compiler flags.

--- salome_adm/cmake_files/SalomeSetupPlatform.cmake
+++ salome_adm/cmake_files/SalomeSetupPlatform.cmake
@@ -116,3 +116,13 @@
   SET(CMAKE_CXX_COMPILER g++)
   # because default is clang(llvm) with mountain lion at least
 ENDIF()
+
+# Compiler flags for coverage testing
+IF(NOT WIN32)
+  OPTION(SALOME_BUILD_FOR_GCOV "Add the compilation flags for GCov/LCov" OFF)
+  MARK_AS_ADVANCED(SALOME_BUILD_FOR_GCOV)
+  IF(SALOME_BUILD_FOR_GCOV)
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+    SET(CMAKE_C_FLAGS    "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
+  ENDIF()
+ENDIF()


#1244 - Finished off OpenIGTLink Message types --> need to update version tag

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8261 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -34,7 +34,7 @@

 IF(NOT DEFINED OpenIGTLink_DIR)

-    SET(revision_tag 63a697e7bd)
+    SET(revision_tag 033e851c02)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


GLSL Optimizer has had the library name changed recently. Look for that new name.

--HG--
branch : v1-9

--- CMake/Packages/FindGLSLOptimizer.cmake
+++ CMake/Packages/FindGLSLOptimizer.cmake
@@ -29,7 +29,7 @@
   GLSL_Optimizer_INCLUDE_DIR
 )

-set(GLSL_Optimizer_LIBRARY_NAMES mesaglsl2)
+set(GLSL_Optimizer_LIBRARY_NAMES mesaglsl2 glsl_optimizer)
 get_debug_names(GLSL_Optimizer_LIBRARY_NAMES)

 use_pkgconfig(GLSL_Optimizer_PKGC GLSL_Optimizer)


COMP: Change "github.com/pieper" into "github.com/commontk" in ctkDashBoardScript.EXAMPLE.cmake

--- CMake/ctkDashboardScript.EXAMPLE.cmake
+++ CMake/ctkDashboardScript.EXAMPLE.cmake
@@ -11,8 +11,8 @@

 #
 # For additional information,
-# See http://github.com/pieper/CTK/raw/master/CMake/ctkDashboardScript.EXAMPLE.cmake
-# See http://github.com/pieper/CTK/raw/master/CMake/ctkDashboardDriverScript.cmake
+# See http://github.com/commontk/CTK/raw/master/CMake/ctkDashboardScript.EXAMPLE.cmake
+# See http://github.com/commontk/CTK/raw/master/CMake/ctkDashboardDriverScript.cmake
 #

 #
@@ -117,7 +117,7 @@
 #
 # Download and include dashboard driver script
 #
-set(url http://github.com/pieper/CTK/raw/master/CMake/ctkDashboardDriverScript.cmake)
+set(url http://github.com/commontk/CTK/raw/master/CMake/ctkDashboardDriverScript.cmake)
 set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.driver)
 downloadFile(${url} ${dest})
 INCLUDE(${dest})


ENH: updating ITKMontage module

ENH: updating ITKMontage module

git shortlog --no-merges a8154ee..46cad95

Dzenan Zukic (1):
      BUG: fix a copy-paste bug

Dženan Zukic (11):
      BUG: actually use padding method in tests
      COMP: build with Visual Studio in conformance mode AKA /permissive-
      COMP: build example as part of ITK
      ENH: adding TileConfiguration parser
      ENH: Using the new TileConfiguration format consistently in tests
      ENH: adding a new example to demonstrate the usual use
      BUG: Linux-style line endings in text files
      BUG: fix a compile error on Linux
      STYLE: review suggestions
      Adding refining and resampling examples
      STYLE: review suggestions and other minor cleanup

Jon Haitz Legarreta Gorroño (1):
      DOC: Improve Python package information.

--- Modules/Remote/Montage.remote.cmake
+++ Modules/Remote/Montage.remote.cmake
@@ -2,5 +2,5 @@
 itk_fetch_module(Montage
 "Reconstruction of 3D volumetric dataset from a collection of 2D slices"
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMontage.git
-  GIT_TAG a8154ee8544e6414b87167ffa95fc1186d3a2881
+  GIT_TAG 6e89d6d4cc30d7fa0682218fde407e9f4c04bb6c
   )


i#4108: Avoid replacing WiX paths (#4209)

Tightens the regex for versioned SDK directories to look for a slash
followed by a "v" to avoid matching the WiX path, which we do not want
to mangle.

Also fixes a CMake warning about mismatched conditional end labels in
the same code.

Fixes #4108

--- suite/runsuite_common_pre.cmake
+++ suite/runsuite_common_pre.cmake
@@ -504,7 +504,8 @@
             "\\1VC\\3\\4\\3amd64;\\1VC\\3\\4"
             newpath "${newpath}")
           # VS2008's SDKs/Windows/v{6.0A,7.0} uses "x64" instead of "amd64"
-          string(REGEX REPLACE "(v[^/\\\\]*)([/\\\\])([Bb][Ii][Nn])" "\\1\\2\\3\\2x64"
+          string(REGEX REPLACE "([/\\\\]v[^/\\\\]*)([/\\\\])([Bb][Ii][Nn])"
+            "\\1\\2\\3\\2x64"
             newpath "${newpath}")
           if (arg_verbose)
             message("Env setup: setting PATH to ${newpath}")
@@ -516,7 +517,8 @@
           string(REGEX REPLACE "([/\\\\])([Ll][Ii][Bb])([^/\\\\])" "\\1\\2\\1amd64\\3"
             newlib "${newlib}")
           # VS2008's SDKs/Windows/v{6.0A,7.0} uses "x64" instead of "amd64": grrr
-          string(REGEX REPLACE "(v[^/\\\\]*[/\\\\][Ll][Ii][Bb][/\\\\])[Aa][Mm][Dd]64"
+          string(REGEX REPLACE
+            "([/\\\\]v[^/\\\\]*[/\\\\][Ll][Ii][Bb][/\\\\])[Aa][Mm][Dd]64"
             "\\1x64"
             newlib "${newlib}")
           # Win8 SDK uses um/x86 and um/x64 after "Lib/win{8,v6.3}/"
@@ -533,7 +535,7 @@
             message("Env setup: setting LIBPATH to ${newlibpath}")
           endif ()
           set(ENV{LIBPATH} "${newlibpath}")
-        endif (NOT "$ENV{LIB}" MATCHES "[Aa][Mm][Dd]64")
+        endif ()
       else (is64)
         set(ENV{ASM} "ml")
         if ("$ENV{LIB}" MATCHES "[Aa][Mm][Dd]64" OR


[3531904] Update FindSoftimage.cmake to find Softimage 2013

--- CMake/Packages/FindSoftimage.cmake
+++ CMake/Packages/FindSoftimage.cmake
@@ -32,6 +32,7 @@
   "$ENV{ProgramFiles}/Autodesk/Softimage 2011 SP1/XSISDK"
   "$ENV{ProgramFiles}/Autodesk/Softimage 2012/XSISDK"
   "$ENV{ProgramFiles}/Autodesk/Softimage 2012 SP1/XSISDK"
+  "$ENV{ProgramFiles}/Autodesk/Softimage 2013/XSISDK"
   "C:/Softimage/XSI_6.0_x64/XSISDK"
   "C:/Softimage/XSI_6.01_x64/XSISDK"
   "C:/Softimage/XSI_6.02_x64/XSISDK"
@@ -45,6 +46,7 @@
   "$ENV{ProgramW6432}/Autodesk/Softimage 2011 SP1/XSISDK"
   "$ENV{ProgramW6432}/Autodesk/Softimage 2012/XSISDK"
   "$ENV{ProgramW6432}/Autodesk/Softimage 2012 SP1/XSISDK"
+  "$ENV{ProgramW6432}/Autodesk/Softimage 2013/XSISDK"
 )

 if (CMAKE_CL_64)


ENH: Update Hippo Nightly

ENH: Update Hippo Nightly

--- Hippo_Kitware_TubeTK_Nightly.cmake
+++ Hippo_Kitware_TubeTK_Nightly.cmake
@@ -31,6 +31,13 @@
 set( SITE_BUILD_TYPE "RelWithDebInfo" )
 set( SITE_CTEST_MODE "Nightly" )
 set( SITE_CMAKE_GENERATOR "Unix Makefiles" )
+
+set( SITE_USE_BOOST ON )
+set( SITE_USE_CTK ON )
+set( SITE_USE_LIBSVM ON )
+set( SITE_USE_QT ON )
+set( SITE_USE_SIMPLEITK OFF )
+set( SITE_USE_VTK ON )

 set( TUBETK_GIT_REPOSITORY "http://tubetk.org/TubeTK.git" )
 set( TUBETK_ROOT_DIR "/Users/snape/Development/TubeTK" )
@@ -78,9 +85,9 @@
 set( SITE_NIGHTLY_MEMORY OFF )
 set( SITE_NIGHTLY_PACKAGE ON )
 set( SITE_NIGHTLY_UPLOAD ON )
-set( SITE_NIGHTLY_DOCUMENTATION OFF )
+set( SITE_NIGHTLY_DOCUMENTATION ON )
 set( SITE_NIGHTLY_STYLE OFF )
-set( SITE_NIGHTLY_CPPCHECK OFF )
+set( SITE_NIGHTLY_CPPCHECK ON )

 ##############################################################################

@@ -155,7 +162,13 @@
 set( SVNCOMMAND "${SITE_SVN_COMMAND}" )
 set( CMAKE_GENERATOR "${SITE_CMAKE_GENERATOR}" )
 set( QT_QMAKE_EXECUTABLE "${SITE_QMAKE_COMMAND}" )
-set( TubeTK_USE_Boost ON )
+
+set( TubeTK_USE_Boost ${SITE_USE_BOOST} )
+set( TubeTK_USE_CTK ${SITE_USE_CTK} )
+set( TubeTK_USE_LIBSVM ${SITE_USE_LIBSVM} )
+set( TubeTK_USE_QT ${SITE_USE_QT} )
+set( TubeTK_USE_SimpleITK ${SITE_USE_SIMPLEITK} )
+set( TubeTK_USE_VTK ${SITE_USE_VTK} )

 if( NOT EXISTS "${TUBETK_SOURCE_DIR}/CMakeLists.txt" )
   execute_process( COMMAND "${SITE_GIT_COMMAND}" clone "${TUBETK_GIT_REPOSITORY}" "${TUBETK_SOURCE_DIR}" )


compile Armadillo without HDF5 support

compile Armadillo without HDF5 support

Gadgetron probably doesn't need Armadillo's capability to save/load HDF5 files. Disabling it reduces interdependencies.

Closes #354

--- SuperBuild/External_Armadillo.cmake
+++ SuperBuild/External_Armadillo.cmake
@@ -71,6 +71,7 @@
     CMAKE_ARGS
       -DCMAKE_PREFIX_PATH=${SUPERBUILD_INSTALL_DIR}
       -DCMAKE_INSTALL_PREFIX=${${proj}_INSTALL_DIR}
+      -DDETECT_HDF5=OFF
       ${CLANG_ARG}
   )


BUG: Missing include header in AnisotropicDiffusionBLR remote module hxx files

This patch addresses the compilation error reported in [1].
itkAnisotropicDiffusionLBRImageFilter.hxx and
itkLinearAnisotropicDiffusionLBRImageFilter.hxx did not include their
respective header files. The automatically generated test created
by BuildHeaderTest.py AnisotropicDiffusionLBRHeaderTest1.cxx was not compiling
as it includes the "hxx" files instead of the "h" files when the former are
available.

[1] http://public.kitware.com/pipermail/insight-developers/2017-January/025086.html

Change-Id: Ie30a72644305811f42fc527dd8b5b8c7b32b0e65

--- Modules/Remote/AnisotropicDiffusionLBR.remote.cmake
+++ Modules/Remote/AnisotropicDiffusionLBR.remote.cmake
@@ -20,5 +20,5 @@
     http://insight-journal.org/browse/publication/953
   "
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR.git
-  GIT_TAG c1e74cc933fe86e0738b4df2def965df04c64d3a
+  GIT_TAG 5bd898cb781685d26686b153d33ee484107163c8
   )


fix: Update properties of existing TBB import targets

When TBB:: import targets already exist, update their properties.

--- CMake/Modules/FindTBB.cmake
+++ CMake/Modules/FindTBB.cmake
@@ -386,7 +386,13 @@
     # Add TBB::<C> import target
     string(TOLOWER ${_TBB_COMPONENT} _TBB_TARGET_NAME)
     set(_TBB_TARGET_NAME "TBB::${_TBB_TARGET_NAME}")
-    add_library(${_TBB_TARGET_NAME} SHARED IMPORTED)
+    if (TARGET ${_TBB_TARGET_NAME})
+      if (TBB_DEBUG)
+        message("** FindTBB: Updating existing target ${_TBB_TARGET_NAME}")
+      endif ()
+    else ()
+      add_library(${_TBB_TARGET_NAME} SHARED IMPORTED)
+    endif ()

     set_target_properties(${_TBB_TARGET_NAME} PROPERTIES
       INTERFACE_INCLUDE_DIRECTORIES     "${TBB_${_TBB_COMPONENT}_INCLUDE_DIRS}"


cmake: Add ESP_PLATFORM in idf_set_variables() as well

(Handles case where idf.py is not being used.)

Ref https://github.com/espressif/esp-idf/pull/2601

--- tools/cmake/idf_functions.cmake
+++ tools/cmake/idf_functions.cmake
@@ -61,6 +61,8 @@
     set_default(IDF_COMPONENT_REQUIRES_COMMON "cxx ${IDF_TARGET} newlib freertos heap log soc")

     set(IDF_PROJECT_PATH "${CMAKE_SOURCE_DIR}")
+
+    set(ESP_PLATFORM 1 CACHE BOOL INTERNAL)

     spaces2list(IDF_COMPONENT_DIRS)
     spaces2list(IDF_COMPONENTS)


BUG: workaround for bug #6177, to make the typemaps work again in python.

--- Wrapping/WrapITK/Python/CreateLanguageSupport.cmake
+++ Wrapping/WrapITK/Python/CreateLanguageSupport.cmake
@@ -1,6 +1,9 @@

-MACRO(ADD_PYTHON_TYPEMAP simple_name cpp_name swig_name template_params)
+MACRO(ADD_PYTHON_TYPEMAP simple_name cpp_name swig_name template_params_without_u)+
+  # TODO: remove this hack once bug #6177 is fixed
+  STRING(REGEX REPLACE "(^| |<|,)([0-9]+)($| |>|,)" "\\1\\2u\\3" template_params "${template_params_without_u}")
+
   SET(text "\n\n")
   IF("${cpp_name}" STREQUAL "itk::SmartPointer")
     ADD_PYTHON_POINTER_TYPEMAP("${template_params}")


removed CMake error for clapack.h, reordered possible libs to give priority to optimized atlas

--- CMakeModules/FindATLAS.cmake
+++ CMakeModules/FindATLAS.cmake
@@ -7,10 +7,10 @@
 #

 SET(ATLAS_POSSIBLE_INCLUDE_PATHS
+  /usr/local/include
+  /usr/local/atlas/include
   /usr/include
   /usr/include/atlas
-  /usr/local/include
-  /usr/local/atlas/include
   $ENV{ATLAS_DIR}
   $ENV{ATLAS_DIR}/include
 )
@@ -18,6 +18,8 @@
 # Ubuntu's package management does not handle blas elegantly, causing
 # many possible locations here.
 SET(ATLAS_POSSIBLE_LIBRARY_PATHS
+  /usr/local/lib
+  /usr/local/atlas/lib
   /usr/lib/libatlas-corei7sse3
   /usr/lib/atlas-amd64sse3
   /usr/lib/atlas-base
@@ -26,8 +28,6 @@
   /usr/local/lib/sse2
   /usr/local/lib/sse
   /usr/lib
-  /usr/local/lib
-  /usr/local/atlas/lib
   $ENV{ATLAS_DIR}
   $ENV{ATLAS_DIR}/lib
 )
@@ -40,7 +40,7 @@

 SET(ATLAS_FOUND ON)

-FOREACH(INCDIR ATLAS_CBLAS_INCLUDE_DIR ATLAS_CLAPACK_INCLUDE_DIR)
+FOREACH(INCDIR ATLAS_CBLAS_INCLUDE_DIR)
   IF(${INCDIR})
     SET(ATLAS_INCLUDE_DIR ${ATLAS_INCLUDE_DIR} ${${INCDIR}} )
   ELSE(${INCDIR})


Update GLM to latest version

Update GLM to latest version

--- CMakeModules/build_glm.cmake
+++ CMakeModules/build_glm.cmake
@@ -1,7 +1,6 @@
-SET(VER 0.9.6.3)
+SET(VER 0.9.7.4)
 SET(URL https://github.com/g-truc/glm/archive/${VER}.tar.gz)
-SET(MD5 bc288083697d25dfbd41a813929086f0)
-
+SET(MD5 475b0092c3baaf6ac899dc0dcd87f898)
 SET(thirdPartyDir "${CMAKE_BINARY_DIR}/third_party")
 SET(srcDir "${thirdPartyDir}/glm-${VER}")
 SET(archive ${srcDir}.tar.gz)


ENH: Recompile VTK if not found

ENH: Recompile VTK if not found

--- CMake/FindExternalTools.cmake
+++ CMake/FindExternalTools.cmake
@@ -100,14 +100,43 @@
 ## Libraries for tools =============================================

 # VTK
-find_package(VTK REQUIRED)
-if (VTK_FOUND)
-  set(VTK_USE_QVTK TRUE)
-  set(VTK_USE_GUISUPPORT TRUE)
-  include(${VTK_USE_FILE}) # creates VTK_DIR
-else(VTK_FOUND)
-  message(FATAL_ERROR, "VTK not found. Please set VTK_DIR.")
-endif (VTK_FOUND)
+set(RecompileVTK OFF)
+set(VTK_DEPEND "")
+if(COMPILE_EXTERNAL_dtiprocessTK OR COMPILE_EXTERNAL_AtlasWerks OR COMPILE_EXTERNAL_BRAINS OR COMPILE_EXTERNAL_ANTS OR COMPILE_EXTERNAL_NIRALUtilities)
+  find_package(VTK QUIET)
+  if (VTK_FOUND)
+    set(VTK_USE_QVTK TRUE)
+    set(VTK_USE_GUISUPPORT TRUE)
+    include(${VTK_USE_FILE}) # creates VTK_DIR
+  else(VTK_FOUND)
+    message("VTK not found. It will be downloaded and recompiled, unless a path is manually specified in the VTK_DIR variable.") # Not a Warning = just info
+    set(RecompileVTK ON) # If not found, recompile it
+  endif(VTK_FOUND)
+endif()
+
+if(RecompileVTK) # BRAINSStandAlone/SuperBuild/External_VTK.cmake
+    ExternalProject_Add(VTK
+      GIT_REPOSITORY ${git_protocol}://vtk.org/VTK.git
+      GIT_TAG "v5.10.0"
+      SOURCE_DIR VTK
+      BINARY_DIR VTK-build
+      CMAKE_GENERATOR ${gen}
+      CMAKE_ARGS
+        ${COMMON_BUILD_OPTIONS_FOR_EXTERNALPACKAGES}
+        -DBUILD_EXAMPLES:BOOL=OFF
+        -DBUILD_TESTING:BOOL=OFF
+        -DBUILD_SHARED_LIBS:BOOL=OFF
+        -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/VTK-install
+        -DVTK_USE_PARALLEL:BOOL=ON
+        -DVTK_LEGACY_REMOVE:BOOL=OFF
+        -DVTK_WRAP_TCL:BOOL=OFF
+        #-DVTK_USE_RPATH:BOOL=ON # Unused
+        -DVTK_WRAP_PYTHON:BOOL=${VTK_WRAP_PYTHON}
+        -DVTK_INSTALL_LIB_DIR:PATH=${Slicer_INSTALL_LIB_DIR}
+      )
+    set(VTK_DIR ${CMAKE_CURRENT_BINARY_DIR}/VTK-install/lib/vtk-5.10)
+    set(VTK_DEPEND VTK)
+endif(RecompileVTK)

 # FFTW and CLAPACK for GreedyAtlas
 if(COMPILE_EXTERNAL_AtlasWerks) # FFTW D + F build one on(after) another
@@ -245,7 +274,7 @@
   if(BatchMake_FOUND)
     include(${BatchMake_USE_FILE})
   else(BatchMake_FOUND)
-    message("BatchMake not found. It will be downloaded and recompiled.") # Not a Warning = just info
+    message("BatchMake not found. It will be downloaded and recompiled, unless a path is manually specified in the BatchMake_DIR variable.") # Not a Warning = just info
     set(RecompileBatchMake ON) # If not found, recompile it
   endif(BatchMake_FOUND )
 endif(COMPILE_EXTERNAL_DTIReg)
@@ -327,7 +356,7 @@
   -DTCLAP_DIR:PATH=${TCLAP_DIR}
   -DSlicerExecutionModel_DIR:PATH=${SlicerExecutionModel_DIR}
   -DDTIProcess_BUILD_SLICER_EXTENSION:BOOL=OFF
-  DEPENDS ${ITK_DEPEND}
+  DEPENDS ${ITK_DEPEND} ${VTK_DEPEND}
   )
 set( Tools
   dtiprocess
@@ -364,7 +393,7 @@
   -DatlasWerks_COMPILE_APP_TX_APPLY:BOOL=OFF
   -DatlasWerks_COMPILE_APP_TX_WERKS:BOOL=OFF
   -DatlasWerks_COMPILE_APP_UTILITIES:BOOL=OFF
-  DEPENDS ${ITK_DEPEND} FFTW CLAPACK # Not CMake Arg -> directly after CMakeArg in ExternalProject_Add()
+  DEPENDS ${ITK_DEPEND} ${VTK_DEPEND} FFTW CLAPACK # Not CMake Arg -> directly after CMakeArg in ExternalProject_Add()
 #  PATCH_COMMAND patch -p0 -d ${CMAKE_CURRENT_BINARY_DIR}/DTIAtlasBuilder-build -i ${CMAKE_CURRENT_BINARY_DIR}/AtlasWerksLAPACK.patch # !! no "" # !! patch doesn't exist on windows !
   PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists-AtlasWerksLAPACK-Patched.txt ${CMAKE_CURRENT_BINARY_DIR}/DTIAtlasBuilder-build/AtlasWerks/CMakeLists.txt
   )
@@ -425,7 +454,7 @@
   -DUSE_ImageCalculator:BOOL=OFF
   -DUSE_GTRACT:BOOL=OFF
   -DLOCAL_SEM_EXECUTABLE_ONLY:BOOL=ON # Variable used in SlicerExecutionModel/CMake/SEMMacroBuildCLI.cmake:l.120 : if true, will only create executable without shared lib lib(exec)Lib.so
-  DEPENDS ${ITK_DEPEND} # So ITK is compiled before
+  DEPENDS ${ITK_DEPEND} ${VTK_DEPEND} # So ITK is compiled before
 #  PATCH_COMMAND patch -p0 -d ${CMAKE_CURRENT_BINARY_DIR}/DTIAtlasBuilder-build -i ${CMAKE_CURRENT_SOURCE_DIR}/CMake/BRAINS.patch # !! no "" # !! patch doesn't exist on windows !
   PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeBRAINS3BuildMacros-Patched.cmake ${CMAKE_CURRENT_BINARY_DIR}/DTIAtlasBuilder-build/BRAINS/BRAINSCommonLib/BuildScripts/CMakeBRAINS3BuildMacros.cmake
   )
@@ -454,7 +483,7 @@
   -DSlicerExecutionModel_DIR:PATH=${SlicerExecutionModel_DIR}
   -DUSE_VTK:BOOL=OFF
   -DVTK_DIR:PATH=${VTK_DIR}
-  DEPENDS ${ITK_DEPEND}
+  DEPENDS ${ITK_DEPEND} ${VTK_DEPEND}
   )
 set( Tools
   ANTS
@@ -570,7 +599,7 @@
   -DGenerateCLP_DIR:PATH=${GenerateCLP_DIR}
   -DModuleDescriptionParser_DIR:PATH=${ModuleDescriptionParser_DIR}
   -DTCLAP_DIR:PATH=${TCLAP_DIR}
-  DEPENDS ${ITK_DEPEND}
+  DEPENDS ${ITK_DEPEND} ${VTK_DEPEND}
   )
 set( Tools
   ImageMath


COMP: Merge branch 'bug-18735-DeleteDisplayGeometry-Clean'

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag 89ea8fb6) # first 8 characters of hash-tag
+  set(revision_tag ba680ca8) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


mitk-data revision tag adjusted.

mitk-data revision tag adjusted.

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 0872af7b)
+  set(revision_tag de6afaad)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


ENH: Added KWSYS_PLATFORM_CXX_TEST_RUN macro.

--- Utilities/kwsys/kwsysPlatformCxxTests.cmake
+++ Utilities/kwsys/kwsysPlatformCxxTests.cmake
@@ -43,3 +43,75 @@
     ENDIF(${var}_COMPILED)
   ENDIF(${invert} MATCHES INVERT)
 ENDMACRO(KWSYS_PLATFORM_CXX_TEST)
+
+MACRO(KWSYS_PLATFORM_CXX_TEST_RUN var description invert)
+  IF("${var}" MATCHES "^${var}$")
+    MESSAGE(STATUS "${description}")
+    TRY_RUN(${var} ${var}_COMPILED
+      ${CMAKE_CURRENT_BINARY_DIR}
+      ${CMAKE_CURRENT_SOURCE_DIR}/kwsysPlatformCxxTests.cxx
+      COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES}
+      OUTPUT_VARIABLE OUTPUT)
+
+    # Note that ${var} will be a 0 return value on success.
+    IF(${var}_COMPILED)
+      IF(${var})
+        FILE(APPEND
+          ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+          "${description} compiled but failed to run with the following output:\n${OUTPUT}\n\n")
+      ELSE(${var})
+        FILE(APPEND
+          ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+          "${description} compiled and ran with the following output:\n${OUTPUT}\n\n")
+      ENDIF(${var})
+    ELSE(${var}_COMPILED)
+      FILE(APPEND
+        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+        "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
+    ENDIF(${var}_COMPILED)
+
+    IF(${invert} MATCHES INVERT)
+      IF(${var}_COMPILED)
+        IF(${var})
+          MESSAGE(STATUS "${description} - yes")
+        ELSE(${var})
+          MESSAGE(STATUS "${description} - no")
+        ENDIF(${var})
+      ELSE(${var}_COMPILED)
+        MESSAGE(STATUS "${description} - failed to compile")
+      ENDIF(${var}_COMPILED)
+    ELSE(${invert} MATCHES INVERT)
+      IF(${var}_COMPILED)
+        IF(${var})
+          MESSAGE(STATUS "${description} - no")
+        ELSE(${var})
+          MESSAGE(STATUS "${description} - yes")
+        ENDIF(${var})
+      ELSE(${var}_COMPILED)
+        MESSAGE(STATUS "${description} - failed to compile")
+      ENDIF(${var}_COMPILED)
+    ENDIF(${invert} MATCHES INVERT)
+  ENDIF("${var}" MATCHES "^${var}$")
+
+  IF(${invert} MATCHES INVERT)
+    IF(${var}_COMPILED)
+      IF(${var})
+        SET(${var} 1)
+      ELSE(${var})
+        SET(${var} 0)
+      ENDIF(${var})
+    ELSE(${var}_COMPILED)
+      SET(${var} 1)
+    ENDIF(${var}_COMPILED)
+  ELSE(${invert} MATCHES INVERT)
+    IF(${var}_COMPILED)
+      IF(${var})
+        SET(${var} 0)
+      ELSE(${var})
+        SET(${var} 1)
+      ENDIF(${var})
+    ELSE(${var}_COMPILED)
+      SET(${var} 0)
+    ENDIF(${var}_COMPILED)
+  ENDIF(${invert} MATCHES INVERT)
+ENDMACRO(KWSYS_PLATFORM_CXX_TEST_RUN)


fixed text

fixed text

--- SuperBuild/External_CCPi-RGL.cmake
+++ SuperBuild/External_CCPi-RGL.cmake
@@ -71,7 +71,7 @@
       set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python")
     endif()
     message(STATUS "Python libraries found")
-    message(STATUS "SIRF Python modules will be installed in " ${PYTHON_DEST})
+    message(STATUS "CIL Regularisation Python modules will be installed in " ${PYTHON_DEST})
   endif()
     set(PYTHON_STRATEGY "PYTHONPATH" CACHE STRING "\
       PYTHONPATH: prefix PYTHONPATH \n\


Disable webkit in paraview

Disable webkit in paraview

--- Superbuild/Projects/paraview.cmake
+++ Superbuild/Projects/paraview.cmake
@@ -43,6 +43,8 @@

     -DModule_vtklibproj4:BOOL=TRUE

+    -DPQWIDGETS_DISABLE_QTWEBKIT:BOOL=ON
+
     # specify the apple app install prefix. No harm in specifying it for all
     # platforms.
     -DMACOSX_APP_INSTALL_PREFIX:PATH=<INSTALL_DIR>/Applications


getdeps: allow aliasing sources for add_fb_python_executable

Summary:
* Fix a minor issue with `add_fb_python_executable` where it would
  emit `--main` even if `MAIN_MODULE` had not been specified
* Introduce the ability to rename python sources in the manifest so
  that they have a different install path.
* Note that this changes the DEPENDS parameters to reference abs_sources;
  previously these were using relative paths to the sources pulled directly
  from the SOURCES arguments, but since those can now contain aliasing
  operations we need to pre-process the list.  I switched to abs_sources
  because that was already being maintained.  If for some reason the
  DEPENDS list needs to be relative paths, this will need to be adjusted.

Reviewed By: simpkins

Differential Revision: D17147417

fbshipit-source-id: d0825bfbdad6be658c078aaac6645e6926a1530f

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -47,10 +47,11 @@
 # Build a self-executing python binary.
 #
 # This accepts the same arguments as add_fb_python_library().
-# In addition, a MAIN_MODULE argument is required.  This argument specifies
+#
+# In addition, a MAIN_MODULE argument is accepted.  This argument specifies
 # which module should be started as the __main__ module when the executable is
-# run.
-#
+# run.  If left unspecified, a __main__.py script must be present in the
+# manifest.
 function(add_fb_python_executable EXE_NAME)
   # Parse the arguments
   set(one_value_args BASE_DIR NAMESPACE MAIN_MODULE TYPE)
@@ -105,11 +106,15 @@
     endif()
   endif()

+  if(DEFINED ARG_MAIN_MODULE)
+    set(main_argument "--main" "${ARG_MAIN_MODULE}")
+  endif()
+
   add_custom_command(
     OUTPUT "${output_file}"
     ${extra_cmd_params}
     COMMAND
-      "${MAKE_PYTHON_ARCHIVE}" -o "${EXE_NAME}" --main "${ARG_MAIN_MODULE}"
+      "${MAKE_PYTHON_ARCHIVE}" -o "${EXE_NAME}" ${main_argument}
       ${make_py_args}
     DEPENDS
       ${source_files}
@@ -145,6 +150,11 @@
 #   namespace of "foo.bar"
 # - SOURCES <src1> <...>:
 #   The python source files.
+#   You may optionally specify as source using the form: PATH=ALIAS where
+#   PATH is a relative path in the source tree and ALIAS is the relative
+#   path into which PATH should be rewritten.  This is useful for mapping
+#   an executable script to the main module in a python executable.
+#   e.g.: `python/bin/watchman-wait=__main__.py`
 # - DEPENDS <target1> <...>:
 #   Other python libraries that this one depends on.
 # - INSTALL_DIR <dir>:
@@ -229,23 +239,43 @@
   file(WRITE "${tmp_manifest}" "FBPY_MANIFEST 1\n")
   set(abs_sources)
   foreach(src_path IN LISTS ARG_SOURCES)
+    if("${src_path}" MATCHES "=")
+      # We want to split the string on the `=` sign, but cmake doesn't
+      # provide much in the way of helpers for this, so we rewrite the
+      # `=` sign to `;` so that we can treat it as a cmake list and
+      # then index into the components
+      string(REPLACE "=" ";" src_path_list "${src_path}")
+      list(GET src_path_list 0 src_path)
+      # Note that we ignore the `namespace_dir` in the alias case
+      # in order to allow aliasing a source to the top level `__main__.py`
+      # filename.
+      list(GET src_path_list 1 dest_path)
+    else()
+      unset(dest_path)
+    endif()
+
     get_filename_component(abs_source "${src_path}" ABSOLUTE)
     list(APPEND abs_sources "${abs_source}")
     file(RELATIVE_PATH rel_src "${ARG_BASE_DIR}" "${abs_source}")
+
+    if(NOT DEFINED dest_path)
+      if("${rel_src}" MATCHES "^../")
+        message(
+          FATAL_ERROR "${LIB_NAME}: source file \"${abs_source}\" is not inside "
+          "the base directory ${ARG_BASE_DIR}"
+        )
+      endif()
+      set(dest_path "${namespace_dir}${rel_src}")
+    endif()
+
     target_sources(
       "${LIB_NAME}.py_lib" INTERFACE
       "$<BUILD_INTERFACE:${abs_source}>"
-      "$<INSTALL_INTERFACE:${install_dir}${LIB_NAME}/${namespace_dir}${rel_src}>"
+      "$<INSTALL_INTERFACE:${install_dir}${LIB_NAME}/${dest_path}>"
     )
-    if("${rel_src}" MATCHES "^../")
-      message(
-        FATAL_ERROR "${LIB_NAME}: source file \"${abs_source}\" is not inside "
-        "the base directory ${ARG_BASE_DIR}"
-      )
-    endif()
     file(
       APPEND "${tmp_manifest}"
-      "${abs_source} :: ${namespace_dir}${rel_src}\n"
+      "${abs_source} :: ${dest_path}\n"
     )
   endforeach()
   configure_file("${tmp_manifest}" "${manifest_path}" COPYONLY)
@@ -260,7 +290,7 @@
   # This is needed in case some of the source files are generated.  This will
   # ensure that these source files are brought up-to-date before we build
   # any python binaries that depend on this library.
-  add_custom_target("${LIB_NAME}.py_sources_built" DEPENDS ${ARG_SOURCES})
+  add_custom_target("${LIB_NAME}.py_sources_built" DEPENDS ${abs_sources})
   add_dependencies("${LIB_NAME}.py_lib" "${LIB_NAME}.py_sources_built")

   # Hook up library dependencies, and also make the *.py_sources_built target
@@ -306,7 +336,7 @@
       --install-dir "${LIB_NAME}"
       -o "${build_install_dir}/${LIB_NAME}" "${manifest_path}"
     DEPENDS
-      "${ARG_SOURCES}"
+      "${abs_sources}"
       "${manifest_path}"
       "${MAKE_PYTHON_ARCHIVE}"
   )


[FIX] include -lpthread for FreeBSD

[FIX] include -lpthread for FreeBSD

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -279,6 +279,8 @@

 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
   set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} rt pthread)
+elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+  set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} pthread)
 endif ()

 # libexecinfo -- implicit


add generated constant definitions to library

Summary: when trying to build openr with `getDeps.py` constant definitions where not available since they were not part of the generated thrift lib. this fixes it.

Reviewed By: chadaustin

Differential Revision: D16064417

fbshipit-source-id: ee2b3e061caf67235f4a873405cf6cd6fb663ef4

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -59,12 +59,12 @@
   # Compute the list of generated files
   list(APPEND generated_headers
     "${output_dir}/gen-cpp2/${base}_constants.h"
-    "${output_dir}/gen-cpp2/${base}_constants.cpp"
     "${output_dir}/gen-cpp2/${base}_types.h"
     "${output_dir}/gen-cpp2/${base}_types.tcc"
     "${output_dir}/gen-cpp2/${base}_types_custom_protocol.h"
   )
   list(APPEND generated_sources
+    "${output_dir}/gen-cpp2/${base}_constants.cpp"
     "${output_dir}/gen-cpp2/${base}_data.h"
     "${output_dir}/gen-cpp2/${base}_data.cpp"
     "${output_dir}/gen-cpp2/${base}_types.cpp"


Do not escape.

Do not escape.

    * build-aux/cmake/modules/Revision.cmake: Do that.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/Revision.cmake
+++ build-aux/cmake/modules/Revision.cmake
@@ -1,6 +1,4 @@
 # - Generate a cmake file containing repository information
-
-include(Escape)

 if(NOT COMMAND REVISION)

@@ -38,7 +36,6 @@
 	ERROR_VARIABLE err
 	OUTPUT_STRIP_TRAILING_WHITESPACE)
       string(REGEX REPLACE "commit [0-9a-fA-F]*\n" "" out ${out})
-      escape_double_quote(out ${out})
       set(${outvar} ${out} PARENT_SCOPE)
       if(NOT is-git-repo EQUAL 0)
 	message(FATAL_ERROR "git_rev_list: failed with format '${format}'


ENH: Update to recent version of VTK v6.1.0.rc1

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -160,7 +160,7 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://vtk.org/VTK.git)
-  set(${proj}_GIT_TAG "v5.10.0")
+  set(${proj}_GIT_TAG "v6.1.0.rc1")
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


Fix cpplint CMake option description.

Fix cpplint CMake option description.

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -143,7 +143,7 @@
 ## CMake support for running Google's cpplint over the C++ source.

 # Should we bother with cpplint at all?
-option(SURGSIM_CPPLINT "Include the unit tests in the build" ON)
+option(SURGSIM_CPPLINT "Include cpplint in the build" ON)

 # Running cpplint requires Python
 if(SURGSIM_CPPLINT)


Removing blankline at at end of file.

Removing blankline at at end of file.

Change-Id: I774269f5844f98c84603016b91e80802abb56817

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -77,4 +77,3 @@
     messge(FATAL "VTK_TCL_EXE not set")
   endif()
 endmacro(add_test_tcl)
-


SuperBuild: openjpeg missing png lib dependency

--- SuperBuild/CMake/External_openjpeg.cmake
+++ SuperBuild/CMake/External_openjpeg.cmake
@@ -14,16 +14,19 @@
   message(STATUS "  Using OpenJPEG SuperBuild version")

   # declare dependencies
-  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} ZLIB TIFF)
+  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} ZLIB TIFF PNG)

   INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES})
   # set proj back to its original value
   set(proj OPENJPEG)
-
+
   ADD_SUPERBUILD_CMAKE_VAR(TIFF_INCLUDE_DIR)
   ADD_SUPERBUILD_CMAKE_VAR(TIFF_LIBRARY)
   ADD_SUPERBUILD_CMAKE_VAR(ZLIB_INCLUDE_DIR)
   ADD_SUPERBUILD_CMAKE_VAR(ZLIB_LIBRARY)
+  ADD_SUPERBUILD_CMAKE_VAR(PNG_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(PNG_LIBRARY)
+

   if(MSVC)
   #TODO: add LCMS dependency


ENH: minor fix

ENH: minor fix

--- Utilities/Upgrading/NewPipeConvert.cmake
+++ Utilities/Upgrading/NewPipeConvert.cmake
@@ -41,7 +41,7 @@

 STRING (REGEX REPLACE
   "ExecuteInformation[ \t]*\\([^,\)]*,[^\)]*\\)"
-  "ExecuteInformation (vtkInformation *, vtkInformationVector *, vtkInformationVector *)"
+  "ExecuteInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)"
   H_CONTENTS "${H_CONTENTS}")

 STRING (REGEX REPLACE
@@ -51,12 +51,12 @@

 STRING (REGEX REPLACE
   "ExecuteInformation[ \t]*\\([ \t]*\\)"
-  "ExecuteInformation (vtkInformation *, vtkInformationVector *, vtkInformationVector *)"
+  "ExecuteInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)"
   H_CONTENTS "${H_CONTENTS}")

 STRING (REGEX REPLACE
   "ComputeInputUpdateExtent[ \t]*\\([^,]*,[^,\)]*\\)"
-  "RequestUpdateExtent (vtkInformation *, vtkInformationVector *, vtkInformationVector *)"
+  "RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)"
   H_CONTENTS "${H_CONTENTS}")

 FILE (WRITE ${H_FILE} "${H_CONTENTS}")


Auto detect qt

Auto detect qt

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -122,18 +122,7 @@
     SET(QT_MIN_VERSION "5.13")
   ENDIF()

-  SET(Qt5_PATH "" CACHE PATH "Path to directory where Qt 5 is installed. Directory should contain lib and bin subdirectories.")
-
-  IF(IS_DIRECTORY ${Qt5_PATH})
-    FIND_PACKAGE(Qt5Core ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
-    FIND_PACKAGE(Qt5Gui ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
-	  FIND_PACKAGE(Qt5Widgets ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
-	  FIND_PACKAGE(Qt5Network ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
-    FIND_PACKAGE(Qt5OpenGL ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
-	  FIND_PACKAGE(Qt5Concurrent ${QT_MIN_VERSION} REQUIRED HINTS ${Qt5_PATH})
-  ELSE()
-    MESSAGE(SEND_ERROR "Set Qt5_PATH to directory where Qt 5 is installed (containing lib and bin subdirectories) or set BUILD_HEADLESS to ON.")
-  ENDIF()
+  FIND_PACKAGE(Qt5 COMPONENTS Core Gui Widgets Network OpenGL Concurrent REQUIRED)

   IF(APPLE)
     SET(MACDEPLOYQT_OUTPUT_LEVEL 0 CACHE STRING "Set macdeployqt output level (0-3)")
@@ -291,7 +280,6 @@

 IF(NOT BUILD_HEADLESS)
   LIST(APPEND SCIRUN_CACHE_ARGS
-    "-DQt5_PATH:PATH=${Qt5_PATH}"
     "-DQt5Core_DIR:PATH=${Qt5Core_DIR}"
     "-DQt5Gui_DIR:PATH=${Qt5Gui_DIR}"
     "-DQt5OpenGL_DIR:PATH=${Qt5OpenGL_DIR}"


Support CMake 3.18 CUDA_ARCHITECTURES

Support CMake 3.18 CUDA_ARCHITECTURES

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -16,10 +16,6 @@
             set(CUDA_ARCH_LIST 60 CACHE STRING "List of target sm_ architectures to compile CUDA code for. Separate with semicolons.")
         endif()

-        foreach(_cuda_arch ${CUDA_ARCH_LIST})
-            set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_${_cuda_arch},code=sm_${_cuda_arch}")
-        endforeach (_cuda_arch)
-
         # need to know the minimum supported CUDA_ARCH
         set(_cuda_arch_list_sorted ${CUDA_ARCH_LIST})
         list(SORT _cuda_arch_list_sorted)
@@ -28,12 +24,26 @@

         if (_cuda_min_arch LESS 60)
             message(SEND_ERROR "HOOMD requires compute 6.0 or newer")
-        endif ()
+        endif()

         # only generate ptx code for the maximum supported CUDA_ARCH (saves on file size)
         list(REVERSE _cuda_arch_list_sorted)
         list(GET _cuda_arch_list_sorted 0 _cuda_max_arch)
-        set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_${_cuda_max_arch},code=compute_${_cuda_max_arch}")
+
+        if (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18)
+            # CMAKE 3.18 handles CUDA ARCHITECTURES with CMAKE_CUDA_ARCHITECTURES
+            set(CMAKE_CUDA_ARCHITECTURES "")
+            foreach(_cuda_arch ${CUDA_ARCH_LIST})
+                list(APPEND CMAKE_CUDA_ARCHITECTURES "${_cuda_arch}-real")
+            endforeach()
+            list(APPEND CMAKE_CUDA_ARCHITECTURES "${_cuda_max_arch}-virtual")
+        else()
+            foreach(_cuda_arch ${CUDA_ARCH_LIST})
+                set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_${_cuda_arch},code=sm_${_cuda_arch}")
+            endforeach()
+            set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_${_cuda_max_arch},code=compute_${_cuda_max_arch}")
+        endif()
+
     elseif(HIP_PLATFORM STREQUAL "hip-clang")
         set(_cuda_min_arch 35)
     endif()


Updated FindFreeImage.cmake to handle switch of lib type

--- CMakeModules/FindFreeImage.cmake
+++ CMakeModules/FindFreeImage.cmake
@@ -10,44 +10,48 @@
 OPTION(FREEIMAGE_STATIC "Use Static FreeImage Lib" OFF)

 FIND_PATH( FREEIMAGE_INCLUDE_PATH
-        NAMES FreeImage.h
-        HINTS ${PROJECT_SOURCE_DIR}/extern/FreeImage
-        PATHS
-        /usr/include
-        /usr/local/include
-        /sw/include
-        /opt/local/include
-        DOC "The directory where FreeImage.h resides")
+    NAMES FreeImage.h
+    HINTS ${PROJECT_SOURCE_DIR}/extern/FreeImage
+    PATHS
+    /usr/include
+    /usr/local/include
+    /sw/include
+    /opt/local/include
+    DOC "The directory where FreeImage.h resides")
+
+FIND_LIBRARY( FREEIMAGE_DYNAMIC_LIBRARY
+    NAMES FreeImage freeimage
+    HINTS ${PROJECT_SOURCE_DIR}/FreeImage
+    PATHS
+    /usr/lib64
+    /usr/lib
+    /usr/local/lib64
+    /usr/local/lib
+    /sw/lib
+    /opt/local/lib
+    DOC "The FreeImage library")
+
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
+FIND_LIBRARY( FREEIMAGE_STATIC_LIBRARY
+    NAMES FreeImageLIB FreeImage freeimage
+    HINTS ${PROJECT_SOURCE_DIR}/FreeImage
+    PATHS
+    /usr/lib64
+    /usr/lib
+    /usr/local/lib64
+    /usr/local/lib
+    /sw/lib
+    /opt/local/lib
+    DOC "The FreeImage library")
+
 IF(FREEIMAGE_STATIC)
-  SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
-  FIND_LIBRARY( FREEIMAGE_LIBRARY
-  NAMES FreeImageLIB FreeImage freeimage
-        HINTS ${PROJECT_SOURCE_DIR}/FreeImage
-        PATHS
-        /usr/lib64
-        /usr/lib
-        /usr/local/lib64
-        /usr/local/lib
-        /sw/lib
-        /opt/local/lib
-        DOC "The FreeImage library")
+  MESSAGE(STATUS "Using Static FreeImage Lib")
   ADD_DEFINITIONS(-DFREEIMAGE_LIB)
+  SET(FREEIMAGE_LIBRARY ${FREEIMAGE_STATIC_LIBRARY})
 ELSE(FREEIMAGE_STATIC)
-FIND_LIBRARY( FREEIMAGE_LIBRARY
-        NAMES FreeImage freeimage
-        HINTS ${PROJECT_SOURCE_DIR}/FreeImage
-        PATHS
-        /usr/lib64
-        /usr/lib
-        /usr/local/lib64
-        /usr/local/lib
-        /sw/lib
-        /opt/local/lib
-        DOC "The FreeImage library")
+  MESSAGE(STATUS "Using Dynamic FreeImage Lib")
+  SET(FREEIMAGE_LIBRARY ${FREEIMAGE_DYNAMIC_LIBRARY})
 ENDIF(FREEIMAGE_STATIC)
-
-SET(FREEIMAGE_INCLUDE_DIRS ${FREEIMAGE_INCLUDE_PATH})
-SET(FREEIMAGE_LIBRARIES ${FREEIMAGE_LIBRARY})

 MARK_AS_ADVANCED(
     FREEIMAGE_LIBRARY


[DSim -> TravelSim].

[DSim -> TravelSim].

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1068,21 +1068,21 @@
   endif (${ARGC} GREATER 0)

   find_package (DSim ${_required_version} REQUIRED
-	HINTS ${WITH_DSIM_PREFIX})
+	HINTS ${WITH_TVLSIM_PREFIX})
   if (DSim_FOUND)
     #
-    message (STATUS "Found DSim version: ${DSIM_VERSION}")
+    message (STATUS "Found DSim version: ${TVLSIM_VERSION}")

     # Update the list of include directories for the project
-    include_directories (${DSIM_INCLUDE_DIRS})
+    include_directories (${TVLSIM_INCLUDE_DIRS})

     # Update the list of dependencies for the project
-    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${DSIM_LIBRARIES})
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${TVLSIM_LIBRARIES})

   else (DSim_FOUND)
     set (ERROR_MSG "The DSim library cannot be found. If it is installed in")
     set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
-    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_DSIM_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_TVLSIM_PREFIX=")
     set (ERROR_MSG "${ERROR_MSG}<DSim install path> variable.")
     message (FATAL_ERROR "${ERROR_MSG}")
   endif (DSim_FOUND)
@@ -2350,12 +2350,12 @@
   if (DSim_FOUND)
     message (STATUS)
     message (STATUS "* DSim:")
-    message (STATUS "  - DSIM_VERSION .................. : ${DSIM_VERSION}")
-    message (STATUS "  - DSIM_BINARY_DIRS .............. : ${DSIM_BINARY_DIRS}")
-    message (STATUS "  - DSIM_EXECUTABLES .............. : ${DSIM_EXECUTABLES}")
-    message (STATUS "  - DSIM_LIBRARY_DIRS ............. : ${DSIM_LIBRARY_DIRS}")
-    message (STATUS "  - DSIM_LIBRARIES ................ : ${DSIM_LIBRARIES}")
-    message (STATUS "  - DSIM_INCLUDE_DIRS ............. : ${DSIM_INCLUDE_DIRS}")
+    message (STATUS "  - TVLSIM_VERSION .................. : ${TVLSIM_VERSION}")
+    message (STATUS "  - TVLSIM_BINARY_DIRS .............. : ${TVLSIM_BINARY_DIRS}")
+    message (STATUS "  - TVLSIM_EXECUTABLES .............. : ${TVLSIM_EXECUTABLES}")
+    message (STATUS "  - TVLSIM_LIBRARY_DIRS ............. : ${TVLSIM_LIBRARY_DIRS}")
+    message (STATUS "  - TVLSIM_LIBRARIES ................ : ${TVLSIM_LIBRARIES}")
+    message (STATUS "  - TVLSIM_INCLUDE_DIRS ............. : ${TVLSIM_INCLUDE_DIRS}")
   endif (DSim_FOUND)
 endmacro (display_dsim)


emscripten: use shell_minimal.html file, and added cmake option to set shell file

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -30,6 +30,24 @@
 elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
     set(EMSC_EMSDK_DIRNAME "../fips-sdks/linux/emsdk_portable/emscripten/${FIPS_EMSCRIPTEN_SDK_VERSION}")
 endif()
+
+# find the emscripten SDK and set the "EMSC_HAS_LOCAL_CONFIG" variable
+macro(find_emscripten_sdk)
+    # first check for the official EMSDK, this does not allow to override
+    # the location of the .emscripten config file
+    get_filename_component(EMSCRIPTEN_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../${EMSC_EMSDK_DIRNAME}" ABSOLUTE)
+    if (EXISTS "${EMSCRIPTEN_ROOT_PATH}/emcc")
+        message("Emscripten SDK found (emsdk): ${EMSCRIPTEN_ROOT_PATH}")
+    else()
+        message(FATAL_ERROR "Could not find emscripten SDK! Please run 'fips setup emscripten'!")
+    endif()
+endmacro()
+
+# find the emscripten SDK
+find_emscripten_sdk()
+
+# Normalize, convert Windows backslashes to forward slashes or CMake will crash.
+get_filename_component(EMSCRIPTEN_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}" ABSOLUTE)

 set(FIPS_PLATFORM EMSCRIPTEN)
 set(FIPS_PLATFORM_NAME "emsc")
@@ -47,6 +65,7 @@
 set(FIPS_EMSCRIPTEN_OUTLINING_LIMIT 60000 CACHE STRING "emscripten: outlining limit")
 set(FIPS_EMSCRIPTEN_MEM_INIT_METHOD 1 CACHE STRING "emscripten: how to represent initial memory content (0..2)")
 set(FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS "['_main','_enter_fullscreen','_enter_soft_fullscreen']" CACHE STRING "emscripten: exported C function names")
+set(FIPS_EMSCRIPTEN_SHELL_HTML "${EMSCRIPTEN_ROOT_PATH}/src/shell_minimal.html" CACHE STRING "emscripten: path to shell html file")

 # memory-init-method also needs the --memory-init-file option
 if (${FIPS_EMSCRIPTEN_MEM_INIT_METHOD} STREQUAL 1)
@@ -122,6 +141,9 @@
 else()
     set(EMSCRIPTEN_WASM_FLAGS "")
 endif()
+
+# shell.html file
+set(EMSCRIPTEN_SHELL_FLAGS "--shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")

 message("FIPS_EMSCRIPTEN_TOTAL_MEMORY: ${FIPS_EMSCRIPTEN_TOTAL_MEMORY}")
 message("FIPS_EMSCRIPTEN_LTO_LEVEL: ${FIPS_EMSCRIPTEN_LTO_LEVEL}")
@@ -130,6 +152,7 @@
 message("FIPS_EMSCRIPTEN_USE_WASM: ${FIPS_EMSCRIPTEN_USE_WASM}")
 message("FIPS_EMSCRIPTEN_USE_WASM_ASMJS: ${FIPS_EMSCRIPTEN_USE_WASM_ASMJS}")
 message("FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS: ${FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS}")
+message("FIPS_EMSCRIPTEN_SHELL_HTML: ${FIPS_EMSCRIPTEN_SHELL_HTML}")
 message("EMSCRIPTEN_TOTAL_MEMORY_WORKER: ${EMSCRIPTEN_TOTAL_MEMORY_WORKER}")
 message("EMSCRIPTEN_USE_CLOSURE: ${EMSCRIPTEN_USE_CLOSURE}")
 message("EMSCRIPTEN_ASSERTIONS: ${EMSCRIPTEN_ASSERTIONS}")
@@ -143,24 +166,6 @@
 set(CMAKE_SYSTEM_VERSION 1)
 set(COMPILING on)
 set(CMAKE_CROSSCOMPILING TRUE)
-
-# find the emscripten SDK and set the "EMSC_HAS_LOCAL_CONFIG" variable
-macro(find_emscripten_sdk)
-    # first check for the official EMSDK, this does not allow to override
-    # the location of the .emscripten config file
-    get_filename_component(EMSCRIPTEN_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../${EMSC_EMSDK_DIRNAME}" ABSOLUTE)
-    if (EXISTS "${EMSCRIPTEN_ROOT_PATH}/emcc")
-        message("Emscripten SDK found (emsdk): ${EMSCRIPTEN_ROOT_PATH}")
-    else()
-        message(FATAL_ERROR "Could not find emscripten SDK! Please run 'fips setup emscripten'!")
-    endif()
-endmacro()
-
-# find the emscripten SDK
-find_emscripten_sdk()
-
-# Normalize, convert Windows backslashes to forward slashes or CMake will crash.
-get_filename_component(EMSCRIPTEN_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}" ABSOLUTE)

 # Find the .emscripten file and cache, this is either setup locally in the
 # emscripten SDK (this is the preferred way and used by 'fips setup emscripten',
@@ -230,7 +235,7 @@
 set(CMAKE_C_FLAGS_PROFILING "${EMSCRIPTEN_OPT} -DNDEBUG --profiling")

 # linker flags
-set(CMAKE_EXE_LINKER_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file ${EMSCRIPTEN_MEMORY_INIT_FLAG} -s MEM_INIT_METHOD=${FIPS_EMSCRIPTEN_MEM_INIT_METHOD} -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY} -s EXPORTED_FUNCTIONS=\"${FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS}\" -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP} -s SAFE_HEAP=${EMSCRIPTEN_SAFE_HEAP} -s NO_EXIT_RUNTIME=1 ${EMSCRIPTEN_WASM_FLAGS}")
+set(CMAKE_EXE_LINKER_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file ${EMSCRIPTEN_MEMORY_INIT_FLAG} -s MEM_INIT_METHOD=${FIPS_EMSCRIPTEN_MEM_INIT_METHOD} -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY} -s EXPORTED_FUNCTIONS=\"${FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS}\" -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP} -s SAFE_HEAP=${EMSCRIPTEN_SAFE_HEAP} -s NO_EXIT_RUNTIME=1 ${EMSCRIPTEN_WASM_FLAGS} ${EMSCRIPTEN_SHELL_FLAGS}")
 set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE}")
 set(CMAKE_EXE_LINKER_FLAGS_PROFILING "--profiling ${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")


emscripten: remove FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS, use EMSCRIPTEN_KEEPALIVE macro instead

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -59,7 +59,6 @@
 set(FIPS_EMSCRIPTEN_LTO_LEVEL 1 CACHE STRING "emscripten: Link-time-optimization level (0..3)")
 set(FIPS_EMSCRIPTEN_OUTLINING_LIMIT 60000 CACHE STRING "emscripten: outlining limit")
 set(FIPS_EMSCRIPTEN_MEM_INIT_METHOD 1 CACHE STRING "emscripten: how to represent initial memory content (0..2)")
-set(FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS "['_main','_enter_fullscreen','_enter_soft_fullscreen','_emsc_pass_data','_emsc_put_msg']" CACHE STRING "emscripten: exported C function names")
 set(FIPS_EMSCRIPTEN_SHELL_HTML "${EMSCRIPTEN_ROOT_PATH}/src/shell_minimal.html" CACHE STRING "emscripten: path to shell html file")
 set(EMSCRIPTEN_TOTAL_MEMORY_WORKER 16777216)

@@ -73,7 +72,6 @@
 set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} --memory-init-file ${FIPS_EMSCRIPTEN_MEM_INIT_METHOD}")
 set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY}")
 set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1")
-set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s EXPORTED_FUNCTIONS=\"${FIPS_EMSCRIPTEN_EXPORTED_FUNCTIONS}\"")
 set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s NO_EXIT_RUNTIME=1")

 if (FIPS_PROFILING)


Install Xrootd libraries into ${ROOTSYS}/lib when using builtin_xrootd option.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -624,6 +624,9 @@
                        ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdClient${CMAKE_SHARED_LIBRARY_SUFFIX}
                        ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/libXrdCl${CMAKE_SHARED_LIBRARY_SUFFIX})
   set(XROOTD_CFLAGS "-DROOTXRDVERS=${xrootd_versionnum}")
+  install(DIRECTORY ${CMAKE_BINARY_DIR}/${_LIBDIR_DEFAULT}/ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+                    COMPONENT libraries
+                    FILES_MATCHING PATTERN "libXrd*${CMAKE_SHARED_LIBRARY_SUFFIX}")
   set(xrootd ON CACHE BOOL "" FORCE)
 endif()
 if(xrootd AND xrootd_versionnum VERSION_GREATER 300030005)


ARROW-1182: C++: Specify BUILD_BYPRODUCTS for zlib and zstd

Change-Id: I7f4ce23ead7ab1b27741b80a382c0cd4d0019895

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #808 from xhochy/ARROW-1182 and squashes the following commits:

8dfe7b62 [Uwe L. Korn] ARROW-1182: C++: Specify BUILD_BYPRODUCTS for zlib and zstd

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -673,6 +673,7 @@
       CONFIGURE_COMMAND ""
       INSTALL_COMMAND ""
       BINARY_DIR ${LZ4_BUILD_DIR}
+      BUILD_BYPRODUCTS ${LZ4_STATIC_LIB}
       ${LZ4_BUILD_COMMAND}
       )

@@ -712,6 +713,7 @@
       CONFIGURE_COMMAND ""
       INSTALL_COMMAND ""
       BINARY_DIR ${ZSTD_BUILD_DIR}
+      BUILD_BYPRODUCTS ${ZSTD_STATIC_LIB}
       ${ZSTD_BUILD_COMMAND}
       )


Add Debian dependencies to cpack config

Add Debian dependencies to cpack config

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -6,4 +6,5 @@
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.txt")
 set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
-set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")+set(CPACK_PACKAGE_FILE_NAME "illarion")
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-system1.67.0, libboost-graph1.67.0, libc6 (>= 2.14), libgcc1 (>= 1:3.0), liblua5.2-0, libluabind0.9.1d1, libpqxx-6.2 (>= 6.2), libstdc++6 (>= 6)")


Added CTEST_PROJECT_NAME to default config in CTestConfig.cmake

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -18,6 +18,7 @@
 	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=WinNETCDF")
 	SET (CTEST_DROP_SITE_CDASH TRUE)
 ELSE()
+	SET (CTEST_PROJECT_NAME "WinNETCDF")
 	SET (CTEST_DROP_METHOD "http")
 	SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/")
 	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=WinNETCDF")


ignore MSVC noise

ignore MSVC noise

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -1,5 +1,6 @@
 set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION}
    " C4723: " # MSVC 2012 can't suppress this warning
+   " C4756: " # MSVC 2012 can't suppress this warning
    "used uninitialized in this function"
    "Skipping compilation of tests gatherStruct and gather2dim because of clang bug" # Not a helpful warning for the dashboard
    "GCC < 4.3 does not have full support for SSE2 intrinsics." # Ignore self-made warning, though what I really want is a message when the warning is absent


Allow a user defined name for the doxygen config file. Otherwise DoxygenRule must be included from the top level CMakeLists.txt and the file must be doc/Doxyfile.

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -5,7 +5,11 @@
   return()
 endif()

-configure_file(doc/Doxyfile ${CMAKE_BINARY_DIR}/doc/Doxyfile @ONLY)
+if(NOT DOXYGEN_CONFIG_FILE)
+  # Assuming there exists a Doxyfile and that needs configuring
+  configure_file(doc/Doxyfile ${CMAKE_BINARY_DIR}/doc/Doxyfile @ONLY)
+  set(DOXYGEN_CONFIG_FILE ${CMAKE_BINARY_DIR}/doc/Doxyfile)
+endif()

 get_property(INSTALL_DEPENDS GLOBAL PROPERTY ALL_DEP_TARGETS)
 add_custom_target(doxygen_install
@@ -13,7 +17,7 @@
   DEPENDS ${ALL_DEP_TARGETS})

 add_custom_target(doxygen
-  ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/doc/Doxyfile
+  ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG_FILE}
   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc
   COMMENT "Generating API documentation using doxygen" VERBATIM)
 add_dependencies(doxygen doxygen_install)


Disable randomly failing test

Disable randomly failing test

--- Modules/PhotoacousticsLib/test/files.cmake
+++ Modules/PhotoacousticsLib/test/files.cmake
@@ -26,7 +26,7 @@
   mitkPhotoacousticNoiseGeneratorTest.cpp
   mitkSimulationBatchGeneratorTest.cpp
   mitkPropertyCalculatorTest.cpp
-  mitkSpectralUnmixingTest.cpp
+  # mitkSpectralUnmixingTest.cpp (See T27024)
   mitkPhotoacousticVesselMeanderStrategyTest.cpp
   mitkPhotoacousticVesselTest.cpp
 )


Try Travis CI fix for OSX

Try Travis CI fix for OSX

See comment from @saumitravikram:
https://github.com/civetweb/civetweb/issues/364#issuecomment-255461515

--- cmake/FindLibM.cmake
+++ cmake/FindLibM.cmake
@@ -29,7 +29,8 @@

 find_path(LIBM_INCLUDE_DIRS
   NAMES math.h
-  PATHS ${LIBM_ROOT}/include/
+  PATHS /usr/include /usr/local/include /usr/local/bic/include
+  NO_DEFAULT_PATH
 )
 find_library(LIBM_LIBRARIES m)
 include(FindPackageHandleStandardArgs)


Support Ogre with Boost < 1.50, slight formatting changes to FindOGRE

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -6,59 +6,58 @@

 set(ENV_OGRE_HOME $ENV{OGRE_HOME})
 if (ENV_OGRE_HOME)
-  string( REGEX REPLACE "\\\\" "/" ENV_OGRE_HOME ${ENV_OGRE_HOME} )
+    string( REGEX REPLACE "\\\\" "/" ENV_OGRE_HOME ${ENV_OGRE_HOME} )
 endif ()
-
+
 set(ENV_OGRE_SDK $ENV{OGRE_SDK})
 if (ENV_OGRE_SDK)
-  string( REGEX REPLACE "\\\\" "/" ENV_OGRE_SDK ${ENV_OGRE_SDK} )
+    string( REGEX REPLACE "\\\\" "/" ENV_OGRE_SDK ${ENV_OGRE_SDK} )
 endif ()

 set(OGRE_PREFIX_PATH
-  ${OGRE_HOME} ${OGRE_SDK} ${ENV_OGRE_HOME} ${ENV_OGRE_SDK}
+    ${OGRE_HOME} ${OGRE_SDK} ${ENV_OGRE_HOME} ${ENV_OGRE_SDK}
 )

 set(OGRE_PATH_SUFFIXES
-  ${OGRE_PATH_SUFFIXES} include OgreMain/include
+    ${OGRE_PATH_SUFFIXES} include OgreMain/include
 )

 # Find the Ogre include headers.
-find_path(OGRE_H_PATH
-          NAMES Ogre.h
-          PATHS ${OGRE_PREFIX_PATH}
+find_path(OGRE_H_PATH
+          NAMES Ogre.h
+          PATHS ${OGRE_PREFIX_PATH}
           PATH_SUFFIXES ${OGRE_PATH_SUFFIXES} OGRE)

 # Also find the build settings Ogre header.
-find_path(OGRE_H_BUILD_SETTINGS_PATH
-          NAMES OgreBuildSettings.h
-          PATHS ${OGRE_PREFIX_PATH}
+find_path(OGRE_H_BUILD_SETTINGS_PATH
+          NAMES OgreBuildSettings.h
+          PATHS ${OGRE_PREFIX_PATH}
           PATH_SUFFIXES ${OGRE_PATH_SUFFIXES} OGRE)

 # Find the release and debug libraries.
 find_library(OGRE_LIB NAMES OgreMain
-  PATHS ${OGRE_PREFIX_PATH}
-  PATH_SUFFIXES Release lib/Release
+    PATHS ${OGRE_PREFIX_PATH}
+    PATH_SUFFIXES Release lib/Release
 )
 find_library(OGRE_LIB_DBG NAMES OgreMain_d
-  PATHS ${OGRE_PREFIX_PATH}
-  PATH_SUFFIXES Debug lib/Debug
+    PATHS ${OGRE_PREFIX_PATH}
+    PATH_SUFFIXES Debug lib/Debug
 )
 mark_as_advanced(OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH OGRE_LIB OGRE_LIB_DBG)

 # If the Ogre build settings file was found, parse it to identify the Ogre Thread provider.
 # Basically test to see whether ${OGRE_H_BUILD_SETTINGS_PATH} is not OGRE_H_BUILD_SETTINGS_PATH-NOTFOUND
 if (OGRE_H_BUILD_SETTINGS_PATH)
-  DETERMINE_OGRE_THREAD_PROVIDER(OGRE_THREAD_PROVIDER ${OGRE_H_BUILD_SETTINGS_PATH}/OgreBuildSettings.h)
+    determine_ogre_thread_provider(OGRE_THREAD_PROVIDER ${OGRE_H_BUILD_SETTINGS_PATH}/OgreBuildSettings.h)
 endif ()

 find_package_handle_standard_args(OGRE DEFAULT_MSG OGRE_LIB OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH)

 # set up output vars
 if (OGRE_FOUND)
-
     # Set-up the directory (actually: list of directories that should be added to the inclusion list).
     set (OGRE_INCLUDE_DIR ${OGRE_H_PATH};${OGRE_H_BUILD_SETTINGS_PATH})
-
+
     # Set-up the list of directories for the OGRE libraries to link against in the Ogre related components.
     set (OGRE_LIBRARIES ${OGRE_LIB})
     if (OGRE_LIB_DBG)
@@ -67,27 +66,28 @@

     # Ogre was found. If the thread provider is boost, also search for the boost libs.
     if ("${OGRE_THREAD_PROVIDER}" STREQUAL "1")
-      # find_package(Boost 1.51 COMPONENTS python unit_test_framework system thread date_time chrono)
-      set(Boost_USE_STATIC_LIBS        ON)
-      set(Boost_USE_MULTITHREADED      ON)
-      set(Boost_USE_STATIC_RUNTIME    OFF)
-      find_package(Boost COMPONENTS thread QUIET)
-      find_package(Boost COMPONENTS system QUIET)
-      find_package(Boost COMPONENTS date_time QUIET)
-      find_package(Boost COMPONENTS chrono QUIET)
-      find_package_handle_standard_args(OGRE DEFAULT_MSG OGRE_LIB OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH)
-
-      # Add the Boost directories
-      set (OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIR};${Boost_INCLUDE_DIR})
+        if (Boost_VERSION LESS 105000) # boost thread transitionally requires boost system since Boost 1.50
+            find_package(Boost COMPONENTS thread)

-      # Add the Boost libraries.
-      if (OGRE_LIBRARIES)
-          set (OGRE_LIBRARIES ${OGRE_LIBRARIES};${Boost_THREAD_LIBRARY_RELEASE};${Boost_SYSTEM_LIBRARY_RELEASE};${Boost_DATE_TIME_LIBRARY_RELEASE};${Boost_CHRONO_LIBRARY_RELEASE})
-      endif ()
-
-      if (OGRE_LIBRARIES_DBG)
-          set (OGRE_LIBRARIES_DBG ${OGRE_LIBRARIES_DBG};${Boost_THREAD_LIBRARY_DEBUG};${Boost_SYSTEM_LIBRARY_DEBUG};${Boost_DATE_TIME_LIBRARY_DEBUG};${Boost_CHRONO_LIBRARY_DEBUG})
-      endif()
+            set(Boost_SYSTEM_LIBRARY_RELEASE "")
+            set(Boost_SYSTEM_LIBRARY_DEBUG "")
+        else()
+            find_package(Boost COMPONENTS thread system)
+        endif()
+
+        find_package_handle_standard_args(OGRE DEFAULT_MSG OGRE_LIB OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH)
+
+        # Add the Boost directories
+        set(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIR};${Boost_INCLUDE_DIR})
+
+        # Add the Boost libraries.
+        if (OGRE_LIBRARIES)
+          set (OGRE_LIBRARIES ${OGRE_LIBRARIES};${Boost_THREAD_LIBRARY_RELEASE};${Boost_SYSTEM_LIBRARY_RELEASE})
+        endif()
+
+        if (OGRE_LIBRARIES_DBG)
+          set (OGRE_LIBRARIES_DBG ${OGRE_LIBRARIES_DBG};${Boost_THREAD_LIBRARY_DEBUG};${Boost_SYSTEM_LIBRARY_DEBUG})
+        endif()
     endif()

     file (STRINGS "${OGRE_H_PATH}/OgrePrerequisites.h" _CEGUIOGREVERSIONDEFINES REGEX ".*#define OGRE_VERSION_.*[0-9]+")