ENH: Superbuild - Underscore are now valid character in CTK library option name

--- CMake/ctkFunctionExtractOptionNameAndValue.cmake
+++ CMake/ctkFunctionExtractOptionNameAndValue.cmake
@@ -6,7 +6,7 @@
 FUNCTION(ctkFunctionExtractOptionNameAndValue my_opt var_opt_name var_opt_value)

  # Make sure option is correctly formated
-  IF(NOT "${my_opt}" MATCHES "^[/A-Za-z0-9.]+:(ON|OFF)")
+  IF(NOT "${my_opt}" MATCHES "^[/A-Za-z0-9._]+:(ON|OFF)")
     MESSAGE(FATAL_ERROR "Option ${my_opt} is incorrect. Options should be specified using the following format OPT1:[ON|OFF]. For example OPT1:OFF or OPT2:ON")
   ENDIF()


- Add small fix to Maemo toolchain, setting MAEMO as cached flag

--- cmake/Toolchains/linux-maemo-armv7_linux.toolchain.cmake
+++ cmake/Toolchains/linux-maemo-armv7_linux.toolchain.cmake
@@ -1,7 +1,7 @@
 set ( CMAKE_SYSTEM_NAME Linux )
 set ( TOOLCHAIN_PREFIX "arm-unknown-linux-gnueabi" )

-set ( MAEMO TRUE )
+set ( MAEMO TRUE CACHE BOOL "" )

 set ( MAEMO_SDK "${MAEMO_SDK}" CACHE PATH "" )


Add a workaround for this C++ issue and trilinos.

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26576 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/contrib/cmake/configure/configure_trilinos.cmake
+++ deal.II/contrib/cmake/configure/configure_trilinos.cmake
@@ -110,16 +110,32 @@
       int main(){ return 0; }
       "
       TRILINOS_SUPPORTS_CPP11)
+
+    IF(DEAL_II_CAN_USE_CXX11 AND NOT TRILINOS_SUPPORTS_CPP11)
+      #
+      # Try whether exporting HAS_C99_TR1_CMATH helps:
+      #
+      ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-DHAS_C99_TR1_CMATH")
+      CHECK_CXX_SOURCE_COMPILES(
+        "
+        #include <Sacado_cmath.hpp>
+        int main(){ return 0; }
+        "
+        TRILINOS_HAS_C99_TR1_WORKAROUND)
+      STRIP_FLAG(CMAKE_REQUIRED_FLAGS "-DHAS_C99_TR1_CMATH")
+
+      IF(TRILINOS_HAS_C99_TR1_WORKAROUND)
+        ADD_DEFINITIONS("-DHAS_C99_TR1_CMATH")
+      ELSE()
+        MESSAGE(WARNING "\n"
+          "Your Trilinos installation is not compatible with the C++ standard selected for\n"
+          "this compiler. See the deal.II FAQ page for a solution.\n\n"
+          )
+        SET(${var} FALSE)
+      ENDIF()
+    ENDIF()
     STRIP_FLAG(CMAKE_REQUIRED_FLAGS "-std=c++0x")
     LIST(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${TRILINOS_INCLUDE_DIR})
-
-    IF(DEAL_II_CAN_USE_CXX11 AND NOT TRILINOS_SUPPORTS_CPP11)
-      MESSAGE(WARNING "\n"
-        "Your Trilinos installation is not compatible with the C++ standard selected for\n"
-        "this compiler. See the deal.II FAQ page for a solution.\n\n"
-        )
-      SET(${var} FALSE)
-    ENDIF()

   ENDIF(TRILINOS_FOUND)
 ENDMACRO()


Tweak HAVE_LIBRESOLV test and find the library only if needed

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -123,7 +123,6 @@
 find_library(HAVE_LIBNSL nsl)
 find_library(HAVE_LIBPTHREAD pthread)
 find_library(HAVE_LIBREADLINE readline)
-find_library(HAVE_LIBRESOLV resolv)
 find_library(HAVE_LIBTERMCAP termcap)
 find_library(HAVE_LIBUTIL    util)

@@ -613,6 +612,9 @@
 check_symbol_exists(getpeername     "${CFG_HEADERS}" HAVE_GETPEERNAME)
 check_symbol_exists(hstrerror       "${CFG_HEADERS}" HAVE_HSTRERROR)
 check_symbol_exists(inet_aton       "${CFG_HEADERS}" HAVE_INET_ATON)
+if(NOT HAVE_INET_ATON)
+  check_library_exists(resolv inet_aton "" HAVE_LIBRESOLV)
+endif(NOT HAVE_INET_ATON)
 check_symbol_exists(inet_pton       "${CFG_HEADERS}" HAVE_INET_PTON)

 check_type_exists("struct addrinfo" "${CFG_HEADERS}" HAVE_ADDRINFO)


Update OpenCVDetectVTK.cmake

Update OpenCVDetectVTK.cmake

--- cmake/OpenCVDetectVTK.cmake
+++ cmake/OpenCVDetectVTK.cmake
@@ -1,7 +1,7 @@
 if(NOT VTK_FOUND)
   find_package(VTK QUIET NAMES vtk VTK)
   if(VTK_FOUND)
-    if(VTK_VERSION VERSION_EQUAL "9") # VTK 9.0
+    if(NOT (VTK_VERSION VERSION_LESS "9.0.0") AND (VTK_VERSION VERSION_LESS "10.0.0")) # VTK 9.x
       find_package(VTK 9 QUIET NAMES vtk COMPONENTS
               FiltersExtraction
               FiltersSources


Update the CPack variables to match the changes in asmorkalov/CMake#1

Which also happens to align the non-Debian specific variables
with the ones used by upstream CMake.

(cherry picked from commit b8c60234c3fa94c31a3e2a72275fefa811c75d5c)

Conflicts:
	cmake/OpenCVPackaging.cmake

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -64,66 +64,64 @@

 #depencencies
 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
-set(CPACK_COMPONENT_samples_DEPENDS libs)
-set(CPACK_COMPONENT_dev_DEPENDS libs)
-set(CPACK_COMPONENT_docs_DEPENDS libs)
-set(CPACK_COMPONENT_java_DEPENDS libs)
-set(CPACK_COMPONENT_python_DEPENDS libs)
-set(CPACK_DEB_python_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}")
-set(CPACK_COMPONENT_tests_DEPENDS libs)
+set(CPACK_COMPONENT_SAMPLES_DEPENDS libs dev)
+set(CPACK_COMPONENT_DEV_DEPENDS libs)
+set(CPACK_COMPONENT_DOCS_DEPENDS libs)
+set(CPACK_COMPONENT_JAVA_DEPENDS libs)
+set(CPACK_COMPONENT_PYTHON_DEPENDS libs)
+set(CPACK_DEB_PYTHON_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}")
+set(CPACK_COMPONENT_TESTS_DEPENDS libs)
 if (HAVE_opencv_python)
-  set(CPACK_DEB_tests_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}, python-py | python-pytest")
+  set(CPACK_DEB_TESTS_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}, python-py | python-pytest")
 endif()

 if(HAVE_CUDA)
   string(REPLACE "." "-" cuda_version_suffix ${CUDA_VERSION})
   if(CUDA_VERSION VERSION_LESS "6.5")
-    set(CPACK_DEB_libs_PACKAGE_DEPENDS "cuda-core-libs-${cuda_version_suffix}, cuda-extra-libs-${cuda_version_suffix}")
-    set(CPACK_DEB_dev_PACKAGE_DEPENDS "cuda-headers-${cuda_version_suffix}")
+    set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "cuda-core-libs-${cuda_version_suffix}, cuda-extra-libs-${cuda_version_suffix}")
+    set(CPACK_DEB_DEV_PACKAGE_DEPENDS "cuda-headers-${cuda_version_suffix}")
   else()
-    set(CPACK_DEB_libs_PACKAGE_DEPENDS "cuda-cudart-${cuda_version_suffix}, cuda-npp-${cuda_version_suffix}")
-    set(CPACK_DEB_dev_PACKAGE_DEPENDS "cuda-cudart-dev-${cuda_version_suffix}, cuda-npp-dev-${cuda_version_suffix}")
+    set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "cuda-cudart-${cuda_version_suffix}, cuda-npp-${cuda_version_suffix}")
+    set(CPACK_DEB_DEV_PACKAGE_DEPENDS "cuda-cudart-dev-${cuda_version_suffix}, cuda-npp-dev-${cuda_version_suffix}")
     if(HAVE_CUFFT)
-      set(CPACK_DEB_libs_PACKAGE_DEPENDS "${CPACK_DEB_libs_PACKAGE_DEPENDS}, cuda-cufft-${cuda_version_suffix}")
-      set(CPACK_DEB_dev_PACKAGE_DEPENDS "${CPACK_DEB_dev_PACKAGE_DEPENDS}, cuda-cufft-dev-${cuda_version_suffix}")
+      set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "${CPACK_DEB_LIBS_PACKAGE_DEPENDS}, cuda-cufft-${cuda_version_suffix}")
+      set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, cuda-cufft-dev-${cuda_version_suffix}")
     endif()
     if(HAVE_HAVE_CUBLAS)
-      set(CPACK_DEB_libs_PACKAGE_DEPENDS "${CPACK_DEB_libs_PACKAGE_DEPENDS}, cuda-cublas-${cuda_version_suffix}")
-      set(CPACK_DEB_dev_PACKAGE_DEPENDS "${CPACK_DEB_dev_PACKAGE_DEPENDS}, cuda-cublas-dev-${cuda_version_suffix}")
+      set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "${CPACK_DEB_LIBS_PACKAGE_DEPENDS}, cuda-cublas-${cuda_version_suffix}")
+      set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, cuda-cublas-dev-${cuda_version_suffix}")
     endif()
   endif()
-
-  set(CPACK_COMPONENT_dev_DEPENDS libs)
 endif()

 if(NOT OPENCV_CUSTOM_PACKAGE_INFO)
-  set(CPACK_COMPONENT_libs_DISPLAY_NAME "libopencv")
-  set(CPACK_COMPONENT_libs_DESCRIPTION "Open Computer Vision Library")
-  set(CPACK_COMPONENT_libs_SECTION "libs")
+  set(CPACK_COMPONENT_LIBS_DESCRIPTION "Open Computer Vision Library")
+  set(CPACK_DEBIAN_COMPONENT_LIBS_NAME "libopencv")
+  set(CPACK_DEBIAN_COMPONENT_LIBS_SECTION "libs")

-  set(CPACK_COMPONENT_python_DISPLAY_NAME "libopencv-python")
-  set(CPACK_COMPONENT_python_DESCRIPTION "Python bindings for Open Source Computer Vision Library")
-  set(CPACK_COMPONENT_python_SECTION "python")
+  set(CPACK_COMPONENT_PYTHON_DESCRIPTION "Python bindings for Open Source Computer Vision Library")
+  set(CPACK_DEBIAN_COMPONENT_PYTHON_NAME "libopencv-python")
+  set(CPACK_DEBIAN_COMPONENT_PYTHON_SECTION "python")

-  set(CPACK_COMPONENT_java_DISPLAY_NAME "libopencv-java")
-  set(CPACK_COMPONENT_java_DESCRIPTION "Java bindings for Open Source Computer Vision Library")
-  set(CPACK_COMPONENT_java_SECTION "java")
+  set(CPACK_COMPONENT_JAVA_DESCRIPTION "Java bindings for Open Source Computer Vision Library")
+  set(CPACK_DEBIAN_COMPONENT_JAVA_NAME "libopencv-java")
+  set(CPACK_DEBIAN_COMPONENT_JAVA_SECTION "java")

-  set(CPACK_COMPONENT_dev_DISPLAY_NAME "libopencv-dev")
-  set(CPACK_COMPONENT_dev_DESCRIPTION "Development files for Open Source Computer Vision Library")
-  set(CPACK_COMPONENT_dev_SECTION "libdevel")
+  set(CPACK_COMPONENT_DEV_DESCRIPTION "Development files for Open Source Computer Vision Library")
+  set(CPACK_DEBIAN_COMPONENT_DEV_NAME "libopencv-dev")
+  set(CPACK_DEBIAN_COMPONENT_DEV_SECTION "libdevel")

-  set(CPACK_COMPONENT_docs_DISPLAY_NAME "libopencv-docs")
-  set(CPACK_COMPONENT_docs_DESCRIPTION "Documentation for Open Source Computer Vision Library")
-  set(CPACK_COMPONENT_docs_SECTION "doc")
+  set(CPACK_COMPONENT_DOCS_DESCRIPTION "Documentation for Open Source Computer Vision Library")
+  set(CPACK_DEBIAN_COMPONENT_DOCS_NAME "libopencv-docs")
+  set(CPACK_DEBIAN_COMPONENT_DOCS_SECTION "doc")

-  set(CPACK_COMPONENT_samples_DISPLAY_NAME "libopencv-samples")
-  set(CPACK_COMPONENT_samples_DESCRIPTION "Samples for Open Source Computer Vision Library")
-  set(CPACK_COMPONENT_samples_SECTION "devel")
+  set(CPACK_COMPONENT_SAMPLES_DESCRIPTION "Samples for Open Source Computer Vision Library")
+  set(CPACK_DEBIAN_COMPONENT_SAMPLES_NAME "libopencv-samples")
+  set(CPACK_DEBIAN_COMPONENT_SAMPLES_SECTION "devel")

