Fix: On ubuntu the openmp flags were not found while installed

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

--- cmake/pcl_openmp.cmake
+++ cmake/pcl_openmp.cmake
@@ -25,11 +25,12 @@
     foreach(_flag ${_possible_flags})
         if(NOT OPENMP_FLAGS_FOUND)
             set(CMAKE_REQUIRED_FLAGS ${_flag})
-            check_function_exists(omp_set_num_threads OPENMP_FLAGS_FOUND)
-            if(OPENMP_FLAGS_FOUND)
+            check_function_exists(omp_set_num_threads OPENMP_FLAGS_${_flag})
+            if(OPENMP_FLAGS_${_flag})
+                set(OPENMP_FLAGS ${_flag})
                 message(STATUS "Found OpenMP flags: ${OPENMP_FLAGS}")
-                set(OPENMP_FLAGS ${_flag})
-            endif(OPENMP_FLAGS_FOUND)
+								set(OPENMP_FLAGS_FOUND true)
+            endif(OPENMP_FLAGS_${_flag})
         endif(NOT OPENMP_FLAGS_FOUND)
     endforeach(_flag)


Apply patch for ROOT bug (ROOT-10916) See: https://sft.its.cern.ch/jira/browse/ROOT-10916

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -20,7 +20,6 @@
     else()
         set(GET_OS_ID "echo $(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '\"')")
         set(GET_OS_VERSION "echo $(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '\"')")
-        message("GET_OS_ID = ${GET_OS_ID}")
         execute_process(COMMAND bash -c "${GET_OS_ID}"
                 OUTPUT_VARIABLE DISTRO_NAME
                 OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -73,6 +72,11 @@
           set(ENV{ROOTSYS} ${TMP_ROOT_PATH})
         endif()
     endif()
+
+    # Fixes bug: https://sft.its.cern.ch/jira/browse/ROOT-10916
+    if("${ROOT_VERSION}" STREQUAL "6.20/00")
+      execute_process(COMMAND sed -i -e "s/JSROOT.gStyle, style/JSROOT.gStyle, obj/g" ${ROOTSYS}/js/scripts/JSRootPainter.v6.js)
+    endif()
 endfunction()

 # Convert a list to a better representation


Revert "cmake/pthread-config.cmake : use upstream FindThreads.cmake"

This reverts commit 71878fbc22c222443dd222a832b365aa9d112d03.

Does not work if you have

project(foo CXX):

Make Error at /usr/share/cmake-2.8/Modules/CheckIncludeFiles.cmake:48
(TRY_COMPILE):
  Unknown extension ".c" for file

  /home/dmerewsky/work/qi/nao-flasher/build-sys-linux-x86_64/CMakeFiles/CMakeTmp/CheckIncludeFiles.c

  -- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.
  try_compile() works only for enabled languages.  Currently these
  are:

  CXX

  See project() command to enable other languages.

And besides, it does not solve the gtest/pthread bug we were having ...

--- cmake/qibuild/modules/pthread-config.cmake
+++ cmake/qibuild/modules/pthread-config.cmake
@@ -2,13 +2,5 @@

 clean(PTHREAD)
 fpath(PTHREAD "pthread.h")
-
-# Use upstream FindThreads.cmake to correctly set -lpthread or
-# -pthread
-find_package(Threads QUIET)
-if(CMAKE_THREAD_LIBS_INIT)
-  qi_set_global(PTHREAD_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
-else()
-  flib(PTHREAD pthread pthreadVCE2)
-endif()
+flib(PTHREAD pthread pthreadVCE2)
 export_lib(PTHREAD)


More cleanups.

More cleanups.

--- library/FindOctave.cmake
+++ library/FindOctave.cmake
@@ -58,37 +58,43 @@
 	)

 	execute_process(
-		COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -p BINDIR
+		COMMAND
+			${OCTAVE_CONFIG_EXECUTABLE} -p BINDIR
 			OUTPUT_VARIABLE OCTAVE_BIN_PATHS
 			OUTPUT_STRIP_TRAILING_WHITESPACE
 	)

 	execute_process(
-		COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -p OCTINCLUDEDIR
+		COMMAND
+			${OCTAVE_CONFIG_EXECUTABLE} -p OCTINCLUDEDIR
 			OUTPUT_VARIABLE OCTAVE_INCLUDE_PATHS
 			OUTPUT_STRIP_TRAILING_WHITESPACE
 	)

 	execute_process(
-		COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -p OCTLIBDIR
+		COMMAND
+			${OCTAVE_CONFIG_EXECUTABLE} -p OCTLIBDIR
 			OUTPUT_VARIABLE OCTAVE_LIBRARIES_PATHS
 			OUTPUT_STRIP_TRAILING_WHITESPACE
 	)

 	execute_process(
-		COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -p OCTFILEDIR
+		COMMAND
+			${OCTAVE_CONFIG_EXECUTABLE} -p OCTFILEDIR
 			OUTPUT_VARIABLE OCTAVE_OCT_FILE_DIR
 			OUTPUT_STRIP_TRAILING_WHITESPACE
 	)

 	execute_process(
-		COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -p OCTLIBDIR
+		COMMAND
+			${OCTAVE_CONFIG_EXECUTABLE} -p OCTLIBDIR
 			OUTPUT_VARIABLE OCTAVE_OCT_LIB_DIR
 			OUTPUT_STRIP_TRAILING_WHITESPACE
 	)

 	execute_process(
-		COMMAND ${OCTAVE_CONFIG_EXECUTABLE} -v
+		COMMAND
+			${OCTAVE_CONFIG_EXECUTABLE} -v
 			OUTPUT_VARIABLE OCTAVE_VERSION_STRING
 			OUTPUT_STRIP_TRAILING_WHITESPACE
 	)


Handle case when no ctest script arg are passed to dashboard script

--- CMake/VisomicsDashboardScript.TEMPLATE.cmake
+++ CMake/VisomicsDashboardScript.TEMPLATE.cmake
@@ -43,7 +43,7 @@
 #       ctest -S /path/to/script.cmake,SCRIPT_MODE##continuous^^GIT_TAG##next
 #
 if(NOT CTEST_SCRIPT_ARG STREQUAL "")
-  string(REPLACE "^^" "\\;" CTEST_SCRIPT_ARG_AS_LIST ${CTEST_SCRIPT_ARG})
+  string(REPLACE "^^" "\\;" CTEST_SCRIPT_ARG_AS_LIST "${CTEST_SCRIPT_ARG}")
   set(CTEST_SCRIPT_ARG_AS_LIST ${CTEST_SCRIPT_ARG_AS_LIST})
   foreach(argn_argv ${CTEST_SCRIPT_ARG_AS_LIST})
     string(REPLACE "##" "\\;" argn_argv_list ${argn_argv})


cmake: check mconf-idf binary version

cmake: check mconf-idf binary version

Print a warning if an outdated version of mconf-idf is found in
the PATH.

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -30,8 +30,28 @@
                     "on the PATH, or an MSYS2 version of gcc on the PATH to build mconf-idf. "
                     "Consult the setup docs for ESP-IDF on Windows.")
             endif()
-        elseif(WINPTY)
-            set(MCONF "\"${WINPTY}\" \"${MCONF}\"")
+        else()
+            execute_process(COMMAND "${MCONF}" -v
+                RESULT_VARIABLE mconf_res
+                OUTPUT_VARIABLE mconf_out
+                ERROR_VARIABLE mconf_err)
+            if(${mconf_res})
+                message(WARNING "Failed to detect version of mconf-idf. Return code was ${mconf_res}.")
+            else()
+                string(STRIP "${mconf_out}" mconf_out)
+                set(mconf_expected_ver "mconf-v4.6.0.0-idf-20190628-win32")
+                if(NOT ${mconf_out} STREQUAL "mconf-idf version ${mconf_expected_ver}")
+                    message(WARNING "Unexpected ${mconf_out}. Expected ${mconf_expected_ver}. "
+                                    "Please check the ESP-IDF Getting Started guide for version "
+                                    "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH} "
+                                    "to correct this issue")
+                else()
+                    message(STATUS "${mconf_out}")   # prints: mconf-idf version ....
+                endif()
+            endif()
+            if(WINPTY)
+                set(MCONF "\"${WINPTY}\" \"${MCONF}\"")
+            endif()
         endif()
     endif()


tweak unix/win32 dirs for bullet in ConfigurePackages

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -457,15 +457,21 @@
     if ("$ENV{BULLET_DIR}" STREQUAL "")
        if (WIN32)
           set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/Bullet)
+	  include_directories(${BULLET_DIR}/include)
+	  include_directories(${BULLET_DIR}/include/ConvexDecomposition)
+	  link_directories(${BULLET_DIR}/lib)
        else() # todo: This should be temporary? Always just use the above directory.
-          set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/bullet-2.77)
+          set(BULLET_DIR ${ENV_NAALI_DEP_PATH})
+	  include_directories(${BULLET_DIR}/include/bullet)
+	  include_directories(${BULLET_DIR}/include/bullet/ConvexDecomposition)
+	  link_directories(${BULLET_DIR}/lib)
        endif()
     else()
        set(BULLET_DIR $ENV{BULLET_DIR})
+       include_directories(${BULLET_DIR}/include)
+       include_directories(${BULLET_DIR}/include/ConvexDecomposition)
+       link_directories(${BULLET_DIR}/lib)
     endif()
-    include_directories(${BULLET_DIR}/include)
-    include_directories(${BULLET_DIR}/include/ConvexDecomposition)
-    link_directories(${BULLET_DIR}/lib)
 endmacro()

 macro(link_package_bullet)


Fix Linux rpath.

Fix Linux rpath.

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -29,9 +29,8 @@
     #set(CXX_FLAG32 "-m32") #uncomment for build x32 on OSx64

     # default compiler flags
-    # force compile 32 bit
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wall -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
-	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wall -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wall -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath=.")
+	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wall -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath=.")

 	# for asm files
 	SET (CMAKE_ASM_NASM_OBJECT_FORMAT "elf")


modules: new internal MAGNUM_DATA_INSTALL_DIR.

Will be used by examples etc. to install various auxiliary data.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -113,6 +113,7 @@
 #  MAGNUM_*_LIBRARY_RELEASE     - Release version of given library, if found
 #  MAGNUM_BINARY_INSTALL_DIR    - Binary installation directory
 #  MAGNUM_LIBRARY_INSTALL_DIR   - Library installation directory
+#  MAGNUM_DATA_INSTALL_DIR      - Data installation directory
 #  MAGNUM_PLUGINS_[DEBUG|RELEASE]_INSTALL_DIR - Plugin installation directory
 #  MAGNUM_PLUGINS_FONT_[DEBUG|RELEASE]_INSTALL_DIR - Font plugin installation
 #   directory
