Added exclude variables for tests again. Labels option for coverage.

The labels option for subproject coverage information does not work yet.

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -146,7 +146,7 @@
       BUILD "${CTEST_BINARY_DIRECTORY}"
       INCLUDE_LABEL "SuperBuild"
       PARALLEL_LEVEL 8
-      #EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
+      EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
       )
     # runs only tests that have a LABELS property matching "${subproject}"
     ctest_submit(PARTS Test)
@@ -179,7 +179,7 @@
         APPEND
         INCLUDE_LABEL "${subproject}"
         PARALLEL_LEVEL 8
-        #EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
+        EXCLUDE ${TEST_TO_EXCLUDE_REGEX}
         )
       # runs only tests that have a LABELS property matching "${subproject}"

@@ -188,7 +188,7 @@
       # Coverage per sub-project
       if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
         message("----------- [ Coverage ${subproject} ] -----------")
-        ctest_coverage(BUILD "${mitk_build_dir}") # LABELS "${subproject}")
+        ctest_coverage(BUILD "${mitk_build_dir}" LABELS "${subproject}")
         ctest_submit(PARTS Coverage)
       endif ()


BUG: Fixing the drop site for the builds of the nifti library.

--- Utilities/nifti/DartConfig.cmake
+++ Utilities/nifti/DartConfig.cmake
@@ -9,7 +9,7 @@

 # Dart server to submit results (used by client)
 SET (DROP_METHOD "xmlrpc")
-SET (DROP_SITE "delta.psychiatry.uiowa.edu:8081")
+SET (DROP_SITE "testing.psychiatry.uiowa.edu:8081")
 SET (DROP_LOCATION "NIFTI")

 SET (CVS_WEB_URL "http://cvs.sourceforge.net/viewcvs.py/niftilib/")


ENH: Update Windows MKL path and prioritize user path if supplied

--- CMake/FindFFTW.cmake
+++ CMake/FindFFTW.cmake
@@ -18,7 +18,7 @@
 ## ** On Linux, the default install directory is:
 ## /opt/intel/compilers_and_libraries/linux/
 ## ** On Windows, it is:
-## `C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.2.185\windows\mkl`
+## `C:\Program Files (x86)\Intel\oneAPI\mkl\2021.4.0`
 ## ** On Mac, it is:
 ## `/opt/intel/compilers_and_libraries/mac/mkl`
 ##
@@ -33,10 +33,15 @@
 if(ITK_USE_FFTWD OR ITK_USE_FFTWF)

   if(ITK_USE_MKL)
-    if(DEFINED ENV{MKLROOT})
+    # If the user has provided the MKL include path then search nearby for library files
+    if(FFTW_INCLUDE_PATH)
+      # mkl/<version>/include/fftw -> mkl/<version>
+      get_filename_component(MKLROOT ${FFTW_INCLUDE_PATH} DIRECTORY)
+      get_filename_component(MKLROOT ${MKLROOT} DIRECTORY)
+    elseif(DEFINED ENV{MKLROOT})
       set(MKLROOT_default $ENV{MKLROOT})
     elseif(WIN32)
-      set(MKLROOT_default "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows/mkl")
+      set(MKLROOT_default "C:/Program Files (x86)/Intel/oneAPI/mkl/2021.4.0")
     elseif(APPLE)
       set(MKLROOT_default "/opt/intel/compilers_and_libraries/mac/mkl")
     elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")


ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.9 Examples/Build/vtkMy/CMakeOptions.cmake)

--- Examples/Build/vtkMy/CMakeOptions.cmake
+++ Examples/Build/vtkMy/CMakeOptions.cmake
@@ -1,14 +1,17 @@
+#
+# Configure output paths for libraries and executables.
+#
+SET(LIBRARY_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin CACHE PATH
+    "Single output directory for building all libraries.")
+SET(EXECUTABLE_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin CACHE PATH
+    "Single output directory for building all executables.")
+MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
+
 #
 # Try to find VTK and include its settings (otherwise complain)
 #
-
-INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
-
-IF (USE_VTK_FILE)
-  INCLUDE (${USE_VTK_FILE})
-ELSE (USE_VTK_FILE)
-  SET (VTKMY_CAN_BUILD 0)
-ENDIF (USE_VTK_FILE)
+FIND_PACKAGE(VTK REQUIRED)
+INCLUDE(${VTK_USE_FILE})

 #
 # Build shared libs ?
@@ -16,63 +19,45 @@
 # Defaults to the same VTK setting.
 #

-IF (USE_VTK_FILE)
+# Standard CMake option for building libraries shared or static by default.
+OPTION(BUILD_SHARED_LIBS
+       "Build with shared libraries."
+       ${VTK_BUILD_SHARED_LIBS})
+# Copy the CMake option to a setting with VTKMY_ prefix for use in
+# our project.  This name is used in vtkmyConfigure.h.in.
+SET(VTKMY_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})

