SuperBuild: use cmake property to have global variables

--- SuperBuild/CMake/SuperBuild_Macro.cmake
+++ SuperBuild/CMake/SuperBuild_Macro.cmake
@@ -4,10 +4,11 @@
 # internal variables
 macro(SETUP_SYSTEM_LIBRARY)
   cmake_parse_arguments(NEW_SYSLIB  "" "PROJECT;DEFAULT" "" ${ARGN})
-  option(USE_SYSTEM_${NEW_SYSLIB_PROJECT}
-    "  Use a system build of ${NEW_SYSLIB_PROJECT}."
-    ${NEW_SYSLIB_DEFAULT}
-    )
+  option(USE_SYSTEM_${NEW_SYSLIB_PROJECT} "Use a system build of ${NEW_SYSLIB_PROJECT}.")
+  set(USE_SYSTEM_${NEW_SYSLIB_PROJECT} OFF)
+  if(NEW_SYSLIB_DEFAULT)
+    set(USE_SYSTEM_${NEW_SYSLIB_PROJECT} ON)
+  endif()
   set(SYSTEM_${NEW_SYSLIB_PROJECT}_CMAKE_CACHE)
 endmacro(SETUP_SYSTEM_LIBRARY)

@@ -57,27 +58,33 @@
 # Initialize usefull variables to build a superbuild project
 macro(SETUP_SUPERBUILD)
   cmake_parse_arguments(NEW_SB "" "PROJECT" "" ${ARGN})
-  set(${NEW_SB_PROJECT}_DEPENDENCIES)
+  set_property(GLOBAL PROPERTY ${project}_DEPENDENCIES "")
   set(${NEW_SB_PROJECT}_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${NEW_SB_PROJECT}/build)
   set(${NEW_SB_PROJECT}_SB_SRC ${CMAKE_BINARY_DIR}/${NEW_SB_PROJECT}/src/${NEW_SB_PROJECT})
   set(${NEW_SB_PROJECT}_SB_CONFIG)
   set(_SB_${NEW_SB_PROJECT}_ROOT ${SB_INSTALL_PREFIX})
 endmacro(SETUP_SUPERBUILD)

-macro(ADDTO_DEPENDENCIES_IF_NOT_SYSTEM proj)
+macro(ADDTO_DEPENDENCIES_IF_NOT_SYSTEM project)
+  set(PROJ_NAME_BACKUP ${project})
   foreach(dep ${ARGN})
     if(NOT USE_SYSTEM_${dep})
-      list(APPEND ${proj}_DEPENDENCIES ${dep})
+      get_property(prop_${project}_DEPENDENCIES GLOBAL PROPERTY ${project}_DEPENDENCIES)
+      list(APPEND prop_${project}_DEPENDENCIES "${dep}")
+      set_property(GLOBAL PROPERTY ${project}_DEPENDENCIES "${prop_${project}_DEPENDENCIES}")
     endif()
+    string(TOLOWER ${dep} dep_lower)
+    include(External_${dep_lower})
   endforeach()
+
 endmacro(ADDTO_DEPENDENCIES_IF_NOT_SYSTEM)

 # Macro to include dependencies
 macro(INCLUDE_SUPERBUILD_DEPENDENCIES)
-  foreach(dep ${ARGV})
-    string(TOLOWER ${dep} dep_lower)
-    include(External_${dep_lower})
-  endforeach()
+  #foreach(dep ${ARGV})
+    #string(TOLOWER ${dep} dep_lower)
+    #include(External_${dep_lower})
+  #endforeach()
 endmacro(INCLUDE_SUPERBUILD_DEPENDENCIES)

 # Macro to add a cmake variable to ${proj}_SB_CONFIG (var type: string)
@@ -107,3 +114,15 @@
       )
   endif()
 endmacro(ADD_SUPERBUILD_CONFIGURE_VAR)
+
+macro(SUPERBUILD_PATCH_SOURCE project external_project_step_name)
+  ExternalProject_Add_Step(${project} ${external_project_step_name}
+    COMMAND
+    ${CMAKE_COMMAND}
+    -DSOURCE_DIR=${${project}_SB_SRC}
+    -DPATCH_DIR=${CMAKE_SOURCE_DIR}/patches/${project}
+    -P ${CMAKE_SOURCE_DIR}/CMake/patch.cmake
+    DEPENDEES patch update
+    DEPENDERS configure
+    )
+endmacro()


DOC: Remove redundant wording in module description linking

Remove redundant wording in module description linking.

--- Modules/Filtering/AnisotropicSmoothing/itk-module.cmake
+++ Modules/Filtering/AnisotropicSmoothing/itk-module.cmake
@@ -2,8 +2,8 @@
 anisotropic smoothing. This is an image denoising technique that strives for
 preserving edges on the images while smoothing regions of uniform intensity.
 This type of filtering is convenient as a preprocessing stage of segmentation
-algorithms. You may find useful as well the filters in the
-\\\\ref ITKCurvatureFlow module and the \\\\ref ITKSmoothing.")
+algorithms. You may find useful as well the filters in
+\\\\ref ITKCurvatureFlow and \\\\ref ITKSmoothing.")

 itk_module(ITKAnisotropicSmoothing
   COMPILE_DEPENDS


fixed path inclusion

fixed path inclusion

--- src/cmake/utils.cmake
+++ src/cmake/utils.cmake
@@ -76,8 +76,9 @@
         ${AZTH_INC_PATHS}
         ${val}
     )
+
     #update cache
-    AZTH_SET_CACHE("AZTH_INC_PATHS" ${AZTH_INC_PATHS})
+    AZTH_SET_CACHE("AZTH_INC_PATHS" "${AZTH_INC_PATHS}")
     include_directories(${val})
 ENDMACRO()


Synchronize adm files

Synchronize adm files

--- adm_local_without_kernel/cmake_files/SalomeMacros.cmake
+++ adm_local_without_kernel/cmake_files/SalomeMacros.cmake
@@ -465,8 +465,8 @@
   ELSE()
      SET(_var_already_there FALSE)
   ENDIF()
