STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   04)
+SET(KWSYS_DATE_STAMP_DAY   05)


More UploadPPA fixes

More UploadPPA fixes

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[x] Bugfix
[ ] New Feature
[ ] Cleanup
[ ] Optimization
[ ] Documentation

--- UploadPPA.cmake
+++ UploadPPA.cmake
@@ -191,4 +191,5 @@
     DEPENDS ${DEBIAN_BASE_DIR}/${DEB_SOURCE_CHANGES}
     WORKING_DIRECTORY ${DEBIAN_BASE_DIR}
     )
+  set(DPUT_${PROJECT_NAME}_TARGETS ${DPUT_${PROJECT_NAME}_TARGETS} dput_${PROJECT_NAME}_${UBUNTU_NAME} PARENT_SCOPE)
 endfunction()


plugins/browser: Linked mac build with Cocoa frameworks

git-svn-id: af919ac7fdf0be26aaa017563ec94cac29b44150@2559 0d7e1ef0-d974-fc83-f0b3-ccc071561e0e

--- Mac/projectDef.cmake
+++ Mac/projectDef.cmake
@@ -6,6 +6,11 @@
 # Mac template platform definition CMake file
 # Included from ../CMakeLists.txt

+find_library(FOUNDATION_LIBRARY Foundation)
+find_library(APPKIT_LIBRARY AppKit)
+
+set(EXTRA_LIBRARIES ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY})
+
 # remember that the current source dir is the project root; this file is in Mac/
 file (GLOB PLATFORM RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
     Mac/*.cpp
@@ -52,6 +57,7 @@
     ${ICONV_LIBRARIES}
     ${OPENSSLCRYPTO_LIBRARIES}
     ${SMARTCARDPP_LIBRARIES}
+    ${EXTRA_LIBRARIES}
     )

 add_dependencies(${PROJNAME}


Add labels to minerva style tests

Add labels to minerva style tests

--- plugin.cmake
+++ plugin.cmake
@@ -17,6 +17,20 @@
 function(add_minerva_server_test name)
   add_python_test("${name}" PLUGIN minerva)
   set_property(TEST "server_minerva.${name}" PROPERTY LABELS minerva_server)
+endfunction()
+
+function(add_minerva_python_style_test name path)
+  set(test_name "pep8_style_minerva_${name}")
+  add_python_style_test("${test_name}" "${PROJECT_SOURCE_DIR}/plugins/minerva/${path}")
+  set_property(TEST "${test_name}" PROPERTY LABELS minerva_server)
+endfunction()
+
+function(add_minerva_eslint_test name path)
+  add_eslint_test(
+    "${name}" "${PROJECT_SOURCE_DIR}/plugins/minerva/${path}"
+    ESLINT_CONFIG_FILE "${PROJECT_SOURCE_DIR}/plugins/minerva/.eslintrc.js"
+  )
+  set_property(TEST "eslint_${name}" PROPERTY LABELS minerva_client)
 endfunction()

 add_minerva_server_test(dataset)
@@ -43,28 +57,15 @@

-add_python_style_test(pep8_style_minerva_constants
-                      "${PROJECT_SOURCE_DIR}/plugins/minerva/server/constants.py")
-add_python_style_test(pep8_style_minerva_geonames
-                      "${PROJECT_SOURCE_DIR}/plugins/minerva/server/geonames")
-add_python_style_test(pep8_style_minerva_rest
-                      "${PROJECT_SOURCE_DIR}/plugins/minerva/server/rest")
-add_python_style_test(pep8_style_minerva_utility
-                      "${PROJECT_SOURCE_DIR}/plugins/minerva/server/utility")
-add_python_style_test(pep8_style_minerva_bsve
-                      "${PROJECT_SOURCE_DIR}/plugins/minerva/server/utility/bsve")
-add_python_style_test(pep8_style_minerva_jobs
-                      "${PROJECT_SOURCE_DIR}/plugins/minerva/server/jobs")
+add_minerva_python_style_test(constants "server/constants.py")
+add_minerva_python_style_test(geonames "server/geonames")
+add_minerva_python_style_test(rest "server/rest")
+add_minerva_python_style_test(utility "server/utility")
+add_minerva_python_style_test(bsve "server/utility/bsve")
+add_minerva_python_style_test(jobs "server/jobs")

-add_eslint_test(
-  minerva "${PROJECT_SOURCE_DIR}/plugins/minerva/web_external/js"
-  ESLINT_CONFIG_FILE "${PROJECT_SOURCE_DIR}/plugins/minerva/.eslintrc.js"
-)
-
-add_eslint_test(
-  minerva-gruntfile "${PROJECT_SOURCE_DIR}/plugins/minerva/Gruntfile.js"
-  ESLINT_CONFIG_FILE "${PROJECT_SOURCE_DIR}/plugins/minerva/.eslintrc.js"
-)
+add_minerva_eslint_test(minerva "web_external/js")
+add_minerva_eslint_test(minerva-gruntfile "Gruntfile.js")

 add_web_client_test(
     minerva "${PROJECT_SOURCE_DIR}/plugins/minerva/plugin_tests/client/minervaSpec.js"


COMP: deactivated mitkSegmentationInterpolationTest, no solution currently for Linux

--- Modules/MitkExt/Testing/files.cmake
+++ Modules/MitkExt/Testing/files.cmake
@@ -11,7 +11,7 @@
   mitkPlaneFitTest.cpp
   mitkPointLocatorTest.cpp
   # mitkRigidRegistrationPresetTest.cpp
-  mitkSegmentationInterpolationTest.cpp
+  # mitkSegmentationInterpolationTest.cpp
   mitkSymmetricForcesDemonsRegistrationTest.cpp
   # mitkTestTemplate.cpp
   mitkToolManagerTest.cpp


Fix copy&paste error in python.cmake

Fix copy&paste error in python.cmake

--- python.cmake
+++ python.cmake
@@ -53,7 +53,7 @@
     URL                 ${python_URL}
     URL_MD5             ${python_MD5}
     UPDATE_COMMAND      ""
-    PATCH_COMMAND       ${BUILDEM_ENV_STRING} ${PATCH_EXE} ${vtk_SRC_DIR}/Lib/multiprocessing/__init__.py ${PATCH_DIR}/python2.7.patch
+    PATCH_COMMAND       ${BUILDEM_ENV_STRING} ${PATCH_EXE} ${python_SRC_DIR}/Lib/multiprocessing/__init__.py ${PATCH_DIR}/python2.7.patch
     CONFIGURE_COMMAND   ${BUILDEM_ENV_STRING} ${python_SRC_DIR}/configure
         --prefix=${BUILDEM_DIR}
         ${PYTHON_BINARY_TYPE_ARG}


Separate FFTW3 threaded libraries only needed for non-WIN32

--- cmake/FindFFTW3.cmake
+++ cmake/FindFFTW3.cmake
@@ -38,7 +38,10 @@
   else()
      message(FATAL_ERROR "FindFFTW3: precision `${FFTW3_PRECISION}' incorrect! Must be 'single', 'double' or 'long-double'.")
   endif()
-  list(APPEND LIB_NAMES ${LIB_NAME} ${LIB_NAME}_threads)
+  list(APPEND LIB_NAMES ${LIB_NAME})
+  if (NOT WIN32)
+    list(APPEND LIB_NAMES ${LIB_NAME}_threads)
+  endif ()
 endforeach()
 #message("Lib names: ${LIB_NAMES}")


Priority to HDF5 from PETSc in FindHDF5.cmake

--- cmake-modules/FindHDF5.cmake
+++ cmake-modules/FindHDF5.cmake
@@ -43,6 +43,7 @@

 # The HINTS option should only be used for values computed from the system.
 SET (_HDF5_HINTS
+    ${PETSC_DIR}/${PETSC_ARCH}
     $ENV{HOME}/.local
     $ENV{HDF5_ROOT}
     $ENV{HDF5_ROOT_DIR_HINT}
@@ -50,6 +51,7 @@
 # Hard-coded guesses should still go in PATHS. This ensures that the user
 # environment can always override hard guesses.
 SET (_HDF5_PATHS
+    ${PETSC_DIR}/${PETSC_ARCH}
     $ENV{HOME}/.local
     $ENV{HDF5_ROOT}
     $ENV{HDF5_ROOT_DIR_HINT}
@@ -57,7 +59,6 @@
     /usr/share/hdf5
     /usr/local/hdf5
     /usr/local/hdf5/share
-    ${PETSC_DIR}/${PETSC_ARCH}
 )

 # FIND_PATH (HDF5_ROOT_DIR "hdf5-config.cmake"


Some libc versions have clock_gettime in libc not in librt

--- cmake-toolchains/linux.cmake
+++ cmake-toolchains/linux.cmake
@@ -44,7 +44,7 @@
 set(CMAKE_C_FLAGS_DEBUG "-O0 -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1 -ggdb")

 # exe linker flags
-set(CMAKE_EXE_LINKER_FLAGS "-pthread -dead_strip -lpthread -lrt")
+set(CMAKE_EXE_LINKER_FLAGS "-pthread -dead_strip -lpthread")
 set(CMAKE_EXE_LINKER_FLAGS_RELEASE "")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
 if (FIPS_GCC)
@@ -55,6 +55,10 @@
             set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -latomic")
         endif()
     endif()
+endif()
+check_library_exists(rt clock_gettime "time.h" FOUND_CLOCK_GETTIME)
+if (FOUND_CLOCK_GETTIME)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lrt")
 endif()

 # update cache variables for cmake gui


android toolchain: add back setting of ANDROID_SDK

--- cmake/AndroidToolchain.cmake
+++ cmake/AndroidToolchain.cmake
@@ -326,6 +326,12 @@
 # this one not so much
 set( CMAKE_SYSTEM_VERSION 1 )

+# Android SDK
+
+if (NOT DEFINED ANDROID_SDK)
+	set(ANDROID_SDK "$ENV{ANDROID_SDK}")
+endif()
+
 # rpath makes low sence for Android
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )


cmake: Update FindNSIS module.

cmake: Update FindNSIS module.

--- cmake/Modules/FindNSIS.cmake
+++ cmake/Modules/FindNSIS.cmake
@@ -1,14 +1,15 @@
 # - Try to find NSIS
 # Once done this will define
 #
-#  NSIS_ROOT_DIR - Set this variable to the root installation of ZLIB
+#  NSIS_ROOT_PATH - Set this variable to the root installation of NSIS
 #
 # Read-Only variables:
+#
 #  NSIS_FOUND - system has NSIS
 #  NSIS_MAKE - NSIS creator executable
 #
 #=============================================================================
-#  Copyright (c) 2010-2011 Andreas Schneider <asn@cryptomilk.org>
+#  Copyright (c) 2010-2013 Andreas Schneider <asn@cryptomilk.org>
 #
 #  Distributed under the OSI-approved BSD License (the "License");
 #  see accompanying file Copyright.txt for details.
@@ -19,21 +20,36 @@
 #=============================================================================
 #

-set(_NSIS_ROOT_PATHS
-    C:/NSIS/Bin
-    "$ENV{PROGRAMFILES}/NSIS"
-)
+if (WIN32)
+    set(_NSIS_ROOT_HINTS
+        "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\NSIS;Default]")
+
+    set(_NSIS_ROOT_PATHS
+        $ENV{PROGRAMFILES}/NSIS)
+
+    find_path(NSIS_ROOT_PATH
+        NAMES
+            Include/Library.nsh
+        HINTS
+            ${_NSIS_ROOT_HINTS}
+        PATHS
+            ${_NSIS_ROOT_PATHS}
+        )
+    mark_as_advanced(NSIS_ROOT_PATH)
+endif (WIN32)

 find_program(NSIS_MAKE
     NAMES
         makensis
     PATHS
         ${NSIS_ROOT_PATH}
-        ${NSIS_ROOT_PATH}/Bin
-        ${_NSIS_ROOT_PATHS}
 )

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(NSIS DEFAULT_MSG NSIS_MAKE)

+if (NSIS_MAKE)
+    set(NSIS_FOUND TRUE)
+endif (NSIS_MAKE)
+
 mark_as_advanced(NSIS_MAKE)


_nuke_ROOT_DIRS_LENGTH > 0

_nuke_ROOT_DIRS_LENGTH > 0

--- cmake/Modules/FindNuke.cmake
+++ cmake/Modules/FindNuke.cmake
@@ -17,7 +17,7 @@
   endif()
   list(SORT _nuke_ROOT_DIRS)
   list(LENGTH _nuke_ROOT_DIRS _nuke_ROOT_DIRS_LENGTH)
-  if(${_nuke_ROOT_DIRS_LENGTH} GREATER 1)
+  if(${_nuke_ROOT_DIRS_LENGTH} GREATER 0)
     list(GET _nuke_ROOT_DIRS 0 NUKE_ROOT)
   endif()
 endif()


Fix warning level for comments

Fix warning level for comments

--- cmake/PlatformLinuxGCC.cmake
+++ cmake/PlatformLinuxGCC.cmake
@@ -56,6 +56,7 @@
       -Wno-error=float-equal
       -Wno-error=conversion
       -Wno-error=switch
+      -Wno-error=comment

       -fPIC         # -> use position independent code
       -fvisibility=hidden # ->


Attempting to fix gcc version getter in cmake.

--- cmake/DOConfigureCompiler.cmake
+++ cmake/DOConfigureCompiler.cmake
@@ -28,11 +28,11 @@
 # GNU compiler
 elseif (CMAKE_COMPILER_IS_GNUCXX)
   execute_process(COMMAND "${CMAKE_CXX_COMPILER} -dumpversion"
-    OUTPUT_VARIABLE GCC_VERSION)
-  do_substep_message("GNU compiler version: ${GCC_VERSION}")
-  if (GCC_VERSION VERSION_LESS 4.5)
+                  OUTPUT_VARIABLE GCC_VERSION)
+  do_substep_message("${CMAKE_CXX_COMPILER} version: ${GCC_VERSION}")
+  if (GCC_VERSION  VERSION_LESS 4.5)
     message(FATAL_ERROR "GNU compiler version lower than 4.5 are not supported anymore: C++0x features (auto and lambda) are needed.")
-  elseif (GCC_VERSION VERSION_LESS 4.7)
+  elseif (GCC_VERSION  VERSION_LESS 4.7)
     set(ENABLE_CXX11 "-std=c++0x")
   else ()
     set (ENABLE_CXX11 "-std=c++11")


Attempt to fix gcc version getter in CMake

--- cmake/DOConfigureCompiler.cmake
+++ cmake/DOConfigureCompiler.cmake
@@ -26,8 +26,8 @@
   set (ENABLE_CXX11 "-std=c++11 -stdlib=libc++")

 # GNU compiler
-elseif (CMAKE_COMPILER_IS_GNUCXX)
-  execute_process(COMMAND "${CMAKE_CXX_COMPILER} -dumpversion"
+elseif (CMAKE_COMPILER_IS_GNUCXX)
+  execute_process(COMMAND "${CMAKE_C_COMPILER} -dumpversion"
                   OUTPUT_VARIABLE GCC_VERSION)
   do_substep_message("${CMAKE_CXX_COMPILER} version: ${GCC_VERSION}")
   if (GCC_VERSION  VERSION_LESS 4.5)


Compile with -Og in debug mode (by @chfast)

--- cmake/EthCompilerSettings.cmake
+++ cmake/EthCompilerSettings.cmake
@@ -71,7 +71,7 @@
 	add_compile_options(-fPIC)

 	# Configuration-specific compiler settings.
-	set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g -DETH_DEBUG")
+	set(CMAKE_CXX_FLAGS_DEBUG          "-Og -g -DETH_DEBUG")
 	set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
 	set(CMAKE_CXX_FLAGS_RELEASE        "-O3 -DNDEBUG")
 	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")


Rollback also last commit, issue was due wrong settings in users specialized config, so not needed anymore

--- cmake/Packages/FindOpenCL.cmake
+++ cmake/Packages/FindOpenCL.cmake
@@ -6,49 +6,45 @@
 # OPENCL_LIBRARY
 #

-if (NOT LUXRAYS_DISABLE_OPENCL)
+IF (WIN32)
+	FIND_PATH( OPENCL_INCLUDE_PATH CL/cl.h
+		${OPENCL_ROOT}/include
+		${LuxRays_SOURCE_DIR}/../opencl
+		DOC "The directory where CL/cl.h resides")
+	FIND_LIBRARY( OPENCL_LIBRARY
+		NAMES OpenCL.lib
+		PATHS
+		${OPENCL_LIBRARYDIR}
+		${OPENCL_ROOT}/lib/
+		${LuxRays_SOURCE_DIR}/../opencl/
+		DOC "The OpenCL library")
+ELSE (WIN32)
+	FIND_PATH( OPENCL_INCLUDE_PATH CL/cl.h
+		/usr/include
+		/usr/local/include
+		/sw/include
+		/opt/local/include
+		${OPENCL_ROOT}/include
+		/usr/src/opencl-sdk/include
+		DOC "The directory where CL/cl.h resides")
+	FIND_LIBRARY( OPENCL_LIBRARY
+		NAMES opencl OpenCL
+		PATHS
+		/usr/lib64
+		/usr/lib
+		/usr/local/lib64
+		/usr/local/lib
+		/sw/lib
+		/opt/local/lib
+		/usr/src/opencl-sdk/lib/x86_64
+		${OPENCL_LIBRARYDIR}
+		DOC "The OpenCL library")
+ENDIF (WIN32)

-	IF (WIN32)
-		FIND_PATH( OPENCL_INCLUDE_PATH CL/cl.h
-			${OPENCL_ROOT}/include
-			${LuxRays_SOURCE_DIR}/../opencl
-			DOC "The directory where CL/cl.h resides")
-		FIND_LIBRARY( OPENCL_LIBRARY
-			NAMES OpenCL.lib
-			PATHS
-			${OPENCL_LIBRARYDIR}
-			${OPENCL_ROOT}/lib/
-			${LuxRays_SOURCE_DIR}/../opencl/
-			DOC "The OpenCL library")
-	ELSE (WIN32)
-		FIND_PATH( OPENCL_INCLUDE_PATH CL/cl.h
-			/usr/include
-			/usr/local/include
-			/sw/include
-			/opt/local/include
-			${OPENCL_ROOT}/include
-			/usr/src/opencl-sdk/include
-			DOC "The directory where CL/cl.h resides")
-		FIND_LIBRARY( OPENCL_LIBRARY
-			NAMES opencl OpenCL
-			PATHS
-			/usr/lib64
-			/usr/lib
-			/usr/local/lib64
-			/usr/local/lib
-			/sw/lib
-			/opt/local/lib
-			/usr/src/opencl-sdk/lib/x86_64
-			${OPENCL_LIBRARYDIR}
-			DOC "The OpenCL library")
-	ENDIF (WIN32)
+IF (OPENCL_INCLUDE_PATH)
+	SET( OPENCL_FOUND 1 CACHE STRING "Set to 1 if OpenCL is found, 0 otherwise")
+ELSE (OPENCL_INCLUDE_PATH)
+	SET( OPENCL_FOUND 0 CACHE STRING "Set to 1 if OpenCL is found, 0 otherwise")
+ENDIF (OPENCL_INCLUDE_PATH)

-	IF (OPENCL_INCLUDE_PATH)
-		SET( OPENCL_FOUND 1 CACHE STRING "Set to 1 if OpenCL is found, 0 otherwise")
-	ELSE (OPENCL_INCLUDE_PATH)
-		SET( OPENCL_FOUND 0 CACHE STRING "Set to 1 if OpenCL is found, 0 otherwise")
-	ENDIF (OPENCL_INCLUDE_PATH)
-
-	MARK_AS_ADVANCED( OPENCL_FOUND )
-
-endif (NOT LUXRAYS_DISABLE_OPENCL)+MARK_AS_ADVANCED( OPENCL_FOUND )


Grab the release in debug mode if there is no debug when not on msvc

--- cmake/modules/FindOpenVDB.cmake
+++ cmake/modules/FindOpenVDB.cmake
@@ -235,6 +235,10 @@

     set(OpenVDB_${COMPONENT}_LIBRARY ${OpenVDB_${COMPONENT}_LIBRARY_${_BUILD_TYPE}})

+    if (NOT MSVC AND NOT OpenVDB_${COMPONENT}_LIBRARY)
+      set(OpenVDB_${COMPONENT}_LIBRARY ${OpenVDB_${COMPONENT}_LIBRARY_RELEASE})
+    endif ()
+
     list(APPEND OpenVDB_LIB_COMPONENTS ${OpenVDB_${COMPONENT}_LIBRARY})

     if(OpenVDB_${COMPONENT}_LIBRARY)


[CMake] Pass -lpthread on FreeBSD.

[CMake] Pass -lpthread on FreeBSD.

At the time this code was originally written, Swift standard
library hasn't been ported to FreeBSD, so we didn't need any
additional library. This is not true anymore, so fix it.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -161,7 +161,7 @@
   if("${sdk}" STREQUAL "LINUX")
     list(APPEND result "-lpthread" "-ldl")
   elseif("${sdk}" STREQUAL "FREEBSD")
-    # No extra libraries required.
+    list(APPEND result "-lpthread")
   else()
     list(APPEND result "-lobjc")
   endif()


according to kde-buildsystem the kxml_compiler.sh
is now kxml_compiler.shell

svn path=/trunk/KDE/kdepim/; revision=583739

--- cmake/modules/FindKode.cmake
+++ cmake/modules/FindKode.cmake
@@ -14,7 +14,7 @@

 # check if we are currently building kdepim
 if ( EXISTS ${CMAKE_SOURCE_DIR}/libkdepim/kdepimmacros.h )
-	set( KODE_XML_COMPILER_EXECUTABLE ${CMAKE_BINARY_DIR}/kode/kxml_compiler/kxml_compiler.sh )
+	set( KODE_XML_COMPILER_EXECUTABLE ${CMAKE_BINARY_DIR}/kode/kxml_compiler/kxml_compiler.shell )
 	set( _KODE_XML_COMPILER_DEP kxml_compiler )
 else ( EXISTS ${CMAKE_SOURCE_DIR}/libkdepim/kdepimmacros.h )
 	find_program( KODE_XML_COMPILER_EXECUTABLE NAME kxml_compiler PATHS


run R with --vanilla during cmake detection

--- cmake/modules/FindLibR.cmake
+++ cmake/modules/FindLibR.cmake
@@ -43,7 +43,7 @@
       # ask R for the home path
       if(NOT LIBR_HOME)
          execute_process(
-            COMMAND ${LIBR_EXECUTABLE} "--slave" "--no-save" "-e" "cat(R.home())"
+            COMMAND ${LIBR_EXECUTABLE} "--slave" "--vanilla" "-e" "cat(R.home())"
                       OUTPUT_VARIABLE LIBR_HOME
          )
          if(LIBR_HOME)


cmake: fixed Nodejs detection on Ubuntu systems when using apt installed nodejs packages

Signed-off-by: Mihai Tudor Panu <a27de6130c5d32f5817bf40bb8b348582f37a8af@intel.com>

--- cmake/modules/FindNode.cmake
+++ cmake/modules/FindNode.cmake
@@ -23,13 +23,16 @@
 endif()

 # Now look for node. Flag an error if not found
-find_path (NODE_ROOT_DIR "include/node/node.h" "include/src/node.h"
+find_path (NODE_ROOT_DIR "include/node/node.h" "include/src/node.h" "src/node.h"
   PATHS /usr/include/nodejs /usr/local/include/nodejs /usr/local/include)
 if (NODE_ROOT_DIR)
   add_include_dir(${NODE_ROOT_DIR}/include/src)
+  add_include_dir(${NODE_ROOT_DIR}/src)
   add_include_dir(${NODE_ROOT_DIR}/include/node)
   add_include_dir(${NODE_ROOT_DIR}/include/deps/v8/include)
+  add_include_dir(${NODE_ROOT_DIR}/deps/v8/include)
   add_include_dir(${NODE_ROOT_DIR}/include/deps/uv/include)
+  add_include_dir(${NODE_ROOT_DIR}/deps/uv/include)
 else()
   unset(NODEJS_INCLUDE_DIRS)
   message(ERROR " - node.h not found")


TableGen.cmake: Functionalize and reformat.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@201972 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -52,22 +52,23 @@
     PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${ofn}.tmp ${ofn})

   set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn} PARENT_SCOPE)
-  set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ofn}
-    PROPERTIES GENERATED 1)
-endfunction(tablegen)
+  set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ofn} PROPERTIES
+    GENERATED 1)
+endfunction()

-macro(add_public_tablegen_target target)
-  # Creates a target for publicly exporting tablegen dependencies.
-  if( TABLEGEN_OUTPUT )
-    add_custom_target(${target}
-      DEPENDS ${TABLEGEN_OUTPUT})
-    if (LLVM_COMMON_DEPENDS)
-      add_dependencies(${target} ${LLVM_COMMON_DEPENDS})
-    endif ()
-    set_target_properties(${target} PROPERTIES FOLDER "Tablegenning")
-    list(APPEND LLVM_COMMON_DEPENDS ${target})
-  endif( TABLEGEN_OUTPUT )
-endmacro()
+# Creates a target for publicly exporting tablegen dependencies.
+function(add_public_tablegen_target target)
+  if(NOT TABLEGEN_OUTPUT)
+    message(FATAL_ERROR "Requires tablegen() definitions as TABLEGEN_OUTPUT.")
+  endif()
+  add_custom_target(${target}
+    DEPENDS ${TABLEGEN_OUTPUT})
+  if(LLVM_COMMON_DEPENDS)
+    add_dependencies(${target} ${LLVM_COMMON_DEPENDS})
+  endif()
+  set_target_properties(${target} PROPERTIES FOLDER "Tablegenning")
+  set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${target} PARENT_SCOPE)
+endfunction()

 if(CMAKE_CROSSCOMPILING)
   set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native")


Codegen: add dependency on qitype

Codegen: add dependency on qitype

Change-Id: I87d6d4557f4c24b2e00406270b940716a63eb136
Reviewed-on: http://gerrit.aldebaran.lan/36769
Reviewed-by: pdaouadi <fc1eb3334d3fdad315bae23aa166bc70bd434067@aldebaran-robotics.com>
Tested-by: pdaouadi <fc1eb3334d3fdad315bae23aa166bc70bd434067@aldebaran-robotics.com>

--- codegen/src/idl-config.cmake
+++ codegen/src/idl-config.cmake
@@ -171,7 +171,8 @@
       -p "${ARG_PREFIX}"
       --cxx-signature-mapping "'${_type_map}'"
       ${qiclangopt}
-      -m idl)
+      -m idl
+      DEPENDS qitype)
     list(APPEND names "${target}")
   endforeach(c)
   set(${files} "${names}" PARENT_SCOPE)


clear INSTALL variable

clear INSTALL variable

see: https://github.com/ruslo/hunter/issues/795

--- scripts/clear-all.cmake
+++ scripts/clear-all.cmake
@@ -116,6 +116,7 @@
 unset(ENV{INFOPLIST_EXPAND_BUILD_SETTINGS})
 unset(ENV{INFOPLIST_OUTPUT_FORMAT})
 unset(ENV{INFOPLIST_PREPROCESS})
+unset(ENV{INSTALL})
 unset(ENV{INSTALL_DIR})
 unset(ENV{INSTALL_GROUP})
 unset(ENV{INSTALL_MODE_FLAG})


fix detection of ICC version

fix detection of ICC version

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -316,7 +316,7 @@
       string( REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1.\\2.\\3"
               eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
     elseif(eigen_cxx_compiler_name MATCHES "icpc|clang")
-      string( REGEX REPLACE ".* ([0-9]*)\\.([0-9]*) .*" "\\1.\\2"
+      string( REGEX REPLACE ".* ([0-9]+\\.[0-9]+\\.[0-9]+|[0-9]+\\.[0-9]+).*" "\\1"
               eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
     else()
       set(eigen_cxx_compiler_version "_")


Only compile hipacc_run.cl with AOCL

Only compile hipacc_run.cl with AOCL

--- tests/Makefile.cmake
+++ tests/Makefile.cmake
@@ -109,7 +109,7 @@
 	@echo 'Compiling Host Code for Altera Emulation'
 	g++ -DALTERACL $(MYFLAGS) -std=c++11 -fPIC -I$(HIPACC_DIR)/include $(shell aocl compile-config) -Wl,--no-as-needed $(shell aocl link-config) -lstdc++ -static-libstdc++ -o main_altera_em main.cc
 	echo 'Generate aocx for Altera Emulation'
-	aoc $(MYFLAGS) -I$(HIPACC_DIR)/include -v -march=emulator *.cl
+	aoc $(MYFLAGS) -I$(HIPACC_DIR)/include -v -march=emulator hipacc_run.cl
 	@echo 'Emulate Generated Binaries'
 	CL_CONTEXT_EMULATOR_DEVICE_ALTERA=s5_ref $(ALTERA_RUN) ./main_altera_em

@@ -117,7 +117,7 @@
 	@echo 'Compiling Host Code for Target Architecture'
 	$(ECHO)$(ALTERA_CXX) -DALTERACL $(MYFLAGS) -std=c++11 -fPIC -I$(HIPACC_DIR)/include $(shell aocl compile-config) main.cc $(shell aocl link-config) -static-libstdc++ -o ./main_altera_syn
 	@echo 'Generate aocx for Target Altera Device'
-	aoc $(MYFLAGS) -I$(HIPACC_DIR)/include -v --report *.cl
+	aoc $(MYFLAGS) -I$(HIPACC_DIR)/include -v --report hipacc_run.cl

 filterscript renderscript:
 	rm -f *.rs *.fs


Delete dFindCPM.cmake

Delete dFindCPM.cmake

--- tests/dFindCPM.cmake
+++ tests/dFindCPM.cmake
@@ -1,16 +0,0 @@
-set(CPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/cpm_packages" CACHE TYPE STRING)
-  find_package(Git)
-  if(NOT GIT_FOUND)
-    message(FATAL_ERROR "CPM requires Git.")
-  endif()
-  if (NOT EXISTS ${CPM_DIR}/CPM.cmake)
-    message(STATUS "Cloning repo (https://github.com/iauns/cpm)")
-    execute_process(
-      COMMAND "${GIT_EXECUTABLE}" clone https://github.com/iauns/cpm ${CPM_DIR}
-      RESULT_VARIABLE error_code
-      OUTPUT_QUIET ERROR_QUIET)
-    if(error_code)
-      message(FATAL_ERROR "CPM failed to get the hash for HEAD")
-    endif()
-  endif()
-  include(${CPM_DIR}/CPM.cmake)


ENH: cleansed unnecessary files

ENH: cleansed unnecessary files

--- SuperBuild.old.cmake
+++ SuperBuild.old.cmake
@@ -1,317 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-CMAKE_POLICY(VERSION 2.8)
-
-set(BUILD_TESTING ON CACHE BOOL "Build, configure and copy testing files")
-
-project(DTIAtlasBuilder)
-set(innerproj ${CMAKE_PROJECT_NAME}-inner)
-
-# So error while configuring and not building if Git missing -> sets GIT_EXECUTABLE
-find_package(Git REQUIRED)
-
-option(USE_GIT_PROTOCOL "If behind a firewall turn this off to use http instead." ON)
-if(NOT USE_GIT_PROTOCOL)
-  set(git_protocol "http")
-else(NOT USE_GIT_PROTOCOL)
-  set(git_protocol "git")
-endif()
-
-# Sets Subversion_SVN_EXECUTABLE
-find_package(Subversion REQUIRED)
-
-# External Projects
-include(ExternalProject) # "ExternalProject" is the module that will allow to compile tools
-include(CMakeDependentOption)
-
-if(CMAKE_EXTRA_GENERATOR) # CMake Generator = make, nmake..
-  set(gen "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
-else()
-  set(gen "${CMAKE_GENERATOR}")
-endif()
-set(COMMON_BUILD_OPTIONS_FOR_EXTERNALPACKAGES
-  -DMAKECOMMAND:STRING=${MAKECOMMAND}
-  -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
-  -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-  -DCMAKE_CXX_COMPILER:PATH=${CMAKE_CXX_COMPILER}
-  -DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}
-  -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}
-  -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-  -DCMAKE_C_COMPILER:PATH=${CMAKE_C_COMPILER}
-  -DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}
-  -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG}
-  -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
-  -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-  -DCMAKE_LINKER_FLAGS:STRING=${CMAKE_LINKER_FLAGS}
-  -DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
-  -DCMAKE_GENERATOR:STRING=${CMAKE_GENERATOR}
-  -DCMAKE_EXTRA_GENERATOR:STRING=${CMAKE_EXTRA_GENERATOR}
-  -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-  -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-  -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-  -DCMAKE_BUNDLE_OUTPUT_DIRECTORY:PATH=${CMAKE_BUNDLE_OUTPUT_DIRECTORY}
-  -DCTEST_NEW_FORMAT:BOOL=${CTEST_NEW_FORMAT}
-  -DMEMORYCHECK_COMMAND_OPTIONS:STRING=${MEMORYCHECK_COMMAND_OPTIONS}
-  -DMEMORYCHECK_COMMAND:PATH=${MEMORYCHECK_COMMAND}
-  -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-  -DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
-  -DGIT_EXECUTABLE:PATH=${GIT_EXECUTABLE} # needed when does include(Slicer) for Slicer ext
-  -DSubversion_SVN_EXECUTABLE:FILEPATH=${Subversion_SVN_EXECUTABLE}# needed when does include(Slicer) for Slicer ext
-)
-
-#===================================================================================
-# Slicer Extension
-option( DTIAtlasBuilder_BUILD_SLICER_EXTENSION "Build DTIAtlasBuilder as a Slicer extension" OFF )
-if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-  #VTK_VERSION_MAJOR is define but not a CACHE variable
-  set( VTK_VERSION_MAJOR ${VTK_VERSION_MAJOR} CACHE STRING "Choose the expected VTK major version to build Slicer (5 or 6).")
-  set(EXTENSION_NAME DTIAtlasBuilder)
-  set(EXTENSION_HOMEPAGE "http://www.nitrc.org/projects/dtiatlasbuilder")
-  set(EXTENSION_CATEGORY "Diffusion")
-  set(EXTENSION_CONTRIBUTORS "Adrien Kaiser (UNC), Francois Budin (UNC)")
-  set(EXTENSION_DESCRIPTION "A tool to create a DTI Atlas Image from a set of DTI Images")
-  set(EXTENSION_ICONURL "http://www.nitrc.org/project/screenshot.php?group_id=636&screenshot_id=607")
-  set(EXTENSION_SCREENSHOTURLS "http://www.slicer.org/slicerWiki/images/0/02/DTIAtlasBuilder_Interface.png")
-  set(EXTENSION_STATUS Beta)
-  set(EXTENSION_BUILD_SUBDIRECTORY . )
-  set(EXTENSION_DEPENDS "DTIProcess ResampleDTIlogEuclidean DTI-Reg" ) # Specified as a space separated list or 'NA' if any
-  set(MODULE_NAME DTIAtlasBuilder)
-
-  find_package(Slicer REQUIRED)
-  include(${Slicer_USE_FILE})
-
-  set(COMPILE_EXTERNAL_AtlasWerks ON)
-
-
-  # Import DTIProcess, ResampleDTIlogEuclidean, and DTI-Reg targets for the tests
-  # DTIProcess_DIR and DTI-Reg_DIR are set because DTIAtlasBuilder is defined as dependent of the extension DTIProcess, ResampleDTIlogEuclidean, and DTI-Reg
-  #include( ${DTIProcess_DIR}/ImportDTIProcessExtensionExecutables.cmake )
-  #get_target_property(TOOLdtiprocess dtiprocess IMPORTED_LOCATION_RELEASE )
-  #get_target_property(TOOLdtiaverage dtiaverage IMPORTED_LOCATION_RELEASE )
-  #include( ${DTI-Reg_DIR}/ImportDTI-RegExtensionExecutables.cmake )
-  #get_target_property(TOOLDTI-Reg DTI-Reg IMPORTED_LOCATION_RELEASE )
-  #include( ${ResampleDTIlogEuclidean_DIR}/ResampleDTIlogEuclidean-exports.cmake )
-  #get_target_property(TOOLResampleDTIlogEuclidean ResampleDTIlogEuclidean IMPORTED_LOCATION_RELEASE )
-  #ANTS needs a more recent version of ITK (4.6) than the one currently in Slicer (05.21.2014)
-  #We still use Slicer ITK_DIR to compile DTIAtlasBuilder to avoid conflicts when including Slicer_USE_FILE
-  #set( ITK_DIR_Slicer ${ITK_DIR} )
-  #set( GenerateCLP_DIR_Slicer ${GenerateCLP_DIR} )
-  #unset( ITK_DIR CACHE )
-  #unset( ITK_FOUND )
-  #unset( SlicerExecutionModel_DIR CACHE )
-  #unset( GenerateCLP_DIR CACHE )
-  # SlicerExecutionModel_DEFAULT_CLI_RUNTIME_OUTPUT_DIRECTORY and SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION defined in Slicer_USE_FILE
-  # SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION is [sthg]/cli_module : must contain only CLIs
-  # If build as Slicer Extension, CMAKE_INSTALL_PREFIX is set to [ExtensionsFolder]/DTIAtlaBuilder
-  if( APPLE )
-    set( CMAKE_EXE_LINKER_FLAGS -Wl,-rpath,@loader_path/../../../../../ )
-  endif()
-  set( BUILD_SHARED_LIBS OFF CACHE BOOL "Builds shared libs")
-  set(TOOLBRAINSFit ${Slicer_HOME}/${Slicer_CLIMODULES_BIN_DIR}/BRAINSFit) # BRAINSFit built in cli modules dir # Slicer_CLIMODULES_BIN_DIR is a relative path
-  set(TOOLunu ${Teem_DIR}/bin/unu) # Teem_DIR set when find_package(Slicer) in SlicerConfig.cmake
-  set( TOOLDTIAtlasBuilderLauncher ${CMAKE_CURRENT_BINARY_DIR}/${innerproj}-install/bin/DTIAtlasBuilderLauncher) # Build by this project if DTIAtlasBuilder is an extension
-else( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-
-  option( FORCE_BUILD_ON_MAC_OR_WIN "Force Building on Known failing platforms" OFF )
-  if(NOT FORCE_BUILD_ON_MAC_OR_WIN AND ( APPLE OR WIN32 ) ) # If not Slicer ext, not compile because will fail at run time
-    message(FATAL_ERROR "DTIAtlasBuilder has known issues and will not run on Mac or Windows\nSet -DFORCE_BUILD_ON_MAC_OR_WIN:BOOL=ON to override")
-  endif()
-endif( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-
-set( COMPILE_PACKAGE ON CACHE BOOL "Compiles all the external projects and tools" )
-
-list( APPEND COMMON_BUILD_OPTIONS_FOR_EXTERNALPACKAGES
-  -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-  -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-)
-
-
-#===================================================================================
-# Search needed libraries and packages for DTIAtlasBuilder : ITK_DIR GenerateCLP_DIR ModuleDescriptionParser_DIR TCLAP_DIR QT_QMAKE_EXECUTABLE
-if(NOT COMPILE_PACKAGE OR DTIAtlasBuilder_BUILD_SLICER_EXTENSION ) # ITK and SlicerExecutionModel (GenerateCLP) are recompiled in the package
-  find_package(SlicerExecutionModel REQUIRED)
-  include(${SlicerExecutionModel_USE_FILE})
-  include(${GenerateCLP_USE_FILE})
-
-  find_package(ITK REQUIRED)
-  include(${ITK_USE_FILE})
-endif()
-
-if(NOT USE_Qt5)
-  find_package(Qt4 REQUIRED) # For DTIAtlasBuilder
-  include(${QT_USE_FILE}) # creates QT_QMAKE_EXECUTABLE
-endif()
-
-
-
-#======================================================================================
-# Compile package
-set( ExtProjList # External packages to compile
-  # dtiprocessTK # dtiprocess, dtiaverage
-  AtlasWerks # GreedyAtlas
-  # BRAINS # BRAINSFit, BRAINSDemonWarp
-  # ANTS # ANTS, WarpImageMultiTransform, WarpTensorImageMultiTransform
-  # ResampleDTI # ResampleDTIlogEuclidean
-  # DTI-Reg # DTI-Reg
-  # teem # unu
-  # MriWatcher # MriWatcher
-  # NIRALUtilities # ImageMath, CropDTI
-  )
-set( ToolsList # Needed tools -> to hide unuseful TOOL* variables
-  dtiprocess
-  dtiaverage
-  GreedyAtlas
-  BRAINSFit
-  BRAINSDemonWarp
-  ANTS
-  WarpImageMultiTransform
-  ResampleDTIlogEuclidean
-  DTI-Reg
-  MriWatcher
-  ImageMath
-  CropDTI
-  unu
-  ITKTransformTools
-  )
-# if(COMPILE_PACKAGE)
-
-  # Define COMPILE_EXTERNAL_* variables
-#   if( NOT DTIAtlasBuilder_BUILD_SLICER_EXTENSION ) # no Slicer extension -> recompile all
-
-#     foreach( tool ${ExtProjList})
-#       set( COMPILE_EXTERNAL_${tool} ON CACHE BOOL "Compile external ${tool}" )
-#       mark_as_advanced(CLEAR COMPILE_EXTERNAL_${tool}) # Show variable if been hidden
-#     endforeach()
-
-#   else() # Slicer extension -> recompile only tools that are not in Slicer + not MriWatcher
-
-#    foreach( tool DTI-Reg ANTS ResampleDTI dtiprocessTK BRAINS teem MriWatcher ) # Already in Slicer or independent extension -> not recompiled # MriWatcher needs GLUT so disable if Slicer Extension because glut not necesseraly installed
-#       set( COMPILE_EXTERNAL_${tool} OFF CACHE BOOL "Compile external ${tool}" )
-#       mark_as_advanced(CLEAR COMPILE_EXTERNAL_${tool}) # Show variable if been hidden
-#     endforeach()
-
-#     foreach( tool AtlasWerks NIRALUtilities ) # Not in Slicer -> recompile
-#       set( COMPILE_EXTERNAL_${tool} ON CACHE BOOL "Compile external ${tool}" )
-#       mark_as_advanced(CLEAR COMPILE_EXTERNAL_${tool}) # Show variable if been hidden
-#     endforeach()
-
-#     if(APPLE) # unu is not recompiled with Slicer on MacOS
-# #      set( COMPILE_EXTERNAL_teem ON CACHE BOOL "Compile external teem" FORCE)
-#     endif(APPLE)
-
-#     if(WIN32 OR APPLE) # DTIAB not working on Windows/Mac so only compile DTIAtlasBuilder's GUI
-#       set( COMPILE_EXTERNAL_AtlasWerks OFF CACHE BOOL "Compile external AtlasWerks" FORCE)
-#       set( COMPILE_EXTERNAL_NIRALUtilities OFF CACHE BOOL "Compile external NIRALUtilities" FORCE)
-#     endif()
-
-#   endif()
-
-include( ${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild/FindExternalTools.cmake ) # Go execute the given cmake script, and get back into this script when done
-
-# else(COMPILE_PACKAGE) # Hide unuseful variables
-#   foreach( proj ${ExtProjList})
-#     set( COMPILE_EXTERNAL_${proj} OFF CACHE BOOL "Compile external ${proj}" FORCE ) # For installation step in DTIAtlasBuilder.cmake
-#     mark_as_advanced(FORCE COMPILE_EXTERNAL_${proj})
-#   endforeach()
-#   foreach( tool ${ToolsList})
-#     mark_as_advanced(FORCE TOOL${tool})
-#     mark_as_advanced(FORCE TOOL${tool}Sys)
-#   endforeach()
-#   foreach( lib VTK SlicerExecutionModel )
-#     mark_as_advanced(FORCE ${lib}_DIR)
-#   endforeach()
-# endif(COMPILE_PACKAGE)
-
-#======================================================================================
-
-ExternalProject_Add(${innerproj} # DTIAtlasBuilder added as Externalproject in case of SlicerExecutionModel recompiled because needs it
-  DOWNLOAD_COMMAND ""
-  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
-  BINARY_DIR ${innerproj}-build
-  CMAKE_GENERATOR ${gen}
-  CMAKE_ARGS
-    -DInnerBuildCMakeLists:BOOL=ON
-    -DSlicerExecutionModel_DIR:PATH=${SlicerExecutionModel_DIR}
-    ${COMMON_BUILD_OPTIONS_FOR_EXTERNALPACKAGES}
-    -DUSE_GIT_PROTOCOL:BOOL=${USE_GIT_PROTOCOL}
-    -DITK_DIR:PATH=${ITK_DIR}
-    -DGenerateCLP_DIR:PATH=${GenerateCLP_DIR}
-    #-DQt5_DIR:PATH=${Qt5_DIR}
-    -DQT_QMAKE_EXECUTABLE:PATH=${QT_QMAKE_EXECUTABLE}
-    -DBUILD_TESTING:BOOL=${BUILD_TESTING}
-    -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${innerproj}-install
-    # Installation step
-    # Slicer extension
-    -DDTIAtlasBuilder_BUILD_SLICER_EXTENSION:BOOL=${DTIAtlasBuilder_BUILD_SLICER_EXTENSION}
-    -DSlicer_DIR:PATH=${Slicer_DIR}
-    -DEXTENSION_NAME:STRING=${EXTENSION_NAME}
-    # For the tests
-    -DTOOLImageMath:PATH=${TOOLImageMath}
-    -DTOOLResampleDTIlogEuclidean:PATH=${TOOLResampleDTIlogEuclidean}
-    -DTOOLCropDTI:PATH=${TOOLCropDTI}
-    -DTOOLdtiprocess:PATH=${TOOLdtiprocess}
-    -DTOOLBRAINSFit:PATH=${TOOLBRAINSFit}
-    -DTOOLGreedyAtlas:PATH=${TOOLGreedyAtlas}
-    -DTOOLdtiaverage:PATH=${TOOLdtiaverage}
-    -DTOOLDTI-Reg:PATH=${TOOLDTI-Reg}
-    -DTOOLunu:PATH=${TOOLunu}
-    -DTOOLMriWatcher:PATH=${TOOLMriWatcher}
-    -DAtlasWerks_DIR:PATH=${AtlasWerks_DIR}
-  DEPENDS ${ITK_DEPEND} ${DTIAtlasBuilderExternalToolsDependencies} # DTIAtlasBuilderExternalToolsDependencies contains the names of all the recompiled softwares so DTIAB is compiled last (for install)
-)
-set( TOOLDTIAtlasBuilder ${CMAKE_CURRENT_BINARY_DIR}/${innerproj}-install/bin/DTIAtlasBuilder )
-
-if(BUILD_TESTING)
-  include(CTest)
-  if( WIN32 )
-    set( EXT .exe )
-  endif()
-  set(TestingSRCdirectory ${CMAKE_CURRENT_SOURCE_DIR}/Testing)
-  set(TestingBINdirectory ${CMAKE_CURRENT_BINARY_DIR}/Testing)
-  set(TestDataFolder ${CMAKE_CURRENT_SOURCE_DIR}/Data/Testing)
-  set( PACKAGING_TESTS DTIAtlasBuilderGUITestLabels DTIAtlasBuilderTest DTIAtlasBuilderGUITest DTIAtlasBuilder)
-  foreach( VAR ${PACKAGING_TESTS})
-    add_executable(${VAR} IMPORTED)
-    set_property(TARGET ${VAR} PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${innerproj}-install/bin/${VAR}${EXT})
-  endforeach()
-  configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Testing/DTIAtlasBuilderSoftConfig.txt.in ${CMAKE_CURRENT_BINARY_DIR}/Testing/DTIAtlasBuilderSoftConfig.txt)
-  add_subdirectory(Testing)
-endif()
-
-# set( PACKAGING_HIDDEN_CLI DTIAtlasBuilder)
-# if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-#   set( PACKAGING_CLI DTIAtlasBuilderLauncher)
-#   set( PACKAGING_NO_CLI CropDTI ImageMath GreedyAtlas )
-#   set( CLI_FOLDER ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION})
-#   set( HIDDEN_CLI_FOLDER ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}/../hidden-cli-modules )
-#   set( NO_CLI_FOLDER ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION}/../ExternalBin )
-# else()
-#   set( PACKAGING_NO_CLI CropDTI MriWatcher unu ImageMath GreedyAtlas ANTS WarpImageMultiTransform ITKTransformTools)
-#   set( PACKAGING_CLI ResampleDTIlogEuclidean dtiprocess BRAINSFit BRAINSDemonWarp dtiaverage DTI-Reg)
-#   set( CLI_FOLDER bin)
-#   set( HIDDEN_CLI_FOLDER ${CLI_FOLDER} )
-#   set( NO_CLI_FOLDER ${CLI_FOLDER} )
-#   # Update the paths to the program in the configuration file, and copy it to the executable directory
-#   configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/DTIAtlasBuilderSoftConfig.txt.in ${CMAKE_CURRENT_BINARY_DIR}/DTIAtlasBuilderSoftConfig.txt ) # configure and copy with (tool)Path
-# endif()
-
-# foreach(VAR ${PACKAGING_CLI})
-#   if( TOOL${VAR} )
-#     install(PROGRAMS ${TOOL${VAR}} DESTINATION ${CLI_FOLDER})
-#   endif()
-# endforeach()
-# foreach(VAR ${PACKAGING_HIDDEN_CLI})
-#   if( TOOL${VAR} )
-#     install(PROGRAMS ${TOOL${VAR}} DESTINATION ${HIDDEN_CLI_FOLDER} )
-#   endif()
-# endforeach()
-# foreach(VAR ${PACKAGING_NO_CLI})
-#   if( TOOL${VAR} )
-#     install(PROGRAMS ${TOOL${VAR}} DESTINATION ${NO_CLI_FOLDER} )
-#   endif()
-# endforeach()
-
-if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-  set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR}/DTIAtlasBuilder-inner-build;${EXTENSION_NAME};ALL;/")
-  include(${Slicer_EXTENSION_CPACK})
-endif()
-


[Conf] Made the CMake CMP0094 policy backward compatible

--- config/FindPython/Support.cmake
+++ config/FindPython/Support.cmake
@@ -5,7 +5,9 @@
 # This file is a "template" file used by various FindPython modules.
 #

-cmake_policy (GET CMP0094 _${_PYTHON_PREFIX}_LOOKUP_POLICY)
+if (POLICY CMP0094)
+  cmake_policy (GET CMP0094 _${_PYTHON_PREFIX}_LOOKUP_POLICY)
+endif (POLICY CMP0094)

 cmake_policy (VERSION 3.7)


fix License -> LICENSE

fix License -> LICENSE

--- packaging/Packaging.cmake
+++ packaging/Packaging.cmake
@@ -37,7 +37,7 @@
 set(CPACK_PACKAGE_VERSION ${${PROJECT_NAME}_VERSION})

 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/packaging/Description.txt")
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/License.txt")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/packaging/Readme.txt")
 set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/packaging/Welcome.txt")


Use unicode on windows

Use unicode on windows

--- cmake/modules/DeskvoxHandleOptions.cmake
+++ cmake/modules/DeskvoxHandleOptions.cmake
@@ -9,6 +9,11 @@

 if(NOT BUILD_SHARED_LIBS)
   add_definitions(-DNODLL)
+endif()
+
+
+if(WIN32)
+  add_definitions(-D_UNICODE -DUNICODE)
 endif()


Add missing include

Add missing include

--- cmake/modules/hunter_pack_git_self.cmake
+++ cmake/modules/hunter_pack_git_self.cmake
@@ -1,6 +1,7 @@
 include(CMakeParseArguments) # cmake_parse_arguments

 include(hunter_assert_not_empty_string)
+include(hunter_get_git_executable)
 include(hunter_internal_error)
 include(hunter_status_debug)

@@ -23,7 +24,7 @@
   hunter_assert_not_empty_string("${x_URL_OUT}")
   hunter_assert_not_empty_string("${x_SHA1_OUT}")

-  hunter_get_git_executabe(git_executable)
+  hunter_get_git_executable(git_executable)

   set(cmd "${git_executable}" rev-parse --show-toplevel)
   execute_process(


boards: mro/pixracerpro add flight_mode_manager

--- boards/mro/pixracerpro/default.cmake
+++ boards/mro/pixracerpro/default.cmake
@@ -64,6 +64,7 @@
 		ekf2
 		esc_battery
 		events
+		flight_mode_manager
 		fw_att_control
 		fw_pos_control_l1
 		land_detector


more stuff

more stuff


FIX: add new ITK modules to OTB build

FIX: add new ITK modules to OTB build

--- SuperBuild/CMake/External_itk.cmake
+++ SuperBuild/CMake/External_itk.cmake
@@ -39,6 +39,10 @@
   SpatialObjects
   #TestKernel
   Transform
+  TransformFactory
+  IOTransformBase
+  IOTransformInsightLegacy
+  IOTransformMatlab

   AnisotropicSmoothing
   AntiAlias


[upgrade] Remove python dependency

[upgrade] Remove python dependency

--- Superbuild/Projects/lidarview.cmake
+++ Superbuild/Projects/lidarview.cmake
@@ -1,7 +1,7 @@
 cmake_dependent_option(Boost_NO_BOOST_CMAKE "Boost_NO_BOOST_CMAKE" ON "NOT USE_SYSTEM_boost" OFF)

 superbuild_add_project(lidarview
-  DEPENDS paraview qt5 pcap boost eigen liblas yaml python python3 pythonqt numpy
+  DEPENDS paraview qt5 pcap boost eigen liblas yaml python3 pythonqt numpy
   DEPENDS_OPTIONAL pcl ceres opencv nanoflann g2o
   DEFAULT_ON
   CMAKE_ARGS


BUG: Quote file(DOWNLOAD) argument to support spaces

SVN-Revision: 3295

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -107,7 +107,7 @@
       file(WRITE "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/fetch_${checksum}_${base_filename}.cmake"
   "message(STATUS \"Data is here: ${MIDAS_REST_URL}/midas.bitstream.by.hash?hash=${checksum}&algorithm=${hash_alg}\")
 if(NOT EXISTS \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${checksum}\")
-  file(DOWNLOAD ${MIDAS_REST_URL}/midas.bitstream.by.hash?hash=${checksum}&algorithm=${hash_alg} \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${testName}_${checksum}\" ${MIDAS_DOWNLOAD_TIMEOUT_STR} STATUS status)
+  file(DOWNLOAD \"${MIDAS_REST_URL}/midas.bitstream.by.hash?hash=${checksum}&algorithm=${hash_alg}\" \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${testName}_${checksum}\" ${MIDAS_DOWNLOAD_TIMEOUT_STR} STATUS status)
   list(GET status 0 exitCode)
   list(GET status 1 errMsg)
   if(NOT exitCode EQUAL 0)


amigaos: Fix path to library from SDK in toolchain file

--- platforms/amigaos-gcc/amigaos.cmake
+++ platforms/amigaos-gcc/amigaos.cmake
@@ -67,7 +67,10 @@
 set (CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS -shared)
 set (CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS -shared)

-set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -use-dynld")
+set (AMIGA_CLIB2_PATH "${AMIGA_ROOT}/ppc-amigaos/SDK/clib2/lib")
+
+set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -use-dynld -L${AMIGA_CLIB2_PATH}")
+set (CMAKE_SHARED_LINKER_FLAGS "-L${AMIGA_CLIB2_PATH}")

 set (CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,")
 set (CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")


removed caffe and gflags from build all

removed caffe and gflags from build all

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -20,6 +20,8 @@
 set(_package_excludes
   ${_apple_package_excludes}
   ${_python_excludes}
+  Gflags
+  Caffe
   Caffe2
   OpenCL
   SYSTEM_Boost


Simplify the version parsing logic.

Simplify the version parsing logic.

current HEAD                -> 1.8-ALPHA.11
tag 1.8-ALPHA               -> 1.8-ALPHA.0
one commit before 1.8-ALPHA -> 1.7.759
tag 1.7                     -> 1.7.0
one commit before 1.7       -> 1.6.1152

--- CMake/Modules/GetUrhoRevision.cmake
+++ CMake/Modules/GetUrhoRevision.cmake
@@ -40,21 +40,20 @@
     file (WRITE ${FILENAME} "const char* revision=\"${LIB_REVISION}\";\n")
 else ()
     # Output just major.minor.patch number to stdout
-    string (REGEX MATCH "[^.]+\\.[^-]+" VERSION ${LIB_REVISION})                    # Assume release tag always has major.minor format with possible pre-release identifier
+    string (REGEX MATCH "[^.]+\\.[^-]+" VERSION ${LIB_REVISION})            # Assume release tag always has major.minor format with possible pre-release identifier
     if (VERSION)
-        string (REGEX MATCH "${VERSION}(-[A-Z]+)" PRE_ID ${LIB_REVISION})            # Workaround as CMake's regex does not support look around
+        string (REGEX MATCH "${VERSION}-([A-Z]+)" PRE_ID ${LIB_REVISION})   # Workaround as CMake's regex does not support look around
         if (PRE_ID)
-            set (PRE_ID ${CMAKE_MATCH_1})
+            set (VERSION ${VERSION}-${CMAKE_MATCH_1})
         endif ()
-        string (REGEX MATCH "${VERSION}${PRE_ID}-([^-]+)" PATCH ${LIB_REVISION})    # Subsequent commits count after a release tag is treated as patch number
+        string (REGEX MATCH "${VERSION}-([^-]+)" PATCH ${LIB_REVISION})     # Subsequent commits count after a release tag is treated as patch number
         if (PATCH)
             set (VERSION ${VERSION}.${CMAKE_MATCH_1})
-            unset (PRE_ID)
         else ()
             set (VERSION ${VERSION}.0)
         endif ()
     else ()
         set (VERSION 0.0.0)
     endif ()
-    execute_process (COMMAND ${CMAKE_COMMAND} -E echo ${VERSION}${PRE_ID})
+    execute_process (COMMAND ${CMAKE_COMMAND} -E echo ${VERSION})
 endif ()


Create .app bundles for samples on OS X

Create .app bundles for samples on OS X

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -99,6 +99,11 @@
       INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
     set_property(TARGET ${SAMPLENAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
   endif ()
+
+  # On OS X, create .app bundle
+  if (APPLE)
+    set_property(TARGET ${SAMPLENAME} PROPERTY MACOSX_BUNDLE TRUE)
+  endif ()

   if (OGRE_INSTALL_SAMPLES)
     install(TARGETS ${SAMPLENAME}


Extended library search path during install.

--- CMake/mitkMacroInstallTargets.cmake
+++ CMake/mitkMacroInstallTargets.cmake
@@ -22,6 +22,18 @@
     ${MITK_BINARY_DIR}/bin/${intermediate_dir}
     ${_install_LIBRARY_DIRS}
     )
+
+  IF(GDCM_DIR)
+    LIST(APPEND DIRS ${GDCM_DIR}/bin/${intermediate_dir})
+  ENDIF()
+  IF(OpenCV_DIR)
+    LIST(APPEND DIRS ${OpenCV_DIR}/bin/${intermediate_dir})
+  ENDIF()
+  IF(MITK_USE_BLUEBERRY)
+    LIST(APPEND DIRS
+         ${CTK_RUNTIME_LIBRARY_DIRS}/${intermediate_dir}
+         ${MITK_BINARY_DIR}/bin/plugins/${intermediate_dir})
+  ENDIF()

   if(QT_LIBRARY_DIR MATCHES "^(/lib/|/lib32/|/lib64/|/usr/lib/|/usr/lib32/|/usr/lib64/|/usr/X11R6/)")
     set(_qt_is_system_qt 1)


Fix gcc (4.2.1) seg fault when building with -O2 in mac

--- CMake/Superbuild/External_SOFA.cmake
+++ CMake/Superbuild/External_SOFA.cmake
@@ -66,6 +66,11 @@
       -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
       -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
       -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
+    # GCC segmentation faults when compiling with -O2(default).
+    if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+      list(APPEND CMAKE_CXX_FLAGS_RELEASE
+        -DCXX_OPTIMIZATION_FLAGS:STRING="-O0")
+    endif()
   endif()

   set(step_targets)
@@ -78,7 +83,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "git://public.kitware.com/Bender/SOFA.git"
-    GIT_TAG "d0c41b249ae6537f27c8d8d2230b643139aaee4e"
+    GIT_TAG "8560467085378949f84f2a84c4d0d7bb4c359497"
     INSTALL_COMMAND ""
     UPDATE_COMMAND ""
     CMAKE_GENERATOR ${gen}


Set CMake variables from mitk_create_module in the parent scope.

--- CMake/mitkFunctionCreateModule.cmake
+++ CMake/mitkFunctionCreateModule.cmake
@@ -55,6 +55,8 @@
 #! List of variables available after the function is called:
 #! - MODULE_NAME
 #! - MODULE_IS_ENABLED
+#! - MODULE_SUBPROJECTS
+#! - ALL_META_DEPENDENCIES
 #!
 #! \param MODULE_NAME_IN The name for the new module
 #! \param HEADERS_ONLY specify this if the modules just contains header files.
@@ -543,5 +545,7 @@

   set(MODULE_NAME ${MODULE_NAME} PARENT_SCOPE)
   set(MODULE_IS_ENABLED ${MODULE_IS_ENABLED} PARENT_SCOPE)
+  set(MODULE_SUBPROJECTS ${MODULE_SUBPROJECTS} PARENT_SCOPE)
+  set(ALL_META_DEPENDENCIES ${ALL_META_DEPENDENCIES} PARENT_SCOPE)

 endfunction()


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -9,7 +9,6 @@
 Name[el]=Στιγμιαία μηνύματα
 Name[en_GB]=Instant Messaging
 Name[es]=Mensajería instantánea
-Name[et]=Kiirsuhtlus
 Name[fa]=پیام‌رسانی فوری
 Name[fi]=Pikaviestintä
 Name[fr]=Messagerie instantanée
@@ -51,7 +50,6 @@
 Comment[el]=Έναρξη συνομιλίας με οποιαδήποτε επαφή στιγμιαίων μηνυμάτων ή αλλαγή της κατάστασής σας
 Comment[en_GB]=Start a chat with any of your IM contacts or change your IM status
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
-Comment[et]=Vestluse alustamine mõne oma kiirsuhtluskontaktiga või enda kiirsuhtlusoleku muutmine
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
 Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci
 Comment[gl]=Inicie unha conversa con calquera dos seus contactos ou cambie seu estado na IM


disable Google Breakpad support by default

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -33,7 +33,7 @@
 OPTION(PYTHON_DED_EMBEDDED "Python embedded in dedicated server"  No)
 OPTION(OPTIM_PROJECTILES "Enable optimisations for projectiles" Yes)
 OPTION(MEMSTATS "Enable memory statistics and debugging" No)
-OPTION(BREAKPAD "Google Breakpad support" Yes)
+OPTION(BREAKPAD "Google Breakpad support" No)
 OPTION(LINENOISE "builtin Linenose support (readline/libedit replacement)" Yes)
 OPTION(DISABLE_JOYSTICK "Disable joystick support" No)
 OPTION(BOOST_LINK_STATIC "Link boost-libs statically" No)