Eliminate redundancy between locating and configuring build tools

--- toolchain.cmake
+++ toolchain.cmake
@@ -20,27 +20,17 @@
 set( CMAKE_SYSTEM_PROCESSOR "Parallax-P8X32A" )

 # locate build tools
-find_program( PARALLAX_P8X32A_C_COMPILER   propeller-elf-gcc )
-find_program( PARALLAX_P8X32A_CXX_COMPILER propeller-elf-g++ )
-find_program( PARALLAX_P8X32A_LINKER       propeller-elf-ld )
-find_program( PARALLAX_P8X32A_NM           propeller-elf-nm )
-find_program( PARALLAX_P8X32A_OBJCOPY      propeller-elf-objcopy )
-find_program( PARALLAX_P8X32A_OBJDUMP      propeller-elf-objdump )
-find_program( PARALLAX_P8X32A_RANLIB       propeller-elf-ranlib )
-find_program( PARALLAX_P8X32A_STRIP        propeller-elf-strip )
+find_program( CMAKE_C_COMPILER   propeller-elf-gcc )
+find_program( CMAKE_CXX_COMPILER propeller-elf-g++ )
+find_program( CMAKE_LINKER       propeller-elf-ld )
+find_program( CMAKE_NM           propeller-elf-nm )
+find_program( CMAKE_OBJCOPY      propeller-elf-objcopy )
+find_program( CMAKE_OBJDUMP      propeller-elf-objdump )
+find_program( CMAKE_RANLIB       propeller-elf-ranlib )
+find_program( CMAKE_STRIP        propeller-elf-strip )

 # locate load tools
-find_program( PARALLAX_P8X32A_LOADER       propeller-load )
-
-# configure CMake tools
-set( CMAKE_C_COMPILER   ${PARALLAX_P8X32A_C_COMPILER} )
-set( CMAKE_CXX_COMPILER ${PARALLAX_P8X32A_CXX_COMPILER} )
-set( CMAKE_LINKER       ${PARALLAX_P8X32A_LINKER} )
-set( CMAKE_NM           ${PARALLAX_P8X32A_NM} )
-set( CMAKE_OBJCOPY      ${PARALLAX_P8X32A_OBJCOPY} )
-set( CMAKE_OBJDUMP      ${PARALLAX_P8X32A_OBJDUMP} )
-set( CMAKE_RANLIB       ${PARALLAX_P8X32A_RANLIB} )
-set( CMAKE_STRIP        ${PARALLAX_P8X32A_STRIP} )
+find_program( PARALLAX_P8X32A_LOADER propeller-load )

 # configure the Parallax P8X32A memory model
 set(


ENH: allow extra options for GDAL configure

--- CMake/External_GDAL.cmake
+++ CMake/External_GDAL.cmake
@@ -116,6 +116,9 @@
   endif()

   if(UNIX)
+    set(GDAL_SB_EXTRA_OPTIONS "" CACHE STRING "Extra options to be passed to GDAL configure script")
+    mark_as_advanced(GDAL_SB_EXTRA_OPTIONS)
+
     ExternalProject_Add(${proj}
       PREFIX ${proj}
       URL "http://download.osgeo.org/gdal/1.11.0/gdal-1.11.0.tar.gz"
@@ -143,6 +146,7 @@
         ${GDAL_SB_EXPAT_CONFIG}
         ${GDAL_SB_LIBKML_CONFIG}
         ${GDAL_SB_JPEG_CONFIG}
+        ${GDAL_SB_EXTRA_OPTIONS}
       BUILD_COMMAND $(MAKE)
       INSTALL_COMMAND $(MAKE) install
     )


Temporarily disable installation of R

Temporarily disable installation of R

Temporarily disable the installation of R library waiting we make sure
there are no licensing issues.

Forcing the user to explicitly install their own R version is definitely allowed under the LGPL.

--- CMake/VisomicsCPack.cmake
+++ CMake/VisomicsCPack.cmake
@@ -33,31 +33,31 @@
 # Install R
 # -------------------------------------------------------------------------

-IF(R_LIBRARY_DIR)
-  #message(STATUS "R_LIBRARY_DIR:${R_LIBRARY_DIR}")
-  IF(APPLE OR UNIX)
-    SET(files)
-    FIND_LIBRARY(R_LIBRARY_BASE R HINTS ${R_LIBRARY_DIR} NO_DEFAULT_PATH)
-    IF(R_LIBRARY_BASE)
-      #message(STATUS "R_LIBRARY_BASE:${R_LIBRARY_BASE}")
-      LIST(APPEND files ${R_LIBRARY_BASE})
-    ENDIF()
-    FIND_LIBRARY(R_LIBRARY_BLAS Rblas HINTS ${R_LIBRARY_DIR} NO_DEFAULT_PATH)
-    IF(R_LIBRARY_BLAS)
-      #message(STATUS "R_LIBRARY_BLAS:${R_LIBRARY_BLAS}")
-      LIST(APPEND files ${R_LIBRARY_BLAS})
-    ENDIF()
-    FIND_LIBRARY(R_LIBRARY_LAPACK Rlapack HINTS ${R_LIBRARY_DIR} NO_DEFAULT_PATH)
-    IF(R_LIBRARY_LAPACK)
-      #message(STATUS "R_LIBRARY_LAPACK:${R_LIBRARY_LAPACK}")
-      LIST(APPEND files ${R_LIBRARY_LAPACK})
-    ENDIF()
-    INSTALL(FILES ${files}
-	    DESTINATION ${Visomics_INSTALL_LIB_DIR} COMPONENT Runtime)
-  ELSEIF(WIN32)
-    #TODO
-  ENDIF()
-ENDIF()
+#IF(R_LIBRARY_DIR)
+#  #message(STATUS "R_LIBRARY_DIR:${R_LIBRARY_DIR}")
+#  IF(APPLE OR UNIX)
+#    SET(files)
+#    FIND_LIBRARY(R_LIBRARY_BASE R HINTS ${R_LIBRARY_DIR} NO_DEFAULT_PATH)
+#    IF(R_LIBRARY_BASE)
+#      #message(STATUS "R_LIBRARY_BASE:${R_LIBRARY_BASE}")
+#      LIST(APPEND files ${R_LIBRARY_BASE})
+#    ENDIF()
+#    FIND_LIBRARY(R_LIBRARY_BLAS Rblas HINTS ${R_LIBRARY_DIR} NO_DEFAULT_PATH)
+#    IF(R_LIBRARY_BLAS)
+#      #message(STATUS "R_LIBRARY_BLAS:${R_LIBRARY_BLAS}")
+#      LIST(APPEND files ${R_LIBRARY_BLAS})
+#    ENDIF()
+#    FIND_LIBRARY(R_LIBRARY_LAPACK Rlapack HINTS ${R_LIBRARY_DIR} NO_DEFAULT_PATH)
+#    IF(R_LIBRARY_LAPACK)
+#      #message(STATUS "R_LIBRARY_LAPACK:${R_LIBRARY_LAPACK}")
+#      LIST(APPEND files ${R_LIBRARY_LAPACK})
+#    ENDIF()
+#    INSTALL(FILES ${files}
+#	    DESTINATION ${Visomics_INSTALL_LIB_DIR} COMPONENT Runtime)
+#  ELSEIF(WIN32)
+#    #TODO
+#  ENDIF()
+#ENDIF()

 # -------------------------------------------------------------------------
 # Build a CPack installer


Fixed syntax error.

Fixed syntax error.

--- CMakeExternals/MITK.cmake
+++ CMakeExternals/MITK.cmake
@@ -219,16 +219,22 @@

   find_package(MITK REQUIRED)

-  if(my_itk_dir AND NOT my_itk_dir STREQUAL ${ITK_DIR})
-    message(FATAL_ERROR "ITK packages do not match:\n   ${MY_PROJECT_NAME}: ${my_itk_dir}\n  MITK: ${ITK_DIR}")
-  endif()
-
-  if(my_vtk_dir AND NOT my_vtk_dir STREQUAL ${VTK_DIR})
-    message(FATAL_ERROR "VTK packages do not match:\n   ${MY_PROJECT_NAME}: ${my_vtk_dir}\n  MITK: ${VTK_DIR}")
-  endif()
-
-  if(my_qmake_executable AND NOT my_qmake_executable STREQUAL ${MITK_QMAKE_EXECUTABLE})
-    message(FATAL_ERROR "Qt qmake does not match:\n   ${MY_PROJECT_NAME}: ${my_qmake_executable}\n  MITK: ${MITK_QMAKE_EXECUTABLE}")
+  if(my_itk_dir)
+    if(NOT my_itk_dir STREQUAL ${ITK_DIR})
+      message(FATAL_ERROR "ITK packages do not match:\n   ${MY_PROJECT_NAME}: ${my_itk_dir}\n  MITK: ${ITK_DIR}")
+    endif()
+  endif()
+
+  if(my_vtk_dir)
+    if(NOT my_vtk_dir STREQUAL ${VTK_DIR})
+      message(FATAL_ERROR "VTK packages do not match:\n   ${MY_PROJECT_NAME}: ${my_vtk_dir}\n  MITK: ${VTK_DIR}")
+    endif()
+  endif()
+
+  if(my_qmake_executable)
+    if(NOT my_qmake_executable STREQUAL ${MITK_QMAKE_EXECUTABLE})
+      message(FATAL_ERROR "Qt qmake does not match:\n   ${MY_PROJECT_NAME}: ${my_qmake_executable}\n  MITK: ${MITK_QMAKE_EXECUTABLE}")
+    endif()
   endif()

 endif()


[Catch2] Patch ParseAndAddCatchTests

[Catch2] Patch ParseAndAddCatchTests

--- tests/libs/catch2/ParseAndAddCatchTests.cmake
+++ tests/libs/catch2/ParseAndAddCatchTests.cmake
@@ -109,7 +109,7 @@
         # Get test type and fixture if applicable
         string(REGEX MATCH "(CATCH_)?(TEST_CASE_METHOD|SCENARIO|TEST_CASE)[ \t]*\\([^,^\"]*" TestTypeAndFixture "${TestName}")
         string(REGEX MATCH "(CATCH_)?(TEST_CASE_METHOD|SCENARIO|TEST_CASE)" TestType "${TestTypeAndFixture}")
-        string(REPLACE "${TestType}(" "" TestFixture "${TestTypeAndFixture}")
+        string(REGEX REPLACE "${TestType}\\([ \t]*" "" TestFixture "${TestTypeAndFixture}")

         # Get string parts of test definition
         string(REGEX MATCHALL "\"+([^\\^\"]|\\\\\")+\"+" TestStrings "${TestName}")


correct check_component_dependencies call

--- scripts/cmake/ElektraPackaging.cmake
+++ scripts/cmake/ElektraPackaging.cmake
@@ -177,7 +177,7 @@
 	set (CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-FUSE_DISPLAY_NAME "libelektra${SO_VERSION}-fuse")
 	set (CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-FUSE_DESCRIPTION "This package contains the 'fuse' tool.")
 	set (CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-FUSE_DEPENDS "libelektra${SO_VERSION}" "python3-elektra")
-	check_component_dependencies (fuse libelektra${SO_VERSION}-fuse TOOL)
+	check_component_dependencies (python libelektra${SO_VERSION}-fuse BINDING)

 	set (CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-XMLTOOL_DISPLAY_NAME "libelektra${SO_VERSION}-xmltool")
 	set (CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}-XMLTOOL_DESCRIPTION "This package contains the 'xmltool' plugin.")


CMake: Force-disable unsupported features on web platform.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -206,6 +206,10 @@
         message(WARNING "Web builds do not support C#.")
         set (URHO3D_CSHARP OFF)
     endif ()
+    set (URHO3D_TOOLS OFF)
+    set (URHO3D_EXTRAS OFF)
+    set (URHO3D_THREADING OFF)
+    set (URHO3D_NETWORK OFF)
 endif ()

 # Unset any default config variables so they do not pollute namespace


Add new search path for iOS SDK thanks to Xcode 4.3

--- CMake/Packages/FindiOSSDK.cmake
+++ CMake/Packages/FindiOSSDK.cmake
@@ -9,7 +9,7 @@
 # construct search paths
 set(iOSSDK_PREFIX_PATH ${iOSSDK_HOME} $ENV{iOSSDK_HOME}
   ${OGRE_HOME} $ENV{OGRE_HOME})