-  #   Make cache entry, giving precedence to the env variable
-  SET(${pkg_UC}_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory" FORCE)
+  #   Make cache entry
+  SET(${pkg_UC}_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory")

   ##
   ## 2. Find package - try CONFIG mode first (i.e. looking for XYZ-config.cmake)


updates to .gitlab-ci.yml

updates to .gitlab-ci.yml

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -139,7 +139,7 @@
 update_test_models()
 ctest_configure()
 ctest_build()
-#IF (NOT CTEST_SKIP_TESTING)
-#  ctest_test()
-#ENDIF()
+IF (NOT CTEST_SKIP_TESTING)
+  ctest_test()
+ENDIF()
 #ctest_submit()


Working on detecting hdf5 from modules

Working on detecting hdf5 from modules

Former-commit-id: ca80e5bb0270f99c14d56ec5d7f7233a3573a669

--- cmake-modules/Fetch_Arpack-ng.cmake
+++ cmake-modules/Fetch_Arpack-ng.cmake
@@ -1,9 +1,15 @@

 unset(ARPACK_LIBRARIES)

+if(BUILD_SHARED_LIBS)
+    set(ARPACK_LIBRARY_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
+else()
+    set(ARPACK_LIBRARY_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
+endif()
+
 message(STATUS "SEARCHING FOR ARPACK IN SYSTEM")
 find_library(ARPACK_LIBRARIES
-        NAMES libarpack${CUSTOM_SUFFIX}
+        NAMES libarpack${ARPACK_LIBRARY_SUFFIX}
         PATHS /usr/lib/x86_64-linux-gnu/
         NO_DEFAULT_PATH
         )
@@ -13,7 +19,7 @@
     message(STATUS "SEARCHING FOR ARPACK IN LOADED MODULES")

     find_library(ARPACK_LIBRARIES
-            NAMES libarpack${CUSTOM_SUFFIX} arpack
+            NAMES libarpack${ARPACK_LIBRARY_SUFFIX} arpack
             PATHS "$ENV{ARPACK_DIR}/lib" "$ENV{ARPACK_DIR}/lib64"
             NO_DEFAULT_PATH
             )
@@ -74,11 +80,11 @@
             )
     ExternalProject_Get_Property(external_ARPACK INSTALL_DIR)
     find_library(ARPACK_LIBRARIES
-            NAMES libarpack${CUSTOM_SUFFIX}
+            NAMES libarpack${ARPACK_LIBRARY_SUFFIX}
             PATHS  ${INSTALL_DIR}/lib  ${INSTALL_DIR}/lib64
             )
     if(NOT ARPACK_LIBRARIES)
-        set(ARPACK_LIBRARIES ${INSTALL_DIR}/lib/libarpack${CUSTOM_SUFFIX})
+        set(ARPACK_LIBRARIES ${INSTALL_DIR}/lib/libarpack${ARPACK_LIBRARY_SUFFIX})
     endif()
     set(ARPACK_INCLUDE_DIRS ${INSTALL_DIR}/include)
     add_library(arpack INTERFACE)


ms fix

ms fix

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@8998 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -423,7 +423,7 @@
       _enable_or_disable(AVX512IFMA "avx512ifma" "Use AVX512IFMA." false)
       _enable_or_disable(AVX512VBMI "avx512vbmi" "Use AVX512VBMI." false)

-      if(MSVC)
+      if(MSVC AND MSVC_VERSION GREATER 1700) # G+Smo: VS 11
          # MSVC on 32 bit can select /arch:SSE2 (since 2010 also /arch:AVX)
          # MSVC on 64 bit cannot select anything (should have changed with MSVC 2010)
          _my_find(_enable_vector_unit_list "avx2" _found)


cmake: Only add flag once

cmake: Only add flag once

The AddCompilerFlag call here should only say whether the compiler
supports the flag. There's a more thorough test, whether the necessary
header is available, that needs to pass first. Then a list(APPEND) adds
the flag as needed.

Fixes: gh-105
Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -493,7 +493,7 @@
             endif(_good)
          endforeach(_flag)
          foreach(_flag ${_enable_vector_unit_list})
-            AddCompilerFlag("-m${_flag}" CXX_RESULT _result CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+            AddCompilerFlag("-m${_flag}" CXX_RESULT _result)
             if(_result)
                set(_header FALSE)
                if(_flag STREQUAL "sse3")


GetTargetTriple.cmake: detect MinGW 64 bits.

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

--- cmake/modules/GetTargetTriple.cmake
+++ cmake/modules/GetTargetTriple.cmake
@@ -9,7 +9,11 @@
       set( value "i686-pc-win32" )
     endif()
   elseif( MINGW AND NOT MSYS )
-    set( value "i686-pc-mingw32" )
+    if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+      set( value "x86_64-w64-mingw32" )
+    else()
+      set( value "i686-pc-mingw32" )
+    endif()
   else( MSVC )
     set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess)
     execute_process(COMMAND sh ${config_guess}


Fix include

Fix include

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -12,6 +12,7 @@
 include(hunter_status_print)
 include(hunter_test_string_not_empty)
 include(hunter_unlock)
+include(hunter_verify_toolchain_info)

 function(hunter_download)
   set(


Change external project build status: DEBUG -> NORMAL

Avoid silent build start. Fix for issue #6.

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -288,7 +288,7 @@
   set(counter "")

   while(TRUE)
-    hunter_status_debug("Run build")
+    hunter_status_print("Run build for package: ${HUNTER_PACKAGE_NAME}")

     execute_process(
         COMMAND
@@ -300,7 +300,7 @@
     )

     if(${h_build_result} EQUAL 0)
-      hunter_status_debug("Build step successful (dir: ${h_work_dir})")
+      hunter_status_print("Build step successful (dir: ${h_work_dir})")
       if(NOT HUNTER_STATUS_DEBUG)
         # clean-up
         file(REMOVE_RECURSE "${h_work_dir}")


jsoncpp: reorder versions from newest

jsoncpp: reorder versions from newest

--- cmake/projects/jsoncpp/hunter.cmake
+++ cmake/projects/jsoncpp/hunter.cmake
@@ -8,17 +8,7 @@
 include(hunter_pick_scheme)
 include(hunter_cmake_args)

-# List of versions here...
-hunter_add_version(
-    PACKAGE_NAME
-    jsoncpp
-    VERSION
-    "0.7.0"
-    URL
-    "https://github.com/open-source-parsers/jsoncpp/archive/0.7.0.tar.gz"
-    SHA1
-    4fcb0e3275a1391856fc6ae21e36dce866b19393
-)
+# List of versions:

 hunter_add_version(
     PACKAGE_NAME
@@ -31,7 +21,16 @@
     7bbb47e25b3aa7c4c8b579ca46b32d55f32cb46e
 )

-# Probably more versions for real packages...
+hunter_add_version(
+    PACKAGE_NAME
+    jsoncpp
+    VERSION
+    "0.7.0"
+    URL
+    "https://github.com/open-source-parsers/jsoncpp/archive/0.7.0.tar.gz"
+    SHA1
+    4fcb0e3275a1391856fc6ae21e36dce866b19393
+)

 # Pick a download scheme
 hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects


Minor CMake bug fix

Minor CMake bug fix

--- config/FindFRI-Client-SDK_Cpp.cmake
+++ config/FindFRI-Client-SDK_Cpp.cmake
@@ -50,5 +50,5 @@
     find_package_handle_standard_args(Nanopb DEFAULT_MSG Nanopb_LIBRARIES Nanopb_INCLUDE_DIRS)
 endif(NOT Nanopb_FOUND)

-endif(FRI-Client-SDK_Cpp_URL)
+endif(EXISTS FRI-Client-SDK_Cpp_URL)


Use _LIBRARY_DIRS in ament_target_dependencies() (#245)

Signed-off-by: Michel Hidalgo <2c7f9fd20fbeb41ce8894ec4653d66fa7f3b6e1a@ekumenlabs.com>

--- ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
+++ ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
@@ -19,9 +19,11 @@
 # Each package name must have been find_package()-ed before.
 # Additionally the exported variables must have a prefix with the same case
 # and the suffixes must be either _INTERFACES or _DEFINITIONS, _INCLUDE_DIRS,
-# _LIBRARIES, and _LINK_FLAGS.
+# _LIBRARIES, _LIBRARY_DIRS, and _LINK_FLAGS.
 # If _INTERFACES is not empty it will be used exclusively, otherwise the other
 # variables are being used.
+# If _LIBRARY_DIRS is not empty, _LIBRARIES which are not absolute paths already
+# will be searched in those directories and their absolute paths will be used instead.
 #
 # :param target: the target name
 # :type target: string
@@ -72,7 +74,18 @@
         # otherwise use the classic CMake variables
         list_append_unique(definitions ${${package_name}_DEFINITIONS})
         list_append_unique(include_dirs ${${package_name}_INCLUDE_DIRS})
-        list(APPEND libraries ${${package_name}_LIBRARIES})
+        foreach(library ${${package_name}_LIBRARIES})
+          if(NOT "${${package_name}_LIBRARY_DIRS}" STREQUAL "")
+            if (NOT IS_ABSOLUTE ${library} OR NOT EXISTS ${library})
+              find_library(lib NAMES ${library} PATHS ${${package_name}_LIBRARY_DIRS} NO_DEFAULT_PATH)
+              if(NOT lib)
+                message(FATAL_ERROR "ament_target_dependencies() ${library} library not found in ${${package_name}_LIBRARY_DIRS}")
+              endif()
+              set(library ${lib})
+            endif()
+          endif()
+          list(APPEND libraries ${library})
+        endforeach()
         list_append_unique(link_flags ${${package_name}_LINK_FLAGS})
       endif()
     endforeach()


Fixed an issue with copying the mysql release dll

--- tools/cmake/Win32PostBuild.cmake
+++ tools/cmake/Win32PostBuild.cmake
@@ -26,7 +26,8 @@
 add_custom_command(
     TARGET DEPS
     POST_BUILD
-    COMMAND xcopy "${MYSQL_CONNECTOR_C_DLL_PATH}\\$\(Configuration\)\\*.dll" "${WIN_PROJECT_BINARY_DIR}\\bin\\$\(Configuration\)" /D /I /Y /s
+    COMMAND xcopy "${MYSQL_CONNECTOR_C_DLL_PATH}\\Debug\\*.dll" "${WIN_PROJECT_BINARY_DIR}\\bin\\$\(Configuration\)" /D /I /Y /s
+    COMMAND xcopy "${MYSQL_CONNECTOR_C_DLL_PATH}\\opt\\*.dll" "${WIN_PROJECT_BINARY_DIR}\\bin\\$\(Configuration\)" /D /I /Y /s
     VERBATIM
 )


cmake: Fix compiling using MinGW

cmake: Fix compiling using MinGW

--- platforms/win32-gcc/platform.cmake
+++ platforms/win32-gcc/platform.cmake
@@ -1,7 +1,7 @@
 set (PLIB_THREAD_MODEL win)
 set (PLIB_IPC_MODEL win)
 set (PLIB_TIME_PROFILER_MODEL win)
-set (PLIB_PLATFORM_CONFIG_PATH "../pplatform.h")
+set (PLIB_PLATFORM_CONFIG_PATH "pplatform.h")

 # Ensure MSVC-compatible struct packing convention is used
 # What flag to depends on gcc version: gcc3 uses '-mms-bitfields', while


xpro::eigen INTERFACE library

xpro::eigen INTERFACE library

* with INTERFACE_INCLUDE_DIRECTORIES property set
* issue https://github.com/smanders/externpro/issues/257

--- projects/use/usexp-eigen-config.cmake
+++ projects/use/usexp-eigen-config.cmake
@@ -11,6 +11,14 @@
 unset(${PRJ}_INCLUDE_DIR CACHE)
 find_path(${PRJ}_INCLUDE_DIR eigen3/Eigen/Eigen PATHS ${XP_ROOTDIR}/include${verDir} NO_DEFAULT_PATH)
 list(APPEND ${PRJ}_INCLUDE_DIR ${XP_ROOTDIR}/include${verDir}/eigen3)
+if(NOT TARGET xpro::eigen)
+  add_library(xpro::eigen INTERFACE IMPORTED)
+  if(${PRJ}_INCLUDE_DIR)
+    set_target_properties(xpro::eigen PROPERTIES
+      INTERFACE_INCLUDE_DIRECTORIES "${${PRJ}_INCLUDE_DIR}"
+      )
+  endif()
+endif()
 set(reqVars ${PRJ}_VER ${PRJ}_INCLUDE_DIR)
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars})


build boost with program_options

build boost with program_options

--- boost.cmake
+++ boost.cmake
@@ -34,7 +34,7 @@
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ${BUILDEM_ENV_STRING} ./bootstrap.sh
-        --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread
+        --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread,program_options
         --with-python=${PYTHON_EXE}
         --prefix=${BUILDEM_DIR}
         LDFLAGS=${BUILDEM_LDFLAGS}


use {prefix} as a placeholder for the install prefix in the parent_prefix_path resource

--- ament_cmake_core/cmake/environment/ament_cmake_environment_package_hook.cmake
+++ ament_cmake_core/cmake/environment/ament_cmake_environment_package_hook.cmake
@@ -30,7 +30,17 @@
 endfunction()

 function(ament_cmake_environment_generate_parent_prefix_path_marker)
-  ament_index_register_resource("parent_prefix_path" CONTENT "$ENV{AMENT_PREFIX_PATH}")
+  set(prefix_path "$ENV{AMENT_PREFIX_PATH}")
+  while(TRUE)
+    # replace install prefix with placeholder to avoid embedding absolute paths
+    list(FIND prefix_path "${CMAKE_INSTALL_PREFIX}" index)
+    if(index EQUAL -1)
+      break()
+    endif()
+    list(REMOVE_AT prefix_path ${index})
+    list(INSERT prefix_path ${index} "{prefix}")
+  endwhile()
+  ament_index_register_resource("parent_prefix_path" CONTENT "${prefix_path}")
 endfunction()

 if(AMENT_CMAKE_ENVIRONMENT_PARENT_PREFIX_PATH_GENERATION)


Quote variables in conan_cmake_detect_vs_runtime

Account for the possibility that variables are empty, or have values which are themselves variable names, in conan_cmake_detect_vs_runtime.

There are two issues this quoting resolves. One is errors resulting from empty variables - for exampe, if `CMAKE_CXX_FLAGS` is empty, the `string` call would have failed because it would have appeared to have too few arguments - quoting the final argument fixes this.

The other is that in the context of `if`, a lot of operators try to resolve their argument as a variable name first (but only if it's unquoted), meaning that `if(${build_type} STREQUAL "DEBUG")` would have unexpected results if `build_type` is set to `DEBUG` and there is a variable `DEBUG` set to `YES`, say. Quoting the variable expansion prevents this behaviour.

--- conan.cmake
+++ conan.cmake
@@ -296,21 +296,21 @@
 endfunction()

 function(conan_cmake_detect_vs_runtime result)
-    string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
+    string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type)
     set(variables CMAKE_CXX_FLAGS_${build_type} CMAKE_C_FLAGS_${build_type} CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
     foreach(variable ${variables})
         if(NOT "${${variable}}" STREQUAL "")
-            string(REPLACE " " ";" flags ${${variable}})
+            string(REPLACE " " ";" flags "${${variable}}")
             foreach (flag ${flags})
-                if(${flag} STREQUAL "/MD" OR ${flag} STREQUAL "/MDd" OR ${flag} STREQUAL "/MT" OR ${flag} STREQUAL "/MTd")
-                    string(SUBSTRING ${flag} 1 -1 runtime)
-                    set(${result} ${runtime} PARENT_SCOPE)
+                if("${flag}" STREQUAL "/MD" OR "${flag}" STREQUAL "/MDd" OR "${flag}" STREQUAL "/MT" OR "${flag}" STREQUAL "/MTd")
+                    string(SUBSTRING "${flag}" 1 -1 runtime)
+                    set(${result} "${runtime}" PARENT_SCOPE)
                     return()
                 endif()
             endforeach()
         endif()
     endforeach()
-    if(${build_type} STREQUAL "DEBUG")
+    if("${build_type}" STREQUAL "DEBUG")
         set(${result} "MDd" PARENT_SCOPE)
     else()
         set(${result} "MD" PARENT_SCOPE)


fixing OSX

fixing OSX

--- conan.cmake
+++ conan.cmake
@@ -134,7 +134,7 @@
         set(_CONAN_SETTING_COMPILER apple-clang)
         set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
         if (USING_CXX)
-            set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
+            set(_CONAN_SETTING_COMPILER_LIBCXX libc++)
         endif ()
     elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang)
         string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
@@ -151,10 +151,11 @@
                 set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
             endif()
             if (USING_CXX)
-                set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
+                set(_CONAN_SETTING_COMPILER_LIBCXX libc++)
             endif ()
         else()
-            set(_SETTINGS ${_SETTINGS} -s compiler=clang -s compiler.version=${MAJOR}.${MINOR})
+            set(_CONAN_SETTING_COMPILER clang)
+            set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
             if (USING_CXX)
                 conan_cmake_detect_gnu_libcxx(_LIBCXX)
                 set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
@@ -203,7 +204,6 @@
             string(TOLOWER ${ARG} _setting_name)
             string(REPLACE "compiler_" "compiler." _setting_name ${_setting_name})
             set(_SETTINGS ${_SETTINGS} -s ${_setting_name}=${_CONAN_SETTING_${ARG}})
-            message(STATUS "SETTINGS ${SETTINGS}")
         endif()
     endforeach()


Adding debug messages.

Adding debug messages.

--- CPM.cmake
+++ CPM.cmake
@@ -422,11 +422,13 @@
   if (NOT CPM_HIERARCHY_LEVEL EQUAL 0)
     foreach(_cpm_kvName IN LISTS CPM_KV_LIST_SOURCE_ADDED_MAP)
       set(CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName} ${CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName}} PARENT_SCOPE)
+      message("Propogating: ${CPM_KV_SOURCE_ADDED_MAP_${_cpm_kvName}}")
     endforeach()
     set(_cpm_kvName) # Clear kvName

     # Now propogate the list itself upwards.
     set(CPM_KV_LIST_SOURCE_ADDED_MAP ${CPM_KV_LIST_SOURCE_ADDED_MAP} PARENT_SCOPE)
+    message("List: ${CPM_KV_LIST_SOURCE_ADDED_MAP}")
   endif()
 endmacro()


ENH: MIDAS+CTest: avoid race condition between two tests downloading the same file by downloading to a uniquely named temp file, then renaming atomically to the checksum-named file.

SVN-Revision: 3070

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


Turn off OpenCL.

Turn off OpenCL.

--- CMake/CMakeExternals/OpenCV.cmake
+++ CMake/CMakeExternals/OpenCV.cmake
@@ -65,6 +65,7 @@
       -DBUILD_opencv_python:BOOL=OFF
       -DBUILD_opencv_ts:BOOL=OFF
       -DBUILD_opencv_java:BOOL=OFF
+      -DBUILD_opencv_ocl:BOOL=OFF
       -DBUILD_opencv_nonfree:BOOL=${OPENCV_WITH_NONFREE}
       -DBUILD_DOCS:BOOL=OFF
       -DBUILD_DOXYGEN_DOCS:BOOL=OFF
@@ -74,6 +75,7 @@
       -DWITH_QT:BOOL=OFF
       -DWITH_EIGEN:BOOL=OFF
       -DWITH_FFMPEG:BOOL=ON
+      -DWITH_OPENCL:BOOL=OFF
       -DADDITIONAL_C_FLAGS:STRING=${OPENCV_ADDITIONAL_C_FLAGS}
       -DADDITIONAL_CXX_FLAGS:STRING=${OPENCV_ADDITIONAL_CXX_FLAGS}
       ${additional_cmake_args}


STYLE:Fixed wrong license terms.

STYLE:Fixed wrong license terms.

--- CMake/Find3DconnexionClient.cmake
+++ CMake/Find3DconnexionClient.cmake
@@ -1,23 +1,17 @@
-##=============================================================================
-##   This file is part of VTKEdge. See vtkedge.org for more information.
-##
-##   Copyright (c) 2008 Kitware, Inc.
-##
-##   VTKEdge may be used under the terms of the GNU General Public License
-##   version 3 as published by the Free Software Foundation and appearing in
-##   the file LICENSE.txt included in the top level directory of this source
-##   code distribution. Alternatively you may (at your option) use any later
-##   version of the GNU General Public License if such license has been
-##   publicly approved by Kitware, Inc. (or its successors, if any).
-##
-##   VTKEdge is distributed "AS IS" with NO WARRANTY OF ANY KIND, INCLUDING
-##   THE WARRANTIES OF DESIGN, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR
-##   PURPOSE. See LICENSE.txt for additional details.
-##
-##   VTKEdge is available under alternative license terms. Please visit
-##   vtkedge.org or contact us at kitware@kitware.com for further information.
-##
-##=============================================================================
+# =============================================================================
+#
+#  Program:   Visualization Toolkit
+#  Module:    Find3DconnexionClient.cmake
+#
+#  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+#  All rights reserved.
+#  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+#
+#     This software is distributed WITHOUT ANY WARRANTY; without even
+#     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#     PURPOSE.  See the above copyright notice for more information.
+#
+# =============================================================================

 # -----------------------------------------------------------------------------
 # Find 3DconnexionClient framework (Mac OS X).


Update Freetype versions. Thanks Transporter!

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype2410 freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype2411 freetype2410 freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


Excluded some warnings to be errors

Excluded some warnings to be errors

They are currently non-fixable since they origin from external headers
that are not maintained anymore (ITK 3)

--- CMake/mitkMacroCreateModule.cmake
+++ CMake/mitkMacroCreateModule.cmake
@@ -221,6 +221,13 @@

             mitkFunctionCheckCompilerFlags("-Wno-error=c++0x-static-nonintegral-init" module_compile_flags)
             mitkFunctionCheckCompilerFlags("-Wno-error=gnu" module_compile_flags)
+
+            # VNL headers throw a lot of these, not fixable for us at least in ITK 3
+            mitkFunctionCheckCompilerFlags("-Wno-error=unused-parameter" module_compile_flags)
+
+            # Some DICOM header file in ITK
+            mitkFunctionCheckCompilerFlags("-Wno-error=cast-align" module_compile_flags)
+
           endif()
         endif(MODULE_WARNINGS_AS_ERRORS)


- issue 2289: actually allow all different versions of the combine library to be used

--- CMakeModules/FindLIBCOMBINE.cmake
+++ CMakeModules/FindLIBCOMBINE.cmake
@@ -26,7 +26,11 @@
 endif()

 find_package(${COMBINE_LIBRARY_NAME} CONFIG REQUIRED
-  CONFIGS Combine-static-config.cmake
+  CONFIGS ${COMBINE_LIBRARY_NAME}-config.cmake
+          Combine-config.cmake
+          Combine-static-config.cmake
+          libCombine-config.cmake
+          libCombine-static-config.cmake
   PATHS ${COPASI_DEPENDENCY_DIR}/lib/cmake
         /usr/lib/cmake
         /usr/lib64/cmake


Link to python statically when ENABLE_STATIC=on

--- CMake/hoomd/HOOMDPythonSetup.cmake
+++ CMake/hoomd/HOOMDPythonSetup.cmake
@@ -32,7 +32,13 @@
 if (PYTHON_VERSION VERSION_GREATER 3)
     run_python("import sysconfig\; print(sysconfig.get_path('include'))" _python_include_hint)
     run_python("import sysconfig\; print(sysconfig.get_config_var('LIBDIR'))" _python_lib_hint)
-    run_python("import sysconfig\; print(sysconfig.get_config_var('LDLIBRARY'))" _python_dynamic_lib_name)
+    run_python("import sysconfig\; print(sysconfig.get_config_var('LIBPL'))" _python_static_hint)
+
+    if (ENABLE_STATIC)
+        run_python("import sysconfig\; print(sysconfig.get_config_var('LIBRARY'))" _python_dynamic_lib_name)
+    else()
+        run_python("import sysconfig\; print(sysconfig.get_config_var('LDLIBRARY'))" _python_dynamic_lib_name)
+    endif()
 else()
     run_python("from distutils import sysconfig\; print sysconfig.get_python_inc()" _python_include_hint)
     run_python("from distutils import sysconfig\; print sysconfig.PREFIX" _python_prefix_hint)


not darwin

not darwin

--- cmake/ArangoDBMacros.cmake
+++ cmake/ArangoDBMacros.cmake
@@ -367,7 +367,7 @@
     "${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
 set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CMakeCPackOptions.cmake")

-if (NOT(MSVC))
+if (NOT(MSVC OR DARWIN))
   # components
   install(
     FILES ${PROJECT_SOURCE_DIR}/Installation/debian/arangodb.init


fix cmake script for installing generated header files ..

--- cmake/UbiTrackModule.cmake
+++ cmake/UbiTrackModule.cmake
@@ -534,13 +534,14 @@
 	if(UBITRACK_MODULE_${the_module}_HEADERS AND ";${UBITRACK_MODULES_PUBLIC};" MATCHES ";${the_module};")
 	  foreach(hdr ${UBITRACK_MODULE_${the_module}_HEADERS})
 	    string(REGEX REPLACE "^.*modules/.*/src/" "" hdr2 "${hdr}")
-	           GET_FILENAME_COMPONENT(fpath ${hdr2} PATH)
-	           #MESSAGE(STATUS "${UBITRACK_INCLUDE_INSTALL_PATH}/${fpath}")
-	           IF(fpath)
+      string(REGEX REPLACE "${CMAKE_BINARY_DIR}/" "" hdr3 "${hdr2}")
+      GET_FILENAME_COMPONENT(fpath ${hdr3} PATH)
+      #MESSAGE(STATUS "${UBITRACK_INCLUDE_INSTALL_PATH}/${fpath}")
+      IF(fpath)
 	      install(FILES ${hdr} DESTINATION "${UBITRACK_INCLUDE_INSTALL_PATH}/${fpath}" COMPONENT main)
-	           ELSE(fpath)
-	             install(FILES ${hdr} DESTINATION "${UBITRACK_INCLUDE_INSTALL_PATH}" COMPONENT main)
-	           ENDIF(fpath)
+      ELSE(fpath)
+        install(FILES ${hdr} DESTINATION "${UBITRACK_INCLUDE_INSTALL_PATH}" COMPONENT main)
+      ENDIF(fpath)
 	  endforeach()
 	endif()


Change our INSTALL_DEBUG_SYMBOLS cmake function to be less picky and support MySQL CMakeLists.txt files

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -25,10 +25,10 @@
   )

   IF(NOT ARG_COMPONENT)
-    MESSAGE(FATAL_ERROR "No COMPONENT passed to  INSTALL_DEBUG_SYMBOLS")
+    SET(ARG_COMPONENT DebugBinaries)
   ENDIF()
   IF(NOT ARG_INSTALL_LOCATION)
-    MESSAGE(FATAL_ERROR "No INSTALL_LOCATION passed to INSTALL_DEBUG_SYMBOLS")
+    SET(ARG_INSTALL_LOCATION lib)
   ENDIF()
   SET(targets ${ARG_DEFAULT_ARGS})
   FOREACH(target ${targets})


Update Findrp.cmake

Update Findrp.cmake

--- cmake/modules/Findrp.cmake
+++ cmake/modules/Findrp.cmake
@@ -1,4 +1,4 @@
-# FindRedPitaya.cmake - Try to find the wiringPi library
+# FindRedPitaya.cmake - Try to find the rp library

 FIND_PATH(REDPITAYA_INCLUDE_DIR NAMES rp.h
    PATHS


fix(cmake/modules): enforce bundled openssl for sinsp when USE_BUNDLED_DEPS is true

Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>

--- cmake/modules/sysdig.cmake
+++ cmake/modules/sysdig.cmake
@@ -13,6 +13,12 @@

 set(SYSDIG_CMAKE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/sysdig-repo")
 set(SYSDIG_CMAKE_WORKING_DIR "${CMAKE_BINARY_DIR}/sysdig-repo")
+
+# this needs to be here at the top
+if(USE_BUNDLED_DEPS)
+  # explicitly force this dependency to use the system OpenSSL
+  set(USE_BUNDLED_OPENSSL ON)
+endif()

 file(MAKE_DIRECTORY ${SYSDIG_CMAKE_WORKING_DIR})
 # cd /path/to/build && cmake /path/to/source
@@ -48,6 +54,4 @@

 if(USE_BUNDLED_DEPS)
   add_dependencies(scap grpc curl jq)
-  # explicitly force this dependency to use the system OpenSSL
-  set(USE_BUNDLED_OPENSSL ON)
 endif()


removed boost::filesystem as a dependency

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@833 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -4,7 +4,7 @@
     set(Boost_USE_STATIC_LIBS ON)
 endif(NOT PCL_SHARED_LIBS)

-find_package(Boost 1.40.0 COMPONENTS system filesystem thread date_time)
+find_package(Boost 1.40.0 COMPONENTS system thread date_time)

 include_directories(${Boost_INCLUDE_DIRS})
 link_directories(${Boost_LIBRARY_DIRS})


Fix assets path for Emscripten

Fix assets path for Emscripten

--- CMakeTools/ModuleBuildApp.cmake
+++ CMakeTools/ModuleBuildApp.cmake
@@ -238,7 +238,7 @@

 IF ( NOT CRIMILD_APP_ASSETS_DIRECTORY )
    IF ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/assets )
-   	  SET ( CRIMILD_APP_ASSETS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets )
+   	  SET ( CRIMILD_APP_ASSETS_DIRECTORY assets )
    ENDIF ()
 ENDIF ()

@@ -267,23 +267,20 @@

 IF ( ${CMAKE_SYSTEM_NAME} MATCHES "Emscripten" )
     IF ( NOT CRIMILD_APP_INDEX_FILE )
-   	  IF ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CRIMILD_APP_SOURCE_DIRECTORY}/index.html )
-   	  	 SET ( CRIMILD_APP_INDEX_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${CRIMILD_APP_SOURCE_DIRECTORY}/index.html )
+   	  IF ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/index.html )
+   	  	 SET ( CRIMILD_APP_INDEX_FILE index.html )
    	  ENDIF ()
     ENDIF ()

-	MESSAGE( "Assets: ${CRIMILD_APP_ASSETS_DIRECTORY}" )
-	MESSAGE( "Index: ${CRIMILD_APP_INDEX_FILE}" )
-
     IF ( CRIMILD_APP_ASSETS_DIRECTORY )
 	    SET_TARGET_PROPERTIES( ${CRIMILD_APP_NAME} PROPERTIES LINK_FLAGS "-s DEMANGLE_SUPPORT=1 -s ALLOW_MEMORY_GROWTH=1 -s --preload-file ${CRIMILD_APP_ASSETS_DIRECTORY}" )
-		FILE ( INSTALL ${CRIMILD_APP_ASSETS_DIRECTORY} DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
+		FILE ( INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/${CRIMILD_APP_ASSETS_DIRECTORY} DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
 	ELSE ()
 	    SET_TARGET_PROPERTIES( ${CRIMILD_APP_NAME} PROPERTIES LINK_FLAGS "-s DEMANGLE_SUPPORT=1 -s ALLOW_MEMORY_GROWTH=1" )
 	ENDIF ()

 	IF ( CRIMILD_APP_INDEX_FILE )
-       CONFIGURE_FILE( ${CRIMILD_APP_INDEX_FILE} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY )
-	ENDIF ()
-ENDIF ()
-
+       CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/${CRIMILD_APP_INDEX_FILE} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY )
+	ENDIF ()
+ENDIF ()
+


Revert precompiled headers part of recent MinGW patch (r9640). This broke the build in MSVC 2005 which complained of inconsistent build settings between precompiled headers and source files on the second and future builds.
Really this patch should not have been touching MSVC if it was aimed at MinGW since clearly it wasn't tested there.

--HG--
branch : v1-7

--- CMake/Utils/PrecompiledHeader.cmake
+++ CMake/Utils/PrecompiledHeader.cmake
@@ -15,22 +15,12 @@

 macro(use_precompiled_header TARGET HEADER_FILE SRC_FILE)
   get_filename_component(HEADER ${HEADER_FILE} NAME)
-  get_target_property(SOURCE_FILES ${TARGET} SOURCES)

   if (MSVC)
-    get_filename_component(BASENAME ${HEADER_FILE} NAME_WE)
-	set(PREC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/${BASENAME}.pch")
-	foreach(SOURCE_FILE ${SOURCE_FILES})
-	  get_filename_component(FEXT ${SOURCE_FILE} EXT)
-	  if (FEXT STREQUAL ".cpp")
-	    set_source_files_properties(${SOURCE_FILE}
-	      PROPERTIES COMPILE_FLAGS "/Yu\"${HEADER}\" /Fp\"${PREC_HEADER}\""
-	      OBJECT_DEPENDS "${PREC_HEADER}")
-	  endif ()
-	endforeach()
+	add_definitions(/Yu"${HEADER}")
     set_source_files_properties(${SRC_FILE}
-      PROPERTIES COMPILE_FLAGS "/Yc\"${HEADER}\" /Fp\"${PREC_HEADER}\""
-	  OBJECT_OUTPUTS "${PREC_HEADER}" OBJECT_DEPENDS "")
+      PPROPERTIES COMPILE_FLAGS /Yc"${HEADER}"
+	)

   elseif (CMAKE_COMPILER_IS_GNUCXX)
     # disabled because it seems to increase compile time


Cleanup forwarding macros to better suite vtk rather than ParaView.

--- CMake/vtkForwardingExecutable.cmake
+++ CMake/vtkForwardingExecutable.cmake
@@ -34,11 +34,11 @@
     )
   endif (NOT DEFINED VTK_INSTALL_LIB_DIR_CM24)

-  add_executable_with_forwarding2(out_var "" ""
+  vtk_add_executable_with_forwarding2(out_var "" ""
     ${VTK_INSTALL_LIB_DIR_CM24}
     ${exe_name} ${ARGN})
   set (${out_real_exe_suffix} "${out_var}" PARENT_SCOPE)
-ENDFUNCTION(add_executable_with_forwarding)
+ENDFUNCTION(vtk_add_executable_with_forwarding)

 #----------------------------------------------------------------------------
 FUNCTION (vtk_add_executable_with_forwarding2
@@ -65,7 +65,7 @@
       IF (NOT EXECUTABLE_OUTPUT_PATH)
         SET (exe_output_path ${CMAKE_BINARY_DIR})
       ENDIF (NOT EXECUTABLE_OUTPUT_PATH)
-      SET(VTK_EXE_SUFFIX -real)
+      SET(VTK_EXE_SUFFIX -launcher)
       SET(VTK_FORWARD_DIR_BUILD "${exe_output_path}")
       SET(VTK_FORWARD_DIR_INSTALL "../${install_lib_dir}")
       SET(VTK_FORWARD_PATH_BUILD "\"${VTK_FORWARD_DIR_BUILD}\"")
@@ -79,20 +79,20 @@

       SET(VTK_FORWARD_EXE ${exe_name})
       CONFIGURE_FILE(
-        ${ParaView_CMAKE_DIR}/vtk-forward.c.in
+        ${VTK_CMAKE_DIR}/vtk-forward.c.in
         ${CMAKE_CURRENT_BINARY_DIR}/${exe_name}-forward.c
         @ONLY IMMEDIATE)
-      add_executable(${exe_name}
+      add_executable(${exe_name}${VTK_EXE_SUFFIX}
         ${CMAKE_CURRENT_BINARY_DIR}/${exe_name}-forward.c)
-      set_target_properties(${exe_name} PROPERTIES
+      set_target_properties(${exe_name}${VTK_EXE_SUFFIX} PROPERTIES
         RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/launcher)
-      ADD_DEPENDENCIES(${exe_name} ${exe_name}${VTK_EXE_SUFFIX})
+      set_target_properties(${exe_name}${VTK_EXE_SUFFIX} PROPERTIES
+        OUTPUT_NAME ${exe_name})
+      ADD_DEPENDENCIES(${exe_name}${VTK_EXE_SUFFIX} ${exe_name})
     ENDIF(NOT WIN32)
   ENDIF (BUILD_SHARED_LIBS AND NOT mac_bundle)

-  add_executable(${exe_name}${VTK_EXE_SUFFIX} ${ARGN})
-  set_target_properties(${exe_name}${VTK_EXE_SUFFIX} PROPERTIES
-        OUTPUT_NAME ${exe_name})
+  add_executable(${exe_name} ${ARGN})

   set (${out_real_exe_suffix} "${VTK_EXE_SUFFIX}" PARENT_SCOPE)
-ENDFUNCTION (add_executable_with_forwarding2)
+ENDFUNCTION (vtk_add_executable_with_forwarding2)


Fixed OgreInstallDependencies.cmake to copy the GLES DLL only if the GLES render system is selected.

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%401260

--- Dependencies/OgreInstallDependencies.cmake
+++ Dependencies/OgreInstallDependencies.cmake
@@ -65,21 +65,45 @@
     ${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
 	  DESTINATION bin/minsizerel CONFIGURATIONS MinSizeRel
   )
+
+  # install GLES dlls
+  if (OGRE_BUILD_RENDERSYSTEM_GLES)
+	  install(FILES
+		${OGRE_DEP_BIN_DIR}/debug/libgles_cm.dll
+		  DESTINATION bin/debug CONFIGURATIONS Debug
+	  )
+	  install(FILES
+		${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
+		  DESTINATION bin/release CONFIGURATIONS Release None ""
+	  )
+	  install(FILES
+		${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
+		  DESTINATION bin/relwithdebinfo CONFIGURATIONS RelWithDebInfo
+	  )
+	  install(FILES
+		${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
+		  DESTINATION bin/minsizerel CONFIGURATIONS MinSizeRel
+	  )
+  endif ()
 endif ()

 # copy the required DLLs to the build directory (configure_file is the only copy-like op I found in CMake)
 configure_file(${OGRE_DEP_BIN_DIR}/debug/cg.dll ${OGRE_BINARY_DIR}/bin/debug/cg.dll COPYONLY)
 configure_file(${OGRE_DEP_BIN_DIR}/debug/OIS_d.dll ${OGRE_BINARY_DIR}/bin/debug/OIS_d.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/debug/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/debug/libgles_cm.dll COPYONLY)

 configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/release/cg.dll COPYONLY)
 configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/release/OIS.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/release/libgles_cm.dll COPYONLY)

 configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/cg.dll COPYONLY)
 configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/OIS.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/libgles_cm.dll COPYONLY)

 configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/minsizerel/cg.dll COPYONLY)
 configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/minsizerel/OIS.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/minsizerel/libgles_cm.dll COPYONLY)
+
+if (OGRE_BUILD_RENDERSYSTEM_GLES)
+	configure_file(${OGRE_DEP_BIN_DIR}/debug/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/debug/libgles_cm.dll COPYONLY)
+	configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/release/libgles_cm.dll COPYONLY)
+	configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/libgles_cm.dll COPYONLY)
+	configure_file(${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/minsizerel/libgles_cm.dll COPYONLY)
+endif ()
+


cmake: Remove armasm workaround for Cortex M55

--- tools/cmake/cores/Cortex-M55.cmake
+++ tools/cmake/cores/Cortex-M55.cmake
@@ -17,13 +17,6 @@
     )
 endif()

