cmake: Look for VTK 8 first

cmake: Look for VTK 8 first

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -57,7 +57,7 @@
   # dependencies
   DEPENDS
     MIRTK{Common,Numerics,Image,Transformation,PointSet,IO}
-    "VTK-7|6{
+    "VTK-8|7|6{
       vtkCommonCore,
       vtkCommonDataModel,
       vtkFiltersCore,


Import last version of FindOpenCL cmake module.

--- FindOpenCL.cmake
+++ FindOpenCL.cmake
@@ -39,9 +39,11 @@
    SET(OpenCL_FIND_QUIETLY TRUE)
 ENDIF(OPENCL_LIBRARIES)

-FIND_PATH(OPENCL_INCLUDE_DIR CL/cl.h PATHS ${OPENCL_ROOT} PATH_SUFFIXES nvidia)
+FIND_PATH(OPENCL_INCLUDE_DIR CL/cl.h
+    PATHS ${OPENCL_ROOT} /usr/local/cuda/include
+    PATH_SUFFIXES nvidia)

-FIND_LIBRARY(OPENCL_LIBRARIES NAMES OpenCL PATH_SUFFIXES nvidia)
+FIND_LIBRARY(OPENCL_LIBRARIES NAMES OpenCL PATH_SUFFIXES nvidia nvidia-current)

 IF(OPENCL_INCLUDE_DIR AND OPENCL_LIBRARIES)
    SET(OPENCL_FOUND TRUE)


dubious fix

dubious fix

--- cmake/qibuild/compat/compat.cmake
+++ cmake/qibuild/compat/compat.cmake
@@ -147,7 +147,7 @@
 function(create_config_h)
   qi_deprecated("create_config_h is deprecated:
     use qi_create_config_h instead")
-  qi_create_config_h(${ARGN})
+  qi_create_config_h(_dummy ${ARGN})
 endfunction()

 function(create_gtest)


Disable non-supported modules on OS X

Disable non-supported modules on OS X

--- GNUModules.cmake
+++ GNUModules.cmake
@@ -28,7 +28,7 @@
 # - MODULE_WHATIS: the whatis description of the module.
 #                  default ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}

-if(MSVC)
+if(MSVC OR APPLE)
   return()
 endif()


added -msse4.2 (considerably speeding up popcount)

[git-p4: depot-paths = "//sw/gpgpu/nvbio/main/": change = 18766658]

--- cmake-local/gcc.cmake
+++ cmake-local/gcc.cmake
@@ -3,6 +3,7 @@
     # we add -Wno-unknown-pragmas because of nvcc's #pragma unroll
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unknown-pragmas -Wstrict-aliasing=0")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas -Wstrict-aliasing=0")
+    set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -msse4.2")

     if(WERROR)
         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")


Added install target for static versions

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

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -341,7 +341,13 @@
     set (_and_static 0)
   endif ()

-  add_library (${_target} ${_type} ${ARGN})
+  add_library (${_target} ${_type} ${ARGN} )
+
+#  acg_get_version()
+#
+#  set_target_properties (${_target} PROPERTIES VERSION    ${VERSION-MAJOR}.${VERSION-MINOR}
+#                                               SOVERSION  ${VERSION-MAJOR}.${VERSION-MINOR} )
+#

   # set common target properties defined in common.cmake
   acg_set_target_props (${_target})
@@ -353,8 +359,17 @@
     acg_set_target_props (${_target}Static)

     if (NOT APPLE)
+# todo : create correct so names
       set_target_properties (${_target}Static PROPERTIES
-                             LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+                             LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
+                            )
+
+# todo : rename the lib to omit the static name extension
+      install (TARGETS ${_target}Static
+               RUNTIME DESTINATION ${ACG_PROJECT_BINDIR}
+               LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
+               ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR} )
+
     endif ()
   endif ()

@@ -426,7 +441,7 @@
   endif ()

   if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE)
-    if (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC)
+    if (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC )
       install (TARGETS ${_target}
                RUNTIME DESTINATION ${ACG_PROJECT_BINDIR}
                LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}


[cmake] use full path in headercheck target names, fixes #177

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -42,7 +42,7 @@
 MACRO( HEADERCHECK )
 	ADD_CUSTOM_TARGET( headercheck SOURCES ${ARGN} )
 	FOREACH( HEADER ${ARGN} )
-		GET_FILENAME_COMPONENT( fn ${HEADER} NAME )
+		string(REPLACE "/" "_" fn ${HEADER})
 		SET( TEST_NAME "headercheck_${fn}")
 		TO_LIST_SPACES( MY_CXX_FLAGS TEST_NAME_FLAGS )
 		SET(XARGS ${TEST_NAME_FLAGS} -DHAVE_CONFIG_H -c ${HEADER} -o ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.o )


test=develop

test=develop

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -16,6 +16,11 @@
     add_definitions(-DPADDLE_NO_PYTHON)
 endif(NOT WITH_PYTHON)

+if(APPLE)
+    set(ENV{CMAKE_FIND_FRAMEWORK} LAST)
+    set(ENV{CMAKE_FIND_APPBUNDLE} LAST)
+endif(APPLE)
+
 if(WITH_DSO)
     add_definitions(-DPADDLE_USE_DSO)
 endif(WITH_DSO)


fixed glad external for install in hpc systems

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -343,7 +343,7 @@
     if(WIN32)
       set(GLAD_LIB "lib/glad.lib")
     else()
-      set(GLAD_LIB "lib/libglad.a")
+      set(GLAD_LIB "${CMAKE_INSTALL_LIBDIR}/libglad.a")
     endif()

     add_external_project(glad STATIC


IO/ADIOS: Exclude module from VTK_BUILD_ALL_MODULES

We do not provide a builtin copy of the ADIOS library, so do
not enable the module unless explicitly requested.

Change-Id: I90fd68bfce27bce3d2bdeb9fe716429f6aa40867

--- IO/ADIOS/module.cmake
+++ IO/ADIOS/module.cmake
@@ -9,4 +9,5 @@
   TEST_DEPENDS
     vtkTestingCore
     vtkTestingRendering
+  EXCLUDE_FROM_ALL
   )


Added CC 6.1

Added CC 6.1

--- CMake/GOMCCUDASetup.cmake
+++ CMake/GOMCCUDASetup.cmake
@@ -7,6 +7,7 @@
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_30,code=sm_30)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_35,code=sm_35)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_50,code=sm_50)
+set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode=arch=compute_61,code=sm_61)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode=arch=compute_70,code=sm_70)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode=arch=compute_70,code=compute_70)
 set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode=arch=compute_75,code=sm_75)


use short filename for build, too

use short filename for build, too

--- Modules/CakePkg.cmake
+++ Modules/CakePkg.cmake
@@ -403,7 +403,8 @@
       cake_get_humanish_part_of_url("${repo_url}")
       get_filename_component(f "${ans}" NAME)
       string(RANDOM LENGTH 2 ALPHABET 0123456789 r)
-      set(resolved_destination ${CAKE_PKG_REPOS_DIR}/${f}_${r})
+      set(shortcid "${f}_${r}")
+      set(resolved_destination ${CAKE_PKG_REPOS_DIR}/${shortcid})
     else()
       if(NOT IS_ABSOLUTE "${destination}")
         message(FATAL_ERROR "[cake_pkg] internal error, destination must be absolute.")
@@ -478,7 +479,8 @@
       group "${group}"
       name "${name}"
       destination "${resolved_destination}"
-      branch "${branch}")
+      branch "${branch}"
+      shortcid "${shortcid}")

     set(ans "${pk}" PARENT_SCOPE)

@@ -547,6 +549,8 @@
     set(destination "${ans}")
     cake_repo_db_get_field_by_pk(cid "${pk}")
     set(cid "${ans}")
