Fixing resource inclusion into app for iOS (was not working on Mojave). TODO: Test on High Sierra

--- core/cmake/test.cmake
+++ core/cmake/test.cmake
@@ -237,7 +237,7 @@
     )

     foreach (resource_file ${RESOURCE_FILES})
-      set_source_files_properties(${resource_file} PROPERTIES MACOSX_PACKAGE_LOCATION ${PROJECT_NAME}.app)
+      set_source_files_properties(${resource_file} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
     endforeach()

     set_target_properties(${PROJECT_NAME} PROPERTIES


ENH: upgrade gdal version to 2.4.1

ENH: upgrade gdal version to 2.4.1

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -144,8 +144,8 @@

 ExternalProject_Add(GDAL
   PREFIX GDAL
-  URL "http://download.osgeo.org/gdal/2.2.1/gdal-2.2.1.tar.gz"
-  URL_MD5 785acf2b0cbf9d56d37c9044d0ee2505
+  URL "http://download.osgeo.org/gdal/2.4.1/gdal-2.4.1.tar.gz"
+  URL_MD5 8bc93c7ae4d3a46916918a52c7f5f10f
   SOURCE_DIR ${GDAL_SB_SRC}
   BINARY_DIR ${GDAL_SB_SRC}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


Update superbuild version of lijpeg-turbo to 1.4.2

--- SuperBuild/CMake/External_jpeg.cmake
+++ SuperBuild/CMake/External_jpeg.cmake
@@ -46,8 +46,8 @@

 ExternalProject_Add(JPEG
   PREFIX JPEG
-  URL "http://downloads.sourceforge.net/project/libjpeg-turbo/1.4.1/libjpeg-turbo-1.4.1.tar.gz"
-  URL_MD5 b1f6b84859a16b8ebdcda951fa07c3f2
+  URL "http://downloads.sourceforge.net/project/libjpeg-turbo/1.4.2/libjpeg-turbo-1.4.2.tar.gz"
+  URL_MD5 86b0d5f7507c2e6c21c00219162c3c44
   SOURCE_DIR ${JPEG_SB_SRC}
   BINARY_DIR ${JPEG_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


reformat known targets list

reformat known targets list

Change-Id: I0635fe081b714d5bb7e3a68a6e2d4caaf7596b5a

--- VAD_Wrappers.cmake
+++ VAD_Wrappers.cmake
@@ -8,7 +8,44 @@
 set(VAD_HendriksWrappers_Included YES)

 # FIXME list can be ambiguous (e.g. fnmatch -> metamat!)
-set(_TARGET_PACKAGE_LIST cliini;cliini;cliini-cpp;cliini;METAMAT::METAMAT;MetaMat;ceres;Ceres;HDF5::HDF5;HDF5;hdf5_cpp;HDF5;OPENCV::OPENCV;OpenCV;boost_system;Boost;boost_filesystem;Boost;hdmarker;hdmarker;fnmatch;fnmatch;FNMATCH::FNMATCH;fnmatch;metamat;MetaMat;Boost::system;Boost;Boost::filesystem;Boost;ceres_hack;Ceres;ceres_hack3;Ceres;opencv_core;OpenCV;opencv_imgproc;OpenCV;opencv_highgui;OpenCV;opencv_shape;OpenCV;opencv_objdetect;OpenCV;opencv_calib3d;OpenCV;mm-mesh;mm-mesh;ucalib;ucalib;Qt5::Widgets;Qt5Widgets;Qt5::Core;Qt5Core;Qt5::Network;Qt5Network;Qt5::Gui;Qt5Gui;clif;clif;clif-qt;clif;vigraimpex;Vigra;snoptimizer BRDF-SNOptimizer)
+set(_TARGET_PACKAGE_LIST
+cliini cliini;
+cliini-cpp cliini;
+METAMAT::METAMAT MetaMat;
+ceres Ceres;
+HDF5::HDF5 HDF5;
+hdf5_cpp HDF5;
+OPENCV::OPENCV OpenCV;
+boost_system Boost;
+boost_filesystem Boost;
+unit_test_framework Boost;
+hdmarker hdmarker;
+fnmatch fnmatch;
+FNMATCH::FNMATCH fnmatch;
+metamat MetaMat;
+Boost::system Boost;
+Boost::filesystem Boost;
+Boost::unit_test_framework Boost;
+ceres_hack Ceres;
+ceres_hack3 Ceres;
+opencv_core OpenCV;
+opencv_imgproc OpenCV;
+opencv_xfeatures2d OpenCV;
+opencv_features2d OpenCV;
+opencv_highgui OpenCV;
+opencv_shape OpenCV;
+opencv_objdetect OpenCV;
+opencv_calib3d OpenCV;
+mm-mesh mm-mesh;
+ucalib ucalib;
+Qt5::Widgets Qt5Widgets;
+Qt5::Core Qt5Core;
+Qt5::Network Qt5Network;
+Qt5::Gui Qt5Gui;
+clif clif;
+clif-qt clif;
+vigraimpex Vigra;
+snoptimizer BRDF-SNOptimizer)

 # TODO check system dependency!
 function(vad_autodep_pkg _PKG_NAME _REQ_NAME)


Restored interactivity for tests (missing module dependency)

Change-Id: I924b8d5682c9d1ee778b1619bb0e3f38f1e1ea52

--- Filters/HyperTree/module.cmake
+++ Filters/HyperTree/module.cmake
@@ -6,4 +6,5 @@
   TEST_DEPENDS
     vtkRenderingOpenGL
     vtkTestingRendering
+    vtkInteractionStyle
   )


ManageDependency: listVar should be cached, otherwise it won't get dependencies in sub CMakeLists.txt

--- Modules/ManageDependency.cmake
+++ Modules/ManageDependency.cmake
@@ -265,7 +265,7 @@
     LIST(FIND ${listVar} "${_newDep}" _index)
     IF(_index EQUAL -1)
 	LIST(APPEND ${listVar} "${_newDep}")
-	SET(${listVar} "${${listVar}}" PARENT_SCOPE)
+	SET(${listVar} "${${listVar}}" CACHE INTERNAL "${listVar} package list")
     ENDIF(_index EQUAL -1)
 ENDFUNCTION(MANAGE_DEPENDENCY)


ENH: Update version of diapOTB to release branch 1.0.1

--- Modules/Remote/diapotb.remote.cmake
+++ Modules/Remote/diapotb.remote.cmake
@@ -22,5 +22,5 @@
 otb_fetch_module(DiapOTBModule
   "OTB module for SAR processing in Diapason."
   GIT_REPOSITORY https://gitlab.orfeo-toolbox.org/remote_modules/diapotb.git
-  GIT_TAG 1.0.0
+  GIT_TAG v1.0.1
 )


force creation of symlink

force creation of symlink

--- phSolver/incompressible/test/testing.cmake
+++ phSolver/incompressible/test/testing.cmake
@@ -2,7 +2,7 @@
 add_test(copyInpCfg
   cp ${PHASTA_SOURCE_DIR}/phSolver/common/input.config ${CDIR})
 add_test(linkProcsDir
-  ln -s ${CDIR}/4-procs_case-SyncIO-2 ${CDIR}/4-procs_case)
+  ln -f -s ${CDIR}/4-procs_case-SyncIO-2 ${CDIR}/4-procs_case)
 add_test(resetNumStart
   cp ${CDIR}/numstart.dat ${CDIR}/4-procs_case/numstart.dat)
 add_test(


ENH: revert patch to only add -qt-harfbuzz option and use qt 5.10.1

--- SuperBuild/CMake/External_qt5.cmake
+++ SuperBuild/CMake/External_qt5.cmake
@@ -91,7 +91,7 @@
   -skip qtwinextras  \
   -skip qtx11extras  \
   -skip qtxmlpatterns \
-  -system-libpng -system-libjpeg -system-zlib -system-freetype -qt-harfbuzz -optimize-size -silent")
+  -system-libpng -system-libjpeg -system-zlib -system-freetype -qt-harfbuzz")

 if(UNIX)
   if(APPLE)
@@ -126,8 +126,8 @@

 ExternalProject_Add(QT5
   PREFIX QT5
-  URL "http://download.qt.io/official_releases/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz"
-  URL_MD5 c6f0854d7de7bde80cfd8cc85bb7152b
+  URL "http://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
+  URL_MD5 7e167b9617e7bd64012daaacb85477af
   BINARY_DIR ${QT5_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


[fix] Use script to reset boost RPATH on OSX.

--- Superbuild/Projects/lidarview.cmake
+++ Superbuild/Projects/lidarview.cmake
@@ -31,3 +31,16 @@
   superbuild_append_flags(cxx_flags "-DBOOST_ALL_NO_LIB" PROJECT_ONLY)
   superbuild_append_flags(cxx_flags "-DBOOST_ALL_DYN" PROJECT_ONLY)
 endif()
+
+# reset boost RPATH on OSX
+# this is applied on LidarView app and tests
+# for more information see comments in lidarview.osx-boost-rpath.cmake
+if (APPLE)
+  superbuild_project_add_step(osx-boost-rpath
+    COMMAND   "${CMAKE_COMMAND}"
+              -Dinstall_location:PATH=<INSTALL_DIR> #location to get LidarView
+              -P "<SOURCE_DIR>/Superbuild/lidarview-superbuild/Projects/scripts/lidarview.osx-boost-rpath.cmake"
+    DEPENDEES install
+    COMMENT   "Reset rpath for all boost dependencies"
+    WORKING_DIRECTORY <BINARY_DIR>)
+endif ()


[upgrade] Rework SLAM variables forwarding

--- Superbuild/Projects/lidarview.cmake
+++ Superbuild/Projects/lidarview.cmake
@@ -17,13 +17,14 @@
     -Dqt_version:STRING=${qt_version}
     -DPYTHONQT_DIR:PATH=<INSTALL_DIR>
     -DBoost_NO_BOOST_CMAKE:BOOL=${Boost_NO_BOOST_CMAKE}
+    #$lidarview_appname dependencies options
     -DENABLE_pcl=${ENABLE_pcl}
     -DENABLE_ceres=${ENABLE_ceres}
     -DENABLE_opencv=${ENABLE_opencv}
     -DENABLE_nanoflann=${ENABLE_nanoflann}
     -DENABLE_g2o=${ENABLE_g2o}
-    -DENABLE_slam=${ENABLE_slam}
-    -DENABLE_old_slam=${ENABLE_old_slam}
+    #$lidarview_appname features options
+    -DLIDARVIEW_BUILD_SLAM=${LIDARVIEW_BUILD_SLAM}
     #$lidarview_appname additional configuration
 )


os2: Enable threading model for the platform

--- platforms/os2-gcc/platform.cmake
+++ platforms/os2-gcc/platform.cmake
@@ -1,7 +1,8 @@
-set (PLIBSYS_THREAD_MODEL none)
+set (PLIBSYS_THREAD_MODEL os2)
 set (PLIBSYS_IPC_MODEL none)
 set (PLIBSYS_TIME_PROFILER_MODEL generic)
 set (PLIBSYS_DIR_MODEL none)
+set (PLIBSYS_RWLOCK_MODEL general)
 set (PLIBSYS_LIBRARYLOADER_MODEL none)

 set (PLIBSYS_PLATFORM_LINK_LIBRARIES os2386)


COMP: Update to version for WikiExamples

The wikiexamples were upgraded to allow both
forward and backwards compatibility with ITK 4.8.0.

Change-Id: I92032a5254978ddee560cb1959345f7f116138f8

--- Modules/Remote/WikiExamples.remote.cmake
+++ Modules/Remote/WikiExamples.remote.cmake
@@ -5,6 +5,6 @@
 itk_fetch_module(WikiExamples
   "A collection of examples that illustrate how to use ITK."
   GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKWikiExamples.git
-  # June 26, 2015
-  GIT_TAG 74e09f3e88cf2168e35af197e4b27a8686aa8f22
+  # July 09, 2015
+  GIT_TAG 1c53a9346e914959f1afb8df79cf449ff99ac7fa
   )


add facility to link libraries to tests (#1850)

--- cmake/Modules/BuildUtils.cmake
+++ cmake/Modules/BuildUtils.cmake
@@ -226,3 +226,13 @@
   endif()
   set_tests_properties(${TEST_NAME} PROPERTIES LABELS "unittest")
 endfunction()
+
+# A wrapper for target_link_libraries() that is compatible with NO_TESTS.
+function(RAY_TEST_LINK_LIBRARIES REL_TEST_NAME)
+  if(NO_TESTS)
+    return()
+  endif()
+  get_filename_component(TEST_NAME ${REL_TEST_NAME} NAME_WE)
+
+  target_link_libraries(${TEST_NAME} ${ARGN})
+endfunction()


Fix for ROOT-8293 - CMake does not find Castor libraries

--- cmake/modules/FindCastor.cmake
+++ cmake/modules/FindCastor.cmake
@@ -1,67 +1,44 @@
-# - Try to find CASTOR
-#  (See http://savannah.cern.ch/files/?group=castor)
-#  Check for rfio_api.h, stager_api.h for CASTOR 2 and libshift
-#
+#  Try to find CASTOR
+#  Check for rfio_api.h for CASTOR 2 and libshift
+#  Defines:
 #  CASTOR_INCLUDE_DIR - where to find rfio_api.h, etc.
-#  CASTOR_LIBRARIES   - List of libraries when using ....
-#  CASTOR_FOUND       - True if CASTOR 2  libraries found.
+#  CASTOR_<component>_LIBRARY
+#  CASTOR_<component>_FOUND
+#  CASTOR_LIBRARIES   - List of libraries when using castor (not cached)
+#  CASTOR_VERSION     - Castor version (not cached)
+#  CASTOR_FOUND       - True if CASTOR libraries found.

-set(CASTOR_FOUND FALSE)
-set(CASTOR_LIBRARIES)
+# Enforce a minimal list of libraries
+list(APPEND CASTOR_FIND_COMPONENTS shift rfio common client ns)
+list(REMOVE_DUPLICATES CASTOR_FIND_COMPONENTS)

-if(CASTOR_INCLUDE_DIR)
-  set(CASTOR_FIND_QUIETLY 1)
-endif()
+set(locations ${CASTOR_DIR} $ENV{CASTOR_DIR} /cern/pro /cern/new /cern/old /opt/shift)

-find_path(CASTOR_INCLUDE_DIR NAMES rfio_api.h PATHS
-  ${CASTOR_DIR}/include $ENV{CASTOR_DIR}/include
-  /cern/pro/include
-  /cern/new/include
-  /cern/old/include
-  /opt/shift/include
-  /usr/local/shift/include
-  /usr/include/shift
-  /usr/local/include/shift
-  PATH_SUFFIXES shift
-)
+find_path(CASTOR_INCLUDE_DIR rfio_api.h HINTS ${locations} PATH_SUFFIXES include include/shift)

+# Obtain the version
 if(CASTOR_INCLUDE_DIR)
   file(READ ${CASTOR_INCLUDE_DIR}/patchlevel.h contents)
   string(REGEX MATCH   "BASEVERSION[ ]*[\"][ ]*([^ \"]+)" cont ${contents})
   string(REGEX REPLACE "BASEVERSION[ ]*[\"][ ]*([^ \"]+)" "\\1" CASTOR_VERSION ${cont})
 endif()

-set(locations ${CASTOR_DIR} $ENV{CASTOR_DIR}
-              /cern/pro /cern/new /cern/old
-              /opt/shift /usr/local/shift
-              /usr/lib/shift /usr/local/lib/shift
-)
+# Find all the libraires
+foreach(component ${CASTOR_FIND_COMPONENTS})
+  if(component STREQUAL shift) # libshift.so is the only one without the prefix 'castor'
+    set(name ${component})
+  else()
+    set(name castor${component})
+  endif()
+  find_library(CASTOR_${component}_LIBRARY NAMES ${name} HINTS ${locations} PATH_SUFFIXES lib lib/shift)
+  if (CASTOR_${component}_LIBRARY)
+    set(CASTOR_${component}_FOUND 1)
+    list(APPEND CASTOR_LIBRARIES ${CASTOR_${component}_LIBRARY})
+    mark_as_advanced(CASTOR_${component}_LIBRARY)
+  endif()
+endforeach()

-find_library(CASTOR_shift_LIBRARY NAMES shift shiftmd HINTS ${locations})
-find_library(CASTOR_rfio_LIBRARY NAMES castorrfio HINTS ${locations})
-find_library(CASTOR_common_LIBRARY NAMES castorcommon HINTS ${locations})
-find_library(CASTOR_client_LIBRARY NAMES castorclient castorClient HINTS ${locations})
-find_library(CASTOR_ns_LIBRARY NAMES castorns HINTS ${locations})
-
-if(CASTOR_shift_LIBRARY)
-  message(STATUS "Found Castor LIB AT ${CASTOR_shift_LIBRARY}")
-  set(CASTOR_LIBRARIES ${CASTOR_LIBRARIES} ${CASTOR_shift_LIBRARY})
-endif()
-
-if(CASTOR_INCLUDE_DIR AND CASTOR_LIBRARIES)
-  set(CASTOR_FOUND TRUE)
-  if(NOT CASTOR_FIND_QUIETLY)
-    message(STATUS "Found Castor version ${CASTOR_VERSION} at ${CASTOR_INCLUDE_DIR}")
-  endif()
-endif()
-
-mark_as_advanced(
-  CASTOR_shift_LIBRARY
-  CASTOR_rfio_LIBRARY
-  CASTOR_common_LIBRARY
-  CASTOR_client_LIBRARY
-  CASTOR_ns_LIBRARY
-  CASTOR_INCLUDE_DIR
-)
-
-
+# Handle the QUIETLY and REQUIRED arguments and set CASTOR_FOUND to TRUE if all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CASTOR DEFAULT_MSG CASTOR_shift_LIBRARY CASTOR_INCLUDE_DIR)
+mark_as_advanced(CASTOR_INCLUDE_DIR)


Switch off 'deprecated' warnings for icc14.

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -161,8 +161,8 @@
   endif()

   if(ICC_MAJOR EQUAL 14)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873 -wd1478")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873 -wd1478")
     set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
   endif()


Implement a build_plplot_lite target (which disables wxwidgets, qt,
and cairo device drivers and which therefore has fewer dependencies and
builds and tests 5 times as fast).

Meanwhile, the build_plplot target now has properly implemented
wxwidgets and pango build configuration dependencies, i.e., wxwidgets
and pango and their dependencies will be built first, then plplot
which will depend on those built and installed results.

Tested by Alan W. Irwin <airwin@users.sourceforge.net> using both the
build_plplot_lite (5 minutes) and build_plplot (25 minutes) targets on Linux.

svn path=/trunk/; revision=12460

--- cmake/build_projects/plplot/bp.cmake
+++ cmake/build_projects/plplot/bp.cmake
@@ -35,29 +35,46 @@
 endif(plplot_configured)
 set(plplot_configured ON)

-set(plplot_dependencies_LIST
+# Distinguish between plplot_lite dependencies and complete dependencies
+# for a heavy-duty build of PLplot.
+set(plplot_lite_dependencies_LIST
   libagg
   libharu
   libqhull
   shapelib
-# TEMPORARY
-# For debugging speed ignore wxwidgets soft dependency of PLplot for
-# now.
-#  wxwidgets
 )

+# Turn off wxwidgets devices and library, and cairo device drivers for lite version
+set(plplot_lite_cmake_args
+  -DPLD_wxwidgets=OFF
+  -DENABLE_wxwidgets=OFF
+  -DDEFAULT_NO_CAIRO_DEVICES:BOOL=ON
+  -DDEFAULT_NO_QT_DEVICES:BOOL=ON
+  -DENABLE_qt=OFF
+  )
+
+set(plplot_lite_dependencies_targets)
+foreach(build_configuration ${plplot_lite_dependencies_LIST})
+  list(APPEND plplot_lite_dependencies_targets build_${build_configuration})
+endforeach(build_configuration ${plplot_lite_dependences_LIST})
+
+set(plplot_dependencies_LIST
+  ${plplot_lite_dependencies_LIST}
+  wxwidgets
+  pango
+  )
+
+set(plplot_dependencies_targets)
 foreach(build_configuration ${plplot_dependencies_LIST})
   include(${build_configuration}/bp.cmake)
+  list(APPEND plplot_dependencies_targets build_${build_configuration})
 endforeach(build_configuration ${plplot_dependences_LIST})
+
+# Leave eveything ON by default for normal plplot.
+set(plplot_cmake_args)

 # This can be safely done only after above includes.
 set(BP_PACKAGE plplot)
-
-set(${BP_PACKAGE}_dependencies_targets)
-foreach(build_configuration ${${BP_PACKAGE}_dependencies_LIST})
-  list(APPEND ${BP_PACKAGE}_dependencies_targets build_${build_configuration})
-endforeach(build_configuration ${${BP_PACKAGE}_dependences_LIST})
-message(STATUS "${BP_PACKAGE}_dependencies_targets = ${${BP_PACKAGE}_dependencies_targets}")

 # Note could retrieve the latest release, but that is pretty dated.
 # So ideally, would use a subversion client to get the trunk version,
@@ -72,44 +89,48 @@
 set(PLPLOT_LOCAL_SOURCE_DIR /home/software/${BP_PACKAGE}_svn/HEAD/${BP_PACKAGE}_allura)
 file(TO_NATIVE_PATH ${PLPLOT_LOCAL_SOURCE_DIR} PLPLOT_LOCAL_SOURCE_DIR)

-# Data that is related to the PATH that must be used.
-if(MSYS_PLATFORM)
-  set(BP_PATH_NODLL "${BP_PATH}")
-  set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
-  message(STATUS "Original BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
-  determine_msys_path(BP_PATH "${BP_PATH}")
-  # TEMPORARY (already in the _required_ native form for the cmake -E
-  # copy_directory command below except for the drive letter which is
-  # z: for this local result.)
-  set(PLPLOT_LOCAL_SOURCE_DIR z:${PLPLOT_LOCAL_SOURCE_DIR})
-endif(MSYS_PLATFORM)
-message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+set(tags "" "_lite")
+foreach(tag IN LISTS tags)
+  # Data that is related to the PATH that must be used.
+  if(MSYS_PLATFORM)
+    set(BP_PATH_NODLL "${BP_PATH}")
+    set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}${tag}/dll;${BP_PATH_NODLL}")
+    message(STATUS "Original BP_PATH for ${BP_PACKAGE}${tag} = ${BP_PATH}")
+    determine_msys_path(BP_PATH "${BP_PATH}")
+    # TEMPORARY (already in the _required_ native form for the cmake -E
+    # copy_directory command below except for the drive letter which is
+    # z: for this local result.)
+    set(PLPLOT_LOCAL_SOURCE_DIR z:${PLPLOT_LOCAL_SOURCE_DIR})
+  endif(MSYS_PLATFORM)
+  message(STATUS "modified BP_PATH for ${BP_PACKAGE}${tag} = ${BP_PATH}")

-# Build PLplot itself.  The pdf device is turned on since the haru library
-# is built with a fix to avoid segfaults for example 24.
-ExternalProject_Add(
-  build_${BP_PACKAGE}
-  DEPENDS "${${BP_PACKAGE}_dependencies_targets}"
-  #TEMPORARY
-  DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PLPLOT_LOCAL_SOURCE_DIR} ${EP_BASE}/Source/build_${BP_PACKAGE}
-  CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DBUILD_TEST=ON -DPLD_pdf=ON ${EP_BASE}/Source/build_${BP_PACKAGE}
-  BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
-  INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
-  TEST_BEFORE_INSTALL OFF
-  TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} test_noninteractive
-  STEP_TARGETS configure build install test
-  )
+  # Build PLplot (or PLplot-lite). The pdf device is turned on since the
+  # haru library is built with a fix to avoid segfaults for example 24.
+  ExternalProject_Add(
+    build_${BP_PACKAGE}${tag}
+    DEPENDS "${${BP_PACKAGE}${tag}_dependencies_targets}"
+    #TEMPORARY
+    DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PLPLOT_LOCAL_SOURCE_DIR} ${EP_BASE}/Source/build_${BP_PACKAGE}${tag}
+    CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DBUILD_TEST=ON -DPLD_pdf=ON ${${BP_PACKAGE}${tag}_cmake_args} ${EP_BASE}/Source/build_${BP_PACKAGE}${tag}
+    BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+    INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
+    TEST_BEFORE_INSTALL OFF
+    TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} test_noninteractive
+    #STEP_TARGETS configure build install test
+    )

-# Add custom commands to the current test step.
-add_custom_command(
-  OUTPUT
-  ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-test
-  COMMAND echo made_it_to_extra_test
-  COMMENT "Test installed examples from ${BP_PACKAGE}"
-  APPEND
-  )
+  # Add custom commands to the current test step.
+  add_custom_command(
+    OUTPUT
+    ${EP_BASE}/Stamp/build_${BP_PACKAGE}${tag}/build_${BP_PACKAGE}${tag}-test
+    COMMAND echo made_it_to_extra_test
+    COMMENT "Test installed examples from ${BP_PACKAGE}${tag}"
+    APPEND
+    )

-list(APPEND build_target_LIST build_${BP_PACKAGE})
-# Restore BP_PATH to original state.
-set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
+  list(APPEND build_target_LIST build_${BP_PACKAGE}${tag})
+
+  # Restore BP_PATH to original state.
+  set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+  #message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
+endforeach(tag IN LISTS tags)


indentation in External-HDF5.cmake

indentation in External-HDF5.cmake

--- superbuild/External-HDF5.cmake
+++ superbuild/External-HDF5.cmake
@@ -15,7 +15,7 @@
   INSTALL_DIR ${INSTALL_DEPECENCIES_DIR}
 )
 if (WIN32)
-set( HDF5_DIR ${INSTALL_DEPECENCIES_DIR}/cmake/hdf5/ )
+  set( HDF5_DIR ${INSTALL_DEPECENCIES_DIR}/cmake/hdf5/ )
 else ()
-set( HDF5_DIR ${INSTALL_DEPECENCIES_DIR}/share/cmake/hdf5/ )
-endif ()+  set( HDF5_DIR ${INSTALL_DEPECENCIES_DIR}/share/cmake/hdf5/ )
+endif ()


- CMake: No need to remove cache to change python library version from UserConfig.txt

--- CMakeModules/FindYafPythonLibs.cmake
+++ CMakeModules/FindYafPythonLibs.cmake
@@ -32,6 +32,10 @@
 ELSE(NOT REQUIRED_PYTHON_VERSION)
   SET(_CURRENT_VERSION ${REQUIRED_PYTHON_VERSION})
 ENDIF(NOT REQUIRED_PYTHON_VERSION)
+
+UNSET(PYTHON_DEBUG_LIBRARY CACHE)
+UNSET(PYTHON_LIBRARY CACHE)
+UNSET(PYTHON_INCLUDE_DIR CACHE)

 STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
 IF(WIN32)


Use install to install Python extension and generated code

--- rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
+++ rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
@@ -142,6 +142,29 @@
 file(MAKE_DIRECTORY "${_output_path}")
 file(WRITE "${_output_path}/__init__.py" "")

+if(NOT "${_generated_msg_py_files} " STREQUAL " ")
+  list(GET _generated_msg_py_files 0 _msg_file)
+  get_filename_component(_msg_package_dir1 "${_msg_file}" DIRECTORY)
+  get_filename_component(_msg_package_dir2 "${_msg_package_dir1}" NAME)
+endif()
+
+if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
+  ament_python_install_module("${_output_path}/__init__.py"
+    DESTINATION "${PROJECT_NAME}"
+  )
+
+  ament_python_install_module("${_output_path}/__init__.py"
+    DESTINATION "${PROJECT_NAME}/${_msg_package_dir2}"
+  )
+
+  # TODO(esteve): replace this with ament_python_install_module and allow a list
+  # of modules to be passed instead of iterating over _generated_msg_py_files
+  # See https://github.com/ros2/rosidl/issues/89
+  install(FILES ${_generated_msg_py_files}
+    DESTINATION "${PYTHON_INSTALL_DIR}/${PROJECT_NAME}/${_msg_package_dir2}"
+  )
+endif()
+
 set(_generated_extension_files "")
 set(_extension_dependencies "")
 set(_target_suffix "__py")
@@ -250,6 +273,11 @@
     "rosidl_generator_py"
     "${PROJECT_NAME}__rosidl_generator_c"
   )