-# We'd like to use just "-mcpu=cortex-m55" in common_options, but due to a bug
-# in armclang passing options to armasm, we use the following flags as a
-# workaround to select M55.
-list(APPEND asm_compile_options
-    -mcpu=cortex-r7
-    -Wa,--cpu=cortex-m55
-)

 function(mbed_set_cpu_core_definitions target)
     target_compile_definitions(${target}


FedPkg: PROJECT_NAME uses as the paramenter of fedpkg

--- Modules/ManageReleaseFedora.cmake
+++ Modules/ManageReleaseFedora.cmake
@@ -155,7 +155,7 @@

 	ADD_CUSTOM_COMMAND(OUTPUT ${FEDPKG_PRJ_DIR_GIT}
 	    COMMAND ${CMAKE_COMMAND} -E make_directory ${FEDPKG_DIR}
-	    COMMAND [ -d ${FEDPKG_PRJ_DIR} ] || ${FEDPKG_CMD} clone
+	    COMMAND [ -d ${FEDPKG_PRJ_DIR} ] || ${FEDPKG_CMD} clone ${PROJECT_NAME}
 	    COMMAND ${CMAKE_COMMAND} -E touch ${FEDPKG_PRJ_DIR_GIT}
 	    COMMENT "Making FedPkg directory"
 	    VERBATIM


remove extra skeleton report types

remove extra skeleton report types

--- src/osvr/GenerateForReportTypes.cmake
+++ src/osvr/GenerateForReportTypes.cmake
@@ -18,13 +18,7 @@
     EyeTrackerBlink
     NaviVelocity
     NaviPosition
-    SkeletonJoint
-    SkeletonWhole
-    SkeletonTrimmed
-    SkeletonHand
-    SkeletonArm
-    SkeletonFoot
-    SkeletonLeg
+    Skeleton
     CACHE INTERNAL "" FORCE)

 # Generate a file using a template with the placeholder @BODY@, as well as a


CMake:[2/2] Fixed http-parser library directory for Windows builds.

Review: https://reviews.apache.org/r/43691/

--- 3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ 3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -71,18 +71,19 @@
 endif (WIN32)

 # Convenience variables for `lib` directories of built third-party dependencies.
-set(HTTP_PARSER_LIB_DIR ${HTTP_PARSER_ROOT}-build)
 set(LIBEV_LIB_DIR       ${LIBEV_ROOT}-build/.libs)

 if (WIN32)
-  set(CURL_LIB_DIR     ${CURL_ROOT}/lib)
-  set(GLOG_LIB_DIR     ${GLOG_ROOT}-build/${CMAKE_BUILD_TYPE})
-  set(LIBEVENT_LIB_DIR ${LIBEVENT_ROOT}-build/lib)
-  set(PROTOBUF_LIB_DIR ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE})
+  set(HTTP_PARSER_LIB_DIR ${HTTP_PARSER_ROOT}-build/${CMAKE_BUILD_TYPE})
+  set(CURL_LIB_DIR        ${CURL_ROOT}/lib)
+  set(GLOG_LIB_DIR        ${GLOG_ROOT}-build/${CMAKE_BUILD_TYPE})
+  set(LIBEVENT_LIB_DIR    ${LIBEVENT_ROOT}-build/lib)
+  set(PROTOBUF_LIB_DIR    ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE})
 else (WIN32)