@@ -566,6 +567,7 @@
 include(${CORRADE_LIB_SUFFIX_MODULE})
 set(MAGNUM_BINARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
 set(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
+set(MAGNUM_DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/magnum)
 set(MAGNUM_PLUGINS_DEBUG_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum-d)
 set(MAGNUM_PLUGINS_RELEASE_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
 set(MAGNUM_PLUGINS_FONT_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/fonts)


oss: FindLibEvent.cmake: workaround cmake POLICY annoyances

Summary:
When pulled in as an external project into an environment
that has changed the default cmake policy, the trick we're using
to extract the full library path errors out.  This works around
that issue by saving the policy settings and then setting them
how we need them before restoring them after we're done.

refs https://github.com/facebook/folly/issues/1100

Reviewed By: yfeldblum

Differential Revision: D14766991

fbshipit-source-id: e2506bc0aebd9e66bc70b12c4c538c9e034f9f73

--- build/fbcode_builder/CMake/FindLibEvent.cmake
+++ build/fbcode_builder/CMake/FindLibEvent.cmake
@@ -36,7 +36,13 @@
   # this results in linker errors.
   # To resolve this, we ask cmake to lookup the full path to the library
   # and use that instead.
+  cmake_policy(PUSH)
+  if(POLICY CMP0026)
+    # Allow reading the LOCATION property
+    cmake_policy(SET CMP0026 OLD)
+  endif()
   get_target_property(LIBEVENT_LIB event LOCATION)
+  cmake_policy(POP)

   set(LibEvent_FOUND ${Libevent_FOUND})
   if (NOT LibEvent_FIND_QUIETLY)


CR #472

CR #472

--- CommonApplication.cmake
+++ CommonApplication.cmake
@@ -39,10 +39,10 @@
 endmacro()

 function(_common_application Name)
-  set(OPT_NAMES GUI EXAMPLE)
-  set(ARG_NAMES)
-  set(ARGS_NAMES)
-  cmake_parse_arguments(THIS "${OPT_NAMES}" "${ARG_NAMES}" "${ARGS_NAMES}"
+  set(_opts GUI EXAMPLE)
+  set(_singleArgs)
+  set(_multiArgs)
+  cmake_parse_arguments(THIS "${_opts}" "${_singleArgs}" "${_multiArgs}"
     ${ARGN})

   string(TOUPPER ${Name} NAME)


Add self-executable HTML shell-file hack. This hack allows IDE to "run" the HTML output file for Web platform as if it is an executable. This hack only works on Unix-alike host system, sorry.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -1065,8 +1065,8 @@
             # Create Urho3D custom HTML shell that also embeds our own project logo
             if (NOT EXISTS ${CMAKE_BINARY_DIR}/Source/shell.html)
                 file (READ ${EMSCRIPTEN_ROOT_PATH}/src/shell.html HTML_SHELL)
-                string (REPLACE "<!doctype html>" "\n\n<!doctype html>" HTML_SHELL "${HTML_SHELL}")     # Stringify to preserve semicolons
-                string (REPLACE "" "\n\n\n" HTML_SHELL "${HTML_SHELL}")
+                string (REPLACE "<!doctype html>" "#!/usr/bin/env ${EMSCRIPTEN_EMRUN_BROWSER}\n\n\n<!doctype html>" HTML_SHELL "${HTML_SHELL}")     # Stringify to preserve semicolons
+                string (REPLACE "" "\n\n\n" HTML_SHELL "${HTML_SHELL}")
                 file (WRITE ${CMAKE_BINARY_DIR}/Source/shell.html "${HTML_SHELL}")
             endif ()
             set (HTML_SHELL ${CMAKE_BINARY_DIR}/Source/shell.html)
@@ -1475,7 +1475,13 @@
         if (WEB AND DEST_BUNDLE_DIR)
             set (LOCATION $<TARGET_FILE_DIR:${TARGET_NAME}>)
             unset (FILES)
-            foreach (EXT data html html.map html.mem js wasm)
+            set (EXTS data html.map html.mem js wasm)
+            if (SELF_EXECUTABLE_SHELL)
+                install (TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${DEST_BUNDLE_DIR})
+            else ()
+                list (APPEND EXTS html)
+            endif ()
+            foreach (EXT ${EXTS})
                 list (APPEND FILES ${LOCATION}/${TARGET_NAME}.${EXT})
             endforeach ()
             install (FILES ${FILES} DESTINATION ${DEST_BUNDLE_DIR} OPTIONAL)    # We get html.map or html.mem depend on the build configuration
@@ -1621,6 +1627,9 @@
                     get_property (EMCC_OPTION SOURCE ${FILE} PROPERTY EMCC_OPTION)
                     if (EMCC_OPTION STREQUAL shell-file)
                         list (APPEND TARGET_PROPERTIES SUFFIX .html)
+                        # Check if the shell-file is self-executable
+                        file (READ ${FILE} SHEBANG LIMIT 3)     # Workaround CMake's funny way of file I/O operation
+                        string (COMPARE EQUAL ${SHEBANG} "#!\n" SELF_EXECUTABLE_SHELL)
                         break ()
                     endif ()
                 endforeach ()
@@ -1629,6 +1638,7 @@
                     if (NOT EMCC_OPTION STREQUAL shell-file)
                         add_html_shell ()
                         list (APPEND TARGET_PROPERTIES SUFFIX .html)
+                        set (SELF_EXECUTABLE_SHELL 1)
                     endif ()
                 else ()
                     # If not using EMRUN then we need to include the emrun_prejs.js manually in order to process the request parameters as app's arguments correctly
@@ -1717,6 +1727,10 @@
                 list (APPEND LINK_FLAGS "--${EMCC_OPTION} ${FILE}${EMCC_FILE_ALIAS}${EMCC_EXCLUDE_FILE}")
             endif ()
         endforeach ()
+        # If it is a self-executable shell-file then change the attribute of the output file accordingly
+        if (SELF_EXECUTABLE_SHELL AND NOT CMAKE_HOST_WIN32)
+            add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND chmod +x $<TARGET_FILE:${TARGET_NAME}>)
+        endif ()
     endif ()
     # Set additional linker dependencies (only work for Makefile-based generator according to CMake documentation)
     if (LINK_DEPENDS)


CMake: remove invalid warning.

CMake: remove invalid warning.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -139,8 +139,6 @@
             if (NOT EXISTS ${ABS_DESTINATION})
                 execute_process (${COMMAND})
             endif ()
-        else ()
-            message (WARNING "Unable to create symbolic link on this host system, you may need to manually copy file/dir from \"${SOURCE}\" to \"${DESTINATION}\"")
         endif ()
     else ()
         execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink ${ABS_SOURCE} ${ABS_DESTINATION})


From Per Fahlberg, "The FindCOLLADA.cmake module failed to find the static libs for the latest collada dom, attached is the fixed file."

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -101,7 +101,7 @@
 )

 FIND_LIBRARY(COLLADA_STATIC_LIBRARY
-    NAMES libcollada14dom21-s  libcollada14dom22-s
+    NAMES libcollada14dom21-s  libcollada14dom22-s libcollada14dom.a
     PATHS
     ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
     $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4
@@ -124,7 +124,7 @@
 )

 FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
-    NAMES collada_dom-sd collada14dom-sd libcollada14dom21-sd libcollada14dom22-sd
+    NAMES collada_dom-sd collada14dom-sd libcollada14dom21-sd libcollada14dom22-sd libcollada14dom-d.a
     PATHS
     ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
     $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4-d


Default OpenMP OFF

Default OpenMP OFF

OpenMP builds are deprecated and will be removed shortly.

--- CMake_build_options.cmake
+++ CMake_build_options.cmake
@@ -83,7 +83,7 @@

 find_package(OpenMP)
 if (OPENMP_FOUND)
-    option(ENABLE_OPENMP "Enable openmp compliation to accelerate CPU code on multi-core machines" ON)
+    option(ENABLE_OPENMP "Enable openmp compliation to accelerate CPU code on multi-core machines" OFF)
 endif (OPENMP_FOUND)

 else (_cmake_ver VERSION_GREATER 2.6.3)


Replaced tabs with spaces.

Replaced tabs with spaces.

--- External/FindGLFW.cmake
+++ External/FindGLFW.cmake
@@ -65,14 +65,14 @@
     )

     IF(WIN32)
-            SET(GLFW_LIBRARY
-                ${install_dir}/lib/glfw3.lib
-            )
-        ELSE(WIN32)
-            SET(GLFW_LIBRARY
-                ${install_dir}/lib/libglfw3.a
-            )
-        ENDIF(WIN32)
+        SET(GLFW_LIBRARY
+            ${install_dir}/lib/glfw3.lib
+        )
+    ELSE(WIN32)
+        SET(GLFW_LIBRARY
+            ${install_dir}/lib/libglfw3.a
+        )
+    ENDIF(WIN32)

 ENDIF(NOT GLFW_LIBRARY OR FORCE_DOWNLOAD_GLFW)


WIP: use develop branch of temporalgapfilling to fix windows bug

--- Modules/Remote/temporal-gapfilling.remote.cmake
+++ Modules/Remote/temporal-gapfilling.remote.cmake
@@ -26,5 +26,5 @@
 http://tully.ups-tlse.fr/jordi/temporalgapfilling
 "
   GIT_REPOSITORY http://tully.ups-tlse.fr/jordi/temporalgapfilling.git
-  GIT_TAG 4180f28091fb10029860ada2dcf9c9526d3a55d2
+  GIT_TAG develop
 )


ENH: Upgrade PCRE to 8.45

ENH: Upgrade PCRE to 8.45