-  set(CPACK_COMPONENT_tests_DISPLAY_NAME "libopencv-tests")
-  set(CPACK_COMPONENT_tests_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library")
-  set(CPACK_COMPONENT_tests_SECTION "misc")
+  set(CPACK_COMPONENT_TESTS_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library")
+  set(CPACK_DEBIAN_COMPONENT_TESTS_NAME "libopencv-tests")
+  set(CPACK_DEBIAN_COMPONENT_TESTS_SECTION "misc")
 endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)

 if(CPACK_GENERATOR STREQUAL "DEB")
@@ -139,9 +137,10 @@
   set(CHANGELOG_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
   set(ALL_COMPONENTS "libs" "dev" "docs" "python" "java" "samples" "tests")
   foreach (comp ${ALL_COMPONENTS})
+    string(TOUPPER "${comp}" comp_upcase)
     set(DEBIAN_CHANGELOG_OUT_FILE    "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian")
     set(DEBIAN_CHANGELOG_OUT_FILE_GZ "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian.gz")
-    set(CHANGELOG_PACKAGE_NAME "${CPACK_COMPONENT_${comp}_DISPLAY_NAME}")
+    set(CHANGELOG_PACKAGE_NAME "${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}")
     configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/changelog.Debian.in" "${DEBIAN_CHANGELOG_OUT_FILE}" @ONLY)

     execute_process(COMMAND "${GZIP_TOOL}" "-cf9" "${DEBIAN_CHANGELOG_OUT_FILE}"
@@ -149,7 +148,7 @@
                     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")

     install(FILES "${DEBIAN_CHANGELOG_OUT_FILE_GZ}"
-            DESTINATION "share/doc/${CPACK_COMPONENT_${comp}_DISPLAY_NAME}"
+            DESTINATION "share/doc/${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}"
             COMPONENT "${comp}")
   endforeach()
 endif()


Only conflict with packages corresponding to modules that are built

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -112,8 +112,10 @@

 foreach(module calib3d contrib core features2d flann gpu highgui imgproc legacy
                ml objdetect ocl photo stitching superres ts video videostab)
-  list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4")
-  list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
+  if(HAVE_opencv_${module})
+    list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4")
+    list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
+  endif()
 endforeach()

 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_CONFLICTS "${STD_OPENCV_LIBS}")


Fix issue with MAKEFLAGS on OS X

Fix issue with MAKEFLAGS on OS X

--- cmake/ThirdPartyPETSc.cmake
+++ cmake/ThirdPartyPETSc.cmake
@@ -44,7 +44,7 @@
                 --with-petsc-arch=c-opt
                 --with-fc=0
                 ${PETSC_NO_MPI}
-            BUILD_COMMAND make)
+            BUILD_COMMAND MAKEFLAGS= make)

         INCLUDE_DIRECTORIES(${TPDIST}/include)
         SET(PETSC_LIBRARIES "${TPDIST}/lib/libpetsc.a")


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,6 +24,7 @@

 # NOTE: no names with spaces!

+hunter_config(pugixml VERSION 1.8.1)
 hunter_config(puffin-stream VERSION 0.2.2.0)
 hunter_config(puffin-buffer VERSION 0.3.2.0)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)


Turn test off by default

Turn test off by default

--- cmake/iDynTreeOptions.cmake
+++ cmake/iDynTreeOptions.cmake
@@ -11,7 +11,7 @@

 #########################################################################
 # Turn on testing.
-option(IDYNTREE_COMPILE_TESTS "Compile iDynTree tests" TRUE)
+option(IDYNTREE_COMPILE_TESTS "Compile iDynTree tests" FALSE)
 if(IDYNTREE_COMPILE_TESTS)
    enable_testing()
 endif()


[cmake] Attempt to fix sanitizer buildbot.
The generation of the native_export_file end up in
several different makefiles. All those makefiles
write the same file, but can be executed concurrently...
and bad things happen!

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -85,8 +85,12 @@
   # Force re-linking when the exports file changes. Actually, it
   # forces recompilation of the source file. The LINK_DEPENDS target
   # property only works for makefile-based generators.
-  set_property(SOURCE ${first_source_file} APPEND PROPERTY
-    OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${native_export_file})
+  # FIXME: This is not safe because this will create the same target
+  # ${native_export_file} in several different file:
+  # - One where we emitted ${target_name}_exports
+  # - One where we emitted the build command for the following object.
+  # set_property(SOURCE ${first_source_file} APPEND PROPERTY
+  #   OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${native_export_file})

   set_property(DIRECTORY APPEND
     PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${native_export_file})


CMake: Removed unnecessary library path setting that was breaking the
build on OS X.

Fix by Jjgod Jiang!

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -27,9 +27,6 @@
     target_link_libraries(${name} ${llvm_libs})
   else( MSVC )
     add_dependencies(${name} llvm-config.target)
-    set_target_properties(${name}
-      PROPERTIES
-      LINK_FLAGS "-L ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
     if( MINGW )
       target_link_libraries(${name} DbgHelp psapi)
     elseif( CMAKE_HOST_UNIX )


* Fixed small typo causing OGL GLSL shader compilation to break

--- cmake/shader_compiler.cmake
+++ cmake/shader_compiler.cmake
@@ -35,7 +35,7 @@
 macro(add_shader_opengl)
     set(shader_path ${PROJECT_SOURCE_DIR}/${SHADER})
     set(output_name ${SHADER}.glsl)
-    set(output_path ${PROJECT_BINARY_DIR}/${output_name}})
+    set(output_path ${PROJECT_BINARY_DIR}/${output_name})

     add_custom_command(
         OUTPUT ${output_path}


[Tools] Specify java options when calling the joynr generator from cmake

Change-Id: I66075f6f65bf490991ad1f04c2da46eca9a6c2f0

--- tools/generator/joynr-generator-standalone/src/main/scripts/JoynrGeneratorConfig.cmake
+++ tools/generator/joynr-generator-standalone/src/main/scripts/JoynrGeneratorConfig.cmake
@@ -43,7 +43,13 @@
     )
     cmake_parse_arguments(joynrGenerator "" "${singleValueArgs}" "" ${ARGN})

-    set(joynrGeneratorCmd "-jar" "${JoynrGenerator_JAR}")
+    set(JAVA_OPTS
+        -XX:InitialHeapSize=512m
+        -XX:MaxHeapSize=1g
+        -XX:PermSize=256m
+        -XX:MaxPermSize=512m
+    )
+    set(joynrGeneratorCmd "${JAVA_OPTS}" "-jar" "${JoynrGenerator_JAR}")

     if(joynrGenerator_MODELPATH)
         get_filename_component(joynrGenerator_ABSOLUTE_MODELPATH ${joynrGenerator_MODELPATH} ABSOLUTE)


Allow overriding KristalliNet source directory with a custom KNET_DIR environment variable. If not present, the NAALI_DEPS_DIR folder is used.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -389,7 +389,11 @@
 endmacro (configure_celt)

 macro(use_package_knet)
-    set(KNET_DIR ${ENV_NAALI_DEP_PATH}/kNet)
+    if ("$ENV{KNET_DIR}" STREQUAL "")
+       set(KNET_DIR ${ENV_NAALI_DEP_PATH}/kNet)
+    else()
+       set(KNET_DIR $ENV{KNET_DIR})
+    endif()
     include_directories(${KNET_DIR}/include)
     link_directories(${KNET_DIR}/lib)
 endmacro()


udpate attempt to suppress windows warning

--- CMakeModules/FindCompilerFlags.cmake
+++ CMakeModules/FindCompilerFlags.cmake
@@ -36,5 +36,5 @@
 endif()

 if (DEFINED MSVC)
-add_definitions("/ignore:4503")
+add_definitions("/wd4503")
 endif()


Install the docs

Install the docs

--- cmake/External_SequoiaDocs.cmake
+++ cmake/External_SequoiaDocs.cmake
@@ -37,7 +37,6 @@
   SOURCE_DIR "${sequoia_docs_source}"
   BINARY_DIR "${sequoia_docs_build}"
   INSTALL_DIR "${CMAKE_INSTALL_PREFIX}"
-  INSTALL_COMMAND ""
   CMAKE_ARGS ${sequoia_docs_cmake_args}
 )


Add /usr/local/Frameworks as another path to search.

--- cmake/add_rpath_for_python.cmake
+++ cmake/add_rpath_for_python.cmake
@@ -4,6 +4,7 @@
 foreach(_M ${SHARED_OBJECT_MODULES})
   execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -change "/Library/Frameworks/Python.framework/Versions/${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/Python" @rpath/Python.framework/Versions/${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/Python ${_M})
   execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -add_rpath /Library/Frameworks ${_M})
+  execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -add_rpath /usr/local/Frameworks ${_M})
   execute_process(COMMAND ${INSTALL_NAME_TOOL_EXE} -add_rpath /opt/homebrew/Frameworks ${_M})
 endforeach()


[CMake] Pass monorepo build settings in cross compile

This allows the cross compiled build targets to configure the LLVM tools and sub-projects that are part of the main build.

This is needed for generating native non llvm *-tablegen tools when cross compiling clang in the monorepo build environment.

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

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -54,6 +54,8 @@
         -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${experimental_targets_to_build_arg}"
         -DLLVM_DEFAULT_TARGET_TRIPLE="${TARGET_TRIPLE}"
         -DLLVM_TARGET_ARCH="${LLVM_TARGET_ARCH}"
+        -DLLVM_ENABLE_PROJECTS="${LLVM_ENABLE_PROJECTS}"
+        -DLLVM_EXTERNAL_PROJECTS="${LLVM_EXTERNAL_PROJECTS}"
         -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}"
         ${build_type_flags} ${linker_flag} ${external_clang_dir}
     WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}


Add release version to manpage

Add release version to manpage

This also fixes compatibility with newer versions of pod2man.

--- cmake/modules/SwiftManpage.cmake
+++ cmake/modules/SwiftManpage.cmake
@@ -30,7 +30,7 @@
       unused_var
       COMMAND
         "${POD2MAN}" "--section" "${MP_MAN_SECTION}"
-        "--center" "${MP_PAGE_HEADER}" "--release"
+        "--center" "${MP_PAGE_HEADER}" "--release=\"swift ${SWIFT_VERSION}\""
         "--name" "${MP_MAN_FILE_BASENAME}"
         "--stderr"
         "${MP_SOURCE}" > "${output_file_name}"


Use the value of nuttx CONFIG_ARMV7M_STACKCHECK to configure PX4 build for HW stack checking

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -202,6 +202,16 @@
 	    add_dependencies(nuttx_patch nuttx_patch_${patch_name})
 	endforeach()

+	# Read defconfig to see if CONFIG_ARMV7M_STACKCHECK is yes
+	# note: CONFIG will be BOARD in the future evaluation of ${hw_stack_check_${CONFIG}
+	file(STRINGS "${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/${config_nuttx_config}/defconfig"
+		hw_stack_check_${CONFIG}
+		REGEX "CONFIG_ARMV7M_STACKCHECK=y"
+		)
+	if ("${hw_stack_check_${CONFIG}}" STREQUAL "CONFIG_ARMV7M_STACKCHECK=y")
+		set(config_nuttx_hw_stack_check_${CONFIG} y CACHE INTERNAL "" FORCE)
+	endif()
+
 	# copy and export
 	file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
 	add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export
@@ -428,6 +438,16 @@

 	set(added_exe_linker_flags) # none currently