+
+  if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
+    install(TARGETS ${_msg_name}${_pyext_suffix}
+      DESTINATION "${PYTHON_INSTALL_DIR}/${PROJECT_NAME}/${_msg_package_dir2}")
+  endif()
 endforeach()

 if(TARGET ${rosidl_generate_interfaces_TARGET}${_target_suffix})
@@ -266,12 +294,3 @@
     ${rosidl_generate_interfaces_TARGET}__rosidl_generator_c
   )
 endif()
-
-if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
-  if(NOT "${_generated_msg_py_files} " STREQUAL " ")
-    list(GET _generated_msg_py_files 0 _msg_file)
-    get_filename_component(_msg_package_dir "${_msg_file}" DIRECTORY)
-    get_filename_component(_msg_package_dir "${_msg_package_dir}" DIRECTORY)
-    ament_python_install_package("${PROJECT_NAME}" PACKAGE_DIR "${_msg_package_dir}")
-  endif()
-endif()


added a definition to show we are using WkCMake to build

--- dist/WkBuild.cmake
+++ dist/WkBuild.cmake
@@ -213,6 +213,9 @@
 	# Handling my own build config
 	#

+	# to show we are using WkCMake to build ( can be #ifdef in header )
+	add_definitions( -D WK_BUILD )
+
 	if(${project_type} STREQUAL "LIBRARY")
 		add_library(${PROJECT_NAME} ${${PROJECT_NAME}_load_type} ${SOURCES})
 		set( ${PROJECT_NAME}_LIBRARIES ${PROJECT_NAME} CACHE INTERNAL " libraries needed for ${target_name} " )