-create_search_paths(/Developer/Platforms)
+create_search_paths(/Developer/Platforms /Applications/Xcode.app/Contents/Developer/Platforms)
 # redo search if prefix path changed
 clear_if_changed(iOSSDK_PREFIX_PATH
   iOSSDK_LIBRARY_FWK
@@ -25,7 +25,7 @@

 #findpkg_framework(UIKit)

-find_path(iOSSDK_INCLUDE_DIR iPhoneOS.platform /Developer/Platforms)
+find_path(iOSSDK_INCLUDE_DIR iPhoneOS.platform /Developer/Platforms /Applications/Xcode.app/Contents/Developer/Platforms)

 if (iOSSDK_INCLUDE_DIR)
   unset(iOSSDK_INCLUDE_DIR)


COMP: Do not enable WRAP_CSHARP by default with only on MinGW.

Change-Id: Iffe402ff59a5d29ed52bfab327a985e537537b58

--- CMake/SITKLanguageOptions.cmake
+++ CMake/SITKLanguageOptions.cmake
@@ -106,10 +106,10 @@
 check_PIC_flag ( Ruby )

 find_package( CSharp QUIET )
-if ( ${CSHARP_FOUND} AND MSVC )
+if ( ${CSHARP_FOUND} AND NOT MINGW )
   set ( WRAP_CSHARP_DEFAULT ON )
 else ()
-  set ( wrap_csharp_default off )
+  set ( WRAP_CSHARP_DEFAULT OFF )
 endif ()
 list( APPEND SITK_LANGUAGES_VARS
   CSHARP_COMPILER


small readme changes

small readme changes

git-svn-id: 3db15d9df66343e7f944511864f914adee1f7549@1746 01035d8c-6547-0410-b346-abe4f91aad63

--- README.cmake
+++ README.cmake
@@ -32,7 +32,7 @@

 Install MinGW & the mysys shell
    + pwd -W prints true Win32 directory
-   + I also installed emacs, "tortise svn", and "cmake"
+   + I also installed emacs, "tortise svn", and "cmake", and built and installed speex

 $ cd codec2-dev
 $ mkdir build_win32


we do not have duplicate libs now, so we cant remove them

--- cmake/EthExecutableHelper.cmake
+++ cmake/EthExecutableHelper.cmake
@@ -83,19 +83,11 @@
 			set(APP_BUNDLE_PATH "${CMAKE_CURRENT_BINARY_DIR}/\$ENV{CONFIGURATION}/${EXECUTABLE}.app")
 		endif ()

-		# TODO check, how fixup_bundle works and if it is required
 		install(CODE "
 			include(BundleUtilities)
 			set(BU_CHMOD_BUNDLE_ITEMS 1)
 			verify_app(\"${APP_BUNDLE_PATH}\")
 			" COMPONENT RUNTIME )
-		# Cleanup duplicate libs from macdeployqt
-		install(CODE "
-			file(GLOB LINGER_RM \"${APP_BUNDLE_PATH}/Contents/Frameworks/*.dylib\")
-			if (LINGER_RM)
-				file(REMOVE \${LINGER_RM})
-			endif ()
-		")
 	elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")

 		# copy all dlls to executable directory


build: convert NDK path on Windows

build: convert NDK path on Windows

Convert the NDK path to allow the native path to be used when
configuring the Swift runtime but use the CMake spelling when
performing the inner configure.

--- cmake/modules/Libdispatch.cmake
+++ cmake/modules/Libdispatch.cmake
@@ -74,8 +74,10 @@
       set(SWIFT_LIBDISPATCH_COMPILER_TRIPLE_CMAKE_ARGS -DCMAKE_C_COMPILER_TARGET=${SWIFT_SDK_WINDOWS_ARCH_${arch}_TRIPLE};-DCMAKE_CXX_COMPILER_TARGET=${SWIFT_SDK_WINDOWS_ARCH_${arch}_TRIPLE})
     endif()

-
-    if(NOT sdk STREQUAL ANDROID)
+    if("${sdk}" STREQUAL "ANDROID")
+      file(TO_CMAKE_PATH "${SWIFT_ANDROID_NDK_PATH}" _ANDROID_NDK)
+      set(SWIFT_LIBDISPATCH_ANDROID_NDK -DCMAKE_ANDROID_NDK=${_ANDROID_NDK})
+    else()
       set(SWIFT_LIBDISPATCH_SYSTEM_PROCESSOR  -DCMAKE_SYSTEM_PROCESSOR=${arch})
     endif()

@@ -100,7 +102,7 @@
                           -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
                           -DCMAKE_SYSTEM_NAME=${SWIFT_SDK_${sdk}_NAME}
                           ${SWIFT_LIBDISPATCH_SYSTEM_PROCESSOR}
-                          "-DCMAKE_ANDROID_NDK=${SWIFT_ANDROID_NDK_PATH}"
+                          "${SWIFT_LIBDISPATCH_ANDROID_NDK}"
                           -DCMAKE_ANDROID_ARCH_ABI=${SWIFT_SDK_ANDROID_ARCH_${arch}_ABI}
                           -DCMAKE_ANDROID_API=${SWIFT_ANDROID_API_LEVEL}
                           -DBUILD_SHARED_LIBS=YES


MASTER: quick hack to get find assimp cmake working

--- cmake_modules/FindASSIMPM.cmake
+++ cmake_modules/FindASSIMPM.cmake
@@ -32,11 +32,18 @@
 	find_library(ASSIMP_LIBRARIES_DEBUG NAMES assimp-vc120-mtd assimpd assimp
 		PATHS
 		${ASSIMP_ROOT}/lib
-	)
-	set(ASSIMP_LIBRARIES
-		debug ${ASSIMP_LIBRARIES_DEBUG}
-		optimized ${ASSIMP_LIBRARIES_RELEASE}
+	)
+	if(ASSIMP_LIBRARIES_DEBUG)
+		set(ASSIMP_LIBRARIES
+			debug ${ASSIMP_LIBRARIES_DEBUG}
+			optimized ${ASSIMP_LIBRARIES_RELEASE}
 		)
+	else()
+		set(ASSIMP_LIBRARIES
+			debug ${ASSIMP_LIBRARIES_RELEASE}
+			optimized ${ASSIMP_LIBRARIES_RELEASE}
+		)
+	endif()
 endif()

 if(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARIES)


Enable 64-bit dims for all matlab versions

--- cmake/Modules/MexIFace-configure-matlab.cmake
+++ cmake/Modules/MexIFace-configure-matlab.cmake
@@ -358,8 +358,8 @@
             else()
                 target_compile_definitions(${target_prefix}MEX_LIBRARIES INTERFACE MATLAB_DEFAULT_RELEASE=R2017b)
             endif()
-            #Support for 64-bit indexed arrays
-            if(OPT_MexIFace_MATLAB_LARGE_ARRAY_DIMS AND ${_vers} VERSION_GREATER_EQUAL 9.2)
+            #Support for 64-bit indexed arrays enabled for all Matlab versions
+            if(OPT_MexIFace_MATLAB_LARGE_ARRAY_DIMS)
                 target_compile_definitions(${target_prefix}MEX_LIBRARIES INTERFACE MX_COMPAT_64)
             else()
                 target_compile_definitions(${target_prefix}MEX_LIBRARIES INTERFACE MX_COMPAT_32)


cmake: Test each compiler flag

cmake: Test each compiler flag

Add non-trival C compiler flags only if check_c_compiler_flag()
succeeds.

This fixes the build with 4.8.1, which was broken by

 commit cbab09dc0e6eb8fcea40db92319305d5e136d4b9
 cmake: Compile with stricter error checking

 Add -Werror=incompatible-pointer-types and -Werror=int-conversion
 to the compiler flags.

Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

--- cmake/Modules/WaffleDefineCompilerFlags.cmake
+++ cmake/Modules/WaffleDefineCompilerFlags.cmake
@@ -23,24 +23,32 @@
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+include(CheckCCompilerFlag)
 include(WaffleCheckThreadLocalStorage)
+
+function(waffle_add_c_flag flag var)
+    check_c_compiler_flag("${flag}" ${var})
+    if(${var})
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE)
+    endif()
+endfunction()

 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=incompatible-pointer-types")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion")
-
-if(waffle_on_linux)
-    # On MacOS, the SSE2 headers trigger this error.
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=missing-prototypes")
-endif()
-
 set(CMAKE_C_FLAGS_DEBUG "-g3 -O0 -DDEBUG")

 # Use '-g1' to produce enough debug info for generating backtraces, but not
 # enough for single-stepping.
 set(CMAKE_C_FLAGS_RELEASE "-g1 -O2 -DNDEBUG")
+
+waffle_add_c_flag("-Werror=implicit-function-declaration" WERROR_IMPLICIT_FUNCTION_DECLARATION)
+waffle_add_c_flag("-Werror=incompatible-pointer-types" WERROR_INCOMPATIBLE_POINTER_TYPES)
+waffle_add_c_flag("-Werror=int-conversion" WERROR_INT_CONVERSION)
+
+if(waffle_on_linux)
+    # On MacOS, the SSE2 headers trigger this error.
+    waffle_add_c_flag("-Werror=missing-prototypes" WERROR_MISSING_PROTOTYPES)
+endif()

 waffle_check_thread_local_storage()


No reason to put breakpad in it's own folder

--- cmake/modules/BuildGoogleBreakpad.cmake
+++ cmake/modules/BuildGoogleBreakpad.cmake
@@ -83,5 +83,3 @@
     set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES "${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES};${BREAKPAD_EXCEPTION_HANDLER_LIBRARY_DIR}/libbreakpad_client.a")
   endif()
 endif()
-
-SET_PROPERTY(TARGET breakpad                PROPERTY FOLDER "ThirdParty")


ORC-371: [C++] Disable Libhdfspp build when Cyrus SASL is not found

Fixes #275

Signed-off-by: Deepak Majeti <ac74a751f8042cdea853d6c3daf0ad34bd511bbe@apache.org>

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -291,50 +291,60 @@
     find_package(CyrusSASL)
     find_package(OpenSSL)
     find_package(Threads)
-
-    set (LIBHDFSPP_PREFIX "${THIRDPARTY_DIR}/libhdfspp_ep-install")
-    set (LIBHDFSPP_INCLUDE_DIR "${LIBHDFSPP_PREFIX}/include")
-    set (LIBHDFSPP_STATIC_LIB_NAME hdfspp_static)
-    set (LIBHDFSPP_STATIC_LIB "${LIBHDFSPP_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${LIBHDFSPP_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    set (LIBHDFSPP_SRC_URL "${CMAKE_SOURCE_DIR}/c++/libs/libhdfspp/libhdfspp.tar.gz")
-    set (LIBHDFSPP_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-                              -DCMAKE_INSTALL_PREFIX=${LIBHDFSPP_PREFIX}
-                              -DPROTOBUF_INCLUDE_DIR=${PROTOBUF_INCLUDE_DIR}
-                              -DPROTOBUF_LIBRARY=${PROTOBUF_STATIC_LIB}
-                              -DPROTOBUF_PROTOC_LIBRARY=${PROTOC_STATIC_LIB}
-                              -DPROTOBUF_PROTOC_EXECUTABLE=${PROTOBUF_EXECUTABLE}
-                              -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
-                              -DCMAKE_C_FLAGS=${EP_C_FLAGS}
-                              -DBUILD_SHARED_LIBS=OFF
-                              -DHDFSPP_LIBRARY_ONLY=TRUE
-                              -DBUILD_SHARED_HDFSPP=FALSE)
-
-    ExternalProject_Add (libhdfspp_ep
-      DEPENDS protobuf
-      URL ${LIBHDFSPP_SRC_URL}
-      LOG_DOWNLOAD 0
-      LOG_CONFIGURE 0
-      LOG_BUILD 0
-      LOG_INSTALL 0
-      BUILD_BYPRODUCTS "${LIBHDFSPP_STATIC_LIB}"
-      CMAKE_ARGS ${LIBHDFSPP_CMAKE_ARGS})
-
-    include_directories (SYSTEM ${LIBHDFSPP_INCLUDE_DIR})
-
-    add_library (libhdfspp STATIC IMPORTED)
-    set_target_properties (libhdfspp PROPERTIES IMPORTED_LOCATION ${LIBHDFSPP_STATIC_LIB})
-    add_dependencies (libhdfspp libhdfspp_ep)
-    if (INSTALL_VENDORED_LIBS)
-      install(FILES "${LIBHDFSPP_STATIC_LIB}"
-              DESTINATION "lib")
-    endif ()
-
-    set (LIBHDFSPP_LIBRARIES
-         libhdfspp
-         ${CYRUS_SASL_SHARED_LIB}
-         ${OPENSSL_LIBRARIES}
-         ${CMAKE_THREAD_LIBS_INIT})
-
+    if (CYRUS_SASL_SHARED_LIB AND OPENSSL_LIBRARIES)
+      set (LIBHDFSPP_PREFIX "${THIRDPARTY_DIR}/libhdfspp_ep-install")
+      set (LIBHDFSPP_INCLUDE_DIR "${LIBHDFSPP_PREFIX}/include")
+      set (LIBHDFSPP_STATIC_LIB_NAME hdfspp_static)
+      set (LIBHDFSPP_STATIC_LIB "${LIBHDFSPP_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${LIBHDFSPP_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      set (LIBHDFSPP_SRC_URL "${CMAKE_SOURCE_DIR}/c++/libs/libhdfspp/libhdfspp.tar.gz")
+      set (LIBHDFSPP_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+                                -DCMAKE_INSTALL_PREFIX=${LIBHDFSPP_PREFIX}
+                                -DPROTOBUF_INCLUDE_DIR=${PROTOBUF_INCLUDE_DIR}
+                                -DPROTOBUF_LIBRARY=${PROTOBUF_STATIC_LIB}
+                                -DPROTOBUF_PROTOC_LIBRARY=${PROTOC_STATIC_LIB}
+                                -DPROTOBUF_PROTOC_EXECUTABLE=${PROTOBUF_EXECUTABLE}
+                                -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
+                                -DCMAKE_C_FLAGS=${EP_C_FLAGS}
+                                -DBUILD_SHARED_LIBS=OFF
+                                -DHDFSPP_LIBRARY_ONLY=TRUE
+                                -DBUILD_SHARED_HDFSPP=FALSE)
+
+      ExternalProject_Add (libhdfspp_ep
+        DEPENDS protobuf
+        URL ${LIBHDFSPP_SRC_URL}
+        LOG_DOWNLOAD 0
+        LOG_CONFIGURE 0
+        LOG_BUILD 0
+        LOG_INSTALL 0
+        BUILD_BYPRODUCTS "${LIBHDFSPP_STATIC_LIB}"
+        CMAKE_ARGS ${LIBHDFSPP_CMAKE_ARGS})
+
+      include_directories (SYSTEM ${LIBHDFSPP_INCLUDE_DIR})
+
+      add_library (libhdfspp STATIC IMPORTED)
+      set_target_properties (libhdfspp PROPERTIES IMPORTED_LOCATION ${LIBHDFSPP_STATIC_LIB})
+      add_dependencies (libhdfspp libhdfspp_ep)
+      if (INSTALL_VENDORED_LIBS)
+        install(FILES "${LIBHDFSPP_STATIC_LIB}"
+                DESTINATION "lib")
+      endif ()
+
+      set (LIBHDFSPP_LIBRARIES
+           libhdfspp
+           ${CYRUS_SASL_SHARED_LIB}
+           ${OPENSSL_LIBRARIES}
+           ${CMAKE_THREAD_LIBS_INIT})
+
+    elseif(CYRUS_SASL_SHARED_LIB)
+      message(STATUS
+      "WARNING: Libhdfs++ library was not built because the required OpenSSL library was not found")
+    elseif(OPENSSL_LIBRARIES)
+      message(STATUS
+      "WARNING: Libhdfs++ library was not built because the required CyrusSASL library was not found")
+    else ()
+      message(STATUS
+      "WARNING: Libhdfs++ library was not built because the required CyrusSASL and OpenSSL libraries were not found")
+    endif(CYRUS_SASL_SHARED_LIB AND OPENSSL_LIBRARIES)
   else(ORC_CXX_HAS_THREAD_LOCAL)
     message(STATUS
     "WARNING: Libhdfs++ library was not built because the required feature


Compile without unnecessary warnng GCC 11. Also compiles with Clang 13.

--- CMakeModules/FindTacentProjectUtilities.cmake
+++ CMakeModules/FindTacentProjectUtilities.cmake
@@ -62,6 +62,7 @@

 			# GNU compiler. -std=c++20
 			$<$<CXX_COMPILER_ID:GNU>:-Wno-unused-result>
+			$<$<CXX_COMPILER_ID:GNU>:-Wno-stringop-overflow>

 			# Clang and GNU.
 			$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:-Wno-multichar>


To quote or not to quote... that is the question

--- cmake/Modules/FindLuaBuild/LuaJIT.cmake
+++ cmake/Modules/FindLuaBuild/LuaJIT.cmake
@@ -248,10 +248,15 @@
 endif()

 set(LUA_JIT_BYPRODUCTS "${LUA_JIT_SOURCE_LUA_LIB}" "${LUA_JIT_SOURCE_LUA_LIB_EXP}"
-		"${LUA_JIT_SOURCE_LUA_DLL}" "${LUA_JIT_SOURCE_LUA_IMP_LIB}" "${LUA_JIT_SOURCE_LUA_INTERPRETER}")
-
-set(LUA_JIT_INSTALL_BYPRODUCTS "${LUA_JIT_DESTINATION_LUA_INTERPRETER}" "${LUA_JIT_DESTINATION_LUA_LIB}"
-		"${LUA_JIT_DESTINATION_LUA_DLL}" "${LUA_JIT_DESTINATION_LUA_LIB_EXP}" "${LUA_JIT_DESTINATION_LUA_IMP_LIB}")
+	"${LUA_JIT_SOURCE_LUA_DLL}" "${LUA_JIT_SOURCE_LUA_INTERPRETER}")
+
+set(LUA_JIT_INSTALL_BYPRODUCTS "${LUA_JIT_DESTINATION_LUA_LIB}" "${LUA_JIT_DESTINATION_LUA_LIB_EXP}"
+	"${LUA_JIT_DESTINATION_LUA_DLL}" "${LUA_JIT_DESTINATION_LUA_INTERPRETER}")
+
+if (CMAKE_IMPORT_LIBRARY_SUFFIX)
+	set(LUA_JIT_BYPRODUCTS "${LUA_JIT_BYPRODUCTS}" "${LUA_JIT_SOURCE_LUA_IMP_LIB}")
+	set(LUA_JIT_INSTALL_BYPRODUCTS "${LUA_JIT_INSTALL_BYPRODUCTS}" "${LUA_JIT_DESTINATION_LUA_IMP_LIB}")
+endif()

 # # Post-Build moving steps for necessary items
 # Add post-step to move library afterwards
@@ -295,7 +300,7 @@
 		${LUA_JIT_BUILD_COMMAND}
 		INSTALL_COMMAND ""
 		TEST_COMMAND ""
-		BUILD_BYPRODUCTS "${LUA_JIT_BYPRODUCTS}" "${LUA_JIT_INSTALL_BYPRODUCTS}")
+		BUILD_BYPRODUCTS ${LUA_JIT_BYPRODUCTS})
 else()
 	ExternalProject_Add(LUA_JIT
 		BUILD_IN_SOURCE TRUE
@@ -315,7 +320,7 @@
 		${LUA_JIT_BUILD_COMMAND}
 		INSTALL_COMMAND ""
 		TEST_COMMAND ""
-		BUILD_BYPRODUCTS "${LUA_JIT_BYPRODUCTS}")
+		BUILD_BYPRODUCTS ${LUA_JIT_BYPRODUCTS})
 endif()

 # # MAYBE?:
@@ -326,8 +331,7 @@
 	POST_BUILD
 	${LUA_JIT_POSTBUILD_COMMANDS}
 	COMMENT ${LUA_JIT_POSTBUILD_COMMENTS}
-	BYPRODUCTS "${LUA_JIT_INSTALL_BYPRODUCTS}"
-)
+	BYPRODUCTS ${LUA_JIT_INSTALL_BYPRODUCTS})

 # # Lua Library
 add_library(${lualib} ${LUA_BUILD_LIBRARY_TYPE} IMPORTED)