--- SuperBuild/CMake/External_pcre.cmake
+++ SuperBuild/CMake/External_pcre.cmake
@@ -25,8 +25,8 @@
 else()
   ExternalProject_Add(PCRE
     PREFIX PCRE
-    URL "https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz"
-    URL_MD5 3bcd2441024d00009a5fee43f058987c
+    URL "https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz"
+    URL_MD5 01b80f8177ab91da63e7e5c5d5dfcb83
     BINARY_DIR ${PCRE_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


cmake: remove unused FindDRM.cmake

cmake: remove unused FindDRM.cmake

--- cmake/FindDRM.cmake
+++ cmake/FindDRM.cmake
@@ -1,57 +0,0 @@
-# - FindDRM
-#
-# Copyright 2015 LunarG, Inc.
-
-find_package(PkgConfig)
-
-if(NOT DRM_FIND_COMPONENTS)
-    set(DRM_FIND_COMPONENTS libdrm)
-endif()
-
-include(FindPackageHandleStandardArgs)
-set(DRM_FOUND true)
-set(DRM_INCLUDE_DIRS "")
-set(DRM_LIBRARIES "")
-foreach(comp ${DRM_FIND_COMPONENTS})
-    # component name
-    string(REPLACE "lib" "" compname ${comp})
-    string(TOUPPER ${compname} compname)
-    # header name
-    if(comp STREQUAL "libdrm")
-        set(headername xf86drm.h)
-    elseif(comp STREQUAL "libdrm_intel")
-        set(headername intel_bufmgr.h)
-    else()
-        string(REPLACE "libdrm_" "" headername ${comp})
-    endif()
-    # library name
-    string(REPLACE "lib" "" libname ${comp})
-
-    pkg_check_modules(PC_${comp} QUIET ${comp})
-
-    find_path(${compname}_INCLUDE_DIR NAMES ${headername}
-        HINTS
-        ${PC_${comp}_INCLUDEDIR}
-        ${PC_${comp}_INCLUDE_DIRS}
-        )
-
-    find_library(${compname}_LIBRARY NAMES ${libname}
-        HINTS
-        ${PC_${comp}_LIBDIR}
-        ${PC_${comp}_LIBRARY_DIRS}
-        )
-
-    find_package_handle_standard_args(${comp}
-        FOUND_VAR ${comp}_FOUND
-        REQUIRED_VARS ${compname}_INCLUDE_DIR ${compname}_LIBRARY)
-    mark_as_advanced(${compname}_INCLUDE_DIR ${compname}_LIBRARY)
-
-    list(APPEND DRM_INCLUDE_DIRS ${${compname}_INCLUDE_DIR})
-    list(APPEND DRM_LIBRARIES ${${compname}_LIBRARY})
-
-    if(NOT ${comp}_FOUND)
-        set(DRM_FOUND false)
-    endif()
-endforeach()
-
-list(REMOVE_DUPLICATES DRM_INCLUDE_DIRS)


newer FindQt4 from kdelibs trunk

newer FindQt4 from kdelibs trunk

svn path=/trunk/kdesupport/strigi/; revision=642255

--- cmake/FindQt4.cmake
+++ cmake/FindQt4.cmake
@@ -553,20 +553,81 @@
   IF (QT_USE_FRAMEWORKS)
     # If FIND_LIBRARY found libraries in Apple frameworks, we would NOT have
     # to jump through these hoops.
-    SET(QT_QTCORE_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtCore" CACHE STRING "The QtCore library.")
-    SET(QT_QT3SUPPORT_LIBRARY "-framework Qt3Support" CACHE STRING "The Qt3Support library.")
-    SET(QT_QTGUI_LIBRARY      "-framework QtGui"      CACHE STRING "The QtGui library.")
-    SET(QT_QTNETWORK_LIBRARY  "-framework QtNetwork"  CACHE STRING "The QtNetwork library.")
-    SET(QT_QTOPENGL_LIBRARY   "-framework QtOpenGL"   CACHE STRING "The QtOpenGL library.")
-    SET(QT_QTSQL_LIBRARY      "-framework QtSql"      CACHE STRING "The QtSql library.")
-    SET(QT_QTXML_LIBRARY      "-framework QtXml"      CACHE STRING "The QtXml library.")
-    SET(QT_QTSVG_LIBRARY      "-framework QtSvg"      CACHE STRING "The QtSvg library.")
-    SET(QT_QTSCRIPT_LIBRARY   "-framework QtScript"   CACHE STRING "The QtScript library.")
-    SET(QT_QTDBUS_LIBRARY     "-framework QtDBus"     CACHE STRING "The QtDBus library.")
-    SET(QT_QTTEST_LIBRARY     "-framework QtTest"     CACHE STRING "The QtTest library.")
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
+      SET(QT_QTCORE_FOUND TRUE)
+      SET(QT_QTCORE_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtCore" CACHE STRING "The QtCore library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
+      SET(QT_QTCORE_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtGui.framework)
+      SET(QT_QTGUI_FOUND TRUE)
+      SET(QT_QTGUI_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtGui" CACHE STRING "The QtGui library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtGui.framework)
+      SET(QT_QTGUI_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtGui.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/Qt3Support.framework)
+      SET(QT_QT3SUPPORT_FOUND TRUE)
+      SET(QT_QT3SUPPORT_LIBRARY "-F${QT_LIBRARY_DIR} -framework Qt3Support" CACHE STRING "The Qt3Support library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/Qt3Support.framework)
+      SET(QT_QT3SUPPORT_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/Qt3Support.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtNetwork.framework)
+      SET(QT_QTNETWORK_FOUND TRUE)
+      SET(QT_QTNETWORK_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtNetwork" CACHE STRING "The QtNetwork library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtNetwork.framework)
+      SET(QT_QTNETWORK_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtNetwork.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtOpenGL.framework)
+      SET(QT_QTOPENGL_FOUND TRUE)
+      SET(QT_QTOPENGL_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtOpenGL" CACHE STRING "The QtOpenGL library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtOpenGL.framework)
+      SET(QT_QTOPENGL_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtOpenGL.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtSql.framework)
+      SET(QT_QTSQL_FOUND TRUE)
+      SET(QT_QTSQL_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtSql" CACHE STRING "The QtSql library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtSql.framework)
+      SET(QT_QTSQL_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtSql.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtXml.framework)
+      SET(QT_QTXML_FOUND TRUE)
+      SET(QT_QTXML_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtXml" CACHE STRING "The QtXml library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtXml.framework)
+      SET(QT_QTXML_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtXml.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtSvg.framework)
+      SET(QT_QTSVG_FOUND TRUE)
+      SET(QT_QTSVG_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtSvg" CACHE STRING "The QtSvg library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtSvg.framework)
+      SET(QT_QTSVG_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtSvg.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtDBus.framework)
+      SET(QT_QTDBUS_FOUND TRUE)
+      SET(QT_QTDBUS_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtDBus" CACHE STRING "The QtDBus library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtDBus.framework)
+      SET(QT_QTDBUS_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtDBus.framework)
+
+    IF(EXISTS ${QT_LIBRARY_DIR}/QtTest.framework)
+      SET(QT_QTTEST_FOUND TRUE)
+      SET(QT_QTTEST_LIBRARY "-F${QT_LIBRARY_DIR} -framework QtTest" CACHE STRING "The QtTest library.")
+    ELSE(EXISTS ${QT_LIBRARY_DIR}/QtTest.framework)
+      SET(QT_QTTEST_FOUND FALSE)
+    ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtTest.framework)

     # WTF?  why don't we have frameworks?  :P
-    SET(QT_QTUITOOLS_LIBRARY      "-L${QT_LIBRARY_DIR} -lQtUiTools"      CACHE STRING "The QtUiTools library.")
+    # Set QT_QTUITOOLS_LIBRARY
+    FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 PATHS ${QT_LIBRARY_DIR} )
+    # Set QT_QTSCRIPT_LIBRARY
+    FIND_LIBRARY(QT_QTSCRIPT_LIBRARY NAMES QtScript QtScript4    PATHS ${QT_LIBRARY_DIR} )

   ELSE (QT_USE_FRAMEWORKS)

@@ -1066,7 +1127,10 @@
   IF(UNIX)
     # on OS X X11 may not be required
     IF (Q_WS_X11)
-    FIND_PACKAGE(X11)
+      FIND_PACKAGE(X11 REQUIRED)
+      IF(NOT X11_ICE_FOUND)
+        MESSAGE(FATAL_ERROR "X11 ICE library not found")
+      ENDIF(NOT X11_ICE_FOUND)
     ENDIF (Q_WS_X11)
     FIND_PACKAGE(Threads)
     SET(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})


Version 0.1.8

Version 0.1.8

--- cmake/Version.cmake
+++ cmake/Version.cmake
@@ -13,7 +13,7 @@
 # The PATCH version can be incremented whenever it is necessary.  The patch version should be
 # incremented whenever there is a "release" in any form, but can also be incremented periodically
 # for testing purposes.
-set(CGUL_VERSION_PATCH 7)
+set(CGUL_VERSION_PATCH 8)

 # Combined version
 set(CGUL_VERSION ${CGUL_VERSION_MAJOR}.${CGUL_VERSION_MINOR}.${CGUL_VERSION_PATCH})


kconfig: Don't set the deprecated env var KCONFIG_AUTOHEADER

KCONFIG_AUTOHEADER is an environment variable that was used by the C
Kconfig tools to determine where the autconf.h file is. After the
migration to python this environment variable became unused.

This patch removes the deprecated env var.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/kconfig.cmake
+++ cmake/kconfig.cmake
@@ -23,7 +23,6 @@
 set(ENV{srctree}            ${ZEPHYR_BASE})
 set(ENV{KERNELVERSION}      ${PROJECT_VERSION})
 set(ENV{KCONFIG_CONFIG}     ${DOTCONFIG})
-set(ENV{KCONFIG_AUTOHEADER} ${AUTOCONF_H})

 # Set environment variables so that Kconfig can prune Kconfig source
 # files for other architectures


CMake profile: fix comments

CMake profile: fix comments

--- cmake/profile.cmake
+++ cmake/profile.cmake
@@ -1,7 +1,7 @@
 # Copyright (c) 2020 ARM Limited. All rights reserved.
 # SPDX-License-Identifier: Apache-2.0

-# Set Develop as our default type if no other selected
+# Set the default build type if none is specified
 if(NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE "Develop" CACHE
         STRING "The type of build" FORCE)
@@ -17,14 +17,15 @@

 get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
 if(multi_config)
-    # multi configuration generators do not support build type, providing a list only
+    # Provide only a list as multi configuration generators do not support build type
     set(CMAKE_CONFIGURATION_TYPES "${MBED_BUILD_TYPES}" CACHE STRING "List of supported build types" FORCE)
 else()
     # Set the possible values of build type for cmake-gui
     set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${MBED_BUILD_TYPES}")
+
     if(NOT LOWERCASE_CMAKE_BUILD_TYPE IN_LIST LOWERCASE_MBED_BUILD_TYPES)
         message(FATAL_ERROR "Invalid build type '${CMAKE_BUILD_TYPE}'. Possible values:\n ${MBED_BUILD_TYPES}")
-  endif()
+    endif()
 endif()

 include(${MBED_ROOT}/cmake/profiles/${LOWERCASE_CMAKE_BUILD_TYPE}.cmake)


erthink: tests: update/sync cmake module.

--- cmake/testing.cmake
+++ cmake/testing.cmake
@@ -110,24 +110,10 @@
           set(local_minimal_optimize "")
         endif()
       endif()
-      if(CMAKE_VERSION VERSION_GREATER 2.8.11)
-        target_compile_options(gtest PRIVATE ${local_warn_no_error} ${local_minimal_optimize})
-        target_compile_options(gtest_main PRIVATE ${local_warn_no_error} ${local_minimal_optimize})
-      else()
-        set_target_properties(gtest PROPERTIES COMPILE_FLAGS "${local_warn_no_error} ${local_minimal_optimize}")
-        set_target_properties(gtest_main PROPERTIES COMPILE_FLAGS "${local_warn_no_error} ${local_minimal_optimize}")
-      endif()
+      target_compile_options(gtest PRIVATE ${local_warn_no_error} ${local_minimal_optimize})
+      target_compile_options(gtest_main PRIVATE ${local_warn_no_error} ${local_minimal_optimize})
       unset(local_warn_no_error)
       unset(local_minimal_optimize)
-    endif()
-
-    # The gtest/gtest_main targets carry header search path
-    # dependencies automatically when using CMake 2.8.11 or
-    # later. Otherwise we have to add them here ourselves.
-    if(CMAKE_VERSION VERSION_LESS 2.8.11)
-      set(GTEST_INCLUDE_DIR "${gtest_SOURCE_DIR}/include")
-    else()
-      set(GTEST_INCLUDE_DIR "")
     endif()

     set(GTEST_BOTH_LIBRARIES gtest gtest_main)
@@ -138,14 +124,13 @@
 if(GTEST_FOUND)
   include(CTest)
   enable_testing()
-  set(UT_INCLUDE_DIRECTORIES ${GTEST_INCLUDE_DIR})
   set(UT_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
   if(MEMORYCHECK_COMMAND OR CMAKE_MEMORYCHECK_COMMAND)
     add_custom_target(test_memcheck
       COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --test-action memcheck
       COMMAND ${CAT} "${CMAKE_BINARY_DIR}/Testing/Temporary/MemoryChecker.*.log")
   endif()
-  if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+  if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
     # Windows don't have RPATH feature,
     # therefore we should prepare PATH or copy DLL(s)
     set(UT_NEED_DLLCRUTCH "Crutch for ${CMAKE_SYSTEM_NAME}")
@@ -199,7 +184,7 @@
       string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPERCASE)
       foreach(dep IN LISTS params_LIBRARY GTEST_BOTH_LIBRARIES)
         get_target_property(type ${dep} TYPE)
-        if(NOT ${type} STREQUAL "STATIC_LIBRARY" AND NOT ${type} STREQUAL "INTERFACE_LIBRARY")
+        if(type STREQUAL SHARED_LIBRARY)
           # Windows don't have RPATH feature,
           # therefore we should prepare PATH or copy DLL(s)...
           if(CMAKE_CONFIGURATION_TYPES)
@@ -215,11 +200,7 @@
               get_target_property(filename ${dep} LOCATION)
             endif()
             if(filename)
-              if(CMAKE_VERSION VERSION_GREATER 2.8.11)
-                get_filename_component(dir ${filename} DIRECTORY)
-              else()
-                get_filename_component(dir ${filename} PATH)
-              endif()
+              get_filename_component(dir ${filename} DIRECTORY)
             else(filename)
               get_target_property(dir ${dep} LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE_UPPERCASE})
               if(NOT dir)
@@ -238,6 +219,9 @@
           else(dir)
             # Path is configuration-depended or not available, should copy dll
             add_custom_command(TARGET ${target} POST_BUILD
+              COMMAND if exist "$<TARGET_PDB_FILE:${dep}>"
+              ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_PDB_FILE:${dep}>" "$<TARGET_FILE_DIR:${target}>")
+            add_custom_command(TARGET ${target} POST_BUILD
               COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${dep}>" "$<TARGET_FILE_DIR:${target}>"
               COMMENT "${UT_NEED_DLLCRUTCH}: Copy shared library ${dep} for test ${target}")
           endif(dir)
@@ -261,14 +245,14 @@
       endif()
       if(params_DLLPATH)
         # Compose DLL's path in the ENVIRONMENT property
-        if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+        if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
           set(params_DLLPATH_ENV "${params_DLLPATH};$ENV{PATH}")
         else()
           set(params_DLLPATH_ENV "${params_DLLPATH}:$ENV{PATH}")
           string(REPLACE ":" ";" params_DLLPATH_ENV "${params_DLLPATH_ENV}")
         endif()
         list(REMOVE_DUPLICATES params_DLLPATH_ENV)
-        if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+        if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
           string(REPLACE ";" "\\;" params_DLLPATH_ENV "${params_DLLPATH_ENV}")
         else()
           string(REPLACE ";" ":" params_DLLPATH_ENV "${params_DLLPATH_ENV}")


ENH: CI: Indicate failure when tests fail

Indicate failure in the test driver script if ctest_test fails, i.e. if
tests fail. This ensures that test failures propagate up to the script
that runs ctest.

--- CMake/CircleCI/CircleCI_CTK_Docker.cmake
+++ CMake/CircleCI/CircleCI_CTK_Docker.cmake
@@ -85,6 +85,13 @@

 ctest_build( BUILD ${CTK_BINARY_DIR} )

-ctest_test( BUILD ${CTEST_BINARY_DIRECTORY} )
+ctest_test(
+  BUILD ${CTEST_BINARY_DIRECTORY}
+  RETURN_VALUE result
+  )

 ctest_submit()
+
+if(result)
+  message(FATAL_ERROR "ERROR: Tests failed")
+endif()


ENH: vtkRectilinearGridToPolyDataFilter -> vtkPolyDataAlgorithm and vtkStructuredGridToPolyDataFilter -> vtkPolyDataAlgorithm

--- Utilities/Upgrading/NewPipeConvertPolyData.cmake
+++ Utilities/Upgrading/NewPipeConvertPolyData.cmake
@@ -34,6 +34,16 @@

 STRING (REGEX REPLACE
   "vtkStructuredPointsToPolyDataFilter"
+  "vtkPolyDataAlgorithm"
+  H_CONTENTS "${H_CONTENTS}")
+
+STRING (REGEX REPLACE
+  "vtkRectilinearGridToPolyDataFilter"
+  "vtkPolyDataAlgorithm"
+  H_CONTENTS "${H_CONTENTS}")
+
+STRING (REGEX REPLACE
+  "vtkStructuredGridToPolyDataFilter"
   "vtkPolyDataAlgorithm"
   H_CONTENTS "${H_CONTENTS}")


Removing old findPagmo script

Removing old findPagmo script

--- Tudat/External/CMake/FindPaGMO.cmake
+++ Tudat/External/CMake/FindPaGMO.cmake
@@ -1,112 +0,0 @@
- #    Copyright (c) 2010-2017, Delft University of Technology
- #    All rigths reserved
- #
- #    This file is part of the Tudat. Redistribution and use in source and
- #    binary forms, with or without modification, are permitted exclusively
- #    under the terms of the Modified BSD license. You should have received
- #    a copy of the license with this file. If not, please or visit:
- #    http://tudat.tudelft.nl/LICENSE.
- #
- #    References
- #      FindEigen3.cmake (2-clause BSD license)
- #
- #    Notes
- #	    Sets the following variables:
- #          PAGMO_INCLUDE_DIR    - Source directory to include
- #
- #   	    PAGMO_VERSION        - PaGMO version found e.g. 2.4.0
- #   	    PAGMO_VERSION_MAJOR  - PaGMO major version found e.g. 2
- #   	    PAGMO_VERSION_MINOR  - PaGMO minor version found e.g. 4
- #   	    (PAGMO_VERSION_PATCH  - PaGMO patch version found e.g. 0)
-
-macro(_pagmo_check_version)
-
-  message(STATUS "Checking for PaGMO in: ${PAGMO_BASE_PATH} and ${PAGMO_BUILD_PATH}" )
-
-  # Reads the version from a file in the build folder
-  file(READ "${PAGMO_BUILD_PATH}/include/pagmo/config.hpp" _pagmo_header)
-
-  STRING(REGEX REPLACE "^.*define PAGMO_VERSION_MAJOR ([0-9]+).*" "\\1" PAGMO_VERSION_MAJOR "${_pagmo_header}")
-  STRING(REGEX REPLACE "^.*define PAGMO_VERSION_MINOR ([0-9]+).*" "\\1" PAGMO_VERSION_MINOR "${_pagmo_header}")
-  set(PAGMO_VERSION ${PAGMO_VERSION_MAJOR}.${PAGMO_VERSION_MINOR}.0)
-
-  # Only check version if a required is set.
-  if(PaGMO_FIND_VERSION)
-    if(${PAGMO_VERSION} VERSION_LESS ${PaGMO_FIND_VERSION})
-      set(PAGMO_VERSION_OK FALSE)
-    else(${PAGMO_VERSION} VERSION_LESS ${PaGMO_FIND_VERSION})
-      set(PAGMO_VERSION_OK TRUE)
-    endif(${PAGMO_VERSION} VERSION_LESS ${PaGMO_FIND_VERSION})
-  else(PaGMO_FIND_VERSION)
-      set(PAGMO_VERSION_OK TRUE)
-  endif(PaGMO_FIND_VERSION)
-
-  if(NOT PAGMO_VERSION_OK)
-    message(STATUS "PaGMO version ${PAGMO_VERSION} found in ${PAGMO_INCLUDE_DIR}, "
-                   "but at least version ${PaGMO_FIND_VERSION} is required!")
-  endif(NOT PAGMO_VERSION_OK)
-
-  #Set include directories
-  set(PAGMO_INCLUDE_DIR "${PAGMO_BASE_PATH}/include/;${PAGMO_BUILD_PATH}/include/")
-endmacro(_pagmo_check_version)
-
-
-if(PAGMO_BASE_PATH)
-
-  set(PAGMO_BASE_PATH_INIT ON)
-
-else (PAGMO_BASE_PATH)
-  find_path(PAGMO_BASE_PATH NAMES pagmo-config.cmake.in
-      PATHS
-      ${PROJECT_SOURCE_DIR}/pagmo2
-      ${PROJECT_SOURCE_DIR}/../pagmo2
-      ${PROJECT_SOURCE_DIR}/../../../pagmo2
-      ${PROJECT_SOURCE_DIR}/../../../../pagmo2
-      ${PROJECT_SOURCE_DIR}/../../../../../pagmo2
-    )
-
-    if(PAGMO_BASE_PATH)
-	set(PAGMO_BASE_PATH_INIT ON)
-	else(PAGMO_BUILD_PATH)
-	message(STATUS "Couldn't find PaGMO directory!")
-    endif()
-
-    mark_as_advanced(PAGMO_BASE_PATH)
-
-endif(PAGMO_BASE_PATH)
-
-
-if(PAGMO_BUILD_PATH)
-
-  set(PAGMO_BUILD_PATH_INIT ON)
-
-else (PAGMO_BUILD_PATH)
-  find_path(PAGMO_BUILD_PATH NAMES "include/pagmo/config.hpp"
-      PATHS
-      ${CMAKE_BINARY_DIR}/pagmo2
-      ${CMAKE_BINARY_DIR}/../pagmo2
-      ${CMAKE_BINARY_DIR}/../../../pagmo2
-      ${CMAKE_BINARY_DIR}/../../../../pagmo2
-      ${CMAKE_BINARY_DIR}/../../../../../pagmo2
-    )
-
-    if(PAGMO_BUILD_PATH)
-	set(PAGMO_BUILD_PATH_INIT ON)
-    else(PAGMO_BUILD_PATH)
-	message(STATUS "Couldn't find PaGMO build directory!")
-    endif()
-
-    mark_as_advanced(PAGMO_BUILD_PATH)
-
-endif(PAGMO_BUILD_PATH)
-
-
-if(PAGMO_BASE_PATH_INIT AND PAGMO_BUILD_PATH_INIT)
-    _pagmo_check_version()
-    set(FOUND_PAGMO ${PAGMO_VERSION_OK})
-endif()
-
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(PaGMO DEFAULT_MSG PAGMO_INCLUDE_DIR  PAGMO_VERSION_OK)
-


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


Deactivated Test unitl Tobi is back

Deactivated Test unitl Tobi is back

--- Modules/Segmentation/Testing/files.cmake
+++ Modules/Segmentation/Testing/files.cmake
@@ -8,7 +8,8 @@
 set(MODULE_IMAGE_TESTS
   mitkManualSegmentationToSurfaceFilterTest.cpp
   mitkOverwriteSliceImageFilterTest.cpp
-  mitkOverwriteSliceFilterTest.cpp
+#Deactivate due to Bug 12340. Should be fixed soon!
+#  mitkOverwriteSliceFilterTest.cpp
 )
 set(MODULE_CUSTOM_TESTS
 )


Added comments after some prior edits

Added comments after some prior edits

--- cmake/CMakeModules/FindOpenCV.cmake
+++ cmake/CMakeModules/FindOpenCV.cmake
@@ -41,33 +41,34 @@

 endmacro(FIND_OPENCV_LIBRARY MYLIBRARY MYLIBRARYNAME)

+# Required
 FIND_OPENCV_LIBRARY(OPENCV_CALIB3D_LIBRARY opencv_calib3d)
-FIND_OPENCV_LIBRARY(OPENCV_CONTRIB_LIBRARY opencv_contrib)
 FIND_OPENCV_LIBRARY(OPENCV_CORE_LIBRARY opencv_core)
 FIND_OPENCV_LIBRARY(OPENCV_FEATURES2D_LIBRARY opencv_features2d)
 FIND_OPENCV_LIBRARY(OPENCV_XFEATURES2D_LIBRARY opencv_xfeatures2d)
 FIND_OPENCV_LIBRARY(OPENCV_FLANN_LIBRARY opencv_flann)
-FIND_OPENCV_LIBRARY(OPENCV_GPU_LIBRARY opencv_gpu)
 FIND_OPENCV_LIBRARY(OPENCV_HIGHGUI_LIBRARY opencv_highgui)
 FIND_OPENCV_LIBRARY(OPENCV_IMGPROC_LIBRARY opencv_imgproc)
 FIND_OPENCV_LIBRARY(OPENCV_ML_LIBRARY opencv_ml)
+
+# Optional
 FIND_OPENCV_LIBRARY(OPENCV_IMGCODECS_LIBRARY opencv_imgcodecs)
+FIND_OPENCV_LIBRARY(OPENCV_CONTRIB_LIBRARY opencv_contrib)
+FIND_OPENCV_LIBRARY(OPENCV_GPU_LIBRARY opencv_gpu)

-message( STATUS "OPENCV_INCLUDE_DIR        = ${OPENCV_INCLUDE_DIR}" )
-message( STATUS "OPENCV_CALIB3D_LIBRARY    = ${OPENCV_CALIB3D_LIBRARY}" )
-message( STATUS "OPENCV_CONTRIB_LIBRARY    = ${OPENCV_CONTRIB_LIBRARY}" )
-message( STATUS "OPENCV_CORE_LIBRARY       = ${OPENCV_CORE_LIBRARY}" )
-message( STATUS "OPENCV_FEATURES2D_LIBRARY = ${OPENCV_FEATURES2D_LIBRARY}" )
+message( STATUS "OPENCV_INCLUDE_DIR         = ${OPENCV_INCLUDE_DIR}" )
+message( STATUS "OPENCV_CALIB3D_LIBRARY     = ${OPENCV_CALIB3D_LIBRARY}" )
+message( STATUS "OPENCV_CORE_LIBRARY        = ${OPENCV_CORE_LIBRARY}" )
+message( STATUS "OPENCV_FEATURES2D_LIBRARY  = ${OPENCV_FEATURES2D_LIBRARY}" )
 message( STATUS "OPENCV_XFEATURES2D_LIBRARY = ${OPENCV_XFEATURES2D_LIBRARY}" )
-message( STATUS "OPENCV_FLANN_LIBRARY      = ${OPENCV_FLANN_LIBRARY}" )
-message( STATUS "OPENCV_GPU_LIBRARY        = ${OPENCV_GPU_LIBRARY}" )
-message( STATUS "OPENCV_HIGHGUI_LIBRARY    = ${OPENCV_HIGHGUI_LIBRARY}" )
-message( STATUS "OPENCV_IMGPROC_LIBRARY    = ${OPENCV_IMGPROC_LIBRARY}" )
-message( STATUS "OPENCV_ML_LIBRARY         = ${OPENCV_ML_LIBRARY}" )
-message( STATUS "OPENCV_IMGCODECS_LIBRARY  = ${OPENCV_IMGCODECS_LIBRARY}" )
+message( STATUS "OPENCV_FLANN_LIBRARY       = ${OPENCV_FLANN_LIBRARY}" )
+message( STATUS "OPENCV_HIGHGUI_LIBRARY     = ${OPENCV_HIGHGUI_LIBRARY}" )
+message( STATUS "OPENCV_IMGPROC_LIBRARY     = ${OPENCV_IMGPROC_LIBRARY}" )
+message( STATUS "OPENCV_ML_LIBRARY          = ${OPENCV_ML_LIBRARY}" )
+message( STATUS "OPENCV_CONTRIB_LIBRARY     = ${OPENCV_CONTRIB_LIBRARY}" )
+message( STATUS "OPENCV_IMGCODECS_LIBRARY   = ${OPENCV_IMGCODECS_LIBRARY}" )
+message( STATUS "OPENCV_GPU_LIBRARY         = ${OPENCV_GPU_LIBRARY}" )

-
-# Removed OPENCV_GPU_LIBRARY AND (drb 20140220)

 set(OPENCV_FOUND "NO")
 if(OPENCV_INCLUDE_DIR AND OPENCV_CALIB3D_LIBRARY AND OPENCV_CORE_LIBRARY AND OPENCV_FEATURES2D_LIBRARY AND OPENCV_XFEATURES2D_LIBRARY AND OPENCV_FLANN_LIBRARY AND OPENCV_HIGHGUI_LIBRARY AND OPENCV_IMGPROC_LIBRARY AND OPENCV_ML_LIBRARY)
@@ -84,7 +85,7 @@
    set(OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_CONTRIB_LIBRARY})
    message( STATUS "OPENCV_CONTRIB_LIBRARY        = ${OPENCV_CONTRIB_LIBRARY}" )
 else(OPENCV_FOUND AND OPENCV_CONTRIB_LIBRARY)
-   message( WARNING "Could not find optional OPENCV_CONTRIB_LIBRARY. " )
+   message( "Could not find optional OPENCV_CONTRIB library. " )
 endif(OPENCV_FOUND AND OPENCV_CONTRIB_LIBRARY)

 set(OPENCV_GPU_FOUND "NO")
@@ -93,7 +94,7 @@
    set(OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_GPU_LIBRARY})
    message( STATUS "OPENCV_GPU_LIBRARY        = ${OPENCV_GPU_LIBRARY}" )
 else(OPENCV_FOUND AND OPENCV_GPU_LIBRARY)