+	set(instrument_flags)
+	if ("${config_nuttx_hw_stack_check_${BOARD}}" STREQUAL "y")
+		set(instrument_flags
+			-finstrument-functions
+			-ffixed-r10
+			)
+		list(APPEND c_flags ${instrument_flags})
+		list(APPEND cxx_flags ${instrument_flags})
+	endif()
+
 	set(cpu_flags)
 	if (${BOARD} STREQUAL "px4fmu-v1")
 		set(cpu_flags


forgot 1 instance

forgot 1 instance

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

--- cmake/Modules/FindCMinpack.cmake
+++ cmake/Modules/FindCMinpack.cmake
@@ -14,7 +14,7 @@

 find_path(CMINPACK_INCLUDE_DIR cminpack.h
     HINTS ${PC_CMINPACK_INCLUDEDIR} ${PC_CMINPACK_INCLUDE_DIRS} "${CMINPACK_ROOT}" "$ENV{CMINPACK_ROOT}"
-    PATHS "$ENV{PROGRAMFILES}/CMINPACK 1.1.13" "$ENV{PROGRAMW6432}/CMINPACK 1.1.13"
+    PATHS "$ENV{PROGRAMFILES}/CMINPACK 1.1.3" "$ENV{PROGRAMW6432}/CMINPACK 1.1.3"
     PATH_SUFFIXES include/cminpack-1)

 find_library(CMINPACK_LIBRARY cminpack


build: allow passing Swift specific link flags

This mirrors the `CMAKE_SWIFT_FLAGS` allowing control over the flags
passed to the linker.  This is needed until the libraries are built
with a newer CMake which supports Swift properly.  This enables
cross-compiling libdispatch for Android on Windows.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -9,7 +9,7 @@
   cmake_parse_arguments(AST "${options}" "${single_value_options}" "${multiple_value_options}" ${ARGN})

   set(compile_flags ${CMAKE_SWIFT_FLAGS})
-  set(link_flags)
+  set(link_flags ${CMAKE_SWIFT_LINK_FLAGS})

   if(AST_TARGET)
     list(APPEND compile_flags -target;${AST_TARGET})


NASM: ++PACKAGE_INTERNAL_DEPS_ID

NASM: ++PACKAGE_INTERNAL_DEPS_ID

--- cmake/projects/NASM/hunter.cmake
+++ cmake/projects/NASM/hunter.cmake
@@ -45,5 +45,4 @@
   hunter_cacheable(NASM)
 endif()

-hunter_download(PACKAGE_NAME NASM)
-
+hunter_download(PACKAGE_NAME NASM PACKAGE_INTERNAL_DEPS_ID "1")


Updated jenkins cmake script

Updated jenkins cmake script

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -8,7 +8,7 @@
 set(CTEST_BUILD_OPTIONS "${JENKINS_BUILD_OPTIONS}")
 set(CTEST_BUILD_CONFIGURATION "${JENKINS_BUILD_CONFIGURATION}")

-set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "--xml=yes --xml-file=test_%p_memcheck.xml")
+set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "${CTEST_MEMORYCHECK_COMMAND_OPTIONS} --xml=yes --xml-file=test_%p_memcheck.xml")

 set(CTEST_COVERAGE_CXX_FLAGS "-DCMAKE_CXX_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
 set(CTEST_COVERAGE_EXE_LD_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=-fprofile-arcs -ftest-coverage")


Updated option printout during cmake config

Former-commit-id: 40ed215100117464e5262cdcc2acd6cd290e5959

--- cmake-modules/PrintOptionInfo.cmake
+++ cmake-modules/PrintOptionInfo.cmake
@@ -1,14 +1,19 @@
 if(DMRG_PRINT_INFO)
     # Print CMake options
     message(STATUS  "|----------------\n"
-            "-- | BUILD_SHARED_LIBS       : ${BUILD_SHARED_LIBS}\n"
-            "-- | CMAKE_INSTALL_PREFIX    : ${CMAKE_INSTALL_PREFIX}\n"
-            "-- | DMRG_BUILD_EXAMPLES     : ${DMRG_BUILD_EXAMPLES}\n"
-            "-- | DMRG_ENABLE_TESTS       : ${DMRG_ENABLE_TESTS}\n"
-            "-- | DMRG_ENABLE_OPENMP      : ${DMRG_ENABLE_OPENMP}\n"
-            "-- | DMRG_ENABLE_MKL         : ${DMRG_ENABLE_MKL}\n"
-            "-- | DMRG_ENABLE_LTO         : ${DMRG_ENABLE_LTO}\n"
-            "-- | DMRG_DOWNLOAD_METHOD    : ${DMRG_DOWNLOAD_METHOD}\n"
-            "-- | DMRG_PREFER_CONDA_LIBS  : ${DMRG_PREFER_CONDA_LIBS}\n"
-            "-- | DMRG_PRINT_INFO         : ${DMRG_PRINT_INFO}\n")
+            "-- | CMAKE_INSTALL_PREFIX   : ${CMAKE_INSTALL_PREFIX}\n"
+            "-- | BUILD_SHARED_LIBS      : ${BUILD_SHARED_LIBS}\n"
+            "-- | DMRG_ENABLE_OPENMP     : ${DMRG_ENABLE_OPENMP}\n"
+            "-- | DMRG_ENABLE_MKL        : ${DMRG_ENABLE_MKL}\n"
+            "-- | DMRG_ENABLE_TESTS      : ${DMRG_ENABLE_TESTS}\n"
+            "-- | DMRG_ENABLE_ASAN       : ${DMRG_ENABLE_ASAN}\n"
+            "-- | DMRG_ENABLE_USAN       : ${DMRG_ENABLE_USAN}\n"
+            "-- | DMRG_ENABLE_LTO        : ${DMRG_ENABLE_LTO}\n"
+            "-- | DMRG_ENABLE_PCH        : ${DMRG_ENABLE_PCH}\n"
+            "-- | DMRG_ENABLE_CCACHE     : ${DMRG_ENABLE_CCACHE}\n"
+            "-- | DMRG_BUILD_EXAMPLES    : ${DMRG_BUILD_EXAMPLES}\n"
+            "-- | DMRG_DOWNLOAD_METHOD   : ${DMRG_DOWNLOAD_METHOD}\n"
+            "-- | DMRG_PRINT_INFO        : ${DMRG_PRINT_INFO}\n"
+            "-- | DMRG_DEPS_IN_SUBDIR    : ${DMRG_DEPS_IN_SUBDIR}\n"
+            "-- | DMRG_PREFER_CONDA_LIBS : ${DMRG_PREFER_CONDA_LIBS}\n")
 endif ()


Enable more compiler warning flags.

Enable more compiler warning flags.

--- cmake/CubBuildCompilerTargets.cmake
+++ cmake/CubBuildCompilerTargets.cmake
@@ -11,20 +11,29 @@
   set(cxx_compile_options)

   if ("MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
-    # TODO Enable /Wall
+    append_option_if_available("/W4" cxx_compile_options)
+
     append_option_if_available("/WX" cxx_compile_options)

-    # Disabled loss-of-data conversion warnings.
-    # TODO Re-enable.
-    append_option_if_available("/wd4244" cxx_compile_options)
-    append_option_if_available("/wd4267" cxx_compile_options)
-
-    # Suppress numeric conversion-to-bool warnings.
-    # TODO Re-enable.
-    append_option_if_available("/wd4800" cxx_compile_options)
-
-    # Disable warning about applying unary operator- to unsigned type.
-    append_option_if_available("/wd4146" cxx_compile_options)
+    # Suppress overly-pedantic/unavoidable warnings brought in with /W4:
+    # C4324: structure was padded due to alignment specifier
+    append_option_if_available("/wd4324" cxx_compile_options)
+    # C4127: conditional expression is constant
+    # This can be fixed with `if constexpr` when available, but there's no way
+    # to silence these pre-C++17.
+    # TODO We should have per-dialect interface targets so we can leave these
+    # warnings enabled on C++17:
+    append_option_if_available("/wd4127" cxx_compile_options)
+    # C4505: unreferenced local function has been removed
+    # The CUDA `host_runtime.h` header emits this for
+    # `__cudaUnregisterBinaryUtil`.
+    append_option_if_available("/wd4505" cxx_compile_options)
+    # C4706: assignment within conditional expression
+    # MSVC doesn't provide an opt-out for this warning when the assignment is
+    # intentional. Clang will warn for these, but suppresses the warning when
+    # double-parentheses are used around the assignment. We'll let Clang catch
+    # unintentional assignments and suppress all such warnings on MSVC.
+    append_option_if_available("/wd4706" cxx_compile_options)

     # Some tests require /bigobj to fit everything into their object files:
     append_option_if_available("/bigobj" cxx_compile_options)
@@ -35,43 +44,32 @@
     append_option_if_available("-Winit-self" cxx_compile_options)
     append_option_if_available("-Woverloaded-virtual" cxx_compile_options)
     append_option_if_available("-Wcast-qual" cxx_compile_options)
-    append_option_if_available("-Wno-cast-align" cxx_compile_options)
-    append_option_if_available("-Wno-long-long" cxx_compile_options)
-    append_option_if_available("-Wno-variadic-macros" cxx_compile_options)
+    append_option_if_available("-Wpointer-arith" cxx_compile_options)
+    append_option_if_available("-Wunused-local-typedef" cxx_compile_options)
+    append_option_if_available("-Wvla" cxx_compile_options)
+
+    # Disable GNU extensions (flag is clang only)
+    append_option_if_available("-Wgnu" cxx_compile_options)
+    # Calling a variadic macro with zero args is a GNU extension until C++20,
+    # but the THRUST_PP_ARITY macro is used with zero args. Need to see if this
+    # is a real problem worth fixing.
+    append_option_if_available("-Wno-gnu-zero-variadic-macro-arguments" cxx_compile_options)
+
+    # This complains about functions in CUDA system headers when used with nvcc.
     append_option_if_available("-Wno-unused-function" cxx_compile_options)
-    append_option_if_available("-Wno-unused-variable" cxx_compile_options)

     # CUB uses deprecated texture functions (cudaBindTexture, etc). These
     # need to be replaced, but silence the warnings for now.
+    # This can be removed once NVIDIA/cub#191 is fixed.
     append_option_if_available("-Wno-deprecated-declarations" cxx_compile_options)
   endif()

   if ("GNU" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.5)
-      # This isn't available until GCC 4.3, and misfires on TMP code until
-      # GCC 4.5.
-      append_option_if_available("-Wlogical-op" cxx_compile_options)
-    endif()
-
     if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.3)
       # GCC 7.3 complains about name mangling changes due to `noexcept`
       # becoming part of the type system; we don't care.
       append_option_if_available("-Wno-noexcept-type" cxx_compile_options)
     endif()
-  endif()
-
-  if (("Clang" STREQUAL "${CMAKE_CXX_COMPILER_ID}") OR
-      ("XL" STREQUAL "${CMAKE_CXX_COMPILER_ID}"))
-    # xlC and Clang warn about unused parameters in uninstantiated templates.
-    # This causes xlC to choke on the OMP backend, which is mostly #ifdef'd out
-    # (and thus has unused parameters) when you aren't using it.
-    append_option_if_available("-Wno-unused-parameters" cxx_compile_options)
-  endif()
-
-  if ("Clang" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
-    # -Wunneeded-internal-declaration misfires in the unit test framework
-    # on older versions of Clang.
-    append_option_if_available("-Wno-unneeded-internal-declaration" cxx_compile_options)
   endif()

   if ("Intel" STREQUAL "${CMAKE_CXX_COMPILER_ID}")


fix: Set also SOVERSION of external module

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -43,7 +43,8 @@
   # ----------------------------------------------------------------------------
   # meta-data
   NAME        "Deformable"
-  VERSION     "1.1.0"
+  VERSION     "1.1.0" # version of this module
+  SOVERSION   "0"     # API yet unstable
   PACKAGE     "MIRTK"
   AUTHORS     "Andreas Schuh"
   DESCRIPTION "Deformable library of the Medical Image Registration ToolKit."


BUG:SunOS requires to explicitly link -lm.

--- CMake/vtkTestGLX.cmake
+++ CMake/vtkTestGLX.cmake
@@ -82,9 +82,13 @@

 set(CMAKE_REQUIRED_INCLUDES ${OPENGL_INCLUDE_DIR})

-# We cannot just use OPENGL_gl_LIBRARY: some platforms required to link
+# We cannot just use OPENGL_gl_LIBRARY: SunOS requires to link
 # with X11, which is available only in OPENGL_LIBRARIES.
-set(CMAKE_REQUIRED_LIBRARIES ${OPENGL_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
+# Also, SunOS requires to explicitly link -lm
+set(CMAKE_REQUIRED_LIBRARIES
+     ${OPENGL_LIBRARIES}
+     ${CMAKE_REQUIRED_LIBRARIES}
+     -lm)

 if(DEFINED GLX_DEFINES_MACRO_GLX_VERSION_1_1)
  set(REPORT_STATUS 0)


Find OIS cmake script fixed for non-MSVC builds.

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@371 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/OIS.cmake
+++ CMakeModules/OIS.cmake
@@ -2,12 +2,24 @@
 # Find is already called in the top-level CMakeLists

 macro (FIND_OIS)
+	if (NOT MSVC)
+		find_package (PkgConfig)
+		pkg_search_module (OIS OIS)
+		if (NOT OIS_INCLUDE_DIRS AND NOT OIS_LIBRARIES)
+			message (FATAL_ERROR "OIS not found by pkg-config")
+		endif (NOT OIS_INCLUDE_DIRS AND NOT OIS_LIBRARIES)
+		separate_arguments (OIS_INCLUDE_DIRS)
+		separate_arguments (OIS_LIBRARIES)
+	endif (NOT MSVC)
 endmacro (FIND_OIS)

 macro (INCLUDE_OIS)
 	if (MSVC)
 		include_directories (${REX_DEP_PATH}/ois/includes)
 		link_directories (${REX_DEP_PATH}/ois/dll)
+	else (MSVC)
+		include_directories (${OIS_INCLUDE_DIRS})
+		link_directories (${OIS_LIBDIR})
 	endif (MSVC)
 endmacro (INCLUDE_OIS)

@@ -16,5 +28,7 @@
 		target_link_libraries (${TARGET_NAME}
 			debug OIS_d
 			optimized OIS)
+	else (MSVC)
+		target_link_libraries (${TARGET_NAME} ${OIS_LIBRARIES})
 	endif (MSVC)
-endmacro (LINK_OIS)+endmacro (LINK_OIS)


correct outdated comments

correct outdated comments

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -3,7 +3,7 @@
 # See the cotire manual for usage hints.
 #
 #=============================================================================
-# Copyright 2012-2017 Sascha Kratky
+# Copyright 2012-2018 Sascha Kratky
 #
 # Permission is hereby granted, free of charge, to any person
 # obtaining a copy of this software and associated documentation
@@ -721,7 +721,7 @@
 		endif()
 	endforeach()
 	# parse additional compile definitions from target compile flags
-	# and don't look at directory compile definitions, which we already handled
+	# and do not look at directory compile definitions, which we already handled
 	set (_targetFlags "")
 	cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags)
 	cotire_filter_compile_flags("${_language}" "D" _definitions _ignore ${_targetFlags})
@@ -1086,12 +1086,11 @@

 macro (cotire_parse_line _line _headerFileVar _headerDepthVar)
 	if (MSVC)
-		# cl.exe /showIncludes output looks different depending on the language pack used, e.g.:
+		# cl.exe /showIncludes produces different output, depending on the language pack used, e.g.:
 		# English: "Note: including file:   C:\directory\file"
 		# German: "Hinweis: Einlesen der Datei:   C:\directory\file"
 		# We use a very general regular expression, relying on the presence of the : characters
 		if (_line MATCHES "( +)([a-zA-Z]:[^:]+)$")
-			# Visual Studio compiler output
 			string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar})
 			get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" ABSOLUTE)
 		else()
@@ -1882,7 +1881,7 @@
 	elseif (_option_COMPILER_ID MATCHES "GNU|Clang")
 		if (_option_COMPILER_LAUNCHER MATCHES "ccache" OR
 			_option_COMPILER_EXECUTABLE MATCHES "ccache")
-			# Newer versions of Clang and GCC seem to embed a compilation timestamp into the precompiled header binary,
+			# Newer versions of Clang embed a compilation timestamp into the precompiled header binary,
 			# which results in "file has been modified since the precompiled header was built" errors if ccache is used.
 			# We work around the problem by disabling ccache upon pre-compiling the prefix header.
 			set (ENV{CCACHE_DISABLE} "true")
@@ -1901,7 +1900,7 @@
 	set (_unsupportedCompiler
 		"Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}")
 	if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC")
-		# supported since Visual Studio C++ 6.0
+		# PCH supported since Visual Studio C++ 6.0
 		# and CMake does not support an earlier version
 		set (${_msgVar} "" PARENT_SCOPE)
 	elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU")
@@ -2502,7 +2501,8 @@
 			set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_objectDependsPaths})
 		endif()
 		if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