Haskell: Remove useless whitespace

Haskell: Remove useless whitespace

--- cmake/Modules/LibAddHaskellPlugin.cmake
+++ cmake/Modules/LibAddHaskellPlugin.cmake
@@ -2,10 +2,10 @@

 # Allows one to add plugins written in haskell, setting up the include paths and
 # libraries automatically.
-#
+#
 # Expects that plugins make use of cabal as their build system.
-# Expects that
-#
+# Expects that
+#
 # MODULES:
 #  the name of the haskell modules to be compiled
 #  by default it assumes there is a single module called Elektra.<pluginName>


New version: 0.3.4

New version: 0.3.4

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "3")
+SET(HAWKEY_PATCH "4")


BUG: fix glew link bug on windows

BUG: fix glew link bug on windows

--- Modules/ThirdParty/Glew/otb-module-init.cmake
+++ Modules/ThirdParty/Glew/otb-module-init.cmake
@@ -22,7 +22,7 @@

 # FIX: glew-config.cmake import GLEW::GLEW target but does not necessarily set GLEW_LIBRARY
 if(NOT GLEW_LIBRARY)
-  get_target_property(GLEW_LIBRARY GLEW::GLEW IMPORTED_LOCATION_RELEASE)
+  get_target_property(GLEW_LIBRARY GLEW::GLEW IMPORTED_IMPLIB_RELEASE)
 endif()

 mark_as_advanced(GLEW_INCLUDE_DIR)


Adjust CMake version code.

Adjust CMake version code.

--- Version.cmake
+++ Version.cmake
@@ -3,7 +3,7 @@
 set(CPACK_PACKAGE_VENDOR "Sensics, Inc.")
 set(CPACK_PACKAGE_CONTACT "<support@osvr.com>")
 set(CPACK_PACKAGE_VERSION_MAJOR 0)