eds-I#94 - Remove -Wabi from the default C++ warning flags

Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/94

--- cmake/modules/SetupBuildFlags.cmake
+++ cmake/modules/SetupBuildFlags.cmake
@@ -56,7 +56,6 @@

 	list(APPEND proposed_cxx_flags
 		${proposed_flags}
-		-Wabi
 		-Wnoexcept
 	)


Clean-up

Clean-up

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -1,7 +1,5 @@
 # Copyright (c) 2013-2015, Ruslan Baratov
 # All rights reserved.
-
-cmake_minimum_required(VERSION 3.0) # sleep

 include(CMakeParseArguments) # cmake_parse_arguments


[cmake] factorize search for oce and remove unneeded dependencies

--- cmake/siconos_find_common_dep.cmake
+++ cmake/siconos_find_common_dep.cmake
@@ -155,36 +155,11 @@
   ENDIF(BULLET_FOUND)
 ENDIF(WITH_BULLET)

-# --- OCC ---
-IF(WITH_OCC)
-  if(NOT WITH_MECHANISMS)
-    COMPILE_WITH(OCE 0.15 REQUIRED ONLY mechanics)
-    SET(SICONOS_HAVE_OCC TRUE)
-  endif()
-  if(OCE_VERSION VERSION_LESS 0.18)
-    # DRAWEXE link fails on some systems and must be removed.
-    # MESSAGE(STATUS "DRAWEXE link fails on some systems is removed.")
-    list(REMOVE_ITEM SICONOS_LINK_LIBRARIES DRAWEXE)
-    list(REMOVE_ITEM mechanics_LINK_LIBRARIES DRAWEXE)
-    set(SICONOS_LINK_LIBRARIES ${SICONOS_LINK_LIBRARIES} "m" CACHE INTERNAL "List of external libraries")
-    set(mechanics_LINK_LIBRARIES ${mechanics_LINK_LIBRARIES} "m" CACHE INTERNAL "List of external libraries")
-  endif()
-ENDIF()
-
 # --- Mechanisms (Saladyn?) ---
-IF(WITH_MECHANISMS)
+IF(WITH_MECHANISMS OR WITH_OCC)
   SET(OCE_TOOLKITS "TKernel"  "TKMath" "TKService" "TKV3d"  "TKBRep" "TKIGES" "TKSTL" "TKVRML" "TKSTEP" "TKSTEPAttr" "TKSTEP209" "TKSTEPBase" "TKShapeSchema" "TKGeomBase" "TKGeomAlgo" "TKG3d" "TKG2d" "TKXSBase" "TKPShape" "TKShHealing" "TKHLR" "TKTopAlgo" "TKMesh" "TKPrim" "TKCDF" "TKBool" "TKBO" "TKFillet" "TKOffset")
-
   message(STATUS "Searching for OCE ....")
-  compile_with(OCE COMPONENTS ${OCE_TOOLKITS} ONLY mechanics)
-  if(OCE_VERSION VERSION_LESS 0.18)
-    # DRAWEXE link fails on some systems and must be removed.
-    #MESSAGE(STATUS "DRAWEXE link fails on some systems is removed.")
-    list(REMOVE_ITEM mechanics_LINK_LIBRARIES DRAWEXE)
-    list(REMOVE_ITEM SICONOS_LINK_LIBRARIES DRAWEXE)
-    set(SICONOS_LINK_LIBRARIES ${SICONOS_LINK_LIBRARIES} "m" CACHE INTERNAL "List of external libraries")
-    set(mechanics_LINK_LIBRARIES ${mechanics_LINK_LIBRARIES} "m" CACHE INTERNAL "List of external libraries")
-  endif()
+  compile_with(OCE 0.15 REQUIRED COMPONENTS ${OCE_TOOLKITS} ONLY mechanics)
   if(OCE_FOUND)
     message(STATUS "Found OCE version ${OCE_VERSION}")
     if(NOT OCE_ALL_FOUND)
@@ -195,17 +170,15 @@
   if(OCE_FOUND)
     # Include files reside in ${OCE_INCLUDE_DIRS};
     #    include_directories(${OCE_INCLUDE_DIRS})
-    # We do not need library path, they will be automatically imported.
+    # We do not need library path, they will be automatically imported
   else(OCE_FOUND)
     # OCE not found; either it is not found and user
     # has to set OCE_DIR to the directory containing
     # OCEConfig.cmake, or OCE is not installed and we
     # try to find OpenCascade files.
     message(STATUS "OCE not found.  Try to find OpenCascade files.")
-
     FIND_PACKAGE(OpenCASCADE REQUIRED COMPONENTS ${OCE_TOOLKITS})
     COMPILE_WITH(OpenCASCADE)
-
     IF(OpenCASCADE_FOUND)
       message(STATUS "OpenCASCADE_INCLUDE_DIR = " ${OpenCASCADE_INCLUDE_DIR})
       message(STATUS "OpenCASCADE_LIBRARIES = " ${OpenCASCADE_LIBRARIES})
@@ -214,13 +187,26 @@
     ELSE(OpenCASCADE_FOUND)
       MESSAGE(STATUS "OpenCascade Libraries not found in standard paths.")
     ENDIF(OpenCASCADE_FOUND)
-
   endif(OCE_FOUND)
   SET(HAVE_MECHANISMS TRUE)
   if(WITH_OCC)
     SET(SICONOS_HAVE_OCC TRUE)
   endif()
-endif()
+  if(OCE_VERSION VERSION_LESS 0.18)
+    MESSAGE(STATUS " mechanics_LINK_LIBRARIES:" "${mechanics_LINK_LIBRARIES}")
+    SET(UNDEED_OCE_TOOLKITS "DRAWEXE" "TKDraw" "TKTopTest" "TKViewerTest" "TKXSDRAW" "TKDCAF" "TKXDEDRAW" "TKTObjDRAW" "TKQADraw"   )
+    FOREACH(_T ${UNDEED_OCE_TOOLKITS})
+      MESSAGE(STATUS "Unneeded ${_T} oce toolkit provokes issues since it not installed on some systems. We remove it")
+      list(REMOVE_ITEM SICONOS_LINK_LIBRARIES DRAWEXE ${_T})
+      list(REMOVE_ITEM mechanics_LINK_LIBRARIES ${_T})
+
+    ENDFOREACH()
+    set(SICONOS_LINK_LIBRARIES ${SICONOS_LINK_LIBRARIES} "m" CACHE INTERNAL "List of external libraries")
+    set(mechanics_LINK_LIBRARIES ${mechanics_LINK_LIBRARIES} "m" CACHE INTERNAL "List of external libraries")
+    MESSAGE(STATUS " mechanics_LINK_LIBRARIES:" "${mechanics_LINK_LIBRARIES}")
+  ENDIF()
+ENDIF()
+

 # -- VTK --
 IF(WITH_VTK)


COMP: Bump ParabolicMorphology for MultiThreaderChanges

Shortlog:

 Matt McCormick (2):
   ENH: Add support for independent module builds
   COMP: Address change in GetMultiThreader return type

Change-Id: Ie512cba39b846cbca33a5c19c71351d9f13c0708

--- Modules/Remote/ParabolicMorphology.remote.cmake
+++ Modules/Remote/ParabolicMorphology.remote.cmake
@@ -4,6 +4,6 @@
   by spheres, sharpenings and grayscale operations.
   http://www.insight-journal.org/browse/publication/228
   https://hdl.handle.net/1926/1370"
-  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/parabolicMorphology.git
-  GIT_TAG 7e8f4ab8bf895a62eb753c252de94cc8f121f7c2
+  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKParabolicMorphology.git
+  GIT_TAG compressed = a368fe2d0112b2e55694a47e2090fa19e593a09d
   )


Applied global replace to exception macro

--- build/macros.cmake
+++ build/macros.cmake
@@ -360,27 +360,21 @@
 #MSVC exception logic
 set(EH_STRINGS "EH{a|s}{c|r}?\-?")
 macro(enable_structured_exceptions)