+    cake_repo_db_get_field_by_pk(shortcid "${pk}")
+    set(shortcid "${ans}")
     # check if destination is a subdirectory
     if(CAKE_PKG_${cid}_ADDED_AS_SUBDIRECTORY)
       cake_message(STATUS "The package ${repo_url} has already been added as subdirectory, skipping installation. "
@@ -615,7 +619,7 @@

     foreach(c ${CAKE_PKG_CONFIGURATION_TYPES})
       # read pars of last build (install)
-      set(last_build_pars_path ${CAKE_PKG_LAST_BUILD_PARS_DIR}/${cid}_${c})
+      set(last_build_pars_path ${CAKE_PKG_LAST_BUILD_PARS_DIR}/${shortcid}_${c})
       set(last_build_pars "")
       if(EXISTS "${last_build_pars_path}")
         file(STRINGS "${last_build_pars_path}" last_build_pars)
@@ -641,7 +645,7 @@
         endforeach()

         # call cmake configure
-        set(binary_dir ${CAKE_PKG_BUILD_DIR}/${cid}_${c})
+        set(binary_dir ${CAKE_PKG_BUILD_DIR}/${shortcid}_${c})
         set(command_line
             -H${destination} -B${binary_dir}
             -DCMAKE_BUILD_TYPE=${c}


customize steering script for only running the test -> remove the build and dashboard stuff

--- ctest/steer.cmake
+++ ctest/steer.cmake
@@ -1,15 +1,13 @@
 # -----------------------------------------------------------
-# -- Get environment
+# -- build specific
 # -----------------------------------------------------------

-## -- Set hostname
-## --------------------------
-find_program(HOSTNAME_CMD NAMES hostname)
-exec_program(${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
+set(MODEL "openfast")
+set(CTEST_SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/ctest-build")

-set(CTEST_SITE                          "${HOSTNAME}")
-
-## -- Set site / build name
+# -----------------------------------------------------------
+## -- Set build name
 ## --------------------------

 find_program(UNAME NAMES uname)
@@ -18,130 +16,40 @@
 endmacro(getuname)

 getuname(osname -s)
-getuname(osrel  -r)
-getuname(cpu    -m)
+getuname(cpu -m)

-set(CTEST_BUILD_NAME                    "${osname}-${cpu}-prod")
-
-## -- SVN command
-## ----------------
-find_program(CTEST_SVN_COMMAND NAMES git)
-
-## -- make command
-## -----------------
-find_program(MAKE NAMES make)
-
-# -----------------------------------------------------------
-# -- build specific
-# -----------------------------------------------------------
-
-set(MODEL                               "analysis")
-
-## -- DashBoard Root
-#set(CTEST_DASHBOARD_ROOT                "$ENV{HOME}/automatedBuild")
-set(CTEST_DASHBOARD_ROOT                "$ENV{HOME}/Sites/CDash")
-
-## -- SRC Dir
-#set(CTEST_SOURCE_DIRECTORY              "${CTEST_DASHBOARD_ROOT}/src")
-set(CTEST_SOURCE_DIRECTORY              "${CMAKE_CURRENT_SOURCE_DIR}")
-
-## -- BIN Dir
-#set(CTEST_BINARY_DIRECTORY              "${CTEST_SOURCE_DIRECTORY}/build-${CTEST_BUILD_NAME}")
-set(CTEST_BINARY_DIRECTORY              "${CTEST_SOURCE_DIRECTORY}/ctest-build")
-
-## -- Build options
-set(OPTION_BUILD                        "-j16")
-
-# -----------------------------------------------------------
-# -- commands
-# -----------------------------------------------------------
-
-## -- Checkout command
-if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-	set(CTEST_CHECKOUT_COMMAND     "${CTEST_SVN_COMMAND} clone https://github.com/OpenFAST/openfast.git ${CTEST_SOURCE_DIRECTORY}")
-endif(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-
-## -- Update Command
-set(CTEST_UPDATE_COMMAND               "${CTEST_SVN_COMMAND}")
-
-## -- Configure Command
-set(CTEST_CONFIGURE_COMMAND            "${CTEST_SOURCE_DIRECTORY}/configure configure --enable-optimization=3 --disable-debug --enable-doc=mono")
-
-## -- Build Command
-set(CTEST_BUILD_COMMAND                "${MAKE} ${OPTION_BUILD}")
+set(CTEST_BUILD_NAME "${osname}-${cpu}")

 # -----------------------------------------------------------
 # -- Configure CTest
 # -----------------------------------------------------------

 ## -- CTest Config
-#configure_file($ENV{HOME}/CTestConfiguration/CTestConfig.cmake	${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
-configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestConfig.cmake	${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
-
-## -- CTest Custom
-#configure_file($ENV{HOME}/CTestConfiguration/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
-#configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestConfig.cmake ${CTEST_BINARY_DIRECTORY}/CTestConfig.cmake)

 ## -- CTest Testfile
-#configure_file($ENV{HOME}/CTestConfiguration/CTestTestfile.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)
 configure_file(${CTEST_SOURCE_DIRECTORY}/ctest/CTestTestfile.cmake ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake)
-
-## -- read CTestCustom.cmake file
-#ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
-#ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")

 # -----------------------------------------------------------
 # -- Settings
 # -----------------------------------------------------------

 ## -- Process timeout in seconds
-set(CTEST_TIMEOUT           "7200")
+set(CTEST_TIMEOUT "7200")

 ## -- Set output to english
-set( $ENV{LC_MESSAGES}      "en_EN" )
+set($ENV{LC_MESSAGES} "en_EN" )

 # -----------------------------------------------------------
 # -- Run CTest
 # -----------------------------------------------------------

 ## -- Start
-message(" -- Start dashboard ${MODEL} - ${CTEST_BUILD_NAME} --")
+message(" -- Start testing ${MODEL} - ${CTEST_BUILD_NAME} --")
 ctest_start(${MODEL} TRACK ${MODEL})

-## -- Update
-message(" -- Update ${MODEL} - ${CTEST_BUILD_NAME} --")
-ctest_update(           SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
-
-## -- Run autoreconf
-message(" -- Autoreconf ${MODEL} - ${CTEST_BUILD_NAME} --")
-execute_process(COMMAND "/usr/bin/autoreconf" "-f" "-i" WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY} RESULT_VARIABLE autoreconfResult
-	OUTPUT_VARIABLE autoreconfLog ERROR_VARIABLE autoreconfLog)
-file(WRITE ${CTEST_BINARY_DIRECTORY}/Testing/autoreconf.log "${autoreconfLog}")
-
-if( NOT ${autoreconfResult} )
-
-	## -- Configure
-	message(" -- Configure ${MODEL} - ${CTEST_BUILD_NAME} --")
-	ctest_configure(BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-
-	## -- BUILD
-	message(" -- Build ${MODEL} - ${CTEST_BUILD_NAME} --")
-	ctest_build(    BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-
-	## -- INSTALL
-#	message(" -- Install ${MODEL} - ${CTEST_BUILD_NAME} --")
-#	execute_process(COMMAND "${MAKE} install ${OPTION_BUILD}" WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
-#		RESULT_VARIABLE makeInstallResult OUTPUT_VARIABLE makeInstallLog ERROR_VARIABLE makeInstallLog)
-#	file(WRITE ${CTEST_BINARY_DIRECTORY}/Testing/makeinstall.log "${makeInstallLog}")
-
-	## -- TEST
-	message(" -- Test ${MODEL} - ${CTEST_BUILD_NAME} --")
-	ctest_test(     BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
-
-endif( NOT ${autoreconfResult} )
-
-## -- SUBMIT
-message(" -- Submit ${MODEL} - ${CTEST_BUILD_NAME} --")
-ctest_submit(                                              RETURN_VALUE res)
+## -- TEST
+message(" -- Test ${MODEL} - ${CTEST_BUILD_NAME} --")
+ctest_test(     BUILD  "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

 message(" -- Finished ${MODEL}  - ${CTEST_BUILD_NAME} --")


STYLE: SuperBuild.cmake - Remove unused code

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -17,11 +17,6 @@
 #  limitations under the License.
 #
 ###########################################################################
-
-SET(cmake_version_required "2.8")
-SET(cmake_version_required_dash "2-8")
-
-CMAKE_MINIMUM_REQUIRED(VERSION ${cmake_version_required})

 #
 # CTK_KWSTYLE_EXECUTABLE
@@ -70,11 +65,6 @@

 # Use this value where semi-colons are needed in ep_add args:
 set(sep "^^")
-
-#-----------------------------------------------------------------------------
-# Update CMake module path
-#
-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/CMake)

 #-----------------------------------------------------------------------------
 # Collect CTK library target dependencies
@@ -221,10 +211,10 @@
     -DCTK_KWSTYLE_EXECUTABLE:FILEPATH=${CTK_KWSTYLE_EXECUTABLE}
     -DDCMTK_DIR:PATH=${DCMTK_DIR} # FindDCMTK expects DCMTK_DIR variable to be defined
     -DVTK_DIR:PATH=${VTK_DIR}     # FindVTK expects VTK_DIR variable to be defined
-    -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}    # FindPythonQt expects PYTHON_INCLUDE_DIR variable to be defined
-    -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}        # FindPythonQt expects PYTHON_LIBRARY variable to be defined
+    -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}     # FindPythonQt expects PYTHON_INCLUDE_DIR variable to be defined
+    -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}         # FindPythonQt expects PYTHON_LIBRARY variable to be defined
     -DPYTHONQT_INSTALL_DIR:PATH=${PYTHONQT_INSTALL_DIR} # FindPythonQt expects PYTHONQT_INSTALL_DIR variable to be defined
-    -Dlog4qt_DIR:PATH=${log4qt_DIR} # Findlog4qt expects a log4qt_DIR variable to be defined
+    -Dlog4qt_DIR:PATH=${log4qt_DIR} # Findlog4qt expects log4qt_DIR variable to be defined
   SOURCE_DIR ${CTK_SOURCE_DIR}
   BINARY_DIR ${CTK_BINARY_DIR}/CTK-build
   BUILD_COMMAND ""


Add some linker optimizations.

Add some linker optimizations.

--- gcc.cmake
+++ gcc.cmake
@@ -1,21 +1,10 @@
-SET (CMAKE_C_COMPILER        "clang")
-SET (CMAKE_CXX_COMPILER      "clang++")
 SET (CMAKE_C_COMPILER "gcc")
 SET (CMAKE_CXX_COMPILER "g++")
+SET (CMAKE_EXE_LINKER_FLAGS "-Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections" CACHE STRING "" FORCE)

 SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -pedantic -O2 -flto -fwhole-program -fomit-frame-pointer" CACHE STRING "" FORCE)
 # SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -pedantic -O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
 # SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -pedantic -O2 -flto -fuse-linker-plugin -fomit-frame-pointer" CACHE STRING "" FORCE)

-
-
 MESSAGE (STATUS "Found gcc toolchain")

-###set (BOOST_ROOT /opt/boost-1.52.0/)
-# adjust the default behaviour of the FIND_XXX() commands:
-# search headers and libraries in the target environment, search
-# programs in the host environment
-#set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-#set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-


Adapting to RPI

Adapting to RPI


Added some paths to help find Qt5 cmake modules on some systems.

--- cmake/deps.cmake
+++ cmake/deps.cmake
@@ -1,4 +1,13 @@
 # Qt 5
+IF (NOT WIN32)
+  # Added some paths to help find the modules on some systems.
+  SET(CMAKE_PREFIX_PATH
+    ${CMAKE_PREFIX_PATH}
+    "/usr/local/opt"
+    "/usr/local/opt/qt5"
+    )
+ENDIF()
+
 SET(CMAKE_AUTOMOC ON) # Moc when necessary.

 # As moc files are generated in the binary dir, tell CMake to always


Added support for using em.py on OSX; it doesn't seem to have an executable called 'empy'

--- cmake/empy.cmake
+++ cmake/empy.cmake
@@ -1,5 +1,34 @@
+# find_python_module() cribbed from
+# http://www.cmake.org/pipermail/cmake/2011-January/041666.html
+function(find_python_module module)
+        string(TOUPPER ${module} module_upper)
+        if(NOT PY_${module_upper})
+                if(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED")
+                        set(${module}_FIND_REQUIRED TRUE)
+                endif()
+                # A module's location is usually a directory, but for
+                # binary modules
+                # it's a .so file.
+                execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import re, ${module}; print re.compile('/__init__.py.*').sub('',${module}.__file__)"
+                        RESULT_VARIABLE _${module}_status
+                        OUTPUT_VARIABLE _${module}_location
+                        ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+                if(NOT _${module}_status)
+                        set(PY_${module_upper} ${_${module}_location} CACHE STRING
+                                "Location of Python module ${module}")
+                endif(NOT _${module}_status)
+        endif(NOT PY_${module_upper})
+        find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper})
+endfunction(find_python_module)
+
 find_program(EMPY_EXECUTABLE empy)
 if (NOT EMPY_EXECUTABLE)
-  message(FATAL_ERROR "Unable to find executable 'empy'... try installing package 'python-empy'")
+  # On OSX, there's an em.py, but not executable empy
+  find_python_module(em)
+  if (NOT PY_EM)
+    message(FATAL_ERROR "Unable to find either executable 'empy' or Python module 'em'... try installing package 'python-empy'")
+  else()
+    set (EMPY_EXECUTABLE "${PYTHON_EXECUTABLE};${PY_EM}" CACHE STRING "Executable string for empy" FORCE)
+  endif()
 endif()


cmake: Fix java.cmake

cmake: Fix java.cmake


Add version storing method for installer needs

--- cmake/util.cmake
+++ cmake/util.cmake
@@ -50,6 +50,10 @@
     set(${minor} ${JSON_C_MINOR_VERSION} PARENT_SCOPE)
     set(${rev} ${JSON_C_MICRO_VERSION} PARENT_SCOPE)

+    # Store version string in file for installer needs
+    file(TIMESTAMP ${CMAKE_CURRENT_SOURCE_DIR}/json_c_version.h VERSION_DATETIME "%Y-%m-%d %H:%M:%S" UTC)
+    file(WRITE ${CMAKE_BINARY_DIR}/version.str "${JSON_C_MAJOR_VERSION}.${JSON_C_MINOR_VERSION}.${JSON_C_MICRO_VERSION}\n${VERSION_DATETIME}")
+
 endfunction(check_version)

 function(report_version name ver)
@@ -57,7 +61,7 @@
     string(ASCII 27 Esc)
     set(BoldYellow  "${Esc}[1;33m")
     set(ColourReset "${Esc}[m")
-
+
     message(STATUS "${BoldYellow}${name} version ${ver}${ColourReset}")
-
-endfunction()
+
+endfunction()


Bumped version number

Bumped version number

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(autowiring_VERSION 0.2.10)
+set(autowiring_VERSION 0.2.11)


Split off candidate-4.2.4 branch

Split off candidate-4.2.4 branch

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 4 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 3 )
+set ( HPCC_POINT 5 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 1 )
 ###


Update to v0.5.1

Update to v0.5.1

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(LeapSerial_VERSION 0.5.0)
+set(LeapSerial_VERSION 0.5.1)


Graph Control 5.0.6-1 Gold

Graph Control 5.0.6-1 Gold

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_MAJOR 5 )
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 6 )
-set ( HPCC_MATURITY "rc" )
+set ( HPCC_MATURITY "release" )
 set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )


add search paths

add search paths

--- share/cmake/FindGMP.cmake
+++ share/cmake/FindGMP.cmake
@@ -1,22 +1,21 @@
-# FindGMP.cmake
-# Try to find the GMP librairies
-#  GMP_FOUND - system has GMP lib
-#  GMP_INCLUDE_DIR - the GMP include directory
-#  GMP_LIBRARIES - Libraries needed to use GMP
-
 # Copyright (c) 2006, Laurent Montel, <montel@kde.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#   PATHS ${GMP_PREFIX}/include /usr/include /usr/local/include)
+# message(${GMP_INCLUDE_DIR})
+
+# find_library(GMP_LIBRARY gmp
+#   PATHS ${GMP_PREFIX}/lib /usr/lib /usr/local/lib)

 if (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
   # Already in cache, be silent
   set(GMP_FIND_QUIETLY TRUE)
 endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES)

-find_path(GMP_INCLUDE_DIR NAMES gmp.h )
-find_library(GMP_LIBRARIES NAMES gmp libgmp )
-find_library(GMPXX_LIBRARIES NAMES gmpxx libgmpxx )
+find_path(GMP_INCLUDE_DIR NAMES gmp.h PATHS /usr/include /usr/local/include )
+find_library(GMP_LIBRARIES NAMES gmp libgmp /usr/lib /usr/local/lib )
+find_library(GMPXX_LIBRARIES NAMES gmpxx libgmpxx /usr/lib /usr/local/lib )
 MESSAGE(STATUS "GMP libs: " ${GMP_LIBRARIES} " " ${GMPXX_LIBRARIES} )

 include(FindPackageHandleStandardArgs)


esteid-browser-plugin: turn off all event and drawing models on OS X

The plugin doesn't need keyboard / mouse events and doesn't do any drawing,
so just turn these off.

git-svn-id: 804e3bcc3d5e1f71d31da0afe626cb969e0fc117@2950 0d7e1ef0-d974-fc83-f0b3-ccc071561e0e

--- PluginConfig.cmake
+++ PluginConfig.cmake
@@ -62,3 +62,12 @@
 #else(ENABLE_OLD_APIS)
 #    set(FBSTRING_MIMEType "application/x-esteid")
 #endif(ENABLE_OLD_APIS)
+
+# mac settings
+# The plugin doesn't do any drawing and doesn't need mouse / keyboard events,
+# so turn the following off:
+set (FBMAC_USE_CARBON        0)
+set (FBMAC_USE_COCOA         0)
+set (FBMAC_USE_QUICKDRAW     0)
+set (FBMAC_USE_COREGRAPHICS  0)
+set (FBMAC_USE_COREANIMATION 0)


CI: make VS12 build debug, to increase test coverage

we do not use its artifacts anyway

--- ci-build.cmake
+++ ci-build.cmake
@@ -37,8 +37,8 @@
 endif()

 if(DEFINED ENV{APPVEYOR})
-    set(CMAKE_BUILD_TYPE Release)
     if("$ENV{APPVEYOR_BUILD_WORKER_IMAGE}" STREQUAL "Visual Studio 2017")
+        set(CMAKE_BUILD_TYPE Release)
         set(GENERATOR -G "Visual Studio 15")
     else()
         set(GENERATOR -G "Visual Studio 12")


Adjust ios.cmake toolchain to avoid dereferencing the SIMULATOR string

--- ios.cmake
+++ ios.cmake
@@ -72,26 +72,26 @@
 set (BUILD_ARM64 ${BUILD_ARM64} CACHE STRING "Build arm64 arch or not")

 # Check the platform selection and setup for developer root
-if (${IOS_PLATFORM} STREQUAL "OS")
+if (IOS_PLATFORM STREQUAL "OS")
 	set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")

 	# This causes the installers to properly locate the output libraries
 	set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
-elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
+elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
     set (SIMULATOR true)
 	set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")

 	# This causes the installers to properly locate the output libraries
 	set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
-elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR64")
+elseif (IOS_PLATFORM STREQUAL "SIMULATOR64")
     set (SIMULATOR true)
 	set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")

 	# This causes the installers to properly locate the output libraries
 	set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
-else (${IOS_PLATFORM} STREQUAL "OS")
+else ()
 	message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR")
-endif (${IOS_PLATFORM} STREQUAL "OS")
+endif ()

 # Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT
 # Note Xcode 4.3 changed the installation location, choose the most recent one available


updating for new FixupDependencies

updating for new FixupDependencies

--- cmake/Functions/mexiface_make_mex.cmake
+++ cmake/Functions/mexiface_make_mex.cmake
@@ -59,11 +59,15 @@
         if(UNIX)
             # RPATH config
             # $ORIGIN/../../..: This will be lib - location of global libraries for project and dependency libraries like MexIFace
-            set_target_properties(${mexfile} PROPERTIES INSTALL_RPATH "\$ORIGIN/../../..") #link back to lib directory
-#             fixup_dependencies(${mexfile} COPY_DESTINATION "../../../.." RPATH "../../..")
+            file(RELATIVE_PATH relpath_install_prefix "/${mex_dir}" "/") # relative path to the install prefix from mex_dir
+            message(STATUS "Computed relpath to lib_dir as: ${rpath}")
+            set_target_properties(${mexfile} PROPERTIES INSTALL_RPATH "\$ORIGIN/${relpath_install_prefix}/lib") #link back to lib directory
+            if(CMAKE_CROSSCOMPILING)
+                fixup_dependencies(TARGETS ${mexfile} TARGET_DESTINATION ${mex_dir} COPY_DESTINATION "${relpath_install_prefix}/lib")
+            endif()
         elseif(WIN32)
             install(TARGETS ${mexfile} RUNTIME DESTINATION ${mex_dir} COMPONENT Runtime)
-            fixup_dependencies(${mexfile}) #No additional rpaths possible on windows.  have to fixup in-place :(
+            fixup_dependencies(TARGETS ${mexfile} TARGET_DESTINATION ${mex_dir} COPY_DESTINATION ".")
 #         elseif(APPLE)
 #             set_target_properties(${mexfile} PROPERTIES INSTALL_RPATH "@loader_path/../../..:@loader_path/../../../..") #link back to lib directory
 #             fixup_dependencies(${mexfile} COPY_DESTINATION "../../../.." RPATH "../../..")


Make libcxx tests work when llvm sources are not present.

Despite a strong CMake warning that this is an unsupported
libcxx build configuration, some bots still rely on being
able to check out lit and libcxx independently with no
LLVM sources, and then run lit against libcxx.

A previous patch broke that workflow, so this is making it work
again.  Unfortunately, it breaks generation of the llvm-lit
script for libcxx, but we will just have to live with that until
a solution is found that allows libcxx to make more use of
llvm build pieces.  libcxx can still run tests by using the
ninja check target, or by running lit.py directly against the
build tree or source tree.

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

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@313763 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -111,14 +111,17 @@
   # the configurator should write the script into.
   set(LLVM_LIT_OUTPUT_DIR "${libcxx_BINARY_DIR}/bin")

-  # Required LIT Configuration ------------------------------------------------
-  # Define the default arguments to use with 'lit', and an option for the user
-  # to override.
-  set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
-  if (MSVC OR XCODE)
-    set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
+  if (LLVM_INCLUDE_TESTS)
+    # Required LIT Configuration ------------------------------------------------
+    # Define the default arguments to use with 'lit', and an option for the user
+    # to override.
+    set(LLVM_EXTERNAL_LIT "${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")
+    set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
+    if (MSVC OR XCODE)
+      set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
+    endif()
+    set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
   endif()
-  set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")

   # Required doc configuration
   if (LLVM_ENABLE_SPHINX)


haskell-build-fixes: reformat

haskell-build-fixes: reformat

--- cmake/Modules/LibAddHaskellPlugin.cmake
+++ cmake/Modules/LibAddHaskellPlugin.cmake
@@ -42,284 +42,313 @@
 		find_package (Haskell)
 		find_package (Pluginprocess)

-		# set by find_program
 		if (NOT BUILD_STATIC AND NOT BUILD_FULL)
-		if (NOT ENABLE_ASAN)
-			if (PLUGINPROCESS_FOUND)
-				if (HASKELL_FOUND)
-					check_binding_included ("haskell" HAVE_HASKELL_BINDING)
-					if (HAVE_HASKELL_BINDING)
-
-						# needed for HsFFI.h
-						execute_process (COMMAND ${GHC_EXECUTABLE} --print-libdir
-								 OUTPUT_VARIABLE GHC_LIB_DIR
-								 OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-						set (GHC_INCLUDE_DIRS
-						     ${CMAKE_CURRENT_BINARY_DIR}/dist/build/Elektra # for the haskell function stubs
-						     ${GHC_LIB_DIR}/include # for HsFFI.h
-						     )
-
-						set (CABAL_OPTS "--prefix=${CMAKE_INSTALL_PREFIX}")
-						if (BUILD_SHARED OR BUILD_FULL) # shared variants of ghc libraries have the ghc version as a
-										# suffix
-							set (GHC_DYNAMIC_SUFFIX "-ghc${GHC_VERSION}")
-							if (APPLE)
-								set (GHC_DYNAMIC_ENDING ".dylib")
-							else (APPLE)
-								set (GHC_DYNAMIC_ENDING ".so")
-							endif (APPLE)
-							set (CABAL_OPTS "${CABAL_OPTS};--enable-shared")
-						elseif (BUILD_STATIC)
-							set (GHC_DYNAMIC_ENDING ".a")
-							set (CABAL_OPTS "${CABAL_OPTS};--disable-shared")
-						endif ()
-
-						# since we want to continue to use our cmake add_plugin macro
-						# we compile via the c compiler instead of ghc
-						# so we must feed it with the ghc library paths manually
-						# inspired by https://github.com/jarrett/cpphs/blob/master/Makefile
-						# use HSrts_thr for the threaded version of the rts
-						set (GHC_RTS_PATH "${GHC_LIB_DIR}/rts")
-						find_library (GHC_RTS_LIB "HSrts${GHC_DYNAMIC_SUFFIX}" PATHS ${GHC_RTS_PATH})
-
-						execute_process (COMMAND ${GHC-PKG_EXECUTABLE} latest base
-								 OUTPUT_VARIABLE GHC_BASE_NAME
-								 OUTPUT_STRIP_TRAILING_WHITESPACE)
-						set (GHC_BASE_PATH "${GHC_LIB_DIR}/${GHC_BASE_NAME}")
-						find_library (GHC_BASE_LIB "HS${GHC_BASE_NAME}${GHC_DYNAMIC_SUFFIX}" PATHS ${GHC_BASE_PATH})
-
-						execute_process (COMMAND ${GHC-PKG_EXECUTABLE} latest integer-gmp
-								 OUTPUT_VARIABLE GHC_GMP_NAME
-								 OUTPUT_STRIP_TRAILING_WHITESPACE)
-						set (GHC_GMP_PATH "${GHC_LIB_DIR}/${GHC_GMP_NAME}")
-						find_library (GHC_GMP_LIB "HS${GHC_GMP_NAME}${GHC_DYNAMIC_SUFFIX}" PATHS ${GHC_GMP_PATH})
-
-						execute_process (COMMAND ${GHC-PKG_EXECUTABLE} latest ghc-prim
-								 OUTPUT_VARIABLE GHC_PRIM_NAME
-								 OUTPUT_STRIP_TRAILING_WHITESPACE)
-						set (GHC_PRIM_PATH "${GHC_LIB_DIR}/${GHC_PRIM_NAME}")
-						find_library (GHC_PRIM_LIB "HS${GHC_PRIM_NAME}${GHC_DYNAMIC_SUFFIX}" PATHS ${GHC_PRIM_PATH})
-
-						if (GHC_RTS_LIB)
-							if (GHC_BASE_LIB)
-								if (GHC_GMP_LIB)
-									if (GHC_PRIM_LIB)
-
-										set (
-											PLUGIN_HASKELL_NAME
-											"${CMAKE_CURRENT_BINARY_DIR}/libHS${target}${GHC_DYNAMIC_SUFFIX}${GHC_DYNAMIC_ENDING}"
-											)
-
-										set (GHC_LIBS
-										     ${GHC_RTS_LIB}
-										     ${GHC_BASE_LIB}
-										     ${GHC_GMP_LIB}
-										     gmp
-										     ${GHC_PRIM_LIB}
-										     ${PLUGIN_HASKELL_NAME})
-
-										# GHC's structure differs between OSX and Linux
-										# On OSX we need to link iconv and Cffi additionally
-										if (APPLE)
-											find_library (GHC_FFI_LIB
-												      Cffi
-												      PATHS "${GHC_LIB_DIR}/rts")
-											if (GHC_FFI_LIB)
-												set (GHC_LIBS
-												     ${GHC_LIBS}
-												     ${GHC_FFI_LIB}
-												     iconv)
-											else (GHC_FFI_LIB)
-												remove_plugin (${target}
-													       "GHC_FFI_LIB not found")
-											endif (GHC_FFI_LIB)
-										endif (APPLE)
-
-										# configure include paths
-										configure_file (
-											"${CMAKE_CURRENT_SOURCE_DIR}/${target}.cabal.in"
-											"${CMAKE_CURRENT_BINARY_DIR}/${target}.cabal"
-											@ONLY) # configure the haskell plugin base file for
-											       # the current plugin
-										configure_file (
-											"${CMAKE_SOURCE_DIR}/src/plugins/haskell/haskell.c.in"
-											"${CMAKE_CURRENT_BINARY_DIR}/haskell.c"
-											@ONLY) # same for the header
-										configure_file (
-											"${CMAKE_SOURCE_DIR}/src/plugins/haskell/haskell.h.in"
-											"${CMAKE_CURRENT_BINARY_DIR}/haskell.h"
-											@ONLY) # copy the readme so the macro in haskell.c
-											       # finds it
-										file (COPY
-										      "${CMAKE_CURRENT_SOURCE_DIR}/README.md"
-										      DESTINATION
-										      "${CMAKE_CURRENT_BINARY_DIR}") # same for the setup
-														     # logic,  depending on
-														     # wheter a custom  one
-														     # exists  use the
-														     # default  suitable for
-														     # almost  everything
-										set (CABAL_CUSTOM_SETUP_FILE
-										     "${CMAKE_CURRENT_SOURCE_DIR}/Setup.hs.in")
-										if (NOT EXISTS ${CABAL_CUSTOM_SETUP_FILE})
+			if (NOT ENABLE_ASAN)
+				if (PLUGINPROCESS_FOUND)
+					if (HASKELL_FOUND)
+						check_binding_included ("haskell" HAVE_HASKELL_BINDING)
+						if (HAVE_HASKELL_BINDING)
+
+							# needed for HsFFI.h
+							execute_process (COMMAND ${GHC_EXECUTABLE} --print-libdir
+									 OUTPUT_VARIABLE GHC_LIB_DIR
+									 OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+							# for the haskell function stubs and HsFFI.h
+							set (GHC_INCLUDE_DIRS
+							     ${CMAKE_CURRENT_BINARY_DIR}/dist/build/Elektra
+							     ${GHC_LIB_DIR}/include)
+
+							set (CABAL_OPTS "--prefix=${CMAKE_INSTALL_PREFIX}")
+							if (BUILD_SHARED OR BUILD_FULL)
+
+								# shared variants of ghc libraries have the ghc
+								# version as a suffix
+								set (GHC_DYNAMIC_SUFFIX "-ghc${GHC_VERSION}")
+								if (APPLE)
+									set (GHC_DYNAMIC_ENDING ".dylib")
+								else (APPLE)
+									set (GHC_DYNAMIC_ENDING ".so")
+								endif (APPLE)
+								set (CABAL_OPTS "${CABAL_OPTS};--enable-shared")
+							elseif (BUILD_STATIC)
+								set (GHC_DYNAMIC_ENDING ".a")
+								set (CABAL_OPTS "${CABAL_OPTS};--disable-shared")
+							endif ()
+
+							# since we want to continue to use our cmake add_plugin macro
+							# we compile via the c compiler instead of ghc
+							# so we must feed it with the ghc library paths manually
+							# inspired by https://github.com/jarrett/cpphs/blob/master/Makefile
+							# use HSrts_thr for the threaded version of the rts
+							set (GHC_RTS_PATH "${GHC_LIB_DIR}/rts")
+							find_library (GHC_RTS_LIB "HSrts${GHC_DYNAMIC_SUFFIX}" PATHS ${GHC_RTS_PATH})
+
+							execute_process (COMMAND ${GHC-PKG_EXECUTABLE} latest base
+									 OUTPUT_VARIABLE GHC_BASE_NAME
+									 OUTPUT_STRIP_TRAILING_WHITESPACE)
+							set (GHC_BASE_PATH "${GHC_LIB_DIR}/${GHC_BASE_NAME}")
+							find_library (GHC_BASE_LIB
+								      "HS${GHC_BASE_NAME}${GHC_DYNAMIC_SUFFIX}"
+								      PATHS ${GHC_BASE_PATH})
+
+							execute_process (COMMAND ${GHC-PKG_EXECUTABLE} latest integer-gmp
+									 OUTPUT_VARIABLE GHC_GMP_NAME
+									 OUTPUT_STRIP_TRAILING_WHITESPACE)
+							set (GHC_GMP_PATH "${GHC_LIB_DIR}/${GHC_GMP_NAME}")
+							find_library (GHC_GMP_LIB
+								      "HS${GHC_GMP_NAME}${GHC_DYNAMIC_SUFFIX}"
+								      PATHS ${GHC_GMP_PATH})
+
+							execute_process (COMMAND ${GHC-PKG_EXECUTABLE} latest ghc-prim
+									 OUTPUT_VARIABLE GHC_PRIM_NAME
+									 OUTPUT_STRIP_TRAILING_WHITESPACE)
+							set (GHC_PRIM_PATH "${GHC_LIB_DIR}/${GHC_PRIM_NAME}")
+							find_library (GHC_PRIM_LIB
+								      "HS${GHC_PRIM_NAME}${GHC_DYNAMIC_SUFFIX}"
+								      PATHS ${GHC_PRIM_PATH})
+
+							if (GHC_RTS_LIB)
+								if (GHC_BASE_LIB)
+									if (GHC_GMP_LIB)
+										if (GHC_PRIM_LIB)
+
 											set (
-												CABAL_CUSTOM_SETUP_FILE
-												"${CMAKE_SOURCE_DIR}/src/plugins/haskell/Setup.hs.in"
+												PLUGIN_HASKELL_NAME
+												"${CMAKE_CURRENT_BINARY_DIR}/libHS${target}${GHC_DYNAMIC_SUFFIX}${GHC_DYNAMIC_ENDING}"
 												)
-										endif (NOT EXISTS ${CABAL_CUSTOM_SETUP_FILE})
-										configure_file (${CABAL_CUSTOM_SETUP_FILE}
+
+											set (GHC_LIBS
+											     ${GHC_RTS_LIB}
+											     ${GHC_BASE_LIB}
+											     ${GHC_GMP_LIB}
+											     gmp
+											     ${GHC_PRIM_LIB}
+											     ${PLUGIN_HASKELL_NAME})
+
+											# GHC's structure differs between OSX and Linux
+											# On OSX we need to link iconv and Cffi additionally
+											if (APPLE)
+												find_library (GHC_FFI_LIB
+													      Cffi
+													      PATHS "${GHC_LIB_DIR}/rts")
+												if (GHC_FFI_LIB)
+													set (GHC_LIBS
+													     ${GHC_LIBS}
+													     ${GHC_FFI_LIB}
+													     iconv)
+												else (GHC_FFI_LIB)
+													remove_plugin (
+														${target}
+														"GHC_FFI_LIB not found")
+												endif (GHC_FFI_LIB)
+											endif (APPLE)
+
+											# configure include paths
+											configure_file (
+												"${CMAKE_CURRENT_SOURCE_DIR}/${target}.cabal.in"
+												"${CMAKE_CURRENT_BINARY_DIR}/${target}.cabal"
+												@ONLY)
+
+											# configure the haskell plugin base file for the
+											# current plugin
+											configure_file (
+												"${CMAKE_SOURCE_DIR}/src/plugins/haskell/haskell.c.in"
+												"${CMAKE_CURRENT_BINARY_DIR}/haskell.c"
+												@ONLY)
+
+											# same for the header
+											configure_file (
+												"${CMAKE_SOURCE_DIR}/src/plugins/haskell/haskell.h.in"
+												"${CMAKE_CURRENT_BINARY_DIR}/haskell.h"
+												@ONLY)
+
+											# copy the readme so the macro in haskell.c finds it
+											file (COPY
+											      "${CMAKE_CURRENT_SOURCE_DIR}/README.md"
+											      DESTINATION
+											      "${CMAKE_CURRENT_BINARY_DIR}")
+
+											# same for the setup logic, depending on wheter a
+											# custom one exists use the default suitable for
+											# almost everything
+											set (CABAL_CUSTOM_SETUP_FILE
+											     "${CMAKE_CURRENT_SOURCE_DIR}/Setup.hs.in")
+											if (NOT EXISTS ${CABAL_CUSTOM_SETUP_FILE})
+												set (
+													CABAL_CUSTOM_SETUP_FILE
+													"${CMAKE_SOURCE_DIR}/src/plugins/haskell/Setup.hs.in"
+													)
+											endif (NOT EXISTS ${CABAL_CUSTOM_SETUP_FILE})
+											configure_file (
+												${CABAL_CUSTOM_SETUP_FILE}
 												"${CMAKE_CURRENT_BINARY_DIR}/Setup.hs"
 												@ONLY)

-										# as we require the sandbox to exist we can do this during
-										# the configuration phase it doesn't compile or install
-										# anything
-										execute_process (COMMAND ${CABAL_EXECUTABLE} sandbox init
-													 --sandbox
-													 "${HASKELL_SHARED_SANDBOX}" -v0
-												 WORKING_DIRECTORY
-													 ${CMAKE_CURRENT_BINARY_DIR})
-										foreach (SANDBOX_ADD_SOURCE ${ARG_SANDBOX_ADD_SOURCES})
-										# our custom libs are all to be processed by cmake before we
-										# can add them, so enforce that, the build is more stable
-										# this way
-											if (NOT
-											    IS_DIRECTORY
-											    "${CMAKE_BINARY_DIR}/${SANDBOX_ADD_SOURCE}")
-												add_subdirectory (
-													"${CMAKE_SOURCE_DIR}/${SANDBOX_ADD_SOURCE}"
+											# as we require the sandbox to exist we can do this
+											# during the configuration phase it doesn't compile
+											# or install anything
+											execute_process (COMMAND ${CABAL_EXECUTABLE} sandbox
+														 init
+														 --sandbox
+														 "${HASKELL_SHARED_SANDBOX}"
+														 -v0
+													 WORKING_DIRECTORY
+														 ${CMAKE_CURRENT_BINARY_DIR}
+													 )
+											foreach (SANDBOX_ADD_SOURCE
+												 ${ARG_SANDBOX_ADD_SOURCES})
+
+												# our custom libs are all to be processed by
+												# cmake before we can add them, so enforce
+												# that, the build is more stable this way
+												if (
+													NOT
+													IS_DIRECTORY
 													"${CMAKE_BINARY_DIR}/${SANDBOX_ADD_SOURCE}"
 													)
-											endif (NOT
-											       IS_DIRECTORY
-											       "${CMAKE_BINARY_DIR}/${SANDBOX_ADD_SOURCE}")
-											execute_process (
-												COMMAND
-													${CABAL_EXECUTABLE} sandbox
-													add-source
+													add_subdirectory (
+														"${CMAKE_SOURCE_DIR}/${SANDBOX_ADD_SOURCE}"
+														"${CMAKE_BINARY_DIR}/${SANDBOX_ADD_SOURCE}"
+														)
+												endif (
+													NOT
+													IS_DIRECTORY
 													"${CMAKE_BINARY_DIR}/${SANDBOX_ADD_SOURCE}"
-													-v0
-												WORKING_DIRECTORY
-													${CMAKE_CURRENT_BINARY_DIR})
-										endforeach ()
-
-										# Grab potential haskell source files
-										file (GLOB_RECURSE PLUGIN_SOURCE_FILES_UNFILTERED
-												   "${CMAKE_CURRENT_SOURCE_DIR}/*.hs"
-												   "${CMAKE_CURRENT_SOURCE_DIR}/*.lhs"
-												   "${CMAKE_CURRENT_BINARY_DIR}/*.hs"
-												   "${CMAKE_CURRENT_BINARY_DIR}/*.lhs")
-
-										# exclude the dist directory
-										set (PLUGIN_SOURCE_FILES)
-										foreach (file ${PLUGIN_SOURCE_FILES_UNFILTERED})
-											if (NOT
-											    file
-											    MATCHES
-											    "${CMAKE_CURRENT_BINARY_DIR}/dist/")
-												list (APPEND PLUGIN_SOURCE_FILES ${file})
-											endif ()
-										endforeach ()
-
-										set (PLUGIN_SOURCE_FILES
-										     "${PLUGIN_SOURCE_FILES}"
-										     "${CMAKE_CURRENT_SOURCE_DIR}/${target}.cabal.in"
-										     "${CMAKE_CURRENT_SOURCE_DIR}/testmod_${target}.c"
-										     "${CMAKE_SOURCE_DIR}/src/plugins/haskell/Setup.hs.in"
-										     "${ARG_ADDITIONAL_SOURCES}")
-
-										get_property (HASKELL_LAST_PLUGIN
-											      GLOBAL
-											      PROPERTY HASKELL_LAST_PLUGIN)
-										if (NOT HASKELL_LAST_PLUGIN)
-											set (HASKELL_LAST_PLUGIN ${target})
+													)
+												execute_process (
+													COMMAND
+														${CABAL_EXECUTABLE} sandbox
+														add-source
+														"${CMAKE_BINARY_DIR}/${SANDBOX_ADD_SOURCE}"
+														-v0
+													WORKING_DIRECTORY
+														${CMAKE_CURRENT_BINARY_DIR})
+											endforeach ()
+
+											# Grab potential haskell source files
+											file (GLOB_RECURSE
+												      PLUGIN_SOURCE_FILES_UNFILTERED
+												      "${CMAKE_CURRENT_SOURCE_DIR}/*.hs"
+												      "${CMAKE_CURRENT_SOURCE_DIR}/*.lhs"
+												      "${CMAKE_CURRENT_BINARY_DIR}/*.hs"
+												      "${CMAKE_CURRENT_BINARY_DIR}/*.lhs")
+
+											# exclude the dist directory
+											set (PLUGIN_SOURCE_FILES)
+											foreach (file ${PLUGIN_SOURCE_FILES_UNFILTERED})
+												if (NOT
+												    file
+												    MATCHES
+												    "${CMAKE_CURRENT_BINARY_DIR}/dist/")
+													list (APPEND PLUGIN_SOURCE_FILES
+														     ${file})
+												endif ()
+											endforeach ()
+
+											set (
+												PLUGIN_SOURCE_FILES
+												"${PLUGIN_SOURCE_FILES}"
+												"${CMAKE_CURRENT_SOURCE_DIR}/${target}.cabal.in"
+												"${CMAKE_CURRENT_SOURCE_DIR}/testmod_${target}.c"
+												"${CMAKE_SOURCE_DIR}/src/plugins/haskell/Setup.hs.in"
+												"${ARG_ADDITIONAL_SOURCES}")
+
+											get_property (HASKELL_LAST_PLUGIN
+												      GLOBAL
+												      PROPERTY HASKELL_LAST_PLUGIN)
+											if (NOT HASKELL_LAST_PLUGIN)
+												set (HASKELL_LAST_PLUGIN ${target})
+												add_custom_command (
+													OUTPUT ${PLUGIN_HASKELL_NAME}
+													COMMAND ${CABAL_EXECUTABLE} install
+														${CABAL_OPTS}
+														--only-dependencies
+														--offline -v0 || true
+													WORKING_DIRECTORY
+														${CMAKE_CURRENT_BINARY_DIR}
+													DEPENDS c2hs_haskell)
+											else (NOT HASKELL_LAST_PLUGIN)
+												add_custom_command (
+													OUTPUT ${PLUGIN_HASKELL_NAME}
+													COMMAND ${CABAL_EXECUTABLE} install
+														${CABAL_OPTS}
+														--only-dependencies
+														--offline -v0 || true
+													WORKING_DIRECTORY
+														${CMAKE_CURRENT_BINARY_DIR}
+													DEPENDS ${HASKELL_LAST_PLUGIN})
+											endif (NOT HASKELL_LAST_PLUGIN)
+											set_property (GLOBAL
+												      PROPERTY HASKELL_LAST_PLUGIN
+													       "${target}")
+
+											# reconfiguration due to Cabal library version
+											# issues on stretch
 											add_custom_command (
 												OUTPUT ${PLUGIN_HASKELL_NAME}
-												COMMAND ${CABAL_EXECUTABLE} install
-													${CABAL_OPTS} --only-dependencies
-													--offline -v0 || true
+												COMMAND ${CABAL_EXECUTABLE} configure
+													${CABAL_OPTS} -v0
+												COMMAND ${CABAL_EXECUTABLE} build -v0 || (
+													${CABAL_EXECUTABLE} configure
+													${CABAL_OPTS} -v0 &&
+													${CABAL_EXECUTABLE} build -v0 )
 												WORKING_DIRECTORY
 													${CMAKE_CURRENT_BINARY_DIR}
-												DEPENDS c2hs_haskell)
-										else (NOT HASKELL_LAST_PLUGIN)
-											add_custom_command (
-												OUTPUT ${PLUGIN_HASKELL_NAME}
-												COMMAND ${CABAL_EXECUTABLE} install
-													${CABAL_OPTS} --only-dependencies
-													--offline -v0 || true
-												WORKING_DIRECTORY
-													${CMAKE_CURRENT_BINARY_DIR}
-												DEPENDS ${HASKELL_LAST_PLUGIN})
-										endif (NOT HASKELL_LAST_PLUGIN)
-										set_property (GLOBAL
-											      PROPERTY HASKELL_LAST_PLUGIN
-												       "${target}")
-
-										# reconfiguration due to Cabal library version issues on
-										# stretch
-										add_custom_command (OUTPUT ${PLUGIN_HASKELL_NAME}
-												    COMMAND ${CABAL_EXECUTABLE} configure
-													    ${CABAL_OPTS} -v0
-												    COMMAND ${CABAL_EXECUTABLE} build -v0 ||
-													    ( ${CABAL_EXECUTABLE} configure
-													    ${CABAL_OPTS} -v0 &&
-													    ${CABAL_EXECUTABLE} build -v0 )
-												    WORKING_DIRECTORY
-													    ${CMAKE_CURRENT_BINARY_DIR}
-												    DEPENDS c2hs_haskell
-													    ${PLUGIN_SOURCE_FILES}
-													    ${HASKELL_ADD_SOURCES_TARGET}
-												    APPEND)
-										add_custom_target (${target}
-												   ALL
-												   DEPENDS ${PLUGIN_HASKELL_NAME})
-
-										if (BUILD_SHARED OR BUILD_FULL)
-											install (
-												DIRECTORY
-													"${CMAKE_CURRENT_BINARY_DIR}/haskell"
-													DESTINATION
-													"lib${LIB_SUFFIX}/elektra/")
-										endif (BUILD_SHARED OR BUILD_FULL)
-
-										set (
-											HASKELL_RPATH
-											"${GHC_RTS_PATH}"
-											"${GHC_BASE_PATH}"
-											"${GHC_PRIM_PATH}"
-											"${GHC_GMP_PATH}"
-											"${CMAKE_INSTALL_RPATH}"
-											"${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/elektra/haskell"
-											)
-
-									else (GHC_PRIM_LIB)
-										remove_plugin (${target} "GHC_PRIM_LIB not found")
-									endif (GHC_PRIM_LIB)
-								else (GHC_GMP_LIB)
-									remove_plugin (${target} "GHC_GMP_LIB not found")
-								endif (GHC_GMP_LIB)
-							else (GHC_BASE_LIB)
-								remove_plugin (${target} "GHC_BASE_LIB not found")
-							endif (GHC_BASE_LIB)
-						else (GHC_RTS_LIB)
-							remove_plugin (${target} "GHC_RTS_LIB not found")
-						endif (GHC_RTS_LIB)
-					else (HAVE_HASKELL_BINDING)
-						remove_plugin (${target} "haskell bindings are not included in the cmake configuration")
-					endif (HAVE_HASKELL_BINDING)
-				else (HASKELL_FOUND)
-					remove_plugin (${target} ${HASKELL_NOTFOUND_INFO})
-				endif (HASKELL_FOUND)
-			else (PLUGINPROCESS_FOUND)
-				remove_plugin (${target} "${PLUGINPROCESS_NOTFOUND_INFO}, but required for haskell plugins")
-			endif (PLUGINPROCESS_FOUND)
-		else (NOT ENABLE_ASAN)
-			remove_plugin (${target} "haskell plugins are not compatible with ENABLE_ASAN")
-		endif (NOT ENABLE_ASAN)
-	else (NOT BUILD_STATIC AND NOT BUILD_FULL)
-		remove_plugin (${target} "haskell plugins are not compatible with BUILD_STATIC or BUILD_FULL")
-	endif (NOT BUILD_STATIC AND NOT BUILD_FULL)
+												DEPENDS c2hs_haskell
+													${PLUGIN_SOURCE_FILES}
+													${HASKELL_ADD_SOURCES_TARGET}
+												APPEND)
+											add_custom_target (${target}
+													   ALL
+													   DEPENDS ${PLUGIN_HASKELL_NAME})
+
+											if (BUILD_SHARED OR BUILD_FULL)
+												install (
+													DIRECTORY
+														"${CMAKE_CURRENT_BINARY_DIR}/haskell"
+														DESTINATION
+														"lib${LIB_SUFFIX}/elektra/")
+											endif (BUILD_SHARED OR BUILD_FULL)
+
+											set (
+												HASKELL_RPATH
+												"${GHC_RTS_PATH}"
+												"${GHC_BASE_PATH}"
+												"${GHC_PRIM_PATH}"
+												"${GHC_GMP_PATH}"
+												"${CMAKE_INSTALL_RPATH}"
+												"${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/elektra/haskell"
+												)
+
+										else (GHC_PRIM_LIB)
+											remove_plugin (${target} "GHC_PRIM_LIB not found")
+										endif (GHC_PRIM_LIB)
+									else (GHC_GMP_LIB)
+										remove_plugin (${target} "GHC_GMP_LIB not found")
+									endif (GHC_GMP_LIB)
+								else (GHC_BASE_LIB)
+									remove_plugin (${target} "GHC_BASE_LIB not found")
+								endif (GHC_BASE_LIB)
+							else (GHC_RTS_LIB)
+								remove_plugin (${target} "GHC_RTS_LIB not found")
+							endif (GHC_RTS_LIB)
+						else (HAVE_HASKELL_BINDING)
+							remove_plugin (${target}
+								       "haskell bindings are not included in the cmake configuration")
+						endif (HAVE_HASKELL_BINDING)
+					else (HASKELL_FOUND)
+						remove_plugin (${target} ${HASKELL_NOTFOUND_INFO})
+					endif (HASKELL_FOUND)
+				else (PLUGINPROCESS_FOUND)
+					remove_plugin (${target} "${PLUGINPROCESS_NOTFOUND_INFO}, but required for haskell plugins")
+				endif (PLUGINPROCESS_FOUND)
+			else (NOT ENABLE_ASAN)
+				remove_plugin (${target} "haskell plugins are not compatible with ENABLE_ASAN")
+			endif (NOT ENABLE_ASAN)
+		else (NOT BUILD_STATIC AND NOT BUILD_FULL)
+			remove_plugin (${target} "haskell plugins are not compatible with BUILD_STATIC or BUILD_FULL")
+		endif (NOT BUILD_STATIC AND NOT BUILD_FULL)
 	endif (DEPENDENCY_PHASE)

 	set (SANDBOX_PACKAGEDB "${HASKELL_SHARED_SANDBOX}/${GHC_TARGET_PLATFORM}-ghc-${GHC_VERSION}-packages.conf.d/")


- Add functionality for adding icons and splashscreen to AppX packages

--- cmake/Packaging/WindowsImageBuild.cmake
+++ cmake/Packaging/WindowsImageBuild.cmake
@@ -163,6 +163,35 @@
 				COPYONLY
 				)
 		endforeach()
+
+		execute_process ( COMMAND cmake -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir )
+
+		configure_file (
+			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/Logo.png
+			COPYONLY
+			)
+		configure_file (
+			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/SmallLogo.png
+			COPYONLY
+			)
+		configure_file (
+			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/SmallLogo44x44.png
+			COPYONLY
+			)
+		configure_file (
+			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/StoreLogo.png
+			COPYONLY
+			)
+
+		configure_file (
+			${COFFEE_DESKTOP_DIRECTORY}/common/icon_large.png
+			${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.dir/SplashScreen.png
+			COPYONLY
+			)
 	endif()

     set_target_properties ( ${TARGET}


libunibreak is not relocatable

libunibreak is not relocatable

--- cmake/projects/libunibreak/hunter.cmake
+++ cmake/projects/libunibreak/hunter.cmake
@@ -4,7 +4,6 @@
 # !!! DO NOT PLACE HEADER GUARDS HERE !!!

 include(hunter_add_version)
-include(hunter_cacheable)
 include(hunter_download)
 include(hunter_pick_scheme)
 include(hunter_cmake_args)
@@ -29,8 +28,4 @@

 hunter_configuration_types(libunibreak CONFIGURATION_TYPES Release)
 hunter_pick_scheme(DEFAULT url_sha1_autotools)
-hunter_cacheable(libunibreak)
-hunter_download(PACKAGE_NAME libunibreak
-    PACKAGE_INTERNAL_DEPS_ID "1"  # Increment for each new pull request
-    PACKAGE_UNRELOCATABLE_TEXT_FILES lib/pkgconfig/libunibreak.pc
-)
+hunter_download(PACKAGE_NAME libunibreak)


[cmake] silence dune-fem warning w/o alugrid present

--- config.h.cmake
+++ config.h.cmake
@@ -31,6 +31,10 @@
 #define DS_OVERRIDE ${DS_OVERRIDE}
 #define DS_FINAL  ${DS_FINAL}
 #define HAVE_DUNE_FEM_PARAMETER_REPLACE 0
+
+#ifndef HAVE_ALUGRID
+#  define DUNE_FEM_DONT_WARN_IN_COMM_MANAGER 1
+#endif

 /*** Silence implicitly False evaluation of undefined macro warnings ****/
 #ifndef HAVE_DUNE_FEM


Usermanual HTML output: we do not depend on DVI target, thus remove. Now almost works, some issues with description tags in faq.tex still present

--- cmake/LATEX.cmake
+++ cmake/LATEX.cmake
@@ -1698,18 +1698,7 @@
       set(default_build html)
     endif()

-    if(HTLATEX_COMPILER AND LATEX_MAIN_INPUT_SUBDIR)
-      message(STATUS
-        "Disabling HTML build for ${LATEX_TARGET_NAME}.tex because the main file is in subdirectory ${LATEX_MAIN_INPUT_SUBDIR}"
-        )
-      # The code below to run HTML assumes that LATEX_TARGET.tex is in the
-      # current directory. I have tried to specify that LATEX_TARGET.tex is
-      # in a subdirectory. That makes the build targets correct, but the
-      # HTML build still fails (at least for htlatex) because files are not
-      # generated where expected. I am getting around the problem by simply
-      # disabling HTML in this case. If someone really cares, they can fix
-      # this, but make sure it runs on many platforms and build programs.
-    elseif(HTLATEX_COMPILER)
+    if(HTLATEX_COMPILER)
       # htlatex places the output in a different location
       set(HTML_OUTPUT "${output_dir}/${LATEX_TARGET}.html")
       add_custom_command(OUTPUT ${HTML_OUTPUT}
@@ -1719,13 +1708,10 @@
           "${HTLATEX_COMPILER_TEX4HT_POSTPROCESSOR_FLAGS}"
           "${HTLATEX_COMPILER_T4HT_POSTPROCESSOR_FLAGS}"
           ${HTLATEX_COMPILER_ARGS}
-        DEPENDS
-          ${output_dir}/${LATEX_TARGET}.tex
-          ${output_dir}/${LATEX_TARGET}.dvi
         VERBATIM
         )
       add_custom_target(${html_target}
-        DEPENDS ${HTML_OUTPUT} ${dvi_target}
+        DEPENDS ${HTML_OUTPUT}
         SOURCES ${all_latex_sources}
         )
       if(NOT LATEX_EXCLUDE_FROM_DEFAULTS)


Fixed mimosa_test macro

Fixed mimosa_test macro

--- cmake/Tests.cmake
+++ cmake/Tests.cmake
@@ -1,7 +1,7 @@
 add_custom_target(tests)

-macro(mimosa_test MODULE SOURCES)
-  add_executable(tst-${MODULE} EXCLUDE_FROM_ALL ${SOURCES})
+macro(mimosa_test MODULE)
+  add_executable(tst-${MODULE} EXCLUDE_FROM_ALL ${ARGN})
   target_link_libraries(tst-${MODULE} ${MODULE} gtest_main gtest pthread)
   add_custom_target(run-tst-${MODULE} ./tst-${MODULE} DEPENDS tst-${MODULE})
   add_dependencies(tests run-tst-${MODULE})


avoid c-ares dependency on libnsl

avoid c-ares dependency on libnsl

--- cmake/cares.cmake
+++ cmake/cares.cmake
@@ -18,6 +18,10 @@
   endif()
   set(CARES_SHARED OFF CACHE BOOL "disable shared library")
   set(CARES_STATIC ON CACHE BOOL "link cares statically")
+  if(gRPC_BACKWARDS_COMPATIBILITY_MODE)
+    # See https://github.com/grpc/grpc/issues/17255
+    set(HAVE_LIBNSL OFF CACHE BOOL "avoid cares dependency on libnsl")
+  endif()
   add_subdirectory(third_party/cares/cares)

   if(TARGET c-ares)


Doxygen: Added option to remove doxy-inviwo's dependency on generate-processor-previews

--- tools/doxygen/doxygen.cmake
+++ tools/doxygen/doxygen.cmake
@@ -509,7 +509,12 @@
     set_target_properties("DOXY-generate-processor-previews"
                             PROPERTIES FOLDER "doc" EXCLUDE_FROM_ALL TRUE)

-    add_dependencies("DOXY-Inviwo" "DOXY-generate-processor-previews" "DOXY-Clear")
+    option(IVW_DOXYGEN_OPTIONAL_PROCESSOR_PREVIEWS "Turn on this to disable generating processor previews when building doxygen documentation (DOXY-Inviwo)" OFF)
+    if(${IVW_DOXYGEN_OPTIONAL_PROCESSOR_PREVIEWS})
+        add_dependencies("DOXY-Inviwo" "DOXY-Clear")
+    else()
+        add_dependencies("DOXY-Inviwo" "DOXY-generate-processor-previews" "DOXY-Clear")
+    endif()

     # Help, used for the help inside inviwo
     set(module_bases "")


Doxygen: Added a seperate target for generating previews

--- tools/doxygen/doxygen.cmake
+++ tools/doxygen/doxygen.cmake
@@ -406,11 +406,11 @@
         GENERATE_IMG
     )

+
     add_custom_target("DOXY-Inviwo"
         COMMAND ${CMAKE_COMMAND} -E echo "Building doxygen Inviwo"
         COMMAND ${CMAKE_COMMAND} -E remove_directory "${output_dir}/inviwo"
         COMMAND ${CMAKE_COMMAND} -E make_directory "${output_dir}/inviwo/html"
-        COMMAND inviwo --save-previews "${output_dir}/inviwo/html" --quit
         COMMAND ${DOXYGEN_EXECUTABLE} "${output_dir}/inviwo.doxy"
         WORKING_DIRECTORY ${output_dir}
         COMMENT "Generating Inviwo API documentation with Doxygen"
@@ -419,7 +419,19 @@
     set_target_properties("DOXY-Inviwo" PROPERTIES FOLDER "doc" EXCLUDE_FROM_ALL TRUE)
     add_dependencies("DOXY-ALL" "DOXY-Inviwo")

-    # Help, used for the help inside invowo
+
+    add_custom_target("DOXY-generate-processor-previews"
+        COMMAND inviwo --save-previews "${output_dir}/inviwo/html" --quit
+        WORKING_DIRECTORY ${output_dir}
+        COMMENT "Generating Inviwo API documentation with Doxygen"
+        VERBATIM
+    )
+    set_target_properties("DOXY-generate-processor-previews"
+                            PROPERTIES FOLDER "doc" EXCLUDE_FROM_ALL TRUE)
+    add_dependencies("DOXY-ALL" "DOXY-generate-processor-previews")
+    add_dependencies("DOXY-generate-processor-previews" "DOXY-Inviwo")
+
+    # Help, used for the help inside inviwo
     set(module_bases "")
     foreach(mod ${${modules_var}})
         if(${${mod}_opt}) # Only include enabled modules


Error in DLLEXPORT

Error in DLLEXPORT

--- cmake/conf.cmake
+++ cmake/conf.cmake
@@ -21,7 +21,7 @@
 		set(DLLIMPORT "__declspec(dllimport)")
 	endif()
 else()
-	set(DLLEXPORT "__attribute__ ((visibility (\"default\"))")
+	set(DLLEXPORT "__attribute__((visibility (\"default\")))")
 	set(DLLIMPORT "")
 endif()


remove the duplicate flag

remove the duplicate flag

--- cmake/cuda.cmake
+++ cmake/cuda.cmake
@@ -200,7 +200,7 @@
 endif()
 else(NOT WIN32)
 if(CMAKE_BUILD_TYPE  STREQUAL "Debug")
-    list(APPEND CUDA_NVCC_FLAGS  "-g -lineinfo -G")
+    list(APPEND CUDA_NVCC_FLAGS  "-g -G")
 elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
   list(APPEND CUDA_NVCC_FLAGS "-O3 -DNDEBUG")
 else()


Add option to give a path to the font awesome zip file

This will allow project to not download every time the font awesome

--- CMake/GutenbergFontAwesomeMacro.cmake
+++ CMake/GutenbergFontAwesomeMacro.cmake
@@ -28,6 +28,8 @@
 # FONT_AWESOME_VERSION: String version used for font awesome. Default is "4.2.0".
 # URL: String of the URL to download font-awesome. Default is
 # fortawesome.github.io/Font-Awesome/assets/font-awesome-${MY_GUTENBERG_FONT_AWESOME_VERSION}.zip
+# ZIP_FILE: Path to the font awesome zip file. If no ZIP_FILE is given, font
+# awesome will be automatically downloaded from the given (or not) URL.
 #
 # This macro will define the following variables:
 # GUTENBERG_FONT_AWESOME_DIR: Path to the unpacked font awesome dir
@@ -46,6 +48,7 @@
       FONT_FILE_ALIAS
       FONT_AWESOME_VERSION
       URL
+      ZIP_FILE
    )

   set(multiValueArg)
@@ -74,21 +77,23 @@
     set(MY_GUTENBERG_CUSTOM_URL "fortawesome.github.io/Font-Awesome/assets/font-awesome-${MY_GUTENBERG_FONT_AWESOME_VERSION}.zip")
   endif()

-  set(ZIP_FILE "${MY_GUTENBERG_DESTINATION_DIR}/FontAwesome.zip")
-  file(DOWNLOAD ${MY_GUTENBERG_CUSTOM_URL} ${ZIP_FILE})
+  if (NOT MY_GUTENBERG_ZIP_FILE)
+    set(MY_GUTENBERG_ZIP_FILE "${MY_GUTENBERG_DESTINATION_DIR}/FontAwesome.zip")
+    file(DOWNLOAD ${MY_GUTENBERG_CUSTOM_URL} ${MY_GUTENBERG_ZIP_FILE})

-  # Check for download error
-  list(GET STATUS 0 ERROR_CODE)
-  if(ERROR_CODE)
-    file(REMOVE ${ZIP_FILE})
-    message(FATAL_ERROR "Failed to download file !")
+    # Check for download error
+    list(GET STATUS 0 ERROR_CODE)
+    if(ERROR_CODE)
+      file(REMOVE ${MY_GUTENBERG_ZIP_FILE})
+      message(FATAL_ERROR "Failed to download file !")
+    endif()
   endif()

   set(GUTENBERG_FONT_AWESOME_DIR "${MY_GUTENBERG_DESTINATION_DIR}/FontAwesome")
   execute_process(
-    COMMAND ${CMAKE_COMMAND} -E tar xzf ${ZIP_FILE}
+    COMMAND ${CMAKE_COMMAND} -E tar xzf ${MY_GUTENBERG_ZIP_FILE}
     OUTPUT ${GUTENBERG_FONT_AWESOME_DIR}
-    DEPENDS ${ZIP_FILE}
+    DEPENDS ${MY_GUTENBERG_ZIP_FILE}
     WORKING_DIRECTORY ${MY_GUTENBERG_DESTINATION_DIR}
     RESULT_VARIABLE ERROR_CODE
     )


Fixes an issues when zip command is used instead of jar

--- cmake/cmake_celix/BundlePackaging.cmake
+++ cmake/cmake_celix/BundlePackaging.cmake
@@ -257,12 +257,15 @@
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
         )
     elseif(ZIP_COMMAND)
+        add_custom_command(OUTPUT ${BUNDLE_CONTENT_DIR}
+            COMMAND ${CMAKE_COMMAND} -E make_directory ${BUNDLE_CONTENT_DIR}
+        )
+
         add_custom_command(OUTPUT ${BUNDLE_FILE}
-            COMMAND ${CMAKE_COMMAND} -E make_directory ${BUNDLE_CONTENT_DIR}
             COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BUNDLE_GEN_DIR}/MANIFEST.MF META-INF/MANIFEST.MF
             COMMAND ${ZIP_COMMAND} -rq ${BUNDLE_FILE} *
             COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
-            DEPENDS  ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
+            DEPENDS ${BUNDLE_CONTENT_DIR} ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
             WORKING_DIRECTORY ${BUNDLE_CONTENT_DIR}
         )
     else()


cmake: toolchain_cc_imacros: don't use space separated arguments

Because CMake explicitly deduplicates arguments, it is not possible
to use toolchain_cc_imacros() multiple times as the later "-imacros"
are stripped away, leaving the associated file arguments dangling.
The documented workaround in the CMake manual involves some "SHELL:..."
construct but that doesn't get through zephyr_compile_options()
undammaged.

Let's simply remove this issue altogether by replacing "-imacros x.h"
with the joined form "--imacros=x.h" instead. Both gcc and clang
support this syntax.

FYI, this joined form is also available for other arguments such as:

	-include x.h   -->   --include=x.h
	-A foo         -->   --assert=foo
	-D foo         -->   --define-macro=foo
	-U foo         -->   --undefine-macro=foo

Etc.

Signed-off-by: Nicolas Pitre <76342682d5afc62854e1102d9578521fe1ed6813@baylibre.com>

--- cmake/compiler/gcc/target_imacros.cmake
+++ cmake/compiler/gcc/target_imacros.cmake
@@ -4,6 +4,6 @@

 macro(toolchain_cc_imacros header_file)

-  zephyr_compile_options(-imacros ${header_file})
+  zephyr_compile_options(--imacros=${header_file})

 endmacro()


From KOS, "'ve mentioned in the "osg-users" ML about build error with the newest GStreamer 1.5

Please, have a look at the attached patch.

CMakeModules/FindGStreamer.cmake"

git-svn-id: aa838dfc23441284dd616281de4245daec5d2135@14984 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/FindGStreamer.cmake
+++ CMakeModules/FindGStreamer.cmake
@@ -83,18 +83,18 @@
     find_package(PkgConfig)

     macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
-        pkg_check_modules(PC_${_component_prefix} QUIET ${_pkgconfig_name})
+        pkg_check_modules(${_component_prefix} QUIET ${_pkgconfig_name})

-        find_path(${_component_prefix}_INCLUDE_DIRS
-            NAMES ${_header}
-            HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
-            PATH_SUFFIXES gstreamer-1.0
-        )
+#        find_path(${_component_prefix}_INCLUDE_DIRS
+#            NAMES ${_header}
+#            HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
+#            PATH_SUFFIXES gstreamer-1.0
+#        )

-        find_library(${_component_prefix}_LIBRARIES
-            NAMES ${_library}
-            HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}
-        )
+#        find_library(${_component_prefix}_LIBRARIES
+#            NAMES ${_library}
+#            HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}
+#        )
     endmacro()
 endif ()


Disable cusolver in CUDA 8.0

Disable cusolver in CUDA 8.0

This works around linking issues.

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -128,6 +128,8 @@
 if (ENABLE_CUDA)
     if(${CUDA_VERSION} VERSION_LESS 7.5)
         set(CUSOLVER_AVAILABLE FALSE CACHE BOOL "TRUE if cusolver library is available")
+    elseif(${CUDA_VERSION} VERSION_GREATER 7.5)
+        set(CUSOLVER_AVAILABLE FALSE CACHE BOOL "TRUE if cusolver library is available")
     else()
         if (NOT CUSOLVER_AVAILABLE)
             # message at first time


Changed from indiana to duke

Changed from indiana to duke

--- CMakeModules/CPackSettings.cmake
+++ CMakeModules/CPackSettings.cmake
@@ -6,8 +6,8 @@
 SET(CPACK_PACKAGE_VERSION_PATCH "${KLAMPT_PATCH_VERSION}")
 #SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Klampt ${V_MAJOR}.${V_MINOR}")
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Klampt")
-SET(CPACK_PACKAGE_CONTACT "K. Hauser")
-SET(CPACK_PACKAGE_VENDOR "Indiana University")
+SET(CPACK_PACKAGE_CONTACT "Kris Hauser")
+SET(CPACK_PACKAGE_VENDOR "Duke University")
 IF(WIN32)
   SET(CPACK_GENERATOR "WIX")
   SET(CPACK_WIX_UPGRADE_GUID 6D28652E-751D-42F0-9D8A-44EAA79CB84B)


cmake: remove variable dereferences in if statements

Change-Id: I3af0b1abbbf770524a4e044ed85d68f32eddf679

--- CMake/GenerateExportHeader.cmake
+++ CMake/GenerateExportHeader.cmake
@@ -187,7 +187,7 @@
     string(REGEX REPLACE ".*Version ([0-9]+(\\.[0-9]+)+).*" "\\1"
       _intel_version "${_intel_version_info}")

-    if(${_intel_version} VERSION_LESS "12.0")
+    if(_intel_version VERSION_LESS "12.0")
       set(_INTEL_TOO_OLD TRUE)
     endif()
   endif()
@@ -250,7 +250,7 @@

   get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)