-  set(GLOG_LIB_DIR     ${GLOG_LIB_ROOT}/lib)
-  set(LIBEVENT_LIB_DIR ${LIBEVENT_LIB_ROOT}/lib)
-  set(PROTOBUF_LIB_DIR ${PROTOBUF_LIB_ROOT}/lib)
+  set(HTTP_PARSER_LIB_DIR ${HTTP_PARSER_ROOT}-build)
+  set(GLOG_LIB_DIR        ${GLOG_LIB_ROOT}/lib)
+  set(LIBEVENT_LIB_DIR    ${LIBEVENT_LIB_ROOT}/lib)
+  set(PROTOBUF_LIB_DIR    ${PROTOBUF_LIB_ROOT}/lib)
 endif (WIN32)

 # Convenience variables for "lflags", the symbols we pass to CMake to generate


deprecated the *_future macros, in response to #3622

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -624,22 +624,6 @@
   endif("$ENV{ROS_BUILD_TEST_LABEL}" STREQUAL "" OR "${label}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
 endmacro(rosbuild_add_gtest_labeled)

-# A helper to create test programs that are expected to fail for the near
-# future.  It calls rosbuild_add_executable() to
-# create the program, and augments a test target that was created in the
-# call rospack()
-macro(rosbuild_add_gtest_future exe)
-  _rosbuild_add_gtest(${ARGV})
-  # Create a legal target name, in case the target name has slashes in it
-  string(REPLACE "/" "_" _testname ${exe})
-
-  # Redeclaration of target is to workaround bug in 2.4.6
-  if(CMAKE_MINOR_VERSION LESS 6)
-    add_custom_target(test-future)
-  endif(CMAKE_MINOR_VERSION LESS 6)
-  add_dependencies(test-future test_${_testname})
-endmacro(rosbuild_add_gtest_future)
-
 # A helper to run rostests. It generates a command to run rostest on
 # the specified file and makes this target a dependency of test.
 macro(rosbuild_add_rostest file)
@@ -659,19 +643,6 @@
     rosbuild_add_rostest(${ARGN})
   endif("$ENV{ROS_BUILD_TEST_LABEL}" STREQUAL "" OR "${label}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
 endmacro(rosbuild_add_rostest_labeled)
-
-# A helper to run rostests that are expected to fail for the near future.
-# It generates a command to run rostest on
-# the specified file and makes this target a dependency of test.
-macro(rosbuild_add_rostest_future file)
-  string(REPLACE "/" "_" _testname ${file})
-  _rosbuild_add_rostest(${file})
-  # Redeclaration of target is to workaround bug in 2.4.6
-  if(CMAKE_MINOR_VERSION LESS 6)
-    add_custom_target(test-future)
-  endif(CMAKE_MINOR_VERSION LESS 6)
-  add_dependencies(test-future rostest_${_testname})
-endmacro(rosbuild_add_rostest_future)

 # A helper to run Python unit tests. It generates a command to run python
 # the specified file
@@ -693,19 +664,6 @@
     rosbuild_add_pyunit(${ARGN})
   endif("$ENV{ROS_BUILD_TEST_LABEL}" STREQUAL "" OR "${label}" STREQUAL "$ENV{ROS_BUILD_TEST_LABEL}")
 endmacro(rosbuild_add_pyunit_labeled)
-
-# A helper to run Python unit tests that are expected to fail for the near
-# future. It generates a command to run python
-# the specified file
-macro(rosbuild_add_pyunit_future file)
-  string(REPLACE "/" "_" _testname ${file})
-  _rosbuild_add_pyunit(${file})
-  # Redeclaration of target is to workaround bug in 2.4.6
-  if(CMAKE_MINOR_VERSION LESS 6)
-    add_custom_target(test-future)
-  endif(CMAKE_MINOR_VERSION LESS 6)
-  add_dependencies(test-future pyunit_${_testname})
-endmacro(rosbuild_add_pyunit_future)

 # Declare as a unit test a check of a roslaunch file, or a directory
 # containing roslaunch files.  Following the file/directory, you can
@@ -1245,3 +1203,19 @@
   endif(_rosversion_failed OR NOT __version)
 endmacro(rosbuild_get_stack_version _var stackname)

+# *_future() calls are deprecated
+macro(rosbuild_add_gtest_future exe)
+  _rosbuild_warn("The *_future() macros are deprecated.")
+  # Still need to create the executable, just in case somebody is using
+  # this macro, then doing something that refers to the executable target.
+  _rosbuild_add_gtest(${ARGV})
+endmacro(rosbuild_add_gtest_future)
+
+macro(rosbuild_add_rostest_future file)
+  _rosbuild_warn("The *_future() macros are deprecated.")
+endmacro(rosbuild_add_rostest_future)
+
+macro(rosbuild_add_pyunit_future file)
+  _rosbuild_warn("The *_future() macros are deprecated.")
+endmacro(rosbuild_add_pyunit_future)
+


修订外部库编译工具，优化对交叉编译的支持

修订外部库编译工具，优化对交叉编译的支持

--- project/cmake/modules/ProjectBuildTools.cmake
+++ project/cmake/modules/ProjectBuildTools.cmake
@@ -11,33 +11,38 @@

 set (PROJECT_BUILD_TOOLS_CMAKE_INHERIT_VARS_C
     CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_MINSIZEREL
-    CMAKE_C_COMPILER CMAKE_C_COMPILER_LAUNCHER CMAKE_C_COMPILER_AR CMAKE_C_COMPILER_RANLIB CMAKE_C_LINK_LIBRARY_SUFFIX
+    CMAKE_C_COMPILER CMAKE_C_COMPILER_TARGET CMAKE_C_COMPILER_LAUNCHER CMAKE_C_COMPILER_AR CMAKE_C_COMPILER_RANLIB CMAKE_C_LINK_LIBRARY_SUFFIX
     CMAKE_C_STANDARD_INCLUDE_DIRECTORIES CMAKE_C_STANDARD_LIBRARIES
     CMAKE_OBJC_EXTENSIONS
 )

 set (PROJECT_BUILD_TOOLS_CMAKE_INHERIT_VARS_CXX
     CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_MINSIZEREL
-    CMAKE_CXX_COMPILER CMAKE_CXX_COMPILER_LAUNCHER CMAKE_CXX_COMPILER_AR CMAKE_CXX_COMPILER_RANLIB CMAKE_CXX_LINK_LIBRARY_SUFFIX
+    CMAKE_CXX_COMPILER CMAKE_CXX_COMPILER_TARGET CMAKE_CXX_COMPILER_LAUNCHER CMAKE_CXX_COMPILER_AR CMAKE_CXX_COMPILER_RANLIB CMAKE_CXX_LINK_LIBRARY_SUFFIX
     ANDROID_CPP_FEATURES ANDROID_STL
     CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES CMAKE_CXX_STANDARD_LIBRARIES
     CMAKE_OBJCXX_EXTENSIONS
 )

 set (PROJECT_BUILD_TOOLS_CMAKE_INHERIT_VARS_ASM
-    CMAKE_ASM_FLAGS CMAKE_ASM_COMPILER CMAKE_ASM_COMPILER_LAUNCHER CMAKE_ASM_COMPILER_AR CMAKE_ASM_COMPILER_RANLIB CMAKE_ASM_LINK_LIBRARY_SUFFIX
+    CMAKE_ASM_FLAGS CMAKE_ASM_COMPILER CMAKE_ASM_COMPILER_TARGET CMAKE_ASM_COMPILER_LAUNCHER CMAKE_ASM_COMPILER_AR CMAKE_ASM_COMPILER_RANLIB CMAKE_ASM_LINK_LIBRARY_SUFFIX
 )

 set (PROJECT_BUILD_TOOLS_CMAKE_INHERIT_VARS_COMMON
     CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS
     CMAKE_TOOLCHAIN_FILE CMAKE_AR CMAKE_RANLIB
-    CMAKE_SYSTEM_NAME PROJECT_ATFRAME_TARGET_CPU_ABI
+    PROJECT_ATFRAME_TARGET_CPU_ABI
     CMAKE_SYSROOT CMAKE_SYSROOT_COMPILE # CMAKE_SYSTEM_LIBRARY_PATH # CMAKE_SYSTEM_LIBRARY_PATH ninja里解出的参数不对，原因未知
     CMAKE_OSX_SYSROOT CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_MACOSX_RPATH
     ANDROID_TOOLCHAIN ANDROID_ABI ANDROID_PIE ANDROID_PLATFORM
     ANDROID_ALLOW_UNDEFINED_SYMBOLS ANDROID_ARM_MODE ANDROID_ARM_NEON ANDROID_DISABLE_NO_EXECUTE ANDROID_DISABLE_RELRO
     ANDROID_DISABLE_FORMAT_STRING_CHECKS ANDROID_CCACHE
 )
+
+if (NOT CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
+    # Set CMAKE_SYSTEM_NAME will cause cmake to set CMAKE_CROSSCOMPILING to TRUE, so we don't set it when not crosscompiling
+    list(APPEND PROJECT_BUILD_TOOLS_CMAKE_INHERIT_VARS_COMMON CMAKE_SYSTEM_NAME CMAKE_SYSTEM_PROCESSOR CMAKE_SYSTEM_VERSION)
+endif ()

 set (PROJECT_BUILD_TOOLS_CMAKE_INHERIT_VARS
     ${PROJECT_BUILD_TOOLS_CMAKE_INHERIT_VARS_COMMON}


CMake: fix FindOpenGLES2 lib detection on Emscripten

--- CMake/Packages/FindOpenGLES2.cmake
+++ CMake/Packages/FindOpenGLES2.cmake
@@ -116,6 +116,11 @@
   SET( EGL_FOUND TRUE)
 ENDIF()

+if(EMSCRIPTEN)
+  SET( OPENGLES2_FOUND TRUE )
+  SET( EGL_FOUND TRUE)
+endif()
+
 MARK_AS_ADVANCED(
   OPENGLES2_INCLUDE_DIR
   OPENGLES2_gl_LIBRARY


SVN_SILENT made messages (.desktop file)

--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -41,6 +41,7 @@
 Name[sr@ijekavianlatin]=DirectShow‑9
 Name[sr@latin]=DirectShow‑9
 Name[sv]=DirectShow 9
+Name[tr]=DirectShow9
 Name[ug]=DirectShow9
 Name[uk]=DirectShow9
 Name[x-test]=xxDirectShow9xx
@@ -80,6 +81,7 @@
 Comment[sr@ijekavianlatin]=DirectShow‑9 kao pozadina Phonona
 Comment[sr@latin]=DirectShow‑9 kao pozadina Phonona
 Comment[sv]=Phonon Directshow 9-gränssnitt
+Comment[tr]=Phonon DirectShow9 arkaucu
 Comment[uk]=Модуль DirectShow9 для Phonon
 Comment[x-test]=xxPhonon DirectShow9 backendxx
 Comment[zh_CN]=Phonon DirectShow9 后端


--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -19,6 +19,7 @@
 Name[el]=DirectShow9
 Name[es]=DirectShow9
 Name[et]=DirectShow9
+Name[gl]=DirectShow9
 Name[hu]=DirectShow9
 Name[it]=DirectShow9
 Name[kk]=DirectShow9
@@ -54,6 +55,7 @@
 Comment[el]=Σύστημα υποστήριξης DirectShow9 του Phonon
 Comment[es]=Motor DirectShow9 para Phonon
 Comment[et]=Phononi DirectShow9 taustaprogramm
+Comment[gl]=Infraestrutura de DirectShow9 para Phonon
 Comment[hu]=Phonon DirectShow9-modul
 Comment[it]=Motore DirectShow9 di Phonon
 Comment[kk]=Phonon DirectShow9 тетігі


CastXML 0.3.4

CastXML 0.3.4

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 3)
-set(CastXML_VERSION_PATCH 3)
+set(CastXML_VERSION_PATCH 4)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


[INTERNAL] SeqAnSimdUtility: Use feature detection instead of compiler version checking

new:
* execute tests on host if the simd extension is supported by the cpu
* offer compiler flags as string and as list

fix:
* Correctly propagate include libraries to test targets for simd unit tests.

better diagnostics:
* add more compiler diagnostic

rewrote compiler detection:
* try_compile if seqans simd implementation is there
* first test seqan-simd backend
* detection will be executed once
* abort after first compiling failure
* simplify simd detection
* use flags for try and compile
* empty compiler flags will skip
* group clang blacklist rules together
* group licc blacklist rules together

use bug/crash detection for (seqan|ume)simd_compile_blacklist instead of version checking:
* detect icc16.0.{0,1} bug
* detect icc <17.0.2 bug
* detect clang4.0.0 bug
* detect missing intrinsics gcc 4.9
* gcc4.9 abi issue (avx2)
* gcc4.9 blacklist is covered by try-compile
* fix gcc4.9 issue (std::size) and new warning for clang to check binaries
* fix -O3 optimization of try-compile source code that optimized test simd operations away

other:
* dry redundant addition of testcases
* dry clone_target
* dry last static simd into loop
* tested source code should not result in a noop-binary
* doc improvement

--- util/cmake/SeqAnSimdUtility.cmake
+++ util/cmake/SeqAnSimdUtility.cmake
@@ -92,51 +92,344 @@
 find_package (SDE)
 find_package (Umesimd)

+include(CheckCXXSourceCompiles)
+include(CheckCXXSourceRuns)
+
+set(SEQAN_SIMD_UTILITY_VERBOSE OFF)
 set(SEQAN_SIMD_SUPPORTED_EXTENSIONS "sse4;avx2;avx512_knl;avx512_skx;avx512_cnl")

 if (COMPILER_MSVC)
-    set(SEQAN_SIMD_SSE4_OPTIONS /arch:AVX)
-    set(SEQAN_SIMD_AVX2_OPTIONS /arch:AVX2)
-    set(SEQAN_SIMD_AVX512_KNL_OPTIONS "")
-    set(SEQAN_SIMD_AVX512_SKX_OPTIONS "")
-    set(SEQAN_SIMD_AVX512_CNL_OPTIONS "")
+    set(SEQAN_SIMD_SSE4_FLAGS "/arch:AVX")
+    set(SEQAN_SIMD_AVX2_FLAGS "/arch:AVX2")
+    set(SEQAN_SIMD_AVX512_KNL_FLAGS "")
+    set(SEQAN_SIMD_AVX512_SKX_FLAGS "")
+    set(SEQAN_SIMD_AVX512_CNL_FLAGS "")
 elseif (COMPILER_WINTEL)
-    set(SEQAN_SIMD_SSE4_OPTIONS /QxSSE4.2)
-    set(SEQAN_SIMD_AVX2_OPTIONS /QxCORE-AVX2)
-    set(SEQAN_SIMD_AVX512_KNL_OPTIONS /QxMIC-AVX512)
-    set(SEQAN_SIMD_AVX512_SKX_OPTIONS /QxCORE-AVX512)
-    set(SEQAN_SIMD_AVX512_CNL_OPTIONS /QxCORE-AVX512)
+    set(SEQAN_SIMD_SSE4_FLAGS "/QxSSE4.2")
+    set(SEQAN_SIMD_AVX2_FLAGS "/QxCORE-AVX2")
+    set(SEQAN_SIMD_AVX512_KNL_FLAGS "/QxMIC-AVX512")
+    set(SEQAN_SIMD_AVX512_SKX_FLAGS "/QxCORE-AVX512")
+    set(SEQAN_SIMD_AVX512_CNL_FLAGS "/QxCORE-AVX512")
 elseif (COMPILER_LINTEL)
-    set(SEQAN_SIMD_SSE4_OPTIONS -xSSE4.2)
-    set(SEQAN_SIMD_AVX2_OPTIONS -xCORE-AVX2)
-    set(SEQAN_SIMD_AVX512_KNL_OPTIONS -xMIC-AVX512)
-    set(SEQAN_SIMD_AVX512_SKX_OPTIONS -xCORE-AVX512)
-    set(SEQAN_SIMD_AVX512_CNL_OPTIONS -xCORE-AVX512)
+    set(SEQAN_SIMD_SSE4_FLAGS "-xSSE4.2")
+    set(SEQAN_SIMD_AVX2_FLAGS "-xCORE-AVX2")
+    set(SEQAN_SIMD_AVX512_KNL_FLAGS "-xMIC-AVX512")
+    set(SEQAN_SIMD_AVX512_SKX_FLAGS "-xCORE-AVX512")
+    set(SEQAN_SIMD_AVX512_CNL_FLAGS "-xCORE-AVX512")
 else()
-    set(SEQAN_SIMD_SSE4_OPTIONS -msse4)
-    set(SEQAN_SIMD_AVX2_OPTIONS -mavx2)
-    set(SEQAN_SIMD_AVX512_KNL_OPTIONS -mavx512f -mavx512cd -mavx512er -mavx512pf)
-    set(SEQAN_SIMD_AVX512_SKX_OPTIONS -mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl)
-    set(SEQAN_SIMD_AVX512_CNL_OPTIONS "${SEQAN_SIMD_AVX512_SKX_OPTIONS}" -mavx512ifma -mavx512vbmi)
+    set(SEQAN_SIMD_SSE4_FLAGS "-msse4")
+    set(SEQAN_SIMD_AVX2_FLAGS "-mavx2")
+    set(SEQAN_SIMD_AVX512_KNL_FLAGS "-mavx512f -mavx512cd -mavx512er -mavx512pf")
+    set(SEQAN_SIMD_AVX512_SKX_FLAGS "-mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl")
+    set(SEQAN_SIMD_AVX512_CNL_FLAGS "${SEQAN_SIMD_AVX512_SKX_FLAGS} -mavx512ifma -mavx512vbmi")
 endif()

+# offer flags (string) as list for functions like target_compile_options
+string (REPLACE " " ";" SEQAN_SIMD_SSE4_OPTIONS "${SEQAN_SIMD_SSE4_FLAGS}")
+string (REPLACE " " ";" SEQAN_SIMD_AVX2_OPTIONS "${SEQAN_SIMD_AVX2_FLAGS}")
+string (REPLACE " " ";" SEQAN_SIMD_AVX512_KNL_OPTIONS "${SEQAN_SIMD_AVX512_KNL_FLAGS}")
+string (REPLACE " " ";" SEQAN_SIMD_AVX512_SKX_OPTIONS "${SEQAN_SIMD_AVX512_SKX_FLAGS}")
+string (REPLACE " " ";" SEQAN_SIMD_AVX512_CNL_OPTIONS "${SEQAN_SIMD_AVX512_CNL_FLAGS}")
+
+set(SEQAN_SIMD_SSE4_SDE_OPTIONS "-snb")
+set(SEQAN_SIMD_AVX2_SDE_OPTIONS "-hsw")
+set(SEQAN_SIMD_AVX512_KNL_SDE_OPTIONS "-knl")
+set(SEQAN_SIMD_AVX512_SKX_SDE_OPTIONS "-skx")
+set(SEQAN_SIMD_AVX512_CNL_SDE_OPTIONS "-cnl")
+
+set(SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS)
+set(SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD)
+set(SEQAN_SIMD_HOST_CPU_SUPPORTS)
+
+set(SEQAN_SIMD_SSE4_SOURCE
+"#include <cstdint>
+#include <immintrin.h>
+#include <iostream>
+#include <random>
+
+int main() {
+  std::random_device r;
+  std::default_random_engine e(r());
+  std::uniform_int_distribution<int32_t> d(1, 10);
+
+  alignas(16) int32_t t[]{0,0,0,0};
+  volatile auto a = _mm_set_epi32(d(e),d(e),d(e),d(e));
+  volatile auto b = _mm_set_epi32(d(e),d(e),d(e),d(e));
+  volatile auto z = _mm_max_epi32(a, b);
+  _mm_store_si128((__m128i*)t, z);
+  std::cout << \"(\" << t[0] << \", \" << t[1] << \", \" << t[2] << \", \" << t[3] << \")\" << std::endl;
+  return 0;
+}")
+
 set(SEQAN_SIMD_AVX2_SOURCE
-"#include <immintrin.h>
+"#include <cstdint>
+#include <immintrin.h>
+#include <iostream>
+#include <random>

 int main() {
-  _mm256_add_epi32(__m256i{}, __m256i{});
+  std::random_device r;
+  std::default_random_engine e(r());
+  std::uniform_int_distribution<int32_t> d(1, 10);
+
+  alignas(32) int64_t t[]{0,0,0,0};
+  volatile auto a = _mm256_set_epi64x(d(e),d(e),d(e),d(e));
+  volatile auto b = _mm256_set_epi64x(d(e),d(e),d(e),d(e));
+  volatile auto z = _mm256_add_epi64(a, b);
+  _mm256_store_si256((__m256i*)t, z);
+  std::cout << \"(\" << t[0] << \", \" << t[1] << \", \" << t[2] << \", \" << t[3] << \")\" << std::endl;
   return 0;
 }")

 set(SEQAN_SIMD_AVX512_KNL_SOURCE
 "#include <cstdint>
 #include <immintrin.h>
+#include <iostream>

 int main() {
-  alignas(64) int64_t a[]{0,1,2,3,4,5,6,7};
-  _mm512_mask_load_epi64(__m512i{}, 0, a);
+  alignas(64) uint64_t s[]{9,9,9,9,9,9,9,9};
+  alignas(64) uint64_t t[]{0,0,0,0,0,0,0,0};
+
+  // gcc 4.9 does not know _mm512_cmpgt_epu64_mask
+  volatile auto a = _mm512_setr_epi64(7,6,5,4,3,2,1,0);
+  volatile auto m = _mm512_cmpgt_epu64_mask(a, _mm512_set1_epi64(4)); // m = a > 4
+  volatile auto z = _mm512_mask_load_epi64(a, m, s); // (a > 4) ? s : a
+  _mm512_store_epi64(t, z);
+
+  // (9, 9, 9, 4, 3, 2, 1, 0)
+  std::cout << \"(\" << t[0] << \", \" << t[1] << \", \" << t[2] << \", \" << t[3] << \", ...)\" << std::endl;
   return 0;
 }")
+
+set(SEQAN_SIMD_AVX512_SKX_SOURCE "${SEQAN_SIMD_AVX512_KNL_SOURCE}")
+set(SEQAN_SIMD_AVX512_CNL_SOURCE "${SEQAN_SIMD_AVX512_KNL_SOURCE}")
+
+set(SEQAN_SIMD_SEQANSIMD_SOURCE
+"#include <cstdint>
+using int32x4_t = int32_t __attribute__ ((__vector_size__(4 * sizeof(int32_t)))); // SSE4 = 128bit
+using int32x8_t = int32_t __attribute__ ((__vector_size__(8 * sizeof(int32_t)))); // AVX2 = 256bit
+
+// gcc 4.9 bug (-fabi-version=6 (or =0) avoids this error with a change in mangling)
+template <typename vector_t>
+struct LENGTH;
+
+template <>
+struct LENGTH<int32x4_t>{
+    static const std::size_t VALUE = 4;
+};
+
+template <>
+struct LENGTH<int32x8_t>{
+    static const std::size_t VALUE = 8;
+};
+
+// icc 16.0.0, 16.0.1 bug
+template <typename TSimdVector, typename TValue>
+void assign(TSimdVector & a, int index, TValue value) { a[index] = value; }
+
+// icc >= 16.0.0 & <17.0.2 bug
+struct simd_t { int32x4_t simd_vector; };
+
+namespace ns {
+template <typename T>
+T & value(T * me) { return *me; }
+}
+
+template <typename value_t>
+void destruct(value_t * p) { }
+
+template <typename value_t>
+struct string_t {
+    value_t * value;
+
+    template <typename T1>
+    bool static assert(const T1 & value1, const T1 & value2) { return value1 <= value2; }
+
+    string_t() : value(0) { assert(value, value); }
+    ~string_t() { destruct(&ns::value(value)); }
+};
+
+template <typename value_t>
+struct holder_t {
+    value_t * value;
+
+    holder_t() { value = new value_t; }
+    ~holder_t() { delete value; }
+};
+
+struct matrix_t {  holder_t<string_t<simd_t>> cells; };
+
+int main() {
+  int32x4_t a{0,1,2,3}, b{4,3,2,1};
+  int32x8_t x{0,1,2,3,4,5,6,7}, y{4,3,2,1,0,-1,-2,-3};
+  auto c = a + b;
+  auto z = x + y;
+
+  // gcc 4.9 bug
+  constexpr auto length = LENGTH<int32x8_t>::VALUE;
+
+  // icc 16.0.0, 16.0.1 bug
+  assign(a, 0, 4);
+
+  // icc >= 16.0.0 & <17.0.2 bug
+  holder_t<matrix_t> matrix;
+  return 0;
+}")
+
+set(SEQAN_SIMD_SEQANSIMD_AVX512_SKX_SOURCE
+"#include <x86intrin.h>
+#include <iostream>
+using int8x32_t = signed char __attribute__ ((__vector_size__(32)));
+unsigned length = sizeof(int8x32_t) / sizeof(char);
+
+int main() {
+  // clang bug 4.0.0, https://bugs.llvm.org//show_bug.cgi?id=31731
+  // -std=c++14 -mavx512bw -O3
+  int8x32_t a{}, b{};
+  for (auto i = 0u; i < length; ++i) { a[i] = i-1; b[i] = -i; }
+
+  auto c = a < b;
+  for(auto i = 0u; i < length; ++i)
+    std::cout << (int)c[i] << std::endl;
+
+  return 0;
+}")
+
+# list1 and list2
+macro(list_intersect output list1 list2)
+    set(${output})
+    foreach(item ${list1})
+        if (";${list2};" MATCHES ";${item};")
+            list(APPEND ${output} "${item}")
+        endif()
+    endforeach()
+endmacro()
+
+# list1\list2 = list1 and not list2
+macro(list_complement output list1 list2)
+    set(${output})
+    foreach(item ${list1})
+        if (NOT(";${list2};" MATCHES ";${item};"))
+            list(APPEND ${output} "${item}")
+        endif()
+    endforeach()
+endmacro()
+
+# Returns list of all simd extension prior to `simd_ext`
+macro(simd_list_version_less output simd_ext)
+  set(${output})
+
+  foreach(item ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
+      if (";${item};" MATCHES ";${simd_ext};")
+          break()
+      endif()
+      list(APPEND ${output} "${item}")
+  endforeach()
+endmacro()
+
+# Returns list of all simd extension after to `simd_ext`
+macro(simd_list_version_greater output simd_ext)
+  set(${output})
+  simd_list_version_less(${output} "${simd_ext}")
+  set(${output} ${${output}} "${simd_ext}")
+  list_complement(${output} "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}" "${${output}}")
+endmacro()
+
+# simd specialized try-compile macro
+macro(check_cxx_simd_source_runs SOURCE VAR)
+    if(NOT DEFINED "${VAR}")
+        # empty flags means that this simd extension is not supported by the compiler
+        if (CMAKE_REQUIRED_FLAGS)
+            # -O3 is needed to trigger a compiler bug on clang 4.0.0
+            if (COMPILER_GCC OR COMPILER_CLANG OR COMPILER_LINTEL)
+                set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -O3")
+            endif()
+
+            # CMAKE_REQUIRED_QUIET available since cmake 3.1.0
+            set(CMAKE_REQUIRED_QUIET ON)
+            check_cxx_source_runs("${SOURCE}" ${VAR})
+            set(CMAKE_REQUIRED_QUIET OFF)
+        endif()
+
+        message(STATUS "Performing Test ${VAR}")
+        if (NOT CMAKE_REQUIRED_FLAGS)
+            set(${VAR} 0 CACHE INTERNAL "Test ${VAR}")
+            message(STATUS "Performing Test ${VAR} - No flags to enable simd architecture")
+        elseif (${VAR})
+            message(STATUS "Performing Test ${VAR} - Success (Compiled & Host CPU support)")
+        elseif (NOT ${VAR}_COMPILED)
+            message(STATUS "Performing Test ${VAR} - Failed")
+        elseif (NOT ${VAR})
+            message(STATUS "Performing Test ${VAR} - Success (Compiled)")
+        endif()
+    endif()
+endmacro()
+
+# detect simd support and cache it
+macro(detect_simd_support)
+    # Executing simd on 32bit architectures has issues
+    if (NOT DEFINED SEQAN_SIMD_DETECTED AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+        message(STATUS "SIMD acceleration is only available on 64bit systems")
+        set(SEQAN_SIMD_DETECTED 1 CACHE INTERNAL "Detected SEQAN_SIMD_DETECTED")
+        set(SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS "" CACHE INTERNAL "Test SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS")
+        set(SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD "" CACHE INTERNAL "Test SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD")
+        set(SEQAN_SIMD_HOST_CPU_SUPPORTS "" CACHE INTERNAL "Test SEQAN_SIMD_HOST_CPU_SUPPORTS")
+    elseif (NOT DEFINED SEQAN_SIMD_DETECTED)
+        # First try to compile AND run e.g. SEQAN_SIMD_SSE4_SOURCE, otherwise try to
+        # only compile the program
+        foreach(simd_ext ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
+            string(TOUPPER ${simd_ext} SIMD_EXT)
+            set(CMAKE_REQUIRED_FLAGS "${SEQAN_SIMD_${SIMD_EXT}_FLAGS}")
+            check_cxx_simd_source_runs("${SEQAN_SIMD_${SIMD_EXT}_SOURCE}" ${SIMD_EXT}_SOURCE_RUNS)
+
+            if (${SIMD_EXT}_SOURCE_RUNS)
+                list(APPEND SEQAN_SIMD_HOST_CPU_SUPPORTS "${simd_ext}")
+            endif()
+
+            if (${SIMD_EXT}_SOURCE_RUNS_COMPILED)
+                list(APPEND SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS "${simd_ext}")
+            elseif (CMAKE_REQUIRED_FLAGS)
+                message(STATUS "=> Abort simd detection of newer instruction sets")
+                break()
+            endif()
+        endforeach()
+
+        # test seqan simd
+        check_cxx_source_compiles("${SEQAN_SIMD_SEQANSIMD_SOURCE}" SEQAN_SIMD_SEQANSIMD_SUPPORTED)
+
+        # try-compile known compiler crashes/errors with seqan-simd and exclude them
+        if (SEQAN_SIMD_SEQANSIMD_SUPPORTED)
+            set(CMAKE_REQUIRED_FLAGS "${SEQAN_SIMD_AVX512_SKX_FLAGS}")
+            check_cxx_simd_source_runs("${SEQAN_SIMD_SEQANSIMD_AVX512_SKX_SOURCE}" SEQANSIMD_AVX512_SKX_SOURCE_RUNS)
+
+            if (SEQANSIMD_AVX512_SKX_SOURCE_RUNS_COMPILED)
+                set(_SEQANSIMD_SUPPORTED "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}")
+            else ()
+                simd_list_version_less(_SEQANSIMD_SUPPORTED "avx512_skx")
+            endif()
+        endif()
+
+        # seqan-simd also uses intrinsics, so exclude those that failed the intrinsic try-compile
+        list_intersect(SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD "${_SEQANSIMD_SUPPORTED}" "${SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS}")
+
+        # cache results
+        set(SEQAN_SIMD_DETECTED 1 CACHE INTERNAL "Detected SEQAN_SIMD_DETECTED")
+        set(SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS "${SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS}" CACHE INTERNAL "Test SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS")
+        set(SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD "${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD}" CACHE INTERNAL "Test SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD")
+        set(SEQAN_SIMD_HOST_CPU_SUPPORTS "${SEQAN_SIMD_HOST_CPU_SUPPORTS}" CACHE INTERNAL "Test SEQAN_SIMD_HOST_CPU_SUPPORTS")
+
+        if(SEQAN_SIMD_UTILITY_VERBOSE)
+            message(STATUS "SEQAN_SIMD_SEQANSIMD_SUPPORTED: ${SEQAN_SIMD_SEQANSIMD_SUPPORTED}")
+            message(STATUS "SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS: ${SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS}")
+            message(STATUS "SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD: ${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD}")
+            message(STATUS "SEQAN_SIMD_HOST_CPU_SUPPORTS: ${SEQAN_SIMD_HOST_CPU_SUPPORTS}")
+        endif()
+
+        unset(CMAKE_REQUIRED_FLAGS)
+        unset(SIMD_EXT)
+        unset(_SEQANSIMD_SUPPORTED)
+    endif()
+endmacro()

 macro(transfer_target_property property source_target target_target)
     get_target_property(_property_value ${source_target} ${property})
@@ -158,90 +451,64 @@
     add_executable(${target_target} ${_SOURCES})

     # https://cmake.org/cmake/help/v3.4/manual/cmake-properties.7.html#properties-on-targets
-    transfer_target_property(SOURCE_DIR ${source_target} ${target_target})
-    transfer_target_property(COMPILE_DEFINITIONS ${source_target} ${target_target})
-    transfer_target_property(COMPILE_FEATURES ${source_target} ${target_target})
-    transfer_target_property(COMPILE_FLAGS ${source_target} ${target_target})
-    transfer_target_property(COMPILE_OPTIONS ${source_target} ${target_target})
-    transfer_target_property(LINK_LIBRARIES ${source_target} ${target_target})
-    transfer_target_property(LINK_FLAGS ${source_target} ${target_target})
-    transfer_target_property(CXX_EXTENSIONS ${source_target} ${target_target})
-    transfer_target_property(CXX_STANDARD ${source_target} ${target_target})
-    transfer_target_property(CXX_STANDARD_REQUIRED ${source_target} ${target_target})
-    transfer_target_property(FOLDER ${source_target} ${target_target})
-    transfer_target_property(INCLUDE_DIRECTORIES ${source_target} ${target_target})
+    set(properies "SOURCE_DIR;COMPILE_DEFINITIONS;COMPILE_FEATURES;COMPILE_FLAGS"
+                "COMPILE_OPTIONS;LINK_LIBRARIES;LINK_FLAGS;CXX_EXTENSIONS"
+                "CXX_STANDARD;CXX_STANDARD_REQUIRED;FOLDER;INCLUDE_DIRECTORIES")
+
+    foreach(property ${properies})
+        transfer_target_property(${property} ${source_target} ${target_target})
+    endforeach()
 endmacro(clone_target)

 macro(add_simd_executables target blacklist)
-    if (NOT (";${blacklist};" MATCHES ";sse4;"))
-        clone_target(${target} "${target}_sse4")
-        target_compile_options("${target}_sse4" PRIVATE "${SEQAN_SIMD_SSE4_OPTIONS}")
-    endif()
-
-    if (NOT (";${blacklist};" MATCHES ";avx2;"))
-        clone_target(${target} "${target}_avx2")
-        target_compile_options("${target}_avx2" PRIVATE "${SEQAN_SIMD_AVX2_OPTIONS}")
-    endif()
-
-    if (NOT (";${blacklist};" MATCHES ";avx512_knl;"))
-        clone_target(${target} "${target}_avx512_knl")
-        target_compile_options("${target}_avx512_knl" PRIVATE "${SEQAN_SIMD_AVX512_KNL_OPTIONS}")
-
-        if (COMPILER_MSVC)
-            message(STATUS "avx512_knl not supported on msvc")
-        endif()
-    endif()
-
-    if (NOT (";${blacklist};" MATCHES ";avx512_skx;"))
-        clone_target(${target} "${target}_avx512_skx")
-        target_compile_options("${target}_avx512_skx" PRIVATE "${SEQAN_SIMD_AVX512_SKX_OPTIONS}")
-
-        if (COMPILER_MSVC)
-            message(STATUS "avx512_skx not supported on msvc")
-        endif()
-    endif()
-
-    if (NOT (";${blacklist};" MATCHES ";avx512_cnl;"))
-        clone_target(${target} "${target}_avx512_cnl")
-        target_compile_options("${target}_avx512_cnl" PRIVATE "${SEQAN_SIMD_AVX512_CNL_OPTIONS}")
-
-        if (COMPILER_MSVC)
-            message(STATUS "avx512_cnl not supported on msvc")
-        endif()
-    endif()
+    foreach(simd_ext ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
+        string(TOUPPER ${simd_ext} SIMD_EXT)
+        if (NOT (";${blacklist};" MATCHES ";${simd_ext};"))
+            # i.e. clone_target(${target} "${target}_avx2")
+            clone_target(${target} "${target}_${simd_ext}")
+            # i.e. target_compile_options("${target}_avx2" PRIVATE "${SEQAN_SIMD_AVX2_OPTIONS}")
+            target_compile_options("${target}_${simd_ext}" PRIVATE "${SEQAN_SIMD_${SIMD_EXT}_OPTIONS}")
+
+            # empty FLAGS means no support for this simd architecture
+            if (NOT SEQAN_SIMD_${SIMD_EXT}_OPTIONS)
+                message(STATUS "${simd_ext} not supported on ${CMAKE_CXX_COMPILER_ID} (no flags)")
+            endif()
+        endif()
+        unset(SIMD_EXT)
+    endforeach()
 endmacro(add_simd_executables)

 macro(add_simd_tests target blacklist)
     add_test(NAME "test_${target}" COMMAND $<TARGET_FILE:${target}>)

-    if (NOT SDE_FOUND)
+    # simd extensions supported by the host CPU
+    foreach(simd_ext ${SEQAN_SIMD_HOST_CPU_SUPPORTS})
+        string(TOUPPER ${simd_ext} SIMD_EXT)
+        if (TARGET "${target}_${simd_ext}" AND NOT (";${blacklist};" MATCHES ";${simd_ext};"))
+            # expands as
+            # add_test(NAME "test_test_simd_vector_sse4" COMMAND /usr/bin/sde64 -snb -- $<TARGET_FILE:test_simd_vector_sse4>)
+            add_test(NAME "test_${target}_${simd_ext}_host" COMMAND $<TARGET_FILE:${target}_${simd_ext}>)
+        endif()
+    endforeach()
+
+    if (SDE_FOUND)
+        foreach(simd_ext ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
+            string(TOUPPER ${simd_ext} SIMD_EXT)
+            if (TARGET "${target}_${simd_ext}" AND NOT (";${blacklist};" MATCHES ";${simd_ext};"))
+                # expands as
+                # add_test(NAME "test_test_simd_vector_sse4" COMMAND /usr/bin/sde64 -snb -- $<TARGET_FILE:test_simd_vector_sse4>)
+                add_test(NAME "test_${target}_${simd_ext}_sde" COMMAND ${SDE_EXECUTABLE} ${SEQAN_SIMD_${SIMD_EXT}_SDE_OPTIONS} -- $<TARGET_FILE:${target}_${simd_ext}>)
+            endif()
+        endforeach()
+    else ()
         message (STATUS "Intel Software Development Emulator not found, not building platform emulated tests.")
-    else ()
-        if (TARGET "${target}_sse4" AND NOT (";${blacklist};" MATCHES ";sse4;"))
-            add_test(NAME "test_${target}_sse4" COMMAND ${SDE_EXECUTABLE} -snb -- $<TARGET_FILE:${target}_sse4>)
-        endif()
-
-        if (TARGET "${target}_avx2" AND NOT (";${blacklist};" MATCHES ";avx2;"))
-            add_test(NAME "test_${target}_avx2" COMMAND ${SDE_EXECUTABLE} -hsw -- $<TARGET_FILE:${target}_avx2>)
-        endif()
-
-        if (TARGET "${target}_avx512_knl" AND NOT (";${blacklist};" MATCHES ";avx512_knl;"))
-            add_test(NAME "test_${target}_avx512_knl" COMMAND  ${SDE_EXECUTABLE} -knl -- $<TARGET_FILE:${target}_avx512_knl>)
-        endif()
-
-        if (TARGET "${target}_avx512_skx" AND NOT (";${blacklist};" MATCHES ";avx512_skx;"))
-            add_test(NAME "test_${target}_avx512_skx" COMMAND  ${SDE_EXECUTABLE} -skx -- $<TARGET_FILE:${target}_avx512_skx>)
-        endif()
-
-        if (TARGET "${target}_avx512_cnl" AND NOT (";${blacklist};" MATCHES ";avx512_cnl;"))
-            add_test(NAME "test_${target}_avx512_cnl" COMMAND  ${SDE_EXECUTABLE} -cnl -- $<TARGET_FILE:${target}_avx512_cnl>)
-        endif()
     endif()
 endmacro(add_simd_tests)

 macro(add_simd_platform_tests target)
     if (UMESIMD_FOUND)
         clone_target("${target}" "${target}_umesimd")
+        target_include_directories("${target}_umesimd" PUBLIC "${UMESIMD_INCLUDE_DIR}")
         target_compile_definitions("${target}_umesimd" PUBLIC SEQAN_UMESIMD_ENABLED=1)
     endif()

@@ -254,183 +521,84 @@
     set(umesimd_compile_blacklist "")
     set(umesimd_test_blacklist "")

-    if (COMPILER_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
-        ## seqan-simd:
-        # avx2: gcc4.9 has a problem to differentiate `__vector(32) signed char`
-        #       from `__vector(16) signed char` (some conflicts in the abi).
-        #       Theoretically, one could build avx2, but one wouldn't be allowed
-        #       to mix it with sse4 in the complete program. This can be fixed
-        #       by adding `-fabi-version=6` to the compiler flags, but since we
-        #       don't know which consequences this has, we disable it.
-        #
-        ## ume-simd:
-        # avx512_knl/avx512_skx/avx512_cnl:
-        #           gcc4.9 has no complete avx512_knl intrinsics support, which
-        #           are used in umesimd
-        #   error: ‘__mmask32’ does not name a type
-        #   error: ‘_mm512_castsi128_si512’ was not declared in this scope
-        set(umesimd_compile_blacklist "avx512_knl;avx512_skx;avx512_cnl")
-        set(seqansimd_compile_blacklist "avx2;avx512_knl;avx512_skx;avx512_cnl")
-    endif()
-
-    if (COMPILER_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0.1)
-            message(STATUS "Clang 4.0.0 crashes for AVX512_skx (seqan-simd only), see https://llvm.org/bugs/show_bug.cgi?id=31731")
-            set(umesimd_compile_blacklist "")
-            set(seqansimd_compile_blacklist "avx512_skx;avx512_cnl")
-        endif()
-
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.0.0)
-            message(AUTHOR_WARNING "Clang >=4.0.1 reevaluate if AVX512_skx (seqan-simd only) binaries are working.")
-            set(umesimd_compile_blacklist "")
-            set(seqansimd_compile_blacklist "")
-        endif()
-    endif()
-
-    # Build the executables, but don't execute them, because clang <= 3.9.x
-    # produces executables which contain invalid instructions for AVX512.
-    if (COMPILER_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
-
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.1)
-            message(STATUS "Clang 3.9.0 produces executables which contain invalid instructions for AVX512_skx and AVX512_knl")
-            set(umesimd_test_blacklist "avx512_knl;avx512_skx;avx512_cnl")
-            set(seqansimd_test_blacklist "${umesimd_test_blacklist}")
-        endif()
-
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.2)
-            message(STATUS "Clang 3.9.1 produces executables which contain invalid instructions for AVX512_skx (seqan-simd only), see https://llvm.org/bugs/show_bug.cgi?id=31731")
-            set(umesimd_test_blacklist "")
-            set(seqansimd_test_blacklist "avx512_skx;avx512_cnl")
-        endif()
-
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.9.1)
+    if (COMPILER_CLANG)
+        # clang >=4.0.0
+        if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) AND (";${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD};" MATCHES ";avx512_skx;"))
+            message(AUTHOR_WARNING "Clang >=4.0.0 reevaluate if AVX512_skx (seqan-simd only) binaries are working. "
+                    "At least https://llvm.org/bugs/show_bug.cgi?id=31731 seems to be fixed")
+        # clang =3.9.0
+        elseif (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.1)
+            # Build the executables, but don't execute them, because clang <= 3.9.x
+            # produces executables which contain invalid instructions for AVX512.
+            simd_list_version_greater(umesimd_test_blacklist avx2)
+            simd_list_version_greater(seqansimd_test_blacklist avx2)
+            set(reason_for_disabled_test "Clang 3.9.0 produces executables that contain invalid instructions for at least AVX512_knl and AVX512_skx")
+        # clang =3.9.1
+        elseif (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.1) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.2)
+            simd_list_version_greater(seqansimd_test_blacklist avx512_knl)
+            set(reason_for_disabled_test "Clang 3.9.1 produces executables that contain invalid instructions for at least AVX512_skx (seqan-simd only), see https://llvm.org/bugs/show_bug.cgi?id=31731")
+        # clang >=3.9.2
+        elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.9.1 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0.0)
             message(AUTHOR_WARNING "Clang >=3.9.2 reevaluate if AVX512_skx (seqan-simd only) binaries are working.")
-            set(umesimd_test_blacklist "")
-            set(seqansimd_test_blacklist "")
-        endif()
-
-    endif()
-
-    if (COMPILER_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9)
-        ## all-simd wrappers
-        # avx512_cnl: clang compiler <= 3.8.x can't handle avx512 compiler flags
-        #   error : unknown argument: '-mavx512ifma'
-        #   error : unknown argument: '-mavx512vbmi'
-        #
-        ## ume-simd:
-        # avx512_knl: clang compiler <= 3.8.x has no complete avx512_knl
-        #             intrinsics support, which are used in umesimd
-        #   error : use of undeclared identifier '_mm512_castsi128_si512'
-        #   error : use of undeclared identifier '_mm512_mask_mov_epi32'
-        #
-        ## seqan-simd:
-        # avx512_knl: clang compiler 3.6.x crashes on avx512_knl, thus disabling
-        #             it also for 3.7.x and 3.8.x, where avx512_knl works
-        set(umesimd_compile_blacklist "avx512_knl;avx512_skx;avx512_cnl")
-        set(seqansimd_compile_blacklist "avx512_knl;avx512_skx;avx512_cnl")
-
-        ## seqan-simd:
-        # avx2: clang 3.7.x fails test cases:
-        #       SimdVectorTestCommon_ShuffleConstant1 type parameter (un-)signed char __vector(32) FAILED
-        #       SimdVectorTestCommon_ShuffleConstant1 type parameter (un-)signed short __vector(16) FAILED
-        if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8))
-            set(seqansimd_compile_blacklist "avx2;${seqansimd_compile_blacklist}")
-        endif()
-
-        if (STDLIB_VS)
-            ## ume-simd:
-            # avx2: Also, it can't handle avx2 on windows, because some
-            #       intrinsics are not implemented yet:
-            #   %16 = call <8 x i32> @llvm.x86.avx2.gather.d.d.256(<8 x i32> %7, i8* %9, <8 x i32> %13, <8 x i32> %15, i8 4), !dbg !7025
-            set(umesimd_compile_blacklist "avx2;${umesimd_compile_blacklist}")
-
-            ## seqan-simd: Similar, simd-seqan doesn't work, even though
-            #              it should theoretically be possible, but some
-            #              intrinsic are not yet implemented.
-            # sse4: fatal error C1001: An internal error has occurred in the
-            #       compiler.
-            #   clang!DllGetC2Telemetry()+0x1d7c28
-            #   clang!LLVM_IR_InvokeCompilerPassW()+0xd127
-            #   clang!DllGetC2Telemetry()+0xfa13e
-            #   clang!crt_at_quick_exit()+0x104
-            #   clang!BaseThreadInitThunk()+0x12
-            # avx2: 'mm256_unpackhi_epi128': Intrinsic not yet implemented:
-            #   %8 = call <4 x i64> @llvm.x86.avx2.vperm2i128(<4 x i64> %5, <4 x i64> %7, i8 49), !dbg !5915
-            #   fatal error C1001: An internal error has occurred in the compiler.
-            set(seqansimd_compile_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}")
-        endif()
-    endif()
-
-    if (COMPILER_MSVC)
-        # msvc 2015/2017 only supports /arch:AVX and /arch:AVX2, thus don't
-        # compile AVX512
-        set(umesimd_compile_blacklist "avx512_knl;avx512_skx;avx512_cnl")
-
-        # Don't compile simd-seqan, because it uses a compiler extensions which
-        # is not supported by msvc
-        set(seqansimd_compile_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}")
-    endif()
-
-    if (COMPILER_WINTEL)
-        # Don't compile simd-seqan, because wintel compiler doesn't support
-        # vector extension even though lintel does.
-        set(seqansimd_compile_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}")
-    endif()
-
-    if (COMPILER_LINTEL AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0.2)
-        ## seqan-simd: intel compiler crashes on <= 17.0.1 at least in the test
-        #              case test_align_simd, others may work (e.g.
-        #              test_simd_vector)
-        #   ": internal error: ** The compiler has encountered an unexpected
-        #   problem. ** Segmentation violation signal raised. ** Access
-        #   violation or stack overflow. Please contact Intel Support for
-        #   assistance.
-        if(NOT ("${target}" MATCHES "test_simd_vector"))
-            set(seqansimd_compile_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}")
-        endif()
-    endif()
-
-    if(COMPILER_LINTEL AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0.2)
-        ## seqan-simd: intel compiler crashes on <= 16.0.1
-        #   ": internal error: ** The compiler has encountered an unexpected
-        #   problem. ** Segmentation violation signal raised. ** Access
-        #   violation or stack overflow. Please contact Intel Support for
-        #   assistance.
-        set(seqansimd_compile_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}")
+        # clang 3.7.x
+        elseif(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.7) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8))
+            ## seqan-simd:
+            # avx2: clang 3.7.x fails test cases:
+            #       SimdVectorTestCommon_ShuffleConstant1 type parameter (un-)signed char __vector(32) FAILED
+            #       SimdVectorTestCommon_ShuffleConstant1 type parameter (un-)signed short __vector(16) FAILED
+            simd_list_version_greater(seqansimd_test_blacklist sse4)
+            set(reason_for_disabled_test "Clang 3.7.x produces executables that fail the basic vector test `test_simd_vector`")
+        endif()
+    elseif (COMPILER_LINTEL)
+        # icc >=17.0.0, <=17.0.4
+        if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0.0) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0.5)
+            ## seqan-simd:
+            # all: icc 17.0.x fails test cases [test_align_simd_*]:
+            #       SimdAlignTestCommon_Linear_Align type parameter [...] FAILED
+            #       SimdAlignTestCommon_Linear_Score type parameter [...] FAILED
+            if (NOT ("${target}" MATCHES "test_simd_vector"))
+                set(seqansimd_test_blacklist ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
+                set(reason_for_disabled_test "Intel compiler 17.0.{0-4} produces executables that fail complex tests like `[test_align_simd_*]`")
+            endif()
+        # icc >=17.0.5
+        elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 17.0.4)
+            message(AUTHOR_WARNING "Intel compiler >=17.0.5 reevaluate if [test_align_simd_*] can be compiled.")
+        endif()
     endif()

     if(COMPILER_GCC AND DEFINED ENV{TRAVIS} AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
-        # Disable avx2 on travis, because sometimes gcc 5.x and 6.x crashes
-        set(seqansimd_compile_blacklist "${seqansimd_compile_blacklist};avx2")
-        set(umesimd_compile_blacklist "${umesimd_compile_blacklist};avx2")
-        message(STATUS "Disabling avx2 on travis, because gcc<=6.x crashes occasionally")
-    endif()
-
-    # This checks if a simple avx2 program builds
-    set(CMAKE_REQUIRED_FLAGS "${SEQAN_SIMD_AVX2_OPTIONS}")
-    check_cxx_source_compiles("${SEQAN_SIMD_AVX2_SOURCE}" AVX2_SOURCE_COMPILES)
-    unset(CMAKE_REQUIRED_FLAGS)
-    if (NOT AVX2_SOURCE_COMPILES)
-        set(seqansimd_compile_blacklist "${seqansimd_compile_blacklist};avx2")
-        set(umesimd_compile_blacklist "${umesimd_compile_blacklist};avx2")
-        message(STATUS "Your compiler/linker doesn't support avx2")
-    endif()
-
-    # This check is primarily for travis, which has an old linker
-    set(CMAKE_REQUIRED_FLAGS "${SEQAN_SIMD_AVX512_KNL_OPTIONS}")
-    check_cxx_source_compiles("${SEQAN_SIMD_AVX512_KNL_SOURCE}" KNL_SOURCE_COMPILES)
-    unset(CMAKE_REQUIRED_FLAGS)
-    if (NOT KNL_SOURCE_COMPILES)
-        set(seqansimd_compile_blacklist "${seqansimd_compile_blacklist};avx512_knl;avx512_skx;avx512_cnl")
-        set(umesimd_compile_blacklist "${umesimd_compile_blacklist};avx512_knl;avx512_skx;avx512_cnl")
-        message(STATUS "Your compiler/linker doesn't support avx512")
-    endif()
-
-    # don't use simd on 32bit architectures at all
-    if (CMAKE_SIZEOF_VOID_P EQUAL 4)
-        set(seqansimd_compile_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}")
-        set(umesimd_compile_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}")
-        message(STATUS "SIMD acceleration is only available on 64bit systems")
+        # Disable avx2,avx512_knl,... on travis, because sometimes gcc 5.x and 6.x crashes
+        simd_list_version_greater(_travis_compile_blacklist sse4)
+        set(seqansimd_compile_blacklist ${seqansimd_compile_blacklist} ${_travis_compile_blacklist})
+        set(umesimd_compile_blacklist ${umesimd_compile_blacklist} ${_travis_compile_blacklist})
+        message(STATUS "Don't compile ${seqansimd_compile_blacklist} on travis, because gcc<=6.x crashes occasionally")
+    endif()
+
+    # detect simd support by try-compile and try-run
+    detect_simd_support()
+
+    # exclude all simd extensions where a simple try-compile failed
+    list_complement(_simd_intrinsics_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}" "${SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS}")
+    list_complement(_simd_seqansimd_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}" "${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD}")
+    set(seqansimd_compile_blacklist ${seqansimd_compile_blacklist} ${_simd_intrinsics_blacklist} ${_simd_seqansimd_blacklist})
+    set(umesimd_compile_blacklist ${umesimd_compile_blacklist} ${_simd_intrinsics_blacklist})
+
+    if (UMESIMD_FOUND AND umesimd_test_blacklist)
+        message(STATUS "Disable test `${target}` for seqan-simd and ume-simd and the following simd extensions ${seqansimd_test_blacklist} and ${umesimd_test_blacklist}")
+        message(STATUS "\tReason: ${reason_for_disabled_test}")
+    elseif (UMESIMD_FOUND AND umesimd_test_blacklist AND seqansimd_test_blacklist)
+        message(STATUS "Disable test `${target}` for ume-simd and the following simd extensions ${umesimd_test_blacklist}")
+        message(STATUS "\tReason: ${reason_for_disabled_test}")
+    elseif (seqansimd_test_blacklist)
+        message(STATUS "Disable test `${target}` for seqan-simd and the following simd extensions ${seqansimd_test_blacklist}")
+        message(STATUS "\tReason: ${reason_for_disabled_test}")
+    endif()
+
+    if (SEQAN_SIMD_UTILITY_VERBOSE)
+        message(STATUS "seqansimd_compile_blacklist: ${seqansimd_compile_blacklist}")
+        message(STATUS "umesimd_compile_blacklist: ${umesimd_compile_blacklist}")
+        message(STATUS "seqansimd_test_blacklist: ${seqansimd_test_blacklist}")
+        message(STATUS "umesimd_test_blacklist: ${umesimd_test_blacklist}")
     endif()

     add_simd_executables("${target}" "${seqansimd_compile_blacklist}")


Change App name on Windows.

Change App name on Windows.

--- Projects/win32/velodyneviewer.bundle.cmake
+++ Projects/win32/velodyneviewer.bundle.cmake
@@ -4,14 +4,14 @@
 # set NSIS install specific stuff.

 set (CPACK_NSIS_MENU_LINKS
-  "bin/VelodyneViewer.exe" "VelodyneViewer")
+  "bin/VeloView.exe" "VeloView")

 install(DIRECTORY "${install_location}/bin/"
         DESTINATION "bin"
         COMPONENT "VelodyneViewer")

 SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
-  "MessageBox MB_YESNO \\\"Setup will now download/install WinPCAP. Do you want to install WinPCAP? It is needed for VelodyneViewer to work.\\\" /SD IDYES IDNO endActiveSync
+  "MessageBox MB_YESNO \\\"Setup will now download/install WinPCAP. Do you want to install WinPCAP? It is needed for VeloView to work.\\\" /SD IDYES IDNO endActiveSync
 NSISdl::download http://www.winpcap.org/install/bin/WinPcap_4_1_2.exe $INSTDIR\\\\WinPcap_4_1_2.exe
 ExecWait \\\"$INSTDIR\\\\WinPcap_4_1_2.exe\\\"
 Delete \\\"$INSTDIR\\\\WinPcap_4_1_2.exe\\\"


check for 32bit in build all configuration and disable python and numpy

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -8,10 +8,18 @@
   )
 endif()

+set(_python_excludes )
+
+if(NOT (CMAKE_SIZEOF_VOID_P EQUAL 8) )
+  set(_python_excludes
+    Python
+    Numpy
+   )
+endif()
+
 set(_package_excludes
   ${_apple_package_excludes}
-  Python
-  Numpy
+  ${_python_excludes}
   OpenCL
   SYSTEM_Boost
   Boost_LIBRARIES


[CMake] Generating XCode project for static targets

https://ogre3d.atlassian.net/browse/OGRE-559

CMake >3.8.x overwrites target output type, when target type set as 'FRAMEWORK' via set_terget_property

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -232,7 +232,8 @@
 endfunction(ogre_config_component)

 function(ogre_config_framework LIBNAME)
-  if (APPLE AND NOT APPLE_IOS)
+  get_target_property(targetType ${LIBNAME} TYPE)
+  if (APPLE AND NOT APPLE_IOS AND NOT (${targetType} STREQUAL "STATIC_LIBRARY"))
       set_target_properties(${LIBNAME} PROPERTIES FRAMEWORK TRUE)

       # Set the INSTALL_PATH so that frameworks can be installed in the application package


CMake: drop remains of OGRE_SDK_BUILD

CMake: drop remains of OGRE_SDK_BUILD

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -94,11 +94,6 @@

 # install targets according to current build type
 function(ogre_install_target TARGETNAME SUFFIX EXPORT)
-	# Skip all install targets in SDK
-	if (OGRE_SDK_BUILD)
-		return()
-	endif()
-
 	if(EXPORT)
 	  install(TARGETS ${TARGETNAME} EXPORT OgreTargetsRelease
 		CONFIGURATIONS Release None ""
@@ -363,16 +358,6 @@
 		  CONFIGURATIONS RelWithDebInfo
 		  )
   endif ()
-
-  if (APPLE AND NOT APPLE_IOS AND OGRE_SDK_BUILD)
-    # Add the path where the Ogre framework was found
-    if(NOT ${OGRE_FRAMEWORK_PATH} STREQUAL "")
-      set_target_properties(${SAMPLENAME} PROPERTIES
-        COMPILE_FLAGS "-F${OGRE_FRAMEWORK_PATH}"
-        LINK_FLAGS "-F${OGRE_FRAMEWORK_PATH}"
-      )
-    endif()
-  endif(APPLE AND NOT APPLE_IOS AND OGRE_SDK_BUILD)
 endfunction(ogre_config_sample_exe)

 function(ogre_config_sample_lib SAMPLENAME)
@@ -392,16 +377,6 @@
     endif ()
   endif ()

-  if (APPLE AND NOT APPLE_IOS AND OGRE_SDK_BUILD)
-    # Add the path where the Ogre framework was found
-    if(NOT ${OGRE_FRAMEWORK_PATH} STREQUAL "")
-      set_target_properties(${SAMPLENAME} PROPERTIES
-        COMPILE_FLAGS "-F${OGRE_FRAMEWORK_PATH}"
-        LINK_FLAGS "-F${OGRE_FRAMEWORK_PATH}"
-      )
-    endif()
-  endif(APPLE AND NOT APPLE_IOS AND OGRE_SDK_BUILD)
-
   if(NOT OGRE_STATIC AND (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
     # add GCC visibility flags to shared library build
     set_target_properties(${SAMPLENAME} PROPERTIES COMPILE_FLAGS "${OGRE_VISIBILITY_FLAGS}")


Fixed wrong build directory in PluginGenerator test.

--- CMake/mitkTestPluginGenerator.cmake
+++ CMake/mitkTestPluginGenerator.cmake
@@ -29,7 +29,7 @@
                            LABELS "MITK;BlueBerry")

       add_test(NAME mitkPluginGeneratorBuildTest-${config} CONFIGURATIONS ${config}
-               COMMAND ${CMAKE_COMMAND} --build ${MITK-ProjectTemplate_BINARY_DIR} --config ${config})
+               COMMAND ${CMAKE_COMMAND} --build ${test_project_binary_dir} --config ${config})
       set_tests_properties(mitkPluginGeneratorBuildTest-${config} PROPERTIES
                            DEPENDS mitkPluginGeneratorConfigureTest-${config}
                            LABELS "MITK;BlueBerry")


work around gadgetron problem with old MKL

If an old MKL is found, Gadgetron refuses to build. So, we
first check if this is the case, and in then disable MKL for Gadgetron

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -22,6 +22,15 @@
   set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${CMAKE_CURRENT_BINARY_DIR}/INSTALL)
   set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${CMAKE_CURRENT_BINARY_DIR}/INSTALL)

