Update builtin version of XRootD to 4.10.0

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -841,8 +841,8 @@
 endif()

 if(builtin_xrootd)
-  set(XROOTD_VERSION 4.9.1)
-  set(XROOTD_VERSIONNUM 400090001)
+  set(XROOTD_VERSION 4.10.0)
+  set(XROOTD_VERSIONNUM 400100000)
   set(XROOTD_SRC_URI ${lcgpackages}/xrootd-${XROOTD_VERSION}.tar.gz)
   set(XROOTD_DESTDIR ${CMAKE_BINARY_DIR})
   set(XROOTD_ROOTDIR ${XROOTD_DESTDIR})
@@ -865,7 +865,7 @@
   ExternalProject_Add(
     XROOTD
     URL ${XROOTD_SRC_URI}
-    URL_HASH SHA256=de47160348d52a655f8d601520ad9146b9ee76eb5d2352cdf232a6fafce27adb
+    URL_HASH SHA256=f07f85e27d72e9e8ff124173c7b53619aed8fcd36f9d6234c33f8f7fd511995b
     INSTALL_DIR ${XROOTD_ROOTDIR}
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
                -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}


Fix fir ROOT-7912 - Failure with -Dbuiltin_davix=ON on 64bit Ubuntu

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1009,14 +1009,15 @@
                  -DCMAKE_CXX_FLAGS=${__cxxflags}
                  -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
                  -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
+                 -DLIB_SUFFIX=""
       LOG_BUILD 1 LOG_CONFIGURE 1 LOG_DOWNLOAD 1 LOG_INSTALL 1
     )
     ExternalProject_Get_Property(DAVIX INSTALL_DIR)
     set(DAVIX_INCLUDE_DIR ${INSTALL_DIR}/include/davix)
-    set(DAVIX_LIBRARY ${INSTALL_DIR}/${_LIBDIR_DEFAULT}/${CMAKE_STATIC_LIBRARY_PREFIX}davix${CMAKE_STATIC_LIBRARY_SUFFIX})
+    set(DAVIX_LIBRARY ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}davix${CMAKE_STATIC_LIBRARY_SUFFIX})
     set(DAVIX_INCLUDE_DIRS ${DAVIX_INCLUDE_DIR})
     foreach(l davix neon boost_static_internal)
-      list(APPEND DAVIX_LIBRARIES ${INSTALL_DIR}/${_LIBDIR_DEFAULT}/${CMAKE_STATIC_LIBRARY_PREFIX}${l}${CMAKE_STATIC_LIBRARY_SUFFIX})
+      list(APPEND DAVIX_LIBRARIES ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${l}${CMAKE_STATIC_LIBRARY_SUFFIX})
     endforeach()
     if(builtin_openssl)
       add_dependencies(DAVIX OPENSSL)  # Build first OpenSSL


Undo changes for the location of X11 for MacOSX

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -275,8 +275,7 @@
     endif()
   endif()
   if(APPLE)
-    find_path(OPENGL_INCLUDE_DIR GL/gl.h DOC "Include for OpenGL on OSX"
-              PATHS /opt/X11/include)
+    find_path(OPENGL_INCLUDE_DIR GL/gl.h DOC "Include for OpenGL on OSX")
   endif()
 endif()


Make libjson-rpc-cpp cacheable

Make libjson-rpc-cpp cacheable

--- cmake/projects/libjson-rpc-cpp/hunter.cmake
+++ cmake/projects/libjson-rpc-cpp/hunter.cmake
@@ -1,6 +1,7 @@
 # cmake/projects/libjson-rpc-cpp/hunter.cmake

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_download)
 include(hunter_pick_scheme)
 include(hunter_cmake_args)
@@ -45,4 +46,5 @@
     ${_hunter_unix_cmake_args}
 )

+hunter_cacheable(libjson-rpc-cpp)
 hunter_download(PACKAGE_NAME libjson-rpc-cpp)


CI: allow caching downloaded NDK

CI: allow caching downloaded NDK

--- ci-build.cmake
+++ ci-build.cmake
@@ -69,12 +69,14 @@
         -DOGRE_DEPENDENCIES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/ogredeps)
     set(BUILD_DEPS TRUE)

-    message(STATUS "Downloading Android NDK")
-    file(DOWNLOAD
-        http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
-        ./android-ndk-r13b-linux-x86_64.zip)
-    message(STATUS "Extracting Android NDK")
-    execute_process(COMMAND unzip android-ndk-r13b-linux-x86_64.zip OUTPUT_QUIET)
+    if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r13b)
+        message(STATUS "Downloading Android NDK")
+        file(DOWNLOAD
+            http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
+            ./android-ndk-r13b-linux-x86_64.zip)
+        message(STATUS "Extracting Android NDK")
+        execute_process(COMMAND unzip android-ndk-r13b-linux-x86_64.zip OUTPUT_QUIET)
+    endif()
 endif()

 execute_process(COMMAND cmake


Fix interface library properties

Fix interface library properties

--- reason.util.cmake
+++ reason.util.cmake
@@ -66,29 +66,50 @@
 endfunction()

 function(reason_extract_dep_inc_dirs_to_target TARGET_NAME DEP)
-  reason_verbose("  add dep include directories: [dep=${DEP}]")
-  get_target_property(DEP_INC_DIRS "${DEP}" "INCLUDE_DIRECTORIES")
-  if("${DEP_INC_DIRS}" STREQUAL "DEP_INC_DIRS-NOTFOUND")
-    return()
+  function(reason_extract_dep_inc_dirs_to_target_one TARGET_NAME DEP PROP_NAME)
+    get_target_property(props "${DEP}" "${PROP_NAME}")
+    if("${props}" STREQUAL "props-NOTFOUND")
+      return()
+    endif()
+    foreach(prop IN LISTS props)
+      target_include_directories("${TARGET_NAME}" PRIVATE "${prop}")
+      reason_verbose("    [private-include=${v}]")
+    endforeach()
+  endfunction()
+
+  get_target_property(TARGET_TYPE "${TARGET_NAME}" "TYPE")
+  reason_verbose("${TARGET_NAME} properties: [type=${TARGET_TYPE}]")
+
+  reason_verbose("  add dep interface include directories: [dep=${DEP}]")
+  reason_extract_dep_inc_dirs_to_target_one("${TARGET_NAME}" "${DEP}" "INTERFACE_INCLUDE_DIRECTORIES")
+
+  if(NOT "${TARGET_TYPE}" STREQUAL "INTERFACE_LIBRARY")
+    reason_verbose("  add dep include directories: [dep=${DEP}]")
+    reason_extract_dep_inc_dirs_to_target_one("${TARGET_NAME}" "${DEP}" "INCLUDE_DIRECTORIES")
   endif()
-  foreach(v IN LISTS DEP_INC_DIRS)
-    target_include_directories("${TARGET_NAME}" PRIVATE "${v}")
-    reason_verbose("    [private-include=${v}]")
-  endforeach()
 endfunction()

 function(reason_unique_target_properties TARGET_NAME)
-  # @TODO compile define
-  get_target_property(t_INCLUDE_DIRS "${TARGET_NAME}" "INCLUDE_DIRECTORIES")
-  if(NOT "${t_INCLUDE_DIRS}" STREQUAL "t_INCLUDE_DIRS-NOTFOUND")
-    list(REMOVE_DUPLICATES t_INCLUDE_DIRS)
-    set_target_properties("${TARGET_NAME}" PROPERTIES "INCLUDE_DIRECTORIES" "${t_INCLUDE_DIRS}")
-  endif()
+  function(reason_unique_target_properties_one TARGET_NAME PROP_NAME)
+    get_target_property(props "${TARGET_NAME}" "${PROP_NAME}")
+    if("${props}" STREQUAL "props-NOTFOUND")
+      return()
+    endif()
+    list(REMOVE_DUPLICATES props)
+    set_target_properties("${TARGET_NAME}" PROPERTIES "${PROP_NAME}" "${props}")
+  endfunction()

-  get_target_property(t_LINK_LIBS "${TARGET_NAME}" "LINK_LIBRARIES")
-  if(NOT "${t_LINK_LIBS}" STREQUAL "t_LINK_LIBS-NOTFOUND")
-    list(REMOVE_DUPLICATES t_LINK_LIBS)
-    set_target_properties("${TARGET_NAME}" PROPERTIES "LINK_LIBRARIES" "${t_LINK_LIBS}")
+  get_target_property(TARGET_TYPE "${TARGET_NAME}" "TYPE")
+  reason_verbose("${TARGET_NAME} properties: [type=${TARGET_TYPE}]")
+
+  reason_unique_target_properties_one("${TARGET_NAME}" "INTERFACE_COMPILE_OPTIONS")
+  reason_unique_target_properties_one("${TARGET_NAME}" "INTERFACE_INCLUDE_DIRECTORIES")
+  reason_unique_target_properties_one("${TARGET_NAME}" "INTERFACE_LINK_LIBRARIES")
+
+  if(NOT "${TARGET_TYPE}" STREQUAL "INTERFACE_LIBRARY")
+    reason_unique_target_properties_one("${TARGET_NAME}" "COMPILE_OPTIONS")
+    reason_unique_target_properties_one("${TARGET_NAME}" "INCLUDE_DIRECTORIES")
+    reason_unique_target_properties_one("${TARGET_NAME}" "LINK_LIBRARIES")
   endif()
 endfunction()

@@ -112,12 +133,13 @@
   get_target_property(TARGET_TYPE "${TARGET_NAME}" "TYPE")
   reason_verbose("${TARGET_NAME} properties: [type=${TARGET_TYPE}]")

-  # @TODO compile define
   reason_print_target_properties_one("${TARGET_NAME}" "INTERFACE_COMPILE_OPTIONS")
   reason_print_target_properties_one("${TARGET_NAME}" "INTERFACE_INCLUDE_DIRECTORIES")
   reason_print_target_properties_one("${TARGET_NAME}" "INTERFACE_LINK_LIBRARIES")

-  reason_print_target_properties_one("${TARGET_NAME}" "COMPILE_OPTIONS")
-  reason_print_target_properties_one("${TARGET_NAME}" "INCLUDE_DIRECTORIES")
-  reason_print_target_properties_one("${TARGET_NAME}" "LINK_LIBRARIES")
+  if(NOT "${TARGET_TYPE}" STREQUAL "INTERFACE_LIBRARY")
+    reason_print_target_properties_one("${TARGET_NAME}" "COMPILE_OPTIONS")
+    reason_print_target_properties_one("${TARGET_NAME}" "INCLUDE_DIRECTORIES")
+    reason_print_target_properties_one("${TARGET_NAME}" "LINK_LIBRARIES")
+  endif()
 endfunction()


Use legacy PATH alias to be compatible with older CMake versions on OS X.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -400,7 +400,7 @@
         file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/build)
         get_target_property (LOCATION ${TARGET_NAME} LOCATION)
         string (REGEX REPLACE "^.*\\$\\(CONFIGURATION\\)" $(CONFIGURATION) SYMLINK ${LOCATION})
-        get_filename_component (DIRECTORY ${SYMLINK} DIRECTORY)
+        get_filename_component (DIRECTORY ${SYMLINK} PATH)
         add_custom_command (TARGET ${TARGET_NAME} POST_BUILD
             COMMAND mkdir -p ${DIRECTORY} && ln -s -f $<TARGET_FILE:${TARGET_NAME}> ${DIRECTORY}/$<TARGET_FILE_NAME:${TARGET_NAME}>
             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/build)


Add GDB support for IREE target

Add GDB support for IREE target

Change-Id: Id81aab09d057a1d569ed9d75e5a3e936fbeb516a
GitOrigin-RevId: 48bb40849c9e9c5f047fabec78800a7de52e2744

--- riscv_iree.cmake
+++ riscv_iree.cmake
@@ -59,7 +59,7 @@
   set(IREE_TARGET_BACKENDS_TO_BUILD "DYLIB-LLVM-AOT;VMVX" CACHE STRING "" FORCE)
   set(CMAKE_SYSTEM_LIBRARY_PATH "${RISCV_TOOLCHAIN_ROOT}/riscv32-unknown-elf/lib")
   set(IREE_ENABLE_THREADING OFF CACHE BOOL "" FORCE)
-  list(APPEND RISCV_COMPILER_FLAGS "-g3 -menable-experimental-extensions -march=rv32imfv0p10 -mabi=ilp32 -DIREE_PLATFORM_GENERIC=1 -DIREE_SYNCHRONIZATION_DISABLE_UNSAFE=1 -DIREE_FILE_IO_ENABLE=0 -DIREE_TIME_NOW_FN=\"\{ return 0; \}\"")
+  list(APPEND RISCV_COMPILER_FLAGS "-g3 -ggdb -menable-experimental-extensions -march=rv32imfv0p10 -mabi=ilp32 -DIREE_PLATFORM_GENERIC=1 -DIREE_SYNCHRONIZATION_DISABLE_UNSAFE=1 -DIREE_FILE_IO_ENABLE=0 -DIREE_TIME_NOW_FN=\"\{ return 0; \}\"")
 endif()

 set(CMAKE_C_FLAGS             "${RISCV_COMPILER_FLAGS} ${CMAKE_C_FLAGS}")


CMake: Remove test-specific variables from ProcessTestsConfigure.

The removed definitions are now defined in:
`3rdparty/stout/cmake/StoutTestsConfigure.cmake`

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

--- 3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
+++ 3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
@@ -14,59 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-###############################################################
-# Defines the variables useful for tests, and exports them to the scope of
-# whatever file includes this file. There are a few important consequence of this:
-#
-#   * This file MUST be included before the third-party dependencies like gmock
-#     are configured/built/downloaded (if you're doing this). If this code isn't
-#     run first, then we won't know (e.g.) what folders to unpack the code to.
-#   * This file ONLY defines and exports variables for third-party dependencies
-#     that are required by the test suite, but are not a dependency that
-#     libprocess core takes. That is, this file handles the gmock dependency,
-#     but not the glog dependency (which the process library itself takes a
-#     dependency on).
-#   * This file and the config file for the libprocess "core" dependencies (e.g.,
-#     glog, boost, etc.) so that we can export the variables for the core
-#     dependencies (e.g., where to find the .so/.dll files) without having to also
-#     export the variables for the dependencies that only the test package has.
+include(StoutTestsConfigure)

 set(
   PROCESS_TESTS_TARGET process_tests
   CACHE STRING "Target we use to refer to tests for the process library")