-  if(NOT ${type} STREQUAL "STATIC_LIBRARY")
+  if(NOT type STREQUAL "STATIC_LIBRARY")
     if(WIN32)
       set(DEFINE_EXPORT "__declspec(dllexport)")
       set(DEFINE_IMPORT "__declspec(dllimport)")
@@ -343,11 +343,11 @@

 function(GENERATE_EXPORT_HEADER TARGET_LIBRARY)
   get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
-  if(${type} STREQUAL "MODULE")
+  if(type STREQUAL "MODULE")
     message(WARNING "This macro should not be used with libraries of type MODULE")
     return()
   endif()
-  if(NOT ${type} STREQUAL "STATIC_LIBRARY" AND NOT ${type} STREQUAL "SHARED_LIBRARY" AND NOT ${type} STREQUAL "OBJECT_LIBRARY")
+  if(NOT type STREQUAL "STATIC_LIBRARY" AND NOT type STREQUAL "SHARED_LIBRARY" AND NOT type STREQUAL "OBJECT_LIBRARY")
     message(WARNING "This macro can only be used with libraries")
     return()
   endif()


CPack should ignore TextMate2 config files

--- CMakeModules/CPackSettings.cmake
+++ CMakeModules/CPackSettings.cmake
@@ -18,6 +18,7 @@
     ".md5$"
     "/blueprint"
     ".DS_Store"