-set(CPACK_PACKAGE_VERSION_MINOR 1)
+set(CPACK_PACKAGE_VERSION_MINOR 2)
 set(OSVR_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
 set(CPACK_PACKAGE_VERSION ${OSVR_VERSION})

@@ -16,7 +16,7 @@
     set(CPACK_PACKAGE_VERSION "${GIT_REVISION_DESCRIPTION}")
     message(STATUS "Git reports version ${CPACK_PACKAGE_VERSION}")
 else()
-    message(STATUS "Could not get revision information from Git!")
+    message(STATUS "Could not get revision information from Git! Calling this just version ${CPACK_PACKAGE_VERSION}!")
 endif()

 if(WIN32)


STYLE: fix indention. C-x h indent-region

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -5,7 +5,7 @@
 mark_as_advanced(GDAL_CONFIG)

 if(NOT GDAL_FOUND)
- message(FATAL_ERROR "Cannot find GDAL. Set GDAL_INCLUDE_DIR and GDAL_LIBRARY")
+  message(FATAL_ERROR "Cannot find GDAL. Set GDAL_INCLUDE_DIR and GDAL_LIBRARY")
 endif()

 #Check if GDAL is compatible with OTB using a bunch of cmake try_run and try_compile. (Default value is ON.)
@@ -14,192 +14,192 @@

 if(GDAL_CONFIG_CHECKING)
   message(STATUS "Checking GDAL installation.. " )
-	set(MIN_MAJOR_VERSION 1)
-	set(MIN_MINOR_VERSION 10)
-
-	set(GDAL_QUALIFIES TRUE)
-	# Ensure that the temporary dir always exists before starting tests
-	if(NOT EXISTS ${TEMP})
-	  FILE(MAKE_DIRECTORY ${TEMP})
-	endif()
-
-	#------------------- TESTS ---------------------
-	# Version of GDAL
-	try_run(RUN_RESULT_VERSION COMPILE_RESULT_VERSION ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalVersionTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/gdalVersion.txt ${MIN_MAJOR_VERSION} ${MIN_MINOR_VERSION})
-
-	# Has OGR
-	try_compile(GDAL_HAS_OGR ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOGRTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}")
-
-
-	# Has formats JPEG2000 & JPEG & GTIF
-	# Note : exact format names can be found here http://www.gdal.org/formats_list.html
-	try_run(GDAL_HAS_J2K_OPJG COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JP2OpenJPEG ${TEMP}/gdalFormats.txt )
-	try_run(GDAL_HAS_J2K_KAK COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JP2KAK ) # No need to output ${TEMP}/gdalFormats.txt everytime
-	try_run(GDAL_HAS_J2K_ECW COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JP2ECW )
-	try_run(GDAL_HAS_J2K_JG2000 COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JPEG2000 )
-	try_run(GDAL_HAS_JPEG COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JPEG )
-	try_run(GDAL_HAS_GTIF COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS GTiff )
-	try_run(GDAL_HAS_HDF5 COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS HDF5 )
-
-	# Can create geotiff file
-	if (GDAL_HAS_GTIF)
-		try_run(GDAL_CAN_CREATE_GEOTIFF COMPILE_RESULT_CREATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS GTiff ${TEMP}/testImage.gtif )
-	endif()
-
-	#Can create other format file
-	if(COMPILE_RESULT_CREATE AND GDAL_CAN_CREATE_GEOTIFF) #Use the result of the previous try_run
-
-		# Can create bigtiff file
-		if (GDAL_HAS_GTIF)
-			try_run(GDAL_CAN_CREATE_BIGTIFF COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.bigtif GTiff "BIGTIFF=YES")
-		endif()
-
-		# Can create jpeg file
-		if (GDAL_HAS_JPEG)
-			try_run(GDAL_CAN_CREATE_JPEG COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.jpeg JPEG)
-		endif()
-
-		# Can create jpeg2000 file
-		if (GDAL_HAS_J2K_OPJG)
-			try_run(GDAL_CAN_CREATE_JPEG2000 COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2OpenJPEG)
-		endif()
-
-		if (GDAL_HAS_J2K_KAK AND NOT GDAL_CAN_CREATE_JPEG2000)
-			try_run(GDAL_CAN_CREATE_JPEG2000 COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2KAK)
-		endif()
-
-		if (GDAL_HAS_J2K_ECW AND NOT GDAL_CAN_CREATE_JPEG2000)
-			try_run(GDAL_CAN_CREATE_JPEG2000 COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2ECW)
-		endif()
-
-		if (GDAL_HAS_J2K_JG2000 AND NOT GDAL_CAN_CREATE_JPEG2000)
-			try_run(GDAL_CAN_CREATE_JPEG2000 COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JPEG2000)
-		endif()
-
-	endif()
-	#------------------- TESTS (END)---------------------
-
-	# Warning messages
-	if (NOT COMPILE_RESULT_VERSION)
-	  message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalVersionTest.cxx did not compile.")
-	elseif (${RUN_RESULT_VERSION} EQUAL 1)
-	  file(READ "${TEMP}/gdalVersion.txt" DETECTED_VERSION)
-	  message(FATAL_ERROR "Version of GDAL must be >= " ${MIN_MAJOR_VERSION} "." ${MIN_MINOR_VERSION} " : " ${DETECTED_VERSION} " detected.")
-	  set(GDAL_QUALIFIES FALSE)
-        else((${RUN_RESULT_VERSION} EQUAL 1))
-          file(READ "${TEMP}/gdalVersion.txt" DETECTED_VERSION)
-          string(SUBSTRING ${DETECTED_VERSION} 0 2 VER2)
-          if(${VER2} EQUAL "2.")
-            message(STATUS "Gdal >= 2.0.0 detected")
+  set(MIN_MAJOR_VERSION 1)
+  set(MIN_MINOR_VERSION 10)
+
+  set(GDAL_QUALIFIES TRUE)
+  # Ensure that the temporary dir always exists before starting tests
+  if(NOT EXISTS ${TEMP})
+    FILE(MAKE_DIRECTORY ${TEMP})
+  endif()
+
+  #------------------- TESTS ---------------------
+  # Version of GDAL
+  try_run(RUN_RESULT_VERSION COMPILE_RESULT_VERSION ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalVersionTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/gdalVersion.txt ${MIN_MAJOR_VERSION} ${MIN_MINOR_VERSION})
+
+  # Has OGR
+  try_compile(GDAL_HAS_OGR ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOGRTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}")
+
+
+  # Has formats JPEG2000 & JPEG & GTIF
+  # Note : exact format names can be found here http://www.gdal.org/formats_list.html
+  try_run(GDAL_HAS_J2K_OPJG COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JP2OpenJPEG ${TEMP}/gdalFormats.txt )
+  try_run(GDAL_HAS_J2K_KAK COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JP2KAK ) # No need to output ${TEMP}/gdalFormats.txt everytime
+  try_run(GDAL_HAS_J2K_ECW COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JP2ECW )
+  try_run(GDAL_HAS_J2K_JG2000 COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JPEG2000 )
+  try_run(GDAL_HAS_JPEG COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS JPEG )
+  try_run(GDAL_HAS_GTIF COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS GTiff )
+  try_run(GDAL_HAS_HDF5 COMPILE_RESULT_FORMATS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalFormatsTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS HDF5 )
+
+  # Can create geotiff file
+  if (GDAL_HAS_GTIF)
+    try_run(GDAL_CAN_CREATE_GEOTIFF COMPILE_RESULT_CREATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS GTiff ${TEMP}/testImage.gtif )
+  endif()
+
+  #Can create other format file
+  if(COMPILE_RESULT_CREATE AND GDAL_CAN_CREATE_GEOTIFF) #Use the result of the previous try_run
+
+    # Can create bigtiff file
+    if (GDAL_HAS_GTIF)
+      try_run(GDAL_CAN_CREATE_BIGTIFF COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.bigtif GTiff "BIGTIFF=YES")
+    endif()
+
+    # Can create jpeg file
+    if (GDAL_HAS_JPEG)
+      try_run(GDAL_CAN_CREATE_JPEG COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.jpeg JPEG)
+    endif()
+
+    # Can create jpeg2000 file
+    if (GDAL_HAS_J2K_OPJG)
+      try_run(GDAL_CAN_CREATE_JPEG2000 COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2OpenJPEG)
+    endif()
+
+    if (GDAL_HAS_J2K_KAK AND NOT GDAL_CAN_CREATE_JPEG2000)
+      try_run(GDAL_CAN_CREATE_JPEG2000 COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2KAK)
+    endif()
+
+    if (GDAL_HAS_J2K_ECW AND NOT GDAL_CAN_CREATE_JPEG2000)
+      try_run(GDAL_CAN_CREATE_JPEG2000 COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2ECW)
+    endif()
+
+    if (GDAL_HAS_J2K_JG2000 AND NOT GDAL_CAN_CREATE_JPEG2000)
+      try_run(GDAL_CAN_CREATE_JPEG2000 COMPILE_RESULT_CREATECOPY ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JPEG2000)
+    endif()
+
+  endif()
+  #------------------- TESTS (END)---------------------
+
+  # Warning messages
+  if (NOT COMPILE_RESULT_VERSION)
+    message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalVersionTest.cxx did not compile.")
+  elseif (${RUN_RESULT_VERSION} EQUAL 1)
+    file(READ "${TEMP}/gdalVersion.txt" DETECTED_VERSION)
+    message(FATAL_ERROR "Version of GDAL must be >= " ${MIN_MAJOR_VERSION} "." ${MIN_MINOR_VERSION} " : " ${DETECTED_VERSION} " detected.")
+    set(GDAL_QUALIFIES FALSE)
+  else((${RUN_RESULT_VERSION} EQUAL 1))
+    file(READ "${TEMP}/gdalVersion.txt" DETECTED_VERSION)
+    string(SUBSTRING ${DETECTED_VERSION} 0 2 VER2)
+    if(${VER2} EQUAL "2.")
+      message(STATUS "Gdal >= 2.0.0 detected")
       set(OTB_USE_GDAL_20 true CACHE INTERNAL "True if GDAL >= 2.0.0 has been detected" FORCE )
     else(${VER2} EQUAL "2.")
       set(OTB_USE_GDAL_20 false CACHE INTERNAL "True if GDAL >= 2.0.0 has been detected" FORCE )
     endif()
-	endif()
-
-	if (NOT GDAL_HAS_OGR)
-		message(FATAL_ERROR "GDAL doesn't expose OGR library symbols.")
-		unset(GDAL_QUALIFIES)
-	endif()
-
-	if (NOT COMPILE_RESULT_FORMATS)
-		message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalFormatsTest.cxx did not compile.")
-
-	else()
-
-		if (NOT GDAL_HAS_J2K_JG2000 AND NOT GDAL_HAS_J2K_OPJG AND NOT GDAL_HAS_J2K_KAK AND NOT GDAL_HAS_J2K_ECW)
-		message(STATUS "No Jpeg2000 driver found (compatible drivers are : OpenJpeg, Kakadu, ECW).")
-		endif()
-
-		if (NOT GDAL_HAS_JPEG)
-		message(WARNING "No jpeg driver found.")
-                unset(GDAL_QUALIFIES)
-		endif()
-
-		if (NOT GDAL_HAS_GTIF)
-		message(WARNING "No geotiff driver found.")
-		unset(GDAL_QUALIFIES)
-		endif()
-
-	endif()
+  endif()
+
+  if (NOT GDAL_HAS_OGR)
+    message(FATAL_ERROR "GDAL doesn't expose OGR library symbols.")
+    unset(GDAL_QUALIFIES)
+  endif()
+
+  if (NOT COMPILE_RESULT_FORMATS)
+    message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalFormatsTest.cxx did not compile.")
+
+  else()
+
+    if (NOT GDAL_HAS_J2K_JG2000 AND NOT GDAL_HAS_J2K_OPJG AND NOT GDAL_HAS_J2K_KAK AND NOT GDAL_HAS_J2K_ECW)
+      message(STATUS "No Jpeg2000 driver found (compatible drivers are : OpenJpeg, Kakadu, ECW).")
+    endif()
+
+    if (NOT GDAL_HAS_JPEG)
+      message(WARNING "No jpeg driver found.")
+      unset(GDAL_QUALIFIES)
+    endif()
+
+    if (NOT GDAL_HAS_GTIF)
+      message(WARNING "No geotiff driver found.")
+      unset(GDAL_QUALIFIES)
+    endif()
+
+  endif()

   if (NOT GDAL_HAS_HDF5)
     message(STATUS "GDAL doesn't have HDF5 drivers. (HDF5 tests will be deactivated)")
   endif()

-	if (NOT COMPILE_RESULT_CREATE)
-		message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalCreateTest.cxx did not compile.")
-	elseif (NOT GDAL_CAN_CREATE_GEOTIFF)
-			message(FATAL_ERROR "GDAL can't create geotiff files.")
-			unset(GDAL_QUALIFIES)
-	endif()
-
-
-	if (NOT COMPILE_RESULT_CREATECOPY)
-		message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx did not compile.")
-		if (NOT GDAL_CAN_CREATE_BIGTIFF)
-			message(WARNING "No BIGTIFF capatilities.")
-			unset(GDAL_QUALIFIES)
-		endif()
-		if (NOT GDAL_CAN_CREATE_JPEG)
-			message(WARNING "GDAL can't create jpeg files.")
-			unset(GDAL_QUALIFIES)
-		endif()
-
-		if (NOT GDAL_CAN_CREATE_JPEG2000)
-			message(WARNING "GDAL can't create jpeg2000 files.")
-			unset(GDAL_QUALIFIES)
-		endif()
-
-	endif()
-
-
-
-
-	#FOR UNIX SYSTEMS ONLY
-	if(UNIX)
-
-	  if(GDAL_QUALIFIES)
-			# Prepare bash script
-			configure_file(${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest.sh.in ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh @ONLY)
-			execute_process(COMMAND chmod u+x ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh)
-			execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh)
-
-
-			#------------------- TESTS ---------------------
-			# test libtiff/libgeotiff and test if symbols are renamed (only for internal libtiff/libgeotiff)
-			try_run(RUN_RESULT_SYMBOLS COMPILE_RESULT_SYMBOLS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalSymbolsTest.cxx ARGS ${TEMP}/gdalSymbols.txt)
-			#------------------- TESTS (END)---------------------
-
-
-			# Warning messages
-			if (NOT COMPILE_RESULT_SYMBOLS)
-				message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalSymbolsTest.cxx did not compile.")
-
-			elseif (${RUN_RESULT_SYMBOLS} EQUAL 1)
-				message(FATAL_ERROR "Internal versions of libtiff/libgeotiff detected without symbol renaming (when configuring GDAL, if options --with-libtiff or --with-geotiff are set to 'internal', then options --with-rename-internal-libtiff-symbols and --with-rename-internal-libgeotiff-symbols should be set to 'yes').")
-				set(GDAL_QUALIFIES FALSE)
-			endif()
-
-
-		endif() #GDAL_QUALIFIES
-
-
-	endif() #UNIX
-
-
-        if(NOT GDAL_VERSION)
-          if(EXISTS "${TEMP}/gdalVersion.txt")
-            file(READ "${TEMP}/gdalVersion.txt" GDAL_VERSION)
-          else()
-           set(GDAL_QUALIFIES FALSE)
-          endif()
-        endif()
-	if(GDAL_QUALIFIES)
-          message(STATUS "Check if Gdal qualifies for Orfeo ToolBox -- yes.")
-	else()
-          message(FATAL_ERROR "Check if Gdal qualifies for Orfeo ToolBox -- no.")
-	endif()
+  if (NOT COMPILE_RESULT_CREATE)
+    message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalCreateTest.cxx did not compile.")
+  elseif (NOT GDAL_CAN_CREATE_GEOTIFF)
+    message(FATAL_ERROR "GDAL can't create geotiff files.")
+    unset(GDAL_QUALIFIES)
+  endif()
+
+
+  if (NOT COMPILE_RESULT_CREATECOPY)
+    message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalCreateCopyTest.cxx did not compile.")
+    if (NOT GDAL_CAN_CREATE_BIGTIFF)
+      message(WARNING "No BIGTIFF capatilities.")
+      unset(GDAL_QUALIFIES)
+    endif()
+    if (NOT GDAL_CAN_CREATE_JPEG)
+      message(WARNING "GDAL can't create jpeg files.")
+      unset(GDAL_QUALIFIES)
+    endif()
+
+    if (NOT GDAL_CAN_CREATE_JPEG2000)
+      message(WARNING "GDAL can't create jpeg2000 files.")
+      unset(GDAL_QUALIFIES)
+    endif()
+
+  endif()
+
+
+
+
+  #FOR UNIX SYSTEMS ONLY
+  if(UNIX)
+
+    if(GDAL_QUALIFIES)
+      # Prepare bash script
+      configure_file(${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest.sh.in ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh @ONLY)
+      execute_process(COMMAND chmod u+x ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh)
+      execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh)
+
+
+      #------------------- TESTS ---------------------
+      # test libtiff/libgeotiff and test if symbols are renamed (only for internal libtiff/libgeotiff)
+      try_run(RUN_RESULT_SYMBOLS COMPILE_RESULT_SYMBOLS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalSymbolsTest.cxx ARGS ${TEMP}/gdalSymbols.txt)
+      #------------------- TESTS (END)---------------------
+
+
+      # Warning messages
+      if (NOT COMPILE_RESULT_SYMBOLS)
+	message(FATAL_ERROR "Modules/ThirdParty/GDAL/gdalSymbolsTest.cxx did not compile.")
+
+      elseif (${RUN_RESULT_SYMBOLS} EQUAL 1)
+	message(FATAL_ERROR "Internal versions of libtiff/libgeotiff detected without symbol renaming (when configuring GDAL, if options --with-libtiff or --with-geotiff are set to 'internal', then options --with-rename-internal-libtiff-symbols and --with-rename-internal-libgeotiff-symbols should be set to 'yes').")
+	set(GDAL_QUALIFIES FALSE)
+      endif()
+
+
+    endif() #GDAL_QUALIFIES
+
+
+  endif() #UNIX
+
+
+  if(NOT GDAL_VERSION)
+    if(EXISTS "${TEMP}/gdalVersion.txt")
+      file(READ "${TEMP}/gdalVersion.txt" GDAL_VERSION)
+    else()
+      set(GDAL_QUALIFIES FALSE)
+    endif()
+  endif()
+  if(GDAL_QUALIFIES)
+    message(STATUS "Check if Gdal qualifies for Orfeo ToolBox -- yes.")
+  else()
+    message(FATAL_ERROR "Check if Gdal qualifies for Orfeo ToolBox -- no.")
+  endif()

   set(GDAL_VERSION_STRING "${GDAL_VERSION}" CACHE INTERNAL "" FORCE)


Fix build command in function hunter_download

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -259,7 +259,6 @@
       "-DHUNTER_STATUS_DEBUG=${HUNTER_STATUS_DEBUG}"
       ${h_generator}
       ${verbose_makefile}
-      "./"
       WORKING_DIRECTORY
       "${h_work_dir}"
       RESULT_VARIABLE


Make dependency installs "optional" in installed config, since we enumerate all of them.

--- cmake/osvrRenderManagerConfig.cmake
+++ cmake/osvrRenderManagerConfig.cmake
@@ -32,7 +32,8 @@
 			${_files}
 			CONFIGURATIONS ${_config}
 			DESTINATION ${_destination}
-			COMPONENT Runtime)
+			COMPONENT Runtime
+			OPTIONAL)
 	endforeach()
 endfunction()


Libs working fine. Code wonky again

Libs working fine. Code wonky again

Former-commit-id: 79baf4f6c9bd357508a756a68622585d592f14ed

--- cmake_modules/Fetch_Arpack-ng.cmake
+++ cmake_modules/Fetch_Arpack-ng.cmake
@@ -48,8 +48,8 @@
             -DCMAKE_C_FLAGS=-w
             -DEXAMPLES=ON
             -DCMAKE_BUILD_TYPE=Release
-            -DMPI=ON
-            -DBUILD_SHARED_LIBS=ON
+            -DMPI=OFF
+            -DBUILD_SHARED_LIBS=OFF
             -DBLAS_LIBRARIES=${BLAS_LIBRARIES_GENERATOR}
             -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES_GENERATOR}
             -DEXTRA_LDLAGS=${EXTRA_LDLAGS_GENERATOR}
@@ -60,7 +60,7 @@
     set(ARPACK_INCLUDE_DIRS ${INSTALL_DIR}/include)
     add_library(arpack UNKNOWN IMPORTED)
     set_target_properties(arpack PROPERTIES
-            IMPORTED_LOCATION ${INSTALL_DIR}/lib/libarpack${CMAKE_SHARED_LIBRARY_SUFFIX}
+            IMPORTED_LOCATION ${INSTALL_DIR}/lib/libarpack${CMAKE_STATIC_LIBRARY_SUFFIX}
             INTERFACE_LINK_LIBRARIES "${GFORTRAN_LIB};${BLAS_LIBRARIES};${LAPACK_LIBRARIES}"
             INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
     add_dependencies(arpack library_ARPACK)


Debug nanoflann problem in xenial

Debug nanoflann problem in xenial

--- cmakemodules/script_nanoflann.cmake
+++ cmakemodules/script_nanoflann.cmake
@@ -11,14 +11,18 @@
 if (NOT nanoflann_FOUND)
     message(STATUS "--- Running CMake on external submodule 'nanoflann'...")
     file(MAKE_DIRECTORY "${nanoflann_EMBEDDED_BUILD_DIR}")
+    if(NOT ${CMAKE_VERSION} VERSION_LESS "3.15")
+        set(echo_flag COMMAND_ECHO STDOUT)
+    endif()
     execute_process(COMMAND
-        ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -S "${MRPT_SOURCE_DIR}/3rdparty/nanoflann"
+        ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "${MRPT_SOURCE_DIR}/3rdparty/nanoflann"
         -DNANOFLANN_BUILD_EXAMPLES=OFF
         -DNANOFLANN_BUILD_BENCHMARKS=OFF
         -DNANOFLANN_BUILD_TESTS=OFF
         -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
       RESULT_VARIABLE result
       WORKING_DIRECTORY "${nanoflann_EMBEDDED_BUILD_DIR}"
+      ${echo_flag}
       )
     if(result)
       message(FATAL_ERROR "CMake step for nanoflann failed: ${result}")


UMUNDONATIVEJAVA_LOCATION not enough to check whether java was built

--- contrib/cmake/CPackUMundo.cmake
+++ contrib/cmake/CPackUMundo.cmake
@@ -90,9 +90,13 @@
 GET_TARGET_PROPERTY(UMUNDONATIVEJAVA_LOCATION umundoNativeJava LOCATION)
 if (UMUNDONATIVEJAVA_LOCATION)
 	if (DIST_PREPARE)
-		install(FILES ${PROJECT_SOURCE_DIR}/package/umundo.jar DESTINATION share/umundo/lib COMPONENT librarySwig)
+		if (EXISTS "${PROJECT_SOURCE_DIR}/package/umundo.jar")
+			install(FILES ${PROJECT_SOURCE_DIR}/package/umundo.jar DESTINATION share/umundo/lib COMPONENT librarySwig)
+		endif()
 	else()
-		install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/umundo.jar DESTINATION share/umundo/lib COMPONENT librarySwig)
+		if (EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/umundo.jar")
+			install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/umundo.jar DESTINATION share/umundo/lib COMPONENT librarySwig)
+		endif()
 	endif()
 	list (APPEND UMUNDO_CPACK_COMPONENTS "librarySwig")
 endif()


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -76,7 +76,7 @@
 Comment[et]=Phononi GStreameri taustaprogramm
 Comment[eu]=Phonon GStreamer backend
 Comment[fi]=Phonon GStreamer-taustaohjelma