-   message( WARNING "Could not find optional OPENCV GPU Library. " )
+   message( "Could not find optional OPENCV GPU Library. " )
 endif(OPENCV_FOUND AND OPENCV_GPU_LIBRARY)

 set(OPENCV_IMGCODECS_FOUND "NO")
@@ -102,5 +103,6 @@
    set(OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_IMGCODECS_LIBRARY})
    message( STATUS "OPENCV_IMGCODECS_LIBRARY  = ${OPENCV_IMGCODECS_LIBRARY}" )
 else(OPENCV_FOUND AND OPENCV_IMGCODECS_LIBRARY)
-   message( WARNING "Could not find optional OPENCV Image Codecs Library" )
+   message( "Could not find optional OPENCV Image Codecs Library" )
 endif(OPENCV_FOUND AND OPENCV_IMGCODECS_LIBRARY)
+


detect mpiicc and mpiicpc correctly

detect mpiicc and mpiicpc correctly

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -352,7 +352,7 @@
 	string(REPLACE "." "_" _flag "__${_flag}__")
 	add_definitions("-D${_flag}")
 endforeach(_flag)
-	elseif(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc)$") # ICC (on Linux)
+	elseif(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc|mpiicc|mpiicpc)$") # ICC (on Linux)
 	_my_find(_available_vector_units_list "avx2"    _found)
 if(_found)
 	set(ARCH_FLAGS "${ARCH_FLAGS} -xCORE-AVX2")


print link directories, sometimes an usefull information...

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

--- Numerics/cmake/LibraryProjectSetup.cmake
+++ Numerics/cmake/LibraryProjectSetup.cmake
@@ -162,6 +162,7 @@
   ENDIF(BUILD_STATIC_LIBS)

   IF(BUILD_SHARED_LIBS)
+    MESSAGE(STATUS "Link directories : ${${PROJECT_NAME}_LINK_DIRECTORIES}")
     MESSAGE(STATUS "Link libraries : ${${PROJECT_NAME}_LINK_LIBRARIES}")
     TARGET_LINK_LIBRARIES(${PROJECT_NAME}_shared ${${PROJECT_NAME}_LINK_LIBRARIES})
     GET_TARGET_PROPERTY(${PROJECT_NAME}_SHARED_LIB ${PROJECT_NAME}_shared LOCATION)


Define ANDROID_NDK_HOST_SYSTEM_NAME/ANDROID_COMPILER_VERSION

--- cmake/modules/hunter_finalize.cmake
+++ cmake/modules/hunter_finalize.cmake
@@ -196,5 +196,41 @@
     if(NOT EXISTS "${ANDROID_GDBSERVER}")
       hunter_internal_error("gdbserver not found: ${ANDROID_GDBSERVER}")
     endif()
+
+    if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
+      if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
+        set(ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86_64")
+      else()
+        set(ANDROID_NDK_HOST_SYSTEM_NAME "darwin-x86")
+      endif()
+    elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
+      if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
+        set(ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86_64")
+      else()
+        set(ANDROID_NDK_HOST_SYSTEM_NAME "linux-x86")
+      endif()
+    elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
+      if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64")
+        set(ANDROID_NDK_HOST_SYSTEM_NAME "windows-x86_64")
+      else()
+        set(ANDROID_NDK_HOST_SYSTEM_NAME "windows")
+      endif()
+    else()
+      hunter_internal_error("Unknown host for Android")
+    endif()
+
+    set(ANDROID_COMPILER_VERSION "")
+    string(
+        REGEX
+        REPLACE
+        "^${CMAKE_ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_MACHINE_NAME}-(.*)/prebuilt/.*/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-$"
+        "\\1"
+        ANDROID_COMPILER_VERSION
+        "${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}"
+    )
+    string(COMPARE EQUAL "${ANDROID_COMPILER_VERSION}" "" is_empty)
+    if(is_empty)
+      hunter_internal_error("Parse failed")
+    endif()
   endif()
 endmacro()


PKG: JIRA 975 do not build patchelf on osx

--- SuperBuild/CMake/External_pkgtools.cmake
+++ SuperBuild/CMake/External_pkgtools.cmake
@@ -26,22 +26,33 @@
   ${CMAKE_BINARY_DIR}/PACKAGE-OTB/build/makeself.sh

   )
-
-ExternalProject_Add(PATCHELF
-  PREFIX "${PKGTOOLS_SB_PREFIX_DIR}"
-  URL "http://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.bz2"
-  URL_MD5 d02687629c7e1698a486a93a0d607947
-  DOWNLOAD_DIR   ${DOWNLOAD_LOCATION}
-  SOURCE_DIR "${PKGTOOLS_SB_PREFIX_DIR}/src-patchelf"
-  BINARY_DIR "${PKGTOOLS_SB_PREFIX_DIR}/build-patchelf"
-  TMP_DIR  "${PKGTOOLS_SB_PREFIX_DIR}/tmp-patchelf"
-  STAMP_DIR "${PKGTOOLS_SB_PREFIX_DIR}/stamp-patchelf"
-  PATCH_COMMAND  ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}/tools
-  CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir ${PKGTOOLS_SB_PREFIX_DIR}/src-patchelf
-  ./configure --prefix ${CMAKE_INSTALL_PREFIX}/tools
-  BUILD_COMMAND ${CMAKE_COMMAND} -E chdir ${PKGTOOLS_SB_PREFIX_DIR}/src-patchelf ${CMAKE_MAKE_PROGRAM}
-  INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${PKGTOOLS_SB_PREFIX_DIR}/src-patchelf/src/patchelf ${CMAKE_INSTALL_PREFIX}/tools
-  )
+if(UNIX)
+  if(APPLE)
+    ExternalProject_Add( PATCHELF
+      PREFIX             "${PKGTOOLS_SB_PREFIX_DIR}"
+      DOWNLOAD_COMMAND   ""
+      CONFIGURE_COMMAND  ""
+      BUILD_COMMAND      ""
+      INSTALL_COMMAND    ""
+      )
+  else()
+    ExternalProject_Add(PATCHELF
+      PREFIX "${PKGTOOLS_SB_PREFIX_DIR}"
+      URL "http://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.bz2"
+      URL_MD5 d02687629c7e1698a486a93a0d607947
+      DOWNLOAD_DIR   ${DOWNLOAD_LOCATION}
+      SOURCE_DIR "${PKGTOOLS_SB_PREFIX_DIR}/src-patchelf"
+      BINARY_DIR "${PKGTOOLS_SB_PREFIX_DIR}/build-patchelf"
+      TMP_DIR  "${PKGTOOLS_SB_PREFIX_DIR}/tmp-patchelf"
+      STAMP_DIR "${PKGTOOLS_SB_PREFIX_DIR}/stamp-patchelf"
+      PATCH_COMMAND  ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}/tools
+      CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir ${PKGTOOLS_SB_PREFIX_DIR}/src-patchelf
+      ./configure --prefix ${CMAKE_INSTALL_PREFIX}/tools
+      BUILD_COMMAND ${CMAKE_COMMAND} -E chdir ${PKGTOOLS_SB_PREFIX_DIR}/src-patchelf ${CMAKE_MAKE_PROGRAM}
+      INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${PKGTOOLS_SB_PREFIX_DIR}/src-patchelf/src/patchelf ${CMAKE_INSTALL_PREFIX}/tools
+      )
+  endif(APPLE)
+endif(UNIX)

 ExternalProject_Add( ${proj}
   PREFIX             "${PKGTOOLS_SB_PREFIX_DIR}"


pb debian compilation

pb debian compilation

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

--- Numerics/cmake/FindATLAS.cmake
+++ Numerics/cmake/FindATLAS.cmake
@@ -60,7 +60,7 @@
       SET(HAVE_CLAPACK_H 1)
     ENDIF(NOT CBLAS_INCLUDE_PATH)
   ELSE(NOT ATLAS_INCLUDE_PATH)
-    SET(ATLAS_INCLUDE_PATH ${ATLAS_INCLUDE_PATH}/atlas)
+    SET(ATLAS_INCLUDE_PATH ${ATLAS_INCLUDE_PATH})
     SET(HAVE_ATLAS 1)
     SET(HAVE_CBLAS_H 1)
     SET(HAVE_CLAPACK_H 1)


boards: stm32l562e_dk: Add STM32CubeProgrammer runner

This commit adds STM32CubeProgrammer runner to stm32l562e_dk.

Signed-off-by: Erwan Gouriou <de4d967452b83bb0e37525652734e7d9163b6a4c@linaro.org>

--- boards/arm/stm32l562e_dk/board.cmake
+++ boards/arm/stm32l562e_dk/board.cmake
@@ -12,10 +12,10 @@
   endif()
 endif()

-set_ifndef(BOARD_DEBUG_RUNNER pyocd)
-set_ifndef(BOARD_FLASH_RUNNER pyocd)

 board_runner_args(pyocd "--target=stm32l562qeixq")
+board_runner_args(stm32cubeprogrammer "--port=swd" "--reset=hw")

 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
+include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
 include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)