-			# unity file compilation results in potentially huge object file, thus use /bigobj by default unter MSVC and Windows Intel
+			# unity file compilation results in potentially huge object file,
+			# thus use /bigobj by default unter cl.exe and Windows Intel
 			set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj")
 		endif()
 		cotire_set_cmd_to_prologue(_unityCmd)


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -1,23 +1,35 @@
 [Desktop Entry]
 Name=Instant Messaging
 Name[cs]=Instant Messaging
+Name[da]=Instant messaging
 Name[fi]=Pikaviestintä
+Name[fr]=Messagerie instantanée
 Name[it]=Messaggistica istantanea
 Name[nl]=Instant Messaging
 Name[pt]=Mensagens Instantâneas
 Name[pt_BR]=Mensagens instantâneas
 Name[sl]=Hipno sporočanje
+Name[sr]=Брзо гласништво
+Name[sr@ijekavian]=Брзо гласништво
+Name[sr@ijekavianlatin]=Brzo glasništvo
+Name[sr@latin]=Brzo glasništvo
 Name[sv]=Direktmeddelandekontakter
 Name[uk]=Миттєвий обмін повідомленнями
 Name[x-test]=xxInstant Messagingxx
 Comment=Start a chat with any of your IM contacts or change your IM status
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
+Comment[da]=Start chat med en af dine IM-kontakter eller skift din IM-status
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
+Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci
 Comment[it]=Avvia una chat con un tuo contatto di MI oppure cambia il tuo stato di MI
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
 Comment[pt]=Iniciar uma conversa com qualquer um dos seus contactos MI ou mudar o seu estado
 Comment[pt_BR]=Inicia um bate-papo com um dos seus contatos de MI ou altera o seu status
 Comment[sl]=Začnite klepet s katerimkoli izmed vaših stikov hipnega sporočanja ali spremenite vaše stanje
+Comment[sr]=Започните ћаскање преко ИМ контакта или измените своје ИМ стање
+Comment[sr@ijekavian]=Започните ћаскање преко ИМ контакта или измените своје ИМ стање
+Comment[sr@ijekavianlatin]=Započnite ćaskanje preko IM kontakta ili izmenite svoje IM stanje
+Comment[sr@latin]=Započnite ćaskanje preko IM kontakta ili izmenite svoje IM stanje
 Comment[sv]=Börja chatta med någon direktmeddelandekontakt eller ändra din direktmeddelandestatus
 Comment[uk]=Почати спілкування з будь-яким з ваших контактів або змінити ваш запис стану у системах обміну повідомленнями
 Comment[x-test]=xxStart a chat with any of your IM contacts or change your IM statusxx


--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -9,6 +9,7 @@
 Name[es]=Mensajería instantánea
 Name[fi]=Pikaviestintä
 Name[fr]=Messagerie instantanée
+Name[gl]=Mensaxería instantánea
 Name[hu]=Azonnali üzenetküldés
 Name[ia]=Messageria instantanee
 Name[it]=Messaggistica istantanea
@@ -36,6 +37,7 @@
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
 Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci
+Comment[gl]=Inicie unha conversa con calquera dos seus contactos ou cambie seu estado na IM
 Comment[hu]=Csevegés indítása az azonnali üzenetküldési partnerei valamelyikével vagy az azonnali üzenetküldési állapotának módosítása
 Comment[ia]=Initia conversation con qualcunque de tu contactos de IM o modifica tu status de IM
 Comment[it]=Avvia una chat con un tuo contatto di MI oppure cambia il tuo stato di MI


Add Atom library dependency.

Add Atom library dependency.

--- Dependencies.cmake
+++ Dependencies.cmake
@@ -269,6 +269,42 @@
   include_directories(SYSTEM AFTER "${ASTRO_INCLUDE_DIRS}")
 else(APPLE)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${ASTRO_INCLUDE_DIRS}\"")
+endif(NOT APPLE)
+
+# -------------------------------
+
+if(NOT BUILD_DEPENDENCIES)
+  find_package(Atom)
+endif(NOT BUILD_DEPENDENCIES)
+
+if(NOT ATOM_FOUND)
+  message(STATUS "Atom will be downloaded when ${CMAKE_PROJECT_NAME} is built")
+  ExternalProject_Add(atom-lib
+    DEPENDS astro-lib
+    PREFIX ${EXTERNAL_PATH}/Atp,
+    #--Download step--------------
+    URL https://github.com/kartikkumar/atom/archive/master.zip
+    TIMEOUT 30
+    #--Update/Patch step----------
+    UPDATE_COMMAND ""
+    PATCH_COMMAND ""
+    #--Configure step-------------
+    CONFIGURE_COMMAND ""
+    #--Build step-----------------
+    BUILD_COMMAND ""
+    #--Install step---------------
+    INSTALL_COMMAND ""
+    #--Output logging-------------
+    LOG_DOWNLOAD ON
+  )
+  ExternalProject_Get_Property(atom-lib source_dir)
+  set(ATOM_INCLUDE_DIRS ${source_dir}/include CACHE INTERNAL "Path to include folder for Atom")
+endif(NOT ATOM_FOUND)
+
+if(NOT APPLE)
+  include_directories(SYSTEM AFTER "${ATOM_INCLUDE_DIRS}")
+else(APPLE)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${ATOM_INCLUDE_DIRS}\"")
 endif(NOT APPLE)

 # -------------------------------


ENH: Bump KWStyle to 2021-03-17 master

ENH: Bump KWStyle to 2021-03-17 master

--- Utilities/KWStyle/BuildKWStyle.cmake
+++ Utilities/KWStyle/BuildKWStyle.cmake
@@ -23,7 +23,7 @@
 if(NOT TARGET KWStyle)
 ExternalProject_add(KWStyle
   GIT_REPOSITORY "${git_protocol}://github.com/Kitware/KWStyle.git"
-  GIT_TAG d0d656e67f95129421e47825301a056f245cfecf
+  GIT_TAG d4df63060dfa5aa750cc35023a73c25ef1162069
   UPDATE_COMMAND ""
   DOWNLOAD_DIR ${KWStyle_SOURCE_DIR}
   SOURCE_DIR ${KWStyle_SOURCE_DIR}


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


Pass the gcc toolchain settings when building googletest.

This should fix our linker issues due to ABI incompatibility between clang and
libstdc++.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1386,6 +1386,11 @@
     ${_byproduct_binary_dir}/libgmock.a
     ${_byproduct_binary_dir}/libgmock_main.a
     )
+
+  # Workaround clang/gcc ABI compatiability issue.
+  if(gcctoolchain)
+    set(GTEST_CMAKE_ARGS "CMAKE_ARGS -DCMAKE_CXX_FLAGS=--gcc-toolchain=${gcctoolchain}")
+  endif(gcctoolchain)
   ExternalProject_Add(
     googletest
     GIT_REPOSITORY https://github.com/google/googletest.git
@@ -1396,6 +1401,7 @@
     # CMAKE_ARGS -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=DebugLibs
     #            -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=ReleaseLibs
     #            -Dgtest_force_shared_crt=ON
+    ${GTEST_CMAKE_ARGS}
     # Disable install step
     INSTALL_COMMAND ""
     BUILD_BYPRODUCTS ${_byproducts}


Force the lib location for builtin_gsl (to avoid /lib64 in some systems)

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -404,7 +404,10 @@
       # http://mirror.switch.ch/ftp/mirror/gnu/gsl/gsl-${gsl_version}.tar.gz
       URL ${repository_tarfiles}/gsl-${gsl_version}.tar.gz
       INSTALL_DIR ${CMAKE_BINARY_DIR}
-      CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR> --enable-shared=no CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS}
+      CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR>
+                        --libdir=<INSTALL_DIR>/lib
+                        --enable-shared=no
+                        CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS}
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
       BUILD_BYPRODUCTS ${GSL_LIBRARIES}
     )


SK:

SK:

-BUG: svn hanged, but i may have found the problem. It asked for some authentication certificate, because I start svn usually with a different config dir, where the certificates are stored.


esptool+cmake: Fix path generation for args.in2 file

Path was accidentally generated as build/<absolute path to input file> which creates unexpected path structure on Linux/macOS and breaks Windows (as can't have a directory named "C:".

Regression in e8582e9aa441c3b2d988c73b582b2985f41042ac

Closes https://github.com/espressif/esp-idf/issues/3687
Closes IDFGH-1409

--- components/esptool_py/project_include.cmake
+++ components/esptool_py/project_include.cmake
@@ -183,12 +183,16 @@
     else()
         set(OFFSET ${offset})
         set(IMAGE ${image})
-        get_filename_component(template "${__FLASH_FILE_TEMPLATE}" ABSOLUTE)
-        configure_file(${template} ${CMAKE_CURRENT_BINARY_DIR}/${template}.in2)
-        file(GENERATE OUTPUT ${entry_flash_args} INPUT ${CMAKE_CURRENT_BINARY_DIR}/${template}.in2)
+
+        get_filename_component(template_in "${__FLASH_FILE_TEMPLATE}" ABSOLUTE)
+        get_filename_component(template_name "${template_in}" NAME)
+        set(template_partial "${CMAKE_CURRENT_BINARY_DIR}/${template_name}.in2")
+
+        configure_file("${template_in}" "${template_partial}")
+        file(GENERATE OUTPUT ${entry_flash_args} INPUT "${template_partial}")
         set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                     APPEND PROPERTY
-                    ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/${template}.in2})
+                    ADDITIONAL_MAKE_CLEAN_FILES "${template_partial}")
         unset(OFFSET)
         unset(IMAGE)
     endif()


search for genmsg quietly since it is optional

--- core/roslang/cmake/roslang.cmake
+++ core/roslang/cmake/roslang.cmake
@@ -21,7 +21,7 @@
 endforeach(_l)

 # Hack to resolve languages from wet which rospack does not support yet
-find_package(catkin COMPONENTS genmsg)
+find_package(catkin QUIET COMPONENTS genmsg)
 if(genmsg_FOUND)
   foreach(_l ${CATKIN_MESSAGE_GENERATORS})
     string(REPLACE "gen" "ros" _l ${_l})


CMake: Bugfixes in FindTBB.cmake