-Comment[fr]=Système de gestion GStreamer pour Phonon
+Comment[fr]=Moteur GStreamer pour Phonon
 Comment[ga]=Inneall GStreamer le haghaidh Phonon
 Comment[gl]=Infraestrutura de GStreamer para Phonon
 Comment[hsb]=Phonon GStreamer backend


~CmakeFedoraScript: CMAKE_MODULE_PATH: it is possible that current dir is in NO_PACK/FedPkg/<prj>

--- Modules/CmakeFedoraScript.cmake
+++ Modules/CmakeFedoraScript.cmake
@@ -171,10 +171,14 @@
 ENDFUNCTION(CMAKE_FEDORA_GET_VARIABLE_SCRIPT)

 SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
+
+## It is possible that current dir is in NO_PACK/FedPkg/<prj>
 LIST(APPEND CMAKE_MODULE_PATH
-    ${CMAKE_CURRENT_SOURCE_DIR}/Modules ${CMAKE_SOURCE_DIR}/Modules
-    ${CMAKE_SOURCE_DIR}/cmake-fedora/Modules
-    ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} )
+    ${CMAKE_SOURCE_DIR}/Modules ${CMAKE_SOURCE_DIR}/cmake-fedora/Modules
+    ${CMAKE_SOURCE_DIR}/../../../Modules
+    ${CMAKE_SOURCE_DIR}/../../../cmake-fedora/Modules
+    ${CMAKE_SOURCE_DIR}
+    )

 INCLUDE(ManageMessage RESULT_VARIABLE MANAGE_MODULE_PATH)
 IF(NOT MANAGE_MODULE_PATH)


BUG: Fix remote image IO module registration.

When an external application uses a build of ITK that has
a remote IO module turned ON, the expected behavior is that
the corresponding IO factory should be regisitered automatically
like any other internal image IO types.

MGH and SCIFIO (currently the only two remote IO modules) IO
factories are not registered when their modules are enabled, due to
the module naming convention difference (with the internal IO modules):
there is no "ITKIO" prefix in the remote IO modules' names.

Change-Id: I2c6e3ef8606d2337f6dc5593267f4c26d134aecb

--- CMake/UseITK.cmake
+++ CMake/UseITK.cmake
@@ -39,12 +39,19 @@
   set(LIST_OF_FACTORIES_REGISTRATION "")
   set(LIST_OF_FACTORY_NAMES "")

-  foreach (ImageFormat  Nifti Nrrd Gipl HDF5 JPEG GDCM BMP LSM PNG TIFF VTK Stimulate BioRad Meta MINC SCIFIO MGH MRC)
+  # internal image IO modules
+  foreach (ImageFormat  Nifti Nrrd Gipl HDF5 JPEG GDCM BMP LSM PNG TIFF VTK Stimulate BioRad Meta MINC MRC)
     string(TOUPPER ${ImageFormat} ImageFormat_UPPER) ## Need to check for uppercase name as well
     ADD_FACTORY_REGISTRATION("LIST_OF_FACTORIES_REGISTRATION" "LIST_OF_FACTORY_NAMES" ITKIO${ImageFormat} ${ImageFormat}ImageIO)
     if(NOT "${ImageFormat}" STREQUAL "${ImageFormat_UPPER}")
       ADD_FACTORY_REGISTRATION("LIST_OF_FACTORIES_REGISTRATION" "LIST_OF_FACTORY_NAMES" ITKIO${ImageFormat_UPPER} ${ImageFormat}ImageIO)
     endif()
+  endforeach()
+
+   # remote image IO modules
+   # the remote modules do not have "ITKIO" prefix in their module names
+  foreach (ImageFormat MGH SCIFIO)
+    ADD_FACTORY_REGISTRATION("LIST_OF_FACTORIES_REGISTRATION" "LIST_OF_FACTORY_NAMES" ${ImageFormat}IO ${ImageFormat}ImageIO)
   endforeach()

   get_filename_component(_selfdir "${CMAKE_CURRENT_LIST_FILE}" PATH)


simplify XP_BUILD_* options now that Solaris support removed

issue https://github.com/smanders/externpro/issues/132#issuecomment-400800202

--- modules/macpro.cmake
+++ modules/macpro.cmake
@@ -72,29 +72,19 @@
   message(STATUS "[build]    execute through step 3: build the platform-specific binaries")
   set(XP_BUILD_RELEASE ON) # release is *always* built, debug is optional
   option(XP_BUILD_DEBUG "build debug (note: release is *always* built)" ON)
+  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+    set(XP_BUILD_64BIT ON)
+    set(XP_BUILD_32BIT OFF)
+  elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+    set(XP_BUILD_64BIT OFF)
+    set(XP_BUILD_32BIT ON)
+  else()
+    proPlatformOpts()
+  endif()
+  option(XP_BUILD_VERBOSE "show build target details" OFF)
   if(MSVC)
-    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-      set(XP_BUILD_64BIT ON)
-      set(XP_BUILD_32BIT OFF)
-    elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
-      set(XP_BUILD_64BIT OFF)
-      set(XP_BUILD_32BIT ON)
-    else()
-      proPlatformOpts()
-    endif()
     option(XP_BUILD_STATIC "build with static runtime (/MT), OFF: dynamic runtime (/MD)" ON)
-  else()
-    if((${CMAKE_SYSTEM_NAME} STREQUAL SunOS) OR (CMAKE_SIZEOF_VOID_P EQUAL 8))
-      set(XP_BUILD_64BIT ON)
-      set(XP_BUILD_32BIT OFF)
-    elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
-      set(XP_BUILD_64BIT OFF)
-      set(XP_BUILD_32BIT ON)
-    else()
-      proPlatformOpts()
-    endif()
-  endif()
-  option(XP_BUILD_VERBOSE "show build target details" OFF)
+  endif()
   # hide options if step isn't build...
   if(${XP_STEP} STREQUAL "build" AND MSVC)
     set_property(CACHE XP_BUILD_STATIC PROPERTY TYPE BOOL)


test on public kitware

test on public kitware

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

--- Numerics/cmake/DartConfig.cmake
+++ Numerics/cmake/DartConfig.cmake
@@ -1,11 +1,11 @@
 SET(CTEST_PROJECT_NAME "Siconos")
-SET(NIGHTLY_START_TIME "18:00:00")
+SET(NIGHTLY_START_TIME "20:00:00 CET")
 SET(DROP_METHOD "http")
-SET(DROP_SITE "cdash.inria.fr")
-SET(DROP_LOCATION "/CDash/submit.php?project=Siconos")
+#SET(DROP_SITE "cdash.inria.fr")
+SET(DROP_SITE "public.kitware.com")
+SET(DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
 SET(DROP_SITE_CDASH TRUE)
-SET(CTEST_DROP_METHOD "http")
-SET(CTEST_DROP_SITE "cdash.inria.fr")
-SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=Siconos")
+#SET(CTEST_DROP_METHOD "http")
+#SET(CTEST_DROP_SITE "cdash.inria.fr")
+#SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=Siconos")
 SET(CTEST_DROP_SITE_CDASH TRUE)
-


Remove many unused cmake options

Remove many unused cmake options

--- src/condor_includes/config.h.cmake
+++ src/condor_includes/config.h.cmake
@@ -87,66 +87,6 @@
 //#cmakedefine HAVE_CC_SHARED_FLAG
 //////////////////////////////////////////////////

-//////////////////////////////////////////////////
-// These don't appear to be used at all
-///* Define to 1 if the tool 'find' is available */
-//#cmakedefine HAVE_FIND
-///* Define to 1 if you have the 'fseeko' function. */
-//#cmakedefine HAVE_FSEEKO
-///* Define to 1 if you have the 'ftello' function. */
-//#cmakedefine HAVE_FTELLO
-///* Define to 1 if you have the 'getdirentries' function. */
-//#cmakedefine HAVE_GETDIRENTRIES
-///* Define if jar is available */
-//#cmakedefine HAVE_JAR
-///* Define if javac is available */
-//#cmakedefine HAVE_JAVAC
-///* Define to 1 if you have the 'crypt' library (-lcrypt). */
-//#cmakedefine HAVE_LIBCRYPT
-///* check for usable libsasl */
-//#cmakedefine HAVE_LIBSASL
-///* check for usable libsasl2 */
-//#cmakedefine HAVE_LIBSASL2
-///* Define if sha256sum is available */
-//#cmakedefine HAVE_SHA256SUM
-///* Define to 1 if you have the <memory.h> header file. */
-//#cmakedefine HAVE_MEMORY_H
-///* Define to 1 if the tool 'objcopy' is available */
-//#cmakedefine HAVE_OBJCOPY
-///* Define to 1 if objcopy can seperate the debugging symbols from an executable */
-//#cmakedefine HAVE_OBJCOPY_DEBUGLINK
-///* Define if making rpms */
-//#cmakedefine HAVE_RPM
-///* Define if sha1sum is available */
-//#cmakedefine HAVE_SHA1SUM
-///* Define to 1 if you have the <stdlib.h> header file. */
-//#cmakedefine HAVE_STDLIB_H
-///* Define to 1 if you have the <strings.h> header file. */
-//#cmakedefine HAVE_STRINGS_H
-///* Define to 1 if you have the <string.h> header file. */
-//#cmakedefine HAVE_STRING_H
-///* Define to 1 if 'f_fsid' is member of 'struct statvfs'. (USED)*/
-//#cmakedefine HAVE_STRUCT_STATVFS_F_FSID
-///* Define to 1 if you have the <sys/stat.h> header file. */
-//#cmakedefine HAVE_SYS_STAT_H
-///* Define to 1 is tar has --exclude option */
-//#cmakedefine HAVE_TAR_EXCLUDE_FLAG
-///* Define to 1 is tar has --files-from option */
-//#cmakedefine HAVE_TAR_FILES_FROM_FLAG
-///* Define to 1 if you have the 'tmpnam' function. */
-//#cmakedefine HAVE_TMPNAM
-///* Define to 1 if you have the <unistd.h> header file. */
-//#cmakedefine HAVE_UNISTD_H
-///* Define to 1 if you have the 'vsnprintf' function. */
-//#cmakedefine HAVE_VSNPRINTF
-///* Define to 1 if you have the ANSI C header files. */
-//#cmakedefine STDC_HEADERS
-///* Define to 1 if the X Window System is missing or not being used. */
-//#cmakedefine X_DISPLAY_MISSING
-///* Define to 1 if 'lex' declares 'yytext' as a 'char *' by default, not a 'char[]'. */
-//#cmakedefine YYTEXT_POINTER
-//////////////////////////////////////////////////
-
 #cmakedefine BUILDID ${BUILDID}

 /////////////////////////////////////////
@@ -155,9 +95,6 @@

 /* Define if sha1 checksums are required for released packages*/
 #cmakedefine ENABLE_CHECKSUM_SHA1 1
-
-/* Define if enabling NeST (USED)*/
-#cmakedefine WANT_NEST 1

 /* Define to 1 to support invoking hooks throughout the workflow of a job (USED)*/
 #cmakedefine HAVE_JOB_HOOKS 1
@@ -283,9 +220,6 @@

 /* Do we have the scitokens external (USED)*/
 #cmakedefine HAVE_EXT_SCITOKENS 1
-
-/* Do we have the srb external (USED) Imake stork*/
-#cmakedefine HAVE_EXT_SRB 1

 /* Do we have the unicoregahp external (USED)*/
 #cmakedefine HAVE_EXT_UNICOREGAHP 1
@@ -415,9 +349,6 @@

 /* Define to 1 if you have the <openssl/ssl.h> header file. (USED)*/
 #cmakedefine HAVE_OPENSSL_SSL_H 1
-
-/* Do we have Oracle support (USED)*/
-#cmakedefine HAVE_ORACLE 1

 /* Define to 1 if you have the <os_types.h> header file. (USED)*/
 #cmakedefine HAVE_OS_TYPES_H 1


Enable exceptions with MVSC

Enable exceptions with MVSC

fixes warning C4530

--- cmake/CompileFlags.cmake
+++ cmake/CompileFlags.cmake
@@ -72,6 +72,7 @@
     # /wd4251 : -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2'
     #              See https://github.com/cginternals/glbinding/blob/master/cmake/CompileOptions.cmake and
     #              and https://github.com/cginternals/glbinding/issues/141#issuecomment-174511579
+    # /EHsc  : enable exceptions

     # disable secure CRT warnings
     add_definitions(-D_CRT_SECURE_NO_WARNINGS)
@@ -83,7 +84,7 @@
     string( REGEX REPLACE "/M(T|D)(d)*" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
     string( REGEX REPLACE "/M(T|D)(d)*" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")

-    set(CMAKE_CXX_FLAGS                "/arch:AVX2 /MP /wd4251 ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_CXX_FLAGS                "/arch:AVX2 /MP /wd4251 /EHsc ${CMAKE_CXX_FLAGS}")
     set(CMAKE_CXX_FLAGS_DEBUG          "/D_DEBUG /DCORE_DEBUG /Od /Zi ${CMAKE_CXX_FLAGS_DEBUG} /MDd")
     set(CMAKE_CXX_FLAGS_RELEASE        "/DNDEBUG /Ox /fp:fast ${CMAKE_CXX_FLAGS_RELEASE} /MT")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Zi ${CMAKE_CXX_FLAGS_RELEASE}")


Updated cmake script and error reporting

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -1,4 +1,10 @@
 # Dependencies
+
+# GIT
+find_package(Git REQUIRED)
+if (!Git_FOUND)
+    message(FATAL_ERROR "Please ensure Git is installed on the system")
+endif()

 # HIP
 find_package(HIP REQUIRED)
@@ -21,4 +27,7 @@
 if(BUILD_BENCHMARK)
     set(BENCHMARK_BOOST_COMPONENTS program_options)
     find_package(Boost 1.54 REQUIRED COMPONENTS ${BENCHMARK_BOOST_COMPONENTS})
+    if (!Boost_FOUND)
+        message(FATAL_ERROR "Please ensure Boost program_options is installed")
+    endif()
 endif()


-apply same patch as in kdelibs/cmake/modules/, don't append /lib to CMAKE_INSTALL_PREFIX, since
this is already part of PATH_SUFFIXES

Alex

svn path=/trunk/kdesupport/phonon/; revision=829707

--- cmake/FindAutomoc4.cmake
+++ cmake/FindAutomoc4.cmake
@@ -32,7 +32,7 @@
              PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4
              PATHS ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH}
                    ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH}
-                   ${CMAKE_INSTALL_PREFIX}/lib
+                   ${CMAKE_INSTALL_PREFIX}
              NO_DEFAULT_PATH )
 endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")


Added openh264_dll to library name hints.

--- cmake/FindOpenH264.cmake
+++ cmake/FindOpenH264.cmake
@@ -14,7 +14,8 @@
 find_path(OPENH264_INCLUDE_DIR NAMES wels/codec_api.h wels/codec_app_def.h wels/codec_def.h
 	PATH_SUFFIXES include
 	HINTS ${OPENH264_ROOT})
-find_library(OPENH264_LIBRARY NAMES openh264 welsdec
+find_library(OPENH264_LIBRARY
+	 NAMES openh264_dll openh264 welsdec
 	 PATH_SUFFIXES lib
 	 HINTS ${OPENH264_ROOT})


link with kml* libs if they are a dependency

--- cmake/LibKMLHelper.cmake
+++ cmake/LibKMLHelper.cmake
@@ -4,6 +4,11 @@

   foreach(LIB_DEPEND ${LIB_DEPENDS})
     add_dependencies(${LIB_NAME} ${LIB_DEPEND})
+    #well.. if the LIB_DEPEND is one of kml*
+    #then we need to link it with target lib
+    if(${LIB_DEPEND} MATCHES "^kml")
+      list(APPEND LIB_LINKS ${LIB_DEPEND})
+    endif()
   endforeach()
   target_link_libraries(${LIB_NAME} ${LIB_LINKS})
   if(VERSION_STRING)
@@ -19,7 +24,7 @@
     DESTINATION include/${${LIB_NAME}_INCLUDE_DIR})

   install_target(${LIB_NAME})
-
+
 endmacro(build_target)

 macro(install_target _target)
@@ -46,7 +51,7 @@

 macro(include_project_vars _project _lib)
-  set(${_project}_INCLUDE_DIR "${INSTALL_DIR}/${_project}/include" )
-  set(${_project}_LIBRARY "${INSTALL_DIR}/${_project}/lib/${_lib}" )
+  set(${_project}_INCLUDE_DIR "${INSTALL_DIR}/include" )
+  set(${_project}_LIBRARY "${INSTALL_DIR}/lib/${_lib}" )
   include_directories(${${_project}_INCLUDE_DIR})
 endmacro()


Fix Translations.cmake, add configure_file_translation macro.

--- cmake/Translations.cmake
+++ cmake/Translations.cmake
@@ -1,4 +1,5 @@
 # Translations.cmake, CMake macros written for Marlin, feel free to re-use them
+include(CMakeParseArguments)

 macro (add_translations_directory NLS_PACKAGE)
     add_custom_target (i18n ALL COMMENT “Building i18n messages.”)
@@ -6,9 +7,7 @@
     # be sure that all languages are present
     # Using all usual languages code from https://www.gnu.org/software/gettext/manual/html_node/Language-Codes.html#Language-Codes
     # Rare language codes should be added on-demand.
-    set (LANGUAGES_NEEDED aa ab ae af ak am an ar as ast av ay az ba be bg bh bi bm bn bo br bs ca ce ch ckb co cr cs cu cv cy da de dv dz ee el en_AU en_CA en_GB eo es et eu fa ff fi fj fo fr fr_CA fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mo mr ms mt my na nb nd ne ng nl nn nb nr nv ny oc oj om or os pa pi pl ps pt pt_BR qu rm rn ro ru rue rw sa sc sd se sg si sk sl sm sma sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zh_CN zh_HK zh_TW zu)
-    string (REPLACE ";" " " LINGUAS "${LANGUAGES_NEEDED}")
-    configure_file (${CMAKE_CURRENT_SOURCE_DIR}/LINGUAS.in ${CMAKE_CURRENT_BINARY_DIR}/LINGUAS)
+    set (LANGUAGES_NEEDED aa ab ae af ak am an ar as ast av ay az ba be bg bh bi bm bn bo br bs ca ce ch ckb co cr cs cu cv cy da de dv dz ee el en_AU en_CA en_GB eo es et eu fa ff fi fj fo fr fr_CA fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mo mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt pt_BR qu rm rn ro ru rue rw sa sc sd se sg si sk sl sm sma sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zh_CN zh_HK zh_TW zu)
     foreach (LANGUAGE_NEEDED ${LANGUAGES_NEEDED})
         create_po_file (${LANGUAGE_NEEDED})
     endforeach (LANGUAGE_NEEDED ${LANGUAGES_NEEDED})
@@ -17,40 +16,12 @@
     foreach (PO_INPUT ${PO_FILES})
         get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE)
         set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo)