+    ".tm_properties"
     "mkwebdocs.sh"
     "/html/"
     "/bindings/"


Fix dependencies for custom header parser/generator

--- scripts/header_gen.cmake
+++ scripts/header_gen.cmake
@@ -31,15 +31,19 @@
 function(generate_http_header_parser_generator INFILE)
     add_custom_command(
         OUTPUT header_names_parser.cpp
-        DEPENDS filtered_headers ${GEN_HEADER_PARSER}
+        DEPENDS filtered_headers ${GEN_HEADER_PARSER} ${INFILE}
         COMMENT "Generate HTTP header names parser"
         COMMAND cat ${INFILE} | ${GEN_HEADER_PARSER} > header_names_parser.cpp
     )

     add_custom_command(
         OUTPUT header_names_generator.cpp
-        DEPENDS filtered_headers ${GEN_HEADER_GENERATOR}
+        DEPENDS filtered_headers ${GEN_HEADER_GENERATOR} ${INFILE}
         COMMENT "Generate HTTP header names generator"
         COMMAND cat ${INFILE} | ${GEN_HEADER_GENERATOR} > header_names_generator.cpp
     )
+    add_custom_target(
+        http_header_parser_generator
+        DEPENDS filtered_headers header_names_parser.cpp header_names_generator.cpp
+    )
 endfunction()