-
-# DIRECTORY STRUCTURE FOR THIRD-PARTY LIBS REQUIRED FOR TEST INFRASTRUCTURE.
-############################################################################
-EXTERNAL("gmock" ${GMOCK_VERSION} "${MESOS_3RDPARTY_BIN}")
-
-set(GTEST_SRC          ${GMOCK_ROOT}/gtest)
-set(GPERFTOOLS_VERSION 2.0)
-set(GPERFTOOLS         ${MESOS_3RDPARTY_BIN}/gperftools-${GPERFTOOLS_VERSION})
-
-# Convenience variables for include directories of third-party dependencies.
-set(GMOCK_INCLUDE_DIR ${GMOCK_ROOT}/include)
-set(GTEST_INCLUDE_DIR ${GTEST_SRC}/include)
-
-# Convenience variables for `lib` directories of built third-party dependencies.
-if (WIN32)
-  set(GMOCK_LIB_DIR ${GMOCK_ROOT}-build/${CMAKE_BUILD_TYPE})
-  set(GTEST_LIB_DIR ${GMOCK_ROOT}-build/gtest/${CMAKE_BUILD_TYPE})
-else (WIN32)
-  set(GMOCK_LIB_DIR ${GMOCK_ROOT}-lib/lib/)
-  set(GTEST_LIB_DIR ${GMOCK_ROOT}-build/gtest/lib/.libs)
-endif (WIN32)
-
-# Convenience variables for "lflags", the symbols we pass to CMake to generate
-# things like `-L/path/to/glog` or `-lglog`.
-set(GMOCK_LFLAG gmock)
-set(GTEST_LFLAG gtest)
-
-# COMPILER CONFIGURATION.
-#########################
-if (APPLE)
-  # GTEST on OSX needs its own tr1 tuple.
-  add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LANG_CXX11)
-endif (APPLE)

 # DEFINE PROCESS TEST LIBRARY DEPENDENCIES. Tells the process library build
 # tests target download/configure/build all third-party libraries before


Print expected dependencies information

Print expected dependencies information

--- cmake/modules/hunter_load_from_cache.cmake
+++ cmake/modules/hunter_load_from_cache.cmake
@@ -139,6 +139,10 @@
   endif()

   file(SHA1 "${temp_deps_info}" deps_sha1)
+
+  file(READ "${temp_deps_info}" expected_deps_info)
+  hunter_status_debug("Expected deps (${deps_sha1}):\n${expected_deps_info}")
+
   hunter_make_directory("${cache_meta_dir}" "${deps_sha1}" cache_meta_dir)

   set(from_server_file "${cache_meta_dir}/from.server")


fix cake STATUS/DIFFLOG/LIST parsing bugs

--- Modules/CakePkg.cmake
+++ Modules/CakePkg.cmake
@@ -326,13 +326,16 @@
       set(mv_args DEFINITIONS)
       _cake_fix_name()
     elseif(ARG_C MATCHES "^STATUS$")
+      set(mv_args "GROUPS")
     elseif(ARG_C MATCHES "^DIFFLOG$")
+      set(mv_args "GROUPS")
     elseif(ARG_C MATCHES "^COMMAND|CMDC|SHC$")
-      set(mv_args ${ARG_C})
-      list(INSERT argv 0 ${ARG_C})
+      set(mv_args ${ARG_C} GROUPS)
+      list(INSERT argv 0 ${ARG_C}) # put back so we can still use cmake_parse_arguments to multi-arg-parse the COMMAND|CMDC|SHC
     elseif(ARG_C MATCHES "^REMOVE$")
       _cake_fix_name()
     elseif(ARG_C MATCHES "^LIST$")
+      set(mv_args "GROUPS")
       _cake_fix_name()
     elseif(ARG_C MATCHES "^REGISTER$")
       set(sv_args URL CODE NAME)
@@ -444,7 +447,7 @@
       elseif(ARG_SHC)
         string(REPLACE \; " " v "${ARG_SHC}")
         set(command sh -c "${v}")
-      elseif(ARG_STATUS OR ARG_DIFFLOG OR ARG_LIST)
+      elseif(ARG_C STREQUAL "STATUS" OR ARG_C STREQUAL "DIFFLOG" OR ARG_C STREQUAL "LIST")
         # nothing to do
       else()
         message(FATAL_ERROR "[cake_pkg] internal error while assembling command")
@@ -452,7 +455,6 @@
       string(REGEX MATCHALL "\t[0-9]+cid=" pks "${CAKE_REPO_DB}")
       string(REGEX MATCHALL "[0-9]+" pks "${pks}")
       cake_list_to_command_line_like_string(s "${command}")
-      list(APPEND ARG_GROUPS "${ARG_GROUP}")
       foreach(pk ${pks})
         set(needed 1)
         cake_repo_db_get_field_by_pk(group "${pk}")
@@ -472,9 +474,13 @@
           set(title "${ans}")
           if(CMAKE_SCRIPT_MODE_FILE AND CAKE_CURRENT_DIRECTORY)
             file(RELATIVE_PATH relpath "${CAKE_CURRENT_DIRECTORY}" "${destination}")
+            if(relpath STREQUAL "")
+              set(relpath "<current directory>")
+            endif()
           else()
             set(relpath "${destination}")
           endif()
+          set(header "${title}: ${relpath}")
           if(command)
             message(STATUS "cd ${destination}")
             execute_process(COMMAND ${command}
@@ -483,7 +489,7 @@
             if(r)
               message(FATAL_ERROR "[cake_pkg] Result: ${r}")
             endif()
-          elseif(ARG_LIST)
+          elseif(ARG_C STREQUAL "LIST")
             cake_repo_db_get_field_by_pk(name "${pk}")
             set(name "${ans}")
             cake_repo_db_get_field_by_pk(url "${pk}")
@@ -498,7 +504,7 @@
             message(STATUS "${url}")
             message("\t${s}")
             message("\tpath: ${destination}")
-          elseif(ARG_STATUS OR ARG_DIFFLOG)
+          elseif(ARG_C STREQUAL "STATUS" OR ARG_C STREQUAL "DIFFLOG")
             execute_process(COMMAND ${GIT_EXECUTABLE} status -s
               WORKING_DIRECTORY "${destination}"
               OUTPUT_VARIABLE o_gs
@@ -527,7 +533,7 @@
             string(REGEX REPLACE "[^\n]" "" o_behind "${o_behind}")
             string(LENGTH "${o_before}" o_before)
             string(LENGTH "${o_behind}" o_behind)
-            if(ARG_STATUS)
+            if(ARG_C STREQUAL "STATUS")
               if(NOT o_before EQUAL 0 OR NOT o_behind EQUAL 0 OR o_gs)
                 set(s "")
                 if(o_before EQUAL 0 AND o_behind EQUAL 0)
@@ -546,7 +552,7 @@
                   set(s "${s} + local changes")
                 endif()
                 message("")
-                message(STATUS "${relpath}")
+                message(STATUS "${header}")
                 message("\t${s}")
                 execute_process(COMMAND ${GIT_EXECUTABLE} status -sb
                   WORKING_DIRECTORY ${destination}
@@ -559,7 +565,7 @@
               # DIFFLOG
               if(NOT o_before EQUAL 0 OR NOT o_behind EQUAL 0)
                 message("")
-                message(STATUS "${relpath}")
+                message(STATUS "${header}")
                 if(NOT o_behind EQUAL 0)
                   message("\t${o_behind} to pull from [origin/${branch}]:")
                   execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline HEAD..origin/${branch}
@@ -583,9 +589,9 @@
           endif()
         endif()
       endforeach()
-    elseif(ARG_C MATCHES "^REMOVE$")
+    elseif(ARG_C STREQUAL "REMOVE")
       message(FATAL_ERROR "[cake] REMOVE is not implemented.")
-    elseif(ARG_C MATCHES "^REGISTER$")
+    elseif(ARG_C STREQUAL "REGISTER")
       if(NOT ARG_NAME)
         message(FATAL_ERROR "[cake] cake_pkg(REGISTER ...) missing NAME argument.")
       endif()


Updated BuildToolit.cmake: OSD_FontMgr.cxx was renamed to Font_FontMgr.cxx

--- adm/cmake/BuildToolkit.cmake
+++ adm/cmake/BuildToolkit.cmake
@@ -103,7 +103,7 @@
 ENDIF(NOT ${PROJECT_NAME}_NO_LIBRARY_VERSION)

 IF(DEFINED X11_FONT_PATH)
-	SET_SOURCE_FILES_PROPERTIES("${${PROJECT_NAME}_SOURCE_DIR}/src/OSD/OSD_FontMgr.cxx" PROPERTIES COMPILE_FLAGS "-DX11_FONT_PATH=\"${X11_FONT_PATH}\"")
+	SET_SOURCE_FILES_PROPERTIES("${${PROJECT_NAME}_SOURCE_DIR}/src/Font/Font_FontMgr.cxx" PROPERTIES COMPILE_FLAGS "-DX11_FONT_PATH=\"${X11_FONT_PATH}\"")
 ENDIF(DEFINED X11_FONT_PATH)

 # Workaround for Cmake bug #0011240 (see http://public.kitware.com/Bug/view.php?id=11240)


1. Change ms_replace_compiler_flags() and ms_link_static_runtime() from function to macro. 2. Use string replacement instead of regex replacement in ms_link_static_runtime().

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -69,17 +69,17 @@
     endforeach()
 endmacro(ms_add_compiler_flags LANGUAGES SUFFIXES FLAGS)

-function(ms_link_static_runtime FLAG_VAR)
+macro(ms_link_static_runtime FLAG_VAR)
     if(MSVC)
         if(${FLAG_VAR} MATCHES "/MD")
-            string(REGEX REPLACE "/MD"  "/MT" "${FLAG_VAR}" "${${FLAG_VAR}}")
+            string(REPLACE "/MD"  "/MT" "${FLAG_VAR}" "${${FLAG_VAR}}")
             #Save persistently
             set(${FLAG_VAR} ${${FLAG_VAR}} CACHE STRING "" FORCE)
         endif()
     endif()
-endfunction(ms_link_static_runtime)
-
-function(ms_replace_compiler_flags REPLACE_OPTION)
+endmacro(ms_link_static_runtime)
+
+macro(ms_replace_compiler_flags REPLACE_OPTION)
     set(SUFFIXES "")
     if((NOT DEFINED CMAKE_CONFIGURATION_TYPES) OR (CMAKE_CONFIGURATION_TYPES STREQUAL ""))
         #set(SUFFIXES "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
@@ -103,7 +103,7 @@
         endforeach()
         #message(STATUS ${FLAG_VAR} ":" ${${FLAG_VAR}})
     endforeach()
-endfunction(ms_replace_compiler_flags REPLACE_OPTION)
+endmacro(ms_replace_compiler_flags REPLACE_OPTION)

 function(ms_check_cxx11_support)
     if(UNIX)


Add -pie flag for Android

Add -pie flag for Android

--- standard/toolchain-android.cmake
+++ standard/toolchain-android.cmake
@@ -21,7 +21,7 @@
   message(FATAL_ERROR "ANDROID_NDK_ROOT could not be located. Have you installed the NDK?")
 endif()

-set(ANDROID_COMMON_FLAGS " --sysroot=${ANDROID_NDK_ROOT}/sysroot -B${ANDROID_NDK_ROOT} ")
+set(ANDROID_COMMON_FLAGS " --sysroot=${ANDROID_NDK_ROOT}/sysroot -B${ANDROID_NDK_ROOT} -pie ")
 set(CMAKE_C_COMPILER ${ANDROID_NDK_ROOT}/bin/${ANDROID_NDK_TOOL_PREFIX}-gcc${_exe_suffix} CACHE FILEPATH "C Compiler" FORCE)
 set(CMAKE_CXX_COMPILER ${ANDROID_NDK_ROOT}/bin/${ANDROID_NDK_TOOL_PREFIX}-g++${_exe_suffix} CACHE FILEPATH "C++ Compiler" FORCE)
 set(ANDROID_STRIP_COMMAND ${ANDROID_NDK_ROOT}/bin/${ANDROID_NDK_TOOL_PREFIX}-strip)


[cmake] disable lpsolve when alberta is found

they both define a get_max_level free function, which
clang does not like at all

--- config.h.cmake
+++ config.h.cmake
@@ -23,5 +23,9 @@
 /* Define to the revision of dune-gdt */
 #define DUNE_GDT_VERSION_REVISION ${DUNE_GDT_VERSION_REVISION}

+// alberta and lpsolve both define a clashing get_max_level
+#if HAVE_LPSOLVE && HAVE_ALBERTA
+#undef HAVE_LPSOLVE
+#endif
 /* end dune-gdt */
 // NEVER delete/alter above comment, dune's cmake relies on it


Fixed pot files being updated when only the timestamp changed

--- .cmake/Modules/GettextTranslate.cmake
+++ .cmake/Modules/GettextTranslate.cmake
@@ -263,7 +263,13 @@
             COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE} --lang=${lang}
               ${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
               -o ${PO_FILE_NAME}.new
-            COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
+            COMMAND if diff ${PO_FILE_NAME} ${PO_FILE_NAME}.new
+                            --unchanged-line-format='' --old-line-format=''
+                    | grep -v 'POT-Creation-Date' >/dev/null\; then
+                        mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}\;
+                else
+                        rm ${PO_FILE_NAME}.new\;
+                fi
             DEPENDS ${TEMPLATE_FILE_ABS}
           )
       else ()
@@ -271,7 +277,13 @@
             COMMAND ${GettextTranslate_MSGMERGE_EXECUTABLE}
               ${PO_FILE_NAME} ${TEMPLATE_FILE_ABS}
               -o ${PO_FILE_NAME}.new
-            COMMAND mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}
+            COMMAND if diff ${PO_FILE_NAME} ${PO_FILE_NAME}.new
+                            --unchanged-line-format='' --old-line-format=''
+                    | grep -v 'POT-Creation-Date' >/dev/null\; then
+                        mv ${PO_FILE_NAME}.new ${PO_FILE_NAME}\;
+                else
+                        rm ${PO_FILE_NAME}.new\;
+                fi
             DEPENDS ${TEMPLATE_FILE_ABS}
           )
       endif ()


Disable polarssl tests by default

Disable polarssl tests by default

--- lib/polarssl.cmake
+++ lib/polarssl.cmake
@@ -2,6 +2,7 @@
 if(NOT TARGET polarssl)
 	message("including polarssl")
 	if (SELF_TEST)
+		set(ENABLE_TESTING 0)
 		add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl)
 	else()
 		add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl EXCLUDE_FROM_ALL)


CMakeLists: Remove unused code

CMakeLists: Remove unused code

Change-Id: I2fa7db98cf3eb1839fed157b6a2d9476f9ee6d56

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -232,18 +232,6 @@
     message (FATAL_ERROR "No model files found")
   endif ()