-        set (PO_COPY ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.po)
-        file (COPY ${PO_INPUT} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
         add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})

         install (FILES ${MO_OUTPUT} DESTINATION
             share/locale/${PO_INPUT_BASE}/LC_MESSAGES
-            RENAME ${NLS_PACKAGE}.mo
-            COMPONENT ${ARGV1})
+            RENAME ${NLS_PACKAGE}.mo)
     endforeach (PO_INPUT ${PO_FILES})
-    #Create *.desktop files
-    file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_SOURCE_DIR}/ ${CMAKE_SOURCE_DIR}/*.desktop.plugin.in)
-    foreach(PLUGIN_DESKTOP_IN_FILE ${SOURCE_FILES})
-        get_filename_component( BASE_NAME ${PLUGIN_DESKTOP_IN_FILE} NAME )
-        string(REGEX REPLACE ".desktop.plugin.in$" "" PLUGIN_FILE ${BASE_NAME})
-        get_filename_component( BASE_DIRECTORY ${PLUGIN_DESKTOP_IN_FILE} PATH )
-        file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${BASE_DIRECTORY})
-        add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} --desktop --keyword=Name --keyword=Description --keyword=Help -d ${CMAKE_CURRENT_BINARY_DIR} --template ${CMAKE_SOURCE_DIR}/${PLUGIN_DESKTOP_IN_FILE} -o ${CMAKE_BINARY_DIR}/${BASE_DIRECTORY}/${PLUGIN_FILE}.plugin)
-    endforeach()
-    file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_SOURCE_DIR}/ ${CMAKE_SOURCE_DIR}/*.desktop.in)
-    foreach(DESKTOP_IN_FILE ${SOURCE_FILES})
-        get_filename_component( BASE_NAME ${DESKTOP_IN_FILE} NAME )
-        string(REGEX REPLACE ".desktop.in$" "" PLUGIN_FILE ${BASE_NAME})
-        get_filename_component( BASE_DIRECTORY ${DESKTOP_IN_FILE} PATH )
-        file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${BASE_DIRECTORY})
-        add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} --desktop -d ${CMAKE_CURRENT_BINARY_DIR} --template ${CMAKE_SOURCE_DIR}/${DESKTOP_IN_FILE} -o ${CMAKE_BINARY_DIR}/${BASE_DIRECTORY}/${PLUGIN_FILE}.desktop)
-    endforeach()
-    file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_SOURCE_DIR}/ ${CMAKE_SOURCE_DIR}/*.desktop.xfce.in)
-    foreach(XFCE_DESKTOP_IN_FILE ${SOURCE_FILES})
-        get_filename_component( BASE_NAME ${XFCE_DESKTOP_IN_FILE} NAME )
-        string(REGEX REPLACE ".desktop.xfce.in$" "" PLUGIN_FILE ${BASE_NAME})
-        get_filename_component( BASE_DIRECTORY ${XFCE_DESKTOP_IN_FILE} PATH )
-        file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${BASE_DIRECTORY})
-        add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} --desktop --keyword=Name --keyword=Comment --keyword=Help -d ${CMAKE_CURRENT_BINARY_DIR} --template ${CMAKE_SOURCE_DIR}/${XFCE_DESKTOP_IN_FILE} -o ${CMAKE_BINARY_DIR}/${BASE_DIRECTORY}/${PLUGIN_FILE}.desktop)
-    endforeach()
 endmacro (add_translations_directory)

 # Apply the right default template.
@@ -115,19 +86,44 @@
     endif ()
 endmacro (create_po_file)

+macro (configure_file_translation SOURCE RESULT PO_DIR)
+    find_program (INTLTOOL_MERGE_EXECUTABLE intltool-merge)
+    set(EXTRA_PO_DIR ${PO_DIR}/extra/)
+    get_filename_component(EXTRA_PO_DIR ${EXTRA_PO_DIR} ABSOLUTE)
+
+    # Intltool can't create a new directory.
+    get_filename_component(SOURCE_DIRECTORY ${SOURCE} DIRECTORY)
+    file(MAKE_DIRECTORY ${SOURCE_DIRECTORY})
+
+    set (INTLTOOL_FLAG "")
+    if (${SOURCE} MATCHES ".desktop")
+        set (INTLTOOL_FLAG "--desktop-style")
+    elseif (${SOURCE} MATCHES ".gschema")
+        set (INTLTOOL_FLAG "--schemas-style")
+    elseif (${SOURCE} MATCHES ".xml")
+        set (INTLTOOL_FLAG "--xml-style")
+    endif ()
+    execute_process (WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${INTLTOOL_MERGE_EXECUTABLE} --quiet ${INTLTOOL_FLAG} ${EXTRA_PO_DIR} ${SOURCE} ${RESULT})
+endmacro ()
+
 macro (add_translations_catalog NLS_PACKAGE)
+    cmake_parse_arguments (ARGS "" "" "DESKTOP_FILES;APPDATA_FILES;SCHEMA_FILES" ${ARGN})
     add_custom_target (pot COMMENT “Building translation catalog.”)
     find_program (XGETTEXT_EXECUTABLE xgettext)
+    find_program (INTLTOOL_EXTRACT_EXECUTABLE intltool-extract)
+
+    set(EXTRA_PO_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extra)

     set(C_SOURCE "")
     set(VALA_SOURCE "")
     set(GLADE_SOURCE "")
-    set(PLUGIN_DESKTOP_SOURCE "")
-    set(DESKTOP_SOURCE "")
-    set(XML_SOURCE "")

     foreach(FILES_INPUT ${ARGN})
-        set(BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
+        if((${FILES_INPUT} MATCHES ${CMAKE_SOURCE_DIR}) OR (${FILES_INPUT} MATCHES ${CMAKE_BINARY_DIR}))
+            set(BASE_DIRECTORY ${FILES_INPUT})
+        else ()
+            set(BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
+        endif ()

         file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.c)
         foreach(C_FILE ${SOURCE_FILES})
@@ -135,42 +131,30 @@
         endforeach()

         file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.vala)
-        foreach(VALA_C_FILE ${SOURCE_FILES})
-            set(VALA_SOURCE ${VALA_SOURCE} ${VALA_C_FILE})
+        foreach(VALA_FILE ${SOURCE_FILES})
+            set(VALA_SOURCE ${VALA_SOURCE} ${VALA_FILE})
         endforeach()

         file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.ui)
-        foreach(GLADE_C_FILE ${SOURCE_FILES})
-            set(GLADE_SOURCE ${GLADE_SOURCE} ${GLADE_C_FILE})
+        foreach(GLADE_FILE ${SOURCE_FILES})
+            set(GLADE_SOURCE ${GLADE_SOURCE} ${GLADE_FILE})
         endforeach()
-
-        file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.desktop.plugin.in)
-        foreach(PLUGIN_DESKTOP_IN_FILE ${SOURCE_FILES})
-            set(PLUGIN_DESKTOP_SOURCE ${PLUGIN_DESKTOP_SOURCE} ${PLUGIN_DESKTOP_IN_FILE})
-        endforeach()
-
-        file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.desktop.xfce.in)
-        foreach(XFCE_DESKTOP_IN_FILE ${SOURCE_FILES})
-            set(XFCE_DESKTOP_SOURCE ${XFCE_DESKTOP_SOURCE} ${XFCE_DESKTOP_IN_FILE})
-        endforeach()
-
-        file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.xml.in)
-        foreach(XML_IN_FILE ${SOURCE_FILES})
-            set(XML_SOURCE ${PLUGIN_DESKTOP_SOURCE} ${XML_IN_FILE})
-        endforeach()
-
-        file (GLOB_RECURSE SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${BASE_DIRECTORY}/*.desktop.in)
-        foreach(DESKTOP_IN_FILE ${SOURCE_FILES})
-            set(DESKTOP_SOURCE ${DESKTOP_SOURCE} ${DESKTOP_IN_FILE})
-        endforeach()
-    endforeach()
-
+    endforeach()
+
+    set (XGETTEXT_C_ARGS --add-comments="/" --keyword="_" --keyword="N_" --keyword="C_:1c,2" --keyword="NC_:1c,2" --keyword="ngettext:1,2" --keyword="Q_:1g")
     set(BASE_XGETTEXT_COMMAND
         ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE}
         -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
-        --add-comments="/" --keyword="_" --keyword="N_" --keyword="C_:1c,2" --keyword="NC_:1c,2" --keyword="ngettext:1,2" --keyword="Q_:1g" --from-code=UTF-8)
-
-   set(CONTINUE_FLAG "")
+        ${XGETTEXT_C_ARGS} --from-code=UTF-8)
+
+    set(EXTRA_XGETTEXT_COMMAND
+        ${XGETTEXT_EXECUTABLE} -d extra
+        -o ${EXTRA_PO_DIR}/extra.pot --no-location --from-code=UTF-8)
+
+    set (INTLTOOL_EXTRACT_COMMAND
+        ${INTLTOOL_EXTRACT_EXECUTABLE} --local --srcdir=/)
+
+    set(CONTINUE_FLAG "")

     IF(NOT "${C_SOURCE}" STREQUAL "")
         add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${C_SOURCE})
@@ -184,25 +168,36 @@

     IF(NOT "${GLADE_SOURCE}" STREQUAL "")
         add_custom_command (TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LGlade ${GLADE_SOURCE})
-        set(CONTINUE_FLAG "-j")
-    ENDIF()
-
-    IF(NOT "${PLUGIN_DESKTOP_SOURCE}" STREQUAL "")
-        add_custom_command (TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -Ldesktop -kName -kDescription -kHelp ${PLUGIN_DESKTOP_SOURCE})
-        set(CONTINUE_FLAG "-j")
-    ENDIF()
-
-    IF(NOT "${XFCE_DESKTOP_SOURCE}" STREQUAL "")
-        add_custom_command (TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -Ldesktop -kName -kComment -kHelp ${XFCE_DESKTOP_SOURCE})
-        set(CONTINUE_FLAG "-j")
-    ENDIF()
-
-    IF(NOT "${DESKTOP_SOURCE}" STREQUAL "")
-        add_custom_command (TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -Ldesktop ${DESKTOP_SOURCE})
-        set(CONTINUE_FLAG "-j")
-    ENDIF()
-
-    IF(NOT "${XML_SOURCE}" STREQUAL "")
-        add_custom_command (TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${BASE_XGETTEXT_COMMAND} ${CONTINUE_FLAG} -LGsettings ${XML_SOURCE})
-    ENDIF()
+    ENDIF()
+
+    # We need to create the directory if one extra content exists.
+    IF((NOT "${ARGS_DESKTOP_FILES}" STREQUAL "") OR (NOT "${ARGS_APPDATA_SOURCE}" STREQUAL "") OR (NOT "${ARGS_SCHEMA_SOURCE}" STREQUAL ""))
+        file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/extra/)
+    ENDIF()
+
+    set(CONTINUE_FLAG "")
+
+    foreach(DESKTOP_SOURCE ${ARGS_DESKTOP_FILES})
+        get_filename_component(DESKTOP_SOURCE ${DESKTOP_SOURCE} ABSOLUTE)
+        add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${INTLTOOL_EXTRACT_COMMAND} --type=gettext/keys ${DESKTOP_SOURCE})
+        get_filename_component(DESKTOP_SOURCE_NAME ${DESKTOP_SOURCE} NAME)
+        add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${EXTRA_XGETTEXT_COMMAND} ${CONTINUE_FLAG} ${XGETTEXT_C_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/tmp/${DESKTOP_SOURCE_NAME}.h)
+        set(CONTINUE_FLAG "-j")
+    endforeach()
+
+    foreach(APPDATA_SOURCE ${ARGS_APPDATA_FILES})
+        get_filename_component(APPDATA_SOURCE ${APPDATA_SOURCE} ABSOLUTE)
+        add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${INTLTOOL_EXTRACT_COMMAND} --type=gettext/xml ${APPDATA_SOURCE})
+        get_filename_component(APPDATA_SOURCE_NAME ${APPDATA_SOURCE} NAME)
+        add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${EXTRA_XGETTEXT_COMMAND} ${CONTINUE_FLAG} ${XGETTEXT_C_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/tmp/${APPDATA_SOURCE_NAME}.h)
+        set(CONTINUE_FLAG "-j")
+    endforeach()
+
+    foreach(SCHEMA_SOURCE ${ARGS_SCHEMA_FILES})
+        get_filename_component(SCHEMA_SOURCE ${SCHEMA_SOURCE} ABSOLUTE)
+        add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${INTLTOOL_EXTRACT_COMMAND} --type=gettext/schemas ${SCHEMA_SOURCE})
+        get_filename_component(SCHEMA_SOURCE_NAME ${SCHEMA_SOURCE} NAME)
+        add_custom_command(TARGET pot WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${EXTRA_XGETTEXT_COMMAND} ${CONTINUE_FLAG} ${XGETTEXT_C_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/tmp/${SCHEMA_SOURCE_NAME}.h)
+        set(CONTINUE_FLAG "-j")
+    endforeach()
 endmacro ()


Add dependency on linker script

Add dependency on linker script

--- cmake/stm32/common.cmake
+++ cmake/stm32/common.cmake
@@ -222,6 +222,15 @@
 function(stm32_add_linker_script TARGET VISIBILITY SCRIPT)
     get_filename_component(SCRIPT "${SCRIPT}" ABSOLUTE)
     target_link_options(${TARGET} ${VISIBILITY} -T "${SCRIPT}")
+    get_target_property(LINK_DEPENDS ${TARGET} INTERFACE_LINK_DEPENDS)
+
+    if(LINK_DEPENDS STREQUAL "LINK_DEPENDS-NOTFOUND")
+        set(LINK_DEPENDS "${SCRIPT}")
+    else()
+        list(APPEND LINK_DEPENDS "${SCRIPT}")
+    endif()
+
+    set_target_properties(${TARGET} PROPERTIES INTERFACE_LINK_DEPENDS "${LINK_DEPENDS}")
 endfunction()

 if(NOT (TARGET STM32::NoSys))


Linux Litex: Remove stray variable

Linux Litex: Remove stray variable

Signed-off-by: Tomasz Michalak <a2fdaa543b4cc5e3d6cd8672ec412c0eb393b86e@antmicro.com>

--- common/cmake/litex.cmake
+++ common/cmake/litex.cmake
@@ -35,7 +35,7 @@
   # ~~~

   set(options USE_XDC DISABLE_DIFF_TEST)
-  set(oneValueArgs NAME LITEX_THIRD_PARTY LITEX_DIR LITEX_BOARD BOARD GENERATE_SCRIPT FIXUP_SCRIPT VIVADO_XDC)
+  set(oneValueArgs NAME LITEX_DIR LITEX_BOARD BOARD GENERATE_SCRIPT FIXUP_SCRIPT VIVADO_XDC)
   set(multiValueArgs FLAGS LITEX_SOURCES EXTERNAL_SOURCES)
   cmake_parse_arguments(
     ADD_LITEX_TEST
@@ -46,7 +46,6 @@
   )

   set(NAME ${ADD_LITEX_TEST_NAME})
-  set(LITEX_THIRD_PARTY ${ADD_LITEX_TEST_LITEX_THIRD_PARTY})
   set(LITEX_DIR ${ADD_LITEX_TEST_LITEX_DIR})
   set(LITEX_BOARD ${ADD_LITEX_TEST_LITEX_BOARD})
   set(LITEX_SOURCES ${ADD_LITEX_TEST_LITEX_SOURCES})


Disable weird rename

Disable weird rename

--- Superbuild/UseBoost.cmake
+++ Superbuild/UseBoost.cmake
@@ -31,11 +31,11 @@
   elseif(CMAKE_GENERATOR MATCHES "Makefiles")
     set(FULL_LIB_NAME "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}")
   else()
-    if(${lib} MATCHES "boost_python-mt")
-		set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python34-mt${CMAKE_STATIC_LIBRARY_SUFFIX}")
-	else()
+    #if(${lib} MATCHES "boost_python-mt")
+	#	set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}boost_python34-mt${CMAKE_STATIC_LIBRARY_SUFFIX}")
+	#else()
 		set(FULL_LIB_NAME_RELEASE "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-	endif()
+	#endif()
     set(FULL_LIB_NAME_DEBUG "${SCI_BOOST_LIBRARY_DIR}/${boost_LIB_PREFIX}${lib}${DEBUG_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
   endif()


Fix variable expansion in ReactNative-application.cmake (#35306)

Summary:
Hi, while adjusting [react-native-screens](https://github.com/software-mansion/react-native-screens) to `0.71.0-rc.0` I encountered the same problems as reported [here](https://github.com/reactwg/react-native-releases/discussions/41#discussioncomment-4085694) by WoLewicki.

Basically inside `CMake`'s `foreach` loop iterator variable is not being expanded to the actual value:

```cmake
foreach(autolinked_library ${AUTOLINKED_LIBRARIES})
    target_link_libraries(autolinked_library common_flags) // <-- here we are literally linking to "autolinked_library".
endforeach()
```

## Changelog

[Android] [Fixed] - Fix Android autolinking failing because of not expanded variable

Pull Request resolved: https://github.com/facebook/react-native/pull/35306

Reviewed By: christophpurrer, cipolleschi

Differential Revision: D41220408

Pulled By: rshest

fbshipit-source-id: 12ce993f0c5227ca7d3c2cc272fe3739126930b3

--- ReactAndroid/cmake-utils/ReactNative-application.cmake
+++ ReactAndroid/cmake-utils/ReactNative-application.cmake
@@ -106,7 +106,7 @@
         include(${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/Android-rncli.cmake)
         target_link_libraries(${CMAKE_PROJECT_NAME} ${AUTOLINKED_LIBRARIES})
         foreach(autolinked_library ${AUTOLINKED_LIBRARIES})
-            target_link_libraries(autolinked_library common_flags)
+            target_link_libraries(${autolinked_library} common_flags)
         endforeach()
 endif()


x0d.pc: better be precise wrt include dir

--- x0d/x0d.pc.cmake
+++ x0d/x0d.pc.cmake
@@ -6,4 +6,4 @@
 Requires: x0d >= @PACKAGE_VERSION@ XzeroBase >= @PACKAGE_VERSION@ XzeroFlow >= @PACKAGE_VERSION@ XzeroHttp >= @PACKAGE_VERSION@
 # Conflicts:
 Libs: -lXzeroHttp -lXzeroFlow -lXzeroBase
-# Cflags:
+Cflags: -I@INCLUDEDIR@


Squashed 'cmake/yacma/' changes from 093555d..9330fda

9330fda yacma: minor piece of polish.

git-subtree-dir: cmake/yacma
git-subtree-split: 9330fda402688f9cc6b428e1e2f8efe543c11c6d

--- YACMAThreadingSetup.cmake
+++ YACMAThreadingSetup.cmake
@@ -58,7 +58,9 @@
 endif()

 # Final report.
-message(STATUS "Extra compiler flags for threading: ${YACMA_THREADING_CXX_FLAGS}")
+if(YACMA_THREADING_CXX_FLAGS)
+  message(STATUS "Extra compiler flags for threading: ${YACMA_THREADING_CXX_FLAGS}")
+endif()

 # Mark as included.
 set(YACMAThreadingSetupIncluded YES)


test dart.

test dart.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,6 +1,9 @@
 # Dashboard is opened for submissions for a 24 hour period starting at
 # the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
 SET (NIGHTLY_START_TIME "21:00:00 EDT")
+
+SET (BUILD_NAME "${CMAKE_SYSTEM}-${CMAKE_CXX_COMPILER}-${CMAKE_BUILD_TYPE}")
+

 # Dart server to submit results (used by client)
 SET (DROP_METHOD "http")
@@ -32,7 +35,7 @@
 SET (DOXYGEN_URL "http://${DROP_SITE}/OrfeoToolbox/Doxygen/html/" )

 SET (USE_GNATS "On")
-SET (GNATS_WEB_URL "http://nemo/bugTracker/query.php?projects=6&status%5B%5D=1&status%5B%5D=2&status%5B%5D=3&status%5B%5D=4&status%5B%5D=6&op=doquery")
+SET (GNATS_WEB_URL "http://nemo/http://nemo/phpBugTracker/phpbt-1.0.1/")

 # Continuous email delivery variables
 #SET (CONTINUOUS_FROM "lorensen@crd.ge.com")


[SUPERBUILD] fixed BOOST->Boost

[SUPERBUILD] fixed BOOST->Boost

--- SuperBuild/External_Boost.cmake
+++ SuperBuild/External_Boost.cmake
@@ -1,5 +1,5 @@
 #These need to be unique globally
-set(externalProjName BOOST)
+set(externalProjName Boost)
 set(proj Boost)

 # Set dependency list


PERF: itk n4 performance improvements

PERF: itk n4 performance improvements

--- SuperBuild/External_ITKv5.cmake
+++ SuperBuild/External_ITKv5.cmake
@@ -149,7 +149,7 @@
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git)
   # set(${proj}_REPOSITORY ${git_protocol}://github.com/stnava/ITK.git)
-  set(${proj}_GIT_TAG 4c570ecc51cba78e698ca8dbe3afd5471eb8a149) ## 20181107
+  set(${proj}_GIT_TAG a369470c93c433bb34a3557091d8caf2c2bb637e ) ## 20181107
   set(ITK_VERSION_ID ITK-5.0) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID

   ExternalProject_Add(${proj}


Bring LSB_CODENAME back, needed for Fivox w/ broken ITK on Ubuntu trusty

--- LSBInfo.cmake
+++ LSBInfo.cmake
@@ -9,6 +9,9 @@
 find_program(LSB_RELEASE_EXECUTABLE lsb_release)

 if(LSB_RELEASE_EXECUTABLE)
+  execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -sc
+    OUTPUT_VARIABLE LSB_CODENAME OUTPUT_STRIP_TRAILING_WHITESPACE)
+
   execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -sr
     OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)

@@ -17,4 +20,5 @@
 else()
   set(LSB_DISTRIBUTOR_ID "unknown")
   set(LSB_RELEASE "unknown")
+  set(LSB_CODENAME "unknown")
 endif()


COMP: support cmake 2.9

COMP: support cmake 2.9

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -1,11 +1,5 @@
 SET(cmake_version_required "2.8")
-SET(cmake_version_required_regex "2.8.*")
 SET(cmake_version_required_dash "2-8")
-
-IF(NOT CMAKE_VERSION MATCHES "${cmake_version_required_regex}")
-  SET(err "error: CTK SuperBuild requires CMake version ${cmake_version_required}")
-  MESSAGE(FATAL_ERROR "${err}")
-ENDIF()

 CMAKE_MINIMUM_REQUIRED(VERSION ${cmake_version_required})


update CLANG_TIDY_RUNNER default value

update CLANG_TIDY_RUNNER default value

--- CMake/StaticAnalyzers.cmake
+++ CMake/StaticAnalyzers.cmake
@@ -9,7 +9,7 @@
   OFF
 )
 set(CLANG_TIDY_RUNNER
-    "run-clang-tidy-9"
+    "run-clang-tidy-10"
     CACHE STRING "Name of clang-tidy runner"
 )


added THRUST_VERSION as required variable in FindThrust.cmake

--- CMake/cuda/FindThrust.cmake
+++ CMake/cuda/FindThrust.cmake
@@ -29,4 +29,4 @@
 # Check for required components
 set( THRUST_FOUND TRUE )

-find_package_handle_standard_args( Thrust REQUIRED_VARS THRUST_INCLUDE_DIR )
+find_package_handle_standard_args( Thrust REQUIRED_VARS THRUST_INCLUDE_DIR THRUST_VERSION )


Fix ICONV_CONST. For some reason cmake does not want to define to nothing

--- extras/buildsystem/cmake/config.h.cmake
+++ extras/buildsystem/cmake/config.h.cmake
@@ -314,6 +314,9 @@
 #cmakedefine HAVE___FSETLOCKING
 #cmakedefine HAVE___VA_COPY
 #cmakedefine ICONV_CONST ${ICONV_CONST}
+#ifndef ICONV_CONST
+# define ICONV_CONST
+#endif
 #cmakedefine INTDIV0_RAISES_SIGFPE
 #cmakedefine LIBEXT "${LIBEXT}"
 #cmakedefine NDEBUG


CommonCPack tweaks for vizsh

CommonCPack tweaks for vizsh

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -25,6 +25,7 @@
 set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
 set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
 set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
+set(CPACK_PACKAGE_VERSION ${VERSION})
 set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE.txt)

 # Default component definition
@@ -103,7 +104,11 @@
     if(CPACK_PACKAGE_NAME_EXTRA)
       set(CPACK_DEBIAN_PACKAGE_VERSION
         "${CPACK_PACKAGE_VERSION}~${CPACK_PACKAGE_NAME_EXTRA}${LSB_RELEASE}")
-
+      set(CPACK_PACKAGE_FILE_NAME
+        "${CPACK_PACKAGE_NAME}-${CPACK_DEBIAN_PACKAGE_VERSION}.${CMAKE_SYSTEM_PROCESSOR}")
+    else()
+      set(CPACK_DEBIAN_PACKAGE_VERSION
+        "${CPACK_PACKAGE_VERSION}~${LSB_RELEASE}")
       set(CPACK_PACKAGE_FILE_NAME
         "${CPACK_PACKAGE_NAME}-${CPACK_DEBIAN_PACKAGE_VERSION}.${CMAKE_SYSTEM_PROCESSOR}")
     endif()
@@ -120,7 +125,10 @@

 set(CPACK_STRIP_FILES TRUE)
 include(InstallRequiredSystemLibraries)
+
+set(CPACK_PACKAGE_FILE_NAME_BACKUP "${CPACK_PACKAGE_FILE_NAME}")
 include(CPack)
+set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME_BACKUP}")

 include(UploadPPA)
 if(UPLOADPPA_FOUND)


Add support to exclude files from CommonCTest

--- CommonCTest.cmake
+++ CommonCTest.cmake
@@ -1,5 +1,9 @@
 # Copyright (c) 2010 Daniel Pfeifer
 #               2010-2014, Stefan Eilemann <eile@eyescale.ch>
+#
+# Input:
+# * TEST_LIBRARIES link each test executables against these libraries
+# * EXCLUDE_FROM_TESTS a relative paths to test files to exclude; optional

 if(NOT WIN32) # tests want to be with DLLs on Windows - no rpath
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests)
@@ -8,6 +12,9 @@
 include_directories(${CMAKE_CURRENT_LIST_DIR}/cpp ${CMAKE_CURRENT_SOURCE_DIR})

 file(GLOB_RECURSE TEST_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
+foreach(FILE ${EXCLUDE_FROM_TESTS})
+  list(REMOVE_ITEM TEST_FILES ${FILE})
+endforeach()
 list(SORT TEST_FILES)

 set(ALL_TESTS)
@@ -29,7 +36,7 @@
   if(COVERAGE)
     add_dependencies(${NAME} lcov-clean)
   endif()
-endforeach(FILE ${TEST_FILES})
+endforeach()

 add_custom_target(runtests
   COMMAND ${CMAKE_CTEST_COMMAND} \${ARGS} DEPENDS ${ALL_TESTS}


Finished CMake module for finding R. Fixes #77.

--- library/cmake/Modules/FindR.cmake
+++ library/cmake/Modules/FindR.cmake
@@ -1,62 +1,93 @@
-# -*-cmake-*-
+# - Find R
 #
-# Nightwave Studios - FindR.cmake
-# https://www.nightwave.co
+# This module is based on:
+# 	Nightwave Studios - FindR.cmake
+# 	https://www.nightwave.co
 #
-# Search for R library files
+# The following variables are set:
+#   R_FOUND        - System has R
+#   R_HOME_DIR     - Home directory of R
+#   R_INCLUDE_DIRS - Include directory for R
+#   R_VERSION      - Version of R
+#   R_LIBRARIES    - Libraries you need to link to
 #
-# Once loaded this will define:
-#   R_FOUND       - system has R
-#   R_INCLUDE_DIR - include directory for R
-#   R_LIBRARY_DIR - library directory for R
-#   R_LIBRARIES   - libraries you need to link to
+# The following components are supported:
+#   Rcpp           - Seamless R and C++ Integration
+#

+FIND_PROGRAM(R_RSCRIPT_EXECUTABLE NAMES Rscript)

+if(R_RSCRIPT_EXECUTABLE)
+	execute_process(
+		COMMAND
+			Rscript -e "cat(R.home())"
+			OUTPUT_VARIABLE R_HOME_DIR
+			OUTPUT_STRIP_TRAILING_WHITESPACE
+	)

-# Find headers
-find_path(R_INCLUDE_DIR
-	NAMES "R.h"
-	PATHS
-	"[HKEY_LOCAL_MACHINE\\SOFTWARE\\R\\Current;BinPath]"
-	"$ENV{R_LOCATION}"
-	"$ENV{R_LOCATION}/include"
-	"$ENV{R_LOCATION}/include/R"
-	"$ENV{R_HOME}/include"
-	/usr/include/
-	/usr/include/R
-	/usr/local/include
-	/usr/local/include/R
-	/opt/local/include/R
+	execute_process(
+		COMMAND
+			Rscript -e "cat(R.home('include'))"
+			OUTPUT_VARIABLE R_INCLUDE_DIRS
+			OUTPUT_STRIP_TRAILING_WHITESPACE
+	)
+
+	execute_process(
+		COMMAND
+			Rscript -e "cat(R.version.string)"
+			OUTPUT_VARIABLE R_VERSION
+			OUTPUT_STRIP_TRAILING_WHITESPACE
+	)
+	string(REGEX REPLACE "[a-zA-Z]|[(].*|[ ]" "" R_VERSION ${R_VERSION})
+
+	find_library(R_LIBRARIES
+		NAMES libR R
+		PATHS "${R_HOME_DIR}/*"
+	)
+
+	if(R_FIND_COMPONENTS)
+		foreach(component ${R_FIND_COMPONENTS})
+			if(component STREQUAL "Rcpp")
+				execute_process(
+					COMMAND
+					Rscript -e "library(Rcpp) ; cat(path.package('Rcpp'))"
+					OUTPUT_VARIABLE R_RCPP_HOME_DIR
+					OUTPUT_STRIP_TRAILING_WHITESPACE
+				)
+				find_path(R_RCPP_INCLUDE_DIR
+					NAMES Rcpp.h
+					PATHS "${R_RCPP_HOME_DIR}/*"
+				)
+				if(R_RCPP_INCLUDE_DIR)
+					list(APPEND R_INCLUDE_DIRS
+						${R_RCPP_INCLUDE_DIR})
+					set(R_Rcpp_FOUND TRUE)
+				endif()
+				unset(R_RCPP_HOME_DIR)
+				unset(R_RCPP_INCLUDE_DIR)
+			endif()
+		endforeach()
+	endif()
+endif()
+
+MARK_AS_ADVANCED(
+	R_HOME
+	R_INCLUDE_DIRS
+	R_VERSION
+	R_LIBRARIES
 )

-# Find compiled library file
-find_library(R_LIBRARIES
-	NAMES libR R
-	PATHS
-	"[HKEY_LOCAL_MACHINE\\SOFTWARE\\R\\Current;BinPath]"
-	"$ENV{R_LOCATION}/R/.libs"
-	"$ENV{R_LOCATION}/lib"
-	"$ENV{R_HOME}/lib"
-	/usr/lib64
-	/usr/local/lib64
-	/opt/local/lib64
-	/usr/lib
-	/usr/local/lib
-	/opt/local/lib
-	DOC "R library"
+INCLUDE(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(R
+	FOUND_VAR
+		R_FOUND
+	REQUIRED_VARS
+		R_RSCRIPT_EXECUTABLE
+		R_HOME_DIR
+		R_INCLUDE_DIRS
+		R_VERSION
+		R_LIBRARIES
+	VERSION_VAR
+		R_VERSION
+	HANDLE_COMPONENTS
 )
-
-# Get path to library
-get_filename_component(R_LIBRARY_DIR ${R_LIBRARIES} PATH)
-
-# Set variables as advanced (hide from GUI unless "show advanced checked")
-mark_as_advanced(R_LIBRARIES R_LIBRARY_DIR R_INCLUDE_DIR)
-
-# Set R_FOUND and print message
-INCLUDE(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
-	R
-	DEFAULT_MSG
-	R_LIBRARIES
-	R_INCLUDE_DIR
-)


modifying config file to reflect new php files and removal of mongo.php

--- config.cmake
+++ config.cmake
@@ -1,2 +1,2 @@
 HHVM_EXTENSION(mongo mongoCreator.cpp mongoClient.cpp mongoCursor.cpp)
-HHVM_SYSTEMLIB(mongo mongo.php)
+HHVM_SYSTEMLIB(mongo mongoClient.php mongoCursor.php)


Write STFC in the copyright

Write STFC in the copyright

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -2,6 +2,7 @@
 # Author: Benjamin A Thomas
 # Author: Edoardo Pasca
 # Copyright 2017 University College London
+# Copyright 2017 Science Technology Facilities Council
 #
 # This file is part of the CCP PETMR Synergistic Image Reconstruction Framework (SIRF) SuperBuild.
 #


Added missing type for CMake option.

Added missing type for CMake option.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -385,7 +385,7 @@
     -DMITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES}
     -DMITK_ACCESSBYITK_FLOATING_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES}
     -DMITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES}
-    -DMITK_ACCESSBYITK_VECTOR_PIXEL_TYPES=${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}
+    -DMITK_ACCESSBYITK_VECTOR_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_VECTOR_PIXEL_TYPES}
     -DMITK_ACCESSBYITK_DIMENSIONS:STRING=${MITK_ACCESSBYITK_DIMENSIONS}
     # --------------- External project dirs ---------------
     -DMITK_KWSTYLE_EXECUTABLE:FILEPATH=${MITK_KWSTYLE_EXECUTABLE}


COMP: Support Ninja build system.

COMP: Support Ninja build system.

Two INSTALL_COMMAND arguments were added to the superbuild external
project; with Ninja build system this generated an invalid command.
Removing the duplicate INSTALL_COMMAND fixes the issue.

Setting INSTALL_COMMAND to "" normally disables the install command
being generated; however when both arguments were present the
variable had the array value ["" ""], and so is still added to
build.ninja as "" "", which is invalid.

I'm not certain why the build still succeeded using generators other
than Ninja.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -180,7 +180,6 @@
     -D${LOCAL_PROJECT_NAME}_SUPERBUILD:BOOL=OFF
     -DEXTENSION_SUPERBUILD_BINARY_DIR:PATH=${${LOCAL_PROJECT_NAME}_BINARY_DIR}
     -DSlicer_EXTENSION_SOURCE_DIRS:STRING=${Slicer_EXTENSION_SOURCE_DIRS}
-  INSTALL_COMMAND ""
   DEPENDS
     ${${LOCAL_PROJECT_NAME}_DEPENDS}
   )


STYLE: Consistently reference *_SUPERBUILD CMake variables

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -36,7 +36,7 @@

 ExternalProject_Include_Dependencies(${proj}
   PROJECT_VAR proj
-  SUPERBUILD_VAR ${PROJECT_NAME}_SUPERBUILD
+  SUPERBUILD_VAR ${LOCAL_PROJECT_NAME}_SUPERBUILD
   )

 ExternalProject_Add(${proj}
@@ -55,8 +55,8 @@
     -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=${CMAKE_CXX_STANDARD_REQUIRED}
     -DCMAKE_CXX_EXTENSIONS:BOOL=${CMAKE_CXX_EXTENSIONS}
     # Superbuild
-    -D${EXTENSION_NAME}_SUPERBUILD:BOOL=OFF
     -DEXTENSION_SUPERBUILD_BINARY_DIR:PATH=${${EXTENSION_NAME}_BINARY_DIR}
+    -D${LOCAL_PROJECT_NAME}_SUPERBUILD:BOOL=OFF
   INSTALL_COMMAND ""
   DEPENDS
     ${${LOCAL_PROJECT_NAME}_DEPENDS}


libarea doesn't depend on parts from CMAKE_INSTALL_LIBDIR

Fixes:
 -- Installing: /home/abuild/rpmbuild/BUILDROOT/FreeCAD-0.15.99+git20150727.1925-1.1.x86_64/usr/lib64/FreeCAD/lib/area.so
 CMake Error at src/Mod/Path/libarea/cmake_install.cmake:53 (file):
   file RPATH_CHANGE could not write new RPATH:

     /usr/lib64/FreeCAD/lib

   to the file:

     /home/abuild/rpmbuild/BUILDROOT/FreeCAD-0.15.99+git20150727.1925-1.1.x86_64/usr/lib64/FreeCAD/lib/area.so

   No valid ELF RPATH or RUNPATH entry exists in the file;

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -236,8 +236,8 @@
     if(WIN32)
         set_target_properties(${ProjectName} PROPERTIES DEBUG_OUTPUT_NAME ${OutputName}_d)
     else(WIN32)
-        # FreeCADBase, SMDS, Driver and MEFISTO2 libs don't depend on parts from CMAKE_INSTALL_LIBDIR
-        if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2)$")
+        # FreeCADBase, SMDS, Driver, MEFISTO2 and area libs don't depend on parts from CMAKE_INSTALL_LIBDIR
+        if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2|area)$")
             if(${ARGC} STREQUAL 4)
                 set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
             else(${ARGC} STREQUAL 4)