-	string (REGEX MATCH "${EH_STRINGS}" HAS_EH_FLAG "${CMAKE_CXX_FLAGS}")
-	if(HAS_EH_FLAG)
-		string(REGEX REPLACE "${EH_STRINGS}" "EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-	elseif(MSVC)
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa")
+	get_compiler_name(COMPILER)
+	if(COMPILER MATCHES "vc")
+		replace_or_append_all_flag(${EH_STRINGS} "/EHa")
 	endif()
 endmacro()
 macro(enable_synchronous_exceptions)
-	string (REGEX MATCH "${EH_STRINGS}" HAS_EH_FLAG "${CMAKE_CXX_FLAGS}")
-	if(HAS_EH_FLAG)
-		string(REGEX REPLACE "${EH_STRINGS}" "EHs" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-	elseif(MSVC)
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs")
+	get_compiler_name(COMPILER)
+	if(COMPILER MATCHES "vc")
+		replace_or_append_all_flag(${EH_STRINGS} "/EHs")
 	endif()
 endmacro()
 macro(enable_only_cxx_exceptions)
-	string (REGEX MATCH "${EH_STRINGS}" HAS_EH_FLAG "${CMAKE_CXX_FLAGS}")
-	if(HAS_EH_FLAG)
-		string(REGEX REPLACE "${EH_STRINGS}" "EHsc" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-	elseif(MSVC)
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
+	get_compiler_name(COMPILER)
+	if(COMPILER MATCHES "vc")
+		replace_or_append_all_flag(${EH_STRINGS} "/EHsc")
 	endif()
 endmacro()


PKG: proper check for unknown depependencies

--- Packaging/process_file_recurse.cmake
+++ Packaging/process_file_recurse.cmake
@@ -31,17 +31,17 @@
     if(LINUX)
       setif_value_in_list(is_gtk_lib "${input_file}" ALLOWED_SYSTEM_DLLS)
       if(is_gtk_lib)
-	search_library(${input_file} PKG_GTK_SEARCHDIRS input_file_full_path)
-	if( NOT input_file_full_path)
-	  message(FATAL_ERROR "${input_file} not found. searched in ${PKG_GTK_SEARCHDIRS}")
-	endif()
+        search_library(${input_file} PKG_GTK_SEARCHDIRS input_file_full_path)
+        if( NOT input_file_full_path)
+          message(FATAL_ERROR "${input_file} not found. searched in ${PKG_GTK_SEARCHDIRS}")
+        endif()
       endif()
-      if( NOT input_file_full_path)
-	message(FATAL_ERROR "${input_file} not found. searched in ${PKG_SEARCHDIRS}")
-	endif()
     endif(LINUX)
+  endif() #if(NOT input_file_full_path)

-  endif() #if(NOT input_file_full_path)
+  if( NOT input_file_full_path)
+    message(FATAL_ERROR "${input_file} not found. searched in ${PKG_SEARCHDIRS}")
+  endif()

   if(NOT PKG_DEBUG)
     message("Processing ${input_file_full_path}")


SuperBuild: use official Shark version (for debian)

--- SuperBuild/CMake/External_shark.cmake
+++ SuperBuild/CMake/External_shark.cmake
@@ -30,8 +30,8 @@

 ExternalProject_Add(SHARK
   PREFIX SHARK
-  URL "https://github.com/Shark-ML/Shark/archive/349f29bd71c370e0f88f7fc9aa66fa5c4768fcb0.zip"
-  URL_MD5 d6e4310f943e8dda4a0151612b5c62ce
+  URL "https://github.com/Shark-ML/Shark/archive/v3.1.4.zip"
+  URL_MD5 149e7d2e458cbe65c6373c2e89876b3e
   SOURCE_DIR ${SHARK_SB_SRC}
   BINARY_DIR ${SHARK_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


cmake: fix default defines

cmake: fix default defines

Should be _SCL_SECURE_NO_WARNINGS, not _CRT_SECURE_NO_WARNINGS

Change-Id: I339536cf751790edec46c058a8974abe79832d29
Reviewed-by: Christian Kandeler <3aa99dcdd3f0cac61fb81c2a11771c0cc2497607@qt.io>

--- cmake/QbsAPI.cmake
+++ cmake/QbsAPI.cmake
@@ -47,7 +47,7 @@

 set(DEFAULT_DEFINES "")
 if(WIN32)
-  list(APPEND DEFAULT_DEFINES UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS)
+  list(APPEND DEFAULT_DEFINES UNICODE _UNICODE _SCL_SECURE_NO_WARNINGS)
 endif()

 # CMake 3.10 doesn't have list(TRANSFORM)


The previous commit fixed our issue with Travis-CI on OS X, so removed our debug information.

Bloody Brew for using a symbolic link for the Qt libraries!

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -954,13 +954,6 @@
                     COMMAND grep --colour=never -e "${QT_LIBRARY_DIR_FOR_GREP}"
                                                 -e "${REAL_QT_LIBRARY_DIR_FOR_GREP}"
                     OUTPUT_VARIABLE RAW_QT_LIBRARIES)
-MESSAGE("---------")
-MESSAGE(">>> otool -L ${FILENAME}")
-EXECUTE_PROCESS(COMMAND otool -L ${FILENAME}
-                OUTPUT_VARIABLE OTOOL_L_FILENAME)
-MESSAGE(">>> OTOOL_L_FILENAME:\n${OTOOL_L_FILENAME}")
-MESSAGE(">>> RAW_QT_LIBRARIES: ${RAW_QT_LIBRARIES}")
-MESSAGE("---------")

     STRING(REPLACE "\n" ";" RAW_QT_LIBRARIES "${RAW_QT_LIBRARIES}")

@@ -998,23 +991,8 @@
     # Make sure that the Qt file refers to our embedded version of its Qt
     # dependencies

-ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND echo "=========")
-ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND echo "QT_LIBRARY_DIR: ${QT_LIBRARY_DIR}")
-ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND echo "REAL_QT_LIBRARY_DIR: ${REAL_QT_LIBRARY_DIR}")
-STRING(REPLACE ";" " " FORMATTED_ARGN "${ARGN}")
-ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND echo "ARGN: ${FORMATTED_ARGN}")
-
     FOREACH(DEPENDENCY ${ARGN})
         SET(DEPENDENCY_FILENAME ${DEPENDENCY}.framework/Versions/${QT_VERSION_MAJOR}/${DEPENDENCY})
-
-ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND echo "~~~[${DEPENDENCY}]~~~")
-ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND otool -L ${FULL_FILENAME})

         ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
                            COMMAND install_name_tool -change ${QT_LIBRARY_DIR}/${DEPENDENCY_FILENAME}
@@ -1024,12 +1002,7 @@
                            COMMAND install_name_tool -change ${REAL_QT_LIBRARY_DIR}/${DEPENDENCY_FILENAME}
                                                              @rpath/${DEPENDENCY_FILENAME}
                                                              ${FULL_FILENAME})
-
-ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND otool -L ${FULL_FILENAME})
-    ENDFOREACH()
-ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND echo "=========")
+    ENDFOREACH()
 ENDMACRO()

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