-  add_custom_target(generate_code
-    touch generate_code
-  )
-
-  add_custom_command (
-    COMMENT               "Regenerating source from: ${MODEL_FILE}"
-    TARGET                generate_code
-    DEPENDS               ${MODEL_FILES}
-    COMMAND               ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}
-    WORKING_DIRECTORY     ${CMAKE_BINARY_DIR}
-  )
-
   generate_kurento_libraries (${ARGN})

 endfunction()


MSVC: download binaries from gisinternals

--- CMake/External_GDAL.cmake
+++ CMake/External_GDAL.cmake
@@ -87,10 +87,7 @@
     list(APPEND ${proj}_DEPENDENCIES LIBKML)
   endif()

-  if(WIN32)
-    # TODO : use nmake
-  else()
-
+  if(UNIX)
     ExternalProject_Add(${proj}
       PREFIX ${proj}
       URL "http://download.osgeo.org/gdal/1.11.0/gdal-1.11.0.tar.gz"
@@ -113,21 +110,62 @@
         ${GDAL_SB_GEOS_CONFIG}
         ${GDAL_SB_EXPAT_CONFIG}
         ${GDAL_SB_LIBKML_CONFIG}
-      BUILD_COMMAND $(MAKE)
-      INSTALL_COMMAND $(MAKE) install
-      DEPENDS ${${proj}_DEPENDENCIES}
-      PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
-      )
+        BUILD_COMMAND $(MAKE)
+        INSTALL_COMMAND $(MAKE) install
+        DEPENDS ${${proj}_DEPENDENCIES}
+        PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
+    )

     ExternalProject_Add_Step(${proj} copy_source
-      COMMAND ${CMAKE_COMMAND} -E copy_directory
+        COMMAND ${CMAKE_COMMAND} -E copy_directory
         ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR}
-      DEPENDEES patch update
-      DEPENDERS configure
-      )
+        DEPENDEES patch update
+        DEPENDERS configure
+    )

+  else(WIN32)
+    if(MSVC10)
+        set(URL_PREFIX "release-1600")
+        set(GDAL_LIBS_URL_HASH 2a3e4db48c68d490e3101b5ca98a4bce)
+        set(GDAL_DLL_URL_HASH cc5f45081ec0d0a7604816fabf5f2588)
+    else(MSVC80)
+         set(URL_PREFIX "release-1500")
+    else(CMAKE_COMPILER_2005)
+        set(URL_PREFIX "release-1400")
+    endif()
+
+    set(GDAL_LIBS_URL "http://download.gisinternals.com/sdk/downloads/${URL_PREFIX}-gdal-1-11-1-mapserver-6-4-1-libs.zip")
+    set(GDAL_DLL_URL "http://download.gisinternals.com/sdk/downloads/${URL_PREFIX}-gdal-1-11-1-mapserver-6-4-1.zip")
+
+    #TODO: find hash for archives properly
+    set(GDAL_LIBS_URL_HASH 2a3e4db48c68d490e3101b5ca98a4bce)
+    set(GDAL_DLL_URL_HASH cc5f45081ec0d0a7604816fabf5f2588)
+
+    ExternalProject_Add(${proj}_BIN
+        PREFIX ${proj}/_BIN
+        URL ${GDAL_DLL_URL}
+        URL_MD5 ${GDAL_DLL_URL_HASH}
+        SOURCE_DIR ${GDAL_SB_SRC}
+        CONFIGURE_COMMAND ""
+        BUILD_COMMAND ""
+        INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${GDAL_SB_SRC} ${CMAKE_INSTALL_PREFIX}
+     )
+
+    ExternalProject_Add(${proj}
+        PREFIX ${proj}
+        URL ${GDAL_LIBS_URL}
+        URL_MD5 ${GDAL_LIBS_URL_HASH}
+        SOURCE_DIR ${GDAL_SB_SRC}
+        DEPENDS ${proj}_BIN
+        CONFIGURE_COMMAND ""
+        BUILD_COMMAND ""
+        INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory  ${GDAL_SB_SRC} ${CMAKE_INSTALL_PREFIX}
+    )
+
   endif()

+  list(APPEND OTB_DEPS ${proj})
+  message(STATUS "  Using GDAL SuperBuild version")

-  message(STATUS "  Using GDAL SuperBuild version")
+
 endif()


Revise FindOptiTrack CMake file

Revise FindOptiTrack CMake file

--- CMake/FindOptiTrack.cmake
+++ CMake/FindOptiTrack.cmake
@@ -13,7 +13,7 @@
 # Attempt to define OPTITRACK_INCLUDE_DIR if undefined
 find_path(OPTITRACK_INCLUDE_DIR
 	NAMES cameralibrary.h linuxtrack.h
-	PATHS "$ENV{NP_CAMERASDK}" "/opt/linuxtrack/include"
+	PATHS "$ENV{NP_CAMERASDK}" "/opt/linuxtrack"
 	PATH_SUFFIXES "include"
 	NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
 )


Fixed SOFA OpenGL stub for Ubuntu 12.04.

--- CMakeExternals/SOFA.cmake
+++ CMakeExternals/SOFA.cmake
@@ -169,7 +169,7 @@
   endif()

   set(file "sofa-patch-1.0-rc1.zip")