-  # Standard CMake option for building libraries shared or static by default.
-  OPTION(BUILD_SHARED_LIBS
-         "Build with shared libraries."
-         ${VTK_BUILD_SHARED_LIBS})
-  # Copy the CMake option to a setting with VTKMY_ prefix for use in
-  # our project.  This name is used in vtkmyConfigure.h.in.
-  SET(VTKMY_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
-
-  #
-  # Output path(s)
-  #
-  SET (LIBRARY_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin CACHE PATH
-       "Single output directory for building all libraries.")
-
-  SET (EXECUTABLE_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin CACHE PATH
-       "Single output directory for building all executables.")
-
-  MARK_AS_ADVANCED (
-    LIBRARY_OUTPUT_PATH
-    EXECUTABLE_OUTPUT_PATH
-  )
-
-  # If this is a build tree, provide an option for putting
-  # this project's executables and libraries in with VTK's.
-  IF (EXISTS ${VTK_DIR}/bin)
-    OPTION(USE_VTK_OUTPUT_PATHS
-           "Use VTK's output directory for this project's executables and libraries."
-           OFF)
-    MARK_AS_ADVANCED (USE_VTK_OUTPUT_PATHS)
-    IF (USE_VTK_OUTPUT_PATHS)
-      SET (LIBRARY_OUTPUT_PATH ${VTK_DIR}/bin)
-      SET (EXECUTABLE_OUTPUT_PATH ${VTK_DIR}/bin)
-    ENDIF (USE_VTK_OUTPUT_PATHS)
-  ENDIF (EXISTS ${VTK_DIR}/bin)
-
-ENDIF (USE_VTK_FILE)
+# If this is a build tree, provide an option for putting
+# this project's executables and libraries in with VTK's.
+IF (EXISTS ${VTK_DIR}/bin)
+  OPTION(USE_VTK_OUTPUT_PATHS
+         "Use VTK's output directory for this project's executables and libraries."
+         OFF)
+  MARK_AS_ADVANCED (USE_VTK_OUTPUT_PATHS)
+  IF (USE_VTK_OUTPUT_PATHS)
+    SET (LIBRARY_OUTPUT_PATH ${VTK_DIR}/bin)
+    SET (EXECUTABLE_OUTPUT_PATH ${VTK_DIR}/bin)
+  ENDIF (USE_VTK_OUTPUT_PATHS)
+ENDIF (EXISTS ${VTK_DIR}/bin)

 #
 # Wrap Tcl, Java, Python
 #
-# Rational: even if your VTK was wrapped, it does not mean that you want to
-# wrap your own local classes.
-# Default value is OFF as the VTK cache might have set them to ON but
+# Rational: even if your VTK was wrapped, it does not mean that you want to
+# wrap your own local classes.
+# Default value is OFF as the VTK cache might have set them to ON but
 # the wrappers might not be present (or yet not found).
 #

 #
 # Tcl
-#
+#

 IF (VTK_WRAP_TCL)

-  OPTION(VTKMY_WRAP_TCL
-         "Wrap classes into the TCL interpreted language."
+  OPTION(VTKMY_WRAP_TCL
+         "Wrap classes into the TCL interpreted language."
          ON)

   IF(VTKMY_WRAP_TCL)
@@ -93,12 +78,12 @@

 #
 # Python
-#
+#

 IF (VTK_WRAP_PYTHON)

-  OPTION(VTKMY_WRAP_PYTHON
-         "Wrap classes into the Python interpreted language."
+  OPTION(VTKMY_WRAP_PYTHON
+         "Wrap classes into the Python interpreted language."
          ON)

   IF (VTKMY_WRAP_PYTHON)
@@ -106,9 +91,9 @@
     INCLUDE(${VTK_CMAKE_DIR}/vtkWrapPython.cmake)
     IF (WIN32)
       IF (NOT BUILD_SHARED_LIBS)
-        MESSAGE("Error. Python support requires BUILD_SHARED_LIBS to be ON.")
+        MESSAGE(FATAL_ERROR "Python support requires BUILD_SHARED_LIBS to be ON.")
         SET (VTKMY_CAN_BUILD 0)
-      ENDIF (NOT BUILD_SHARED_LIBS)
+      ENDIF (NOT BUILD_SHARED_LIBS)
     ENDIF (WIN32)
   ENDIF (VTKMY_WRAP_PYTHON)

@@ -125,12 +110,12 @@

 #
 # Java
-#
+#

 IF (VTK_WRAP_JAVA)

-  OPTION(VTKMY_WRAP_JAVA
-         "Wrap classes into the Java interpreted language."
+  OPTION(VTKMY_WRAP_JAVA
+         "Wrap classes into the Java interpreted language."
          ON)

   IF (VTKMY_WRAP_JAVA)
@@ -138,9 +123,9 @@
     INCLUDE(${VTK_CMAKE_DIR}/vtkWrapJava.cmake)
     IF (WIN32)
       IF (NOT BUILD_SHARED_LIBS)
-        MESSAGE("Error. Java support requires BUILD_SHARED_LIBS to be ON.")
+        MESSAGE(FATAL_ERROR "Java support requires BUILD_SHARED_LIBS to be ON.")
         SET (VTKMY_CAN_BUILD 0)
-      ENDIF (NOT BUILD_SHARED_LIBS)
+      ENDIF (NOT BUILD_SHARED_LIBS)
     ENDIF (WIN32)

     # Tell the java wrappers where to go.


MDEV-13656 10.3 does not build on CentOS 5 x86

followup for 62139dc2e27

--- configure.cmake
+++ configure.cmake
@@ -70,7 +70,8 @@
    CMAKE_C_COMPILER_VERSION VERSION_LESS "4.4.0")
   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
-  SET(PLUGIN_QUERY_RESPONSE_TIME NO) # "error: unable to find a register to spill"
+  # query_response_time.cc causes "error: unable to find a register to spill"
+  SET(PLUGIN_QUERY_RESPONSE_TIME NO CACHE BOOL "Disabled, gcc is too old")
 ENDIF()

 IF(WITHOUT_DYNAMIC_PLUGINS)


Working around MSVC 15 CMake bug

Working around MSVC 15 CMake bug

--- math/minuit2/StandAlone.cmake
+++ math/minuit2/StandAlone.cmake
@@ -1,7 +1,11 @@
-cmake_minimum_required(VERSION 3.1...3.11)
-
+cmake_minimum_required(VERSION 3.1)
+
+# Tested with and supporting policies up to the following CMake version.
+# Not using ... syntax due to parser bug in MSVC's built-in CMake server mode.
 if(${CMAKE_VERSION} VERSION_LESS 3.12)
-    cmake_policy(VERSION ${CMAKE_VERSION})
+    cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
+else()
+    cmake_policy(VERSION 3.12)
 endif()

 include(FeatureSummary)


bug #1766 put git branch back to development

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -34,7 +34,7 @@

 IF(NOT DEFINED OpenIGTLink_DIR)

-    SET(revision_tag b1766-Check-recording-and-sending-of-motor-position)
+    SET(revision_tag development)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


COMP: deactivated some tests due to windows problems

--- Modules/ToFHardware/Testing/files.cmake
+++ Modules/ToFHardware/Testing/files.cmake
@@ -20,9 +20,9 @@
   mitkToFImageCsvWriterTest.cpp
   mitkToFImageGrabberTest.cpp
   mitkToFImageRecorderTest.cpp
-  mitkToFImageRecorderFilterTest.cpp
+  #mitkToFImageRecorderFilterTest.cpp
   mitkToFImageWriterTest.cpp
-  mitkToFNrrdImageWriterTest.cpp
+  #mitkToFNrrdImageWriterTest.cpp
   mitkToFOpenCVImageGrabberTest.cpp
   mitkKinectControllerTest.cpp
   mitkKinectDeviceTest.cpp


Use hidden visibility with GCC and Clang

The final result of the build are standalone executables, with all the
code statically linked.

Change the visibility to hidden, to avoid the symbol leakage and allow
the compiler to discard some code.

As a result the binary size is drastically decreased.

Total executable size on my setup drops by ~20%
 158M    before
 128M    after

Note: The binaries still export multiple unneeded symbols. Resolving
those is left as an exercise for later.

Test: full rebuild, running resulting binaries.

Change-Id: Ife10bbd123d59f4480349794785f13978516df30
Signed-off-by: Emil Velikov <f20878473f414da183da19ee25c8722cc1d711e4@collabora.com>

--- framework/delibs/cmake/CFlags.cmake
+++ framework/delibs/cmake/CFlags.cmake
@@ -53,6 +53,11 @@
 	# Turn on -Wstrict-overflow=5 and check all warnings before removing
 	set(CMAKE_C_FLAGS			"${CMAKE_C_FLAGS} -fwrapv")
 	set(CMAKE_CXX_FLAGS			"${CMAKE_CXX_FLAGS} -fwrapv")
+
+	# Force compiler to not export any symbols.
+	# Any static libraries build are linked into the standalone executable binaries.
+	set(CMAKE_C_FLAGS			"${CMAKE_C_FLAGS} -fvisibility=hidden")
+	set(CMAKE_CXX_FLAGS			"${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
 elseif (DE_COMPILER_IS_MSC)
 	# Compiler flags for msc


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -51,7 +51,7 @@
 Comment[es]=Iniciar una charla con cualquiera de sus contactos de MI
 Comment[et]=Vestluse alustamine mõne oma kiirsuhtluskontaktiga
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa
-Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de MI
+Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée
 Comment[ga]=Déan comhrá le teagmháil TM
 Comment[gl]=Inicie unha conversa con calquera dos seus contactos
 Comment[hu]=Csevegjen az azonnali üzenetküldési partnereivel


tidy code

tidy code

--- modules/SetProgramEnv.cmake
+++ modules/SetProgramEnv.cmake
@@ -38,14 +38,12 @@
 	set(oneValueArgs WORKING_DIRECTORY)
 	set(multiValueArgs RUNTIME_DIRS ENVIRONMENT)
 	cmake_parse_arguments(PROGRAM_ENV "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-	if(WIN32)
+	if(MSVC)
 		if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
 			set(comparch "x64")
 		elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
 			set(comparch "x64")
-		endif()
-
-		if(NOT comparch)
+		else()
 			set(comparch "Win32")
 		endif()


Install generated final rom model

Install generated final rom model

Change-Id: I68428cedaf97df31621110a6a7da79c203fe0314

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -1,12 +1,17 @@
 cmake_minimum_required(VERSION 2.8)

 find_package(KtoolRomProcessor REQUIRED)
+
+include (GNUInstallDirs)

 set (KTOOL_ROM_PROCESSOR_CHECK_FORMAT FALSE CACHE BOOL "Check if codding style of generated code is correct")
 mark_as_advanced(KTOOL_ROM_PROCESSOR_CHECK_FORMAT)

-set (KURENTO_MODULES_DIR /usr/share/kurento/modules CACHE STRING "Directory where kurento modules are installed")
+set (KURENTO_MODULES_DIR /usr/share/kurento/modules CACHE STRING "Directory where kurento modules descriptors can be found")
 mark_as_advanced(KURENTO_MODULES_DIR)
+
+set (KURENTO_MODULES_DIR_INSTALL_PREFIX kurento/modules CACHE STRING "Directory where kurento modules descriptors are installed (relative to \${CMAKE_INSTAL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR})")
+mark_as_advanced(KURENTO_MODULES_DIR_INSTALL_PREFIX)

 include (CMakeParseArguments)

@@ -321,7 +326,6 @@
   # Create pkgconfig files
   ###############################################################

-  include (GNUInstallDirs)
   set(prefix ${CMAKE_INSTALL_PREFIX})
   set(exec_prefix "\${prefix}")
   set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
@@ -493,6 +497,23 @@
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CUSTOM_PREFIX}/modules
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CUSTOM_PREFIX}/modules
   )
+
+  execute_process(
+    COMMAND ${KTOOL_ROM_PROCESSOR_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/kmd
+    OUTPUT_VARIABLE PROCESSOR_OUTPUT
+  )
+
+  message (Generating final rom model\n
+    ${PROCESSOR_OUTPUT}
+  )
+
+  file (GLOB_RECURSE FINAL_MODELS ${CMAKE_CURRENT_BINARY_DIR}/kmd/*kmd.json)
+
+  install(FILES
+    ${FINAL_MODELS}
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${KURENTO_MODULES_DIR_INSTALL_PREFIX}
+  )
+

 endfunction()


install gdal via makefile.vc and use windows path in nmake prefix

--- CMake/External_GDAL.cmake
+++ CMake/External_GDAL.cmake
@@ -151,11 +151,12 @@
   ##https://trac.osgeo.org/gdal/ticket/5725
   ##is needed for SQLITE driver
     list(REMOVE_ITEM ${proj}_DEPENDENCIES LIBKML)
-
-    STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
+
+    STRING(REGEX REPLACE "/$" "" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
+    STRING(REGEX REPLACE "/" "\\\\" CMAKE_WIN_INSTALL_PREFIX ${CMAKE_WIN_INSTALL_PREFIX})
     configure_file(${CMAKE_SOURCE_DIR}/patches/${proj}/nmake_gdal_extra.opt.in ${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt)

-    ExternalProject_Add(${proj}_build
+    ExternalProject_Add(${proj}
        PREFIX ${proj}
        URL "http://download.osgeo.org/gdal/1.11.0/gdal-1.11.0.tar.gz"
        URL_MD5 9fdf0f2371a3e9863d83e69951c71ec4
@@ -166,24 +167,10 @@
        PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory  ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR}
        CONFIGURE_COMMAND  ${CMAKE_COMMAND} -E copy  ${CMAKE_SOURCE_DIR}/patches/${proj}/ogrsqlitevirtualogr.cpp
       ${GDAL_SB_BUILD_DIR}/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
-       BUILD_COMMAND nmake /f ${GDAL_SB_BUILD_DIR}/Makefile.vc MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
-       INSTALL_COMMAND ${CMAKE_COMMAND} -E copy  ${CMAKE_SOURCE_DIR}/patches/${proj}/CMakeLists.txt
-      ${CMAKE_BINARY_DIR}/${proj}/_install
+       BUILD_COMMAND nmake /f ${GDAL_SB_BUILD_DIR}/makefile.vc MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
+       INSTALL_COMMAND nmake /f ${GDAL_SB_BUILD_DIR}/makefile.vc devinstall MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
     )

-    ExternalProject_Add(${proj}
-      PREFIX ${proj}/_install
-      DOWNLOAD_COMMAND ""
-      SOURCE_DIR ${proj}/_install
-      BINARY_DIR ${GDAL_SB_BUILD_DIR}
-      INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
-      CMAKE_CACHE_ARGS
-        -DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
-        -DCMAKE_BUILD_TYPE:STRING=Release
-        -DGDAL_BUILD_DIR:STRING=${GDAL_SB_BUILD_DIR}
-      DEPENDS ${proj}_build
-      CMAKE_COMMAND
-    )

   endif()


ENH: try to use a recent zlib

ENH: try to use a recent zlib

--- CMake/External_zlib.cmake
+++ CMake/External_zlib.cmake
@@ -13,6 +13,24 @@

   set(ZLIB_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
   set(ZLIB_SB_SRC ${CMAKE_BINARY_DIR}/${proj}/src/${proj})
+
+  if (TRUE)
+  # Try official release 1.2.8
+  ExternalProject_Add(${proj}
+    PREFIX ${proj}
+    URL "http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.gz"
+    URL_MD5 44d667c142d7cda120332623eab69f40
+    BINARY_DIR ${ZLIB_SB_BUILD_DIR}
+    INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
+    CMAKE_CACHE_ARGS
+      -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
+      -DCMAKE_BUILD_TYPE:STRING=Release
+      #-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+      #-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+      -DBUILD_SHARED_LIBS:BOOL=ON
+    )
+
+  else()

   if(NOT DEFINED git_protocol)
     set(git_protocol "git")
@@ -35,6 +53,8 @@
       #-DZLIB_MANGLE_PREFIX:STRING=otb_zlib_
       -DBUILD_SHARED_LIBS:BOOL=ON
     )
+
+  endif()

 endif()


Fix: Replaced all ${CMAKE_CURRENT_LIST_DIR}/../Dependencies/ relative paths with ${HELPER_DIR}/

--- Dependencies/Helper.cmake
+++ Dependencies/Helper.cmake
@@ -78,9 +78,9 @@
 	elseif (APPLE) # iOS/OSX

 		if (NOT IOS)
-			set(OSX_LAYER ${CMAKE_CURRENT_LIST_DIR}/../Dependencies/osx/Bundle/Frameworks/libGLESv2.dylib
-				${CMAKE_CURRENT_LIST_DIR}/../Dependencies/osx/Bundle/Frameworks/libEGL.dylib
-				${CMAKE_CURRENT_LIST_DIR}/../Dependencies/osx/Bundle/Resources/en.lproj/MainMenu.nib)
+			set(OSX_LAYER ${HELPER_DIR}/osx/Bundle/Frameworks/libGLESv2.dylib
+				${HELPER_DIR}/osx/Bundle/Frameworks/libEGL.dylib
+				${HELPER_DIR}/osx/Bundle/Resources/en.lproj/MainMenu.nib)
 		endif()

 		add_executable (${DEMO_NAME} MACOSX_BUNDLE ${SOURCE_FILES} ${ASSET_TARGETS} ${OSX_LAYER})
@@ -89,18 +89,18 @@
 		set_source_files_properties(${ASSET_TARGETS} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")

 		if (NOT IOS)
-			set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/../Dependencies/osx/Bundle/Resources/en.lproj/MainMenu.nib PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/en.lproj")
+			set_source_files_properties(${HELPER_DIR}/osx/Bundle/Resources/en.lproj/MainMenu.nib PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/en.lproj")

 			# OSX VFrame library
-			if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/../Dependencies/osx/Bundle/Frameworks/libEGL.dylib)
+			if (NOT EXISTS ${HELPER_DIR}/osx/Bundle/Frameworks/libEGL.dylib)
 				message(FATAL_ERROR "Missing PVRVFrame libraries for OS X - place these in Dependencies/osx/Bundle/Frameworks/")
 			endif()
-			set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/../Dependencies/osx/Bundle/Frameworks/libEGL.dylib  PROPERTIES MACOSX_PACKAGE_LOCATION "Frameworks")
+			set_source_files_properties(${HELPER_DIR}/osx/Bundle/Frameworks/libEGL.dylib  PROPERTIES MACOSX_PACKAGE_LOCATION "Frameworks")

-			if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/../Dependencies/osx/Bundle/Frameworks/libGLESv2.dylib)
+			if (NOT EXISTS ${HELPER_DIR}/osx/Bundle/Frameworks/libGLESv2.dylib)
 				message(FATAL_ERROR "Missing PVRVFrame libraries for OS X - place these in Dependencies/osx/Bundle/Frameworks/")
 			endif()
-			set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/../Dependencies/osx/Bundle/Frameworks/libGLESv2.dylib  PROPERTIES MACOSX_PACKAGE_LOCATION "Frameworks")
+			set_source_files_properties(${HELPER_DIR}/osx/Bundle/Frameworks/libGLESv2.dylib  PROPERTIES MACOSX_PACKAGE_LOCATION "Frameworks")
 		endif()

 		target_link_libraries (${DEMO_NAME} ${FRAMEWORK_LINK_LIBS})
@@ -108,9 +108,9 @@
 		set_target_properties(${DEMO_NAME} PROPERTIES COMPILE_FLAGS "-std=c++11")

 		if (IOS)
-			set_target_properties(${DEMO_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/../Dependencies/ios/ios.plist)
+			set_target_properties(${DEMO_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${HELPER_DIR}/ios/ios.plist)
 		else()
-			set_target_properties(${DEMO_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/../Dependencies/osx/osxplist.info)
+			set_target_properties(${DEMO_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${HELPER_DIR}/osx/osxplist.info)
 		endif()
 	else()
 		# Windows/Linux build
@@ -126,6 +126,6 @@
 			DESTINATION Assets)
 	endif()

-	target_include_directories(${DEMO_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../Dependencies/Native_SDK/Framework)
+	target_include_directories(${DEMO_NAME} PRIVATE ${HELPER_DIR}/Native_SDK/Framework)

 endfunction(platform_specific_build_and_install)


Remove comments.

Remove comments.

--- cmake/celix_project/CelixProject.cmake
+++ cmake/celix_project/CelixProject.cmake
@@ -32,11 +32,6 @@
         set(CMAKE_C_FLAGS "-lasan -fsanitize=address -fno-omit-frame-pointer ${CMAKE_C_FLAGS}")
         set(CMAKE_CXX_FLAGS "-lasan -fsanitize=address -fno-omit-frame-pointer ${CMAKE_CXX_FLAGS}")
     endif ()
-
-#    if (ENABLE_TESTING)
-#        set(CMAKE_C_FLAGS "-DCPPUTEST_MEM_LEAK_DETECTION_DISABLED ${CMAKE_C_FLAGS}")
-#        set(CMAKE_CXX_FLAGS "-DCPPUTEST_MEM_LEAK_DETECTION_DISABLED ${CMAKE_CXX_FLAGS}")
-#    endif ()
 endif()

 if (ENABLE_UNDEFINED_SANITIZER)


sundials -> assimp

sundials -> assimp

--- cmake/configure/configure_assimp.cmake
+++ cmake/configure/configure_assimp.cmake
@@ -14,7 +14,7 @@
 ## ---------------------------------------------------------------------

 #
-# Configuration for the sundials library:
+# Configuration for the assimp library:
 #

 CONFIGURE_FEATURE(ASSIMP)


CMake: Stop using LLVM's custom parse_arguments (delete implementation). NFC

Summary:
Finally, delete LLVM's parse_arguments() definition.
Second part of D10531.

This is dependent on http://reviews.llvm.org/D10529

Reviewers: pcc, beanz, chapuni

Subscribers: llvm-commits

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

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

--- cmake/modules/LLVMParseArguments.cmake
+++ cmake/modules/LLVMParseArguments.cmake
@@ -1,80 +0,0 @@
-# Copied from http://www.itk.org/Wiki/CMakeMacroParseArguments under
-# http://creativecommons.org/licenses/by/2.5/.
-#
-# The PARSE_ARGUMENTS macro will take the arguments of another macro and define
-# several variables. The first argument to PARSE_ARGUMENTS is a prefix to put on
-# all variables it creates. The second argument is a list of names, and the
-# third argument is a list of options. Both of these lists should be quoted. The
-# rest of PARSE_ARGUMENTS are arguments from another macro to be parsed.
-#
-# PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...)
-#
-# For each item in options, PARSE_ARGUMENTS will create a variable with that
-# name, prefixed with prefix_. So, for example, if prefix is MY_MACRO and
-# options is OPTION1;OPTION2, then PARSE_ARGUMENTS will create the variables
-# MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These variables will be set to true if
-# the option exists in the command line or false otherwise.
-#
-#For each item in arg_names, PARSE_ARGUMENTS will create a variable with that
-#name, prefixed with prefix_. Each variable will be filled with the arguments
-#that occur after the given arg_name is encountered up to the next arg_name or
-#the end of the arguments. All options are removed from these
-#lists. PARSE_ARGUMENTS also creates a prefix_DEFAULT_ARGS variable containing
-#the list of all arguments up to the first arg_name encountered.
-#
-#Here is a simple, albeit impractical, example of using PARSE_ARGUMENTS that
-#demonstrates its behavior.
-#
-# SET(arguments
-#     hello OPTION3 world
-#     LIST3 foo bar
-#     OPTION2
-#     LIST1 fuz baz
-#     )
-#
-# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments})
-#
-# PARSE_ARGUMENTS creates 7 variables and sets them as follows:
-#   ARG_DEFAULT_ARGS: hello;world
-#   ARG_LIST1: fuz;baz
-#   ARG_LIST2:
-#   ARG_LIST3: foo;bar
-#   ARG_OPTION1: FALSE
-#   ARG_OPTION2: TRUE
-#   ARG_OPTION3: TRUE
-#
-# If you don't have any options, use an empty string in its place.
-#   PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "" ${arguments})
-# Likewise if you have no lists.
-#   PARSE_ARGUMENTS(ARG "" "OPTION1;OPTION2;OPTION3" ${arguments})
-
-MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
-  SET(DEFAULT_ARGS)
-  FOREACH(arg_name ${arg_names})
-    SET(${prefix}_${arg_name})
-  ENDFOREACH(arg_name)
-  FOREACH(option ${option_names})
-    SET(${prefix}_${option} FALSE)
-  ENDFOREACH(option)
-
-  SET(current_arg_name DEFAULT_ARGS)
-  SET(current_arg_list)
-  FOREACH(arg ${ARGN})
-    SET(larg_names ${arg_names})
-    LIST(FIND larg_names "${arg}" is_arg_name)
-    IF (is_arg_name GREATER -1)
-      SET(${prefix}_${current_arg_name} ${current_arg_list})
-      SET(current_arg_name ${arg})
-      SET(current_arg_list)
-    ELSE (is_arg_name GREATER -1)
-      SET(loption_names ${option_names})
-      LIST(FIND loption_names "${arg}" is_option)
-      IF (is_option GREATER -1)
-        SET(${prefix}_${arg} TRUE)
-      ELSE (is_option GREATER -1)
-        SET(current_arg_list ${current_arg_list} ${arg})
-      ENDIF (is_option GREATER -1)
-    ENDIF (is_arg_name GREATER -1)
-  ENDFOREACH(arg)
-  SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO(PARSE_ARGUMENTS)


fixes gh-485 - Missing comma in lenny dependencies.

Corrected syntax error that was causing dpkg -i failures due to an invalid
dependency list.

Signed-off-by: Philip Schwartz <90179e62a462019a8b170b5c04a4f0541ad92702@lexisnexis.com>

--- cmake_modules/dependencies/lenny.cmake
+++ cmake_modules/dependencies/lenny.cmake
@@ -1 +1 @@
-set ( CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-regex1.34.1, libicu38, libxalan110, libxerces-c28, binutils, libldap-2.4-2, openssl, zlib1g, g++, sudo openssh-client, openssh-server")
+set ( CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-regex1.34.1, libicu38, libxalan110, libxerces-c28, binutils, libldap-2.4-2, openssl, zlib1g, g++, sudo, openssh-client, openssh-server, expect")


add $ENV{GOROOT}/bin

add $ENV{GOROOT}/bin

--- cmake/CMakeDetermineGoCompiler.cmake
+++ cmake/CMakeDetermineGoCompiler.cmake
@@ -15,7 +15,7 @@
   set(Go_BIN_PATH
     $ENV{GOPATH}
     $ENV{GOROOT}
-    $ENV{GOROOT}/../bin
+    $ENV{GOROOT}/bin
     $ENV{GO_COMPILER}
     /usr/bin
     /usr/local/bin


Update InstallBasicPackageFiles from YCM

Update InstallBasicPackageFiles from YCM due to the following PR: https://github.com/robotology/ycm/pull/112

Fixes #6

--- cmake/InstallBasicPackageFiles.cmake
+++ cmake/InstallBasicPackageFiles.cmake
@@ -69,10 +69,15 @@
 #
 # is defined, the ``<VARS_PREFIX>_<SUFFIX>`` variable will be defined
 # before configuring the package.  In order to use that variable in the
-# config file, a line ou can access to that variable in the config
-# file by using::
+# config file, you have to add a line::
 #
 #   set_and_check(<VARS_PREFIX>_<SUFFIX> \"@PACKAGE_<VARS_PREFIX>_<SUFFIX>@\")
+#
+# if the path must exist or just::
+#
+#   set(<VARS_PREFIX>_<SUFFIX> \"@PACKAGE_<VARS_PREFIX>_<SUFFIX>@\")
+#
+# if the path could be missing.
 #
 # These variable will have different values whether you are using the
 # package from the build tree or from the install directory.  Also these
@@ -278,7 +283,7 @@

 @PACKAGE_INIT@

-set_and_check(${_IBPF_VARS_PREFIX}_INCLUDEDIR \"@PACKAGE_${_IBPF_VARS_PREFIX}_INCLUDEDIR@\")
+set(${_IBPF_VARS_PREFIX}_INCLUDEDIR \"@PACKAGE_${_IBPF_VARS_PREFIX}_INCLUDEDIR@\")

 if(NOT TARGET ${_target})
   include(\"\${CMAKE_CURRENT_LIST_DIR}/${_targets_filename}\")


[cmake] Require C++17 for ROOT7 features:

As these are still experimental, and expected to go into production only
in a few years, and as this code is meant to survive for many years to come,
require the much more expressive, compact, and simpler to maintain C++17
standard.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -158,8 +158,8 @@
 ROOT_BUILD_OPTION(qt5web OFF "Enable support for Qt5 web-based display (requires Qt5WebEngine)")
 ROOT_BUILD_OPTION(r OFF "Enable support for R bindings (requires R, Rcpp, and RInside)")
 ROOT_BUILD_OPTION(roofit ON "Build the advanced fitting package RooFit, and RooStats for statistical tests. If xml is available, also build HistFactory.")
-ROOT_BUILD_OPTION(webgui ON "Build Web-based UI components of ROOT (requires C++14 standard or higher)")
-ROOT_BUILD_OPTION(root7 ON "Build ROOT 7 components of ROOT (requires C++14 standard or higher)")
+ROOT_BUILD_OPTION(webgui ON "Build Web-based UI components of ROOT (requires C++17 standard or higher)")
+ROOT_BUILD_OPTION(root7 ON "Build ROOT 7 components of ROOT (requires C++17 standard or higher)")
 ROOT_BUILD_OPTION(rpath ON "Link libraries with built-in RPATH (run-time search path)")
 ROOT_BUILD_OPTION(runtime_cxxmodules ON "Enable runtime support for C++ modules")
 ROOT_BUILD_OPTION(shadowpw OFF "Enable support for shadow passwords")
@@ -354,8 +354,8 @@
   endif()
 endforeach()

-#---ROOT 7 requires C++14 standard or higher---------------------------------------------------
-if(NOT CMAKE_CXX_STANDARD GREATER 11)
+#---ROOT 7 requires C++17 standard or higher---------------------------------------------------
+if(NOT CMAKE_CXX_STANDARD GREATER 14)
   set(root7_defvalue OFF)
 endif()

@@ -383,10 +383,10 @@

 if(root7)
   if(NOT CMAKE_CXX_STANDARD)
-    set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++14 standard used with root7")
-    message(STATUS "Enabling C++14 for compilation of root7 components")
-  elseif(NOT CMAKE_CXX_STANDARD GREATER 11)
-    message(FATAL_ERROR ">>> At least C++14 standard required with root7, please enable it using CMake option: -DCMAKE_CXX_STANDARD=14")
+    set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++17 standard used with root7")
+    message(STATUS "Enabling C++17 for compilation of root7 components")
+  elseif(NOT CMAKE_CXX_STANDARD GREATER 14)
+    message(FATAL_ERROR ">>> At least C++17 standard required with root7, please enable it using CMake option: -DCMAKE_CXX_STANDARD=17")
   endif()
 endif()


Fixed CMake formatting for cxxmodules option.

Usually the default value (OFF) is before the text, not afterwards.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -100,7 +100,7 @@
 ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
 ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
 #ROOT_BUILD_OPTION(cxx17 OFF "Build using C++17 compatible mode, requires gcc >= 7.1.0 or clang")
-ROOT_BUILD_OPTION(cxxmodules "Compile with C++ modules enabled." OFF)
+ROOT_BUILD_OPTION(cxxmodules OFF "Compile with C++ modules enabled.")
 ROOT_BUILD_OPTION(davix ON "DavIx library for HTTP/WEBDAV access")
 ROOT_BUILD_OPTION(dcache ON "dCache support, requires libdcap from DESY")
 ROOT_BUILD_OPTION(exceptions ON "Turn on compiler exception handling capability")


Remnoved -all_load from link flags

Remnoved -all_load from link flags

--- cmake/projects/GPUImage/hunter.cmake
+++ cmake/projects/GPUImage/hunter.cmake
@@ -45,6 +45,17 @@
     5eec42672e1c11e5417c4e5833ef6c2889bf4418
 )

+hunter_add_version(
+    PACKAGE_NAME
+    GPUImage
+    VERSION
+    "0.1.6-p4"
+    URL
+    "https://github.com/hunter-packages/GPUImage/archive/v0.1.6-p4.tar.gz"
+    SHA1
+    a03a33c393521c6a8e4bcc06ab0bd17bcf717f11
+)
+
 hunter_cmake_args(
     GPUImage
     CMAKE_ARGS GPUIMAGE_BUILD_EXAMPLES=OFF


qt5utils: fix QT5_CORE_INCLUDE_DIRS becoming empty

Introduced by the cleanup of qt5utils

Change-Id: Idc7d2d77f7f877d4e20649afc78fa64e89fc4769
Reviewed-on: http://gerrit.aldebaran.lan/61012
Tested-by: gerrit
Tested-by: pdaouadi <fc1eb3334d3fdad315bae23aa166bc70bd434067@aldebaran-robotics.com>
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/modules/qt5utils.cmake
+++ cmake/qibuild/modules/qt5utils.cmake
@@ -12,7 +12,21 @@
 function(qt5_flib prefix name)
   # upstream uses Qt5::Core notation but we need to dereference this
   # because we won't be calling find_package() again
+
+  # the first time we call upstream's find_package it defines
+  # a target and set _INCLUDE_DIRS and LIBRARIES variables,
+  # but the second time the target is already defined, and the
+  # var get unset, so store it in cache when they are not
+  # empty
   find_package(${name})
+  if(${name}_INCLUDE_DIRS)
+    qi_persistent_set(${name}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS})
+  endif()
+  if(${name}_LIBRARIES)
+    qi_persistent_set(${name}_LIBRARIES ${${name}_LIBRARIES})
+  endif()
+
+  # now set the varibables with the correct prefix:
   qi_persistent_set(${prefix}_LIBRARIES ${${name}_LIBRARIES})
   qi_persistent_set(${prefix}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS})
   set(_define ${prefix}_LIB)


rust: find cargo with find_program to give a better error message when cargo isn't available

Summary:
If you build Watchman from source on a machine without cargo, the
error message was confusing. You'd see "command not found" somewhere
mixed into ninja's output.

Change RustStaticLibrary, which is only used by Watchman and EdenFS,
to find cargo with find_program instead of guessing its name and
assuming it exists. This gives a much less confusing error message at
CMake configure time.

Reviewed By: genevievehelsel

Differential Revision: D40441374

fbshipit-source-id: eeafe615616775c660c700e14cf1f6b2fd9715a8

--- build/fbcode_builder/CMake/RustStaticLibrary.cmake
+++ build/fbcode_builder/CMake/RustStaticLibrary.cmake
@@ -57,6 +57,8 @@
     "directory = \"${ESCAPED_RUST_VENDORED_CRATES_DIR}\"\n"
   )
 endif()
+
+find_program(CARGO_COMMAND cargo REQUIRED)

 # Cargo is a build system in itself, and thus will try to take advantage of all
 # the cores on the system. Unfortunately, this conflicts with Ninja, since it
@@ -119,11 +121,6 @@
   set(staticlib_name "${CMAKE_STATIC_LIBRARY_PREFIX}${crate_name}${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(rust_staticlib "${CMAKE_CURRENT_BINARY_DIR}/${target_dir}/${staticlib_name}")

-  set(cargo_cmd cargo)
-  if(WIN32)
-    set(cargo_cmd cargo.exe)
-  endif()
-
   if(DEFINED ARG_FEATURES)
     set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name} --features ${ARG_FEATURES})
   else()
@@ -142,7 +139,7 @@
       "${CMAKE_COMMAND}" -E env
       "CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}"
       ${extra_cargo_env}
-      ${cargo_cmd}
+      ${CARGO_COMMAND}
       ${cargo_flags}
     COMMENT "Building Rust crate '${crate_name}'..."
     JOB_POOL rust_job_pool
@@ -195,11 +192,6 @@
     set(features )
   endif()

-  set(cargo_cmd cargo)
-  if(WIN32)
-    set(cargo_cmd cargo.exe)
-  endif()
-
   if(DEFINED ARG_FEATURES)
     set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name} --features ${ARG_FEATURES})
   else()
@@ -219,7 +211,7 @@
       "${CMAKE_COMMAND}" -E env
       "CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}"
       ${extra_cargo_env}
-      ${cargo_cmd}
+      ${CARGO_COMMAND}
       ${cargo_flags}
     COMMENT "Building Rust executable '${crate_name}'..."
     JOB_POOL rust_job_pool


Fix message condition

Fix message condition

--- cmake/modules/hunter_create_dependency_entry.cmake
+++ cmake/modules/hunter_create_dependency_entry.cmake
@@ -32,8 +32,8 @@
   endif()
   set(cache_file "${dep_dir}/cache.sha1")

-  hunter_status_debug("Cache file not found: ${cache_file}")
   if(NOT EXISTS "${cache_file}")
+    hunter_status_debug("Cache file not found: ${cache_file}")
     set("${x_RESULT}" "" PARENT_SCOPE)
     return()
   endif()


After Travis image changes, need to explicitly add pthread lib when using asan

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -277,7 +277,7 @@
         set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
         set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=gold")
         set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold")
-        set (SANITIZE_LIBRARIES "asan")
+        set (SANITIZE_LIBRARIES "asan;pthread")
         # set (SANITIZE_LIBRARIES "asan" "ubsan")
     endif()
     add_definitions ("-D${PROJECT_NAME}_SANITIZE=1")


Allow double unit/perf personality for tests

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -24,6 +24,9 @@
 #   and additional arguments to follow the test executable.
 # * TEST_LABEL sets the LABEL property on each generated test;
 #   ${NAME}_TEST_LABEL specifies an additional label.
+# * UNIT_AND_PERF_TESTS a list with files which should be compiled
+#   also as performance tests. The unit test will be named 'file',
+#   whereas the performance test will be named 'perf_file'.

 if(NOT WIN32) # tests want to be with DLLs on Windows - no rpath
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
@@ -39,11 +42,8 @@

 set(ALL_CPP_TESTS)
 set(ALL_CPP_PERF_TESTS)
-foreach(FILE ${TEST_FILES})
-  string(REGEX REPLACE "\\.(c|cpp)$" "" NAME ${FILE})
-  string(REGEX REPLACE "[./]" "_" NAME ${NAME})
-  source_group(\\ FILES ${FILE})

+macro(common_add_cpp_test NAME FILE)
   set(TEST_NAME ${PROJECT_NAME}_${NAME})
   if(NOT TARGET ${NAME}) # Create target without project prefix if possible
     set(TEST_NAME ${NAME})
@@ -88,6 +88,18 @@
     set_tests_properties(${TEST_NAME} PROPERTIES
       LABELS "${TEST_LABELS}")
   endif()
+endmacro()
+
+foreach(FILE ${TEST_FILES})
+  string(REGEX REPLACE "\\.(c|cpp)$" "" NAME ${FILE})
+  string(REGEX REPLACE "[./]" "_" NAME ${NAME})
+  source_group(\\ FILES ${FILE})
+
+  common_add_cpp_test(${NAME} ${FILE})
+  list(FIND UNIT_AND_PERF_TESTS ${FILE} ADD_PERF_TEST)
+  if(ADD_PERF_TEST GREATER -1)
+    common_add_cpp_test(perf_${NAME} ${FILE})
+  endif()
 endforeach()

 if(TARGET ${PROJECT_NAME}_run_cpp_tests)


DOC: adding header

DOC: adding header

--- Modules/Wrappers/QGIS/otb-module.cmake
+++ Modules/Wrappers/QGIS/otb-module.cmake
@@ -1,3 +1,23 @@
+#
+# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
+#
+# This file is part of Orfeo Toolbox
+#
+#     https://www.orfeo-toolbox.org/
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 set(DOCUMENTATION "Required to generate descriptor files for QGIS processing plugin.")

 otb_module(OTBQgis


move Max related function into Max Implementation folder

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -248,73 +248,6 @@
 	endif()
 endFunction()

-## Function to add the Max/MSP includes ##
-# TODO put this in a module file instead.
-function(addMaxsupport)
-	find_path(JAMOMAMAX_PATH "source/c74support/max-includes/commonsyms.h"
-			  HINTS "${CMAKE_SOURCE_DIR}/../Implementations/Max"
-			  		"${CMAKE_SOURCE_DIR}/Implementations/Max")
-	set(MAXSDK_PATH "${JAMOMAMAX_PATH}/source/c74support/")
-
-	include_directories("${MAXSDK_PATH}/max-includes")
-	include_directories("${MAXSDK_PATH}/msp-includes")
-	include_directories("${MAXSDK_PATH}/jit-includes")
-	include_directories("${JAMOMAMAX_PATH}/library/includes")
-
-	FIND_LIBRARY(MaxAPI_LIB
-				 NAMES MaxAPI
-				 PATHS ${MAXSDK_PATH}/max-includes/)
-	MARK_AS_ADVANCED (MaxAPI_LIB)
-	SET(MaxAPI_LIB ${MaxAPI_LIB})
-
-	if(WIN32)
-		if(CMAKE_BUILD_TYPE STREQUAL "Release")
-			add_definitions(-DMAXAPI_USE_MSCRT)
-		endif()
-		# FIND_LIBRARY(MaxCRT_LIB
-					 # NAMES maxcrt
-					 # PATHS ${MAXSDK_PATH}/max-includes/)
-		# MARK_AS_ADVANCED (MaxCRT_LIB)
-		# SET(MaxCRT_LIB ${MaxCRT_LIB})
-		# FIND_LIBRARY(MaxCRT_P_LIB
-					 # NAMES maxcrt_p
-					 # PATHS ${MAXSDK_PATH}/max-includes/)
-		# MARK_AS_ADVANCED (MaxCRT_P_LIB)
-		# SET(MaxCRT_P_LIB ${MaxCRT_P_LIB})
-	endif()
-
-	FIND_LIBRARY(MaxAudio_LIB
-				 NAMES
-				 	MaxAudio
-				 	MaxAudioAPI
-				 PATHS
-				 	${MAXSDK_PATH}/msp-includes
-				 	${MAXSDK_PATH}/msp-includes/x64
-	)
-	MARK_AS_ADVANCED (MaxAudio_LIB)
-	SET(MaxAudio_LIB ${MaxAudio_LIB})
-
-	FIND_LIBRARY(Jitter_LIB
-				 NAMES
-				 	jitlib
-				 	JitterAPI
-				 PATHS
-				 	${MAXSDK_PATH}/jit-includes
-				 	${MAXSDK_PATH}/jit-includes/x64
-	)
-	MARK_AS_ADVANCED (Jitter_LIB)
-	SET(Jitter_LIB ${Jitter_LIB})
-
-if(NOT WIN32)
-	set(C74_SYM_LINKER_FLAGS " -Wl,-U,_sysmem_newptr,-U,_sysmem_freeptr,-U,_sysmem_resizeptr,-U,_strncpy_zero,-U,_stdinletinfo,-U,_outlet_new,-U,_outlet_anything,-U,_object_getmethod,-U,_object_post,-U,_object_obex_store,-U,_object_obex_dumpout,-U,_object_method,-U,_object_error,-U,_object_alloc,-U,_hashtab_store,-U,_hashtab_new,-U,_hashtab_lookup,-U,_gensym,-U,_error,-U,_common_symbols_gettable,-U,_class_register,-U,_class_new,-U,_class_attr_addattr_parse,-U,_class_addmethod,-U,_class_addattr,-U,_attr_offset_new,-U,_attr_args_process,-U,_attr_args_offset,-U,_atom_setsym,-U,_atom_setlong,-U,_atom_setfloat,-U,_atom_gettype,-U,_atom_getsym,-U,_atom_getlong,-U,_atom_getfloat,-U,_z_dsp_setup,-U,_z_dsp_free,-U,_sys_getsr,-U,_dsp_addv,-U,_class_dspinit,-U,_jit_object_method,-U,_outlet_int,-U,_outlet_list,-U,_class_attr_get,-U,_dsp_add,-U,_fileusage_addfile,-U,_locatefile_extended,-U,_nameinpath,-U,_path_closefolder,-U,_path_foldernextfile,-U,_path_openfolder,-U,_defer_low,-U,_globalsymbol_reference,-U,_globalsymbol_dereference,-U,_bangout,-U,_freeobject,-U,_outlet_bang,-U,_outlet_float,-U,_proxy_getinlet,-U,_proxy_new,-U,_atom_arg_getlong,-U,_atom_arg_getsym,-U,_floatout,-U,_intout,-U,_post,-U,_sys_getblksize,-U,_sysmem_newptrclear,-U,_object_attr_setfloat,-U,_object_attr_setlong,-U,_atom_arg_getfloat,-U,_atom_getfloatarg,-U,_listout,-U,_attr_addfilter_clip,-U,_attr_dictionary_process,-U,_class_attr_addattr_format,-U,_jbox_free,-U,_jbox_get_rect_for_view,-U,_jbox_initclass,-U,_jbox_new,-U,_jbox_ready,-U,_jbox_redraw,-U,_jgraphics_fill,-U,_jgraphics_rectangle_rounded,-U,_jgraphics_set_source_jrgba,-U,_object_attach_byptr,-U,_object_attr_get_rect,-U,_object_attr_set_rect,-U,_object_detach_byptr,-U,_object_dictionaryarg,-U,_object_register,-U,_object_unregister,-U,_patcherview_get_jgraphics,-U,_symbol_unique,-U,_attr_offset_array_new,-U,_defer,-U,_object_free,-U,_object_method_typed,-U,_object_new_typed,-U,_path_copyfile,-U,_path_copyfolder,-U,_path_createfolder,-U,_path_frompathname,-U,_path_nameconform,-U,_clock_delay,-U,_clock_new,-U,_clock_unset,-U,_intin,-U,_addmess,-U,_newobject,-U,_setup,-U,_z_add_signalmethod,-U,_object_attr_setsym,-U,_open_dialog,-U,_path_addnamed,-U,_path_createsysfile,-U,_path_getfilemoddate,-U,_path_opensysfile,-U,_path_topotentialname,-U,_sysfile_close,-U,_sysfile_geteof,-U,_sysfile_read,-U,_sysfile_seteof,-U,_sysfile_write,-U,_systime_secondstodate,-U,_qelem_new,-U,_qelem_free,-U,_qelem_set,-U,_jit_class_addadornment,-U,_jit_class_addattr,-U,_jit_class_addmethod,-U,_jit_class_findbyname,-U,_jit_class_new,-U,_jit_class_register,-U,_jit_error_code,-U,_jit_object_alloc,-U,_jit_object_free,-U,_jit_object_new,-U,_jit_object_new_imp,-U,_max_addmethod_usurp_low,-U,_max_jit_attr_args,-U,_max_jit_classex_mop_wrap,-U,_max_jit_classex_setup,-U,_max_jit_classex_standard_wrap,-U,_max_jit_mop_assist,-U,_max_jit_mop_free,-U,_max_jit_mop_getoutputmode,-U,_max_jit_mop_outputmatrix,-U,_max_jit_mop_setup_simple,-U,_max_jit_obex_adornment_get,-U,_max_jit_obex_free,-U,_max_jit_obex_jitob_get,-U,_max_jit_obex_new,-U,_jbox_get_nextobject,-U,_jbox_get_object,-U,_jbox_get_varname,-U,_jpatcher_get_box,-U,_jpatcher_get_firstobject,-U,_object_attr_getnames,-U,_object_attr_getvalueof,-U,_object_new_imp,-U,_object_obex_lookup,-U,_jit_atom_setfloat,-U,_jit_error_sym,-U,_jit_matrix_info_default,-U,_jit_object_findregistered,-U,_jit_symbol_unique,-U,_max_jit_obex_dumpout,-U,_jit_object_detach,-U,_jit_object_attach,-U,_atom_setobj,-U,_gettime,-U,_critical_enter,-U,_critical_exit,-U,_object_attr_setchar,-U,_object_new,-U,_object_warn,-U,_outlet_atoms,-U,_atom_setparse,-U,_class_findbyname,-U,_maxversion,-U,_newinstance,-U,_object_attr_getobj,-U,_object_attr_getsym,-U,_object_classname,-U,_object_method_long,-U,_object_method_parse,-U,_path_topathname,-U,_qelem_unset,-U,_saveas_promptset,-U,_saveasdialog_extended,-U,_setclock_fdelay,-U,_sysmem_copyptr,-U,_systime_ms,-U,_zgetfn,-U,__jit_sym_char,-U,__jit_sym_getdata,-U,__jit_sym_jit_matrix,-U,__jit_sym_setinfo,-U,_jit_object_register,-U,_jit_object_unregister,-U,_class_dspinitjbox,-U,_jbox_notify,-U,_jgraphics_attr_setrgba,-U,_jgraphics_image_surface_create,-U,_jgraphics_image_surface_draw,-U,_jgraphics_image_surface_set_pixel,-U,_jgraphics_line_to,-U,_jgraphics_move_to,-U,_jgraphics_rectangle_fill_fast,-U,_jgraphics_set_line_width,-U,_jgraphics_stroke,-U,_jgraphics_surface_destroy,-U,_notify_free,-U,_sys_getdspstate,-U,_z_jbox_dsp_free,-U,_z_jbox_dsp_setup,-U,_classname_openhelp,-U,_classname_openrefpage,-U,_jbox_getoutlet,-U,_newobject_sprintf,-U,_object_attr_setvalueof,-U,_object_method_sym,-U,_filewatcher_new,-U,_filewatcher_start,-U,_filewatcher_stop,-U,_atom_alloc,-U,_attribute_new_parse,-U,_class_sticky,-U,_class_sticky_clear,-U,_dictionary_read,-U,_jbox_get_textfield,-U,_jbox_set_mousedragdelta,-U,_jdialog_showtext,-U,_jfont_create,-U,_jfont_destroy,-U,_jgraphics_arc,-U,_jgraphics_close_path,-U,_jgraphics_select_font_face,-U,_jgraphics_set_font_size,-U,_jgraphics_show_text,-U,_jpatcher_get_firstview,-U,_jpopupmenu_additem,-U,_jpopupmenu_addseperator,-U,_jpopupmenu_create,-U,_jpopupmenu_destroy,-U,_jpopupmenu_popup,-U,_jpopupmenu_setfont,-U,_linklist_append,-U,_linklist_clear,-U,_linklist_getindex,-U,_linklist_getsize,-U,_linklist_new,-U,_object_addattr_format,-U,_object_attach_byptr_register,-U,_object_attr_setcolor,-U,_object_attr_setobj,-U,_symobject_new,-U,_textfield_get_textmargins,-U,_textfield_set_editonclick,-U,_textfield_set_noactivate,-U,_textfield_set_readonly,-U,_textfield_set_textcolor,-U,_textfield_set_textmargins,-U,_textfield_set_useellipsis,-U,_textfield_set_wordwrap,-U,_jgraphics_line_draw_fast,-U,_jgraphics_rectangle,-U,_jmouse_setposition_view,-U,_atom_gettext,-U,_jgraphics_oval,-U,_jgraphics_set_source_rgb,-U,_jgraphics_set_source_rgba,-U,_jrgba_set,-U,_jpopupmenu_popup_nearbox,-U,_jtextlayout_create,-U,_jtextlayout_destroy,-U,_jtextlayout_draw,-U,_jtextlayout_set,-U,_jtextlayout_settextcolor,-U,__jit_sym_float32,-U,__jit_sym_getindex,-U,__jit_sym_jit_attr_offset,-U,__jit_sym_jit_mop,-U,__jit_sym_lock,-U,_jit_object_error,-U,__jit_sym_jit_attr_offset_array,-U,__jit_sym_long,-U,__jit_sym_symbol,-U,_table_get,-U,_jbox_get_maxclass,-U,_jpatchline_get_box1,-U,_jpatchline_get_box2,-U,_jpatchline_get_inletnum,-U,_jpatchline_get_outletnum,-U,_cpost,-U,_object_error_obtrusive,-U,_gensym_tr,-U,_str_tr,-U,_jit_object_method_imp,-U,_object_method_imp,-U,_buffer_getchannelcount,-U,_buffer_getframecount,-U,_buffer_locksamples,-U,_buffer_ref_getobject,-U,_buffer_ref_new,-U,_buffer_ref_notify,-U,_buffer_ref_set,-U,_buffer_setdirty,-U,_buffer_unlocksamples,-U,_buffer_view,-U,_dictionary_sprintf,-U,_dictionary_appendatoms,-U,_dictionary_new,-U,_dictionary_appenddictionary,-U,_jpatcher_get_parentpatcher,-U,_atom_getlong" )
-
-	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${C74_SYM_LINKER_FLAGS}" PARENT_SCOPE)
-	set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${C74_SYM_LINKER_FLAGS}" PARENT_SCOPE)
-	set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${C74_SYM_LINKER_FLAGS}" PARENT_SCOPE)
-endif() # Todo : find something equivalent for windows
-endFunction()
-
-
 # This function checks the architectures of a given library on OS X
 function(osx_check_architecture LIBNAME LIBFILE)
 	if(APPLE)


BUG: Full hashtag produced error.

BUG: Full hashtag produced error.

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "0c017455fad4f7e007edc38ee1c16db63b34a347"
+    GIT_TAG "0c017455fa"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Attempt to fix double-linking to SDL.

Attempt to fix double-linking to SDL.

--- build/modules/FindSDL.cmake
+++ build/modules/FindSDL.cmake
@@ -84,7 +84,19 @@
     ELSE(sdl_MINIMUM_VERSION)
       PKG_CHECK_MODULES(sdl sdl)  # will set sdl_FOUND
     ENDIF(sdl_MINIMUM_VERSION)
-
+    MESSAGE(STATUS "SDL LIBRARIES: " ${sdl_LIBRARIES})
+    MESSAGE(STATUS "SDL LDFLAGS: " ${sdl_LDFLAGS})
+    SET(sdl_LIBRARIES "")
+    SET(sdl_LDFLAGS_ORIG ${sdl_LDFLAGS})
+    SET(sdl_LDFLAGS "")
+    FOREACH (LIB ${sdl_LDFLAGS_ORIG})
+      IF(LIB STREQUAL "-lSDL")
+      ELSE()
+        SET(sdl_LDFLAGS ${sdl_LDFLAGS} ${LIB})
+      ENDIF()
+    ENDFOREACH (LIB)
+    MESSAGE(STATUS "SDL LIBRARIES: " ${sdl_LIBRARIES})
+    MESSAGE(STATUS "SDL LDFLAGS: " ${sdl_LDFLAGS})
   ENDIF(NOT PKG_CONFIG_FOUND)
   IF(sdl_FOUND)
   ENDIF()


Added install dir for MSP

Added install dir for MSP

--- cmake/CMakeModules/FindMSP.cmake
+++ cmake/CMakeModules/FindMSP.cmake
@@ -1,6 +1,7 @@
 SET(CMAKE_FIND_FRAMEWORK "LAST")
 FIND_PATH(MSP_INCLUDE_DIRS Mensuration/MensurationService.h
         PATHS
+        /usr/local/msp-1.5/ToolKit/include
         $ENV{MSP_HOME}/include
         ${OSSIM_DEPENDENCIES}/include
 		${OSSIM_INSTALL_PREFIX}/include
@@ -23,137 +24,140 @@

 MESSAGE("MSP_HOME = $ENV{MSP_HOME}")

+find_library(MSP_LIBRARY43 NAMES MSPPointExtractionService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY43})
+
+find_library(MSP_LIBRARY24 NAMES MSPSensorModelService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY24})
+
+find_library(MSP_LIBRARY28 NAMES MSPSourceSelectionService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY28})
+
+find_library(MSP_LIBRARY11 NAMES MSPCovarianceService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY11})
+
+find_library(MSP_LIBRARY34 NAMES MSPSupportDataService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY34})
+
+find_library(MSP_LIBRARY36 NAMES MSPTerrainService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY36})
+
+find_library(MSP_LIBRARY05 NAMES MSPCCSUtils PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY05})
+
+find_library(MSP_LIBRARY09 NAMES MSPCoordinateConversionService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY09})
+
+find_library(MSP_LIBRARY06 NAMES MSPOutputMethodService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY06})
+
+find_library(MSP_LIBRARY03 NAMES MSPasdetre PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY03})
+
+find_library(MSP_LIBRARY07 NAMES MSPcoordconverter PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY07})
+
+find_library(MSP_LIBRARY13 NAMES MSPcsisd PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY13})
+
+find_library(MSP_LIBRARY15 NAMES MSPcsm PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY15})
+
+find_library(MSP_LIBRARY17 NAMES MSPcsmutil PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY17})
+
+find_library(MSP_LIBRARY23 NAMES MSPdtcc PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY23})
+
+find_library(MSP_LIBRARY31 NAMES MSPlas PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY31})
+
+find_library(MSP_LIBRARY25 NAMES MSPgeometry PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY25})
+
+find_library(MSP_LIBRARY33 NAMES MSPmath PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY33})
+
+find_library(MSP_LIBRARY02 NAMES MSPnitf PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY02})
+
+find_library(MSP_LIBRARY04 NAMES MSPntmtre PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY04})
+
+find_library(MSP_LIBRARY12 NAMES MSPrage PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY12})
+
+find_library(MSP_LIBRARY10 NAMES MSPRageServiceUtils PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY10})
+
+find_library(MSP_LIBRARY14 NAMES MSPrageutilities PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY14})
+
+find_library(MSP_LIBRARY30 NAMES MSPSScovmodel PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY30})
+
+find_library(MSP_LIBRARY32 NAMES MSPSSrutil PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY32})
+
+find_library(MSP_LIBRARY38 NAMES MSPutilities PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY38})
+
+find_library(MSP_LIBRARY01 NAMES CSM_PCAPI PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY01})
+
+find_library(MSP_LIBRARY16 NAMES MSPrsme PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY16})
+
+find_library(MSP_LIBRARY18 NAMES MSPRsmGeneratorService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY18})
+
+find_library(MSP_LIBRARY19 NAMES MSPdei PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY19})
+
+find_library(MSP_LIBRARY20 NAMES MSPrsmg PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY20})
+
+find_library(MSP_LIBRARY21 NAMES MSPDEIUtil PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY21})
+
+find_library(MSP_LIBRARY22 NAMES MSPrutil PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY22})
+
+find_library(MSP_LIBRARY26 NAMES MSPSensorSpecificService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY26})
+
+find_library(MSP_LIBRARY27 NAMES MSPImagingGeometryService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY27})
+
+find_library(MSP_LIBRARY29 NAMES MSPjson PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY29})
+
+find_library(MSP_LIBRARY35 NAMES MSPmens PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY35})
+
+find_library(MSP_LIBRARY36 NAMES MSPTerrainService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY36})
+
+find_library(MSP_LIBRARY37 NAMES MSPMensurationService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY37})
+
+find_library(MSP_LIBRARY39 NAMES MSPMensurationSessionRecordService PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY39})
+
+find_library(MSP_LIBRARY40 NAMES MSPwriteRsmNitf PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY40})
+
+find_library(MSP_LIBRARY41 NAMES MSPMSPVersionUtils PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY41})
+
+find_library(MSP_LIBRARY42 NAMES MSPmtdCommon PATHS /usr/local/msp-1.5/ToolKit/lib $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY42})
+
 find_library(MSP_LIBRARY00 NAMES pthread )
 set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY00})

-find_library(MSP_LIBRARY43 NAMES MSPPointExtractionService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY43})
-
-find_library(MSP_LIBRARY24 NAMES MSPSensorModelService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY24})
-
-find_library(MSP_LIBRARY28 NAMES MSPSourceSelectionService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY28})
-
-find_library(MSP_LIBRARY11 NAMES MSPCovarianceService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY11})
-
-find_library(MSP_LIBRARY34 NAMES MSPSupportDataService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY34})
-
-find_library(MSP_LIBRARY36 NAMES MSPTerrainService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY36})
-
-find_library(MSP_LIBRARY09 NAMES MSPCoordinateConversionService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY09})
-
-find_library(MSP_LIBRARY06 NAMES MSPOutputMethodService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY06})
-
-find_library(MSP_LIBRARY05 NAMES MSPCCSUtils PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY05})
-
-find_library(MSP_LIBRARY03 NAMES MSPasdetre PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY03})
-
-find_library(MSP_LIBRARY07 NAMES MSPcoordconverter PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY07})
-
-find_library(MSP_LIBRARY13 NAMES MSPcsisd PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY13})
-
-find_library(MSP_LIBRARY15 NAMES MSPcsm PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY15})
-
-find_library(MSP_LIBRARY17 NAMES MSPcsmutil PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY17})
-
-find_library(MSP_LIBRARY23 NAMES MSPdtcc PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY23})
-
-find_library(MSP_LIBRARY31 NAMES MSPlas PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY31})
-
-find_library(MSP_LIBRARY25 NAMES MSPgeometry PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY25})
-
-find_library(MSP_LIBRARY33 NAMES MSPmath PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY33})
-
-find_library(MSP_LIBRARY02 NAMES MSPnitf PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY02})
-
-find_library(MSP_LIBRARY04 NAMES MSPntmtre PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY04})
-
-find_library(MSP_LIBRARY12 NAMES MSPrage PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY12})
-
-find_library(MSP_LIBRARY10 NAMES MSPRageServiceUtils PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY10})
-
-find_library(MSP_LIBRARY14 NAMES MSPrageutilities PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY14})
-
-find_library(MSP_LIBRARY30 NAMES MSPSScovmodel PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY30})
-
-find_library(MSP_LIBRARY32 NAMES MSPSSrutil PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY32})
-
-find_library(MSP_LIBRARY38 NAMES MSPutilities PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY38})
-
-find_library(MSP_LIBRARY01 NAMES CSM_PCAPI PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY01})
-
-find_library(MSP_LIBRARY16 NAMES MSPrsme PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY16})
-
-find_library(MSP_LIBRARY18 NAMES MSPRsmGeneratorService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY18})
-
-find_library(MSP_LIBRARY19 NAMES MSPdei PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY19})
-
-find_library(MSP_LIBRARY20 NAMES MSPrsmg PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY20})
-
-find_library(MSP_LIBRARY21 NAMES MSPDEIUtil PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY21})
-
-find_library(MSP_LIBRARY22 NAMES MSPrutil PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY22})
-
-find_library(MSP_LIBRARY26 NAMES MSPSensorSpecificService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY26})
-
-find_library(MSP_LIBRARY27 NAMES MSPImagingGeometryService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY27})
-
-find_library(MSP_LIBRARY29 NAMES MSPjson PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY29})
-
-find_library(MSP_LIBRARY35 NAMES MSPmens PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY35})
-
-find_library(MSP_LIBRARY36 NAMES MSPTerrainService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY36})
-
-find_library(MSP_LIBRARY37 NAMES MSPMensurationService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY37})
-
-find_library(MSP_LIBRARY39 NAMES MSPMensurationSessionRecordService PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY39})
-
-find_library(MSP_LIBRARY40 NAMES MSPwriteRsmNitf PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY40})
-
-find_library(MSP_LIBRARY41 NAMES MSPMSPVersionUtils PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY41})
-
-find_library(MSP_LIBRARY42 NAMES MSPmtdCommon PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
-set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY42})
+find_library(MSP_LIBRARYDL NAMES dl  )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARYDL})

 #---


Fix travis

Fix travis

--- cmake/modules/FindLibUnRAR.cmake
+++ cmake/modules/FindLibUnRAR.cmake
@@ -5,7 +5,7 @@
 # LIBUNRAR_INCLUDE_DIR, where to find the headers
 #

-FIND_PATH(LIBUNRAR_INCLUDE_DIR rar.hpp dll.hpp
+FIND_PATH(LIBUNRAR_INCLUDE_DIR dll.hpp
     $ENV{LIBUNRAR_DIR}
     ~/Library/Frameworks/unrar
     /Library/Frameworks/unrar


Allow linking against MKLML (#2902)

Allow linking against MKLML (#2902)

--- cmake/modules/contrib/BLAS.cmake
+++ cmake/modules/contrib/BLAS.cmake
@@ -10,7 +10,7 @@
   if(NOT IS_DIRECTORY ${USE_MKL_PATH})
     set(USE_MKL_PATH /opt/intel/mkl)
   endif()
-  find_library(BLAS_LIBRARY mkl_rt ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64)
+  find_library(BLAS_LIBRARY NAMES mkl_rt mklml_gnu HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64)
   include_directories(${USE_MKL_PATH}/include)
   list(APPEND TVM_RUNTIME_LINKER_LIBS ${BLAS_LIBRARY})
   list(APPEND RUNTIME_SRCS ${CBLAS_CONTRIB_SRC})


Improve support for Qt5

Improve support for Qt5

--- cmake/DevBaseExternal.cmake
+++ cmake/DevBaseExternal.cmake
@@ -454,7 +454,17 @@
         ### # Instruct CMake to run moc automatically when needed.
         ### set(CMAKE_AUTOMOC ON)

-        find_package(Qt5Widgets REQUIRED)
+        list(REMOVE_DUPLICATES DEVBASE_REQUIRED_QT_COMPONENTS)
+        find_package(Qt5 REQUIRED COMPONENTS ${DEVBASE_REQUIRED_QT_COMPONENTS})
+
+        foreach(component ${DEVBASE_REQUIRED_QT_COMPONENTS})
+            if(NOT Qt5${component}_FOUND)
+                message(FATAL_ERROR "Qt5${component} not found")
+            endif()
+            message(STATUS "Found Qt5${component}: ${Qt5${component}_VERSION}")
+            message(STATUS "  includes : ${Qt5${component}_INCLUDE_DIRS}")
+            message(STATUS "  libraries: ${Qt5${component}_LIBRARIES}")
+        endforeach()
     endif()
 endif()

@@ -469,7 +479,7 @@
     list(APPEND DEVBASE_EXTERNAL_LIBRARIES
         ${QWT_LIBRARY}
     )
-    message(STATUS "Found Qwt: ${Boost_INCLUDE_DIRS}")
+    message(STATUS "Found Qwt:")
     message(STATUS "  includes : ${QWT_INCLUDE_DIRS}")
     message(STATUS "  libraries: ${QWT_LIBRARIES}")
 endif()


set numpy version components in modern cmake

--- cmake/Packages/Python.cmake
+++ cmake/Packages/Python.cmake
@@ -15,6 +15,9 @@
       FIND_PACKAGE(Python COMPONENTS Interpreter Development NumPy)
       SET(NUMPY_FOUND "${Python_NumPy_FOUND}")
       SET(NUMPY_INCLUDE_DIR ${Python_NumPy_INCLUDE_DIRS} CACHE STRING "Numpy directory")
+      STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" NUMPY_VERSION_MAJOR "${Python_NumPy_VERSION}")
+      STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" NUMPY_VERSION_MINOR "${Python_NumPy_VERSION}")
+      STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" NUMPY_VERSION_PATCH "${Python_NumPy_VERSION}")
       MESSAGE(STATUS "  * numpy:    version ${Python_NumPy_VERSION}; headers ${NUMPY_INCLUDE_DIR}")
     ENDIF()
     SET(PYTHON_FOUND "${Python_FOUND}")


Updating build tree

Updating build tree


[CMake] Fix install rules for tools included in the framework

The logic for install rules was wrong for tools included in the framework if the framework build is disabled.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@290934 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -141,7 +141,7 @@
     endif()
   endif()

-  if(ARG_GENERATE_INSTALL AND NOT ARG_INCLUDE_IN_FRAMEWORK)
+  if(ARG_GENERATE_INSTALL AND NOT (ARG_INCLUDE_IN_FRAMEWORK AND LLDB_BUILD_FRAMEWORK ))
     install(TARGETS ${name}
           COMPONENT ${name}
           RUNTIME DESTINATION bin)


Use right syntax to pass version script to Solaris' ld.

Patch by Xan Lopez!

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -83,8 +83,13 @@
       DEPENDS ${export_file}
       VERBATIM
       COMMENT "Creating export file for ${target_name}")
-    set_property(TARGET ${target_name} APPEND_STRING PROPERTY
-                 LINK_FLAGS "  -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+    if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+      set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+                   LINK_FLAGS "  -Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+    else()
+      set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+                   LINK_FLAGS "  -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+    endif()
   else()
     set(native_export_file "${target_name}.def")


[CMake] Don't pass all LLVM_COMPILE_FLAGS to the C compiler

GCC (unlike clang!) warns about C++ flags when compiling C.

https://reviews.llvm.org/D67171

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -7,6 +7,8 @@
   if("${sources}" MATCHES "\\.c(;|$)")
     set(update_src_props ON)
   endif()
+
+  list(APPEND LLVM_COMPILE_CFLAGS " ${LLVM_COMPILE_FLAGS}")

   # LLVM_REQUIRES_EH is an internal flag that individual targets can use to
   # force EH
@@ -54,13 +56,18 @@
   #   - LLVM_COMPILE_FLAGS is list.
   #   - PROPERTY COMPILE_FLAGS is string.
   string(REPLACE ";" " " target_compile_flags " ${LLVM_COMPILE_FLAGS}")
+  string(REPLACE ";" " " target_compile_cflags " ${LLVM_COMPILE_CFLAGS}")

   if(update_src_props)
     foreach(fn ${sources})
       get_filename_component(suf ${fn} EXT)
-      if("${suf}" STREQUAL ".cpp" OR "${suf}" STREQUAL ".c")
+      if("${suf}" STREQUAL ".cpp")
         set_property(SOURCE ${fn} APPEND_STRING PROPERTY
           COMPILE_FLAGS "${target_compile_flags}")
+      endif()
+      if("${suf}" STREQUAL ".c")
+        set_property(SOURCE ${fn} APPEND_STRING PROPERTY
+          COMPILE_FLAGS "${target_compile_cflags}")
       endif()
     endforeach()
   else()


cmake: qi_install_header fix: KEEP_RELATIVE_PATHS was no longer working

--- cmake/qibuild/install.cmake
+++ cmake/qibuild/install.cmake
@@ -304,11 +304,17 @@
     set(_should_install TRUE)
   endif()

+  set(_relative_flag "")
+  if(${ARG_KEEP_RELATIVE_PATHS})
+    set(_relative_flag KEEP_RELATIVE_PATHS)
+  endif()
+
   if(_should_install)
     _qi_install_internal(${_headers}
       COMPONENT header
       DESTINATION ${QI_SDK_INCLUDE}
       SUBFOLDER ${ARG_SUBFOLDER}
+      ${_relative_flag}
     )
   endif()
 endfunction()


* Temporary cmake messaging to help diagnose unreproduceable CI error with shader binary path logic on linux

--- cmake/shader_compiler.cmake
+++ cmake/shader_compiler.cmake
@@ -67,6 +67,7 @@
 		endif()
 		# `output_path` is the path to the built shader (i.e glsl (ogl) or spv (vk)).
 		STRING(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/" "" offset_dir ${output_path})
+		message(WARNING "CI HELPER. \n CMAKE_SOURCE_DIR= ${CMAKE_SOURCE_DIR} \n output_path= ${output_path} \n offset_dir= ${offset_dir}")
 		add_text(
 			TARGET ${ADD_SHADER_TARGET}
 			INPUT_DIR ${PROJECT_SOURCE_DIR}


xpSourceListAppend: automatically add .github yml

issue https://github.com/smanders/externpro/issues/341

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1065,7 +1065,12 @@
         source_group(".devcontainer" FILES ${dcFiles})
         list(APPEND masterSrcList ${dcFiles})
       endif()
-      add_custom_target(${custTgt} SOURCES ${miscFiles} ${crFiles} ${dcFiles})
+      if(EXISTS ${_dir}/.github)
+        file(GLOB_RECURSE github_yml "${_dir}/.github/workflows/*.yml")
+        source_group(".github.yml" FILES ${github_yml})
+        list(APPEND masterSrcList ${github_yml})
+      endif()
+      add_custom_target(${custTgt} SOURCES ${miscFiles} ${crFiles} ${dcFiles} ${github_yml})
       set_property(TARGET ${custTgt} PROPERTY FOLDER ${folder})
     endif()
   endif()


CMake: Bugfix: Add -lrt to the link interface in case of bundled boost

--- cmake/configure/configure_boost.cmake
+++ cmake/configure/configure_boost.cmake
@@ -23,6 +23,16 @@

 MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED)
+
+  #
+  # Add rt to the link interface as well, boost/chrono needs it.
+  #
+  FIND_SYSTEM_LIBRARY(rt_LIBRARY NAMES rt)
+  MARK_AS_ADVANCED(rt_LIBRARY)
+  IF(NOT rt_LIBRARY MATCHES "-NOTFOUND")
+    SET(BOOST_LIBRARIES ${rt_LIBRARY})
+  ENDIF()
+
   SET(BOOST_BUNDLED_INCLUDE_DIRS ${BOOST_FOLDER}/include)
 ENDMACRO()


proper fix this time

proper fix this time

--- cmake/install_matching_to_share.cmake
+++ cmake/install_matching_to_share.cmake
@@ -5,15 +5,15 @@

   foreach(file ${globbed})
     get_filename_component(pathonly ${file} PATH)
-    if(NOT LENGTH ${pathonly})
-      install(FILES ${file}
-	DESTINATION share/${CATKIN_CURRENT_STACK}
-	)
-    else()
+    if(${pathonly})
       get_filename_component(package ${pathonly} NAME)
       install(FILES ${file}
 	DESTINATION share/${package}
 	)
+    else()
+      install(FILES ${file}
+	DESTINATION share/${CATKIN_CURRENT_STACK}
+	)
     endif()
   endforeach()
 endfunction()


Remove the source dir from compiler flags on Windows

Remove `-I${CMAKE_SOURCE_DIR}/build/win` from `ROOT_CXX_FLAGS`. To be merged after #9669

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -703,6 +703,11 @@
 #---Compiler flags (because user apps are a bit dependent on them...)----------------------------------------
 string(REGEX REPLACE "(^|[ ]*)-W[^ ]*" "" __cxxflags "${CMAKE_CXX_FLAGS}")
 string(REGEX REPLACE "(^|[ ]*)-W[^ ]*" "" __cflags "${CMAKE_C_FLAGS}")
+
+if(MSVC)
+  string(REPLACE "-I${CMAKE_SOURCE_DIR}/build/win" "" __cxxflags "${__cxxflags}")
+  string(REPLACE "-I${CMAKE_SOURCE_DIR}/build/win" "" __cflags "${__cflags}")
+endif()

 if (cxxmodules)
   # Re-add the -Wno-module-import-in-extern-c which we just filtered out.


qt5-tools: fix bug where QT5_GUI_INCLUDE_DIRS was empty

Change-Id: I9cf06399f1e59bcae1bdc7a97cda4695189e656a
Reviewed-on: http://gerrit.aldebaran.lan/60823
Tested-by: gerrit
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/modules/qt5-tools.cmake
+++ cmake/qibuild/modules/qt5-tools.cmake
@@ -13,7 +13,11 @@
 include("${Qt5Core_DIR}/Qt5CoreMacros.cmake")

 set(_qt5_widggets_dir ${Qt5Core_DIR}/../Qt5Widgets)
-include("${_qt5_widggets_dir}/Qt5WidgetsMacros.cmake" OPTIONAL)
+find_package(Qt5Widgets QUIET NO_DEFAULT_PATH
+  PATHS "${Qt5Core_DIR}/..")
+if(Qt5Widgets_FOUND)
+  include("${Qt5Widgets_DIR}/Qt5WidgetsMacros.cmake")
+endif()

 function(qi_generate_qt_conf)
   # First, find qt and generate qt.conf


Disable two failing tensor_forest tests in windows. (#7121)

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -169,6 +169,8 @@
       # tensor_forest tests (also note that we exclude the hybrid tests for now)
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/kernel_tests/count_extremely_random_stats_op_test.py"  # Results in wrong order.
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/kernel_tests/sample_inputs_op_test.py"  # Results in wrong order.
+      "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/kernel_tests/scatter_add_ndim_op_test.py"  # Bad placement.
+      "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/topn_test.py"  # Results inaccurate
     )
   endif()
   list(REMOVE_ITEM tf_test_src_py ${tf_test_src_py_exclude})


ARROW-18260: [C++][CMake] Add support for x64 for CMAKE_SYSTEM_PROCESSOR (#14598)

vcpkg uses x64:

https://vcpkg.readthedocs.io/en/latest/users/triplets/

> Valid options are x86, x64, arm, arm64 and wasm32.

Authored-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -24,7 +24,7 @@
 message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")

 if(NOT DEFINED ARROW_CPU_FLAG)
-  if(CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64|X86|x86|i[3456]86")
+  if(CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64|X86|x86|i[3456]86|x64")
     set(ARROW_CPU_FLAG "x86")
   elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64")
     set(ARROW_CPU_FLAG "armv8")


Requiring that ExternalScaLAPACK search ensures that both BLAS and LAPACK can be linked before declaring victory

--- external/cmake/ExternalScaLAPACK.cmake
+++ external/cmake/ExternalScaLAPACK.cmake
@@ -22,13 +22,23 @@
       set(CMAKE_REQUIRED_FLAGS "${MPI_C_COMPILE_FLAGS}")
       set(CMAKE_REQUIRED_LINKER_FLAGS "${MPI_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
       set(CMAKE_REQUIRED_INCLUDES ${MPI_C_INCLUDE_PATH})
-      set(CMAKE_REQUIRED_LIBRARIES ${ScaLAPACK} ${MATH_LIBS} ${MPI_C_LIBRARIES})
+      set(CMAKE_REQUIRED_LIBRARIES ${ScaLAPACK} ${MPI_C_LIBRARIES})
+      El_check_function_exists(dtrsm   EL_HAVE_DTRSM)
+      El_check_function_exists(dtrsm_  EL_HAVE_DTRSM_POST)
+      if(EL_HAVE_DTRSM OR EL_HAVE_DTRSM_POST)
+        set(HAVE_BLAS TRUE)
+      endif()
+      El_check_function_exists(dsytrd  EL_HAVE_DSYTRD)
+      El_check_function_exists(dsytrd_ EL_HAVE_DSYTRD_POST)
+      if(EL_HAVE_DSYTRD OR EL_HAVE_DSYTRD_POST)
+        set(HAVE_LAPACK TRUE)
+      endif()
       # NOTE: pdsyngst was chosen because MKL ScaLAPACK only defines pdsyngst_,
       #       but not pdsyngst, despite defining both pdpotrf and pdpotrf_.
       El_check_function_exists(pdsyngst  EL_HAVE_PDSYNGST)
       El_check_function_exists(pdsyngst_ EL_HAVE_PDSYNGST_POST)
       El_check_function_exists(Csys2blacs_handle EL_HAVE_CSYS2BLACS)
-      if(EL_HAVE_PDSYNGST)
+      if(EL_HAVE_PDSYNGST AND HAVE_BLAS AND HAVE_LAPACK)
         El_check_function_exists(pdlaqr0 EL_HAVE_PDLAQR0)
         El_check_function_exists(pdlaqr1 EL_HAVE_PDLAQR1)
         if(NOT EL_HAVE_PDLAQR0 OR NOT EL_HAVE_PDLAQR1 OR
@@ -38,7 +48,7 @@
           set(USE_FOUND_SCALAPACK TRUE)
           set(EL_HAVE_SCALAPACK_SUFFIX FALSE)
         endif()
-      elseif(EL_HAVE_PDSYNGST_POST)
+      elseif(EL_HAVE_PDSYNGST_POST AND HAVE_BLAS AND HAVE_LAPACK)
         El_check_function_exists(pdlaqr0_ EL_HAVE_PDLAQR0_POST)
         El_check_function_exists(pdlaqr1_ EL_HAVE_PDLAQR1_POST)
         if(NOT EL_HAVE_PDLAQR0_POST OR NOT EL_HAVE_PDLAQR1_POST OR


Upgrade to latest pybind11

Upgrade to latest pybind11

--- external/upstream/fetch_pybind11.cmake
+++ external/upstream/fetch_pybind11.cmake
@@ -1,13 +1,14 @@
-# FIXME Remove when we finally become Python 3 only
-set(PYBIND11_PYTHON_VERSION 2.7)
+set(PYBIND11_PYTHON_VERSION 3.6)

 if(MSVC)
-  set(PYBIND11_CPP_STANDARD "/std:c++${CMAKE_CXX_STANDARD}")
+  set(PYBIND11_CPP_STANDARD "/std:c++14")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /MP /bigobj")
+  set(CMAKE_EXE_LINKER_FLAGS /MANIFEST:NO)
 else()
   set(PYBIND11_CPP_STANDARD "-std=c++${CMAKE_CXX_STANDARD}")
 endif()

-set(PYBIND11_VERSION 2.3.0)
+set(PYBIND11_VERSION 2.5.0)

 find_package(pybind11 ${PYBIND11_VERSION} CONFIG QUIET)
 if(pybind11_FOUND)
@@ -16,19 +17,25 @@
   message(STATUS "Suitable pybind11 could not be located. Fetching and building!")
   include(FetchContent)

-  FetchContent_Populate(pybind11_sources
+  FetchContent_Declare(pybind11_sources
     QUIET
     URL
       https://github.com/pybind/pybind11/archive/v${PYBIND11_VERSION}.tar.gz
     )

+  FetchContent_GetProperties(pybind11_sources)
+
   set(PYBIND11_PYTHON_VERSION ${PYBIND11_PYTHON_VERSION})
   set(PYBIND11_TEST OFF CACHE BOOL "")
   set(PYMOD_INSTALL_FULLDIR ${PYMOD_INSTALL_FULLDIR})

-  add_subdirectory(
-    ${pybind11_sources_SOURCE_DIR}
-    ${pybind11_sources_BINARY_DIR}
-    )
+  if(NOT pybind11_sources_POPULATED)
+    FetchContent_Populate(pybind11_sources)
+
+    add_subdirectory(
+      ${pybind11_sources_SOURCE_DIR}
+      ${pybind11_sources_BINARY_DIR}
+      )
+  endif()
 endif()


boards: qemu_cortex_a53: enable icount mode

Enable icount mode for qemu_cortex_a53 platform, The icount shift
value is selectd based on cpu clock frequency of this platform.
The virtual cpu will execute one instruction every 2^shift ns of
virtual time.

Signed-off-by: Wentong Wu <a92ffab6ab5ff780cf36418e13a69a97399df0f5@intel.com>

--- boards/arm/qemu_cortex_a53/board.cmake
+++ boards/arm/qemu_cortex_a53/board.cmake
@@ -11,4 +11,7 @@
   -machine virt
   )

+if(CONFIG_QEMU_ICOUNT)
+  list(APPEND QEMU_EXTRA_FLAGS -icount shift=4,align=off,sleep=off -rtc clock=vm)
+endif()
 board_set_debugger_ifnset(qemu)


Bump GAPID version to v0.9.1

Bump GAPID version to v0.9.1

--- version.cmake
+++ version.cmake
@@ -16,7 +16,7 @@
 # Increment these numbers immediately after releasing a new version.
 set(GAPID_VERSION_MAJOR 0)
 set(GAPID_VERSION_MINOR 9)
-set(GAPID_VERSION_POINT 0)
+set(GAPID_VERSION_POINT 1)

 if (NOT DEFINED GAPID_BUILD_NUMBER)
     set(GAPID_BUILD_NUMBER 0)


Bump GAPID version to v0.9.4

Bump GAPID version to v0.9.4

--- version.cmake
+++ version.cmake
@@ -16,7 +16,7 @@
 # Increment these numbers immediately after releasing a new version.
 set(GAPID_VERSION_MAJOR 0)
 set(GAPID_VERSION_MINOR 9)
-set(GAPID_VERSION_POINT 3)
+set(GAPID_VERSION_POINT 4)

 if (NOT DEFINED GAPID_BUILD_NUMBER)
     set(GAPID_BUILD_NUMBER 0)


Update pybind dependency to v2.2.4

Update pybind dependency to v2.2.4

--- chainerx_cc/third_party/pybind11.cmake
+++ chainerx_cc/third_party/pybind11.cmake
@@ -4,7 +4,7 @@
 include(ExternalProject)
 ExternalProject_Add(pybind11
     GIT_REPOSITORY    https://github.com/pybind/pybind11.git
-    GIT_TAG           5ef1af138dc3ef94c05274ae554e70d64cd589bf # 2.2.3 + #1371 merged
+    GIT_TAG           v2.2.4
     SOURCE_DIR        "${CMAKE_BINARY_DIR}/pybind11"
     BINARY_DIR        ""
     CONFIGURE_COMMAND ""


Split off 8.2.42

Split off 8.2.42

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

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


[jancy] release 1.8.0

[jancy] release 1.8.0

--- version.cmake
+++ version.cmake
@@ -10,8 +10,8 @@
 #...............................................................................

 set (JANCY_VERSION_MAJOR     1)
-set (JANCY_VERSION_MINOR     7)
-set (JANCY_VERSION_REVISION  1)
+set (JANCY_VERSION_MINOR     8)
+set (JANCY_VERSION_REVISION  0)
 set (JANCY_VERSION_TAG)

 set (JANCY_VERSION_FILE_SUFFIX "${JANCY_VERSION_MAJOR}.${JANCY_VERSION_MINOR}.${JANCY_VERSION_REVISION}")


libfnord -> libstx

libfnord -> libstx

--- src/stx/protobuf/FindProtobuf.cmake
+++ src/stx/protobuf/FindProtobuf.cmake
@@ -80,7 +80,7 @@
       OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WEPREFIX}.pb.cc"
              "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WEPREFIX}.pb.h"
       COMMAND  ${PROTOBUF_PROTOC_EXECUTABLE}
-      ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_SOURCE_DIR} --proto_path ${PROTOBUF_INCLUDE_DIR} --proto_path ${FNORD_SOURCE_DIR}/fnord ${PROTOC_ARGS} ${ABS_FIL}
+      ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_SOURCE_DIR} --proto_path ${PROTOBUF_INCLUDE_DIR} --proto_path ${FNORD_SOURCE_DIR}/stx ${PROTOC_ARGS} ${ABS_FIL}
       DEPENDS ${ABS_FIL}
       COMMENT "Running C++ protocol buffer compiler on ${FIL}"
       VERBATIM )


Identify

Identify

--- modules/SetProgramEnv.cmake
+++ modules/SetProgramEnv.cmake
@@ -34,7 +34,7 @@
 set(SET_PROGRAM_ENV_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
 function(set_program_env)
 	set(options "")
-  	set(oneValueArgs WORKING_DIRECTORY)
+	set(oneValueArgs WORKING_DIRECTORY)
 	set(multiValueArgs RUNTIME_DIRS ENVIRONMENT)
 	cmake_parse_arguments(PROGRAM_ENV "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 	if(WIN32)
@@ -45,7 +45,7 @@
 				"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.vcxproj.user"
 				"${PROGRAM_ENV_RUNTIME_DIRS}"
 				WORKING_DIRECTORY ${SET_PROGRAM_ENV_CMAKE_DIR})
-		 ENDIF()
+		ENDIF()
 	endif()
 endfunction()


fbcode_builder: fix a minor bug in THRIFT_INCLUDE_DIR argument parsing

Summary:
Fix a minor bug in the argument parsing for `add_fbthrift_cpp_library()`:
only a single value should be supplied for the `THRIFT_INCLUDE_DIR` argument.
This parameter should not accept a list of arguments.

Reviewed By: strager

Differential Revision: D17125810

fbshipit-source-id: 31f354e4d6299d3626a94f3b4b5ff8c58bb0cf7b

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -22,8 +22,8 @@
 #   desired.
 function(add_fbthrift_cpp_library LIB_NAME THRIFT_FILE)
   # Parse the arguments
-  set(one_value_args INCLUDE_DIR)
-  set(multi_value_args SERVICES DEPENDS OPTIONS THRIFT_INCLUDE_DIR)
+  set(one_value_args INCLUDE_DIR THRIFT_INCLUDE_DIR)
+  set(multi_value_args SERVICES DEPENDS OPTIONS)
   fb_cmake_parse_args(
     ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
   )


[Build] Added the macro for Readline dependency.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -252,6 +252,10 @@
       get_boost (${_arg_version})
     endif (${_arg_lower} STREQUAL "boost")

+    if (${_arg_lower} STREQUAL "readline")
+      get_readline (${_arg_version})
+    endif (${_arg_lower} STREQUAL "readline")
+
     if (${_arg_lower} STREQUAL "mysql")
       get_mysql (${_arg_version})
     endif (${_arg_lower} STREQUAL "mysql")
@@ -333,6 +337,33 @@
   endif (Boost_FOUND)

 endmacro (get_boost)
+
+# ~~~~~~~~~~ Readline ~~~~~~~~~
+macro (get_readline)
+  set (_required_version 0)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires Readline-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires Readline without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  set (READLINE_FOUND False)
+
+  find_package (Readline)
+  if (READLINE_LIBRARY)
+    set (READLINE_FOUND True)
+  endif (READLINE_LIBRARY)
+
+  if (READLINE_FOUND)
+    # Update the list of include directories for the project
+    include_directories (${READLINE_INCLUDE_DIR})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${READLINE_LIBRARY})
+  endif (READLINE_FOUND)
+
+endmacro (get_readline)

 # ~~~~~~~~~~ MySQL ~~~~~~~~~
 macro (get_mysql)
@@ -829,7 +860,7 @@

   # Register the (CMake) target for the executable, and specify the name
   # of that latter
-  add_executable (${_exec_name}bin ${_exec_source_dir}/${MODULE_NAME}.cpp)
+  add_executable (${_exec_name}bin ${_exec_source_dir}/${_exec_name}.cpp)
   set_target_properties (${_exec_name}bin PROPERTIES OUTPUT_NAME ${_exec_name})

   # Register the dependencies on which the binary depends upon
@@ -848,7 +879,7 @@

   # Register, for reporting purpose, the list of executables to be built
   # and installed for that module
-  list (APPEND ${MODULE_NAME}_ALL_EXECS ${PROJ_ALL_BIN_TARGETS})
+  list (APPEND ${MODULE_NAME}_ALL_EXECS ${_exec_name})
   set (${MODULE_NAME}_ALL_EXECS ${${MODULE_NAME}_ALL_EXECS} PARENT_SCOPE)

 endmacro (module_binary_add)
@@ -1026,6 +1057,17 @@
     message (STATUS "  - Boost required libraries ... : ${BOOST_REQUIRED_LIBS}")
   endif (Boost_FOUND)
 endmacro (display_boost)
+
+# Readline
+macro (display_readline)
+  if (READLINE_FOUND)
+    message (STATUS)
+    message (STATUS "* Readline:")
+    message (STATUS "  - READLINE_VERSION ........... : ${READLINE_VERSION}")
+    message (STATUS "  - READLINE_INCLUDE_DIR ....... : ${READLINE_INCLUDE_DIR}")
+    message (STATUS "  - READLINE_LIBRARY ........... : ${READLINE_LIBRARY}")
+  endif (READLINE_FOUND)
+endmacro (display_readline)

 # MySQL
 macro (display_mysql)
@@ -1136,6 +1178,7 @@
   message (STATUS "---------------------------------")
   #
   display_boost ()
+  display_readline ()
   display_mysql ()
   display_soci ()
   display_stdair ()


CMake on OS X - symlink the frameworks into each .app to make them pseudo-local (real apps would copy)

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -130,9 +130,25 @@
     set_property(TARGET ${SAMPLENAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
   endif ()

-  # On OS X, create .app bundle
   if (APPLE)
+    # On OS X, create .app bundle
     set_property(TARGET ${SAMPLENAME} PROPERTY MACOSX_BUNDLE TRUE)
+    # also, symlink frameworks so .app is standalone
+    # NOTE: $(CONFIGURATION) is not resolvable at CMake run time, it's only
+    # valid at build time (hence parenthesis rather than braces)
+    set (OGRE_SAMPLE_CONTENTS_PATH
+      ${CMAKE_BINARY_DIR}/bin/$(CONFIGURATION)/${SAMPLENAME}.app/Contents)
+    add_custom_command(TARGET ${SAMPLENAME} POST_BUILD
+      COMMAND mkdir ARGS -p ${OGRE_SAMPLE_CONTENTS_PATH}/Frameworks
+      COMMAND ln ARGS -s -f ${CMAKE_BINARY_DIR}/lib/$(CONFIGURATION)/Ogre.framework
+        ${OGRE_SAMPLE_CONTENTS_PATH}/Frameworks/
+      COMMAND ln ARGS -s -f ${CMAKE_SOURCE_DIR}/Dependencies/Cg.framework
+        ${OGRE_SAMPLE_CONTENTS_PATH}/Frameworks/
+      COMMAND ln ARGS -s -f ${CMAKE_SOURCE_DIR}/Dependencies/CEGUI.framework
+        ${OGRE_SAMPLE_CONTENTS_PATH}/Frameworks/
+    )
+
+
   endif ()

   if (OGRE_INSTALL_SAMPLES)


Update lightning mdb

Update lightning mdb

--- lmdb.cmake
+++ lmdb.cmake
@@ -12,14 +12,6 @@
 include (BuildSupport)
 include (PatchSupport)

-include (boost)
-include (cppunit)
-include (zlib)
-include (openexr)
-include (tbb)
-include (doxygen)
-include (glfw)
-
 external_source (lmdb
     0.9.8
     lmdb-0.9.8.tar.gz
@@ -27,18 +19,18 @@

 message ("Installing ${lmdb_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${lmdb_NAME}
-    DEPENDS
     PREFIX              ${BUILDEM_DIR}
     URL                 ${lmdb_URL}
     URL_MD5             ${lmdb_MD5}
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ""
+    BUILD_IN_SOURCE     1
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     TEST_COMMAND        ${BUILDEM_ENV_STRING} make test
-    INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install BUILDEM_DIR=$BUILDEM_DIR
+    INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install BUILDEM_DIR=${BUILDEM_DIR}
 )

 set_target_properties(${lmdb_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)

-endif (NOT openvdb_NAME)+endif (NOT lmdb_NAME)


Fix a typo for building linAfterImage (CMake)

--- graf2d/asimage/BuildAfterImage.cmake
+++ graf2d/asimage/BuildAfterImage.cmake
@@ -68,7 +68,7 @@
     set(JPEGINCLUDE "--with-jpeg-includes=${JPEG_INCLUDE_DIR}")
   endif()
   if(PNG_FOUND)
-    set(PNGINCLUDE  "--with-png-includes=${PNG_INCLUDE_DIR}")
+    set(PNGINCLUDE  "--with-png-includes=${PNG_PNG_INCLUDE_DIR}")
   endif()
   if(cocoa)
     set(JPEGINCLUDE --without-x --with-builtin-jpeg)


Strip unused references from binaries.

Strip unused references from binaries.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -54,8 +54,8 @@
 	if (MSVC_VERSION GREATER_EQUAL 1910)
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /permissive-")
 	endif ()
-	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /sdl /Oi /Ot /Oy /Ob2 /Zi")
-	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /sdl /Oi /Ot /Oy /Ob2 /Zi")
+	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /sdl /Oi /Ot /Oy /Ob2 /Zi /OPT:REF")
+	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /sdl /Oi /Ot /Oy /Ob2 /Zi /OPT:REF")
 	#set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")

 	if(DEV_BUILD EQUAL 0)


add include path to generated config.h

add include path to generated config.h

--- cmake/InstallThrift.cmake
+++ cmake/InstallThrift.cmake
@@ -1,7 +1,7 @@
 ExternalProject_Add(thrift
     URL                 http://www-us.apache.org/dist/thrift/${THRIFT_VERSION_STRING}/thrift-0.10.0.tar.gz
     URL_MD5             ${THRIFT_URL_MD5}
-    CONFIGURE_COMMAND   CPPFLAGS=-I<BINARY_DIR>/lib/cpp/src <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --with-openssl=${OPENSSL_ROOT_DIR} --with-boost=${BOOST_ROOT} --without-c_glib --without-csharp --without-python --without-java --without-nodejs --without-lua --without-ruby --without-php --without-erlang --without-go --without-nodejs --without-qt4 --without-qt5
+    CONFIGURE_COMMAND   CMAKE_INCLUDE_PATH=<BINARY_DIR>/lib/cpp/src <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --with-openssl=${OPENSSL_ROOT_DIR} --with-boost=${BOOST_ROOT} --without-c_glib --without-csharp --without-python --without-java --without-nodejs --without-lua --without-ruby --without-php --without-erlang --without-go --without-nodejs --without-qt4 --without-qt5 --disable-plugin
     BUILD_COMMAND       make
     INSTALL_COMMAND     make install
 )


fix: set sign identity to fix iOS on XCode 11

--- cmake/Toolchain-iOS.cmake
+++ cmake/Toolchain-iOS.cmake
@@ -11,6 +11,7 @@

 set(CMAKE_MACOSX_BUNDLE YES)
 set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
 set(CMAKE_OSX_SYSROOT iphoneos CACHE STRING "")
 set(CMAKE_OSX_ARCHITECTURES arm64 CACHE STRING "")
 set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET 11.0)