Should be defaulting OGRE_SET_USE_BOOST not OGRE_USE_BOOST

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -45,7 +45,7 @@
 set(OGRE_SET_DISABLE_DDS 0)
 set(OGRE_SET_NEW_COMPILERS 0)
 set(OGRE_STATIC_LIB 0)
-set(OGRE_USE_BOOST 0)
+set(OGRE_SET_USE_BOOST 0)
 if (OGRE_CONFIG_DOUBLE)
   set(OGRE_SET_DOUBLE 1)
 endif()


Patch #1430 Fixed GL render system build for TBB

--HG--
branch : v1-9

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -60,6 +60,10 @@
 	if (OGRE_CONFIG_THREAD_PROVIDER STREQUAL "tbb")
 		set(OGRE_THREAD_PROVIDER 3)
 		include_directories(${TBB_INCLUDE_DIRS})
+		if (WIN32)
+			add_definitions(-D_WIN32_WINNT=0x0501)
+		endif ()
+
 		set(OGRE_THREAD_LIBRARIES ${TBB_LIBRARIES})
 	endif ()
 endif()


On MSVC, enable intrinsics explicitly to avoid linker error on __InterlockedCompareExchange16 in debug mode when threading enabled

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -142,6 +142,12 @@
   set(CMAKE_SUPPRESS_REGENERATION true)
 endif()

+if (MSVC)
+  # Enable intrinsics on MSVC in debug mode
+  # Not actually necessary in release mode since /O2 implies /Oi but can't easily add this per build type?
+  add_definitions(/Oi)
+endif (MSVC)
+
 ### Commented because the FindOGRE script can currently fill this role better ###
 # # Create the CMake package files
 # if (WIN32)


ENH: by default, use boost headers only

ENH: by default, use boost headers only

--- CMake/External_boost.cmake
+++ CMake/External_boost.cmake
@@ -10,12 +10,13 @@
 if(USE_SYSTEM_BOOST)
   message(STATUS "  Using Boost system version")
 else()
+  SETUP_SUPERBUILD(PROJECT ${proj})