-  set(md5 "25e078187ce57b96357f4d713856a195")
+  set(md5 "b6c112c94dbca92ca5bec894e9bfa18e")

   write_downloadfile_script(
     "${stamp_dir}/download-patch.cmake"


Enable CUDA builds with intel compiler

Enable CUDA builds with intel compiler

--- CMake_build_options.cmake
+++ CMake_build_options.cmake
@@ -31,11 +31,6 @@
 else (CUDA_FOUND)
 option(ENABLE_CUDA "Enable the compilation of the CUDA GPU code" off)
 endif (CUDA_FOUND)
-
-# disable CUDA if the intel compiler is detected
-if (CMAKE_CXX_COMPILER MATCHES "icpc")
-    set(ENABLE_CUDA OFF CACHE BOOL "Forced OFF by the use of the intel c++ compiler" FORCE)
-endif (CMAKE_CXX_COMPILER MATCHES "icpc")

 if (ENABLE_CUDA)
     # optional ocelot emulation mode (not tested any more)


[cmake] fixed trouble introduced by 9b42c929a665216ff0734ad586a0f64f3e164d6e

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -84,10 +84,10 @@
 		SET( LIBNAME libdune${MODULE}.a )
 		FILE( GLOB_RECURSE ${MODULE}_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/../dune-${MODULE}/dune/*.hh" )
 		LIST( APPEND DUNE_HEADERS ${${MODULE}_HEADER} )
-		LIST( APPEND DUNE_LIBS ${${MODULE}_FOUND} )
 		find_library( ${MODULE}_FOUND ${LIBNAME} PATHS ${${MODULE}_LIBDIR})
 		if ( ${MODULE}_FOUND )
 			string(TOUPPER ${MODULE} UPMODULE )
+		  LIST( APPEND DUNE_LIBS ${${MODULE}_FOUND} )
 			ADD_DEFINITIONS( -DHAVE_DUNE_${UPMODULE} )
 		else()
 			MESSAGE(STATUS "did not find library ${LIBNAME}: did not add dune-${MODULE}")


Fix DevIL find package call

Fix DevIL find package call

Add the headers path so it matches the expected called macros.
This is also in line with how every such call is done.

--- cmake/FindDevIL.cmake
+++ cmake/FindDevIL.cmake
@@ -24,7 +24,7 @@
 endif()

 cegui_find_package_handle_standard_args(IL IL_LIB IL_H_PATH)
-cegui_find_package_handle_standard_args(ILU ILU_LIB)
+cegui_find_package_handle_standard_args(ILU ILU_LIB IL_H_PATH)

 # set up output vars
 if (IL_FOUND AND ILU_FOUND)


Added missing search path

Added missing search path

--- cmake/FindMySQL.cmake
+++ cmake/FindMySQL.cmake
@@ -40,6 +40,7 @@
   /usr/local/mysql/include
   /usr/local/mysql/include/mysql
   $ENV{ProgramFiles}/MySQL/*/include
+  $ENV{PROGRAMFILES(x86)}/MySQL/*/include"
   $ENV{SystemDrive}/MySQL/*/include)

 #----------------- FIND MYSQL_LIB_DIR -------------------
@@ -64,6 +65,8 @@
     $ENV{MYSQL_DIR}/client/${libsuffixBuild}
     $ENV{MYSQL_DIR}/libmysql/${libsuffixBuild}
     $ENV{ProgramFiles}/MySQL/*/lib/${libsuffixDist}
+#    "$ENV{PROGRAMFILES(x86)}/MySQL/*/lib"
+    "$ENV{PROGRAMFILES(x86)}/MySQL/*/lib/${libsuffixDist}"
     $ENV{SystemDrive}/MySQL/*/lib/${libsuffixDist})
 ELSE (WIN32)
   FIND_LIBRARY(MYSQL_LIB NAMES mysqlclient_r


Update Findaruco.cmake

Update Findaruco.cmake

Warning message was mistakenly changed by an error message.

--- cmake/Findaruco.cmake
+++ cmake/Findaruco.cmake
@@ -19,4 +19,4 @@
 #      - aruco_VERSION_PATCH : Patch version part of VERSION. Example: "0"
 #
 # ===================================================================================
-message(FATAL_ERROR "Error: Replace the file rgbd_rtk/cmake/Findaruco.cmake by the one generated by the compilation of ARUCO in your machine.")+message(WARNING "Aruco is required for the SLAM module. To find Aruco, replace the file rgbd_rtk/cmake/Findaruco.cmake by the one generated after compiling Aruco in your machine.")


Updated license

Updated license

--- cmake/Verilator.cmake
+++ cmake/Verilator.cmake
@@ -17,14 +17,15 @@
 #
 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.

 macro(verilator_add)
     find_path(VERILATOR_INCLUDE verilated.h


Enable ASAN on NetBSD

Enable ASAN on NetBSD

Summary:
This enables also static runtime option.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka, filcab, kcc, fjricci

Reviewed By: vitalybuka

Subscribers: mgorny, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36490

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@310651 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -483,14 +483,13 @@
   set(COMPILER_RT_HAS_INTERCEPTION FALSE)
 endif()

-if (COMPILER_RT_HAS_SANITIZER_COMMON AND ASAN_SUPPORTED_ARCH AND
-    (NOT OS_NAME MATCHES "NetBSD"))
+if (COMPILER_RT_HAS_SANITIZER_COMMON AND ASAN_SUPPORTED_ARCH)
   set(COMPILER_RT_HAS_ASAN TRUE)
 else()
   set(COMPILER_RT_HAS_ASAN FALSE)
 endif()

-if (OS_NAME MATCHES "Linux|FreeBSD|Windows")
+if (OS_NAME MATCHES "Linux|FreeBSD|Windows|NetBSD")
   set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME TRUE)
 else()
   set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME FALSE)


Fix for windows (#36)

Fix for windows (#36)

--- cmake/gcc_stm32.cmake
+++ cmake/gcc_stm32.cmake
@@ -37,14 +37,20 @@
 SET(CMAKE_SYSTEM_NAME Generic)
 SET(CMAKE_SYSTEM_PROCESSOR arm)

-CMAKE_FORCE_C_COMPILER(${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${CMAKE_EXECUTABLE_SUFFIX} GNU)
-CMAKE_FORCE_CXX_COMPILER(${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-g++${CMAKE_EXECUTABLE_SUFFIX} GNU)
-SET(CMAKE_ASM_COMPILER ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${CMAKE_EXECUTABLE_SUFFIX})
+IF (WIN32)
+    SET(TOOL_EXECUTABLE_SUFFIX ".exe")
+ELSE()
+    SET(TOOL_EXECUTABLE_SUFFIX "")
+ENDIF()

-SET(CMAKE_OBJCOPY ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objcopy${CMAKE_EXECUTABLE_SUFFIX} CACHE INTERNAL "objcopy tool")
-SET(CMAKE_OBJDUMP ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objdump${CMAKE_EXECUTABLE_SUFFIX} CACHE INTERNAL "objdump tool")
-SET(CMAKE_SIZE ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-size${CMAKE_EXECUTABLE_SUFFIX} CACHE INTERNAL "size tool")
-SET(CMAKE_DEBUGER ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gdb${CMAKE_EXECUTABLE_SUFFIX} CACHE INTERNAL "debuger")
+CMAKE_FORCE_C_COMPILER(${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${TOOL_EXECUTABLE_SUFFIX} GNU)
+CMAKE_FORCE_CXX_COMPILER(${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-g++${TOOL_EXECUTABLE_SUFFIX} GNU)
+SET(CMAKE_ASM_COMPILER ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gcc${TOOL_EXECUTABLE_SUFFIX})
+
+SET(CMAKE_OBJCOPY ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objcopy${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "objcopy tool")
+SET(CMAKE_OBJDUMP ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-objdump${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "objdump tool")
+SET(CMAKE_SIZE ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-size${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "size tool")
+SET(CMAKE_DEBUGER ${TOOLCHAIN_BIN_DIR}/${TARGET_TRIPLET}-gdb${TOOL_EXECUTABLE_SUFFIX} CACHE INTERNAL "debuger")

 SET(CMAKE_C_FLAGS_DEBUG "-Og -g" CACHE INTERNAL "c compiler flags debug")
 SET(CMAKE_CXX_FLAGS_DEBUG "-Og -g" CACHE INTERNAL "cxx compiler flags debug")


Because ENABLE_d=ON is known to interfere with wxwidgets linking on
Windows (for unknown reasons) turn it OFF by default on that platform.

svn path=/trunk/; revision=13095

--- cmake/modules/d.cmake
+++ cmake/modules/d.cmake
@@ -24,6 +24,11 @@
 # Options to enable D bindings
 if(DEFAULT_NO_BINDINGS)
   option(ENABLE_d "Enable D bindings" OFF)
+elseif(WIN32_AND_NOT_CYGWIN)
+  option(ENABLE_d "Enable D bindings" OFF)
+  if(ENABLE_d)
+    message(STATUS "WARNING: setting the -DENABLE_d=ON option is considered to be experimental on Windows because it has been found to interfere with wxwidgets linking for unknown reasons")
+  endif(ENABLE_d)
 else(DEFAULT_NO_BINDINGS)
   option(ENABLE_d "Enable D bindings" ON)
 endif(DEFAULT_NO_BINDINGS)


customize nsis package name

customize nsis package name

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@3111 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -36,7 +36,15 @@
     set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES32")
     set(win_system_name win32)
   endif(CMAKE_CL_64)
-  set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-${win_system_name}")
+  set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}")
+  if(BUILD_all_in_one_installer)
+    set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-AllInOne")
+  endif(BUILD_all_in_one_installer)
+  if(MSVC10)
+    set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2010-${win_system_name}")
+  else(MSVC10)
+    set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-${win_system_name}")
+  endif(MSVC10)
   # force CPACK_PACKAGE_INSTALL_REGISTRY_KEY because of a known limitation in cmake/cpack to be fixed in next releases
   # http://public.kitware.com/Bug/view.php?id=9094
   # This is to allow a 32bit and a 64bit of PCL to get installed on one system


Remove wrapping projects dependency on SimpleITK binary directory.

Just use all the dependencies for the swig targets when in the binary
directory. When the wrapping projects are built separately just use
one header file.

Change-Id: I919b109aad1d3eb23cd403b710f81864815a980d

--- CMake/sitkProjectLanguageCommon.cmake
+++ CMake/sitkProjectLanguageCommon.cmake
@@ -7,9 +7,6 @@

   set( SimpleITK_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../.." )
   list(APPEND CMAKE_MODULE_PATH "${SimpleITK_SOURCE_DIR}/CMake")
-
-  #HACK - we should not be using anything from this directory
-  set( SimpleITK_BINARY_DIR ${SimpleITK_DIR} )

   find_package(SimpleITK REQUIRED)
   include(${SimpleITK_USE_FILE})
@@ -47,16 +44,25 @@
 set(SIMPLEITK_WRAPPING_COMMON_DIR
   ${SimpleITK_SOURCE_DIR}/Wrapping/Common)

-file(GLOB SWIG_EXTRA_DEPS
-  "${SimpleITK_SOURCE_DIR}/Code/Common/include/*.h"
-  "${SimpleITK_SOURCE_DIR}/Code/Registration/include/*.h"
-  "${SimpleITK_SOURCE_DIR}/Code/IO/include/*.h")
+if ( CMAKE_PROJECT_NAME STREQUAL "SimpleITK" )
+  file(GLOB SWIG_EXTRA_DEPS
+    "${SimpleITK_SOURCE_DIR}/Code/Common/include/*.h"
+    "${SimpleITK_SOURCE_DIR}/Code/Registration/include/*.h"
+    "${SimpleITK_SOURCE_DIR}/Code/IO/include/*.h")
+  list( APPEND SWIG_EXTRA_DEPS
+    "${SimpleITK_BINARY_DIR}/Code/BasicFilters/include/SimpleITKBasicFiltersGeneratedHeaders.h"
+    ${SimpleITKBasicFiltersGeneratedHeader} )
+else()
+  find_file( _file
+    NAMES SimpleITKBasicFiltersGeneratedHeaders.h
+    PATHS ${SimpleITK_INCLUDE_DIRS}
+    NO_DEFAULT_PATH )
+  list( APPEND SWIG_EXTRA_DEPS ${_file} )
+endif()

 # make a manual list of dependencies for the Swig.i files
-list( APPEND SWIG_EXTRA_DEPS "${SimpleITK_BINARY_DIR}/Code/BasicFilters/include/SimpleITKBasicFiltersGeneratedHeaders.i"
-  "${SimpleITK_BINARY_DIR}/Code/BasicFilters/include/SimpleITKBasicFiltersGeneratedHeaders.h"
+list( APPEND SWIG_EXTRA_DEPS
   "${SIMPLEITK_WRAPPING_COMMON_DIR}/SimpleITK_Common.i"
-  ${SimpleITKBasicFiltersGeneratedHeader}
   )

 # check if uint64_t is the same as unsigned long


require hdfgroup.org library version 1.8

--- config/FindHDF5.cmake
+++ config/FindHDF5.cmake
@@ -17,7 +17,7 @@
 	ENDIF()

 	SET(HDF5_VERSION_MAJOR 1)
-	SET(HDF5_VERSION_MINOR 6)
+	SET(HDF5_VERSION_MINOR 8)

 	set(HDF5_SUFFICIENT_VERSION FALSE)
 	TRY_COMPILE(HDF5_SUFFICIENT_VERSION


COMP: more checks before warning

COMP: more checks before warning

--- CMake/FindOssim.cmake
+++ CMake/FindOssim.cmake
@@ -32,13 +32,20 @@
 if(EXISTS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h")
   file(STRINGS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h" _ossim_image_renderer_h_CONTENTS REGEX "^// \\$Id: ossimImageRenderer\\.h [0-9.]+ ")
   string(REGEX REPLACE ".*ossimImageRenderer\\.h ([0-9.]+) .*" "\\1" _ossim_svn_revision_hint "${_ossim_image_renderer_h_CONTENTS}")
-  if(NOT "${_ossim_svn_revision_hint}" STREQUAL "23537")
-    message(WARNING "The OSSIM version found doesn't correspond to SVN revision 23537 (the recommended revision for OTB)."
-                      "There are known issues with version 1.8.16 (bugs in Sentinel1 "
-                      "calibration) and with official archive 1.8.20-1 (RpcModel returns "
-                      "nans outside the image extent)")
+
+  if("${_ossim_svn_revision_hint}" LESS "23537")
+    message(WARNING "The OSSIM include directory detected by OTB is: '${OSSIM_INCLUDE_DIR}'."
+      "This version does not have support for SENTINEL-1 products."
+      "Opening an image will result in immediate crash!. "
+      "Please consider updating your ossim to latest stable release.(1.8.20-3)")
+  else()
+    if("${_ossim_svn_revision_hint}" LESS "23664")
+      message(WARNING "The OSSIM include directory detected by OTB is '${OSSIM_INCLUDE_DIR}'."
+        "This version has a critical bug inside ossimRpcModel."
+        "When an input point outside image extent is given the model returns 'NaN'."
+        "Please consider updating your ossim to latest stable release.(1.8.20-3)")
+    endif()
   endif()
-  #message(STATUS "OSSIM SVN rev. hint : ${_ossim_svn_revision_hint}")
 else()
   if(NOT Ossim_FIND_QUIETLY)
     message(WARNING "ossimImageRenderer.h not found !")
@@ -55,5 +62,5 @@

 mark_as_advanced( OSSIM_INCLUDE_DIR OSSIM_LIBRARY )

-set(OSSIM_LIBRARIES ${OSSIM_LIBRARY})
+set(OSSIM_LIBRARIES "${OSSIM_LIBRARY};${OPENTHREADS_LIBRARY}")
 set(OSSIM_INCLUDE_DIRS ${OSSIM_INCLUDE_DIR})


don't wrap the main entry point

don't wrap the main entry point

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -58,7 +58,6 @@
     set(CMAKE_MODULE_LINKER_FLAGS_INIT
         "-fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment"
     )
-    set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_MODULE_LINKER_FLAGS_INIT} -Wl,-wrap,main")
     if((NOT DEFINED YOTTA_CFG_GCC_PRINTF_FLOAT) OR (YOTTA_CFG_GCC_PRINTF_FLOAT))
         set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} -Wl,-u,_printf_float")
     endif()


Clean COMMON_QT_SUPPORT_SOURCES variable.

--- CommonQtSupport.cmake
+++ CommonQtSupport.cmake
@@ -11,6 +11,7 @@
 # * COMMON_QT_SUPPORT_SOURCES

 macro(COMMON_QT_SUPPORT NAME)
+  set(COMMON_QT_SUPPORT_SOURCES "")
   if(${NAME}_MOC_HEADERS)
     if(NOT Qt5Core_FOUND)
       message(FATAL_ERROR "Qt5Core not found, needed for MOC of application ${Name}")


cmake: Fail if can't find OpenSSL aes and des headers

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

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -65,23 +65,31 @@
   check_include_files("winsock2.h;ws2tcpip.h" HAVE_WS2TCPIP_H)
 endif (WIN32)

-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/aes.h HAVE_OPENSSL_AES_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/blowfish.h HAVE_OPENSSL_BLOWFISH_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/des.h HAVE_OPENSSL_DES_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/ecdh.h HAVE_OPENSSL_ECDH_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/ec.h HAVE_OPENSSL_EC_H)
-
-set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
-check_include_file(openssl/ecdsa.h HAVE_OPENSSL_ECDSA_H)
+if (OPENSSL_FOUND)
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    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})
+    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})
+    check_include_file(openssl/blowfish.h HAVE_OPENSSL_BLOWFISH_H)
+
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    check_include_file(openssl/ecdh.h HAVE_OPENSSL_ECDH_H)
+
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    check_include_file(openssl/ec.h HAVE_OPENSSL_EC_H)
+
+    set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIRS})
+    check_include_file(openssl/ecdsa.h HAVE_OPENSSL_ECDSA_H)
+endif()

 if (CMAKE_HAVE_PTHREAD_H)
   set(HAVE_PTHREAD_H 1)


correct names for files.cmake added.

correct names for files.cmake added.

--- Core/Code/files.cmake
+++ Core/Code/files.cmake
@@ -64,6 +64,8 @@
   DataManagement/mitkITKImageImport.txx
   DataManagement/mitkImageToItk.h
   DataManagement/mitkImageToItk.txx
+  DataManagement/mitkOldTypeConversions.h
+  DataManagement/mitkTypedefs.h

   Interactions/mitkEventMapperAddOn.h
   Interfaces/mitkIDataNodeReader.h


STYLE: Install tools to ExternalBin when building Extension

--- DTIAtlasBuilder.cmake
+++ DTIAtlasBuilder.cmake
@@ -144,15 +144,23 @@

 if(AtlasWerks_DIR)

-  install(PROGRAMS ${AtlasWerks_DIR}/bin/GreedyAtlas
-    DESTINATION ${INSTALL_RUNTIME_DESTINATION}/../ExternalBin
+  if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
+    install(PROGRAMS ${AtlasWerks_DIR}/bin/GreedyAtlas
+      DESTINATION ${INSTALL_RUNTIME_DESTINATION}/../ExternalBin
+      COMPONENT RUNTIME)
+
+    install(PROGRAMS ${AtlasWerks_DIR}/bin/GreedyWarp
+      DESTINATION ${INSTALL_RUNTIME_DESTINATION}/../ExternalBin
+      COMPONENT RUNTIME)
+  else()
+    install(PROGRAMS ${AtlasWerks_DIR}/bin/GreedyAtlas
+    DESTINATION ${INSTALL_RUNTIME_DESTINATION}
     COMPONENT RUNTIME)

-  install(PROGRAMS ${AtlasWerks_DIR}/bin/GreedyWarp
-    DESTINATION ${INSTALL_RUNTIME_DESTINATION}/../ExternalBin
-    COMPONENT RUNTIME)
-
-
+    install(PROGRAMS ${AtlasWerks_DIR}/bin/GreedyWarp
+      DESTINATION ${INSTALL_RUNTIME_DESTINATION}
+      COMPONENT RUNTIME)
+  endif()
 endif()

 if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )


add cmake guard for mkl regression cookbook

--- cmake/FindMetaExamples.cmake
+++ cmake/FindMetaExamples.cmake
@@ -14,5 +14,9 @@
 		LIST(REMOVE_ITEM META_EXAMPLE_LISTINGS ${CMAKE_SOURCE_DIR}/examples/meta/src/regression/linear_ridge_regression.sg)
 	ENDIF()

+	IF(NOT USE_SVMLIGHT)
+		LIST(REMOVE_ITEM META_EXAMPLE_LISTINGS ${CMAKE_SOURCE_DIR}/examples/meta/src/regression/multiple_kernel_learning.sg)
+	ENDIF()
+
 	SET(META_EXAMPLES ${META_EXAMPLE_LISTINGS} PARENT_SCOPE)
 endfunction()


Reduce warning level on Linux

Reduce warning level on Linux

--- cmake/PlatformLinuxGCC.cmake
+++ cmake/PlatformLinuxGCC.cmake
@@ -35,7 +35,7 @@
     set(EXCEPTION_FLAG "-fno-exceptions")
 endif()

-set(LINUX_COMPILE_FLAGS "-pthread -pipe -fPIC -Wreturn-type -Wall -Wextra -Wfloat-equal -Wshadow -Wcast-align -Wconversion ${EXCEPTION_FLAG}")
+set(LINUX_COMPILE_FLAGS "-pthread -pipe -fPIC -Wreturn-type -Wall -Wcast-align ${EXCEPTION_FLAG}")
 # pthread       -> use pthread library
 # no-rtti       -> disable c++ rtti
 # no-exceptions -> disable exception handling


[OCaml] Install dynamic libraries in 'stubdirs' directory

Install the OCaml dynamic libraries in the 'stubdirs' directory rather
than the llvm subdirectory in order to fix running executables created
by ocamlc. Otherwise, the executables fail to run being unable to locate
the libraries (unless the LLVM directory is explicitly added to
LD_LIBRARY_PATH).

The staging directories are not altered since they work for our
development setup anyway, and installing into two directories would
unnecessarily make the code more complex.

Differential Revision: https://reviews.llvm.org/D35995

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

--- cmake/modules/AddOCaml.cmake
+++ cmake/modules/AddOCaml.cmake
@@ -199,7 +199,7 @@
           PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
                       GROUP_READ GROUP_EXECUTE
                       WORLD_READ WORLD_EXECUTE
-          DESTINATION "${LLVM_OCAML_INSTALL_PATH}/llvm")
+          DESTINATION "${LLVM_OCAML_INSTALL_PATH}/stublibs")

   foreach( install_file ${install_files} ${install_shlibs} )
     get_filename_component(filename "${install_file}" NAME)


[CMake] Fix build when SWIFT_STDLIB_ENABLE_RESILIENCE is off.

*Shatner voice* CMaaaaaaaaaake!

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -335,7 +335,7 @@
     list(APPEND swift_flags
         "-nostdimport" "-parse-stdlib" "-module-name" "Swift")
     if (NOT SWIFT_STDLIB_ENABLE_RESILIENCE)
-      list(append swift_flags "-Xfrontend" "-sil-serialize-all")
+      list(APPEND swift_flags "-Xfrontend" "-sil-serialize-all")
     endif()
   endif()


build: dereference variable for some versions of CMake

CMake quoting is odd and in some versions this would compare the wrong
strings.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1383,7 +1383,7 @@
   # NOTE(compnerd) use the C linker language to invoke `clang` rather than
   # `clang++` as we explicitly link against the C++ runtime.  We were previously
   # actually passing `-nostdlib++` to avoid the C++ runtime linkage.
-  if(SWIFTLIB_SINGLE_SDK STREQUAL ANDROID)
+  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "ANDROID")
     set_property(TARGET "${target}" PROPERTY
       LINKER_LANGUAGE "C")
   else()


Move Windows specific compiler definitions from _add_link_flags to _add_compile_flags

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -125,17 +125,6 @@
       "-B" "${SWIFT_ANDROID_PREBUILT_PATH}/arm-linux-androideabi/bin/")
   endif()

-  if("${CFLAGS_SDK}" STREQUAL "WINDOWS")
-    list(APPEND result "-DLLVM_ON_WIN32")
-    list(APPEND result "-D_CRT_SECURE_NO_WARNINGS")
-    list(APPEND result "-D_CRT_NONSTDC_NO_WARNINGS")
-    # TODO(compnerd) permit building for different families
-    list(APPEND result "-D_CRT_USE_WINAPI_FAMILY_DESKTOP_APP")
-    # TODO(compnerd) handle /MT
-    list(APPEND result "-D_DLL")
-    list(APPEND result "-fms-compatibility-version=1900")
-  endif()
-
   if(IS_DARWIN)
     # Check if there's a specific OS deployment version needed for this invocation
     if("${CFLAGS_SDK}" STREQUAL "OSX")
@@ -231,6 +220,17 @@
       list(APPEND result -Xclang;--dependent-lib=msvcrtd)
     endif()
     list(APPEND result -fno-pic)
+  endif()
+
+  if("${CFLAGS_SDK}" STREQUAL "WINDOWS")
+    list(APPEND result "-DLLVM_ON_WIN32")
+    list(APPEND result "-D_CRT_SECURE_NO_WARNINGS")
+    list(APPEND result "-D_CRT_NONSTDC_NO_WARNINGS")
+    # TODO(compnerd) permit building for different families
+    list(APPEND result "-D_CRT_USE_WINAPI_FAMILY_DESKTOP_APP")
+    # TODO(compnerd) handle /MT
+    list(APPEND result "-D_DLL")
+    list(APPEND result "-fms-compatibility-version=1900")
   endif()

   if(CFLAGS_ENABLE_ASSERTIONS)


[CMake] Bug 23468 - LLVM_OPTIMIZED_TABLEGEN does not work with Visual Studio

Summary: Multi-configuration builds put their binaries into ${CMAKE_BINARY_DIR}/Release/bin/. The table-gen cross-compilation support needs to take that into account.

Reviewers: yaron.keren

Reviewed By: yaron.keren

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10102

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -94,7 +94,11 @@

   if(LLVM_USE_HOST_TOOLS)
     if( ${${project}_TABLEGEN} STREQUAL "${target}" )
-      set(${project}_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/bin/${target}")
+      if (NOT CMAKE_CONFIGURATION_TYPES)
+        set(${project}_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/bin/${target}")
+      else()
+        set(${project}_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/Release/bin/${target}")
+      endif()
       set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE)

       add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE}


cmake: qi_build_cmake: fix install_prefix

--- cmake/qibuild/external.cmake
+++ cmake/qibuild/external.cmake
@@ -58,14 +58,16 @@
     list(APPEND patchs_cmd "patch" "-p1" "<" "${p}" ";")
   endforeach()

+  #/ is not a valid install_prefix in most place
+  #so we use /sdk and set DESTDIR to ..
   ExternalProject_Add(${name}
   URL "${url}"
   URL_MD5 "${ARGS_MD5}"
   PREFIX "${name}"
   BUILD_IN_SOURCE 0
   PATCH_COMMAND "${patchs_cmd}"
-  CMAKE_ARGS "${ARGS_CMAKE_ARGS}"
-  INSTALL_COMMAND   "DESTDIR=${QI_SDK_DIR}" make install ${ARGS_INSTALL_OPTIONS}
+  CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=/sdk ${ARGS_CMAKE_ARGS}"
+  INSTALL_COMMAND   "DESTDIR=${QI_SDK_DIR}/../" make install ${ARGS_INSTALL_OPTIONS}
   )

   #generate install rules for the project


fix perms

fix perms

--- cmaki.cmake
+++ cmaki.cmake
@@ -25,39 +25,39 @@

 function(cmaki_install_file FROM)
     foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
-		INSTALL(FILES ${FROM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE} CONFIGURATIONS ${BUILD_TYPE} USE_SOURCE_PERMISSIONS)
+		INSTALL(FILES ${FROM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE} CONFIGURATIONS ${BUILD_TYPE})
     endforeach()
 endfunction()

 function(cmaki_install_file_into FROM TO)
     foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
-		INSTALL(FILES ${FROM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}/${TO} CONFIGURATIONS ${BUILD_TYPE} USE_SOURCE_PERMISSIONS)
+		INSTALL(FILES ${FROM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}/${TO} CONFIGURATIONS ${BUILD_TYPE})
     endforeach()
 endfunction()

 function(cmaki_install_file_and_rename FROM NEWNAME)
     foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
-		INSTALL(FILES ${FROM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE} CONFIGURATIONS ${BUILD_TYPE} RENAME ${NEWNAME} USE_SOURCE_PERMISSIONS)
+		INSTALL(FILES ${FROM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE} CONFIGURATIONS ${BUILD_TYPE} RENAME ${NEWNAME})
     endforeach()
 endfunction()

 function(cmaki_install_file_into_and_rename FROM TO NEWNAME)
     foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
-		INSTALL(FILES ${FROM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}/${TO} CONFIGURATIONS ${BUILD_TYPE} RENAME ${NEWNAME} USE_SOURCE_PERMISSIONS)
+		INSTALL(FILES ${FROM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}/${TO} CONFIGURATIONS ${BUILD_TYPE} RENAME ${NEWNAME})
     endforeach()
 endfunction()

 function(cmaki_install_files FROM)
     foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
         FILE(GLOB files ${FROM})
-		INSTALL(FILES ${files} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE} CONFIGURATIONS ${BUILD_TYPE} USE_SOURCE_PERMISSIONS)
+		INSTALL(FILES ${files} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE} CONFIGURATIONS ${BUILD_TYPE})
     endforeach()
 endfunction()

 function(cmaki_install_files_into FROM TO)
     foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
         FILE(GLOB files ${FROM})
-		INSTALL(FILES ${files} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}/${TO} CONFIGURATIONS ${BUILD_TYPE} USE_SOURCE_PERMISSIONS)
+		INSTALL(FILES ${files} DESTINATION ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}/${TO} CONFIGURATIONS ${BUILD_TYPE})
     endforeach()
 endfunction()

@@ -74,7 +74,7 @@
           ENDIF()
        ENDIF()
     endforeach()
-	INSTALL(FILES ${FILES_TO_DEPLOY} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE} USE_SOURCE_PERMISSIONS)
+	INSTALL(FILES ${FILES_TO_DEPLOY} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE})
 	INSTALL(DIRECTORY ${DIRS_TO_DEPLOY} DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE} USE_SOURCE_PERMISSIONS)
 endmacro()

@@ -158,7 +158,7 @@
 	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
 		INSTALL(    TARGETS ${_EXECUTABLE_NAME}
 					DESTINATION ${BUILD_TYPE}
-					CONFIGURATIONS ${BUILD_TYPE} USE_SOURCE_PERMISSIONS)
+					CONFIGURATIONS ${BUILD_TYPE})
 	endforeach()
 	generate_clang()

@@ -185,7 +185,7 @@
 	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
 		INSTALL(	TARGETS ${_LIBRARY_NAME}
 					DESTINATION ${BUILD_TYPE}
-					CONFIGURATIONS ${BUILD_TYPE} USE_SOURCE_PERMISSIONS)
+					CONFIGURATIONS ${BUILD_TYPE})
 	endforeach()
 	generate_clang()

@@ -210,7 +210,7 @@
 	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
 		INSTALL(    TARGETS ${_TEST_NAME}
 					DESTINATION ${BUILD_TYPE}
-					CONFIGURATIONS ${BUILD_TYPE} USE_SOURCE_PERMISSIONS)
+					CONFIGURATIONS ${BUILD_TYPE})
 	endforeach()

 	IF(WIN32)


forgot apf include dir hack

forgot apf include dir hack

--- apf/pkg_tribits.cmake
+++ apf/pkg_tribits.cmake
@@ -1,7 +1,10 @@
 tribits_package(SCORECapf)

 set(APF_INCLUDE_DIRS
-  ${CMAKE_CURRENT_SOURCE_DIR})
+    ${CMAKE_CURRENT_SOURCE_DIR}
+    ${CMAKE_CURRENT_SOURCE_DIR}/../mth
+    ${CMAKE_CURRENT_SOURCE_DIR}/../can
+    ${CMAKE_CURRENT_SOURCE_DIR}/../lion)

 #Sources & Headers
 set(APF_SOURCES


Intel compiler support for linux (#288)

Intel compiler support for linux (#288)

* Intel compiler support for linux

Implemented changes proposed by issue #166

* Update conan.cmake

Co-authored-by: Carlos Zoido <2accafae6a9d696f958aa2dba27077cd7a20a336@gmail.com>

--- conan.cmake
+++ conan.cmake
@@ -138,6 +138,17 @@
             set(COMPILER_VERSION ${MAJOR})
         endif()
         set(_CONAN_SETTING_COMPILER gcc)
+        set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION})
+        if (USING_CXX)
+            conan_cmake_detect_unix_libcxx(_LIBCXX)
+            set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
+        endif ()
+    elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Intel)
+        string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
+        list(GET VERSION_LIST 0 MAJOR)
+        list(GET VERSION_LIST 1 MINOR)
+        set(COMPILER_VERSION ${MAJOR}.${MINOR})
+        set(_CONAN_SETTING_COMPILER intel)
         set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION})
         if (USING_CXX)
             conan_cmake_detect_unix_libcxx(_LIBCXX)


constant consistency creates continuums

constant consistency creates continuums

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -204,8 +204,8 @@
 #option(DEBUG_SPEW "more debug" OFF)
 set(TORQUE_NO_DSO_GENERATION ON)

-option(TORQUE_UseZenity "use the Zenity backend for NFD" OFF)
-mark_as_advanced(TORQUE_UseZenity)
+option(TORQUE_USE_ZENITY "use the Zenity backend for NFD" OFF)
+mark_as_advanced(TORQUE_USE_ZENITY)

 if(WIN32)
     # warning C4800: 'XXX' : forcing value to bool 'true' or 'false' (performance warning)
@@ -463,7 +463,7 @@
        # Add other flags to the compiler
        add_definitions(${GTK3_CFLAGS_OTHER})

-	   if(TORQUE_UseZenity)
+	   if(TORQUE_USE_ZENITY)
 			set(BLACKLIST "nfd_win.cpp" "nfd_cocoa.m" "nfd_gtk.c" )
 	   else()
 			set(BLACKLIST "nfd_win.cpp" "nfd_cocoa.m" "simple_exec.h" "nfd_zenity.c")


ENH: superbuild: unify boost version

ENH: superbuild: unify boost version

--- SuperBuild/CMake/External_boost.cmake
+++ SuperBuild/CMake/External_boost.cmake
@@ -33,8 +33,10 @@
     if(SUPERBUILD_BOOST_HEADER_ONLY)
       ExternalProject_Add(${proj}
         PREFIX ${proj}
-        URL "http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download"
-        URL_MD5 efbfbff5a85a9330951f243d0a46e4b9
+        #URL "http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download"
+        #URL_MD5 efbfbff5a85a9330951f243d0a46e4b9
+        URL "http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2/download"
+        URL_MD5 52dd00be775e689f55a987baebccc462
         BINARY_DIR ${BOOST_SB_BUILD_DIR}
         INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
@@ -49,8 +51,10 @@
     else()
       ExternalProject_Add(${proj}
         PREFIX ${proj}
-        URL "http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download"
-        URL_MD5 efbfbff5a85a9330951f243d0a46e4b9
+        #URL "http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download"
+        #URL_MD5 efbfbff5a85a9330951f243d0a46e4b9
+        URL "http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2/download"
+        URL_MD5 52dd00be775e689f55a987baebccc462
         BINARY_DIR ${BOOST_SB_BUILD_DIR}
         INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


Fixed compilation of dependencies on OSX

--- deps/deps-macos.cmake
+++ deps/deps-macos.cmake
@@ -94,7 +94,7 @@
 #    URL "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.tar.bz2"
 #    URL_HASH SHA256=4cb8d23d70f9261debf7d6cfeca667fc0a7d2b6565adb8f1c484f9b674f1f27a
     BUILD_IN_SOURCE 1
-    PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/wxwidgets-pngprefix.h" src/png/pngprefix.h
+#    PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/wxwidgets-pngprefix.h" src/png/pngprefix.h
     CONFIGURE_COMMAND env "CXXFLAGS=${DEP_WERRORS_SDK}" "CFLAGS=${DEP_WERRORS_SDK}" ./configure
         "--prefix=${DESTDIR}/usr/local"
         --disable-shared


First proposal for MSVC compiler options

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -59,6 +59,53 @@
 #

 set(DEFAULT_COMPILE_OPTIONS)
+
+if (PLATFORM_WINDOWS AND MSVC)
+    set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
+        /MP # -> build with multiple processes
+        /nologo       # -> no compiler banner
+        /Zc:wchar_t   # -> treat wchar_t as built-in type: yes
+        /Zc:forScope  # -> force conformance in for loop scope: Yes
+        /Gm           # -> enable minimal rebuild
+        /fp:precise   # -> floating point model: precise
+        /arch:SSE2    # -> enable enhanced instruction set: streaming simd extensions 2
+
+        # /W4           # -> warning level 4
+        /Wall         # -> enable all warnings
+
+      # Disable the following warnings
+      # /wd4273       # -> Two definitions in a file differ in their use of dllimport.
+      # /wd4100       # -> 'identifier' : unreferenced formal parameter
+      # /wd4127       # -> conditional expression is constant
+      # /wd4251       # -> 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
+      # /wd4267       # -> 'var' : conversion from 'size_t' to 'type', possible loss of data
+
+        /vmg          # ->  to declare a pointer to a member of a class before defining the class. This need can arise if you define members in two different classes that reference each other.
+
+        $<$<CONFIG:Debug>:
+            /RTC1         # -> Runtime error checks
+            /RTCc
+            /Od           # -> Optimization: none
+            /GS           # -> buffer security check
+            /GF-          # -> disable string pooling
+            /Zi           # -> debug information format: program database
+        >
+        $<$<CONFIG:Release>:
+            /Ox           # -> optimization: full optimization
+            /Ob2          # -> inline function expansion: any suitable
+            /Oi           # -> enable intrinsic functions: yes
+            /Ot           # -> favor size or speed: favor fast code
+            /Oy           # -> omit frame pointers: yes
+          # /Og           # -> use global optimization
+          # /Gw           # -> whole program global optimization
+
+            /GS-          # -> buffer security check: no
+            /GL           # -> whole program optimization: enable link-time code generation
+            /GF           # -> enable string pooling
+            /GR           # -> runtime type information
+        >
+    )
+endif ()

 if (PLATFORM_LINUX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # GCC 4.9 and 5.1
     set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}


cmake/LinuxPackaging.cmake: Fix apt dependencies list.

Otherwise .deb is not installable.

Signed-off-by: Alexandra Trifan <951af57c14d42c73475635752bd213fd996792b2@analog.com>

--- cmake/LinuxPackaging.cmake
+++ cmake/LinuxPackaging.cmake
@@ -115,7 +115,7 @@
 		${CPACK_DEBIAN_PACKAGE_DEPENDS})
 else()
 	# assume everything is turned on, and running on a modern OS
-	set(CPACK_DEBIAN_PACKAGE_DEPENDS "libaio (>= 0.3.109), libavahi-client (>= 0.6.31), libavahi-common (>= 0.6.31), libc6 (>= 2.19), libusb-1.0-0 (>= 2:1.0.17), libxml2 (>= 2.9.1), libserialport0 (>=0.1.1)")
+	set(CPACK_DEBIAN_PACKAGE_DEPENDS "libaio1 (>= 0.3.109), libavahi-client3 (>= 0.6.31), libavahi-common3 (>= 0.6.31), libavahi-common-data (>= 0.6.31), libc6 (>= 2.19), libusb-1.0-0 (>= 2:1.0.17), libxml2 (>= 2.9.1), libserialport0 (>=0.1.1)")
 	message(STATUS "Using default dependencies for packaging")
 endif()


Add test to check

Add test to check

--- cmake/MyPackageCheck.cmake
+++ cmake/MyPackageCheck.cmake
@@ -37,6 +37,7 @@
     ADD_TEST (NAME ${_name}
       COMMAND ${CMAKE_COMMAND} -E env "PATH=${_test_path}" ${_name}
       WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH})
+    ADD_DEPENDENCIES(check ${_name})
   ENDFOREACH ()

 ENDMACRO()


pod tweak

pod tweak

--- cmake/MyPackageStart.cmake
+++ cmake/MyPackageStart.cmake
@@ -151,9 +151,9 @@
   #
   # We consider that if there is a README.pod, then it is a candidate for installation
   #
-  IF (EXISTS README.pod)
+  IF (EXISTS "${PROJECT_SOURCE_DIR}/README.pod")
     STRING (TOUPPER ${PROJECT_NAME} _PROJECTNAME)
-    MYPACKAGEMAN(README.pod ${_PROJECTNAME} "3" "${${PROJECT_NAME}}_VERSION")
+    MYPACKAGEMAN("${PROJECT_SOURCE_DIR}/README.pod" ${_PROJECTNAME} "3" "${${PROJECT_NAME}}_VERSION")
   ENDIF ()
   #
   # Execute common tasks


Add options for x86_64

Add options for x86_64

--- cmake/OptimalOptions.cmake
+++ cmake/OptimalOptions.cmake
@@ -14,6 +14,11 @@
 		#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=pentium4")
 	ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "i686")

+	IF(NV_SYSTEM_PROCESSOR STREQUAL "x86_64")
+		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=athlon64")
+		#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=athlon64 -msse3")
+	ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "x86_64")
+
 	IF(NV_SYSTEM_PROCESSOR STREQUAL "powerpc")
 		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=powerpc -maltivec -mabi=altivec -mpowerpc-gfxopt")


cmake: XercesIntTypes: Correct signed types and variable names

git-svn-id: 3ec853389310512053d525963cab269c063bb453@1799572 13f79535-47bb-0310-9956-ffa450edef68

--- cmake/XercesIntTypes.cmake
+++ cmake/XercesIntTypes.cmake
@@ -70,13 +70,13 @@
 endif()

 # Check type sizes
-check_type_size("short"              SIZEOF_SHORT)
+check_type_size("signed short"       SIZEOF_SHORT)
 check_type_size("unsigned short"     SIZEOF_UNSIGNED_SHORT)
-check_type_size("int"                SIZEOF_INT)
+check_type_size("signed int"         SIZEOF_INT)
 check_type_size("unsigned int"       SIZEOF_UNSIGNED_INT)
-check_type_size("long"               SIZEOF_LONG)
+check_type_size("signed long"        SIZEOF_LONG)
 check_type_size("unsigned long"      SIZEOF_UNSIGNED_LONG)
-check_type_size("long long"          SIZEOF_LONG_LONG)
+check_type_size("signed long long"   SIZEOF_LONG_LONG)
 check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
 check_type_size("__int64"            SIZEOF___INT64)
 check_type_size("unsigned __int64"   SIZEOF_UNSIGNED__INT64)
@@ -100,7 +100,7 @@
   set(XERCES_U64BIT_INT "uint64_t")
 else()
   # Fallback to basic language types
-  if(SIZEOF_SIGNED_SHORT EQUAL 2)
+  if(SIZEOF_SHORT EQUAL 2)
     set(XERCES_S16BIT_INT "signed short")
   elseif(SIZEOF_INT EQUAL 2)
     set(XERCES_S16BIT_INT "int")
@@ -116,9 +116,9 @@
     message(FATAL_ERROR "Couldn't find an unsigned 16-bit type")
   endif()

-  if(SIZEOF_SIGNED_INT EQUAL 4)
+  if(SIZEOF_INT EQUAL 4)
     set(XERCES_S32BIT_INT "signed int")
-  elseif(SIZEOF_SIGNED_LONG EQUAL 4)
+  elseif(SIZEOF_LONG EQUAL 4)
     set(XERCES_S32BIT_INT "signed long")
   else()
     message(FATAL_ERROR "Couldn't find a signed 32-bit type")
@@ -133,11 +133,11 @@
   endif()

   if(SIZEOF_INT EQUAL 8)
-    set(XERCES_S64BIT_INT "int")
+    set(XERCES_S64BIT_INT "signed int")
   elseif(SIZEOF_LONG EQUAL 8)
-    set(XERCES_S64BIT_INT "long")
+    set(XERCES_S64BIT_INT "signed long")
   elseif(SIZEOF_LONG_LONG EQUAL 8)
-    set(XERCES_S64BIT_INT "long long")
+    set(XERCES_S64BIT_INT "signed long long")
   elseif(SIZEOF___INT64 EQUAL 8)
     set(XERCES_S64BIT_INT "__int64")
   else()


Bump zlib and curl versions on Android fallback build

--- cmake/build_external.cmake
+++ cmake/build_external.cmake
@@ -25,8 +25,8 @@
         #likely, some of the things here are unnecessary
         ExternalProject_Add(ZLIB
             SOURCE_DIR ${ZLIB_SOURCE_DIR}
-            URL http://zlib.net/zlib-1.2.8.tar.gz
-            URL_HASH "SHA256=36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d"
+            URL http://zlib.net/zlib-1.2.10.tar.gz
+            URL_HASH "SHA256=8d7e9f698ce48787b6e1c67e6bff79e487303e66077e25cb9784ac8835978017"
             PATCH_COMMAND ""
             CMAKE_ARGS
             -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
@@ -117,7 +117,7 @@
                 DEPENDS ZLIB OPENSSL
                 SOURCE_DIR ${CURL_SOURCE_DIR}
                 GIT_REPOSITORY https://github.com/bagder/curl.git
-                GIT_TAG 9819cec61b00cc872136ea5faf469627b3b87e69  # 7.48.0
+                GIT_TAG 44b9b4d4f56d6f6de92c89636994c03984e9cd01 # 7.52.1
                 UPDATE_COMMAND ""
                 PATCH_COMMAND ""
                 CMAKE_ARGS


Switch to clDNN version with conformance fix for 3 ONNX models (DenseNet-121, Inception-v2, ResNet-50) (#2982)

--- cmake/external_cldnn.cmake
+++ cmake/external_cldnn.cmake
@@ -22,7 +22,7 @@
 #------------------------------------------------------------------------------

 set(CLDNN_GIT_REPO_URL https://github.com/intel/clDNN.git)
-set(CLDNN_GIT_LABEL d5c22583f9c86dab8b6a60c60be6b2f83348d7fd)
+set(CLDNN_GIT_LABEL a05c9f29c5690a4beb9cd8c9f712cfb4399b2a6d)
 set(BOOST_VERSION 1.64.0)
 set(OUT_DIR ${EXTERNAL_PROJECTS_ROOT}/cldnn/out)


Move openssl-specific cmake subbuild options out, in case we use additional sub-builds.

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -120,7 +120,7 @@
     set(ENV_COMMAND env -i PATH=${firebase_command_line_path} HOME=${firebase_command_line_home} )
   endif()

-  set(CMAKE_SUBBUILD_OPTIONS -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" -DOPENSSL_NO_ASM=TRUE)
+  set(CMAKE_SUBBUILD_OPTIONS -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}")
   message("CMake generator: ${CMAKE_GENERATOR}")
   message("CMake generator platform: ${CMAKE_GENERATOR_PLATFORM}")

@@ -176,7 +176,7 @@

   if(NOT ANDROID AND NOT IOS)
     execute_process(
-      COMMAND ${ENV_COMMAND} cmake ${CMAKE_SUBBUILD_OPTIONS} ../boringssl/src
+      COMMAND ${ENV_COMMAND} cmake -DOPENSSL_NO_ASM=TRUE ${CMAKE_SUBBUILD_OPTIONS} ../boringssl/src
       WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external/src/boringssl-build
       RESULT_VARIABLE boringssl_configure_status
     )


CMake: Also check final compiler/linker setup with full link interface

--- cmake/setup_finalize.cmake
+++ cmake/setup_finalize.cmake
@@ -80,6 +80,29 @@
 ENDFOREACH()

 #
+# Sanity check: Can we compile with the final setup?
+#
+
+FOREACH(build ${DEAL_II_BUILD_TYPES})
+  SET(_cxx_flags_${build} "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}}")
+  SET(_linker_flags_${build} "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}}")
+
+  CHECK_COMPILER_FLAGS(_cxx_flags_${build} _linker_flags_${build}
+    DEAL_II_HAVE_USABLE_FLAGS_${build}
+    )
+
+  IF(NOT DEAL_II_HAVE_USABLE_FLAGS_${build})
+    MESSAGE(FATAL_ERROR "
+  Configuration error: Cannot compile a test program with the final set of
+  compiler and linker flags:
+    CXX flags (${build}): ${_final_cxx_flags_${build}}
+    LD flags  (${build}): ${_final_linker_flags_${build}}
+  \n\n"
+      )
+  ENDIF()
+ENDFOREACH()
+
+#
 # Clean up deal.IITargets.cmake in the build directory:
 #
 FILE(REMOVE


Slight improvement to our common.cmake file.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -72,12 +72,13 @@
     # Required packages

     IF(APPLE)
-        # Note: the Qt SDK doesn't, by default, make the Qt binaries available
-        #       to the user, hence we must update the user's PATH. However, this
-        #       doesn't work on OS X when using Qt Creator, so we must hard-code
-        #       qmake's path so that CMake can find Qt from within Qt Creator...
-
-        SET(QT_QMAKE_EXECUTABLE /Applications/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake)
+        # On OS X, CMake cannot find Qt, even if the path to its binaries is
+        # set in the user's PATH. So, we manually set QT_QMAKE_EXECUTABLE since,
+        # among other things, CMake checks this variable to find Qt...
+
+        EXECUTE_PROCESS(COMMAND which qmake
+                        OUTPUT_STRIP_TRAILING_WHITESPACE
+                        OUTPUT_VARIABLE QT_QMAKE_EXECUTABLE)
     ENDIF()

     FIND_PACKAGE(Qt4 4.8.1 REQUIRED)


Fix typo, and disable own dtrace proibes on Solaris, really.

--- cmake/dtrace.cmake
+++ cmake/dtrace.cmake
@@ -43,7 +43,7 @@
  IF(DTRACE AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
      AND NOT BUGGY_GCC_NO_DTRACE_MODULES
      AND NOT BUGGY_LINUX_DTRACE
-     AND NOT SYSTEM_NAME MATCHES "SunOS")
+     AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
    SET(ENABLE_DTRACE ON CACHE BOOL "Enable dtrace")
  ENDIF()
  SET(HAVE_DTRACE ${ENABLE_DTRACE})


add python param

add python param

--- cmake/opencv.cmake
+++ cmake/opencv.cmake
@@ -19,6 +19,9 @@
 ow_cache(WITH_GTK_2_X           ON  BOOL    "Use GTK version 2")
 ow_cache(WITH_LIBV4L            ON  BOOL    "Use libv4l for Video 4 Linux support")
 ow_cache(BUILD_opencv_ts        ON  BOOL    "Build opencv_ts")
+ow_cache(BUILD_opencv_python    OFF  BOOL   "Build opencv_python")
+ow_cache(BUILD_opencv_python2   OFF  BOOL   "Build opencv_python2")
+ow_cache(BUILD_opencv_python3   OFF  BOOL   "Build opencv_python3")

 # include opencv
 add_subdirectory(opencv)


replaced NSIS by WiX to generate MSI installer for Windows

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -125,7 +125,7 @@
 # CPack specific stuff
 ##############################################################

-SET(CPACK_PACKAGE_NAME "Embree")
+SET(CPACK_PACKAGE_NAME "Embree Ray Tracing Kernels")
 SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}")
 #SET(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png)
 #SET(CPACK_PACKAGE_RELOCATABLE TRUE)
@@ -161,33 +161,16 @@

   IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
     SET(ARCH x64)
-    SET(PROGRAMFILES "\$PROGRAMFILES64")
 	SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME} x64")
   ELSE()
     SET(ARCH win32)
-    SET(PROGRAMFILES "\$PROGRAMFILES")
 	SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME} Win32")
   ENDIF()

-  # NSIS specific settings
   IF (NOT EMBREE_ZIP_MODE)
-    SET(CPACK_GENERATOR NSIS)
+    SET(CPACK_GENERATOR WIX)
     SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}")
-    SET(CPACK_COMPONENTS_ALL lib devel examples)
-    SET(CPACK_NSIS_INSTALL_ROOT "${PROGRAMFILES}\\\\Intel")
     SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Embree v${EMBREE_VERSION} ${ARCH}")
-    SET(CPACK_NSIS_DISPLAY_NAME "Embree v${EMBREE_VERSION} ${ARCH}")
-    SET(CPACK_NSIS_PACKAGE_NAME "Embree v${EMBREE_VERSION} ${ARCH}")
-    SET(CPACK_NSIS_URL_INFO_ABOUT http://embree.github.io/)
-    #SET(CPACK_NSIS_HELP_LINK http://embree.github.io/downloads.html#windows)
-    SET(CPACK_NSIS_MUI_ICON ${PROJECT_SOURCE_DIR}/scripts/install_windows/icon32.ico)
-    SET(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
-	#SET(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS ${CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS} "\n CreateDirectory \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\"")
-	#SET(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS ${CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS} "\n CreateDirectory \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\documentation\\\"")
-	#SET(CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS ${CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS} "\n CreateDirectory \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\tutorials\\\" \n")
-	#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS  ${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS} "\n ${UNINSTALL_LIST}\n RMDir \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\documentation\\\"")
-	#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS  ${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS} "\n ${UNINSTALL_LIST}\n RMDir \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\tutorials\\\"")
-	#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS  ${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS} "\n ${UNINSTALL_LIST}\n RMDir \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\"\n")
     IF (EMBREE_TESTING_PACKAGE)
       ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/package_win.bat ${CPACK_PACKAGE_FILE_NAME}.exe ${CMAKE_BUILD_TYPE})
     ENDIF()
@@ -229,7 +212,6 @@

 # Linux specific settings
 ELSE()
-

   IF (NOT EMBREE_ZIP_MODE)


Improved finding of doc/test/example folders when removing 'non-source'

--- src/cmake/boost-download.cmake
+++ src/cmake/boost-download.cmake
@@ -107,14 +107,13 @@

     message("Removing non-source files from all libraries, including docs, examples & tests.")

-    file(GLOB NON_SOURCE_DIRS
-        ABSOLUTE "${args_BOOST_DIR}/"
-            "${args_BOOST_DIR}/libs/*/doc/"
-            "${args_BOOST_DIR}/libs/*/example/"
-            "${args_BOOST_DIR}/libs/*/test/"
-            "${args_BOOST_DIR}/tools/*/doc/"
-            "${args_BOOST_DIR}/tools/*/example/"
-            "${args_BOOST_DIR}/tools/*/test/"
+    file(GLOB_RECURSE NON_SOURCE_DIRS
+        LIST_DIRECTORIES true
+        "*"
+    )
+    list(FILTER NON_SOURCE_DIRS
+        INCLUDE
+        REGEX "^.*\/(doc|example|test)$"
     )

     foreach(DIR ${NON_SOURCE_DIRS})


Fixes for osname extraction

Fixes for osname extraction

--- cmake/ex_osver.cmake
+++ cmake/ex_osver.cmake
@@ -66,9 +66,16 @@
             #string(REGEX MATCH "^[0-9]+" LSB_RELEASE_OUTPUT_VER ${_TMP_LSB_RELEASE_OUTPUT_VER})
     elseif (EXISTS /etc/os-release)

-            execute_process(COMMAND bash -c "cat /etc/os-release | egrep '^NAME=' | cut -d '\"' -f2"
+            execute_process(COMMAND bash -c "cat /etc/os-release | egrep '^NAME="
                     OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT_OS
                     OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+            # extract the os name by regex
+            if (_TMP_LSB_RELEASE_OUTPUT_OS MATCHES "^NAME=['\"]*(.*)['\"]*")
+                set(_TMP_LSB_RELEASE_OUTPUT_OS ${CMAKE_MATCH_1})
+            else()
+                message(FATAL_ERROR "Failed to extract OS version from /etc/os-release")
+            endif()

             string(TOLOWER
                     ${_TMP_LSB_RELEASE_OUTPUT_OS}


cmake: the dune_executable macro seems unstable still

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -36,15 +36,15 @@
 	ADD_EXECUTABLE(${target} ${sources} ${headers} ${DUNE_HEADERS} )
 	#for some $@#&& reason these targets DO NOT inherit flags added via TARGET_LINK_LIBRARIES nor INCLUDE_DIRECTORIES
 	#so we need some magic to readd them
-	get_target_property(tmp_flags ${target} COMPILE_FLAGS  )
-	if( NOT ${tmp_flags} )
-		set( tmp_flags "" )
-	endif( NOT ${tmp_flags} )
-	LIST(APPEND MY_CXX_FLAGS ${tmp_flags} )
-	foreach(arg ${MY_CXX_FLAGS} )
-		set(bar "${bar} ${arg}")
-	endforeach(arg ${MY_CXX_FLAGS} )
-	set_target_properties( ${target} PROPERTIES COMPILE_FLAGS  ${bar} )
+# 	get_target_property(tmp_flags ${target} COMPILE_FLAGS  )
+# 	if( NOT ${tmp_flags} )
+# 		set( tmp_flags "" )
+# 	endif( NOT ${tmp_flags} )
+# 	LIST(APPEND MY_CXX_FLAGS ${tmp_flags} )
+# 	foreach(arg ${MY_CXX_FLAGS} )
+# 		set(bar "${bar} ${arg}")
+# 	endforeach(arg ${MY_CXX_FLAGS} )
+# 	set_target_properties( ${target} PROPERTIES COMPILE_FLAGS  ${bar} )
 # 	get_target_property(tmp_flags ${target} LINK_FLAGS  )
 # 	if( NOT ${tmp_flags} )
 # 		set( tmp_flags "" )


Fixed mp15xx.ld copying

Fixed mp15xx.ld copying

--- cmake/FindCMSIS.cmake
+++ cmake/FindCMSIS.cmake
@@ -80,7 +80,7 @@
     if(${FAMILY} STREQUAL MP1)
         add_custom_command(OUTPUT "${OUTPUT_LD_FILE}"
             COMMAND ${CMAKE_COMMAND}
-                -E copy ${CMAKE_CURRENT_LIST_DIR}/mp15xx.ld ${OUTPUT_LD_FILE})
+                -E copy ${STM32_CMAKE_DIR}/stm32/mp15xx.ld ${OUTPUT_LD_FILE})
     else()
         add_custom_command(OUTPUT "${OUTPUT_LD_FILE}"
             COMMAND ${CMAKE_COMMAND}


Fix up FindLibUV.cmake

Fix up FindLibUV.cmake

--- cmake/FindLibUV.cmake
+++ cmake/FindLibUV.cmake
@@ -44,28 +44,32 @@
     set(LIBUV_LIBDIR ${LIBUV_EXTERNAL_PREFIX}/lib)
 endif(NOT LIBUV_FOUND AND NOT LIBUV_STATIC_FOUND)

+set(extra_libs ${LIBUV_LIBRARIES})
+list(REMOVE_ITEM extra_libs uv)
+MESSAGE(STATUS ${extra_libs})
+
 if (LIBUV_FOUND)
-    add_library(LibUV SHARED IMPORTED GLOBAL)
+    add_library(uv SHARED IMPORTED GLOBAL)
     set(
         LIBUV_LIBRARY
         "${LIBUV_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}uv${CMAKE_SHARED_LIBRARY_SUFFIX}"
     )
-    set_target_properties(LibUV PROPERTIES
+    set_target_properties(uv PROPERTIES
         INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIRS}"
-        INTERFACE_LINK_LIBRARIES "${LIBUV_LIBRARIES}"
+        INTERFACE_LINK_LIBRARIES "${extra_libs}"
         IMPORTED_LOCATION "${LIBUV_LIBRARY}"
     )
 endif(LIBUV_FOUND)

 if (LIBUV_STATIC_FOUND)
-    add_library(LibUVStatic STATIC IMPORTED GLOBAL)
+    add_library(uvStatic STATIC IMPORTED GLOBAL)
     set(
         LIBUV_STATIC_LIBRARY
         ${LIBUV_STATIC_LIBDIR} "/" ${CMAKE_STATIC_LIBRARY_PREFIX} "uv" ${CMAKE_STATIC_LIBRARY_SUFFIX}
     )
-    set_target_properties(LibUVStatic PROPERTIES
+    set_target_properties(uvStatic PROPERTIES
         INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_STATIC_INCLUDE_DIRS}"
-        INTERFACE_LINK_LIBRARIES "${LIBUV_STATIC_LIBRARIES}"
+        INTERFACE_LINK_LIBRARIES "${extra_libs}"
         IMPORTED_LOCATION "${LIBUV_STATIC_LIBRARY}"
     )
 endif(LIBUV_STATIC_FOUND)


fix bug in mac

fix bug in mac

--- cmake/FindMYSQL.cmake
+++ cmake/FindMYSQL.cmake
@@ -17,7 +17,7 @@
 include(CheckCXXSourceCompiles)

 if(WIN32)
-   find_path(MYSQL_INCLUDE_DIR mysql.h
+   find_path(MYSQL_INCLUDE_DIR mysql/mysql.h
       PATHS
       $ENV{MYSQL_INCLUDE_DIR}
       $ENV{MYSQL_DIR}/include
@@ -26,7 +26,7 @@
       $ENV{ProgramW6432}/MySQL/*/include
    )
 else(WIN32)
-   find_path(MYSQL_INCLUDE_DIR mysql.h
+   find_path(MYSQL_INCLUDE_DIR mysql/mysql.h
       PATHS
       $ENV{MYSQL_INCLUDE_DIR}
       $ENV{MYSQL_DIR}/include
@@ -126,4 +126,4 @@
    message(STATUS "MySQL Embedded not found.")
 endif(MYSQL_INCLUDE_DIR AND MYSQL_EMBEDDED_LIBRARIES AND HAVE_MYSQL_OPT_EMBEDDED_CONNECTION)

-mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES MYSQL_EMBEDDED_LIBRARIES)+mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES MYSQL_EMBEDDED_LIBRARIES)


SWDEV-286739 - VDI needs ROCr 1.6+

SWDEV-286739 - VDI needs ROCr 1.6+

Change-Id: I5774563edf001eed2994e92713630adbfb75c489

--- cmake/ROCclrHSA.cmake
+++ cmake/ROCclrHSA.cmake
@@ -18,7 +18,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.

-find_package(hsa-runtime64 1.3 REQUIRED CONFIG
+find_package(hsa-runtime64 1.6 REQUIRED CONFIG
   PATHS
     /opt/rocm/
   PATH_SUFFIXES


Some required changes to SIPMacros.cmake

--- cmake/SIPMacros.cmake
+++ cmake/SIPMacros.cmake
@@ -108,6 +108,9 @@
     TARGET_LINK_LIBRARIES(${_logical_name} ${EXTRA_LINK_LIBRARIES})
     SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES PREFIX "" OUTPUT_NAME ${_child_module_name})

-    INSTALL(TARGETS ${_logical_name} DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/${_parent_module_path}")
+    IF (WIN32)
+    	SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES SUFFIX pyd)
+    ENDIF()
+#    INSTALL(TARGETS ${_logical_name} DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/${_parent_module_path}")

 ENDMACRO(ADD_SIP_PYTHON_MODULE)


[cmake] replace \\ in auto-discovered path with / on windows

--- cmake/axl_utils.cmake
+++ cmake/axl_utils.cmake
@@ -839,6 +839,8 @@
 			COMMAND where ${_FILE_NAME}
 			OUTPUT_VARIABLE _OUTPUT
 			)
+
+		string (REPLACE "\\" "/" _OUTPUT "${_OUTPUT}")
 	else ()
 		execute_process (
 			COMMAND which ${_FILE_NAME}
@@ -849,10 +851,10 @@

 	string (STRIP "${_OUTPUT}" _OUTPUT)

-	if (NOT "${_OUTPUT}" STREQUAL "")
+	if ("${_OUTPUT}" STREQUAL "")
+		set (${_RESULT} ${_RESULT}-NOTFOUND)
+	else ()
 		set (${_RESULT} ${_OUTPUT})
-	else ()
-		set (${_RESULT} ${_RESULT}-NOTFOUND)
 	endif ()
 endmacro ()

@@ -865,10 +867,12 @@
 	unset (_DIR)
 	find_path (_DIR ${_FILE_NAME})

-	if (_DIR)
+	if (NOT _DIR)
+		set (${_RESULT} ${_RESULT}-NOTFOUND)
+	elseif (WIN32)
+		string (REPLACE "\\" "/" ${_RESULT} "${_DIR}")
+	else ()
 		set (${_RESULT} ${_DIR})
-	else ()
-		set (${_RESULT} ${_RESULT}-NOTFOUND)
 	endif ()

 	unset (_DIR CACHE)
@@ -883,7 +887,13 @@
 	unset (_PATH)
 	find_library (_PATH ${_LIB_NAME})

-	if (_PATH)
+	if (NOT _PATH)
+		set (${_RESULT} ${_RESULT}-NOTFOUND)
+	else ()
+		if (WIN32)
+			string (REPLACE "\\" "/" _PATH "${_PATH}")
+		endif ()
+
 		get_filename_component (
 			_DIR
 			${_PATH}
@@ -891,8 +901,6 @@
 			)

 		set (${_RESULT} ${_DIR})
-	else ()
-		set (${_RESULT} ${_RESULT}-NOTFOUND)
 	endif ()

 	unset (_PATH CACHE)


Build more sanitizers for NetBSD

Build more sanitizers for NetBSD

Summary:
Enable for NetBSD:

 - MSan,
 - TSan,
 - LSan.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, eugenis, dvyukov, vitalybuka

Reviewed By: eugenis

Subscribers: srhines, mgorny, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D40464

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@319060 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -511,14 +511,14 @@
 endif()

 if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND
-    OS_NAME MATCHES "Darwin|Linux|FreeBSD")
+    OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD")
   set(COMPILER_RT_HAS_LSAN TRUE)
 else()
   set(COMPILER_RT_HAS_LSAN FALSE)
 endif()

 if (COMPILER_RT_HAS_SANITIZER_COMMON AND MSAN_SUPPORTED_ARCH AND
-    OS_NAME MATCHES "Linux")
+    OS_NAME MATCHES "Linux|NetBSD")
   set(COMPILER_RT_HAS_MSAN TRUE)
 else()
   set(COMPILER_RT_HAS_MSAN FALSE)
@@ -532,7 +532,7 @@
 endif()

 if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND
-    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android")
+    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android|NetBSD")
   set(COMPILER_RT_HAS_TSAN TRUE)
 else()
   set(COMPILER_RT_HAS_TSAN FALSE)


[compiler-rt] Let CMake search for thread support

This is an educated guess to fix sanitizer-x86_64-linux after r354132.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@354143 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -119,6 +119,8 @@
 check_library_exists(m pow "" COMPILER_RT_HAS_LIBM)
 check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD)
 check_library_exists(execinfo backtrace "" COMPILER_RT_HAS_LIBEXECINFO)
+
+find_package(Threads)

 # Look for terminfo library, used in unittests that depend on LLVMSupport.
 if(LLVM_ENABLE_TERMINFO)


fix build for gcc-4 & gcc -5

fix build for gcc-4 & gcc -5

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -11,7 +11,9 @@
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wconversion")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Woverloaded-virtual")
 if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
+        if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "6.0")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wmisleading-indentation")
+        endif()
 else()
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wno-missing-braces")
 endif()
@@ -19,7 +21,9 @@
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wcast-align")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wold-style-cast")
+if(NOT (CMAKE_CXX_COMPILER_ID MATCHES GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0"))
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wshadow")
+endif()
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wsign-promo")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wsign-conversion")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -fno-common")


cleaned up the dependency graph by manually removing documentation, tools, apps, global_tests

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@2367 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/dep_graph.cmake
+++ cmake/dep_graph.cmake
@@ -4,6 +4,10 @@
     set(_dot_file "${PROJECT_BINARY_DIR}/pcl.dot")
     file(WRITE ${_dot_file} "digraph pcl {\n")
     foreach(_ss ${PCL_SUBSYSTEMS})
+      if(NOT _ss STREQUAL "global_tests" AND
+         NOT _ss STREQUAL "apps" AND
+         NOT _ss STREQUAL "tools" AND
+         NOT _ss STREQUAL "documentation")
         PCL_GET_SUBSYS_STATUS(_status ${_ss})
         if(_status)
             file(APPEND ${_dot_file}
@@ -16,6 +20,7 @@
         foreach(_dep ${_deps})
             file(APPEND ${_dot_file} "  \"${_ss}\" -> \"${_dep}\";\n")
         endforeach(_dep)
+      endif()
     endforeach(_ss)

     file(APPEND ${_dot_file}


fixed zmsg_encode() test

fixed zmsg_encode() test

--- cmake/find-czmq.cmake
+++ cmake/find-czmq.cmake
@@ -19,10 +19,12 @@

 # check signature of zmsg_encode()
 check_cxx_source_compiles("
+#include <zmq.h>
 #include <czmq.h>
 #include <zmsg.h>
+#include <zframe.h>
 int main() {
-    zframe_t f = zmsg_encode((zmsg_t*)0);
+    zframe_t* f = zmsg_encode((zmsg_t*)0);
 }
 " HAVE_ZMSG_ENCODE_TO_ZFRAME)


fixing a typo, my bad

fixing a typo, my bad

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

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -69,7 +69,7 @@
     # add documentation
     if(BUILD_documentation)
         set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL} doc")
-    if(BUILD_documentation)
+    endif(BUILD_documentation)
     # add PCLConfig
     set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL} pclconfig")
     set(PCL_CPACK_COMPONENTS "${PCL_CPACK_COMPONENTS}\nset(CPACK_COMPONENT_PCLCONFIG_GROUP \"PCL\")\n")


Portability: fix osx target

Portability: fix osx target

Currently cts can be be build on MacOS using default target
this CL adds missing libraries also to osx target.

Components: Framework

VK-GL-CTS public issue: 277

Affects:
*

Change-Id: Ic890bea33bd90240e84dd71b985cf146a1a4df0c

--- targets/osx/osx.cmake
+++ targets/osx/osx.cmake
@@ -23,5 +23,7 @@
 set(DEQP_TARGET_NAME	"OS X")

 find_package(OpenGL REQUIRED)
-set(DEQP_PLATFORM_LIBRARIES ${OPENGL_LIBRARIES})
+find_library(COCOA_LIBRARY Cocoa)
+find_library(QUARTZCORE_LIBRARY QuartzCore)
+set(DEQP_PLATFORM_LIBRARIES ${OPENGL_LIBRARIES} ${COCOA_LIBRARY} ${QUARTZCORE_LIBRARY})
 include_directories(${OPENGL_INCLUDE_DIRS})


Really fix test

Really fix test

The LC_ALL variable modify the formatting of the output of
a test. Forcing to C fix the results to the good known format.

--- build/TestPcapRun.cmake
+++ build/TestPcapRun.cmake
@@ -1,5 +1,6 @@

 set(ENV{LANG} "C")
+set(ENV{LC_ALL} "C")
 set(ENV{BUILD_DIR} ${CTEST_MODULE_DIR})
 set(ENV{DIFF} ${DIFF})
 set(ENV{TSHARK} ${TSHARK})
@@ -10,7 +11,7 @@
 set(CMAKE_MODULE_PATH ${CTEST_MODULE_DIR} ${CMAKE_MODULE_PATH})
 include(Valgrind)

-message("Executing LANG=\"C\" LUA_PATH=\"$ENV{LUA_PATH}\" HAKA_PATH=\"$ENV{HAKA_PATH}\" LD_LIBRARY_PATH=\"$ENV{LD_LIBRARY_PATH}\" ${EXE} -d --no-pass-through ${EXE_OPTIONS} -o ${DST}.pcap ${SRC} ${CONF}")
+message("Executing LANG=\"C\" LC_ALL=\"C\" LUA_PATH=\"$ENV{LUA_PATH}\" HAKA_PATH=\"$ENV{HAKA_PATH}\" LD_LIBRARY_PATH=\"$ENV{LD_LIBRARY_PATH}\" ${EXE} -d --no-pass-through ${EXE_OPTIONS} -o ${DST}.pcap ${SRC} ${CONF}")

 VALGRIND(${DST} ${EXE} -d --no-pass-through ${EXE_OPTIONS} -o ${DST}.pcap ${SRC} ${CONF}
 	RESULT_VARIABLE HAD_ERROR OUTPUT_FILE ${DST}-tmp.txt)


Added definitions for CMAKE paths to libs and includes after simplification of find_package modules

--- cmake/CMakeModules/OssimCommonVariables.cmake
+++ cmake/CMakeModules/OssimCommonVariables.cmake
@@ -257,6 +257,18 @@
       GET_FILENAME_COMPONENT(OSSIM_DEPENDENCIES "${OSSIM_DEPENDENCIES}" ABSOLUTE)
    ENDIF(NOT OSSIM_DEPENDENCIES)

+   # Define paths used by package finders defined in this directory:
+   IF(OSSIM_INSTALL_PREFIX)
+      SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX}")
+      SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_INSTALL_PREFIX}/include")
+   ENDIF()
+   IF(OSSIM_DEPENDENCIES)
+      SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};${OSSIM_DEPENDENCIES}/lib${LIBSUFFIX}")
+      SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEPENDENCIES}/include")
+   ENDIF()
+   SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};/usr/lib;/usr/local/lib;/usr/lib64;/usr/lib/x86_64-linux-gnu")
+   SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEV_HOME}/ossim/include;/usr/include;/usr/local/include")
+
    #################################### ADd some common options for all modules to use ###################################
    OPTION(BUILD_OSSIM_VIDEO "Set to ON to build the video decoding library.  Use OFF to skip this module." OFF)
    OPTION(BUILD_OSSIM_PLANET "Set to ON to build the 3-D visualization module.  Use OFF to skip this module." OFF)


CMake: Bugfix: Strip input variables for CHECK_COMPILER_SETUP

CMake 2.8.8 (and possibly till 2.8.11) do not normalize
CMAKE_REQUIRED_FLAGS and CMAKE_REQUIRED_LIBRARIES correctly leading to
stray "-l " in the linker command line.

Fix this by normalizing the input of CHECK_COMPILER_SETUP by stripping
leading and trailing whitespace

--- cmake/macros/macro_check_compiler_setup.cmake
+++ cmake/macros/macro_check_compiler_setup.cmake
@@ -25,7 +25,13 @@
 # ${_var} is set to true, otherwise it is set to false.
 #

-MACRO(CHECK_COMPILER_SETUP _compiler_flags _linker_flags _var)
+MACRO(CHECK_COMPILER_SETUP _compiler_flags_unstr _linker_flags_unstr _var)
+  #
+  # Strip leading and trailing whitespace to make CMake 2.8.8 happy
+  #
+  STRING(STRIP "${_compiler_flags_unstr}" _compiler_flags)
+  STRING(STRIP "${_linker_flags_unstr}" _linker_flags)
+
   #
   # Rerun this test if flags have changed:
   #


ENH: WikiExamples QuickView Update

ENH: WikiExamples QuickView Update

Improvements to QuickView.

Superbuild updated to latest VTK and ITK.

Some new examples.

Change-Id: I84f0a9cc1a50285f7792ee7e15ba666b1644155d

--- Modules/Remote/WikiExamples.remote.cmake
+++ Modules/Remote/WikiExamples.remote.cmake
@@ -1,13 +1,10 @@
 #
 # ITK WikiExamples
-#  This remote module require a VTK build
-#  The following CMake variable must be set for the ITK build
 #
-# Check for requires cmake variables

 itk_fetch_module(WikiExamples
   "A collection of examples that illustrate how to use ITK."
   GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
-  # January 05, 2015
-  GIT_TAG 42c129a898641934a84339c9a0ab69c5295f7dbe
+  # April 10, 2015
+  GIT_TAG e7c9adef49e30b7cb2cd15cd5a857e5ac25c745b
   )


Extend macros acg_append_files_recursive acg_append_files to not include files starting with a dot

git-svn-id: b66b41e514ff40863ef1aa95df2dbf63dd8d6be1@329 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -193,20 +193,35 @@
 endmacro ()

 # append all files with extension "ext" in the "dirs" directories to "ret"
+# excludes all files starting with a '.' (dot)
 macro (acg_append_files ret ext)
   foreach (_dir ${ARGN})
     file (GLOB _files "${_dir}/${ext}")
+    foreach (_file ${_files})
+      get_filename_component (_filename ${_file} NAME)
+      if (_filename MATCHES "^[.]")
+	list (REMOVE_ITEM _files ${_file})
+      endif ()
+    endforeach ()
     list (APPEND ${ret} ${_files})
   endforeach ()
 endmacro ()

 # append all files with extension "ext" in the "dirs" directories and its subdirectories to "ret"
+# excludes all files starting with a '.' (dot)
 macro (acg_append_files_recursive ret ext)
   foreach (_dir ${ARGN})
     file (GLOB_RECURSE _files "${_dir}/${ext}")
+    foreach (_file ${_files})
+      get_filename_component (_filename ${_file} NAME)
+      if (_filename MATCHES "^[.]")
+	list (REMOVE_ITEM _files ${_file})
+      endif ()
+    endforeach ()
     list (APPEND ${ret} ${_files})
   endforeach ()
 endmacro ()
+

 # drop all "*T.cc" files from list
 macro (acg_drop_templates list)


FindLua51: Also look for lua.h in the "lua-5.1" directory.

--HG--
branch : v0-8

--- cmake/FindLua51.cmake
+++ cmake/FindLua51.cmake
@@ -3,14 +3,14 @@
 ################################################################################
 include(FindPackageHandleStandardArgs)

-find_path(LUA_H_PATH NAMES lua.h PATH_SUFFIXES lua5.1 lua51 lua)
-find_library(LUA_LIB NAMES lua5.1 lua51 lua PATH_SUFFIXES dynamic)
-find_library(LUA_LIB_DBG NAMES lua5.1_d lua51_d lua_d PATH_SUFFIXES dynamic)
+find_path(LUA_H_PATH NAMES lua.h PATH_SUFFIXES lua5.1 lua51 lua-5.1 lua)
+find_library(LUA_LIB NAMES lua5.1 lua51 lua-5.1 lua PATH_SUFFIXES dynamic)
+find_library(LUA_LIB_DBG NAMES lua5.1_d lua51_d lua-5.1_d lua_d PATH_SUFFIXES dynamic)
 mark_as_advanced(LUA_H_PATH LUA_LIB LUA_LIB_DBG)

 if (WIN32 OR APPLE)
-    find_library(LUA_LIB_STATIC NAMES lua5.1 lua51 lua PATH_SUFFIXES static)
-    find_library(LUA_LIB_STATIC_DBG NAMES lua5.1_d lua51_d lua_d PATH_SUFFIXES static)
+    find_library(LUA_LIB_STATIC NAMES lua5.1 lua51 lua-5.1 lua PATH_SUFFIXES static)
+    find_library(LUA_LIB_STATIC_DBG NAMES lua5.1_d lua51_d lua-5.1_d lua_d PATH_SUFFIXES static)
     mark_as_advanced(LUA_LIB_STATIC LUA_LIB_STATIC_DBG)
 endif()


Added detection of the pulseaudio version number.

--- cmake/FindPulse.cmake
+++ cmake/FindPulse.cmake
@@ -10,5 +10,14 @@

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pulse DEFAULT_MSG PULSE_INCLUDE_DIR PULSE_LIBRARY)

-mark_as_advanced(PULSE_INCLUDE_DIR PULSE_LIBRARY)
+if(PULSE_LIBRARY)
+	execute_process(COMMAND "pactl" "--version" OUTPUT_VARIABLE PULSE_VERSION_OUTPUT)

+	STRING(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" PULSE_VERSION "${PULSE_VERSION_OUTPUT}")
+	if(NOT PULSE_VERSION)
+		message(FATAL_ERROR "PulseAudio is not installed")
+	endif()
+endif()
+
+mark_as_advanced(PULSE_INCLUDE_DIR PULSE_LIBRARY PULSE_VERSION)
+


Update SetupTPLs (remove Tasmanian)

Update SetupTPLs (remove Tasmanian)

--- cmake/SetupTPLs.cmake
+++ cmake/SetupTPLs.cmake
@@ -57,11 +57,3 @@
     find_package(GSL REQUIRED)
     add_definitions(-DWITH_GSL)
 ENDIF()
-
-#### Tasmanian ###############################################################
-IF(DEFINED TASMANIAN_INSTALL_DIR)
-    MESSAGE("TASMANIAN_INSTALL_DIR = ${TASMANIAN_INSTALL_DIR}")
-    INCLUDE(SetupTasmanian)
-    SET(ENABLE_TASMANIAN ON)
-ENDIF()
-


Only run tests on UNIX for now

Only run tests on UNIX for now

--HG--
branch : win_support

--- cmake/TestUtils.cmake
+++ cmake/TestUtils.cmake
@@ -1,5 +1,7 @@
 #################################################
 macro (ign_build_tests)
+ # TODO: back to enable tests on windows
+ if (UNIX)
   # Build all the tests
   foreach(GTEST_SOURCE_file ${ARGN})
     string(REGEX REPLACE ".cc" "" BINARY_NAME ${GTEST_SOURCE_file})
@@ -35,4 +37,5 @@
     add_test(check_${BINARY_NAME} ${PROJECT_SOURCE_DIR}/tools/check_test_ran.py
 	${CMAKE_BINARY_DIR}/test_results/${BINARY_NAME}.xml)
   endforeach()
+ endif()
 endmacro()