CMake: Bugfixes in FindTBB.cmake

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29266 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/modules/FindTBB.cmake
+++ deal.II/cmake/modules/FindTBB.cmake
@@ -29,18 +29,25 @@
 FIND_PATH(TBB_INCLUDE_DIR tbb/parallel_reduce.h
   HINTS
     ${TBB_DIR}
-  PATH_SUFFIXES include include/tbb tbb)
+  PATH_SUFFIXES include include/tbb tbb
+  )
+
+FILE(GLOB _path ${TBB_DIR}/build/*_release)

 FIND_LIBRARY(TBB_LIBRARY
   NAMES tbb
   HINTS
+    ${_path}
     ${TBB_DIR}
   PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
   )

+FILE(GLOB _path ${TBB_DIR}/build/*_debug)
+
 FIND_LIBRARY(TBB_DEBUG_LIBRARY
   NAMES tbb_debug
   HINTS
+    ${_path}
     ${TBB_DIR}
   PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
   )


ARROW-5446: [C++][CMake] Install arrow/util/config.h into CMAKE_INSTALL_INCLUDEDIR

Author: Nuno Sucena Almeida <288957+slug@users.noreply.github.com>

Closes #4387 from slug/config-install-fix and squashes the following commits:

bacfdaf27 <Nuno Sucena Almeida> config install dir

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2220,4 +2220,4 @@

 configure_file("src/arrow/util/config.h.cmake" "src/arrow/util/config.h")
 install(FILES "${ARROW_BINARY_DIR}/src/arrow/util/config.h"
-        DESTINATION "include/arrow/util")
+        DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/util")


ARROW-15078: [C++] Silence CMake error "includes non-existent path" with bundled OpenTelemetry

This prevents:
```
CMake Error in src/arrow/CMakeLists.txt:
  Imported target "opentelemetry-cpp::trace" includes non-existent path

    "<path>/build/opentelemetry_ep-install/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.
```

Closes #11939 from mbrobbel/arrow-15078

Authored-by: Matthijs Brobbel <49b2cc628ee4b459676e5b1d5ebfc4703e78a7d5@gmail.com>
Signed-off-by: David Li <dc24f9cfc84fb1675ce65c8444a2c3e2f0e5f297@gmail.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -4109,6 +4109,10 @@
   foreach(_OPENTELEMETRY_LIB ${_OPENTELEMETRY_LIBS})
     add_dependencies(opentelemetry-cpp::${_OPENTELEMETRY_LIB} opentelemetry_ep)
   endforeach()
+
+  # Work around https://gitlab.kitware.com/cmake/cmake/issues/15052
+  file(MAKE_DIRECTORY ${OPENTELEMETRY_INCLUDE_DIR})
+
 endmacro()

 if(ARROW_WITH_OPENTELEMETRY)


switch to vlc 2.0.5

switch to vlc 2.0.5

--- PluginConfig.cmake
+++ PluginConfig.cmake
@@ -13,7 +13,7 @@
 #if you want embed vlc into FBVLC distribution:
 # 1) place vlc into FBVLC\Win\WiX\vlc-${VLC_VERSION}
 # 2) uncomment following line
-set(VLC_VERSION "2.0.4")
+set(VLC_VERSION "2.0.5")
 # 3) run prepXXXX.cmd from FireBreath

 #unfortunately current implementation does not work :(


update

update

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -42,18 +42,16 @@
   file(GLOB SOURCE_FILES "zlib/*.c")
   if(MSVC)
     list(APPEND ${SOURCE_FILES} "zlib/contrib/masmx64/inffas8664.c")
-  endif()
-  add_library(zlib ${SOURCE_FILES})
-  if(MSVC)
     # C4127: conditional expression is constant
     # C4131: 'function' : uses old-style declarator
     # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
     # C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
     # C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data
-    set_target_properties(zlib PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4127 /wd4131 /wd4244 /wd4245 /wd4267")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4127 /wd4131 /wd4244 /wd4245 /wd4267")
   else()
-    set_target_properties(zlib PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-implicit-function-declaration -Wno-shift-negative-value")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-implicit-function-declaration -Wno-shift-negative-value")
   endif()
+  add_library(zlib ${SOURCE_FILES})
   target_include_directories(zlib PUBLIC "zlib")
   target_link_libraries(zlib)


add arg for packing 64-bit build

add arg for packing 64-bit build

git-svn-id: fe3cd4388a6e5a968b09397a3d721fe124e8117a@1233 5b54908e-ead4-fc18-b48a-0285e6dbc711

--- package.cmake
+++ package.cmake
@@ -37,6 +37,7 @@
 set(arg_outdir ".")    # directory in which to place deliverables
 set(arg_cacheappend "")# string to append to every build's cache
 set(arg_drmem_only OFF) # do not include Dr. Heapstat
+set(arg_x64_build OFF)  # do not include x64 build
 # also takes args parsed by runsuite_common_pre.cmake, in particular:
 set(arg_preload "")    # cmake file to include prior to each 32-bit build
 set(arg_preload64 "")  # cmake file to include prior to each 64-bit build
@@ -71,6 +72,9 @@
   if (${arg} MATCHES "^drmem_only" OR
       ${arg} MATCHES "^drmemory_only")
     set(arg_drmem_only ON)
+  endif ()
+  if (${arg} MATCHES "^x64_build")
+    set(arg_x64_build ON)
   endif ()
 endforeach (arg)

@@ -135,6 +139,16 @@
     TOOL_DR_HEAPSTAT:BOOL=ON
     CMAKE_BUILD_TYPE:STRING=Debug
     " OFF ON "")
+  if (arg_x64_build)
+    testbuild_ex("drheapstat-${name_sfx}release-64" ON "
+      TOOL_DR_HEAPSTAT:BOOL=ON
+      CMAKE_BUILD_TYPE:STRING=Release
+      " OFF ON "")
+    testbuild_ex("drheapstat-${name_sfx}debug-64" ON "
+      TOOL_DR_HEAPSTAT:BOOL=ON
+      CMAKE_BUILD_TYPE:STRING=Debug
+      " OFF ON "")
+  endif (arg_x64_build)
 endif (NOT arg_drmem_only)
 testbuild_ex("drmemory-${name_sfx}release-32" OFF "
   CMAKE_BUILD_TYPE:STRING=Release
@@ -142,6 +156,14 @@
 testbuild_ex("drmemory-${name_sfx}debug-32" OFF "
   CMAKE_BUILD_TYPE:STRING=Debug
   " OFF ON "")
+if (arg_x64_build)
+  testbuild_ex("drmemory-${name_sfx}release-64" ON "
+    CMAKE_BUILD_TYPE:STRING=Release
+    " OFF ON "")
+  testbuild_ex("drmemory-${name_sfx}debug-64" ON "
+    CMAKE_BUILD_TYPE:STRING=Debug
+    " OFF ON "")
+endif (arg_x64_build)

 if (arg_cpackappend)
   # ${last_package_build_dir} is a global var set in parent scope by


fix uuid finding

fix uuid finding

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -1089,7 +1089,7 @@
 					list (APPEND ${_outLibraries} ${CMAKE_DL_LIBS})
 					find_library (Mathematica_uuid_LIBRARY uuid)
 					mark_as_advanced(Mathematica_uuid_LIBRARY)
-					list (APPEND ${_outLibraries} ${Mathematica_UUID_LIBRARY})
+					list (APPEND ${_outLibraries} ${Mathematica_uuid_LIBRARY})
 				endif()
 			endif()
 		elseif (CMAKE_SYSTEM_NAME STREQUAL "SunOS")


Version bump to 0.0.3.

Version bump to 0.0.3.

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "0")
 SET(LIBREPO_MINOR "0")
-SET(LIBREPO_PATCH "2")
+SET(LIBREPO_PATCH "3")


Fixed issue with cmake llvm configuration changes

CMAKE_CIRRENT_BINARY_DIR should be CMAKE_CURRENT_BINARY_DIR

Change-Id: Ic0215f3190cf9831989c9a5c72bae019a3fb124b
Reviewed-on: https://wn-project.dnsalias.net/gerrit/46
Reviewed-by: Andrew Woloszyn <2926f0436f8103ab8257713335cf26447d8bf68a@google.com>
Tested-by: Andrew Woloszyn <2926f0436f8103ab8257713335cf26447d8bf68a@google.com>

--- Utilities/helpers.cmake
+++ Utilities/helpers.cmake
@@ -175,7 +175,7 @@

 # Create the llvm build directory.
 execute_process(COMMAND ${CMAKE_COMMAND} -E
-  make_directory ${CMAKE_CIRRENT_BINARY_DIR}/Externals/llvm)
+  make_directory ${CMAKE_CURRENT_BINARY_DIR}/Externals/llvm)
 # Configure llvm only needed the first time.
 if (NOT LLVM_CONFIGURED)
   message(STATUS "Configuring LLVM dependency")


git-svn-id: svn://scm.gforge.inria.fr/svn/openvibe@91 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- openvibe-kernel-omk/trunc/src/FindOpenMASK.cmake
+++ openvibe-kernel-omk/trunc/src/FindOpenMASK.cmake
@@ -48,8 +48,8 @@
     $ENV{OpenMASKDIR}
     . )
   IF(OMK_CONFIG)
-    SET(OMK_ARG_CFLAGS "--debug --cxxflags")
-    SET(OMK_ARG_LDFLAGS "--debug --ldflags")
+    SET(OMK_ARG_CFLAGS "--cxxflags")
+    SET(OMK_ARG_LDFLAGS "--ldflags")
     EXEC_PROGRAM(${OMK_CONFIG}
       ARGS ${OMK_ARG_CFLAGS}
       OUTPUT_VARIABLE OMK_CFLAGS)


Disable keras:convolutional_test.

Disable keras:convolutional_test.

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -208,6 +208,9 @@
     "${tensorflow_source_dir}/tensorflow/contrib/learn/python/learn/learn_io/graph_io_test.py"
     # Test is flaky on Windows GPU builds (b/38283730).
     "${tensorflow_source_dir}/tensorflow/contrib/factorization/python/ops/gmm_test.py"
+    # Disable following manual tag in BUILD.
+    "${tensorflow_source_dir}/tensorflow/python/keras/_impl/keras/layers/convolutional_test.py"
+
   )
   if (WIN32)
     set(tf_test_src_py_exclude


arch: arm: aarch32: Add missing arch flag for Cortex-R5

This commit adds the GCC `-march` flag for the ARM Cortex-R5 targets.

Note that `armv7-r+idiv` must be specified instead of `armv7-r`,
because the GCC internally resolves `-mcpu=cortex-r5` to it.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- arch/arm/aarch32.cmake
+++ arch/arm/aarch32.cmake
@@ -8,6 +8,7 @@
 set(ARCH_FOR_cortex-m33       armv8-m.main+dsp)
 set(ARCH_FOR_cortex-m33+nodsp armv8-m.main    )
 set(ARCH_FOR_cortex-r4        armv7-r         )
+set(ARCH_FOR_cortex-r5        armv7-r+idiv    )

 if(ARCH_FOR_${GCC_M_CPU})
     set(ARCH_FLAG -march=${ARCH_FOR_${GCC_M_CPU}})


BUG: Add missing module dependencies.

BUG: Add missing module dependencies.

--- itk-module.cmake
+++ itk-module.cmake
@@ -7,6 +7,8 @@
 itk_module(BridgeJavaScript
   DEPENDS
     ITKCommon
+    ITKIOImageBase
+    ITKImageFunction
   TEST_DEPENDS
     ITKTestKernel
   EXCLUDE_FROM_DEFAULT


Enable MITK_VTK_DEBUG_LEAKS by default in dartclients

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -130,6 +130,10 @@
   set(MITK_USE_SOFA 1)
 endif()

+if(NOT DEFINED MITK_VTK_DEBUG_LEAKS)
+  set(MITK_VTK_DEBUG_LEAKS 1)
+endif()
+
 if(NOT DEFINED MITK_BUILD_ALL_APPS)
   set(MITK_BUILD_ALL_APPS TRUE)
 endif()
@@ -162,6 +166,7 @@
 MITK_USE_Poco:BOOL=${MITK_USE_Poco}
 MITK_USE_SOFA:BOOL=${MITK_USE_SOFA}
 MITK_USE_QT:BOOL=${MITK_USE_QT}
+MITK_VTK_DEBUG_LEAKS:BOOL=${MITK_VTK_DEBUG_LEAKS}
 ${ADDITIONAL_CMAKECACHE_OPTION}
 ")


Always use export header for auto-discovering the build options. Fix #1796.

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -201,7 +201,7 @@
             get_filename_component (EXT ${URHO3D_LIBRARIES} EXT)
             if (EXT STREQUAL .a)
                 set (URHO3D_LIB_TYPE STATIC)
-                # For Non-MSVC compiler the static define is not baked into the export header file so we need to define it for the try_run below
+                # For Non-MSVC compiler the static define is not baked into the export header file so we need to define it for the try_compile below
                 set (COMPILER_STATIC_DEFINE COMPILE_DEFINITIONS -DURHO3D_STATIC_DEFINE)
             else ()
                 set (URHO3D_LIB_TYPE SHARED)
@@ -221,7 +221,7 @@
         endif ()
         # Ensure the module has found the library with the right ABI for the chosen compiler and URHO3D_64BIT build option (if specified)
         if (URHO3D_COMPILE_RESULT)
-            break ()    # Use the cached result instead of redoing try_run() each time
+            break ()    # Use the cached result instead of redoing try_compile() each time
         elseif (URHO3D_LIBRARIES)
             if (NOT (MSVC OR ANDROID OR ARM OR WEB OR XCODE) AND NOT ABI_64BIT)
                 set (COMPILER_32BIT_FLAG -m32)
@@ -234,61 +234,40 @@
                 else ()
                     set (CMAKE_TRY_COMPILE_CONFIGURATION Debug)
                 endif ()
-                if (MSVC AND URHO3D_DLL)
-                    # This is a hack as it relies on internal implementation of try_run
-                    foreach (DLL ${URHO3D_DLL})
-                        get_filename_component (NAME ${DLL} NAME)
-                        execute_process (COMMAND ${CMAKE_COMMAND} -E copy ${DLL} ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/${CMAKE_TRY_COMPILE_CONFIGURATION}/${NAME})
-                    endforeach ()
-                endif ()
-            endif ()
-            # Since in cross-compiling mode we cannot run the test target executable and auto-discover the build options used by the found library,
-            # the next best thing is to evaluate the found export header indirectly (assuming the found library was built using the same export header)
-            if (CMAKE_CROSSCOMPILING)
-                set (URHO3D_RUN_RESULT 0)
-                file (READ ${URHO3D_BASE_INCLUDE_DIR}/Urho3D.h URHO3D_RUN_RESULT__TRYRUN_OUTPUT)
-            endif ()
-            # Due to a bug in CMake where setting the CMAKE_EXECUTABLE_SUFFIX variable in the current local scope does not being honored by try_run(), we could not tell the command the correct suffix to expect (.js); it still thinks the suffix is empty string (as per Linux platform, see also comments in emscripten.toolchain.cmake module)
-            # Workaround it by just doing try_compile() and fake the run output which is anyway the case for all the cross-compiling cases
-            if (EMSCRIPTEN)
+            endif ()
+            set (COMPILER_FLAGS "${COMPILER_32BIT_FLAG} ${CMAKE_REQUIRED_FLAGS}")
+            while (NOT URHO3D_COMPILE_RESULT)
                 try_compile (URHO3D_COMPILE_RESULT ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_LIST_DIR}/CheckUrho3DLibrary.cpp
-                    CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS} -DLINK_LIBRARIES:STRING=${URHO3D_LIBRARIES} -DINCLUDE_DIRECTORIES:STRING=${URHO3D_INCLUDE_DIRS} ${COMPILER_STATIC_DEFINE}
+                    CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${COMPILER_FLAGS} -DLINK_LIBRARIES:STRING=${URHO3D_LIBRARIES} -DINCLUDE_DIRECTORIES:STRING=${URHO3D_INCLUDE_DIRS} ${COMPILER_STATIC_DEFINE} ${COMPILER_STATIC_RUNTIME_FLAGS}
                     OUTPUT_VARIABLE TRY_COMPILE_OUT)
-                set (TRY_RUN_OUT ${URHO3D_RUN_RESULT__TRYRUN_OUTPUT})
-            else ()
-                set (COMPILER_FLAGS "${COMPILER_32BIT_FLAG} ${CMAKE_REQUIRED_FLAGS}")
-                while (NOT URHO3D_COMPILE_RESULT)
-                    try_run (URHO3D_RUN_RESULT URHO3D_COMPILE_RESULT ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_LIST_DIR}/CheckUrho3DLibrary.cpp
-                        CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${COMPILER_FLAGS} -DLINK_LIBRARIES:STRING=${URHO3D_LIBRARIES} -DINCLUDE_DIRECTORIES:STRING=${URHO3D_INCLUDE_DIRS} ${COMPILER_STATIC_DEFINE} ${COMPILER_STATIC_RUNTIME_FLAGS}
-                        COMPILE_OUTPUT_VARIABLE TRY_COMPILE_OUT RUN_OUTPUT_VARIABLE TRY_RUN_OUT)
-                    if (MSVC AND NOT URHO3D_COMPILE_RESULT AND NOT COMPILER_STATIC_RUNTIME_FLAGS)
-                        # Give a second chance for MSVC to use static runtime flag
-                        if (URHO3D_LIBRARIES_REL)
-                            set (COMPILER_STATIC_RUNTIME_FLAGS COMPILE_DEFINITIONS /MT)
-                        else ()
-                            set (COMPILER_STATIC_RUNTIME_FLAGS COMPILE_DEFINITIONS /MTd)
-                        endif ()
+                if (MSVC AND NOT URHO3D_COMPILE_RESULT AND NOT COMPILER_STATIC_RUNTIME_FLAGS)
+                    # Give a second chance for MSVC to use static runtime flag
+                    if (URHO3D_LIBRARIES_REL)
+                        set (COMPILER_STATIC_RUNTIME_FLAGS COMPILE_DEFINITIONS /MT)
                     else ()
-                        break ()    # Other compilers break immediately rendering the while-loop a no-ops
+                        set (COMPILER_STATIC_RUNTIME_FLAGS COMPILE_DEFINITIONS /MTd)
                     endif ()
-                endwhile ()
-            endif ()
+                else ()
+                    break ()    # Other compilers break immediately rendering the while-loop a no-ops
+                endif ()
+            endwhile ()
             set (URHO3D_COMPILE_RESULT ${URHO3D_COMPILE_RESULT} CACHE INTERNAL "FindUrho3D module's compile result")
-            if (URHO3D_COMPILE_RESULT AND URHO3D_RUN_RESULT EQUAL 0)
-                # Auto-discover build options used by the found library
+            if (URHO3D_COMPILE_RESULT)
+                # Auto-discover build options used by the found library and export header
+                file (READ ${URHO3D_BASE_INCLUDE_DIR}/Urho3D.h EXPORT_HEADER)
                 if (IOS)
                     # Since Urho3D library for iOS is a universal binary, we need another way to find out the compiler ABI when the library was built
                     execute_process (COMMAND lipo -info ${URHO3D_LIBRARIES} COMMAND grep -cq 'x86_64' RESULT_VARIABLE GREP_RESULT OUTPUT_QUIET ERROR_QUIET)
                     math (EXPR ABI_64BIT "1 - ${GREP_RESULT}")
                 elseif (MSVC)
                     if (COMPILER_STATIC_RUNTIME_FLAGS)
-                        set (TRY_RUN_OUT "${TRY_RUN_OUT}#define URHO3D_STATIC_RUNTIME\n")
+                        set (EXPORT_HEADER "${EXPORT_HEADER}#define URHO3D_STATIC_RUNTIME\n")
                     endif ()
                 endif ()
                 set (URHO3D_64BIT ${ABI_64BIT} CACHE BOOL "Enable 64-bit build, the value is auto-discovered based on the found Urho3D library" FORCE) # Force it as it is more authoritative than user-specified option
                 set (URHO3D_LIB_TYPE ${URHO3D_LIB_TYPE} CACHE STRING "Urho3D library type, the value is auto-discovered based on the found Urho3D library" FORCE) # Use the Force, Luke
                 foreach (VAR ${AUTO_DISCOVER_VARS})
-                    if (TRY_RUN_OUT MATCHES "#define ${VAR}")
+                    if (EXPORT_HEADER MATCHES "#define ${VAR}")
                         set (AUTO_DISCOVERED_${VAR} 1)
                     else ()
                         set (AUTO_DISCOVERED_${VAR} 0)
@@ -307,7 +286,7 @@
     if (URHO3D_LIBRARIES_REL AND URHO3D_LIBRARIES_DBG)
         set (URHO3D_LIBRARIES ${URHO3D_LIBRARIES_REL} ${URHO3D_LIBRARIES_DBG})
     endif ()
-    # Ensure auto-discovered variables always prefail over user settings in all the subsequent cmake rerun (even without redoing try_run)
+    # Ensure auto-discovered variables always prefail over user settings in all the subsequent cmake rerun (even without redoing try_compile)
     foreach (VAR ${AUTO_DISCOVER_VARS})
         if (DEFINED ${VAR} AND DEFINED AUTO_DISCOVERED_${VAR})  # Cannot combine these two ifs due to variable expansion error when it is not defined
             if ((${VAR} AND NOT ${AUTO_DISCOVERED_${VAR}}) OR (NOT ${VAR} AND ${AUTO_DISCOVERED_${VAR}}))


Updated master version to 2013.03.99

Updated master version to 2013.03.99

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -5,8 +5,8 @@
 set(LIBPOSTFIX "")

 # MITK_VERSION
-set(MITK_VERSION_MAJOR "2012")
-set(MITK_VERSION_MINOR "12")
+set(MITK_VERSION_MAJOR "2013")
+set(MITK_VERSION_MINOR "03")
 set(MITK_VERSION_PATCH "99")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")


use swig 2 from the itk build in SimpleITK

--- CMakeExternals/SimpleITK.cmake
+++ CMakeExternals/SimpleITK.cmake
@@ -59,6 +59,7 @@
          -DBUILD_EXAMPLES:BOOL=OFF
          -DGDCM_DIR:PATH=${GDCM_DIR}
          -DITK_DIR:PATH=${ITK_DIR}
+         -DSWIG_DIR:PATH=${ITK_DIR}/Wrapping/Generators/SwigInterface/swig/share/swig/2.0.4
        DEPENDS ${proj_DEPENDENCIES}
       )


COMP: try to detect cblas when needed by shark

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -118,12 +118,22 @@
   set(SHARK_USE_DYNLIB 0)
 endif()

+if(SHARK_USE_CBLAS AND SHARK_USE_DYNLIB)
+  set(REQUIRED_CBLAS_LIB CBLAS_LIBRARY)
+  find_library(CBLAS_LIBRARY NAMES cblas)
+else()
+  set(REQUIRED_CBLAS_LIB)
+endif()
+
 INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark
-  REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR
+  REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR ${REQUIRED_CBLAS_LIB}
   VERSION_VAR SHARK_VERSION_STRING)

 if(SHARK_FOUND)
   set(SHARK_INCLUDE_DIRS ${SHARK_INCLUDE_DIR} ${Boost_INCLUDE_DIR} )
   set(SHARK_LIBRARIES ${SHARK_LIBRARY} ${Boost_LIBRARIES} )
+  if(REQUIRED_CBLAS_LIB)
+    set(SHARK_LIBRARIES ${SHARK_LIBRARIES} ${CBLAS_LIBRARY})
+  endif()
 endif()


ENH: add minimum version number for ITK 4.5.0 (perhaps 4.4.2 works also)

--- CMake/ImportITK.cmake
+++ CMake/ImportITK.cmake
@@ -12,6 +12,11 @@
 if(OTB_USE_EXTERNAL_ITK)
   find_package(ITK REQUIRED)
   if(ITK_FOUND)
+    #Check version of external ITK
+    if(${ITK_VERSION} VERSION_LESS "4.5.0")
+      message(FATAL_ERROR "ITK version >= 4.5.0 is required. Please update your external version or set OTB_USE_EXTERNAL_ITK OFF to use INTERNAL ITK set on OTB/Utilities repository.")
+    endif()
+
     # This section corresponds to the content of ${ITK_USE_FILE}
     # with the exception that include_directories() is removed
     # and done in otbIncludeDirectories


PR feedback

PR feedback

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -311,14 +311,14 @@

     ExternalProject_Get_Property(realm-sync-lib SOURCE_DIR)
     set(sync_directory ${SOURCE_DIR})
-
-    if(REALM_PLATFORM STREQUAL "Android")
-        set(sync_library_debug ${sync_directory}/android-lib/librealm-sync${platform}-dbg.a)
-        set(sync_library_release ${sync_directory}/android-lib/librealm-sync${platform}.a)
-    else()
-        set(sync_library_debug ${sync_directory}/src/realm/librealm-sync${platform}-dbg.a)
-        set(sync_library_release ${sync_directory}/src/realm/librealm-sync${platform}.a)
-    endif()
+    if(REALM_PLATFORM STREQUAL "Android")
+        set(sync_library_directory ${sync_directory}/android-lib)
+    else()
+        set(sync_library_directory ${sync_directory}/src/realm)
+    endif()
+
+    set(sync_library_debug ${sync_library_directory}/librealm-sync${platform}-dbg.a)
+    set(sync_library_release ${sync_library_directory}/librealm-sync${platform}.a)
     set(sync_libraries ${sync_library_debug} ${sync_library_release})

     ExternalProject_Add_Step(realm-sync-lib ensure-libraries
@@ -338,13 +338,8 @@
     set_property(TARGET realm-sync PROPERTY INTERFACE_LINK_LIBRARIES ${SSL_LIBRARIES})

     # Sync server library is built as part of the sync library build
-    if(REALM_PLATFORM STREQUAL "Android")
-        set(sync_server_library_debug ${sync_directory}/android-lib/librealm-server${platform}-dbg.a)
-        set(sync_server_library_release ${sync_directory}/android-lib/librealm$-server${platform}.a)
-    else()
-        set(sync_server_library_debug ${sync_directory}/src/realm/librealm-server${platform}-dbg.a)
-        set(sync_server_library_release ${sync_directory}/src/realm/librealm$-server${platform}.a)
-    endif()
+    set(sync_server_library_debug ${sync_library_directory}/librealm-server${platform}-dbg.a)
+    set(sync_server_library_release ${sync_library_directory}/librealm$-server${platform}.a)
     set(sync_server_libraries ${sync_server_library_debug} ${sync_server_library_release})

     ExternalProject_Add_Step(realm-sync-lib ensure-server-libraries
@@ -379,7 +374,7 @@
 function(clone_and_build_realm_sync branch)
     set(cmake_files ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
     if(REALM_PLATFORM STREQUAL "Android")
-        set(config_cmd test -f src/config.mk || REALM_CORE_PREFIX=${cmake_files}/realm-core/src/realm-core REALM_FORCE_OPENSSL=YES REALM_ENABLE_ENCRYPTION=YES REALM_ENABLE_ASSERTIONS= sh build.sh config && echo "ENABLE_ENCRYPTION    = yes" >> src/config.mk)
+        set(config_cmd test -f src/config.mk || REALM_CORE_PREFIX=${cmake_files}/realm-core/src/realm-core REALM_FORCE_OPENSSL=YES REALM_ENABLE_ASSERTIONS= sh build.sh config && echo "ENABLE_ENCRYPTION    = yes" >> src/config.mk)
     else()
         set(config_cmd test -f src/config.mk || REALM_CORE_PREFIX=${cmake_files}/realm-core/src/realm-core sh build.sh config)
     endif()


cmake: Fix OpenSSL detection in non-standard path

This should fix the detection on Windows.

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>
(cherry picked from commit 613b71b3851697f8e83ab83bb1c785b644a648a4)

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -66,28 +66,28 @@
 endif (WIN32)

 if (OPENSSL_FOUND)
-    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
     check_include_file(openssl/des.h HAVE_OPENSSL_DES_H)
     if (NOT HAVE_OPENSSL_DES_H)
         message(FATAL_ERROR "Could not detect openssl/des.h")
     endif()

-    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
     check_include_file(openssl/aes.h HAVE_OPENSSL_AES_H)
     if (NOT HAVE_OPENSSL_AES_H)
         message(FATAL_ERROR "Could not detect openssl/aes.h")
     endif()

-    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
     check_include_file(openssl/blowfish.h HAVE_OPENSSL_BLOWFISH_H)

-    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
     check_include_file(openssl/ecdh.h HAVE_OPENSSL_ECDH_H)

-    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
     check_include_file(openssl/ec.h HAVE_OPENSSL_EC_H)

-    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
     check_include_file(openssl/ecdsa.h HAVE_OPENSSL_ECDSA_H)
 endif()


Need this library for a 32-bit build too.

--- indra/cmake/ViewerMiscLibs.cmake
+++ indra/cmake/ViewerMiscLibs.cmake
@@ -6,6 +6,7 @@
   use_prebuilt_binary(libuuid)
   use_prebuilt_binary(slvoice)
   use_prebuilt_binary(fontconfig)
+  use_prebuilt_binary(libidn)

   if( ND_BUILD64BIT_ARCH )
     if( WINDOWS )
@@ -13,7 +14,6 @@
       use_prebuilt_binary( wix )
     elseif( DARWIN )
       use_prebuilt_binary( slplugin_x86 )
-      use_prebuilt_binary( libidn )
     endif()
   endif( ND_BUILD64BIT_ARCH )
 endif(NOT STANDALONE)


Update the FindTBB to a version based off the Ogre3d implementation.

--- FindTBB/FindTBB.cmake
+++ FindTBB/FindTBB.cmake
@@ -1,283 +1,283 @@
-# Locate Intel Threading Building Blocks include paths and libraries
-# FindTBB.cmake can be found at https://code.google.com/p/findtbb/
-# Written by Hannes Hofmann <hannes.hofmann _at_ informatik.uni-erlangen.de>
-# Improvements by Gino van den Bergen <gino _at_ dtecta.com>,
-#   Florian Uhlig <F.Uhlig _at_ gsi.de>,
-#   Jiri Marsik <jiri.marsik89 _at_ gmail.com>
-
-# The MIT License
-#
-# Copyright (c) 2011 Hannes Hofmann
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-# GvdB: This module uses the environment variable TBB_ARCH_PLATFORM which defines architecture and compiler.
-#   e.g. "ia32/vc8" or "em64t/cc4.1.0_libc2.4_kernel2.6.16.21"
-#   TBB_ARCH_PLATFORM is set by the build script tbbvars[.bat|.sh|.csh], which can be found
-#   in the TBB installation directory (TBB_INSTALL_DIR).
-#
-# GvdB: Mac OS X distribution places libraries directly in lib directory.
-#
-# For backwards compatibility, you may explicitely set the CMake variables TBB_ARCHITECTURE and TBB_COMPILER.
-# TBB_ARCHITECTURE [ ia32 | em64t | itanium ]
-#   which architecture to use
-# TBB_COMPILER e.g. vc9 or cc3.2.3_libc2.3.2_kernel2.4.21 or cc4.0.1_os10.4.9
-#   which compiler to use (detected automatically on Windows)
-
-# This module respects
-# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
-
-# This module defines
-# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
-# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
-# TBB_DEBUG_LIBRARY_DIRS, where to find libtbb_debug, libtbbmalloc_debug
-# TBB_INSTALL_DIR, the base TBB install directory
-# TBB_LIBRARIES, the libraries to link against to use TBB.
-# TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
-# TBB_FOUND, If false, don't try to use TBB.
-# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
-
-
-if (WIN32)
-    # has em64t/vc8 em64t/vc9
-    # has ia32/vc7.1 ia32/vc8 ia32/vc9
-    set(_TBB_DEFAULT_INSTALL_DIR "C:/Program Files/Intel/TBB" "C:/Program Files (x86)/Intel/TBB")
-    set(_TBB_LIB_NAME "tbb")
-    set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
-    set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
-    set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
-    if (MSVC71)
-        set (_TBB_COMPILER "vc7.1")
-    endif(MSVC71)
-    if (MSVC80)
-        set(_TBB_COMPILER "vc8")
-    endif(MSVC80)
-    if (MSVC90)
-        set(_TBB_COMPILER "vc9")
-    endif(MSVC90)
-    if(MSVC10)
-        set(_TBB_COMPILER "vc10")
-    endif(MSVC10)
-    # Todo: add other Windows compilers such as ICL.
-    set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
-endif (WIN32)
-
-if (UNIX)
-    if (APPLE)
-        # MAC
-        set(_TBB_DEFAULT_INSTALL_DIR "/Library/Frameworks/Intel_TBB.framework/Versions")
-        # libs: libtbb.dylib, libtbbmalloc.dylib, *_debug
-        set(_TBB_LIB_NAME "tbb")
-        set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
-        set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
-        set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
-        # default flavor on apple: ia32/cc4.0.1_os10.4.9
-        # Jiri: There is no reason to presume there is only one flavor and
-        #       that user's setting of variables should be ignored.
-        if(NOT TBB_COMPILER)
-            set(_TBB_COMPILER "cc4.0.1_os10.4.9")
-        elseif (NOT TBB_COMPILER)
-            set(_TBB_COMPILER ${TBB_COMPILER})
-        endif(NOT TBB_COMPILER)
-        if(NOT TBB_ARCHITECTURE)
-            set(_TBB_ARCHITECTURE "ia32")
-        elseif(NOT TBB_ARCHITECTURE)
-            set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
-        endif(NOT TBB_ARCHITECTURE)
-    else (APPLE)
-        # LINUX
-        set(_TBB_DEFAULT_INSTALL_DIR "/opt/intel/tbb" "/usr/local/include" "/usr/include")
-        set(_TBB_LIB_NAME "tbb")
-        set(_TBB_LIB_MALLOC_NAME "${_TBB_LIB_NAME}malloc")
-        set(_TBB_LIB_DEBUG_NAME "${_TBB_LIB_NAME}_debug")
-        set(_TBB_LIB_MALLOC_DEBUG_NAME "${_TBB_LIB_MALLOC_NAME}_debug")
-        # has em64t/cc3.2.3_libc2.3.2_kernel2.4.21 em64t/cc3.3.3_libc2.3.3_kernel2.6.5 em64t/cc3.4.3_libc2.3.4_kernel2.6.9 em64t/cc4.1.0_libc2.4_kernel2.6.16.21
-        # has ia32/*
-        # has itanium/*
-        set(_TBB_COMPILER ${TBB_COMPILER})
-        set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
-    endif (APPLE)
-endif (UNIX)
-
-if (CMAKE_SYSTEM MATCHES "SunOS.*")
-# SUN
-# not yet supported
-# has em64t/cc3.4.3_kernel5.10
-# has ia32/*
-endif (CMAKE_SYSTEM MATCHES "SunOS.*")
-
-
-#-- Clear the public variables
-set (TBB_FOUND "NO")
-
-
-#-- Find TBB install dir and set ${_TBB_INSTALL_DIR} and cached ${TBB_INSTALL_DIR}
-# first: use CMake variable TBB_INSTALL_DIR
-if (TBB_INSTALL_DIR)
-    set (_TBB_INSTALL_DIR ${TBB_INSTALL_DIR})
-endif (TBB_INSTALL_DIR)
-# second: use environment variable
-if (NOT _TBB_INSTALL_DIR)
-    if (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
-        set (_TBB_INSTALL_DIR $ENV{TBB_INSTALL_DIR})
-    endif (NOT "$ENV{TBB_INSTALL_DIR}" STREQUAL "")
-    # Intel recommends setting TBB21_INSTALL_DIR
-    if (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
-        set (_TBB_INSTALL_DIR $ENV{TBB21_INSTALL_DIR})
-    endif (NOT "$ENV{TBB21_INSTALL_DIR}" STREQUAL "")
-    if (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
-        set (_TBB_INSTALL_DIR $ENV{TBB22_INSTALL_DIR})
-    endif (NOT "$ENV{TBB22_INSTALL_DIR}" STREQUAL "")
-    if (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
-        set (_TBB_INSTALL_DIR $ENV{TBB30_INSTALL_DIR})
-    endif (NOT "$ENV{TBB30_INSTALL_DIR}" STREQUAL "")
-endif (NOT _TBB_INSTALL_DIR)
-# third: try to find path automatically
-if (NOT _TBB_INSTALL_DIR)
-    if (_TBB_DEFAULT_INSTALL_DIR)
-        set (_TBB_INSTALL_DIR ${_TBB_DEFAULT_INSTALL_DIR})
-    endif (_TBB_DEFAULT_INSTALL_DIR)
-endif (NOT _TBB_INSTALL_DIR)
-# sanity check
-if (NOT _TBB_INSTALL_DIR)
-    message ("ERROR: Unable to find Intel TBB install directory. ${_TBB_INSTALL_DIR}")
-else (NOT _TBB_INSTALL_DIR)
-# finally: set the cached CMake variable TBB_INSTALL_DIR
-if (NOT TBB_INSTALL_DIR)
-    set (TBB_INSTALL_DIR ${_TBB_INSTALL_DIR} CACHE PATH "Intel TBB install directory")
-    mark_as_advanced(TBB_INSTALL_DIR)
-endif (NOT TBB_INSTALL_DIR)
-
-
-#-- A macro to rewrite the paths of the library. This is necessary, because
-#   find_library() always found the em64t/vc9 version of the TBB libs
-macro(TBB_CORRECT_LIB_DIR var_name)
-#    if (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
-        string(REPLACE em64t "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
-#    endif (NOT "${_TBB_ARCHITECTURE}" STREQUAL "em64t")
-    string(REPLACE ia32 "${_TBB_ARCHITECTURE}" ${var_name} ${${var_name}})
-    string(REPLACE vc7.1 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
-    string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
-    string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
-    string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
-endmacro(TBB_CORRECT_LIB_DIR var_content)
-
-
-#-- Look for include directory and set ${TBB_INCLUDE_DIR}
-set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
-# Jiri: tbbvars now sets the CPATH environment variable to the directory
-#       containing the headers.
-find_path(TBB_INCLUDE_DIR
-    tbb/task_scheduler_init.h
-    PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
-)
-mark_as_advanced(TBB_INCLUDE_DIR)
-
-
-#-- Look for libraries
-# GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
-if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
-    set (_TBB_LIBRARY_DIR
-         ${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
-         ${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
-        )
-endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
-# Jiri: This block isn't mutually exclusive with the previous one
-#       (hence no else), instead I test if the user really specified
-#       the variables in question.
-if ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
-    # HH: deprecated
-    message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
-    # Jiri: It doesn't hurt to look in more places, so I store the hints from
-    #       ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
-    #       variables and search them both.
-    set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
-endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))
-
-# GvdB: Mac OS X distribution places libraries directly in lib directory.
-list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)
-
-# Jiri: No reason not to check the default paths. From recent versions,
-#       tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
-#       variables, which now point to the directories of the lib files.
-#       It all makes more sense to use the ${_TBB_LIBRARY_DIR} as a HINTS
-#       argument instead of the implicit PATHS as it isn't hard-coded
-#       but computed by system introspection. Searching the LIBRARY_PATH
-#       and LD_LIBRARY_PATH environment variables is now even more important
-#       that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
-#       the use of TBB built from sources.
-find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-
-#Extract path from TBB_LIBRARY name
-get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
-
-#TBB_CORRECT_LIB_DIR(TBB_LIBRARY)
-#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY)
-mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)
-
-#-- Look for debug libraries
-# Jiri: Changed the same way as for the release libraries.
-find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-
-# Jiri: Self-built TBB stores the debug libraries in a separate directory.
-#       Extract path from TBB_LIBRARY_DEBUG name
-get_filename_component(TBB_LIBRARY_DEBUG_DIR ${TBB_LIBRARY_DEBUG} PATH)
-
-#TBB_CORRECT_LIB_DIR(TBB_LIBRARY_DEBUG)
-#TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY_DEBUG)
-mark_as_advanced(TBB_LIBRARY_DEBUG TBB_MALLOC_LIBRARY_DEBUG)
-
-
-if (TBB_INCLUDE_DIR)
-    if (TBB_LIBRARY)
-        set (TBB_FOUND "YES")
-        set (TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_MALLOC_LIBRARY} ${TBB_LIBRARIES})
-        set (TBB_DEBUG_LIBRARIES ${TBB_LIBRARY_DEBUG} ${TBB_MALLOC_LIBRARY_DEBUG} ${TBB_DEBUG_LIBRARIES})
-        set (TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR} CACHE PATH "TBB include directory" FORCE)
-        set (TBB_LIBRARY_DIRS ${TBB_LIBRARY_DIR} CACHE PATH "TBB library directory" FORCE)
-        # Jiri: Self-built TBB stores the debug libraries in a separate directory.
-        set (TBB_DEBUG_LIBRARY_DIRS ${TBB_LIBRARY_DEBUG_DIR} CACHE PATH "TBB debug library directory" FORCE)
-        mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARY_DIRS TBB_DEBUG_LIBRARY_DIRS TBB_LIBRARIES TBB_DEBUG_LIBRARIES)
-        message(STATUS "Found Intel TBB")
-    endif (TBB_LIBRARY)
-endif (TBB_INCLUDE_DIR)
-
-if (NOT TBB_FOUND)
-    message("ERROR: Intel TBB NOT found!")
-    message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
-    # do only throw fatal, if this pkg is REQUIRED
-    if (TBB_FIND_REQUIRED)
-        message(FATAL_ERROR "Could NOT find TBB library.")
-    endif (TBB_FIND_REQUIRED)
-endif (NOT TBB_FOUND)
-
-endif (NOT _TBB_INSTALL_DIR)
-
-if (TBB_FOUND)
-	set(TBB_INTERFACE_VERSION 0)
-	FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
-	STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
-	set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
-endif (TBB_FOUND)
+# - Find ThreadingBuildingBlocks include dirs and libraries
+# Use this module by invoking find_package with the form:
+#  find_package(TBB
+#    [REQUIRED]             # Fail with error if TBB is not found
+#    )                      #
+# Once done, this will define
+#
+#  TBB_FOUND - system has TBB
+#  TBB_INCLUDE_DIRS - the TBB include directories
+#  TBB_LIBRARIES - link these to use TBB
+#
+#  TBB_MALLOC_FOUND - system has TBB malloc library
+#  TBB_MALLOC_INCLUDE_DIRS
+#  TBB_MALLOC_LIBRARIES
+#
+#  TBB_MALLOC_PROXY_FOUND - system has TBB malloc proxy library
+#  TBB_MALLOC_PROXY_INCLUDE_DIRS
+#  TBB_MALLOC_PROXY_LIBRARIES
+#
+#
+# This module reads hints about search locations from variables:
+#  ENV TBB_ARCH_PLATFORM for windows only
+#  ENV TBB_ROOT or just TBB_ROOT
+#
+#
+#
+# Modified by Robert Maynard from the original OGRE source
+#
+#-------------------------------------------------------------------
+# This file is part of the CMake build system for OGRE
+#     (Object-oriented Graphics Rendering Engine)
+# For the latest info, see http://www.ogre3d.org/
+#
+# The contents of this file are placed in the public domain. Feel
+# free to make use of it in any way you like.
+#-------------------------------------------------------------------
+#
+#=============================================================================
+# Copyright 2010-2012 Kitware, Inc.
+# Copyright 2012      Rolf Eike Beer <eike@sf-mail.de>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+
+#=============================================================================
+#  FindTBB helper functions and macros
+#
+
+
+#===============================================
+# See if we have env vars to help us find tbb
+#===============================================
+macro(getenv_path VAR)
+   set(ENV_${VAR} $ENV{${VAR}})
+   # replace won't work if var is blank
+   if (ENV_${VAR})
+     string( REGEX REPLACE "\\\\" "/" ENV_${VAR} ${ENV_${VAR}} )
+   endif ()
+endmacro(getenv_path)
+
+#===============================================
+# clear vars if the user changes them
+#===============================================
+macro(clear_if_changed TESTVAR)
+  # test against internal check variable
+  # HACK: Apparently, adding a variable to the cache cleans up the list
+  # a bit. We need to also remove any empty strings from the list, but
+  # at the same time ensure that we are actually dealing with a list.
+  list(APPEND ${TESTVAR} "")
+  list(REMOVE_ITEM ${TESTVAR} "")
+  if (NOT "${${TESTVAR}}" STREQUAL "${${TESTVAR}_INT_CHECK}")
+    message(STATUS "${TESTVAR} changed.")
+    foreach(var ${ARGN})
+      set(${var} "NOTFOUND" CACHE STRING "x" FORCE)
+    endforeach(var)
+  endif ()
+  set(${TESTVAR}_INT_CHECK ${${TESTVAR}} CACHE INTERNAL "x" FORCE)
+endmacro(clear_if_changed)
+
+#===============================================
+# Generate debug names from given release names
+#===============================================
+macro(get_debug_names PREFIX)
+  foreach(i ${${PREFIX}})
+    set(${PREFIX}_DBG ${${PREFIX}_DBG} ${i}d ${i}D ${i}_d ${i}_D ${i}_debug ${i})
+  endforeach(i)
+endmacro(get_debug_names)
+
+
+#===============================================
+# Couple a set of release AND debug libraries
+#===============================================
+macro(make_library_set PREFIX)
+  if (${PREFIX}_REL AND ${PREFIX}_DBG)
+    set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG})
+  elseif (${PREFIX}_REL)
+    set(${PREFIX} ${${PREFIX}_REL})
+  elseif (${PREFIX}_DBG)
+    set(${PREFIX} ${${PREFIX}_DBG})
+  endif ()
+endmacro(make_library_set)
+
+#===============================================
+# Do the final processing for the package find.
+#===============================================
+macro(create_search_paths PREFIX)
+  foreach(dir ${${PREFIX}_PREFIX_PATH})
+    set(${PREFIX}_INC_SEARCH_PATH ${${PREFIX}_INC_SEARCH_PATH}
+      ${dir}/include ${dir}/Include ${dir}/include/${PREFIX} ${dir}/Headers)
+    set(${PREFIX}_LIB_SEARCH_PATH ${${PREFIX}_LIB_SEARCH_PATH}
+      ${dir}/lib ${dir}/Lib ${dir}/lib/${PREFIX} ${dir}/Libs)
+    set(${PREFIX}_BIN_SEARCH_PATH ${${PREFIX}_BIN_SEARCH_PATH}
+      ${dir}/bin)
+  endforeach(dir)
+  if(ANDROID)
+    set(${PREFIX}_LIB_SEARCH_PATH ${${PREFIX}_LIB_SEARCH_PATH} ${OGRE_DEPENDENCIES_DIR}/lib/${ANDROID_ABI})
+  endif()
+  set(${PREFIX}_FRAMEWORK_SEARCH_PATH ${${PREFIX}_PREFIX_PATH})
+endmacro(create_search_paths)
+
+#===============================================
+# Do the final processing for the package find.
+#===============================================
+macro(findpkg_finish PREFIX)
+  # skip if already processed during this run
+  if (NOT ${PREFIX}_FOUND)
+    if (${PREFIX}_INCLUDE_DIR AND ${PREFIX}_LIBRARY)
+      set(${PREFIX}_FOUND TRUE)
+      set(${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIR})
+      set(${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARY})
+      if (NOT ${PREFIX}_FIND_QUIETLY)
+        message(STATUS "Found ${PREFIX}: ${${PREFIX}_LIBRARIES}")
+      endif ()
+    else ()
+      if (NOT ${PREFIX}_FIND_QUIETLY)
+        message(STATUS "Could not locate ${PREFIX}")
+      endif ()
+      if (${PREFIX}_FIND_REQUIRED)
+        message(FATAL_ERROR "Required library ${PREFIX} not found! Install the library (including dev packages) and try again. If the library is already installed, set the missing variables manually in cmake.")
+      endif ()
+    endif ()
+
+    mark_as_advanced(${PREFIX}_INCLUDE_DIR ${PREFIX}_LIBRARY ${PREFIX}_LIBRARY_REL ${PREFIX}_LIBRARY_DBG ${PREFIX}_LIBRARY_FWK)
+  endif ()
+endmacro(findpkg_finish)
+
+#=============================================================================
+#  Now to actually find TBB
+#
+
+# Get path, convert backslashes as ${ENV_${var}}
+getenv_path(TBB_ROOT)
+
+# get the arch, only used by windows
+set(TBB_ARCH_PLATFORM $ENV{TBB_ARCH_PLATFORM})
+
+# construct search paths
+set(TBB_PREFIX_PATH ${TBB_ROOT} ${ENV_TBB_ROOT})
+
+# redo search if prefix path changed
+clear_if_changed(
+  TBB_PREFIX_PATH
+  TBB_LIBRARY_REL
+  TBB_LIBRARY_DBG
+  TBB_INCLUDE_DIR
+  )
+
+# For Windows, let's assume that the user might be using the precompiled
+# TBB packages from the main website. These use a rather awkward directory
+# structure (at least for automatically finding the right files) depending
+# on platform and compiler, but we'll do our best to accommodate it.
+# Not adding the same effort for the precompiled linux builds, though. Those
+# have different versions for CC compiler versions and linux kernels which
+# will never adequately match the user's setup, so there is no feasible way
+# to detect the "best" version to use. The user will have to manually
+# select the right files. (Chances are the distributions are shipping their
+# custom version of tbb, anyway, so the problem is probably nonexistant.)
+if (WIN32 AND MSVC)
+  set(COMPILER_PREFIX "vc7.1")
+  if (MSVC_VERSION EQUAL 1400)
+    set(COMPILER_PREFIX "vc8")
+  elseif(MSVC_VERSION EQUAL 1500)
+    set(COMPILER_PREFIX "vc9")
+  elseif(MSVC_VERSION EQUAL 1600)
+    set(COMPILER_PREFIX "vc10")
+  elseif(MSVC_VERSION EQUAL 1700)
+    set(COMPILER_PREFIX "vc11")
+  elseif(MSVC_VERSION EQUAL 1800)
+    set(COMPILER_PREFIX "vc12")
+  endif ()
+
+  # for each prefix path, add ia32/64\${COMPILER_PREFIX}\lib to the lib search path
+  foreach (dir ${TBB_PREFIX_PATH})
+    if (CMAKE_CL_64)
+      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia64/${COMPILER_PREFIX}/lib)
+      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia64/${COMPILER_PREFIX})
+      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${COMPILER_PREFIX}/lib)
+      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${COMPILER_PREFIX})
+    else ()
+      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${COMPILER_PREFIX}/lib)
+      list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${COMPILER_PREFIX})
+    endif ()
+  endforeach ()
+endif ()
+
+foreach (dir ${TBB_PREFIX_PATH})
+  list(APPEND TBB_LIB_SEARCH_PATH ${dir}/${TBB_ARCH_PLATFORM}/lib)
+  list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/${TBB_ARCH_PLATFORM})
+  list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib)
+endforeach ()
+
+
+set(TBB_LIBRARY_NAMES tbb)
+get_debug_names(TBB_LIBRARY_NAMES)
+
+
+find_path(TBB_INCLUDE_DIR
+          NAMES tbb/tbb.h
+          HINTS ${TBB_PREFIX_PATH}
+         )
+
+find_library(TBB_LIBRARY_REL
+             NAMES ${TBB_LIBRARY_NAMES}
+             HINTS ${TBB_PREFIX_PATH}
+             )
+
+find_library(TBB_LIBRARY_DBG
+             NAMES ${TBB_LIBRARY_NAMES_DBG}
+             HINTS ${TBB_PREFIX_PATH})
+
+make_library_set(TBB_LIBRARY)
+findpkg_finish(TBB)
+
+if (NOT TBB_FOUND)
+  return()
+endif ()
+
+
+# Look for TBB's malloc package
+set(TBB_MALLOC_LIBRARY_NAMES tbbmalloc)
+get_debug_names(TBB_MALLOC_LIBRARY_NAMES)
+
+find_path(TBB_MALLOC_INCLUDE_DIR
+          NAMES tbb/tbb.h
+          PATHS ${TBB_PREFIX_PATH})
+
+find_library(TBB_MALLOC_LIBRARY_REL
+             NAMES ${TBB_MALLOC_LIBRARY_NAMES}
+             PATHS ${TBB_PREFIX_PATH})
+
+find_library(TBB_MALLOC_LIBRARY_DBG
+             NAMES ${TBB_MALLOC_LIBRARY_NAMES_DBG}
+             PATHS ${TBB_PREFIX_PATH})
+
+make_library_set(TBB_MALLOC_LIBRARY)
+findpkg_finish(TBB_MALLOC)
+
+# Look for TBB's malloc proxy package
+set(TBB_MALLOC_PROXY_LIBRARY_NAMES tbbmalloc_proxy)
+get_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES)
+
+find_path(TBB_MALLOC_PROXY_INCLUDE_DIR
+          NAMES tbb/tbbmalloc_proxy.h
+          PATHS ${TBB_PREFIX_PATH})
+
+find_library(TBB_MALLOC_PROXY_LIBRARY_REL
+             NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES}
+             PATHS ${TBB_PREFIX_PATH})
+
+find_library(TBB_MALLOC_PROXY_LIBRARY_DBG
+             NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES_DBG}
+             PATHS ${TBB_PREFIX_PATH})
+
+make_library_set(TBB_MALLOC_PROXY_LIBRARY)
+findpkg_finish(TBB_MALLOC_PROXY)


Fix ``make clean`` not removing generator object files.

Running the clean target would not remove these files because
CMake was not aware that invoking the generators produced these
files.

Former-commit-id: 881d787f2ac080dc877691ed5273a4301c6a6157

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -77,6 +77,7 @@
   # generated library
   if (WIN32)
     add_custom_command(OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
+                              "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.o"
       DEPENDS "${args_GENERATOR_TARGET}"
       COMMAND "${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${generator_exec}" ${invoke_args}
       COMMAND "lib.exe" "/OUT:${FILTER_LIB}" "${SCRATCH_DIR}\\${args_GENERATED_FUNCTION}.o"
@@ -85,6 +86,7 @@
   elseif(XCODE)
     if (NOT target_is_pnacl)
       add_custom_command(OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
+                                "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.o"
         DEPENDS "${args_GENERATOR_TARGET}"

         # The generator executable will be placed in a configuration specific
@@ -110,6 +112,7 @@
     if (NOT target_is_pnacl)
       message(STATUS "The filter lib is ${FILTER_LIB}")
       add_custom_command(OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
+                                "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.o"
         DEPENDS "${args_GENERATOR_TARGET}"
         COMMAND "${CMAKE_BINARY_DIR}/bin/${generator_exec}" ${invoke_args}
         # Create an archive using ar (or similar)