+  # work-around Gadgetron problem with old MKL
+find_package(MKL)
+if (MKL_FOUND)
+  if ( MKL_VERSION_STRING VERSION_LESS 11.2.0 )
+    message(WARNING "Gadgetron requires Intel MKL version >= 11.2.0 but found ${MKL_VERSION_STRING}. Disabling usage of MKL")
+    set(MKL_FOUND false)
+    set(MKLROOT_PATH=)
+  endif ()
+endif ()
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY ${${proj}_URL}
@@ -38,9 +47,9 @@
         -DHDF5_ROOT=${HDF5_ROOT}
         -DHDF5_INCLUDE_DIRS=${HDF5_INCLUDE_DIRS}
         -DHDF5_LIBRARIES=${HDF5_LIBRARIES}
-        -DFFTW_LIBRARIES=${CMAKE_CURRENT_BINARY_DIR}/INSTALL/lib
-         -DFFTW_INCLUDES=${CMAKE_CURRENT_BINARY_DIR}/INSTALL/include
+        -DFFTW_ROOT_DIR=${CMAKE_CURRENT_BINARY_DIR}/INSTALL
         -DISMRMRD_DIR=${ISMRMRD_DIR}
+        -DMKLROOT_PATH=${MKLROOT_PATH}
 	    INSTALL_DIR ${Gadgetron_Install_Dir}
     DEPENDS
         ${${proj}_DEPENDENCIES}