-  set(BOOST_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
-  set(BOOST_SB_SRC ${CMAKE_BINARY_DIR}/${proj}/src/${proj})
+  option(SUPERBUILD_BOOST_HEADER_ONLY "Only use Boost headers" ON)
+  mark_as_advanced(SUPERBUILD_BOOST_HEADER_ONLY)

   if(UNIX)
-    if(FALSE)
+    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"
@@ -42,6 +43,9 @@
             --prefix=${CMAKE_INSTALL_PREFIX}
         BUILD_COMMAND ./b2
         INSTALL_COMMAND ./b2 install
+        PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory
+          ${CMAKE_SOURCE_DIR}/patches/${proj}/1.54.0
+          ${BOOST_SB_SRC}
       )

       ExternalProject_Add_Step(${proj} copy_source


checkout only ossim from svn rather than using full OSSIM source

--- CMake/External_ossim.cmake
+++ CMake/External_ossim.cmake
@@ -19,6 +19,7 @@
   set(${proj}_DEPENDENCIES)
   set(OSSIM_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
   set(OSSIM_SB_SRC ${CMAKE_BINARY_DIR}/${proj}/src/${proj})
+

   # set project dependencies (GEOS, GDAL, TIFF, JPEG, OPENTHREADS, )
   if(USE_SYSTEM_TIFF)
@@ -70,48 +71,62 @@
       )
     list(APPEND ${proj}_DEPENDENCIES OPENTHREAD)
   endif()
+
+    ExternalProject_Add(ossim_cmakemodules
+    PREFIX ${proj}/_cmakemodules
+    SVN_REPOSITORY "http://svn.osgeo.org/ossim/trunk/ossim_package_support/cmake/CMakeModules"
+    SVN_REVISION -r 23087
+    CONFIGURE_COMMAND ""
+    BUILD_COMMAND ""
+    INSTALL_COMMAND "")
+
+  set(extra_flags  -D__STDC_CONSTANT_MACROS)
+  if(MSVC)
+    #checkout cmakeModules
+    set(${proj}_DEPENDENCIES ossim_cmakemodules)
+    #cmake flags for exception handling in c++
+    #set(extra_flags /EHsc)
+    #clear all dependent library settings except GEOTIFF as we link with gdal_i.
+    #This is because of gisinternals built with internal geotiff
+    set(OSSIM_SB_TIFF_CONFIG)
+    set(OSSIM_SB_GEOS_CONFIG)
+    set(OSSIM_SB_JPEG_CONFIG)
+    set(OSSIM_SB_OPENTHREAD_CONFIG)
+    #build geotiff and use it
+    set(OSSIM_SB_GEOTIFF_CONFIG -DGEOTIFF_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/gdal_i.lib)
+  endif()

   ExternalProject_Add(${proj}
     PREFIX ${proj}
-    URL "http://download.osgeo.org/ossim/source/latest/ossim-1.8.18-1.tar.gz"
-    URL_MD5 c61e77f3fab08df0e486367eb4365c91
+    SVN_REPOSITORY "http://svn.osgeo.org/ossim/trunk/ossim/"
+    SVN_REVISION -r 23087
     BINARY_DIR ${OSSIM_SB_BUILD_DIR}
     INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
     CMAKE_CACHE_ARGS
-      -DOSSIM_DEV_HOME:STRING=${OSSIM_SB_SRC}
       -DOSSIM_VERSION:STRING=1.8.18-1
       -DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
       -DCMAKE_BUILD_TYPE:STRING=Release
-      -DBUILD_CSMAPI:BOOL=OFF
-      -DBUILD_OSSIMCSM_PLUGIN:STRING=OFF
-      -DBUILD_OSSIMLIBRAW_PLUGIN:STRING=OFF
-      -DCMAKE_CXX_FLAGS:STRING=-D__STDC_CONSTANT_MACROS
-      -DWMS_INCLUDE_DIR:STRING=${OSSIM_SB_SRC}/libwms/include
       ${OSSIM_SB_TIFF_CONFIG}
       ${OSSIM_SB_GEOTIFF_CONFIG}
       ${OSSIM_SB_GEOS_CONFIG}
       ${OSSIM_SB_JPEG_CONFIG}
       ${OSSIM_SB_OPENTHREAD_CONFIG}
-      -DBUILD_OSSIMPREDATOR:BOOL=OFF
-      -DBUILD_OSSIMPLANET:BOOL=OFF
-      -DBUILD_OSSIMPLANETQT:BOOL=OFF
       -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
-      -DBUILD_OSSIMQT4:BOOL=OFF
-      -DBUILD_OSSIMGUI:BOOL=OFF
-      -DBUILD_OMS:BOOL=OFF
-      -DBUILD_WMS:BOOL=OFF
-      -DCMAKE_MODULE_PATH:PATH=${OSSIM_SB_SRC}/ossim_package_support/cmake/CMakeModules
-    PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/ossim_patch_1.cmake
     DEPENDS ${${proj}_DEPENDENCIES}
     CMAKE_COMMAND
       # use 'env' because CTest launcher doesn't perform shell interpretation
       env LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib
       ${CMAKE_COMMAND}
     )
+
+    ExternalProject_Add_Step(${proj} copy_CMakeModules
+      COMMAND ${CMAKE_COMMAND} -E copy_directory
+      ${CMAKE_BINARY_DIR}/${proj}/_cmakemodules/src/ossim_cmakemodules ${OSSIM_SB_SRC}/CMakeModules
+      DEPENDEES patch update
+      DEPENDERS configure
+    )

-  # Write patch file in binary dir
-  file(WRITE ${CMAKE_BINARY_DIR}/ossim_patch_1.cmake
-  "file(WRITE ${OSSIM_SB_SRC}/CMakeLists.txt \"add_subdirectory(ossim_package_support/cmake)\")")
+  list(APPEND OTB_DEPS ${proj})

   message(STATUS "  Using OSSIM SuperBuild version")
 endif()


From Michael Platings, "I've updated the FBX plugin to use the latest version of the FBX SDK. I've checked in the plugin files myself, but I need you to check in this change to FindFBX.cmake to change the SDK directory."

--- CMakeModules/FindFBX.cmake
+++ CMakeModules/FindFBX.cmake
@@ -9,7 +9,7 @@
 # correspond to the ./configure --prefix=$FBX_DIR

 IF(WIN32)
-SET(FBX_ROOT "$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2010.2" CACHE PATH "Location of FBX SDK directory")
+SET(FBX_ROOT "$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2011.2" CACHE PATH "Location of FBX SDK directory")
 ELSE(WIN32)
 SET(FBX_ROOT $ENV{FBX_DIR} CACHE PATH "Location of FBX SDK directory")
 ENDIF(WIN32)


Bugfix

Bugfix

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

--- deal.II/cmake/configure/configure_boost.cmake
+++ deal.II/cmake/configure/configure_boost.cmake
@@ -91,11 +91,6 @@
     ADD_SUBDIRECTORY(${boost_folder}/libs/thread/src)
   ENDIF()

-  #
-  # We were able to use contrib boost, so hide some cached variables:
-  #
-  MARK_AS_ADVANCED(Boost_DIR)
-
   SET(${var} TRUE)
 ENDMACRO()


Fix POLICY CMP0054 unknown (#291)

Fix POLICY CMP0054 unknown (#291)

--- rosserial_arduino/arduino-cmake/cmake/Platform/Arduino.cmake
+++ rosserial_arduino/arduino-cmake/cmake/Platform/Arduino.cmake
@@ -283,7 +283,9 @@
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 #=============================================================================#
 cmake_minimum_required(VERSION 2.8.5)
-cmake_policy(SET CMP0054 NEW)
+if(POLICY CMP0054)
+	cmake_policy(SET CMP0054 NEW)
+endif(POLICY CMP0054)
 include(CMakeParseArguments)


BUG: Turn off ImageViewer building - does not compile with MacOSX 10.9

--- Dante_Aylward_TubeTK.cmake
+++ Dante_Aylward_TubeTK.cmake
@@ -37,7 +37,7 @@

 set( TubeTK_USE_BOOST OFF )
 set( TubeTK_USE_CTK ON )
-set( TubeTK_USE_IMAGE_VIEWER ON )
+set( TubeTK_USE_IMAGE_VIEWER OFF )
 set( TubeTK_USE_LIBSVM OFF )
 set( TubeTK_USE_NOTEBOOKS OFF )
 set( TubeTK_USE_NUMPY OFF )


getdeps: add an install_fb_python_executable() function to the CMake utilities

Summary:
Add a `install_fb_python_executable()` function to `FBPythonBinary.cmake` for
helping to install python executables generated with
`add_fb_python_executable()`.  This primarily helps by automatically looking
up the correct output file to install from the generated targets.

Reviewed By: wez

Differential Revision: D18774539

fbshipit-source-id: 4b397580d72ac448f21d1db6d2cdd653cf3635df

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -548,6 +548,30 @@
 endfunction()

 #
+# Install an FB-style packaged python binary.
+#
+# - DESTINATION <export-name>:
+#   Associate the installed target files with the given export-name.
+#
+function(install_fb_python_executable TARGET)
+  # Parse the arguments
+  set(one_value_args DESTINATION)
+  set(multi_value_args)
+  fb_cmake_parse_args(
+    ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
+  )
+
+  if(NOT DEFINED ARG_DESTINATION)
+    set(ARG_DESTINATION bin)
+  endif()
+
+  install(
+    PROGRAMS "$<TARGET_PROPERTY:${TARGET}.GEN_PY_EXE,EXECUTABLE>"
+    DESTINATION "${ARG_DESTINATION}"
+  )
+endfunction()
+
+#
 # Install a python library.
 #
 # - EXPORT <export-name>:


simplify patch_command usage

simplify patch_command usage

I had to remove some quotes...

--- SuperBuild/External_HDF5.cmake
+++ SuperBuild/External_HDF5.cmake
@@ -62,21 +62,21 @@
   if (WIN32 AND (${HDF5_DOWNLOAD_VERSION} STREQUAL 1.8.12))
     find_program(GIT "git")
     set(PATCHFILE "${CMAKE_SOURCE_DIR}/patches/hdf5-${HDF5_DOWNLOAD_VERSION}.patch")
-    set(PATCH_COMMAND "git apply -v --ignore-space-change --ignore-whitespace ${PATCHFILE}")
+    set(PATCH_COMMAND git apply -v --ignore-space-change --ignore-whitespace ${PATCHFILE})
+  else()
+    #make it empty, just to be sure
+    set(PATCH_COMMAND )
   endif()

   if (PATCH_COMMAND)
     message(STATUS "HDF5 PATCH_COMMAND=${PATCH_COMMAND}")
   endif()

-  # sadly, cannot use    "PATCH_COMMAND ${PATCH_COMMAND}" below. with weird error
-  if (PATCHFILE)
-   ExternalProject_Add(${proj}
+  ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     URL ${${proj}_URL}
     URL_HASH MD5=${${proj}_MD5}
-    PATCH_COMMAND ${GIT} apply -v --ignore-space-change --ignore-whitespace ${PATCHFILE}
-    #PATCH_COMMAND ${PATCH_COMMAND}
+    PATCH_COMMAND ${PATCH_COMMAND}
     SOURCE_DIR ${${proj}_SOURCE_DIR}
     BINARY_DIR ${${proj}_BINARY_DIR}
     DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
@@ -90,27 +90,7 @@
         -DHDF5_BUILD_HL_LIB:BOOL=${HDF5_BUILD_HL_LIB}
         -DBUILD_TESTING:BOOL=OFF
     INSTALL_DIR ${HDF5_Install_Dir}
-   )
-  else()
-   ExternalProject_Add(${proj}
-    ${${proj}_EP_ARGS}
-    URL ${${proj}_URL}
-    URL_HASH MD5=${${proj}_MD5}
-    SOURCE_DIR ${${proj}_SOURCE_DIR}
-    BINARY_DIR ${${proj}_BINARY_DIR}
-    DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
-    STAMP_DIR ${${proj}_STAMP_DIR}
-    TMP_DIR ${${proj}_TMP_DIR}
-
-    CMAKE_ARGS
-        ${CLANG_ARG}
-        -DHDF5_BUILD_EXAMPLES:BOOL=OFF
-        -DHDF5_BUILD_TOOLS:BOOL=OFF
-        -DHDF5_BUILD_HL_LIB:BOOL=${HDF5_BUILD_HL_LIB}
-        -DBUILD_TESTING:BOOL=OFF
-    INSTALL_DIR ${HDF5_Install_Dir}
-   )
-  endif()
+  )

   set( HDF5_ROOT ${HDF5_Install_Dir} )
   set( HDF5_INCLUDE_DIRS ${HDF5_ROOT}/include )


change STIR options

change STIR options

- remove requirement to compile with boost::shared_ptr
- disable ITK and CERN_ROOT support for now as it still causes too many
build problems

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -52,7 +52,8 @@
         -DCMAKE_INSTALL_PREFIX=${STIR_Install_Dir}
         -DGRAPHICS=None
         -DCMAKE_CXX_STANDARD=11
-        -DSTIR_USE_BOOST_SHARED_PTR=On
+        -DDISABLE_ITK=On
+        -DDISABLE_CERN_ROOT_Support=On
     INSTALL_DIR ${STIR_Install_Dir}
     DEPENDS
         ${${proj}_DEPENDENCIES}


some more STIR CMake variable changes

some more STIR CMake variable changes

- added STIR_DISABLE_LLN_MATRIX STIR_ENABLE_EXPERIMENTAL
- rename STIR_DISABLE_CERN_ROOT_SUPPORT to STIR_DISABLE_CERN_ROOT to be consistent with recent STIR naming

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -53,8 +53,11 @@

   option(BUILD_STIR_EXECUTABLES "Build all STIR executables" OFF)
   option(BUILD_STIR_SWIG_PYTHON "Build STIR Python interface" OFF)
-  option(STIR_DISABLE_CERN_ROOT_SUPPORT "DisableSTIR ROOT interface" ON)
-  mark_as_advanced(BUILD_STIR_EXECUTABLES BUILD_STIR_SWIG_PYTHON STIR_DISABLE_CERN_ROOT_SUPPORT)
+  option(STIR_DISABLE_CERN_ROOT "Disable STIR ROOT interface" ON)
+  option(STIR_DISABLE_LLN_MATRIX "Disable STIR Louvain-la-Neuve Matrix library for ECAT7 support" ON)
+  option(STIR_ENABLE_EXPERIMENTAL "Enable STIR experimental code" OFF)
+  mark_as_advanced(BUILD_STIR_EXECUTABLES BUILD_STIR_SWIG_PYTHON STIR_DISABLE_CERN_ROOT)
+  mark_as_advanced(STIR_DISABLE_LLN_MATRIX STIR_ENABLE_EXPERIMENTAL)

   if(${BUILD_STIR_SWIG_PYTHON} AND NOT "${PYTHON_STRATEGY}" STREQUAL "PYTHONPATH")
     message(FATAL_ERROR "STIR Python currently needs to have PYTHON_STRATEGY=PYTHONPATH")
@@ -77,6 +80,8 @@
         -DSTIR_OPENMP=${BUILD_STIR_WITH_OPENMP}
         # Use 2 variables for ROOT to cover multiple STIR versions
         -DDISABLE_CERN_ROOT_SUPPORT=${STIR_DISABLE_CERN_ROOT_SUPPORT} -DDISABLE_CERN_ROOT=${STIR_DISABLE_CERN_ROOT_SUPPORT}
+        -DDISABLE_LLN_MATRIX=${STIR_DISABLE_LLN_MATRIX}
+        -DSTIR_ENABLE_EXPERIMENTAL=${STIR_ENABLE_EXPERIMENTAL}
    )

   # Append CMAKE_ARGS for ITK choices


python3: Fix link error by improving generation of python3stub.def

This commit fixes regression originally introduced in b774ba7 (python3: Build
"python3dll" and fix msvc "xxlimited" link issue.)

The previous implementation of the "generate_libpythonstub_def" module
was omitting the last line of "python3.def". This was causing the following
link error:

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2001	unresolved external symbol _Py_VaBuildValue_SizeT	libpython3-shared	D:\T\python-cmake-buildsystem-build\CMakeBuild\libpython\python3.def	1

--- cmake/libpython/generate_libpythonstub_def.cmake
+++ cmake/libpython/generate_libpythonstub_def.cmake
@@ -6,9 +6,11 @@
 endforeach()

 file(STRINGS ${INPUT_DEF_FILE} def_lines REGEX "^  (.+)=.+$")
-set(stub_def_lines "EXPORTS")
+set(stub_def_lines "EXPORTS\n")
 foreach(line IN LISTS def_lines)
-  string(REGEX REPLACE "^  (.+)=.+$" "${CMAKE_MATCH_1}" updated_line ${line})
-  set(stub_def_lines "${stub_def_lines}${updated_line}\n")
+  string(REGEX MATCH "^  (.+)=.+$" output ${line})
+  if(NOT "${output}" STREQUAL "")
+    set(stub_def_lines "${stub_def_lines}${CMAKE_MATCH_1}\n")
+  endif()
 endforeach()
 file(WRITE ${OUTPUT_DEF_FILE} "${stub_def_lines}")


Clean up and improve fc_copy_sources and fc_target_copy_resource CMake macros

The previous steps of TO_NATIVE_PATH followed by ABSOLUTE
is not meaningful or reliable: output of ABSOLUTE is always in
"cmake" path format, not native path format. Native path input to
CMake commands may not do what you want.

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -42,16 +42,14 @@

 MACRO (fc_copy_sources target_name outpath)
 	foreach(it ${ARGN})
-		file(TO_NATIVE_PATH "${outpath}/${it}" outfile)
 		get_filename_component(infile ${it} ABSOLUTE)
-		get_filename_component(outfile ${outfile} ABSOLUTE)
-		add_file_dependencies(${infile} ${outfile})
+		get_filename_component(outfile "${outpath}/${it}" ABSOLUTE)
+		add_file_dependencies("${infile}" "${outfile}")
 		ADD_CUSTOM_COMMAND(
-			SOURCE    ${infile}
-			COMMAND   ${CMAKE_COMMAND}
-			ARGS      -E copy ${infile} ${outfile}
+			SOURCE    "${infile}"
+			COMMAND   "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}"
 			TARGET    ${target_name}
-			OUTPUTS   ${outfile}
+			OUTPUTS   "${outfile}"
 		)
 	endforeach(it)
 	ADD_CUSTOM_COMMAND(
@@ -63,17 +61,14 @@

 MACRO (fc_target_copy_resource target_name inpath outpath)
 	foreach(it ${ARGN})
-		file(TO_NATIVE_PATH "${inpath}/${it}" infile)
-		file(TO_NATIVE_PATH "${outpath}/${it}" outfile)
-		get_filename_component(infile ${infile} ABSOLUTE)
-		get_filename_component(outfile ${outfile} ABSOLUTE)
-		add_file_dependencies(${infile} ${outfile})
+		get_filename_component(infile "${inpath}/${it}" ABSOLUTE)
+		get_filename_component(outfile "${outpath}/${it}" ABSOLUTE)
+		add_file_dependencies("${infile}" "${outfile}")
 		ADD_CUSTOM_COMMAND(
-			SOURCE    ${infile}
-			COMMAND   ${CMAKE_COMMAND}
-			ARGS      -E copy ${infile} ${outfile}
+			SOURCE    "${infile}"
+			COMMAND   "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}"
 			TARGET    ${target_name}
-			OUTPUTS   ${outfile}
+			OUTPUTS   "${outfile}"
 		)
 	endforeach(it)
 	ADD_CUSTOM_COMMAND(


Can do lookup_package without calling find_package

Practical for special libraries like GTest that should not be installed.

--- scripts/PackageLookup.cmake
+++ scripts/PackageLookup.cmake
@@ -60,7 +60,7 @@
 endmacro()
 # Looks for a lookup package file and includes it.
 macro(lookup_package package)
-    set(solitos "DOWNLOAD_BY_DEFAULT;REQUIRED;QUIET;KEEP")
+    set(solitos "DOWNLOAD_BY_DEFAULT;REQUIRED;QUIET;KEEP;NOFIND")
     set(multiplos "ARGUMENTS;COMPONENTS")
     cmake_parse_arguments(${package} "${solitos}" "" "${multiplos}" ${ARGN})

@@ -74,10 +74,16 @@
     _get_sane_name(${package} SANENAME)
     if(${SANENAME}_RECURSIVE)
         set(recursive TRUE)
+        if(${package}_NOFIND)
+            set(${package}_FOUND TRUE CACHE BOOL "")
+        endif()
     endif()
     # First try and find package (unless downloading by default)
     set(dolook TRUE)
     if(${package}_DOWNLOAD_BY_DEFAULT AND NOT recursive)
+        set(dolook FALSE)
+    endif()
+    if(${package}_NOFIND)
         set(dolook FALSE)
     endif()
     # Figure out whether to add REQUIRED and QUIET keywords
@@ -158,7 +164,7 @@
     # Once the package has been found and configured,
     # the locations and such should not change, so
     # there is no need for a recursive cmake step.
-    if(NOT ${${found_var}})
+    if(NOT DEFINED ${found_var} OR NOT ${${found_var}})
         _get_sane_name(${recurse_name} SANENAME)
         set(cmake_arguments -DCMAKE_PROGRAM_PATH:PATH=${EXTERNAL_ROOT}/bin
                             -DCMAKE_LIBRARY_PATH:PATH=${EXTERNAL_ROOT}/lib


Delete FindCPM.cmake

Delete FindCPM.cmake

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


Update CTestScript:test failure->CI failure

--- cmake/CI.CTestScript.cmake
+++ cmake/CI.CTestScript.cmake
@@ -24,7 +24,11 @@
 # Done by default when not using a script... Do it here since the CTestCustom.cmake file is generated by our CMakeLists.
 ctest_read_custom_files( ${CTEST_BINARY_DIRECTORY} )
 ctest_build()
-ctest_test()
+ctest_test(RETURN_VALUE RET_VAL_TEST)
+if(RET_VAL_TEST)
+    # We need to send an error if we want to detect fails in CI
+    message(FATAL_ERROR "Some tests failed !")
+endif()
 if(CTEST_COVERAGE_COMMAND)
     ctest_coverage()
 else()


Disable -fsanitize=vptr

Disable -fsanitize=vptr

In the old build system it was disabled because of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67258.

That bug has since been fixed, but it still doesn't work with boost
and -fvisibility=hidden.

Signed-off-by: Rafael Ávila de Espíndola <1975039f9046bf513b77c0c5639a0efc25f00e7f@scylladb.com>
Message-Id: <20190103230155.20367-1-1975039f9046bf513b77c0c5639a0efc25f00e7f@scylladb.com>

--- cmake/FindSanitizers.cmake
+++ cmake/FindSanitizers.cmake
@@ -33,7 +33,8 @@
 check_cxx_source_compiles ("int main() {}" Sanitizers_UNDEFINED_BEHAVIOR_FOUND)

 if (Sanitizers_UNDEFINED_BEHAVIOR_FOUND)
-  set (Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS -fsanitize=undefined)
+  # Disable vptr because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88684
+  set (Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS "-fsanitize=undefined;-fno-sanitize=vptr")
 endif ()

 set (Sanitizers_COMPILER_OPTIONS
@@ -66,7 +67,7 @@

     set_target_properties (Sanitizers::undefined_behavior
       PROPERTIES
-        INTERFACE_COMPILE_OPTIONS ${Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS}
-        INTERFACE_LINK_LIBRARIES ${Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS})
+        INTERFACE_COMPILE_OPTIONS "${Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS}"
+        INTERFACE_LINK_LIBRARIES "${Sanitizers_UNDEFINED_BEHAVIOR_COMPILER_OPTIONS}")
   endif ()
 endif ()


fix prefix dir

fix prefix dir

--- cmake/get-sdl2_image.cmake
+++ cmake/get-sdl2_image.cmake
@@ -52,7 +52,7 @@
     PREFIX ${DEPENDENCY_EXTRACT_DIR}
     DOWNLOAD_DIR ${DEPENDENCY_DOWNLOAD_DIR}
     URL https://libsdl.org/projects/SDL_image/release/SDL2_image-${SDL2_IMAGE_VERSION}.tar.gz
-    CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXTERNAL_ROOT}
+    CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${DEPENDENCY_INSTALL_DIR}
   )

 endif()


Tweak commentary concerning placement of certain includes which use
the filter_rpath function which depends on languages being defined.

svn path=/trunk/; revision=12869

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -464,6 +464,7 @@
 include(java)
 include(python)
 include(octave)
+# tcl-related must come after c++ and fortran because of use of filter_rpath
 include(tcl-related)
 include(pdl)
 include(ada)
@@ -509,6 +510,7 @@
 # =======================================================================
 # additional library support
 # =======================================================================
+# shapelib must come after c++ and fortran because of use of filter_rpath
 # Support for shapelib library for reading shapefile map data
 include(shapelib)
 include(freetype)
@@ -520,7 +522,8 @@
     message(FATAL_ERROR "Cannot find required math library")
   endif(NOT MATH_LIB)
 endif(NOT WIN32_OR_CYGWIN)
-# Must come after MATH_LIB is defined (or not).
+# csiro must come after MATH_LIB is defined (or not).
+# csiro must come after c++ and fortran because of use of filter_rpath
 include(csiro)

@@ -532,6 +535,7 @@
 # =======================================================================
 # Device drivers
 # =======================================================================
+# drivers must come after c++ and fortran because of use of filter_rpath
 include(drivers)

 # =======================================================================


ci windows: replace more /Zi

ci windows: replace more /Zi

--- build/msvc_ccache.cmake
+++ build/msvc_ccache.cmake
@@ -1,5 +1,7 @@
 # ccache doesn't work with /Zi.
 # See also: https://github.com/ccache/ccache/issues/1040
+string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 string(REPLACE "/Zi" "/Z7"
   CMAKE_C_FLAGS_RELWITHDEBINFO
   "${CMAKE_C_FLAGS_RELWITHDEBINFO}")


fix hiredis include dir

fix hiredis include dir

--- project/cmake/modules/FindLibhiredis.cmake
+++ project/cmake/modules/FindLibhiredis.cmake
@@ -60,7 +60,7 @@
 set(Libhiredis_NAMES hiredis libhiredis)

 # Try each search configuration.
-find_path(Libhiredis_INCLUDE_DIRS    NAMES hiredis.h  ${_LIBHIREDIS_SEARCH_INCLUDE} PATH_SUFFIXES hiredis)
+find_path(Libhiredis_INCLUDE_DIRS    NAMES hiredis/hiredis.h  ${_LIBHIREDIS_SEARCH_INCLUDE})
 find_library(Libhiredis_LIBRARIES    NAMES ${Libhiredis_NAMES}  ${_LIBHIREDIS_SEARCH_LIB})

 mark_as_advanced(Libhiredis_INCLUDE_DIRS Libhiredis_LIBRARIES)


FIX: Add default module libs to samples when building static configuration.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -81,6 +81,14 @@
         ${CEGUI_SAMPLEHELPER_LIBNAME}
     )

+    if (NOT BUILD_SHARED_LIBS)
+        target_link_libraries(${CEGUI_TARGET_NAME}
+            "CEGUI${CEGUI_OPTION_DEFAULT_XMLPARSER}"
+            "CEGUI${CEGUI_OPTION_DEFAULT_IMAGECODEC}"
+            ${CEGUI_FALAGARD_WR_LIBNAME}
+        )
+    endif()
+
     if (UNIX AND NOT APPLE AND NOT WIN32)
         install(TARGETS ${CEGUI_TARGET_NAME}
             RUNTIME DESTINATION bin


Update Debian and RPM packages

Update Debian and RPM packages

--- cmake/CPackConfig.cmake
+++ cmake/CPackConfig.cmake
@@ -187,7 +187,7 @@
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "libccd-devel")
 endif()
 if(Coin_INCLUDE_DIRS AND Coin_LIBRARY_RELEASE)
-	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libcoin60-dev | libcoin80-dev")
+	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libcoin-dev | libcoin80-dev | libcoin60-dev")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "Coin3-devel")
 endif()
 if(Comedi_INCLUDE_DIRS AND Comedi_LIBRARY_RELEASE)
@@ -209,13 +209,17 @@
 	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libdc1394-22-dev")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "libdc1394-devel")
 endif()
+if(LIBLZMA_INCLUDE_DIRS AND LIBLZMA_LIBRARY_RELEASE)
+	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "liblzma-dev")
+	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "lzma-devel")
+endif()
 if(LIBXML2_INCLUDE_DIRS AND LIBXML2_LIBRARY_RELEASE)
 	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libxml2-dev")
 	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "libxml2-devel")
 endif()