Update skel to use PROJECT_TARGET instead of GAME_TARGET

--- scripts/new-project.cmake
+++ scripts/new-project.cmake
@@ -9,8 +9,8 @@
 endif()

 # Produces name that can be a folder
-string(MAKE_C_IDENTIFIER ${PROJECT_NAME} GAME_TARGET)
-set(PROJECT_ROOT ${TERRAFORM_ROOT}/game/${GAME_TARGET} CACHE PATH "Where the project will be generated")
+string(MAKE_C_IDENTIFIER ${PROJECT_NAME} PROJECT_TARGET)
+set(PROJECT_ROOT ${TERRAFORM_ROOT}/projects/${PROJECT_TARGET} CACHE PATH "Where the project will be generated")
 file(RELATIVE_PATH TERRAFORM_RELATIVE_ROOT ${PROJECT_ROOT} ${TERRAFORM_ROOT})

 # Copy skeleton to target
@@ -25,7 +25,7 @@
 message("")
 message("Summary:")
 message(STATUS "Project name:                ${PROJECT_NAME}")
-message(STATUS "Project target:              ${GAME_TARGET}")
+message(STATUS "Project target:              ${PROJECT_TARGET}")
 message(STATUS "Project folder:              ${PROJECT_ROOT}")
 message("")
 message(TERRAFORM "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --")