allow profiling

allow profiling

--- 2012/software/standardPCOpts.cmake
+++ 2012/software/standardPCOpts.cmake
@@ -1,7 +1,7 @@

 IF((${ROBOT_REV} MATCHES "candiiidbg") OR (${ROBOT_REV} MATCHES "jeannidbg"))
-	SET(CMAKE_C_FLAGS  "-march=native -pipe -Wall -Wstrict-prototypes -Wextra -ggdb3 -O0 -pthread -DOSMC_4WD -fopenmp")
-	SET(CMAKE_CXX_FLAGS "-march=native -pipe -Wall -Wextra -ggdb3 -O0 -pthread -DOSMC_4WD  -fopenmp -rdynamic -g")
+	SET(CMAKE_C_FLAGS  "-march=native -pipe -Wall -Wstrict-prototypes -Wextra -ggdb3 -O0 -pthread -DOSMC_4WD -fopenmp -p")
+	SET(CMAKE_CXX_FLAGS "-march=native -pipe -Wall -Wextra -ggdb3 -O0 -pthread -DOSMC_4WD  -fopenmp -rdynamic -g -p")
 ELSEIF( (${ROBOT_REV} MATCHES "candiii") OR (${ROBOT_REV} MATCHES "jeanni"))
 	SET(CMAKE_C_FLAGS  "-march=native -pipe -Wall -Wstrict-prototypes -Wextra -Wuninitialized -Werror=uninitialized -ggdb3 -O2 -pthread -DOSMC_4WD  -fopenmp")
 #	SET(CMAKE_CXX_FLAGS "-march=native -pipe -std=gnu++0x -Wall -Wextra -Wuninitialized -Werror=uninitialized -g3 -O2 -pthread")