-if(LIBXSLT__INCLUDE_DIRS AND LIBXSLT__LIBRARY_RELEASE)
-	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "LIBXSLT_1-dev")
-	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "LIBXSLT_-devel")
+if(LIBXSLT_INCLUDE_DIRS AND LIBXSLT_LIBRARY_RELEASE)
+	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libxslt1-dev")
+	list(APPEND CPACK_RPM_development_PACKAGE_REQUIRES "libxslt-devel")
 endif()
 if(NLopt_INCLUDE_DIRS AND NLopt_LIBRARY_RELEASE)
 	list(APPEND CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "libnlopt-dev")


better atomic check

better atomic check

--- cmake/CheckAtomic.cmake
+++ cmake/CheckAtomic.cmake
@@ -2,10 +2,18 @@
 include(CheckCSourceCompiles)

 check_c_source_compiles("
+#include <stdio.h>
+#include <stdlib.h>

 int main() {
-  int val = 0;
-  __sync_lock_test_and_set(&val, 1);
+  static volatile unsigned long val = 0;
+  unsigned long u =  __sync_add_and_fetch(&val, 1);
+
+  if(u - 1 == 0) {
+    return 0;
+  }
+
+  return 1;
 }

 " HAVE_ATOMIC_BUILTIN)


Added missing MTX files

Added missing MTX files

--- cmake/ExternalMTX.cmake
+++ cmake/ExternalMTX.cmake
@@ -184,12 +184,15 @@

 ##### SPGEMM Square MTX sparse data #####
 set( MTX_SPGEMM_BENCH_files
+  Williams/pdb1HYS.tar.gz
+  Williams/consph.tar.gz
   Williams/cant.tar.gz
   Williams/mac_econ_fwd500.tar.gz
   Williams/mc2depi.tar.gz
   Williams/cop20k_A.tar.gz
   Williams/webbase-1M.tar.gz
   Boeing/pwtk.tar.gz
+  Bova/rma10.tar.gz
   DNVS/shipsec1.tar.gz
   Hamm/scircuit.tar.gz
   Oberwolfach/filter3D.tar.gz
@@ -204,10 +207,13 @@
   FEMLAB/poisson3Da.tar.gz
 )

+MAP_ENTRY( "Williams/pdb1HYS.tar.gz" "fdbfaa0edb11e799f67870ebf16adfb0" )
+MAP_ENTRY( "Williams/consph.tar.gz" "797e984d97d0057c9b88a3e4dd9af139" )
 MAP_ENTRY( "Oberwolfach/filter3D.tar.gz" "7711518ed944ace91be385379ab329d6" )
 MAP_ENTRY( "Um/2cubes_sphere.tar.gz" "754df75667ef998582a0496df617f669" )
 MAP_ENTRY( "Williams/cant.tar.gz" "a5360391e462640583e59a7b36fa216c" )
 MAP_ENTRY( "Boeing/pwtk.tar.gz" "51617ea77ac8212ca3bf5c1eb041061b" )
+MAP_ENTRY( "Bova/rma10.tar.gz" "a899a0c48b9a58d081c52ffd88a84955" )
 MAP_ENTRY( "vanHeukelum/cage12.tar.gz" "845b88a6f304d0fa9b990e7602a25bcc" )
 MAP_ENTRY( "DNVS/shipsec1.tar.gz" "73372e7d6a0848f8b19d64a924fab73e" )
 MAP_ENTRY( "Williams/mac_econ_fwd500.tar.gz" "f1b0e56fbb75d1d6862874e3d7d33060" )


Corrected hash values of SpGemm MTX files

--- cmake/ExternalMTX.cmake
+++ cmake/ExternalMTX.cmake
@@ -199,31 +199,29 @@
   JGD_Homology/m133-b3.tar.gz
   QLi/majorbasis.tar.gz
   GHS_indef/mario002.tar.gz
-  FreeFieldTechnologies/mono_500Hz.tar.gz
   Um/offshore.tar.gz
   Pajek/patents_main.tar.gz
   FEMLAB/poisson3Da.tar.gz
 )

-MAP_ENTRY( "Oberwolfach/filter3D.tar.gz" "fdbfaa0edb11e799f67870ebf16adfb0" )
-MAP_ENTRY( "Um/2cubes_sphere.tar.gz" "797e984d97d0057c9b88a3e4dd9af139" )
+MAP_ENTRY( "Oberwolfach/filter3D.tar.gz" "7711518ed944ace91be385379ab329d6" )
+MAP_ENTRY( "Um/2cubes_sphere.tar.gz" "754df75667ef998582a0496df617f669" )
 MAP_ENTRY( "Williams/cant.tar.gz" "a5360391e462640583e59a7b36fa216c" )
 MAP_ENTRY( "Boeing/pwtk.tar.gz" "51617ea77ac8212ca3bf5c1eb041061b" )
-MAP_ENTRY( "vanHeukelum/cage12.tar.gz" "a899a0c48b9a58d081c52ffd88a84955" )
+MAP_ENTRY( "vanHeukelum/cage12.tar.gz" "845b88a6f304d0fa9b990e7602a25bcc" )
 MAP_ENTRY( "DNVS/shipsec1.tar.gz" "73372e7d6a0848f8b19d64a924fab73e" )
 MAP_ENTRY( "Williams/mac_econ_fwd500.tar.gz" "f1b0e56fbb75d1d6862874e3d7d33060" )
 MAP_ENTRY( "Williams/mc2depi.tar.gz" "8c8633eada6455c1784269b213c85ea6" )
 MAP_ENTRY( "Williams/cop20k_A.tar.gz" "beb2302025bbfae6fd1f5604957ffe52" )
 MAP_ENTRY( "Hamm/scircuit.tar.gz" "3e62f7ea83914f7e20019aefb2a5176f" )
 MAP_ENTRY( "Williams/webbase-1M.tar.gz" "2d4c239daad6f12d66a1e6a2af44cbdb" )
-MAP_ENTRY( "GHS_psdef/hood.tar.gz" "6279700b7d44b44fd630c079b31eee46" )
-MAP_ENTRY( "JGD_Homology/m133-b3.tar.gz" "29c5595e95c1f2476ada6fb397f0e2c9" )
-MAP_ENTRY( "QLi/majorbasis.tar.gz" "81a89740c4cd77052af9df5edaae2d1c" )
-MAP_ENTRY( "GHS_indef/mario002.tar.gz" "6cc995b3c4ec92cddaf9706ef2ac7457" )
-MAP_ENTRY( "FreeFieldTechnologies/mono_500Hz.tar.gz" "082f48c8d5af68c67ba229685691d09e" )
-MAP_ENTRY( "Um/offshore.tar.gz" "bac8efa0265bf9bd19d287677c2f455e" )
-MAP_ENTRY( "Pajek/patents_main.tar.gz" "bacaaa14de4398c981ba749665459324" )
-MAP_ENTRY( "FEMLAB/poisson3Da.tar.gz" "1eaf7aaf38385287505fe1d504f8a716" )
+MAP_ENTRY( "GHS_psdef/hood.tar.gz" "a88f673a6db10396188c26cfa20a20c4" )
+MAP_ENTRY( "JGD_Homology/m133-b3.tar.gz" "e2d3e32057598212f2ff0cfa6cb79dc6" )
+MAP_ENTRY( "QLi/majorbasis.tar.gz" "3f5d8f793dc7a9a154d360242ea59ba2" )
+MAP_ENTRY( "GHS_indef/mario002.tar.gz" "f30b3b246a343aadadf85e2f57258b5f" )
+MAP_ENTRY( "Um/offshore.tar.gz" "d175ea29a0ce7a35100f453126b1b357" )
+MAP_ENTRY( "Pajek/patents_main.tar.gz" "93eb3adebfb9052f5015598f59291920" )
+MAP_ENTRY( "FEMLAB/poisson3Da.tar.gz" "e37b9dd446d0374291359fe6589e3ffb" )

 set( SPGEMM_BENCH_MTX_path ${PROJECT_BINARY_DIR}/Externals/MTX/SpGemmData )


Build experimenting to get CLucene detection to work

svn path=/trunk/playground/base/strigi/; revision=557608

--- cmake/FindCLucene.cmake
+++ cmake/FindCLucene.cmake
@@ -13,13 +13,14 @@

   SET(TRIAL_LIBRARY_PATHS
     $ENV{CLUCENE_HOME}/lib
-    PATHS
+    $ENV{HOME}/testinstall/lib
     /usr/lib
     /usr/local/lib
     /sw/lib
   )
   SET(TRIAL_INCLUDE_PATHS
     $ENV{CLUCENE_HOME}/include
+    $ENV{HOME}/testinstall/include
     PATHS
     /usr/include
     /usr/local/include
@@ -27,8 +28,17 @@
   )

   FIND_LIBRARY(CLUCENE_LIBRARY clucene ${TRIAL_LIBRARY_PATHS})
+  if (CLUCENE_LIBRARY)
+    MESSAGE(STATUS "Found CLucene library: ${CLUCENE_LIBRARY}")
+  endif(CLUCENE_LIBRARY)
   FIND_PATH(CLUCENE_INCLUDE_DIR CLucene/StdHeader.h ${TRIAL_INCLUDE_PATHS})
+  if (CLUCENE_INCLUDE_DIR)
+    MESSAGE(STATUS "Found CLucene include dir: ${CLUCENE_INCLUDE_DIR}")
+  endif(CLUCENE_INCLUDE_DIR)
   FIND_PATH(CLUCENE_LIBRARY_DIR CLucene/clucene-config.h ${TRIAL_LIBRARY_PATHS})
+  if (CLUCENE_LIBRARY_DIR)
+    MESSAGE(STATUS "Found CLucene library dir: ${CLUCENE_LIBRARY_DIR}")
+  endif(CLUCENE_LIBRARY_DIR)

 IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARY AND CLUCENE_LIBRARY_DIR)
   SET(CLUCENE_FOUND 1 CACHE BOOL "Found CLucene library")
@@ -38,7 +48,7 @@

 IF(CLUCENE_FOUND)
   IF(NOT CLUCENE_FIND_QUIETLY)
-    MESSAGE(STATUS "Found CLucene: ${CLUCEN_LIBRARY}")
+    MESSAGE(STATUS "Found CLucene: ${CLUCENE_LIBRARY}")
   ENDIF(NOT CLUCENE_FIND_QUIETLY)
 ELSE(CLUCENE_FOUND)
   IF(CLucene_FIND_REQUIRED)


Find the x64 DXSDK libraries.

Find the x64 DXSDK libraries.

--- cmake/FindDirectX.cmake
+++ cmake/FindDirectX.cmake
@@ -26,6 +26,13 @@
 		DOC "DirectX SDK root directory")