ffmpeg/4.x: update FFmpeg wrapper

ffmpeg/4.x: update FFmpeg wrapper

- FFmpeg 4.3.1

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,9 +1,9 @@
-# Binaries branch name: ffmpeg/master_20200609
-# Binaries were created for OpenCV: 5f3012fc9afbffbf53a38f1468523d3454b3e2f6
-ocv_update(FFMPEG_BINARIES_COMMIT "1df9bf0c0c6c2cf225bd3d8e4cf5985198352454")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "854b3460c435d04277e1f1ecc06cb809")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "3a46d6356220796e044817ae3a21cc31")
-ocv_update(FFMPEG_FILE_HASH_CMAKE "ad57c038ba34b868277ccbe6dd0f9602")
+# Binaries branch name: ffmpeg/master_20200908
+# Binaries were created for OpenCV: f445b826d084188077a5e9d204c4c33d1589f380
+ocv_update(FFMPEG_BINARIES_COMMIT "6152e132572dfdaa32887eabeb7199bef49b14dc")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "37e2dadf776631acc8856e281f29cf42")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "cf5dba83edf8619f57ccff4edb989c62")
+ocv_update(FFMPEG_FILE_HASH_CMAKE "f8e65dbe4a3b4eedc0d2997e07c3f3fd")

 function(download_win_ffmpeg script_var)
   set(${script_var} "" PARENT_SCOPE)


update findSiconosKernel cmake macro according to findSiconosNumerics

--- Numerics/cmake/FindSiconosKernel.cmake
+++ Numerics/cmake/FindSiconosKernel.cmake
@@ -10,16 +10,33 @@
 # SiconosKernel_LIBRARY_DIRECTORY before FIND_PACKAGE(SiconosKernel)

 IF(SiconosKernel_LIBRARY_DIRECTORY)
-  FIND_LIBRARY(SiconosKernel_FOUND SiconosKernel PATHS "${SiconosKernel_LIBRARY_DIRECTORY}")
+  MESSAGE(STATUS "Looking for Kernel library in ${SiconosKernel_LIBRARY_DIRECTORY}")
+  FIND_LIBRARY(SiconosKernel_FOUND SiconosKernel PATHS "${SiconosKernel_LIBRARY_DIRECTORY}" NO_DEFAULT_PATH)
+  IF(SiconosKernel_FOUND)
+    MESSAGE(STATUS "Found : ${SiconosKernel_FOUND}")
+  ENDIF(SiconosKernel_FOUND)
 ELSE(SiconosKernel_LIBRARY_DIRECTORY)
   FIND_LIBRARY(SiconosKernel_FOUND SiconosKernel  ENV LD_LIBRARY_PATH ENV DYLD_LIBRARY_PATH)
 ENDIF(SiconosKernel_LIBRARY_DIRECTORY)

 IF(SiconosKernel_FOUND)
+  SET(SiconosKernel_LIBRARIES ${SiconosKernel_FOUND})
   GET_FILENAME_COMPONENT(SiconosKernel_LIBRARY_DIRS ${SiconosKernel_FOUND} PATH)
-  SET(SiconosKernel_LIBRARIES ${SiconosKernel_FOUND})
   GET_FILENAME_COMPONENT(SiconosKernel_LIBRARY_DIRS_DIR ${SiconosKernel_LIBRARY_DIRS} PATH)
-  SET(SiconosKernel_INCLUDE_DIRS ${SiconosKernel_LIBRARY_DIRS_DIR}/include/Siconos/Kernel)
+  GET_FILENAME_COMPONENT(SiconosKernel_LIBRARY_DIRS_DIR_DIR ${SiconosKernel_LIBRARY_DIRS_DIR} PATH)
+
+  FIND_PATH(SiconosKernel_INCLUDE_DIRS SiconosKernel.hpp
+    HINTS ${SiconosKernel_LIBRARY_DIRS_DIR} ${SiconosKernel_LIBRARY_DIRS_DIR_DIR}
+    ENV PATH
+    PATH_SUFFIXES Siconos/Kernel)
+
+  IF(NOT SiconosKernel_INCLUDE_DIRS)
+    IF(SiconosKernel_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR
+        "Required Siconos Kernel headers not found. Please specify headers location in CMAKE_INCLUDE_PATH")
+    ENDIF(SiconosKernel_FIND_REQUIRED)
+  ENDIF(NOT SiconosKernel_INCLUDE_DIRS)
+
 ELSE(SiconosKernel_FOUND)
   IF(SiconosKernel_FIND_REQUIRED)
     MESSAGE(FATAL_ERROR


disable warning C4127 (caused by Qt and duktape)

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -73,7 +73,7 @@
         /wd4251       # -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2'
         /wd4592       # -> disable warning: 'identifier': symbol will be dynamically initialized (implementation limitation)
         # /wd4201     # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
-        # /wd4127     # -> disable warning: conditional expression is constant (caused by Qt)
+        /wd4127       # -> disable warning: conditional expression is constant (caused by Qt and duk)

         $<$<CONFIG:Debug>:
         /RTCc         # -> value is assigned to a smaller data type and results in a data loss


cmake: clean up gitscript.cmake

cmake: clean up gitscript.cmake

--- CMakeModules/gitscript.cmake
+++ CMakeModules/gitscript.cmake
@@ -1,5 +1,3 @@
-set(CMAKE_MODULE_PATH ${TOP_SOURCE_DIR}/CMakeModules)
-find_package(Mercurial)
 if (GIT_EXECUTABLE)
   #later use git describe here
   execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD


Fix wrappers

Fix wrappers

--- Examples/Build/vtkMy/vtkMy.cmake
+++ Examples/Build/vtkMy/vtkMy.cmake
@@ -7,7 +7,7 @@
 IF (USE_VTK_FILE)
   INCLUDE (${USE_VTK_FILE})
 ELSE (USE_VTK_FILE)
-  MESSAGE("Error, unable to find VTK, please edit your CMakeCache.txt file to specify the correct location of your VTK build")
+  MESSAGE("Error. Unable to find VTK, please edit your CMakeCache.txt file to specify the correct location of your VTK build.")
   SET (VTKMY_CAN_BUILD 0)
 ENDIF (USE_VTK_FILE)

@@ -20,6 +20,11 @@

 SET (EXECUTABLE_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin/ CACHE PATH
      "Single output directory for building all executables.")
+
+MARK_AS_ADVANCED(
+  LIBRARY_OUTPUT_PATH
+  EXECUTABLE_OUTPUT_PATH
+)

 #
 # Build shared libs ?
@@ -36,22 +41,144 @@
 #
 # Rational: even if your VTK was wrapped, it does not mean that you want to
 # wrap your own local classes.
+# Default value is OFF as the VTK cache might have set them to ON but the wrappers
+# might not be present (or yet not found).
 #

+#
+# Tcl
+#
+
 IF (VTK_WRAP_TCL)
+
   OPTION(VTKMY_WRAP_TCL
-         "Wrap classes into the TCL intepreted language."
-         ${VTK_WRAP_TCL})
+         "Wrap classes into the TCL interpreted language."
+         OFF)
+
+  IF (VTKMY_WRAP_TCL)
+
+    IF (NOT VTK_WRAP_TCL_EXE)
+
+      MESSAGE("Error. Unable to find VTK_WRAP_TCL_EXE, please edit this value to specify the correct location of the VTK Tcl wrapper.")
+      MARK_AS_ADVANCED(CLEAR VTK_WRAP_TCL_EXE)
+      SET (VTKMY_CAN_BUILD 0)
+
+    ELSE (NOT VTK_WRAP_TCL_EXE)
+
+      FIND_FILE (VTK_WRAP_HINTS hints ${VTKMY_SOURCE_DIR}/Wrapping)
+      MARK_AS_ADVANCED(VTK_WRAP_HINTS)
+
+      IF (USE_INSTALLED_VTK)
+        INCLUDE (${CMAKE_ROOT}/Modules/FindTCL.cmake)
+      ENDIF (USE_INSTALLED_VTK)
+
+      IF (TCL_INCLUDE_PATH)
+        INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH})
+      ENDIF (TCL_INCLUDE_PATH)
+
+    ENDIF (NOT VTK_WRAP_TCL_EXE)
+  ENDIF (VTKMY_WRAP_TCL)
 ENDIF (VTK_WRAP_TCL)