PKG: remove remote module

PKG: remove remote module

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -144,15 +144,15 @@

 set(OTB_MODULES_CONFIG)
 if(WITH_REMOTE_MODULES)
-  foreach(remote_module SertitObject Mosaic otbGRM DiapOTBModule)
-    list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
-  endforeach()
+  # foreach(remote_module SertitObject Mosaic otbGRM DiapOTBModule)
+  #   list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
+  # endforeach()

   # Add CESBIO'S remote modules if OTB is compiled with GSL support (for now only TemporalGapFilling)
   if(OTB_USE_GSL)
-    foreach(remote_module OTBTemporalGapFilling)
-      list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
-    endforeach()
+    # foreach(remote_module OTBTemporalGapFilling)
+    #   list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON)
+    # endforeach()
   endif()
 else()
   set(OTB_MODULES_CONFIG)


on ubuntu karmic QGLViewer/qglviewer.h is under qglviewer-qt4/qglviewer.h

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@1915 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/FindQGLViewer.cmake
+++ Numerics/cmake/FindQGLViewer.cmake
@@ -7,13 +7,14 @@
 #  QGLVIEWER_DEFINITIONS - Compiler switches required for using QGLViewer
 #

-
-FIND_PATH(QGLVIEWER_INCLUDE_DIR NAMES QGLViewer/qglviewer.h
-  PATHS
-  $ENV{QGLVIEWER_INCLUDE_DIR}
-  /usr/include
-  /usr/local/include
-)
+FOREACH(_D QGLViewer;qglviewer-qt4)
+  FIND_PATH(QGLVIEWER_INCLUDE_DIR NAMES qglviewer.h
+    PATHS
+    $ENV{QGLVIEWER_INCLUDE_DIR}
+    /usr/include/${_D}
+    /usr/local/include/${_D}
+    )
+ENDFOREACH(_D QGLViewer;qglviewer-qt4)

 FIND_LIBRARY(QGLVIEWER_LIBRARY NAMES QGLViewer
   PATHS
@@ -24,6 +25,15 @@

 IF(NOT QGLVIEWER_LIBRARY)
   FIND_LIBRARY(QGLVIEWER_LIBRARY NAMES 3dviewer
+    PATHS
+    $ENV{QLGLVIEWER_LIB_DIR}
+    /usr/lib
+    /usr/local/lib
+  )
+ENDIF(NOT QGLVIEWER_LIBRARY)
+
+IF(NOT QGLVIEWER_LIBRARY)
+  FIND_LIBRARY(QGLVIEWER_LIBRARY NAMES qglviewer-qt4
     PATHS
     $ENV{QLGLVIEWER_LIB_DIR}
     /usr/lib


Fix the library name in the FindGLES2 script

--- CMake/Packages/FindOpenGLES2.cmake
+++ CMake/Packages/FindOpenGLES2.cmake
@@ -50,7 +50,7 @@

     FIND_LIBRARY(OPENGLES2_gl_LIBRARY
-      NAMES GLES_CM
+      NAMES GLESv2
       PATHS /opt/graphics/OpenGL/lib
             /usr/openwin/lib
             /usr/shlib /usr/X11R6/lib


Remove parpack from FindARPACK.cmake

Remove parpack from FindARPACK.cmake

--- CMake/Modules/FindARPACK.cmake
+++ CMake/Modules/FindARPACK.cmake
@@ -1,5 +1,5 @@
 find_library(ARPACK_LIBRARY
-  NAMES arpack parpack
+  NAMES arpack
   PATHS ${ARPACK_DIR}/lib
 )


Changed MITK version number for release test candidate

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -6,8 +6,8 @@

 # MITK_VERSION
 set(MITK_VERSION_MAJOR "2012")
-set(MITK_VERSION_MINOR "02")
-set(MITK_VERSION_PATCH "99")
+set(MITK_VERSION_MINOR "06")
+set(MITK_VERSION_PATCH "00")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")
   set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}")