+	if (CMAKE_CL_64)
+		set (DirectX_ARCHITECTURE x64)
+	else ()
+		set (DirectX_ARCHITECTURE x86)
+	endif ()
+
+
 	find_path (DirectX_D3D_INCLUDE_DIR d3d.h
 		PATHS
 			"${DirectX_ROOT_DIR}/Include"
@@ -38,12 +45,12 @@

 	find_library (DirectX_DDRAW_LIBRARY ddraw
 		PATHS
-			"${DirectX_ROOT_DIR}/Lib/x86"
+			"${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}"
 		DOC "The directory where ddraw resides")

 	find_library (DirectX_D3DX_LIBRARY d3dx
 		PATHS
-			"${DirectX_ROOT_DIR}/Lib/x86"
+			"${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}"
 		DOC "The directory where d3dx resides")

 	if (DirectX_D3D_INCLUDE_DIR AND DirectX_DDRAW_LIBRARY)
@@ -66,12 +73,12 @@

 	find_library (DirectX_D3D8_LIBRARY d3d8
 		PATHS
-			"${DirectX_ROOT_DIR}/Lib/x86"
+			"${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}"
 		DOC "The directory where d3d8 resides")

 	find_library (DirectX_D3DX8_LIBRARY d3dx8
 		PATHS
-			"${DirectX_ROOT_DIR}/Lib/x86"
+			"${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}"
 		DOC "The directory where d3dx8 resides")

 	if (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3D8_LIBRARY)
@@ -94,12 +101,12 @@

 	find_library (DirectX_D3D9_LIBRARY d3d9
 		PATHS
-			"${DirectX_ROOT_DIR}/Lib/x86"
+			"${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}"
 		DOC "The directory where d3d9 resides")

 	find_library (DirectX_D3DX9_LIBRARY d3dx9
 		PATHS
-			"${DirectX_ROOT_DIR}/Lib/x86"
+			"${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}"
 		DOC "The directory where d3dx9 resides")

 	if (DirectX_D3D9_INCLUDE_DIR AND DirectX_D3D9_LIBRARY)
@@ -122,12 +129,12 @@

 	find_library (DirectX_D3D10_LIBRARY d3d10
 		PATHS
-			"${DirectX_ROOT_DIR}/Lib/x86"
+			"${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}"
 		DOC "The directory where d3d10 resides")

 	find_library (DirectX_D3DX10_LIBRARY d3dx10
 		PATHS
-			"${DirectX_ROOT_DIR}/Lib/x86"
+			"${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}"
 		DOC "The directory where d3dx10 resides")

 	if (DirectX_D3D10_INCLUDE_DIR AND DirectX_D3D10_LIBRARY)


Added optimisation and debug flags to coverage flags.

As recommended optimisation will be disabled and debug flags enabled for covered
targets.

--- cmake/Findcodecov.cmake
+++ cmake/Findcodecov.cmake
@@ -30,10 +30,10 @@

 set(COVERAGE_FLAG_CANDIDATES
 	# gcc and clang
-	"-fprofile-arcs -ftest-coverage"
+	"-O0 -g -fprofile-arcs -ftest-coverage"

 	# gcc and clang fallback
-	"-O0 --coverage"
+	"-O0 -g --coverage"
 )


Updated RPM file after testing on centos

--- cmake/package-rpm.cmake
+++ cmake/package-rpm.cmake
@@ -2,11 +2,14 @@
 SET(CPACK_RPM_PACKAGE_URL "https://github.com/matiu2/cdnalizer")
 SET(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")

-set(YUM_DIR packages/redhat)
+# Copy postinst and postrm scripts
+set(RPM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/packages/redhat)
+configure_file(${RPM_DIR}/postinst postinst)
+file(COPY ${RPM_DIR}/01-cdnalizer.conf ${RPM_DIR}/postrm DESTINATION .)

-file(COPY ${YUM_DIR}/01-cdnalizer.conf ${YUM_DIR}/postrm DESTINATION .)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/01-cdnalizer.conf DESTINATION /etc/httpd/conf.modules.d/)
+# Get our conf file that loads the module
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/01-cdnalizer.conf DESTINATION /etc/httpd/conf.d/)

-configure_file(${YUM_DIR}/postinst postinst)
+# Use postinst and postrm scripts
 SET(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_BINARY_DIR}/postinst )
 SET(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_BINARY_DIR}/postrm )


Cosmetics: indentation

Cosmetics: indentation

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -517,15 +517,15 @@
         string(REGEX REPLACE "set.*SUBSYS_NAME" "" name "${name}")
         string(REPLACE ")" "" name "${name}")
         string(STRIP "${name}" name)
-#				message(STATUS "setting ${subdir} component name to ${name}")
-				set(${names} ${${names}} ${name})
+#       message(STATUS "setting ${subdir} component name to ${name}")
+        set(${names} ${${names}} ${name})
         file(STRINGS ${dirname}/${subdir}/CMakeLists.txt DEPENDENCIES REGEX "set.*SUBSYS_DEPS .*\\)")
         string(REGEX REPLACE "set.*SUBSYS_DEPS" "" DEPENDENCIES "${DEPENDENCIES}")
         string(REPLACE ")" "" DEPENDENCIES "${DEPENDENCIES}")
         string(STRIP "${DEPENDENCIES}" DEPENDENCIES)
         string(REPLACE " " ";" DEPENDENCIES "${DEPENDENCIES}")
         if(NOT("${DEPENDENCIES}" STREQUAL ""))
-					  list(REMOVE_ITEM DEPENDENCIES "#")
+            list(REMOVE_ITEM DEPENDENCIES "#")
             string(TOUPPER "PCL_${name}_DEPENDS" SUBSYS_DEPENDS)
             set(${SUBSYS_DEPENDS} ${DEPENDENCIES})
             foreach(dependee ${DEPENDENCIES})


preparation for breakpad support in mingw

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -146,6 +146,9 @@
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/BreakPad.cpp ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/on_demand_symbol_supplier.cpp ${ALL_SRCS})

+	IF(MINGW_CROSS_COMPILE OR WIN32)
+
+	ELSE(MINGW_CROSS_COMPILE OR WIN32)
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/minidump_file_writer.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/linux/handler/exception_handler.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/linux/handler/linux_thread.cc ${ALL_SRCS})
@@ -179,6 +182,7 @@
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/processor/stackwalker_sparc.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/processor/stackwalker_x86.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/processor/stackwalker.cc ${ALL_SRCS})
+	ENDIF(MINGW_CROSS_COMPILE OR WIN32)
 ELSE (BREAKPAD)
 	ADD_DEFINITIONS(-DNBREAKPAD)
 ENDIF (BREAKPAD)


Use check_function_exists to check for vorbis_bitrate_addblock

libvorbis and libvorbisenc (and other prerequisites) are already included
through the CMAKE_REQUIRED_LIBRARIES variable. There's no need to specify
libvorbis again.

--- cmake/FindOggVorbis.cmake
+++ cmake/FindOggVorbis.cmake
@@ -16,7 +16,7 @@
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-include (CheckLibraryExists)
+include (CheckFunctionExists)

 find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
 find_path(OGG_INCLUDE_DIR ogg/ogg.h)
@@ -38,7 +38,7 @@

    set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES})
    set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES})
-   check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
+   check_function_exists(vorbis_bitrate_addblock HAVE_LIBVORBISENC2)
    set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP})

    if(HAVE_LIBVORBISENC2)


fix cfitsio build error on Mac 64 (#1009)

--- thirdparty/thirdparty.cmake
+++ thirdparty/thirdparty.cmake
@@ -250,6 +250,10 @@
   if(UNIX AND NOT APPLE)
     set_target_properties(cfitsio PROPERTIES COMPILE_FLAGS "-Wno-unused-result")
     # Raffi: use target_compile_options ?
+  endif()
+
+  if(APPLE)
+    set_target_properties(cfitsio PROPERTIES COMPILE_FLAGS "-DHAVE_UNISTD_H")
   endif()

   if(WIN32)


added TOF_PMDO3 to exclude list for BUILD_ALL: hardware should only be activated by the user because additional configuration is required

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -31,6 +31,7 @@
   TOF_MESASR4000
   TOF_PMDCAMBOARD
   TOF_PMDCAMCUBE
+  TOF_PMDO3
   US_TELEMED_SDK
   videoInput
   WIIMOTE


Remove gcc visibility options under MSVC for plugins too

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

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -66,11 +66,13 @@
   if (OGRE_STATIC)
     # add static prefix, if compiling static version
     set_target_properties(${PLUGINNAME} PROPERTIES OUTPUT_NAME ${PLUGINNAME}Static)
-  else ()
-    # add GCC visibility flags to shared library build
-    set_target_properties(${PLUGINNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
-    # disable "lib" prefix on Unix
-    set_target_properties(${PLUGINNAME} PROPERTIES PREFIX "")
+  else (OGRE_STATIC)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      # add GCC visibility flags to shared library build
+      set_target_properties(${PLUGINNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
+      # disable "lib" prefix on Unix
+      set_target_properties(${PLUGINNAME} PROPERTIES PREFIX "")
+	endif (CMAKE_COMPILER_IS_GNUCXX)
   endif ()
   install(TARGETS ${PLUGINNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}"


simplify config generation cmake setup

simplify config generation cmake setup

--- functions.cmake
+++ functions.cmake
@@ -125,16 +125,12 @@
         get_filename_component(CONFIG_NAME ${RELATIVE_CONFIG_DEF_PATH} NAME_WE)
     endif()

-    # configgen.jar takes the parent dir of the destination dir and the destination dirname as separate parameters
-    # so it can produce the correct include statements within the generated .cpp-file (silent cry)
     # Make config path an absolute_path
     set(CONFIG_DEF_PATH ${CMAKE_CURRENT_LIST_DIR}/${RELATIVE_CONFIG_DEF_PATH})

-    # Config destination is the
+    # Config destination is the current source directory (or parallel in build tree)
+    # configgen.jar takes the destination dirname as a property parameter
     set(CONFIG_DEST_DIR ${CMAKE_CURRENT_BINARY_DIR})
-
-    # Get parent of destination directory
-    set(CONFIG_DEST_PARENT_DIR ${CONFIG_DEST_DIR}/..)

     # Get destination dirname
     get_filename_component(CONFIG_DEST_DIRNAME ${CMAKE_CURRENT_BINARY_DIR} NAME)
@@ -144,8 +140,8 @@

     add_custom_command(
         OUTPUT ${CONFIG_H_PATH} ${CONFIG_CPP_PATH}
-        COMMAND java -Dconfig.spec=${CONFIG_DEF_PATH} -Dconfig.dest=${CONFIG_DEST_PARENT_DIR} -Dconfig.lang=cpp -Dconfig.subdir=${CONFIG_DEST_DIRNAME} -Dconfig.dumpTree=false -Xms64m -Xmx64m -jar ${PROJECT_SOURCE_DIR}/configgen/target/configgen.jar
-        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..
+        COMMAND java -Dconfig.spec=${CONFIG_DEF_PATH} -Dconfig.dest=${CONFIG_DEST_DIR} -Dconfig.lang=cpp -Dconfig.dumpTree=false -Xms64m -Xmx64m -jar ${PROJECT_SOURCE_DIR}/configgen/target/configgen.jar
+        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
         COMMENT "Generating cpp config for ${CONFIG_NAME} in ${CMAKE_CURRENT_SOURCE_DIR}"
         MAIN_DEPENDENCY ${CONFIG_DEF_PATH}
         )
@@ -156,11 +152,6 @@
     endif()
     # Add generated to sources for target
     target_sources(${TARGET} PRIVATE ${CONFIG_H_PATH} ${CONFIG_CPP_PATH})
-
-    # Needed to be able to do a #include <CONFIG_DEST_DIRNAME/config-<name>.h> for this target
-    # This is used within the generated config-<name>.cpp
-    # TODO: Should modify configgen to use #include <vespa/<modulename>/config-<name>.h> instead
-    target_include_directories(${TARGET} PRIVATE ${CONFIG_DEST_PARENT_DIR})

     # Needed to be able to do a #include <config-<name>.h> for this target
     # This is used within some unit tests


updated findcycluscore to include a test dir variable

--- CMake/Findcycluscore.cmake
+++ CMake/Findcycluscore.cmake
@@ -28,6 +28,15 @@
   /usr/local/cyclus /opt/local/cyclus
   PATH_SUFFIXES cyclus/include include include/cyclus)

+# Set the include dir, this will be the future basis for other
+# defined dirs
+FIND_PATH(CYCLUS_CORE_TEST_INCLUDE_DIR agent_tests.h
+  HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus/tests"
+  "${CYCLUS_ROOT_DIR}/include"
+  "${CYCLUS_ROOT_DIR}/include/cyclus/tests"
+  /usr/local/cyclus /opt/local/cyclus
+  PATH_SUFFIXES cyclus/include include include/cyclus include/cyclus/tests cyclus/include/tests)
+
 # Add the root dir to the hints
 SET(CYCLUS_ROOT_DIR "${CYCLUS_CORE_INCLUDE_DIR}/../..")

@@ -53,24 +62,29 @@
   PATH_SUFFIXES cyclus/lib lib)

 # Copy the results to the output variables.
-IF (CYCLUS_CORE_INCLUDE_DIR AND CYCLUS_CORE_LIBRARY AND CYCLUS_GTEST_LIBRARY AND CYCLUS_CORE_SHARE_DIR)
+IF (CYCLUS_CORE_INCLUDE_DIR AND CYCLUS_CORE_TEST_INCLUDE_DIR
+    AND CYCLUS_CORE_LIBRARY AND CYCLUS_GTEST_LIBRARY AND CYCLUS_CORE_SHARE_DIR)
   SET(CYCLUS_CORE_FOUND 1)
   SET(CYCLUS_CORE_LIBRARIES ${CYCLUS_CORE_LIBRARY})
   SET(CYCLUS_GTEST_LIBRARIES ${CYCLUS_GTEST_LIBRARY})
   SET(CYCLUS_CORE_INCLUDE_DIRS "${CYCLUS_CORE_INCLUDE_DIR}")
+  SET(CYCLUS_CORE_TEST_INCLUDE_DIRS "${CYCLUS_CORE_TEST_INCLUDE_DIR}")
   SET(CYCLUS_CORE_SHARE_DIRS ${CYCLUS_CORE_SHARE_DIR})
-ELSE (CYCLUS_CORE_INCLUDE_DIR AND CYCLUS_CORE_LIBRARY AND CYCLUS_GTEST_LIBRARY AND CYCLUS_CORE_SHARE_DIR)
+ELSE ()
   SET(CYCLUS_CORE_FOUND 0)
   SET(CYCLUS_CORE_LIBRARIES)
   SET(CYCLUS_GTEST_LIBRARIES)
   SET(CYCLUS_CORE_INCLUDE_DIRS)
+  SET(CYCLUS_CORE_TEST_INCLUDE_DIRS)
   SET(CYCLUS_CORE_SHARE_DIRS)
-ENDIF (CYCLUS_CORE_INCLUDE_DIR AND CYCLUS_CORE_LIBRARY AND CYCLUS_GTEST_LIBRARY AND CYCLUS_CORE_SHARE_DIR)
+ENDIF ()

 # Report the results.
 IF (CYCLUS_CORE_FOUND)
   SET(CYCLUS_CORE_DIR_MESSAGE "Found Cyclus Core Headers : "
     ${CYCLUS_CORE_INCLUDE_DIRS} )
+  SET(CYCLUS_CORE_TEST_DIR_MESSAGE "Found Cyclus Core Test Headers : "
+    ${CYCLUS_CORE_TEST_INCLUDE_DIRS} )
   SET(CYCLUS_CORE_SHARE_MESSAGE "Found Cyclus Core Shared Data : "
     ${CYCLUS_CORE_SHARE_DIRS} )
   SET(CYCLUS_CORE_LIB_MESSAGE "Found Cyclus Core Library : "


BUG: Python wrapper modules should not be installed by CMake at all.  They are installed by setup.py.

--- CMake/KitCommonBlock.cmake
+++ CMake/KitCommonBlock.cmake
@@ -69,9 +69,6 @@
   # the shared library containing the wrappers for this kit.
   ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
   TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
-  IF(NOT VTK_INSTALL_NO_RUNTIME)
-    INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}Python)
-  ENDIF(NOT VTK_INSTALL_NO_RUNTIME)
 ENDIF (VTK_WRAP_PYTHON)

 # if we are wrapping into Java then add the library and extra