Decrease the size (should it be possible) of some deployed files on Linux [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -884,6 +884,13 @@

         COPY_FILE_TO_BUILD_DIR(${PROJECT_NAME} ${PLUGIN_ORIG_DIRNAME} ${PLUGIN_DEST_DIRNAME} ${PLUGIN_FILENAME})

+        # Strip the Qt plugin of all local symbols
+
+        IF(RELEASE_MODE)
+            ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
+                               COMMAND strip -x ${PLUGIN_DEST_DIRNAME}/${PLUGIN_FILENAME})
+        ENDIF()
+
         # Deploy the Qt plugin

         INSTALL(FILES ${PLUGIN_ORIG_DIRNAME}/${PLUGIN_FILENAME}
@@ -894,6 +901,13 @@
 #===============================================================================

 MACRO(LINUX_DEPLOY_LIBRARY DIRNAME FILENAME)
+    # Strip the library of all local symbols
+
+    IF(RELEASE_MODE)
+        ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
+                           COMMAND strip -x ${DIRNAME}/${FILENAME})
+    ENDIF()
+
     # Install the library file

     INSTALL(FILES ${DIRNAME}/${FILENAME}


python is actually required

python is actually required

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -1,4 +1,4 @@
-find_package(PythonInterp)
+find_package(PythonInterp REQUIRED)
 execute_process(COMMAND ${PYTHON_EXECUTABLE} ${catkin_EXTRAS_DIR}/python_version.py
   OUTPUT_VARIABLE PYTHON_VERSION_XDOTY
   OUTPUT_STRIP_TRAILING_WHITESPACE)


Limit MAX_STACK_ALLOC availability to non-Wndows

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -297,12 +297,14 @@
   set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_SIMPLE_THREADED_LEVEL3")
 endif ()

+if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
 if (DEFINED MAX_STACK_ALLOC)
 if (NOT ${MAX_STACK_ALLOC} EQUAL 0)
 set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=${MAX_STACK_ALLOC}")
 endif ()
 else ()
 set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=2048")
+endif ()
 endif ()

 if (DEFINED LIBNAMESUFFIX)


Fixing RelWithDebInfo build mode.

Fixing RelWithDebInfo build mode.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@11563 e6417c60-b987-48fd-844e-b20f0fcc1017

--- seqan/util/cmake/FindSeqAn.cmake
+++ seqan/util/cmake/FindSeqAn.cmake
@@ -162,7 +162,7 @@
         # This is mainly important for 64 bit but does not get into the way
         # on 32 bit either at minimal performance impact.
         set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer")
-        set (CMAKE_CXX_FLAGS_RELDEBUG "${CMAKE_CXX_FLAGS_RELEASE} -g -fno-omit-frame-pointer")
+        set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -g -fno-omit-frame-pointer")

         # Pass CXX flags to flags.
         #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSEQAN_CXX_FLAGS_=\"${CMAKE_CXX_FLAGS}\"")
@@ -382,12 +382,12 @@
 # * A target with the name APP_TARGET will be created and dependencies
 #   of this target to subsequently targets added by seqan_add_test will
 #   be added.
-# * Setup the correct flags for Debug, Release and RelDebug mode.
+# * Setup the correct flags for Debug, Release and RelWithDebInfo mode.

 macro (seqan_setup_apps APP_TARGET)
     # Set flags for SeqAn.
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSEQAN_ENABLE_TESTING=0")
-    set (CMAKE_CXX_FLAGS_RELDEBUG "${CMAKE_CXX_FLAGS_RELDEBUG} -DSEQAN_ENABLE_DEBUG=0")
+    set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DSEQAN_ENABLE_DEBUG=0")
     set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DSEQAN_ENABLE_DEBUG=0")
     set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSEQAN_ENABLE_DEBUG=1")

@@ -410,12 +410,12 @@
 # * A target with the name DEMO_TARGET will be created and dependencies of
 #   this target to subsequently targets added by seqan_add_executable will be
 #   added.
-# * Setup the correct flags for Debug, Release and RelDebug mode.
+# * Setup the correct flags for Debug, Release and RelWithDebInfo mode.

 macro (seqan_setup_demos DEMO_TARGET)
     # Set flags for SeqAn.
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSEQAN_ENABLE_TESTING=0")
-    set (CMAKE_CXX_FLAGS_RELDEBUG "${CMAKE_CXX_FLAGS_RELDEBUG} -DSEQAN_ENABLE_DEBUG=0")
+    set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DSEQAN_ENABLE_DEBUG=0")
     set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DSEQAN_ENABLE_DEBUG=0")
     set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSEQAN_ENABLE_DEBUG=1")


Add macro to generate hidl and aidl source

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -143,3 +143,84 @@
     add_library(${name} ${LIB_TYPE} ${${PROJECT_NAME}_SOURCE_FILES} ${${PROJECT_NAME}_HEADER_FILES})
     target_link_libraries(${name} ${${PROJECT_NAME}_DEPLIB})
 endmacro()
+
+###############################################################################
+# generate source code of HIDL interface
+macro(ADD_HIDL_SOURCE  package_name)
+    string(REPLACE "@" ";" _name_list ${package_name})
+    list(GET _name_list 0 _base_name)
+    list(GET _name_list 1 _version)
+
+    string(REPLACE "." "/" _path_name ${_base_name})
+    string(APPEND _path_name "/${_version}")
+    #message(STATUS "hidl path : ${_path_name}")
+
+    string(REPLACE "." "_" _lib_name ${_base_name})
+    string(REPLACE "." "_" _lib_ver ${_version})
+    string(APPEND _lib_name "_${_lib_ver}")
+    #message(STATUS "hidl lib  : ${_lib_name}")
+
+    if (NOT EXISTS ${TMP_PATH}/${HIDL_HEADER_PATH}/${_path_name})
+        exec_program("${BIN_HIDL_GEN} -p ${HIDL_ROOT_PATH} -o ${TMP_PATH}/${HIDL_HEADER_PATH} -L c++-headers ${package_name}")
+    endif()
+    if (NOT EXISTS ${TMP_PATH}/${HIDL_SOURCE_PATH}/${_path_name})
+        exec_program("${BIN_HIDL_GEN} -p ${HIDL_ROOT_PATH} -o ${TMP_PATH}/${HIDL_SOURCE_PATH} -L c++-sources ${package_name}")
+    endif()
+
+    file(GLOB ANDROID_${_lib_name}_SOURCES
+        ${TMP_PATH}/${HIDL_HEADER_PATH}/${_path_name}/*.h
+        ${TMP_PATH}/${HIDL_SOURCE_PATH}/${_path_name}/*.cpp
+    )
+    source_group(${package_name} FILES ${ANDROID_${_lib_name}_SOURCES})
+    list(APPEND ${PROJECT_NAME}_SOURCE_FILES ${ANDROID_${_lib_name}_SOURCES})
+endmacro()
+
+###############################################################################
+# generate source code of AIDL interface
+macro(ADD_AIDL_SOURCE file_name)
+    string(TOLOWER ${PROJECT_NAME} _path_name)
+
+    if(NOT EXISTS ${TMP_PATH}/${AIDL_HEADER_PATH}/${_path_name})
+        exec_program("mkdir ${_path_name}" ${TMP_PATH}/${AIDL_HEADER_PATH})
+    endif()
+    if(NOT EXISTS ${TMP_PATH}/${AIDL_SOURCE_PATH}/${_path_name})
+        exec_program("mkdir ${_path_name}" ${TMP_PATH}/${AIDL_SOURCE_PATH})
+    endif()
+
+    string(REPLACE "/" ";" _name_list ${file_name})
+    list(GET _name_list -1 _aidl_name)
+    string(REPLACE "aidl" "cpp" _cpp_name ${_aidl_name})
+    #message(STATUS "aidl cpp : ${_path_name}/${_cpp_name}")
+
+    if (NOT EXISTS ${TMP_PATH}/${AIDL_SOURCE_PATH}/${_path_name}/${_cpp_name})
+        exec_program("${BIN_AIDL_CPP} \
+        -I${SOURCE_PATH}/aidl \
+        ${SOURCE_PATH}/aidl/${file_name} \
+        ${TMP_PATH}/${AIDL_HEADER_PATH}/${_path_name} \
+        ${TMP_PATH}/${AIDL_SOURCE_PATH}/${_path_name}/${_cpp_name}"
+        )
+    endif()
+
+    list(REMOVE_AT _name_list -1)
+    string(REPLACE ";" "/" _aidl_path "${_name_list}")
+    #message(STATUS "aidl header path : ${_aidl_path}")
+
+    string(REPLACE ".aidl" "" _aidl_interface ${_aidl_name})
+    string(REGEX REPLACE "I([^ ]*)" "\\1" _aidl_base ${_aidl_interface})
+    #message(STATUS "aidl base : ${_aidl_interface} -> ${_aidl_base}")
+
+    set(ANDROID_${_aidl_base}_SOURCES
+    ${TMP_PATH}/${AIDL_HEADER_PATH}/${_path_name}/${_aidl_path}/I${_aidl_base}.h
+    ${TMP_PATH}/${AIDL_HEADER_PATH}/${_path_name}/${_aidl_path}/Bp${_aidl_base}.h
+    ${TMP_PATH}/${AIDL_HEADER_PATH}/${_path_name}/${_aidl_path}/Bn${_aidl_base}.h
+    ${TMP_PATH}/${AIDL_SOURCE_PATH}/${_path_name}/${_cpp_name}
+    )
+    source_group(${_aidl_name} FILES ${ANDROID_${_aidl_base}_SOURCES})
+    list(APPEND ${PROJECT_NAME}_SOURCE_FILES ${ANDROID_${_aidl_base}_SOURCES})
+
+    if (MSVC)
+        add_definitions(-DEXPORT_I${_aidl_base}=__declspec\(dllexport\))
+        add_definitions(-DEXPORT_Bp${_aidl_base}=__declspec\(dllexport\))
+        add_definitions(-DEXPORT_Bn${_aidl_base}=__declspec\(dllexport\))
+    endif(MSVC)
+endmacro()


CMake:dotnet Fix csproj generation

CMake:dotnet Fix csproj generation

--- cmake/dotnet.cmake
+++ cmake/dotnet.cmake
@@ -118,9 +118,6 @@
   CONTENT
   "FILE(READ ${PROJECT_SOURCE_DIR}/ortools/dotnet/${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.csproj.in input)
 STRING(REPLACE \"@PROJECT_VERSION@\" \"${PROJECT_VERSION}\" input \"\${input}\")
-STRING(REPLACE \"@RUNTIME_IDENTIFIER@\" \"${RUNTIME_IDENTIFIER}\" input \"\${input}\")
-STRING(REPLACE \"@OR_TOOLS_DOTNET@\" \"${OR_TOOLS_DOTNET}\" input \"\${input}\")
-STRING(REPLACE \"@OR_TOOLS_DOTNET_NATIVE@\" \"${OR_TOOLS_DOTNET_NATIVE}\" input \"\${input}\")
 STRING(REPLACE \"@ortools@\" \"$<TARGET_FILE:${PROJECT_NAME}>\" input \"\${input}\")
 STRING(REPLACE \"@native@\" \"$<TARGET_FILE:google-ortools-native>\" input \"\${input}\")
 FILE(WRITE ${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.csproj \"\${input}\")"
@@ -150,7 +147,8 @@
   CONTENT
   "FILE(READ ${PROJECT_SOURCE_DIR}/ortools/dotnet/${OR_TOOLS_DOTNET}/${OR_TOOLS_DOTNET}.csproj.in input)
 STRING(REPLACE \"@PROJECT_VERSION@\" \"${PROJECT_VERSION}\" input \"\${input}\")
-STRING(REPLACE \"@OR_TOOLS_DOTNET@\" \"${OR_TOOLS_DOTNET}\" input \"\${input}\")
+STRING(REPLACE \"@PROJECT_SOURCE_DIR@\" \"${PROJECT_SOURCE_DIR}\" input \"\${input}\")
+STRING(REPLACE \"@PROJECT_DOTNET_DIR@\" \"${PROJECT_BINARY_DIR}/dotnet\" input \"\${input}\")
 STRING(REPLACE \"@DOTNET_PACKAGES_DIR@\" \"${PROJECT_BINARY_DIR}/dotnet/packages\" input \"\${input}\")
 FILE(WRITE ${OR_TOOLS_DOTNET}/${OR_TOOLS_DOTNET}.csproj \"\${input}\")"
 )


CMake: fix wheel platlib/purelib missmatch (Fix #618)

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -89,31 +89,38 @@
 	COMMAND ${CMAKE_COMMAND} -E echo "  def has_ext_modules(self):" >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "    return True" >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "" >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "from setuptools.command.install import install" >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "class InstallPlatlib(install):" >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "    def finalize_options(self):" >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "        install.finalize_options(self)" >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "        self.install_lib=self.install_platlib" >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "" >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "setup(" >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  name='ortools'," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  license='Apache 2.0'," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  version='${PROJECT_VERSION}'," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  author='Google Inc'," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "  author_email = 'lperron@google.com'," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "  description = 'Google OR-Tools python libraries and modules'," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "  long_description = 'read(README.txt)'," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "  keywords = ('operations research' +" >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  author_email='lperron@google.com'," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  description='Google OR-Tools python libraries and modules'," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  long_description='read(README.txt)'," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  keywords=('operations research' +" >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  ', constraint programming' +" >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  ', linear programming' +" >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  ', flow algoritms' +" >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  ', python')," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "  url = 'https://developers.google.com/optimization/'," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "  download_url = 'https://github.com/google/or-tools/releases'," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  url='https://developers.google.com/optimization/'," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  download_url='https://github.com/google/or-tools/releases'," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  distclass=BinaryDistribution," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  cmdclass={'install': InstallPlatlib}," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  packages=find_packages()," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  package_data={" >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools':[$<$<NOT:$<PLATFORM_ID:Windows>>:'../$<TARGET_SONAME_FILE_NAME:ortools>'>]," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools.constraint_solver':['$<TARGET_FILE_NAME:_pywrapcp>']," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools.linear_solver':['$<TARGET_FILE_NAME:_pywraplp>']," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools.sat':['$<TARGET_FILE_NAME:_pywrapsat>']," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools.graph':['$<TARGET_FILE_NAME:_pywrapgraph>']," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools.algorithms':['$<TARGET_FILE_NAME:_pywrapknapsack_solver>']," >> setup.py
-	COMMAND ${CMAKE_COMMAND} -E echo "	'ortools.data':['$<TARGET_FILE_NAME:_pywraprcpsp>']," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  'ortools':[$<$<NOT:$<PLATFORM_ID:Windows>>:'../$<TARGET_SONAME_FILE_NAME:ortools>'>]," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  'ortools.constraint_solver':['$<TARGET_FILE_NAME:_pywrapcp>']," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  'ortools.linear_solver':['$<TARGET_FILE_NAME:_pywraplp>']," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  'ortools.sat':['$<TARGET_FILE_NAME:_pywrapsat>']," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  'ortools.graph':['$<TARGET_FILE_NAME:_pywrapgraph>']," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  'ortools.algorithms':['$<TARGET_FILE_NAME:_pywrapknapsack_solver>']," >> setup.py
+	COMMAND ${CMAKE_COMMAND} -E echo "  'ortools.data':['$<TARGET_FILE_NAME:_pywraprcpsp>']," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  }," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  include_package_data=True," >> setup.py
 	COMMAND ${CMAKE_COMMAND} -E echo "  install_requires=[" >> setup.py


Travis CI: trying to address an issue with Homebrew building Qt 5.5 with no rpath.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -1063,7 +1063,7 @@
                                                                  ${FULL_FILENAME})
             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
                                COMMAND install_name_tool -change ${REAL_QT_LIBRARY_DIR}/${REAL_QT_LIBRARY_FILENAME}
-                                                                 @rpath/${REAL_QT_LIBRARY_FILENAME}
+                                                                 @rpath/${QT_LIBRARY_FILENAME}
                                                                  ${FULL_FILENAME})
         ENDFOREACH()
     ENDIF()


Slight improvements to our common CMake file.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -691,19 +691,35 @@
     SET(PLUGIN_BINARY_DIR ${PROJECT_SOURCE_DIR}/bin/${DISTRIB_BINARY_DIR})

     # Copy the plugin to our plugins directory
-    # Note: this is done so that we can, on Windows and Linux, test the use of
-    #       plugins in OpenCOR without first having to package and deploy
-    #       everything...
+    # Note #1: this is done so that we can, on Windows and Linux, test the use
+    #          of plugins in OpenCOR without first having to package and deploy
+    #          everything...
+    # Note #2: to use ADD_CUSTOM_COMMAND() on Windows or Linux with Ninja
+    #          doesn't work, so we use EXECUTE_PROCESS() instead...
+    # Note #3: we don't use EXECUTE_PROCESS() on OS X because it doesn't work
+    #          with Xcode...

     SET(PLUGIN_FILENAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})

-    EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME}
-                                                     ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
+    IF(APPLE)
+        ADD_CUSTOM_COMMAND(OUTPUT ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME}
+                           COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME}
+                                                            ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
+    ELSE()
+        EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME}
+                                                         ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
+    ENDIF()

     # Make a copy of the plugin to our main build directory

-    EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME}
-                                                     ${PROJECT_BUILD_DIR}/${PLUGIN_FILENAME})
+    IF(APPLE)
+        ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BUILD_DIR}/${PLUGIN_FILENAME}
+                           COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME}
+                                                            ${PROJECT_BUILD_DIR}/${PLUGIN_FILENAME})
+    ELSE()
+        EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME}
+                                                         ${PROJECT_BUILD_DIR}/${PLUGIN_FILENAME})
+    ENDIF()

     # A few OS X specific things

@@ -715,9 +731,11 @@

         IF(NOT "$ENV{PACKAGE_OPENCOR}" STREQUAL "True")
             FOREACH(QT_LIBRARY ${QT_LIBRARIES})
-                EXECUTE_PROCESS(COMMAND install_name_tool -change @executable_path/../Frameworks/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
-                                                                  ${QT_LIBRARY_DIR}/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
-                                                                  ${DEST_PLUGINS_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+                ADD_CUSTOM_TARGET(${PLUGIN_NAME}_${QT_LIBRARY}_UPDATE_OS_X_QT_REFERENCE_IN_BUNDLE ALL
+                                  DEPENDS ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME}
+                                  COMMAND install_name_tool -change @executable_path/../Frameworks/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
+                                                                    ${QT_LIBRARY_DIR}/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
+                                                                    ${DEST_PLUGINS_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
             ENDFOREACH()
         ENDIF()

@@ -728,9 +746,11 @@
         #       to the system version of the Qt libraries, so...

         FOREACH(QT_LIBRARY ${QT_LIBRARIES})
-            EXECUTE_PROCESS(COMMAND install_name_tool -change @executable_path/../Frameworks/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
-                                                              ${QT_LIBRARY_DIR}/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
-                                                              ${PROJECT_BUILD_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+            ADD_CUSTOM_TARGET(${PLUGIN_NAME}_${QT_LIBRARY}_UPDATE_OS_X_QT_REFERENCE_IN_BUILD_DIRECTORY ALL
+                              DEPENDS ${PROJECT_BUILD_DIR}/${PLUGIN_FILENAME}
+                              COMMAND install_name_tool -change @executable_path/../Frameworks/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
+                                                                ${QT_LIBRARY_DIR}/${QT_LIBRARY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_LIBRARY}
+                                                                ${PROJECT_BUILD_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
         ENDFOREACH()
     ENDIF()


Workaround crash with dtraced shared libraries under GCC 3.4.6 on 32 bit Solaris.
Crash happens in dlopen() code when trying to load the library. Crash does not happen when library is
not DTrace instrumented . Additionally, crash does not happen with default Solaris 10 GCC 3.4.3 and
it does not happen if main executable is instrumented.

So , just check for this specific situation (32 bit, GCC3.4.6 , Solaris) and disable Dtrace in shared libraries.
We have only single plugin so far that is instrumented (ha_example)

--- cmake/dtrace.cmake
+++ cmake/dtrace.cmake
@@ -72,8 +72,29 @@
   )
 ENDIF()

+IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCXX
+  AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+  IF(NOT DEFINED BUGGY_GCC_NO_DTRACE_MODULES)
+    EXECUTE_PROCESS(
+      COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}  --version
+      OUTPUT_VARIABLE out)
+    IF(out MATCHES "3.4.6")
+     # This gcc causes crashes in dlopen() for dtraced shared libs,
+     # while standard shipped with Solaris10 3.4.3 is ok
+     SET(BUGGY_GCC_NO_DTRACE_MODULES 1 CACHE INTERNAL "")
+    ELSE()
+     SET(BUGGY_GCC_NO_DTRACE_MODULES 0 CACHE INTERNAL "")
+    ENDIF()
+  ENDIF()
+ENDIF()

-MACRO(DTRACE_INSTRUMENT target)
+FUNCTION(DTRACE_INSTRUMENT target)
+  IF(BUGGY_GCC_NO_DTRACE_MODULES)
+    GET_TARGET_PROPERTY(target_type ${target} TYPE)
+    IF(target_type MATCHES "MODULE_LIBRARY")
+      RETURN()
+    ENDIF()
+  ENDIF()
   IF(ENABLE_DTRACE)
     ADD_DEPENDENCIES(${target} gen_dtrace_header)

@@ -119,7 +140,7 @@
       ENDIF()
     ENDIF()
   ENDIF()
-ENDMACRO()
+ENDFUNCTION()

 # Ugly workaround for Solaris' DTrace inability to use probes


removing embree include dirs from ospray build, else (on mac) TBB actually "accidentally" includes some embree internal files!?

--- cmake/ospray.cmake
+++ cmake/ospray.cmake
@@ -42,13 +42,13 @@
   # Embree common include directories; others may be added depending on build target.
   # this section could be sooo much cleaner if embree only used
   # fully-qualified include names...
-  SET(EMBREE_INCLUDE_DIRECTORIES
-    ${OSPRAY_EMBREE_SOURCE_DIR}/
-    ${OSPRAY_EMBREE_SOURCE_DIR}/include
-    ${OSPRAY_EMBREE_SOURCE_DIR}/common
-    ${OSPRAY_EMBREE_SOURCE_DIR}/
-    ${OSPRAY_EMBREE_SOURCE_DIR}/kernels
-    )
+#  SET(EMBREE_INCLUDE_DIRECTORIES
+#    ${OSPRAY_EMBREE_SOURCE_DIR}/
+#    ${OSPRAY_EMBREE_SOURCE_DIR}/include
+#    ${OSPRAY_EMBREE_SOURCE_DIR}/common
+#    ${OSPRAY_EMBREE_SOURCE_DIR}/
+#    ${OSPRAY_EMBREE_SOURCE_DIR}/kernels
+#    )

   IF (OSPRAY_TARGET STREQUAL "mic")
     SET(OSPRAY_EXE_SUFFIX ".mic")


cmake: Fix python function

cmake: Fix python function

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -237,7 +237,7 @@

   if(BUILD_TESTING)
     add_test(
-      NAME python_tests_${TEST_NAME}
+      NAME python_${COMPONENT_NAME}_${TEST_NAME}
       COMMAND ${VENV_Python_EXECUTABLE} ${FILE_NAME}
       WORKING_DIRECTORY ${VENV_DIR})
   endif()


PKG: prevent installing otbapp* into bin/ even if they are executable dlls

--- SuperBuild/CMake/PackageHelper.cmake
+++ SuperBuild/CMake/PackageHelper.cmake
@@ -642,8 +642,10 @@
           message(STATUS "Processing ${SEARCHDIR}/${infile}")
           is_file_executable("${SEARCHDIR}/${infile}" is_executable)
           if(is_executable)
+            if(NOT "${infile}" MATCHES "otbapp_")
               install(PROGRAMS "${SEARCHDIR}/${infile}"
                 DESTINATION ${PKG_STAGE_DIR}/bin)
+            endif()
           else(is_executable)
             get_filename_component(bn_we ${infile} NAME_WE)
             file(GLOB sofiles "${SEARCHDIR}/${bn_we}*")


cmake: fix incompatibility with cmake 3.5 remove list(FILTER ..) because it is not availbale on cmake version < 3.6

--- scripts/cmake/ElektraPackaging.cmake
+++ scripts/cmake/ElektraPackaging.cmake
@@ -38,21 +38,25 @@
 	elektra-tests
 	elektra-dbg)

-set (ALL_PLUGINS ${CPACK_COMPONENTS_ALL})
-list (FILTER ALL_PLUGINS INCLUDE REGEX "^libelektra4-.*")
+set (COMPONENTS_WITHOUT_DBGSYM elektra-doc elektra-dbg libelektra-dev libelektra4-all elektra-bin-extra)
+
+set (ALL_PLUGINS "")
+foreach(component ${CPACK_COMPONENTS_ALL})
+	if (component MATCHES "^libelektra4-.*")
+		list (APPEND ALL_PLUGINS "${component}")
+	endif()
+endforeach()
 string (REPLACE ";" ", " ALL_PLUGINS_STR "${ALL_PLUGINS}")
+message(STATUS "ALL_PLUGINS_STR: ${ALL_PLUGINS_STR}")

 set (DBG_PACKAGE_NAMES "")
 foreach (component ${CPACK_COMPONENTS_ALL})
-	list (APPEND DBG_PACKAGE_NAMES "${component}-dbgsym")
+	if (NOT component IN_LIST COMPONENTS_WITHOUT_DBGSYM)
+		list (APPEND DBG_PACKAGE_NAMES "${component}-dbgsym")
+	endif ()
 endforeach ()
-# exclude all packages without dbgsym
-list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^elektra-doc.*")
-list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^elektra-dbg.*")
-list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^libelektra-dev.*")
-list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^libelektra4-all.*")
-list (FILTER DBG_PACKAGE_NAMES EXCLUDE REGEX "^elektra-bin-extra.*")
 string (REPLACE ";" ", " DBG_PACKAGE_NAMES_STR "${DBG_PACKAGE_NAMES}")
+message(STATUS "DBG_PACKAGE_NAMES_STR: ${DBG_PACKAGE_NAMES_STR}")

 set (
 	PACKAGE_DESCRIPTION


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2011)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 09)
+SET(KWSYS_DATE_STAMP_MONTH 10)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


update comment

update comment

--- share/hugh/cmake/compiler/msvc.cmake
+++ share/hugh/cmake/compiler/msvc.cmake
@@ -62,7 +62,7 @@
 #list(APPEND GLOBAL_COMPILER_FLAGS /Za)  # disable language extension
                                         # errors in boost + windows kit 10.x
 list(APPEND GLOBAL_COMPILER_FLAGS ${DISABLED_WARNINGS})
-list(APPEND GLOBAL_COMPILER_FLAGS /EHa) # exception-handling for asynchronous (structured) and
+list(APPEND GLOBAL_COMPILER_FLAGS /EHa) # exception-handling for asynchronous (structured) AND
                                         # synchronous (C++) exceptions
 list(APPEND GLOBAL_COMPILER_FLAGS /FS)  # force synchronous .PDB writes


Removing EXCLUDE_FROM_WRAPPING and EXCLUDE_FROM_WRAP_HIERARCHY

This needs to be removed to be used with ParaView.

This is perhaps because ParaView needs to wrap VTK code with
ClientServer Wrapping. Neverthless since this is similar to what the
piston accelerator does and I guess safe to do for DAX.

Change-Id: I426f3dd1074743cae76ec4c7a05710592c710f50

--- Accelerators/Dax/module.cmake
+++ Accelerators/Dax/module.cmake
@@ -14,6 +14,4 @@
     vtkIOXML
     vtkImagingSources
   EXCLUDE_FROM_ALL
-  EXCLUDE_FROM_WRAPPING
-  EXCLUDE_FROM_WRAP_HIERARCHY
   )


Delete unused iree_test_matrix.cmake file. (#9051)

Added in https://github.com/google/iree/pull/6126, last use was deleted in https://github.com/google/iree/pull/8078 (found via `git log -S iree_test_matrix_gen`)

--- build_tools/cmake/iree_test_matrix.cmake
+++ build_tools/cmake/iree_test_matrix.cmake
@@ -1,74 +0,0 @@
-# Copyright 2021 The IREE Authors
-#
-# Licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-include(CMakeParseArguments)
-
-# Generates a matrix of permuted test cases from a description in the
-# test_matrix.yaml file in the current source directory.
-# The resulting test files will be written to:
-#   ${CMAKE_CURRENT_BINARY_DIR}/generated
-# Typically this should be followed by:
-#   iree_test_matrix_glob_py_tests
-#
-# (type of tests to add are based on the runners defined in the
-# generation script)
-# TODO: Add a `generate` step conditioned on the test_matrix.yaml file, so that
-# reconfigure is automatic.
-function(iree_test_matrix_gen)
-  set(_GENERATOR_SCRIPT "${PROJECT_SOURCE_DIR}/build_tools/testing/gen_test_matrix.py")
-  message(STATUS "Generating tests for ${CMAKE_CURRENT_SOURCE_DIR}")
-  execute_process(
-    COMMAND "${Python3_EXECUTABLE}"
-      "${_GENERATOR_SCRIPT}"
-      --dir "${CMAKE_CURRENT_SOURCE_DIR}"
-      --output_dir "${CMAKE_CURRENT_BINARY_DIR}"
-    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
-    RESULTS_VARIABLE _GEN_RESULT)
-
-  if(_GEN_RESULT)
-    message(SEND_ERROR "Error generating tests for ${CMAKE_CURRENT_SOURCE_DIR}")
-  endif()
-endfunction()
-
-# Adds individual py_tests for each generated *.py file from an
-# iree_test_matrix_gen invocation.
-#
-# Parameters:
-#   GLOB: The glob expression to use (defaults to *.py)
-#   LABELS: Optional labels to add
-function(iree_test_matrix_glob_py_tests)
-  cmake_parse_arguments(ARG
-    ""
-    "GLOB"
-    "LABELS"
-    ${ARGN})
-  set(_GLOB "*.py")
-  if(ARG_GLOB)
-    set(_GLOB "${ARG_GLOB}")
-  endif()
-
-  file(GLOB
-    _FOUND_TEST_FILES
-    LIST_DIRECTORIES NO
-    RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/generated"
-    "${CMAKE_CURRENT_BINARY_DIR}/generated/${_GLOB}")
-
-  if(NOT _FOUND_TEST_FILES)
-    message(SEND_ERROR
-      "No generated tests (${_GLOB}) found under ${CMAKE_CURRENT_BINARY_DIR}/generated")
-  endif()
-
-  foreach(_TEST_FILE ${_FOUND_TEST_FILES})
-    iree_py_test(
-      NAME "generated/${_TEST_FILE}"
-      GENERATED_IN_BINARY_DIR
-      SRCS "generated/${_TEST_FILE}"
-      LABELS
-        generated
-        ${ARG_LABELS}
-    )
-  endforeach()
-endfunction()


Improve warning message.

Improve warning message.

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -37,9 +37,10 @@
       VERBATIM)
     add_dependencies(${TARGET} "${TARGET}_clangformat")
   elseif(CLANG_FORMAT)
-    message(WARNING "clang-format version ${CLANG_FORMAT_VERSION} is wrong.\n"
-      "Please download and install a version matching \"${CLANG_FORMAT_VERSION_PATTERN}\""
-      " from\n  http://releases.llvm.org/download.html\nNote: Also adjust Visual Studio options!")
+    message(WARNING "clang-format version ${CLANG_FORMAT_VERSION} is unsuitable.\n"
+      "Please download and install a version matching ${CLANG_FORMAT_VERSION_PATTERN}"
+      " from http://releases.llvm.org/download.html\n"
+	  "Also adjust Visual Studio options and PATH variable as necessary!")
   else()
     message(WARNING "clang-format was not found")
   endif()


improve FindCholmod

improve FindCholmod

--- cmake/FindCholmod.cmake
+++ cmake/FindCholmod.cmake
@@ -22,9 +22,9 @@
   find_library(AMD_LIBRARY amd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
   if (AMD_LIBRARY)
     set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${AMD_LIBRARY})
-  else (AMD_LIBRARY)
+  else ()
     set(CHOLMOD_LIBRARIES FALSE)
-  endif (AMD_LIBRARY)
+  endif ()

 endif(CHOLMOD_LIBRARIES)

@@ -33,9 +33,9 @@
   find_library(COLAMD_LIBRARY colamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
   if (COLAMD_LIBRARY)
     set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${COLAMD_LIBRARY})
-  else (COLAMD_LIBRARY)
+  else ()
     set(CHOLMOD_LIBRARIES FALSE)
-  endif (COLAMD_LIBRARY)
+  endif ()

 endif(CHOLMOD_LIBRARIES)

@@ -44,20 +44,29 @@
   find_library(CAMD_LIBRARY camd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
   if (CAMD_LIBRARY)
     set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CAMD_LIBRARY})
-  else (CAMD_LIBRARY)
+  else ()
     set(CHOLMOD_LIBRARIES FALSE)
-  endif (CAMD_LIBRARY)
+  endif ()

 endif(CHOLMOD_LIBRARIES)

 if(CHOLMOD_LIBRARIES)

-  find_library(CCOLAMD_LIBRARY colamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
+  find_library(CCOLAMD_LIBRARY ccolamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
   if (CCOLAMD_LIBRARY)
     set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CCOLAMD_LIBRARY})
-  else (CCOLAMD_LIBRARY)
+  else ()
     set(CHOLMOD_LIBRARIES FALSE)
-  endif (CCOLAMD_LIBRARY)
+  endif ()
+
+endif(CHOLMOD_LIBRARIES)
+
+if(CHOLMOD_LIBRARIES)
+
+  find_library(CHOLMOD_METIS_LIBRARY metis PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
+  if (CHOLMOD_METIS_LIBRARY)
+    set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CHOLMOD_METIS_LIBRARY})
+  endif ()

 endif(CHOLMOD_LIBRARIES)


Well ...

Well ...

--- cmake/FindJsonCpp.cmake
+++ cmake/FindJsonCpp.cmake
@@ -7,7 +7,7 @@
 FIND_PATH(JSONCPP_INCLUDE_DIR json/json.h
    HINTS
    $ENV{JSONCPPDIR}
-   PATH_SUFFIXES include/json include
+   PATH_SUFFIXES include/jsoncpp include include
    PATHS
    ${JSONCPP_ROOT}
    ~/Library/Frameworks


Fix bug in finding jsoncpp

Fix bug in finding jsoncpp

--- cmake/FindJsoncpp.cmake
+++ cmake/FindJsoncpp.cmake
@@ -6,7 +6,7 @@
 # Include these modules to handle the QUIETLY and REQUIRED arguments.
 include (FindPackageHandleStandardArgs)

-find_path( JSONCPP_INCLUDE_DIRS NAMES json/json.h )
+find_path( JSONCPP_INCLUDE_DIRS NAMES json/json.h PATH_SUFFIXES jsoncpp )

 find_library( JSONCPP_LIBRARIES NAMES jsoncpp )


Remove redundant set_target_properties (${TARGET_NAME} PROPERTIES COMPILE_FLAGS ) directive in ModuleSetup.cmake. This is already done per-configuration in CMakeBuildConfig.txt set (CMAKE_CXX_FLAGS_RELEASE ...) and set (CMAKE_CXX_FLAGS_RELWITHDEBINFO ...). Fixes #507.

--- cmake/ModuleSetup.cmake
+++ cmake/ModuleSetup.cmake
@@ -93,7 +93,6 @@
     add_library (${TARGET_NAME} ${LIB_TYPE} ${ARGN})

     if (MSVC AND ENABLE_BUILD_OPTIMIZATIONS)
-        set_target_properties (${TARGET_NAME} PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_RELEASE})
         if (${LIB_TYPE} STREQUAL "SHARED")
             set_target_properties (${TARGET_NAME} PROPERTIES LINK_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE})
             set_target_properties (${TARGET_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO ${CMAKE_SHARED_LINKER_FLAGS_RELEASE})


Revert "Do not add built plugins inside tundra/bin/plugins/[Release|RelWithDebInfo|Debug] when making Xcode project, but put all plugins in same folder" since the problem was in CMake

This reverts commit a6c49dabccea3c8daf126b6421b896e3e83afd1a.

--- cmake/ModuleSetup.cmake
+++ cmake/ModuleSetup.cmake
@@ -76,7 +76,6 @@
                 #set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${TARGET_DIR})
                 set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${TARGET_DIR})
                 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flat_namespace")
-                set_target_properties (${TARGET_NAME} PROPERTIES XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR ${TARGET_DIR})
             endif()
         endif ()
     endif ()


do not modify RUNTIME_OUTPUT_DIRECTORY on Windows

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -248,7 +248,9 @@
     set(multiValueArgs FILES ARGUMENTS LINK_WITH)
     cmake_parse_arguments(PCL_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
     add_executable(${_exename} ${PCL_ADD_TEST_FILES})
-    set_target_properties(${_exename} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+    if(NOT WIN32)
+      set_target_properties(${_exename} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+    endif(NOT WIN32)
     PCL_ADD_OPENMP_FLAGS(${_exename})
     target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     #


disabling fast-math mode for MSVC and ICC under Windows

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -38,8 +38,8 @@
 ENDIF()

 SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
-SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        ${COMMON_CXX_FLAGS} /Ox /fp:fast /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 ")
-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS} /Ox /fp:fast /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 ")
+SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 ")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 ")

 SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG")


Fix mklink test when current path is not sources dir (for example when used cmake-gui)

--- CMake/Modules/CheckHost.cmake
+++ CMake/Modules/CheckHost.cmake
@@ -39,7 +39,7 @@
     set (NULL_DEVICE nul)
     if (NOT DEFINED HAS_MKLINK)
         # Test whether the host system is capable of setting up symbolic link
-        execute_process (COMMAND cmd /C mklink test-link CMakeCache.txt RESULT_VARIABLE MKLINK_EXIT_CODE OUTPUT_QUIET ERROR_QUIET)
+        execute_process (COMMAND cmd /C mklink test-link CMakeCache.txt WORKING_DIRECTORY ${CMAKE_BINARY_DIR} RESULT_VARIABLE MKLINK_EXIT_CODE OUTPUT_QUIET ERROR_QUIET)
         if (MKLINK_EXIT_CODE EQUAL 0)
             set (HAS_MKLINK TRUE)
             file (REMOVE ${CMAKE_BINARY_DIR}/test-link)


Preserve externally defined values for Boost_ADDITIONAL_VERSIONS


[build] Extend check_for_cxx11_compiler to support future VS compiler #762

--- src/cmakeFindModules/CXX11.cmake
+++ src/cmakeFindModules/CXX11.cmake
@@ -6,7 +6,7 @@
 macro(check_for_cxx11_compiler _VAR)
   message(STATUS "Checking for C++11 compiler")
   set(${_VAR})
-  if((MSVC AND (MSVC10 OR MSVC11 OR MSVC12 OR MSVC14)) OR
+  if((MSVC AND NOT MSVC_VERSION VERSION_LESS 1800) OR # checking the compiler is at least Visual Studio 2013 - MSVC++ 12
      (CMAKE_COMPILER_IS_GNUCXX AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.6) OR
      (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.1))
     set(${_VAR} 1)


Fix CMake variable usage.

Fix CMake variable usage.

--- cmake/Modules/CppUTestWarningFlags.cmake
+++ cmake/Modules/CppUTestWarningFlags.cmake
@@ -56,7 +56,7 @@
     check_and_append_c_warning_flags(${WARNING_C_ONLY_FLAGS})
     check_and_append_cxx_warning_flags(${WARNING_CXX_FLAGS})

-    if (C++11)
+    if (CPPUTEST_C++11)
         check_cxx_compiler_flag("-Wno-c++98-compat" NO_WARNING_CXX_98_COMPAT_FLAG)
         if (NO_WARNING_CXX_98_COMPAT_FLAG)
             set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-c++98-compat")


Cygwin toolchain flags corrected. (#40)

Cygwin toolchain flags corrected. (#40)

--- cmake/toolchains/cygwin/cl-default.cmake
+++ cmake/toolchains/cygwin/cl-default.cmake
@@ -25,21 +25,20 @@
 set(CMAKE_C_FLAGS   ${DEFAULT_C_FLAGS}   CACHE STRING "Default" FORCE)

-set(CMAKE_CXX_FLAGS_RELEASE         "/O2 /Ob1 /Oi /Ot /GS- /Gs /GF /Gy /DNDEBUG"
+set(CMAKE_CXX_FLAGS_RELEASE         "/MD /O2 /Ob1 /Oi /Ot /GS- /Gs /GF /Gy /DNDEBUG"
     CACHE STRING "Release"        FORCE)
-set(CMAKE_CXX_FLAGS_MINSIZEREL      "/O1 /Ob1 /Os /DNDEBUG"
+set(CMAKE_CXX_FLAGS_MINSIZEREL      "/MD /O1 /Ob1 /Os /DNDEBUG"
     CACHE STRING "MinSizeRel"     FORCE)
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO  "/O2 /Ob1 /Oi /Ot /GS- /Gs /GF /Gy /Zi /DNDEBUG"
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO  "/MD /O2 /Ob1 /Oi /Ot /GS- /Gs /GF /Gy /Zi /DNDEBUG"
     CACHE STRING "RelWithDebInfo" FORCE)
-set(CMAKE_CXX_FLAGS_DEBUG           "/Zi"
+set(CMAKE_CXX_FLAGS_DEBUG           "/MDd /Od /Ob0 /Zi"
     CACHE STRING "Debug"          FORCE)

-set(CMAKE_C_FLAGS_RELEASE         "/O2 /Ob1 /Oi /Ot /GS- /Gs /GF /Gy -DNDEBUG"
+set(CMAKE_C_FLAGS_RELEASE         "/MD /O2 /Ob1 /Oi /Ot /GS- /Gs /GF /Gy -DNDEBUG"
     CACHE STRING "Release"        FORCE)
-set(CMAKE_C_FLAGS_MINSIZEREL      "/O1 /Ob1 /Os /DNDEBUG"
+set(CMAKE_C_FLAGS_MINSIZEREL      "/MD /O1 /Ob1 /Os /DNDEBUG"
     CACHE STRING "MinSizeRel"     FORCE)
-set(CMAKE_C_FLAGS_RELWITHDEBINFO  "/O2 /Ob1 /Oi /Ot /GS- /Gs /GF /Gy /Zi /DNDEBUG"
+set(CMAKE_C_FLAGS_RELWITHDEBINFO  "/MD /O2 /Ob1 /Oi /Ot /GS- /Gs /GF /Gy /Zi /DNDEBUG"
     CACHE STRING "RelWithDebInfo" FORCE)
-set(CMAKE_C_FLAGS_DEBUG           "/Zi"
+set(CMAKE_C_FLAGS_DEBUG           "/MDd /Od /Ob0 /Zi"
     CACHE STRING "Debug"          FORCE)
-


CMake: Fix typo in find_program() usage. Fixes #208.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -338,7 +338,7 @@
     )

     # Strong name signatures
-    find_program(SN sn PATHS PATHS
+    find_program(SN sn PATHS
         ${MONO_PATH}/bin
         /Library/Frameworks/Mono.framework/Versions/Current/bin
         $ENV{WindowsSDK_ExecutablePath_${CSHARP_PLATFORM}}


- add else branch to ensure cblas is properly included

--- CMakeModules/FindCLAPACK.cmake
+++ CMakeModules/FindCLAPACK.cmake
@@ -65,7 +65,7 @@
     )

     if (CLAPACK_INCLUDE_DIR)
-    add_definitions(-DHAVE_CBLAS_H)
+      add_definitions(-DHAVE_CBLAS_H)
     endif()

     if (NOT CLAPACK_INCLUDE_DIR)
@@ -73,6 +73,10 @@
       set(CLAPACK_INCLUDE_DIR "${COPASI_SOURCE_DIR}")
     endif (NOT CLAPACK_INCLUDE_DIR)

+  else()
+
+    add_definitions(-DHAVE_CBLAS_H)
+
   endif (NOT CLAPACK_INCLUDE_DIR)


cmake: ignore clang warning -Wc++1z-extensions

--- bootstrap/cmake/build-settings.cmake
+++ bootstrap/cmake/build-settings.cmake
@@ -71,3 +71,8 @@
 set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
 set(CMAKE_MACOSX_RPATH 1)
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+	# warning: nested namespace definition is a C++1z extension
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++1z-extensions")
+endif()


Corrected installation of headers

Corrected installation of headers

Change-Id: Ia6afd465c49955e7d8a390c0892ab7dbe7ce5463

--- CMake/sitkGenerateFilterSource.cmake
+++ CMake/sitkGenerateFilterSource.cmake
@@ -232,7 +232,7 @@
   configure_file( "${tmp_generated_headers_i}" "${generated_headers_i}" COPYONLY )

   install(FILES
-    ${SimpleITK${directory_name}GeneratedSource}
+    ${SimpleITK${directory_name}GeneratedHeader}
     ${generated_headers_h}
     ${generated_headers_i}
   DESTINATION ${SimpleITK_INSTALL_INCLUDE_DIR}


Make CMake find/link assimp and bullet better under linux.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -457,41 +457,50 @@
 endmacro()

 macro(use_package_bullet)
-    if ("$ENV{BULLET_DIR}" STREQUAL "")
-       if (WIN32)
-          set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/Bullet)
-	  include_directories(${BULLET_DIR}/include)
-	  include_directories(${BULLET_DIR}/include/ConvexDecomposition)
-	  link_directories(${BULLET_DIR}/lib)
-       else() # todo: This should be temporary? Always just use the above directory.
-          set(BULLET_DIR ${ENV_NAALI_DEP_PATH})
-	  include_directories(${BULLET_DIR}/include/bullet)
-	  include_directories(${BULLET_DIR}/include/bullet/ConvexDecomposition)
-	  link_directories(${BULLET_DIR}/lib)
-       endif()
-    else()
-       set(BULLET_DIR $ENV{BULLET_DIR})
-       include_directories(${BULLET_DIR}/include)
-       include_directories(${BULLET_DIR}/include/ConvexDecomposition)
-       link_directories(${BULLET_DIR}/lib)
+    if (WIN32)
+        if ("$ENV{BULLET_DIR}" STREQUAL "")
+            set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/Bullet)
+        endif()
+        include_directories(${BULLET_DIR}/include)
+        include_directories(${BULLET_DIR}/include/ConvexDecomposition)
+        link_directories(${BULLET_DIR}/lib)
+    else() # Linux, note: mac will also come here..
+        if ("$ENV{BULLET_DIR}" STREQUAL "")
+            set(BULLET_DIR ${ENV_NAALI_DEP_PATH})
+        endif()
+        include_directories(${BULLET_DIR}/include/bullet)
+        include_directories(${BULLET_DIR}/include/bullet/ConvexDecomposition)
+        link_directories(${BULLET_DIR}/lib)
     endif()
 endmacro()

 macro(link_package_bullet)
-    target_link_libraries(${TARGET_NAME} debug LinearMath_d debug BulletDynamics_d debug BulletCollision_d debug ConvexDecomposition_d)
     target_link_libraries(${TARGET_NAME} optimized LinearMath optimized BulletDynamics optimized BulletCollision optimized ConvexDecomposition)
+    if (WIN32)
+        target_link_libraries(${TARGET_NAME} debug LinearMath_d debug BulletDynamics_d debug BulletCollision_d debug ConvexDecomposition_d)
+    endif()
 endmacro()

 macro(use_package_assimp)
-    if ("$ENV{ASSIMP_DIR}" STREQUAL "")
-       set(ASSIMP_DIR ${ENV_NAALI_DEP_PATH}/assimp)
-    endif()
-    include_directories(${ASSIMP_DIR}/include)
-    link_directories(${ASSIMP_DIR}/lib/assimp_debug_Win32)
-	link_directories(${ASSIMP_DIR}/lib/assimp_release_Win32)
+    if (WIN32)
+        if ("$ENV{ASSIMP_DIR}" STREQUAL "")
+           set(ASSIMP_DIR ${ENV_NAALI_DEP_PATH}/assimp)
+        endif()
+        include_directories(${ASSIMP_DIR}/include)
+        link_directories(${ASSIMP_DIR}/lib/assimp_debug_Win32)
+        link_directories(${ASSIMP_DIR}/lib/assimp_release_Win32)
+    else() # Linux, note: mac will also come here..
+        if ("$ENV{ASSIMP_DIR}" STREQUAL "")
+           set(ASSIMP_DIR ${ENV_NAALI_DEP_PATH})
+        endif()
+        include_directories(${ASSIMP_DIR}/include/assimp)
+        link_directories(${ASSIMP_DIR}/lib)
+    endif()
 endmacro()

 macro(link_package_assimp)
-    target_link_libraries(${TARGET_NAME} debug assimpd)
     target_link_libraries(${TARGET_NAME} optimized assimp)
-endmacro()
+    if (WIN32)
+        target_link_libraries(${TARGET_NAME} debug assimpd)
+    endif()
+endmacro()


linux fix

linux fix

--- ext/FindSGCT.cmake
+++ ext/FindSGCT.cmake
@@ -79,9 +79,9 @@
     endif(APPLE)

     # check if debug or release version of sgct should be used
-    if(CMAKE_BUILD_TYPE MATCHES DEBUG)
+    if(CMAKE_BUILD_TYPE MATCHES Debug)
         set(SGCT_NAME "${SGCT_NAME}d")
-    endif(CMAKE_BUILD_TYPE MATCHES DEBUG)
+    endif(CMAKE_BUILD_TYPE MATCHES Debug)

     # Find the sgct library
     find_library(SGCT_LIBRARY NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}${SGCT_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
@@ -117,13 +117,17 @@
 if(UNIX AND NOT APPLE)
     find_package(XRandR)
     find_package(Xi)
+    find_package(Threads)
     if(NOT XRANDR_FOUND)
         message(FATAL_ERROR "XRandR not found!")
     endif(NOT XRANDR_FOUND)
     if(NOT XI_FOUND)
         message(FATAL_ERROR "Xi not found!")
     endif(NOT XI_FOUND)
-    set(SGCT_DEPENDENCIES ${SGCT_DEPENDENCIES} ${XRANDR_LIBRARIES} ${XI_LIBRARIES})
+    if(NOT THREADS_FOUND)
+        message(FATAL_ERROR "Threads not found!")
+    endif(NOT THREADS_FOUND)
+    set(SGCT_DEPENDENCIES ${SGCT_DEPENDENCIES} ${XRANDR_LIBRARIES} ${XI_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} Xxf86vm )
 endif(UNIX AND NOT APPLE)

 # includes


[HAWQ-1172][LIBHDFS3]. Fix typo of LIBUUID_INCLUDE_DIRS in FindLibUUID.cmake.

--- depends/libhdfs3/CMake/FindLibUUID.cmake
+++ depends/libhdfs3/CMake/FindLibUUID.cmake
@@ -10,7 +10,7 @@
   SET(LIBUUID_FIND_QUIETLY TRUE)
 ENDIF (LIBUUID_INCLUDE_DIRS)

-FIND_PATH(LIBUUID_INCLUDE_DIR uuid/uuid.h)
+FIND_PATH(LIBUUID_INCLUDE_DIRS uuid/uuid.h)

 SET(LIBUUID_NAMES uuid)
 FIND_LIBRARY(LIBUUID_LIBRARIES NAMES ${LIBUUID_NAMES})
@@ -18,6 +18,6 @@
 # handle the QUIETLY and REQUIRED arguments and set LIBUUID_FOUND to TRUE if
 # all listed variables are TRUE
 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUUID DEFAULT_MSG LIBUUID_LIBRARIES LIBUUID_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUUID DEFAULT_MSG LIBUUID_LIBRARIES LIBUUID_INCLUDE_DIRS)

 MARK_AS_ADVANCED(LIBUUID_LIBRARIES LIBUUID_INCLUDE_DIRS)


ENH: Eternia - fewer cores

ENH: Eternia - fewer cores

--- Eternia_Kitware_TubeTK_Nightly.cmake
+++ Eternia_Kitware_TubeTK_Nightly.cmake
@@ -38,10 +38,10 @@

 set( ENV{DISPLAY} ":0" )

-set( SITE_MAKE_COMMAND "make -j5" )
+set( SITE_MAKE_COMMAND "make -j3" )
 set( SITE_CMAKE_COMMAND "/usr/local/bin/cmake" )
 set( SITE_QMAKE_COMMAND "/usr/bin/qmake" )
-set( SITE_CTEST_COMMAND "/usr/local/bin/ctest -j5" )
+set( SITE_CTEST_COMMAND "/usr/local/bin/ctest -j3" )

 set( SITE_MEMORYCHECK_COMMAND "/usr/bin/valgrind" )
 set( SITE_COVERAGE_COMMAND "/usr/bin/gcov" )
@@ -49,7 +49,6 @@

 set( SITE_GIT_COMMAND "/usr/bin/git" )
 set( SITE_SVN_COMMAND "/usr/bin/svn" )
-set( SITE_CVS_COMMAND "/usr/bin/cvs" )

 set( SITE_EXPERIMENTAL_BUILD ON )
 set( SITE_EXPERIMENTAL_TEST ON )


Missing space causing erroneous CTest Label

--- cmake/Modules/GenerateExamples.cmake
+++ cmake/Modules/GenerateExamples.cmake
@@ -164,7 +164,7 @@
         string(REGEX MATCHALL "([0-9]+)" _NODES "${_NODES}")
         set(_FREQ "${FREQ_${_SIZE}}")
         string(TOLOWER "${_FREQ}" _LFREQ)
-        set(_LABELS  Examples${_TYPE} ${MACHINE} ${_SIZE} ${_FREQ}
+        set(_LABELS  Examples ${_TYPE} ${MACHINE} ${_SIZE} ${_FREQ}
             ${_TYPE}_${_SIZE} ${_TYPE}_${_LFREQ}
             ${_TYPE}_${_NODES} ${_LFREQ}_${_NODES}
             EXAMPLE_${_NODES}_NODE "slurm")


CELIX-347: Updated BuildOptions to allow undefs in shared libaries. This is needed when using the asan

--- cmake/cmake_celix/BuildOptions.cmake
+++ cmake/cmake_celix/BuildOptions.cmake
@@ -2,6 +2,6 @@
 option(ENABLE_ADDRESS_SANITIZER "Enabled building with address sanitizer. Note for gcc libasan must be installed" OFF)

 if (ENABLE_ADDRESS_SANITIZER)
-    set(CMAKE_C_FLAGS "-lasan -fsanitize=address ${CMAKE_C_FLAGS}")
-    set(CMAKE_CXX_FLAGS "-lasan -fsanitize=address ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_C_FLAGS "-lasan -fsanitize=address ${CMAKE_C_FLAGS} -Wl,--allow-shlib-undefined")
+    set(CMAKE_CXX_FLAGS "-lasan -fsanitize=address ${CMAKE_CXX_FLAGS} -Wl,--allow-shlib-undefined")
 endif()


Disable by default Vc on ppc64le systems.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -90,11 +90,12 @@
  set(vc_defvalue OFF)
 endif()

-# VC does not support yet Arm processors.
-if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+# VC does not support yet Arm and PPC processors.
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR
+    CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
+   message(STATUS "A system not supported by Vc, ${CMAKE_SYSTEM_PROCESSOR}, was detected. Disabling Vc by default.")
    set(vc_defvalue OFF)
 endif()
-

 ROOT_BUILD_OPTION(afdsmgrd OFF "Dataset manager for PROOF-based analysis facilities")


FIX (#2107): Added additional filters itkB0ImageExtractionImageFilter, itkTensorImageToDiffusionImageFilter, itkTensorToScalarTensorImageFilter, itkTensorToScalarFunction, itkTensorToL2NormFunction

--- Modules/DiffusionImaging/files.cmake
+++ Modules/DiffusionImaging/files.cmake
@@ -9,7 +9,12 @@
   Algorithms/itkDiffusionQballPrepareVisualizationImageFilter.h
   Algorithms/itkTensorDerivedMeasurementsFilter.h
   Algorithms/itkBrainMaskExtractionImageFilter.h
-
+  Algorithms/itkB0ImageExtractionImageFilter.h
+  Algorithms/itkTensorImageToDiffusionImageFilter.h
+  Algorithms/itkTensorToScalarTensorImageFilter.h
+  Algorithms/itkTensorToScalarFunction.h
+  Algorithms/itkTensorToL2NormFunction.h
+
   # DicomImport
   DicomImport/mitkDicomDiffusionImageReader.cpp
   DicomImport/mitkGroupDiffusionHeadersFilter.cpp


Add --enable-fpic to the configure script for VP9 to address issue #164.

--- SuperBuild/External_VP9.cmake
+++ SuperBuild/External_VP9.cmake
@@ -27,7 +27,7 @@
       GIT_REPOSITORY https://github.com/webmproject/libvpx/
       GIT_TAG v1.6.1
       SOURCE_DIR        "${CMAKE_BINARY_DIR}/Deps/VP9"
-      CONFIGURE_COMMAND "${CMAKE_BINARY_DIR}/Deps/VP9/configure" --disable-examples --as=yasm --disable-tools --disable-docs --disable-vp8 --disable-libyuv --disable-unit_tests --disable-postproc WORKING_DIRECTORY "${VP9_LIBRARY_DIR}"
+      CONFIGURE_COMMAND "${CMAKE_BINARY_DIR}/Deps/VP9/configure" --disable-examples --as=yasm --enable-pic --disable-tools --disable-docs --disable-vp8 --disable-libyuv --disable-unit_tests --disable-postproc WORKING_DIRECTORY "${VP9_LIBRARY_DIR}"
       BUILD_ALWAYS 1
       BUILD_COMMAND PATH=${YASM_BINARY_DIR}:$ENV{PATH}; make
       BUILD_IN_SOURCE 1


TEST: use ninja on windows #WIP

TEST: use ninja on windows #WIP

--- Packaging/Files/build_examples.cmake
+++ Packaging/Files/build_examples.cmake
@@ -35,10 +35,16 @@
 message("PKG_DIR=${PKG_DIR}")
 message("SRC_DIR=${SRC_DIR}")

+set(cmake_gen)
+if(WIN32)
+  set(cmake_gen "-GNinja")
+endif()
+
 execute_process(
   COMMAND ${CMAKE_COMMAND}
   -DCMAKE_INSTALL_PREFIX=${PKG_DIR}
   -DCMAKE_BUILD_TYPE=RelWithDebInfo
+  ${cmake_gen}
   ${SRC_DIR}
   WORKING_DIRECTORY ${TEST_DIR}
   RESULT_VARIABLE configure_rv


COMP: add a check for SO_REUSEADDR, but don't use the result yet, at first
let's see if this check works for all platforms

Alex

--- Parallel/VTKParallelCMakeTests.cmake
+++ Parallel/VTKParallelCMakeTests.cmake
@@ -1,5 +1,6 @@
 # See if we need to link the socket library
-INCLUDE(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
+INCLUDE(CheckLibraryExists)
+INCLUDE(CheckSymbolExists)
 CHECK_LIBRARY_EXISTS("socket" getsockname "" VTK_HAVE_LIBSOCKET)

 IF("VTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T" MATCHES "^VTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T$")
@@ -30,3 +31,5 @@
       "${OUTPUT}\n" APPEND)
   ENDIF(VTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T)
 ENDIF("VTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T" MATCHES "^VTK_HAVE_GETSOCKNAME_WITH_SOCKLEN_T$")
+
+CHECK_SYMBOL_EXISTS(SO_REUSEADDR "sys/types.h;sys/socket.h" HAVE_SO_REUSEADDR)


Split off 7.8.40

Split off 7.8.40

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 39 )
+set ( HPCC_POINT 41 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


ENH: Update DTIProcess

ENH: Update DTIProcess

DTIProcess had many compiler warnings that were indicative
of real errors under ITKv4.

--- SuperBuild/External_DTIProcess.cmake
+++ SuperBuild/External_DTIProcess.cmake
@@ -3,7 +3,7 @@

 ExternalProject_Add(DTIProcess
   SVN_REPOSITORY "https://www.nitrc.org/svn/dtiprocess/trunk"
-  SVN_REVISION -r "151"
+  SVN_REVISION -r "171"
   SVN_USERNAME slicerbot
   SVN_PASSWORD slicer
   SOURCE_DIR DTIProcess


Make sure that external sitl project will be rebuild in case of sourcve has changed

--- src/firmware/posix/sitl_target.cmake
+++ src/firmware/posix/sitl_target.cmake
@@ -66,6 +66,11 @@
 	)
 set_target_properties(sitl_gazebo PROPERTIES EXCLUDE_FROM_ALL TRUE)

+ExternalProject_Add_Step(sitl_gazebo forceconfigure
+	DEPENDEES update
+	DEPENDERS configure
+	ALWAYS 1)
+
 # create targets for each viewer/model/debugger combination
 set(viewers none jmavsim gazebo replay)
 set(debuggers none ide gdb lldb ddd valgrind callgrind)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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