+#
+# Python
+#
+
+IF (VTK_WRAP_PYTHON)
+
+  OPTION(VTKMY_WRAP_PYTHON
+         "Wrap classes into the Python interpreted language."
+         OFF)
+
+  IF (VTKMY_WRAP_PYTHON)
+
+    IF (NOT VTK_WRAP_PYTHON_EXE)
+
+      MESSAGE("Error. Unable to find VTK_WRAP_PYTHON_EXE, please edit this value to specify the correct location of the VTK Python wrapper.")
+      MARK_AS_ADVANCED(CLEAR VTK_WRAP_PYTHON_EXE)
+      SET (VTKMY_CAN_BUILD 0)
+
+    ELSE (NOT VTK_WRAP_PYTHON_EXE)
+
+      FIND_FILE(VTK_WRAP_HINTS hints ${VTKMY_SOURCE_DIR}/Wrapping )
+      MARK_AS_ADVANCED(VTK_WRAP_HINTS)
+
+      IF (USE_INSTALLED_VTK)
+        INCLUDE (${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
+      ENDIF (USE_INSTALLED_VTK)
+
+      IF (PYTHON_INCLUDE_PATH)
+        INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
+      ENDIF (PYTHON_INCLUDE_PATH)
+
+      IF (WIN32)
+        IF (NOT BUILD_SHARED_LIBS)
+          MESSAGE("Error. Python support requires BUILD_SHARED_LIBS to be ON.")
+          SET (VTKMY_CAN_BUILD 0)
+        ENDIF (NOT BUILD_SHARED_LIBS)
+      ENDIF (WIN32)
+
+    ENDIF (NOT VTK_WRAP_PYTHON_EXE)
+  ENDIF (VTKMY_WRAP_PYTHON)
+ENDIF (VTK_WRAP_PYTHON)
+
+#
+# Java
+#
+
 IF (VTK_WRAP_JAVA)
+
   OPTION(VTKMY_WRAP_JAVA
-         "Wrap classes into the Java intepreted language."
-         ${VTK_WRAP_JAVA})
+         "Wrap classes into the Java interpreted language."
+         OFF)
+
+  IF (VTKMY_WRAP_JAVA)
+
+    IF (NOT VTK_WRAP_JAVA_EXE)
+      MESSAGE("Error. Unable to find VTK_WRAP_JAVA_EXE, please edit this value to specify the correct location of the VTK Java wrapper.")
+      MARK_AS_ADVANCED(CLEAR VTK_WRAP_JAVA_EXE)
+      SET (VTKMY_CAN_BUILD 0)
+    ENDIF (NOT VTK_WRAP_JAVA_EXE)
+
+    IF (NOT VTK_PARSE_JAVA_EXE)
+      MESSAGE("Error. Unable to find VTK_PARSE_JAVA_EXE, please edit this value to specify the correct location of the VTK Java parser.")
+      MARK_AS_ADVANCED(CLEAR VTK_PARSE_JAVA_EXE)
+      SET (VTKMY_CAN_BUILD 0)
+    ENDIF (NOT VTK_PARSE_JAVA_EXE)
+
+    IF (VTK_WRAP_JAVA_EXE AND VTK_PARSE_JAVA_EXE)
+
+      FIND_FILE(VTK_WRAP_HINTS hints ${VTKMY_SOURCE_DIR}/Wrapping )
+      MARK_AS_ADVANCED(VTK_WRAP_HINTS)
+
+      IF (USE_INSTALLED_VTK)
+        INCLUDE (${CMAKE_ROOT}/Modules/FindJNI.cmake)
+      ENDIF (USE_INSTALLED_VTK)
+
+      IF (JAVA_INCLUDE_PATH)
+        INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH})
+      ENDIF (JAVA_INCLUDE_PATH)
+
+      IF (JAVA_INCLUDE_PATH2)
+        INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH2})
+      ENDIF (JAVA_INCLUDE_PATH2)
+
+      IF (JAVA_AWT_INCLUDE_PATH)
+        INCLUDE_DIRECTORIES(${JAVA_AWT_INCLUDE_PATH})
+      ENDIF (JAVA_AWT_INCLUDE_PATH)
+
+      IF (NOT VTK_JAVA_HOME)
+        SET (VTK_JAVA_HOME ${VTKMY_BINARY_DIR}/java/vtk CACHE PATH "Path to Java install")
+      ENDIF (NOT VTK_JAVA_HOME)
+
+      IF (WIN32)
+        IF (NOT BUILD_SHARED_LIBS)
+          MESSAGE("Error. Java support requires BUILD_SHARED_LIBS to be ON.")
+          SET (VTKMY_CAN_BUILD 0)
+        ENDIF (NOT BUILD_SHARED_LIBS)
+      ENDIF (WIN32)
+
+    ENDIF (VTK_WRAP_JAVA_EXE AND VTK_PARSE_JAVA_EXE)
+  ENDIF (VTKMY_WRAP_JAVA)
 ENDIF (VTK_WRAP_JAVA)

-IF (VTK_WRAP_PYTHON)
-  OPTION(VTKMY_WRAP_PYTHON
-         "Wrap classes into the Python intepreted language."
-         ${VTK_WRAP_PYTHON})
-ENDIF (VTK_WRAP_PYTHON)


Prevent CMake from injecting predefined set of warnings into XCode project to avoid flood of "overloaded virtual function" warnings

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -189,6 +189,10 @@
     set_target_properties(${TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN "${XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN}")
     #set_target_properties(${TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN[arch=x86_64] "YES")
   endif()
+
+  # Prevent CMake from injecting predefined set of warnings, particularly "-Wmost"
+  # that overrides "-Wno-overloaded-virtual" and causes flood of warnings for Ogre headers
+  set_target_properties(${TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")

   ogre_create_vcproj_userfile(${TARGETNAME})
 endfunction(ogre_config_common)


Samples do not have _d appended so don't look for pdb with that suffix

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -230,7 +230,7 @@

   if (OGRE_INSTALL_PDB)
 	  # install debug pdb files
-	  install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${SAMPLENAME}_d.pdb
+	  install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${SAMPLENAME}.pdb
 		  DESTINATION bin${OGRE_DEBUG_PATH}
 		  CONFIGURATIONS Debug
 		  )


ENH: Dash21 - no style, new Qt

ENH: Dash21 - no style, new Qt

--- Dash21_Kitware_TubeTK_Nightly.cmake
+++ Dash21_Kitware_TubeTK_Nightly.cmake
@@ -42,7 +42,7 @@
 set( SITE_CMAKE_COMMAND
   "/home/kitware/Dashboards/Support/cmake-2.8.8/bin/cmake" )
 set( SITE_QMAKE_COMMAND
-  "/home/kitware/Dashboards/Support/qt-4.7.3/bin/qmake" )
+  "/home/kitware/Dashboards/Support/qt-everywhere-opensource-build-4.7.4/bin/qmake" )
 set( SITE_CTEST_COMMAND
   "/home/kitware/Dashboards/Support/cmake-2.8.8/bin/ctest -j5" )

@@ -59,7 +59,7 @@
 set( SITE_EXPERIMENTAL_MEMORY ON )
 set( SITE_EXPERIMENTAL_PACKAGE ON )
 set( SITE_EXPERIMENTAL_UPLOAD ON )
-set( SITE_EXPERIMENTAL_STYLE ON )
+set( SITE_EXPERIMENTAL_STYLE OFF )

 set( SITE_CONTINUOUS_BUILD ON )
 set( SITE_CONTINUOUS_TEST ON )
@@ -67,15 +67,15 @@
 set( SITE_CONTINUOUS_MEMORY OFF )
 set( SITE_CONTINUOUS_PACKAGE OFF )
 set( SITE_CONTINUOUS_UPLOAD OFF )
-set( SITE_CONTINUOUS_STYLE ON )
+set( SITE_CONTINUOUS_STYLE OFF )

 set( SITE_NIGHTLY_BUILD ON )
 set( SITE_NIGHTLY_TEST ON )
-set( SITE_NIGHTLY_COVERAGE OFF )
-set( SITE_NIGHTLY_MEMORY OFF )
+set( SITE_NIGHTLY_COVERAGE ON )
+set( SITE_NIGHTLY_MEMORY ON )
 set( SITE_NIGHTLY_PACKAGE ON )
 set( SITE_NIGHTLY_UPLOAD ON )
-set( SITE_NIGHTLY_STYLE ON )
+set( SITE_NIGHTLY_STYLE OFF )
 ##############################################################################

 ##############################################################################


fix warning for `std::__shared_counter`

fix warning for `std::__shared_counter`

supress warning for CUDA 10.1 - 10.2:

```
alpaka/vec/Vec.hpp(1040): warning ComputationalRadiationPhysics#2912-D: calling a __host__ function("std::__shared_count<( ::__gnu_cxx::_Lock_policy)2> ::__shared_count") from a __host__ __device__ function("alpaka::dev::DevCpu::DevCpu") is not allowed
```

--- alpakaConfig.cmake
+++ alpakaConfig.cmake
@@ -675,6 +675,21 @@
                     LIST(APPEND CUDA_NVCC_FLAGS -Xcudafe --diag_suppress=esa_on_defaulted_function_ignored)
                 ENDIF()

+                # avoids warnings on host-device signature of 'std::__shared_count<>'
+                IF(CUDA_VERSION EQUAL 10.0)
+                    LIST(APPEND CUDA_NVCC_FLAGS -Xcudafe --diag_suppress=2905)
+                ENDIF()
+
+                # avoids warnings on host-device signature of 'std::__shared_count<>'
+                IF(CUDA_VERSION EQUAL 10.1)
+                    LIST(APPEND CUDA_NVCC_FLAGS -Xcudafe --diag_suppress=2912)
+                ENDIF()
+
+                # avoids warnings on host-device signature of 'std::__shared_count<>'
+                IF(CUDA_VERSION EQUAL 10.2)
+                    LIST(APPEND CUDA_NVCC_FLAGS -Xcudafe --diag_suppress=2976)
+                ENDIF()
+
                 IF(ALPAKA_CUDA_KEEP_FILES)
                     MAKE_DIRECTORY("${PROJECT_BINARY_DIR}/nvcc_tmp")
                     LIST(APPEND CUDA_NVCC_FLAGS "--keep" "--keep-dir" "${PROJECT_BINARY_DIR}/nvcc_tmp")


ecp5/cmake: Improve error message when trellis/pytrellis not found

Signed-off-by: David Shah <4be9b043912c80de45ffb490ebd07e45bc0fcd34@gmail.com>

--- ecp5/family.cmake
+++ ecp5/family.cmake
@@ -1,5 +1,16 @@

 set(devices 45k)
+
+if (NOT DEFINED TRELLIS_ROOT)
+    message(FATAL_ERROR "you must define TRELLIS_ROOT using -DTRELLIS_ROOT=/path/to/prjtrellis for ECP5 support")
+endif()
+
+
+file( GLOB found_pytrellis ${TRELLIS_ROOT}/libtrellis/pytrellis.*)
+
+if ("${found_pytrellis}" STREQUAL "")
+    message(FATAL_ERROR "failed to find pytrellis library in ${TRELLIS_ROOT}/libtrellis/")
+endif()

 set(DB_PY ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/trellis_import.py)


ENH: Use elastix Github mirror until SVN SSL certificate issues are resolved

Also update elastix to revision 5260

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -1,11 +1,11 @@
 set( proj Elastix )

-set( ELASTIX_REPOSITORY https://svn.bigr.nl/elastix/trunkpublic/ )
-set( ELASTIX_REVISION 5186 )
+set( ELASTIX_GIT_REPOSITORY http://github.com/kaspermarstal/elastix )
+set( ELASTIX_GIT_TAG 31d502ba103e56f1c878923680ca1a706f348011 )

 ExternalProject_Add( ${proj}
-  SVN_REPOSITORY ${ELASTIX_REPOSITORY}
-  SVN_REVISION -r ${ELASTIX_REVISION}
+  GIT_REPOSITORY ${ELASTIX_GIT_REPOSITORY}
+  GIT_TAG ${ELASTIX_GIT_TAG}
   UPDATE_COMMAND ""
   SOURCE_DIR ${proj}
   BINARY_DIR ${proj}-build


Fix nomlib's cmake script for package detection (of itself)

--- Resources/CMake/nomlib-config.cmake
+++ Resources/CMake/nomlib-config.cmake
@@ -53,8 +53,7 @@

 # handle the QUIETLY and REQUIRED arguments and set NOMLIB_FOUND to TRUE if
 # all listed variables are TRUE
-#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-
+include ( FindPackageHandleStandardArgs )
 FIND_PACKAGE_HANDLE_STANDARD_ARGS ( nomlib DEFAULT_MSG NOMLIB_LIBRARY NOMLIB_INCLUDE_DIR )

 mark_as_advanced ( NOMLIB_LIBRARY NOMLIB_INCLUDE_DIR )


ENH: improve GDAL check verbosity

ENH: improve GDAL check verbosity


RM: python 3 from SB

RM: python 3 from SB

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -79,7 +79,7 @@
   ADD_SUPERBUILD_CMAKE_VAR(OTB MUPARSERX_LIBRARY)
 endif()

-if(OTB_WRAP_PYTHON OR OTB_WRAP_JAVA OR OTB_WRAP_PYTHON3)
+if(OTB_WRAP_PYTHON OR OTB_WRAP_JAVA)
   ADD_SUPERBUILD_CMAKE_VAR(OTB SWIG_EXECUTABLE)
   ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(OTB SWIG)
 endif()
@@ -88,12 +88,6 @@
   ADD_SUPERBUILD_CMAKE_VAR(OTB PYTHON_INCLUDE_DIR)
   ADD_SUPERBUILD_CMAKE_VAR(OTB PYTHON_LIBRARY)
   ADD_SUPERBUILD_CMAKE_VAR(OTB PYTHON_EXECUTABLE)
-endif()
-
-if(OTB_WRAP_PYTHON3)
-  ADD_SUPERBUILD_CMAKE_VAR(OTB PYTHON3_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(OTB PYTHON3_LIBRARY)
-  ADD_SUPERBUILD_CMAKE_VAR(OTB PYTHON3_EXECUTABLE)
 endif()

 if(OTB_USE_QT)
@@ -213,7 +207,6 @@
   -DOTB_USE_OPENMP:BOOL=${OTB_USE_OPENMP}
   -DOTB_USE_GSL:BOOL=${OTB_USE_GSL}
   -DOTB_WRAP_PYTHON:BOOL=${OTB_WRAP_PYTHON}
-  -DOTB_WRAP_PYTHON3:BOOL=${OTB_WRAP_PYTHON3}
   -DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
   -DOTB_USE_MPI:BOOL=${OTB_USE_MPI}
   -DOTB_USE_SPTW:BOOL=${OTB_USE_SPTW}


Bump the remote vtkDICOM hash to v0.7.5.

--- Remote/vtkDICOM.remote.cmake
+++ Remote/vtkDICOM.remote.cmake
@@ -5,6 +5,6 @@
 vtk_fetch_module(vtkDICOM
   "Dicom classes and utilities"
   GIT_REPOSITORY https://github.com/dgobbi/vtk-dicom
-  # vtk-dicom tag v0.7.4 (Jan 29, 2016)
-  GIT_TAG 4a7aff1210b8f58b80c8da66d8b761ee94594f4e
+  # vtk-dicom tag v0.7.5 (Mar 06, 2016)
+  GIT_TAG a4004a86f3c3410cb98c2a7f6ee65798f95c5d82
   )


another more hardcoded attempt at excluding OpenCV headers from coverage reports

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -143,7 +143,7 @@
 		# Capturing lcov counters and generating report
                 COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info.tmp
                 COMMAND ${LCOV_PATH} --extract ${_outputname}.info.tmp 'elm/*' --output-file ${_outputname}.info.tmp
-                COMMAND ${LCOV_PATH} --remove ${_outputname}.info.tmp 'tests/*' 'test/*' '/usr/*' '/opt/*' --output-file ${_outputname}.info
+                COMMAND ${LCOV_PATH} --remove ${_outputname}.info.tmp 'tests/*' 'test/*' '/usr/*' '/opt/*' 'opencv/modules/*' --output-file ${_outputname}.info
                 COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info
                 COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info.tmp


wip: debug pk-config output

wip: debug pk-config output

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -24,8 +24,6 @@
         find_package(PkgConfig)
         pkg_check_modules(OpenCV opencv)

-
-        message(STATUS "OpenCV_prefix=${OpenCV_prefix}")
         message(STATUS "OpenCV_PREFIX=${OpenCV_PREFIX}")

     else(OpenCV_DIR_EXT STREQUAL ".pc")
@@ -46,11 +44,13 @@
     list(LENGTH ${OpenCV_LIBS} OpenCV_NUM_LIBS)
     message(STATUS "OpenCV_NUM_LIBS=${OpenCV_NUM_LIBS}")
     message(STATUS "OpenCV_LIBS=${OpenCV_LIBS}")
-    message(STATUS "OpenCV_Libs=${OpenCV_Lib}")
+    message(STATUS "OpenCV_Libs=${OpenCV_Libs}")
     list(APPEND ${ROOT_PROJECT}_LIBS ${OpenCV_LIBS})

     # Define OpenCV_LIBRARY_DIR if missing
     if(NOT DEFINED OpenCV_LIBRARY_DIR)
+        # Append lib to prefix
+        file(TO_CMAKE_PATH ${OpenCV_PREFIX}/lib OpenCV_LIBRARY_DIR)
     endif(NOT DEFINED OpenCV_LIBRARY_DIR)

 else(OpenCV_FOUND)


haskell-build-fixes: document SHARED_ONLY_PLUGINS

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -16,6 +16,8 @@
 set (INFO_PLUGINS_DOC "only for informational purposes. Modify PLUGINS to change the list.")
 set (ADDED_PLUGINS_DOC "List of plugins already added, ${INFO_PLUGINS_DOC}")
 set (ADDED_PLUGINS "" CACHE STRING ${PLUGINS_DOC} FORCE)
+
+set (SHARED_ONLY_PLUGINS_DOC "List of plugins already added with the ONLY_SHARED configuration enabled, ${INFO_PLUGINS_DOC}")

 set (REMOVED_PLUGINS_DOC "List of plugins removed, ${INFO_PLUGINS_DOC} ")
 set (REMOVED_PLUGINS "" CACHE STRING ${PLUGINS_DOC} FORCE)


Remove SDL2_ttf dylibs requirement

Remove SDL2_ttf dylibs requirement

--- cmake/FindSDL2_ttf.cmake
+++ cmake/FindSDL2_ttf.cmake
@@ -21,7 +21,4 @@
 find_package_handle_standard_args(SDL2TTF REQUIRED_VARS
 	SDL2TTF_INCLUDE_DIR
 	SDL2TTF_LIBRARY
-	SDL2TTF_DYLIB
-	SDL2TTF_ZLIB_DYLIB
-	SDL2TTF_FREETYPE_DYLIB
 )


cmake: fix handling of wrappers dependencies

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -199,19 +199,6 @@
     else()
       set(OPENCV_MODULES_DISABLED_USER ${OPENCV_MODULES_DISABLED_USER} "${the_module}" CACHE INTERNAL "List of OpenCV modules explicitly disabled by user")
     endif()
-
-    # add reverse wrapper dependencies (BINDINDS)
-    foreach (wrapper ${OPENCV_MODULE_${the_module}_WRAPPERS})
-      if(wrapper STREQUAL "python")  # hack for python (BINDINDS)
-        ocv_add_dependencies(opencv_python2 OPTIONAL ${the_module})
-        ocv_add_dependencies(opencv_python3 OPTIONAL ${the_module})
-      else()
-        ocv_add_dependencies(opencv_${wrapper} OPTIONAL ${the_module})
-      endif()
-      if(DEFINED OPENCV_MODULE_opencv_${wrapper}_bindings_generator_CLASS)
-        ocv_add_dependencies(opencv_${wrapper}_bindings_generator OPTIONAL ${the_module})
-      endif()
-    endforeach()

     # stop processing of current file
     ocv_cmake_hook(POST_ADD_MODULE)
@@ -498,6 +485,21 @@
       endif()
     endforeach()
   endif()
+
+  # add reverse wrapper dependencies (BINDINDS)
+  foreach(the_module ${OPENCV_MODULES_BUILD})
+    foreach (wrapper ${OPENCV_MODULE_${the_module}_WRAPPERS})
+      if(wrapper STREQUAL "python")  # hack for python (BINDINDS)
+        ocv_add_dependencies(opencv_python2 OPTIONAL ${the_module})
+        ocv_add_dependencies(opencv_python3 OPTIONAL ${the_module})
+      else()
+        ocv_add_dependencies(opencv_${wrapper} OPTIONAL ${the_module})
+      endif()
+      if(DEFINED OPENCV_MODULE_opencv_${wrapper}_bindings_generator_CLASS)
+        ocv_add_dependencies(opencv_${wrapper}_bindings_generator OPTIONAL ${the_module})
+      endif()
+    endforeach()
+  endforeach()

   # disable MODULES with unresolved dependencies
   set(has_changes ON)


[cmake] fix version number being ignored

--- cmake/SiconosTools.cmake
+++ cmake/SiconosTools.cmake
@@ -168,11 +168,12 @@
     SET(_NAME_VERSION_STR "")
   ENDIF()

-  FIND_PACKAGE(${_NAME} ${_COMPONENTS} ${_REQUIRED})
+  FIND_PACKAGE(${_NAME} ${_NAME_VERSION} ${_COMPONENTS} ${_REQUIRED})

   FOREACH(_N ${_NAMES})
     IF(${_N}_FOUND)
       SET(_FOUND TRUE)
+      SET(_NAME_VERSION_STR "version ${${_N}_VERSION}")
       # add headers dirs into 'include' path
       # INCLUDE_DIR var name depends on FindNAME
       # We try to check the standard var names.


kconfig: Make CONIG_FP_SOFTABI generate floating point instructions

This re-applies a patch that was merged in pr #6989, but then
accidentally reverted in a bad merge conflict resolution in pr #6842.

The actual behaviour of CONIG_FP_SOFTABI has not been matching the
documenation. The Kconfig documentation states that floating point
instructions should be generated, but this Kconfig option has been
turning off floating point instructions instead.

This commit causes floating point instructions to be generated when
CONFIG_FP_SOFTABI is enabled, as was originally intended and
documented.

This commit can cause regressions if users have been relying on the
actual behaviour instead of the documented behaviour.

Kconfig documentation:

config FP_SOFTABI
	help
	  This option selects the Floating point ABI in which hardware
	  floating point instructions are generated but soft-float calling
	  conventions.

GCC documentation:

Specifying ‘soft’ causes GCC to generate output containing library
calls for floating-point operations. ‘softfp’ allows the generation of
code using hardware floating-point instructions, but still uses the
soft-float calling conventions. ‘hard’ allows generation of
floating-point instructions and uses FPU-specific calling conventions.

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

--- cmake/compiler/gcc.cmake
+++ cmake/compiler/gcc.cmake
@@ -93,7 +93,7 @@
     if(CONFIG_FLOAT)
       list(APPEND TOOLCHAIN_C_FLAGS -mfpu=${FPU_FOR_${GCC_M_CPU}})
       if    (CONFIG_FP_SOFTABI)
-        list(APPEND TOOLCHAIN_C_FLAGS -mfloat-abi=soft)
+        list(APPEND TOOLCHAIN_C_FLAGS -mfloat-abi=softfp)
       elseif(CONFIG_FP_HARDABI)
         list(APPEND TOOLCHAIN_C_FLAGS -mfloat-abi=hard)
       endif()


-TEST: update ITK version used for dashboard test

--- src/Testing/Dashboard/elxDashboard_BIGR_linux64_gcc.cmake
+++ src/Testing/Dashboard/elxDashboard_BIGR_linux64_gcc.cmake
@@ -49,7 +49,7 @@

 set( dashboard_cache "
 // Which ITK to use
-ITK_DIR:PATH=/cm/shared/apps/itk/4.7.1/release
+ITK_DIR:PATH=/cm/shared/apps/itk/4.8.0/release

 // Some elastix settings, defining the configuration
 ELASTIX_BUILD_TESTING:BOOL=ON


BUG: Only add MRC to registration factories with ITK_USE_REVIEW ON.

This prevents link errors.

Change-Id: I671949c88810e8e57731da82c20b6b11fcd267f0

--- CMake/UseITK.cmake
+++ CMake/UseITK.cmake
@@ -47,11 +47,12 @@
   endforeach()

   # add ImageIOs in review to the automatic registration
-  foreach (ImageFormat MRC)
-    set (LIST_OF_FACTORIES_REGISTRATION "${LIST_OF_FACTORIES_REGISTRATION}void ${ImageFormat}ImageIOFactoryRegister__Private(void);")
-    set (LIST_OF_FACTORY_NAMES  "${LIST_OF_FACTORY_NAMES}${ImageFormat}ImageIOFactoryRegister__Private,")
-  endforeach()
-
+  if (ITK_USE_REVIEW)
+    foreach (ImageFormat MRC)
+      set (LIST_OF_FACTORIES_REGISTRATION "${LIST_OF_FACTORIES_REGISTRATION}void ${ImageFormat}ImageIOFactoryRegister__Private(void);")
+      set (LIST_OF_FACTORY_NAMES  "${LIST_OF_FACTORY_NAMES}${ImageFormat}ImageIOFactoryRegister__Private,")
+    endforeach()
+  endif()

   get_filename_component(_selfdir "${CMAKE_CURRENT_LIST_FILE}" PATH)
   configure_file(${_selfdir}/itkImageIOFactoryRegisterManager.h.in


self explaining... (#122)

self explaining... (#122)

replaced unknown CMake variable `WINDOWS` with `WIN32`

--- CMake/config.cmake
+++ CMake/config.cmake
@@ -72,7 +72,7 @@
   set(RTTR_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/rttr/cmake")
   set(RTTR_ADDITIONAL_FILES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/rttr")

-else(WINDOWS)
+elseif(WIN32)
   set(RTTR_RUNTIME_INSTALL_DIR   "bin")
   set(RTTR_LIBRARY_INSTALL_DIR   "bin")
   set(RTTR_ARCHIVE_INSTALL_DIR   "lib")
@@ -80,6 +80,8 @@

   set(RTTR_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake")
   set(RTTR_ADDITIONAL_FILES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
+else()
+  message(FATAL_ERROR "Could not set install folders for this platform!")
 endif()

 # to avoid a setting a global debug flag automatically for all targets
@@ -97,7 +99,7 @@
   # the executable links
 elseif(UNIX)
   set(RTTR_EXECUTABLE_INSTALL_RPATH "${RTTR_INSTALL_FULL_LIBDIR};$ORIGIN")
-elseif(WINDOWS)
+elseif(WIN32)
   # no such thing as rpath exists
   set(RTTR_EXECUTABLE_INSTALL_RPATH ${RTTR_INSTALL_BINDIR}) # default, has no effect
 endif()


cmake: Log compiler flag at check time.

cmake: Log compiler flag at check time.

Output the flag being checked before checking the flag to make it easier
to determine exactly which check failed.

Change-Id: I692f5287f985acb4a3061dd54f7c5a8729def83b

--- build/cxx_flags.cmake
+++ build/cxx_flags.cmake
@@ -11,6 +11,7 @@

 function (add_cxx_flag_if_supported cxx_flag)
   unset(FLAG_SUPPORTED CACHE)
+  message("Checking compiler flag support for: " ${cxx_flag})
   CHECK_CXX_COMPILER_FLAG("${cxx_flag}" FLAG_SUPPORTED)
   if (FLAG_SUPPORTED)
     set(CMAKE_CXX_FLAGS "${cxx_flag} ${CMAKE_CXX_FLAGS}" CACHE STRING "" FORCE)


No longer need boost 1.34.1.

No longer need boost 1.34.1.

    * build-aux/cmake/modules/QtExt.cmake: Here.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/QtExt.cmake
+++ build-aux/cmake/modules/QtExt.cmake
@@ -26,7 +26,3 @@
 if(WITH_QURBI_EDITOR)
   find_package(QScintilla2 REQUIRED)
 endif(WITH_QURBI_EDITOR)
-
-# Boost
-find_package(MyBoost REQUIRED)
-print_var(BOOST_INCLUDE_DIRS)


Windows finished build message

Windows finished build message

--- blocks/boost/install/build_jobs.cmake
+++ blocks/boost/install/build_jobs.cmake
@@ -36,6 +36,8 @@

 		echo_append("\r${CLEAR}")
 		message("\r${finish_message}")
+	else()
+		message("${finish_message}")
 	endif()

 	if(VERBOSE)