- Fix adding of dependency libraries for Android

--- cmake/Modules/AndroidApkBuild.cmake
+++ cmake/Modules/AndroidApkBuild.cmake
@@ -118,7 +118,11 @@
     # Install dependency libraries
     set ( ANDROID_DEPENDENCIES_STRING )
     foreach(lib ${Dependency_Libs})
-        # Problem: generator strings
+        add_custom_command ( TARGET ${Target_Name}
+            POST_BUILD
+            COMMAND ${CMAKE_COMMAND} -E copy ${lib} ${ANDROID_LIB_OUTPUT_DIRECTORY}
+            )
+	# Problem: generator strings
         # Solution: regex
         string ( REGEX REPLACE "\\$<TARGET_FILE:([A-Za-z0-9_\-]+)>" "\\1" _LIBNAME_STRIPPED "${lib}" )
 	# Strip off lib* part, to avoid liblib* on Android side
@@ -208,7 +212,7 @@
             WORKING_DIRECTORY ${BUILD_OUTDIR}
             )
     else()
-        # Debug mode is quite simple :)
+        # Debug mode is quite simple
         add_custom_command ( TARGET ${Target_Name}
             POST_BUILD
             COMMAND ${ANDROID_ANT_PROGRAM} ${ANDROID_ANT_COMMON_PROPERTIES} debug


cmake: model 60 is a haswell cpu

cmake: model 60 is a haswell cpu

Thanks Georgios for the info

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -73,6 +73,8 @@
          # Any recent Intel CPU except NetBurst
          if(_cpu_model EQUAL 62)
             set(TARGET_ARCHITECTURE "ivy-bridge")
+         elseif(_cpu_model EQUAL 60)
+            set(TARGET_ARCHITECTURE "haswell")
          elseif(_cpu_model EQUAL 58)
             set(TARGET_ARCHITECTURE "ivy-bridge")
          elseif(_cpu_model EQUAL 47) # Xeon E7 4860


CMake: Remove hardcoded projectname

CMake: Remove hardcoded projectname

While updating Cura I noticed that translation files were still generated for Uranium (in a clean Cura build).
The reason for this is a hardcoded path, which needs to be replaced with CMake's PROJECT_NAME.

I remember there were discussions on JIRA about odd behaviour while checking our translations.
This might be one of the reasons...

Not sure which JIRA issue it really belongs to, but I set it as:
Contributes to CURA-570

--- cmake/UraniumTranslationTools.cmake
+++ cmake/UraniumTranslationTools.cmake
@@ -108,6 +108,6 @@
         TARGETS_FOR_PO_FILES(${language})
         TARGETS_FOR_MO_FILES(${language})
     endforeach()
-    install(DIRECTORY ${CMAKE_BINARY_DIR}/resources DESTINATION ${CMAKE_INSTALL_DATADIR}/uranium/)
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/resources DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/)
 endif()
-ENDMACRO()+ENDMACRO()


Teach add_sphinx_target() to respect the LLVM_INSTALL_TOOLCHAIN_ONLY CMake
option.

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

--- cmake/modules/AddSphinxTarget.cmake
+++ cmake/modules/AddSphinxTarget.cmake
@@ -39,16 +39,18 @@
     add_dependencies(sphinx ${SPHINX_TARGET_NAME})

     # Handle installation
-    if (builder STREQUAL man)
-      # FIXME: We might not ship all the tools that these man pages describe
-      install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
-              DESTINATION share/man/man1)
+    if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+      if (builder STREQUAL man)
+        # FIXME: We might not ship all the tools that these man pages describe
+        install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
+                DESTINATION share/man/man1)

-    elseif (builder STREQUAL html)
-      install(DIRECTORY "${SPHINX_BUILD_DIR}"
-              DESTINATION "share/doc/${project}")
-    else()
-      message(WARNING Installation of ${builder} not supported)
+      elseif (builder STREQUAL html)
+        install(DIRECTORY "${SPHINX_BUILD_DIR}"
+                DESTINATION "share/doc/${project}")
+      else()
+        message(WARNING Installation of ${builder} not supported)
+      endif()
     endif()
   endif()
 endfunction()


remove extra messages

remove extra messages

--- cmake_modules/install_library.cmake
+++ cmake_modules/install_library.cmake
@@ -49,10 +49,6 @@
   get_filename_component( _lib ${_target_library} NAME )
   list( APPEND PACKAGE_LIB_DEPENDS ${CMAKE_INSTALL_PREFIX}/lib/${_lib} )

-  message( STATUS "depends: ${PACKAGE_LIB_DEPENDS}" )
-
-
-
   # construct Cflags arguments for pkg-config file
   string( CONCAT PACKAGE_CFLAGS ${PACKAGE_CFLAGS} ${CMAKE_C_FLAGS} )
   foreach(var IN LISTS PACKAGE_INCLUDE_DIRS )


Define openmp library name variable

Define openmp library name variable

Former-commit-id: a0f0fd3c89ae792f7871198c97f31afbc413496c

--- cmake-modules/FindOpenMP.cmake
+++ cmake-modules/FindOpenMP.cmake
@@ -103,6 +103,7 @@
         if(OMP_COMPILES AND TARGET OpenMP::OpenMP_CXX)
             add_library(openmp::openmp INTERFACE IMPORTED)
             target_link_libraries(openmp::openmp INTERFACE OpenMP::OpenMP_CXX)
+            get_target_property(OMP_LIBNAME OpenMP::OpenMP_CXX INTERFACE_COMPILE_OPTIONS)
         endif()
     endif()
 endif()
@@ -158,14 +159,15 @@
         # Make a target wrapper for a library
         if(IS_ABSOLUTE ${lib})
             get_filename_component(libname ${lib} NAME_WE)
-            set(OMP_DUMMY_TARGET openmp::dummy_${libname})
         else()
-            set(OMP_DUMMY_TARGET openmp::dummy_${lib})
+            set(libname ${lib})
         endif()
-        define_omp_target(${OMP_DUMMY_TARGET} ${lib})
-        check_omp_compiles(${OMP_DUMMY_TARGET})
+        set(OMP_TARGET openmp::_${libname})
+        define_omp_target(${OMP_TARGET} ${lib})
+        check_omp_compiles(${OMP_TARGET})
         if(OMP_COMPILES)
             define_omp_target("openmp::openmp" ${lib})
+            set(OMP_LIBNAME ${libname})
             break()
         endif()
     endforeach()
@@ -173,6 +175,8 @@

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(OpenMP DEFAULT_MSG OMP_COMPILES)
-
-
+find_package_handle_standard_args(OpenMP
+        FOUND_VAR OpenMP_FOUND
+        REQUIRED_VARS OMP_COMPILES OMP_LIBNAME
+        FAIL_MESSAGE "Failed to find OpenMP"
+        )


(maint) Look for .dylib in Findcpp-pcp-client.cmake

This is needed on OS X after PCP-372.

--- cmake/Findcpp-pcp-client.cmake
+++ cmake/Findcpp-pcp-client.cmake
@@ -2,5 +2,5 @@
 find_dependency(cpp-pcp-client
     DISPLAY "cpp-pcp-client"
     HEADERS "cpp-pcp-client/connector/connection.hpp"
-    LIBRARIES "libcpp-pcp-client.so" "cpp-pcp-client"
+    LIBRARIES "libcpp-pcp-client.so" "libcpp-pcp-client.dylib" "cpp-pcp-client"
     REQUIRED)


cmake: gcc warning flags: reformat

cmake: gcc warning flags: reformat

--- cmake/HextEnableWarnings.cmake
+++ cmake/HextEnableWarnings.cmake
@@ -11,22 +11,63 @@
 # G++
 if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
   add_definitions(
-    "-pedantic" "-pedantic-errors" "-Wall" "-Wcast-align" "-Wcast-qual"
-    "-Wchar-subscripts" "-Wcomment" "-Wconversion" "-Wctor-dtor-privacy"
-    "-Wdisabled-optimization" "-Weffc++" "-Wextra" "-Wfloat-equal"
-    "-Wformat=2" "-Wformat-nonliteral" "-Wformat-security" "-Wformat-y2k"
-    "-Wimport" "-Winit-self" "-Winvalid-pch" "-Wlogical-op"
-    "-Wlong-long" "-Wmissing-braces" "-Wmissing-field-initializers"
-    "-Wmissing-format-attribute" "-Wmissing-include-dirs"
-    "-Woverloaded-virtual" "-Wpacked" "-Wparentheses" "-Wpointer-arith"
-    "-Wredundant-decls" "-Wreturn-type" "-Wsequence-point" "-Wshadow"
-    "-Wsign-compare" "-Wsign-promo" "-Wstack-protector" "-Wstrict-aliasing=2"
-    "-Wstrict-null-sentinel" "-Wstrict-overflow" "-Wswitch"
-    "-Wtrigraphs" "-Wundef" "-Wuninitialized" "-Wunknown-pragmas"
-    "-Wunreachable-code" "-Wunused"
-    "-Wunused-function" "-Wunused-label" "-Wunused-parameter" "-Wunused-value"
-    "-Wunused-variable" "-Wvariadic-macros" "-Wvolatile-register-var"
-    "-Wwrite-strings" "-Wmissing-noreturn" "-Wsign-conversion"
+    "-Wall"
+    "-Wcast-align"
+    "-Wcast-qual"
+    "-Wchar-subscripts"
+    "-Wcomment"
+    "-Wconversion"
+    "-Wctor-dtor-privacy"
+    "-Wdisabled-optimization"
+    "-Weffc++"
+    "-Wextra"
+    "-Wfloat-equal"
+    "-Wformat-nonliteral"
+    "-Wformat-security"
+    "-Wformat-y2k"
+    "-Wformat=2"
+    "-Wimport"
+    "-Winit-self"
+    "-Winvalid-pch"
+    "-Wlogical-op"
+    "-Wlong-long"
+    "-Wmissing-braces"
+    "-Wmissing-field-initializers"
+    "-Wmissing-format-attribute"
+    "-Wmissing-include-dirs"
+    "-Wmissing-noreturn"
+    "-Woverloaded-virtual"
+    "-Wpacked"
+    "-Wparentheses"
+    "-Wpointer-arith"
+    "-Wredundant-decls"
+    "-Wreturn-type"
+    "-Wsequence-point"
+    "-Wshadow"
+    "-Wsign-compare"
+    "-Wsign-conversion"
+    "-Wsign-promo"
+    "-Wstack-protector"
+    "-Wstrict-aliasing=2"
+    "-Wstrict-null-sentinel"
+    "-Wstrict-overflow"
+    "-Wswitch"
+    "-Wtrigraphs"
+    "-Wundef"
+    "-Wuninitialized"
+    "-Wunknown-pragmas"
+    "-Wunreachable-code"
+    "-Wunused"
+    "-Wunused-function"
+    "-Wunused-label"
+    "-Wunused-parameter"
+    "-Wunused-value"
+    "-Wunused-variable"
+    "-Wvariadic-macros"
+    "-Wvolatile-register-var"
+    "-Wwrite-strings"
+    "-pedantic"
+    "-pedantic-errors"
     # Unused switches:
     # "-Wswitch-enum": Listing every enum brings chaos, especially for GumboTag.
     # "-Wswitch-default": generated ragel code uses switch without default,


bugfix for OpenCL detection with Intel OpenCL SDK 1.2 on linux (Bug #3140)

--- cmake/OpenCVDetectOpenCL.cmake
+++ cmake/OpenCVDetectOpenCL.cmake
@@ -20,10 +20,14 @@
               DOC "OpenCL include directory"
               NO_DEFAULT_PATH)

-    if (X86_64)
+    if (X86_64 AND WIN32)
       set(OPENCL_POSSIBLE_LIB_SUFFIXES lib/Win64 lib/x86_64 lib/x64)
-    elseif (X86)
+    elseif (X86 AND WIN32)
       set(OPENCL_POSSIBLE_LIB_SUFFIXES lib/Win32 lib/x86)
+    elseif (X86_64 AND UNIX)
+      set(OPENCL_POSSIBLE_LIB_SUFFIXES lib64 lib)
+    elseif (X86 AND UNIX)
+      set(OPENCL_POSSIBLE_LIB_SUFFIXES lib32 lib)
     endif()

     find_library(OPENCL_LIBRARY


[CMake] Bump SSE to SSE2 for 32 bit systems.

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -77,7 +77,7 @@
   endif()
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES i686)
   message(STATUS "Found a 32bit system")
-  set(FP_MATH_FLAGS "-msse -mfpmath=sse")
+  set(FP_MATH_FLAGS "-msse2 -mfpmath=sse")
   if(CMAKE_COMPILER_IS_GNUCXX)
     message(STATUS "Found GNU compiler collection")
     set(ROOT_ARCHITECTURE linux)


Changed stray ) to }

Changed stray ) to }

--- libcpu/config.h.cmake
+++ libcpu/config.h.cmake
@@ -1,4 +1,4 @@
-#cmakedefine HAVE_SYS_RESOURCE_H ${HAVE_SYS_RESOURCE_H)
+#cmakedefine HAVE_SYS_RESOURCE_H ${HAVE_SYS_RESOURCE_H}
 #cmakedefine HAVE_GETRUSAGE ${HAVE_GETRUSAGE}

 #cmakedefine HAVE_ATTRIBUTE_PACKED ${HAVE_ATTRIBUTE_PACKED}


remove spurious VERSION_VAR (fixes #711)

--- modules/gpu/FindNPP.cmake
+++ modules/gpu/FindNPP.cmake
@@ -108,7 +108,6 @@
 	REQUIRED_VARS
 		CUDA_NPP_INCLUDES
 		CUDA_NPP_LIBRARIES
-	VERSION_VAR
 		NPP_VERSION)

 if(APPLE)


Remove the old function

Remove the old function

--- functions.cmake
+++ functions.cmake
@@ -650,10 +650,6 @@
         set(DEFINITIONS_DIR ${ARGV0})
     endif()
     install(DIRECTORY ${DEFINITIONS_DIR}/ DESTINATION share/vespa/configdefinitions FILES_MATCHING PATTERN "*.def")
-endfunction()
-
-function(install_config_definitions)
-    install(DIRECTORY ${ARGV0}/ DESTINATION share/vespa/configdefinitions FILES_MATCHING PATTERN "*.def")
 endfunction()

 function(install_java_artifact NAME)


removing debug print

removing debug print

--- python_module/cmake/add_python_export_library.cmake
+++ python_module/cmake/add_python_export_library.cmake
@@ -24,12 +24,6 @@
   get_filename_component(PYTHON_PACKAGE_NAME "${TMP}.txt" NAME_WE)
   # This grabs the parent of the leaf
   get_filename_component(PYTHON_MODULE_DIRECTORY_PREFIX "${TMP}.txt" PATH)
-
-  message("TMP: ${TMP}")
-  message("PYTHON_MODULE_DIRECTORY: ${PYTHON_MODULE_DIRECTORY}")
-  message("PYTHON_MODULE_DIRECTORY_PREFIX: ${PYTHON_MODULE_DIRECTORY_PREFIX}")
-  message("PYTHON_PACKAGE_NAME: ${PYTHON_PACKAGE_NAME}")
-  message("CATKIN_DEVEL_PREFIX: ${CATKIN_DEVEL_PREFIX}")

   set(SETUP_PY "${CMAKE_CURRENT_SOURCE_DIR}/setup.py")


update: hunter-gate config

update: hunter-gate config


Disable build RPATHs for wrapped languages.

Previously, the RPATHs for the build directory were still being
encoded in the distributed language packages. The disabling of the
build rpath needs to occur on this final shared library, and not on
the dependent SimpleITK libraries.

Change-Id: I5be7aea2dc60410e82ddc81a34557ade53578c45

--- CMake/sitkProjectLanguageCommon.cmake
+++ CMake/sitkProjectLanguageCommon.cmake
@@ -33,6 +33,13 @@
 endif()
 if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY OR CMAKE_PROJECT_NAME STREQUAL "SimpleITK" )
   set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
+endif()
+
+
+# Since most language libraries are not installed with CMake, the
+# RPATH does not get fixed up during installation. So skip the RPATH
+if(NOT DEFINED CMAKE_SKIP_BUILD_RPATH)
+  set(CMAKE_SKIP_BUILD_RPATH 1)
 endif()

 if(NOT TARGET dist)


add compiler visibility

add compiler visibility

git-svn-id: dea4c50957f75874cf9791776be29d2e34106c50@121 ef0d8562-5c19-0410-972e-841db63a069c

--- CMakeModules/CompilerVisibility.cmake
+++ CMakeModules/CompilerVisibility.cmake
@@ -15,4 +15,4 @@
     ADD_DEFINE(HAVE_GCC_VISIBILITY)
   ENDIF(HAVE_VISIBILITY)
 ENDIF(NOT WIN32)
-ENDMACRO(TEST_COMPILER_VISIBILITY)+ENDMACRO(TEST_COMPILER_VISIBILITY)


Revert precompiled headers part of recent MinGW patch (r9640). This broke the build in MSVC 2005 which complained of inconsistent build settings between precompiled headers and source files on the second and future builds. Really this patch should not have been touching MSVC if it was aimed at MinGW since clearly it wasn't tested there.

--- CMake/Utils/PrecompiledHeader.cmake
+++ CMake/Utils/PrecompiledHeader.cmake
@@ -15,22 +15,12 @@

 macro(use_precompiled_header TARGET HEADER_FILE SRC_FILE)
   get_filename_component(HEADER ${HEADER_FILE} NAME)
-  get_target_property(SOURCE_FILES ${TARGET} SOURCES)

   if (MSVC)
-    get_filename_component(BASENAME ${HEADER_FILE} NAME_WE)
-	set(PREC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/${BASENAME}.pch")
-	foreach(SOURCE_FILE ${SOURCE_FILES})
-	  get_filename_component(FEXT ${SOURCE_FILE} EXT)
-	  if (FEXT STREQUAL ".cpp")
-	    set_source_files_properties(${SOURCE_FILE}
-	      PROPERTIES COMPILE_FLAGS "/Yu\"${HEADER}\" /Fp\"${PREC_HEADER}\""
-	      OBJECT_DEPENDS "${PREC_HEADER}")
-	  endif ()
-	endforeach()
+	add_definitions(/Yu"${HEADER}")
     set_source_files_properties(${SRC_FILE}
-      PROPERTIES COMPILE_FLAGS "/Yc\"${HEADER}\" /Fp\"${PREC_HEADER}\""
-	  OBJECT_OUTPUTS "${PREC_HEADER}" OBJECT_DEPENDS "")
+      PPROPERTIES COMPILE_FLAGS /Yc"${HEADER}"
+	)

   elseif (CMAKE_COMPILER_IS_GNUCXX)
     # disabled because it seems to increase compile time


Try to fix cmake macOS build

Try to fix cmake macOS build

Signed-off-by: falkTX <d7e5958cbb080ba57e41fb602ade747e1a2da17c@falktx.com>

--- cmake/DPF-plugin.cmake
+++ cmake/DPF-plugin.cmake
@@ -186,6 +186,12 @@
   # Note: libjack will be linked at runtime
   if((NOT WIN32) AND (NOT APPLE) AND (NOT HAIKU))
     target_link_libraries("${NAME}-jack" PRIVATE "dl")
+  endif()
+
+  # for RtAudio native fallback
+  if(APPLE)
+    find_library(APPLE_COREAUDIO_FRAMEWORK "CoreAudio")
+    target_link_libraries("${NAME}-jack" PRIVATE "${APPLE_COREAUDIO_FRAMEWORK}")
   endif()
 endfunction()


remove googletest from install target

remove googletest from install target

--- cmake/googletest.cmake
+++ cmake/googletest.cmake
@@ -4,7 +4,7 @@
   if(MSVC)
     option(gtest_force_shared_crt "" ON)
   endif(MSVC)
-  add_subdirectory(${GOOGLETEST_SRC_PATH} "googletest-bin")
+  add_subdirectory(${GOOGLETEST_SRC_PATH} "googletest-bin" EXCLUDE_FROM_ALL)
   set(GTEST_FOUND true)
   set(GMOCK_FOUND true)
   set(GTEST_LIBRARIES "gtest")


remove duplicates in RPATH

remove duplicates in RPATH

--- cmake/link_rules.cmake
+++ cmake/link_rules.cmake
@@ -2,10 +2,12 @@
    set( CMAKE_MACOSX_RPATH ON)
    set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE )
    set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/strus"  "${Boost_LIBRARY_DIRS}" )
+   list( REMOVE_DUPLICATES CMAKE_INSTALL_RPATH )
    set( CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE )
 else(APPLE)
     set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE )
     set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/strus"  "${Boost_LIBRARY_DIRS}" )
+    list( REMOVE_DUPLICATES CMAKE_INSTALL_RPATH )
     set( CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE )
     set( CMAKE_NO_BUILTIN_CHRPATH TRUE )
 endif(APPLE)


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

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

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


ensure test results folder exists

ensure test results folder exists

--- cmake/test/tests.cmake
+++ cmake/test/tests.cmake
@@ -1,10 +1,11 @@
-# set directory for test results
+# set directory for test results and create it
 if(ENV{CATKIN_TEST_RESULTS_DIR})
   message("Override test results directory with environment variable CATKIN_TEST_RESULTS_DIR=${CATKIN_TEST_RESULTS_DIR}")
   set(CATKIN_TEST_RESULTS_DIR $ENV{CATKIN_TEST_RESULTS_DIR} CACHE INTERNAL "")
 else()
   set(CATKIN_TEST_RESULTS_DIR ${CMAKE_BINARY_DIR}/test_results CACHE INTERNAL "")
 endif()
+file(MAKE_DIRECTORY ${CATKIN_TEST_RESULTS_DIR})

 # create target to build tests
 if(NOT TARGET tests)


ENH: Disabled MPI.

ENH: Disabled MPI.

--- CI/configure_option.cmake
+++ CI/configure_option.cmake
@@ -19,13 +19,13 @@
 #

 # This script is a prototype for the future CI, it may evolve rapidly in a near future
-#This file set the following variable :
+#This file set the following variable :
 # * otb_build_project_option
 # * otb_use_option
 # * otb_wrap_option
 # * CONFIGURE_OPTIONS

-set (otb_build_project_option
+set (otb_build_project_option
 "BUILD_COOKBOOK:BOOL=OFF
 BUILD_EXAMPLES:BOOL=ON
 BUILD_SHARED_LIBS:BOOL=ON
@@ -40,7 +40,7 @@
 OTB_USE_GSL:BOOL=ON
 OTB_USE_LIBKML:BOOL=ON
 OTB_USE_LIBSVM:BOOL=ON
-OTB_USE_MPI:BOOL=ON
+OTB_USE_MPI:BOOL=OFF
 OTB_USE_MUPARSER:BOOL=ON
 OTB_USE_MUPARSERX:BOOL=ON
 OTB_USE_OPENCV:BOOL=ON


Update AbseilHelpers.cmake

Update AbseilHelpers.cmake

Comment change

--- CMake/AbseilHelpers.cmake
+++ CMake/AbseilHelpers.cmake
@@ -123,7 +123,7 @@
 #
 # all tests will be register for execution with add_test()
 #
-# test compilation and execution is disable when BUILD_TESTING=OFF
+# test compilation and execution is disable when ABSL_RUN_TESTS=OFF
 #
 function(absl_test)


ENH: Provide advanced development mode for writing GTests

use "cmake -DITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK:BOOL=ON ."
  to disable the slow introspection (i.e. while writing gtests)
use "cmake -DITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK:BOOL=OFF ."
  to enable the slow introspection (during all other development)

This advanced behavior is only available through the
command line.  It is intended to be used only when writing GoogleTests,
to require the developer to explicitly ask for introspection of
gtest instrumented files by the time-consumeing re-running of cmake
for the entire project

Change-Id: I29f9087443d9cc1052d491bed103646129e344e6

--- CMake/ITKModuleTest.cmake
+++ CMake/ITKModuleTest.cmake
@@ -241,7 +241,26 @@
   itk_module_target_label(${exe})

   include(GoogleTest)
-  gtest_add_tests(${exe} "" AUTO)
+  if( ITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK )
+     # This advanced behavior is only available through the
+     # command line.  It is intended to be used only when writing GoogleTests,
+     # to require the developer to explicitly ask for introspection of
+     # gtest instrumented files by the time-consumeing re-running of cmake
+     # for the entire project
+     #
+     # use "cmake -DITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK:BOOL=ON ."  to
+     #           Disable the slow introspection (i.e. while writing gtests)
+     # use "cmake -DITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK:BOOL=OFF ." to
+     #           enable the slow introspection (during all other development)
+    gtest_add_tests(TARGET ${exe}
+                    SOURCES ${KitTests}
+                    SKIP_DEPENDENCY
+                   )
+  else()
+    gtest_add_tests(TARGET ${exe}
+                    SOURCES ${KitTests}
+                   )
+  endif()
   # TODO need to label the produced ctests
 endfunction()


change default install dir for Mac

change default install dir for Mac

Visomics should be put in /Applications, not /.

--- CMake/VisomicsCPack.cmake
+++ CMake/VisomicsCPack.cmake
@@ -42,7 +42,11 @@
   @ONLY)
 SET(CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/VisomicsCPackOptions.cmake")

-set(CPACK_PACKAGING_INSTALL_PREFIX "/")
+if(APPLE)
+  set(CPACK_PACKAGING_INSTALL_PREFIX "/Applications")
+else()
+  set(CPACK_PACKAGING_INSTALL_PREFIX "/")
+endif()

 # -------------------------------------------------------------------------
 # Install Visomics


BUG: on Apple platform, MODULE targets get a .so extension, not recognized by ITK factory

--- CMake/WrapperMacros.cmake
+++ CMake/WrapperMacros.cmake
@@ -14,7 +14,12 @@
    add_library(${APPLICATION_TARGET_NAME} MODULE ${APPLICATION_SOURCES})
    target_link_libraries(${APPLICATION_TARGET_NAME} OTBWrapperCore ${APPLICATION_LINK_LIBRARIES})
    set_target_properties(${APPLICATION_TARGET_NAME} PROPERTIES PREFIX "")
+
+   if (APPLE)
+     set_target_properties(${APPLICATION_TARGET_NAME} PROPERTIES SUFFIX ".dylib")
+   endif()
+
    install(TARGETS ${APPLICATION_TARGET_NAME}
             RUNTIME DESTINATION lib/otbapp
             LIBRARY DESTINATION lib/otbapp)
-endmacro(OTB_CREATE_APPLICATION)+endmacro(OTB_CREATE_APPLICATION)


all test applications are now built by default

--- src/cmake/tests.cmake
+++ src/cmake/tests.cmake
@@ -1,6 +1,6 @@
-add_executable(but_uts EXCLUDE_FROM_ALL ${SOURCES_UT})
-add_executable(but_mts EXCLUDE_FROM_ALL ${SOURCES_MT})
-add_executable(but_its EXCLUDE_FROM_ALL ${SOURCES_IT})
+add_executable(but_uts ${SOURCES_UT})
+add_executable(but_mts ${SOURCES_MT})
+add_executable(but_its ${SOURCES_IT})

 foreach(app but_uts but_mts but_its)
   target_link_libraries(${app} but)
@@ -14,7 +14,7 @@
   get_filename_component(dir  ${src} DIRECTORY)
   get_filename_component(name ${src} NAME_WE)
   set(app but_${name}.manual)
-  add_executable(${app} EXCLUDE_FROM_ALL ${src})
+  add_executable(${app} ${src})
   target_link_libraries(${app} but)
   list(APPEND TEST_TARGETS_MANUAL ${app})
   list(APPEND TEST_TARGETS        ${app})


Fixing gflags static link

Fixing gflags static link

Former-commit-id: a2d78bcbd0164e87cedff29fe048906f28ea1f47

--- cmake-modules/Fetch_Ceres.cmake
+++ cmake-modules/Fetch_Ceres.cmake
@@ -68,8 +68,8 @@
             -DGFLAGS_LIBRARY:PATH=${GFLAGS_LIBRARIES}
             -DGLOG_INCLUDE_DIR:PATH=${GLOG_INCLUDE_DIR}
             -DGLOG_LIBRARY:PATH=${GLOG_LIBRARIES}
-            -DGLOG_LIBRARY_DIR_HINTS:PATH=${GLOG_LIBRARIES}
-            -DGLOG_INCLUDE_DIR_HINTS:PATH=${GLOG_INCLUDE_DIR}
+#            -DGLOG_LIBRARY_DIR_HINTS:PATH=${GLOG_LIBRARIES}
+#            -DGLOG_INCLUDE_DIR_HINTS:PATH=${GLOG_INCLUDE_DIR}
             -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION:BOOL=FALSE
             -DLAPACK:BOOL=OFF
             -DEIGENSPARSE:BOOL=ON


Update FindGlog.cmake

Update FindGlog.cmake

--- cmake/Thirdparty/FindGlog.cmake
+++ cmake/Thirdparty/FindGlog.cmake
@@ -21,7 +21,7 @@
 FIND_LIBRARY(GLOG_LIBRARIES NAMES glog)

 INCLUDE(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(GLOG DEFAULT_MSG GLOG_INCLUDE_DIR GLOG_LIBRARIES)
+find_package_handle_standard_args(Glog DEFAULT_MSG GLOG_INCLUDE_DIR GLOG_LIBRARIES)

 IF(GLOG_FOUND)
     #    MESSAGE(STATUS "Found glog at ${GLOG_INCLUDE_DIR}")


[CMake] Enable LIBCXX HEADERS in Apple-Stage2.cmake

This enables installing the libcxx headers.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@268322 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Apple-stage2.cmake
+++ cmake/caches/Apple-stage2.cmake
@@ -34,7 +34,7 @@
 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")

 set(LIBCXX_INSTALL_LIBRARY OFF CACHE BOOL "")
-set(LIBCXX_INSTALL_HEADERS OFF CACHE BOOL "")
+set(LIBCXX_INSTALL_HEADERS ON CACHE BOOL "")
 set(LIBCXX_INCLUDE_TESTS OFF CACHE BOOL "")
 set(LLVM_LTO_VERSION_OFFSET 3000 CACHE STRING "")


[CMake] Updating Apple build configurations

This updates Apple build configurations to adapt to r263566 & r263570, which added a PACKAGE_VENDOR variable.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@263571 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Apple-stage2.cmake
+++ cmake/caches/Apple-stage2.cmake
@@ -2,7 +2,7 @@
 # specified by the stage1 build.

 set(LLVM_TARGETS_TO_BUILD X86 ARM AArch64 CACHE STRING "")
-set(CLANG_VENDOR Apple CACHE STRING "")
+set(PACKAGE_VENDOR Apple CACHE STRING "")
 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
 set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
 set(LLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD OFF CACHE BOOL "")


Adding solarisCC5

Adding solarisCC5

--- cmake/modules/ALICEMacros.cmake
+++ cmake/modules/ALICEMacros.cmake
@@ -334,6 +334,28 @@

 Endif(ALICE_TARGET STREQUAL macosx)

+# solarisCC5
+If(ALICE_TARGET STREQUAL solarisCC5)
+
+  Set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")
+
+  Set(CLIBDEFS "-DCERNLIB_SUN -DCERNLIB_BLDLIB -DCERNLIB_CZ")
+
+  Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} +w -KPIC -template=no%extdef")
+  Set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -KPIC -erroff=%none")
+
+  Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -KPIC -erroff=%none")
+
+  Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES}")
+
+  Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)
+
+  Set(LINK_FLAGS "${LINK_FLAGS} -L/usr/dt/lib -L/usr/openwin/lib -L/usr/ccs/lib -lXm -lXt -lX11 -lm -lgen -ldl -lsocket -lsunmath -lfsu -lfui -lnsl")
+
+Set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -L/usr/dt/lib -L/usr/openwin/lib -L/usr/ccs/lib -lXm -lXt -lX11 -lm -lgen -ldl -lsocket -lsunmath -lfsu -lfui -lnsl")
+
+Endif(ALICE_TARGET STREQUAL solarisCC5)
+
 EndMacro (SetupSystem)

 # ../build/Makefile.alphacxx6


hunter_lock use hunter_try_lock

hunter_lock use hunter_try_lock

--- cmake/modules/hunter_lock.cmake
+++ cmake/modules/hunter_lock.cmake
@@ -1,10 +1,12 @@
 # Copyright (c) 2014, Ruslan Baratov
 # All rights reserved.
+
+cmake_minimum_required(VERSION 3.0)

 include(hunter_fatal_error)
 include(hunter_status_debug)
 include(hunter_test_string_not_empty)
-include(hunter_verify_toolchain_info)
+include(hunter_try_lock)

 function(hunter_lock)
   # sanity check
@@ -19,49 +21,31 @@
     return()
   endif()

-  hunter_status_debug("lock directory")
+  set(lock_file "${HUNTER_BASE}/hunter-build.lock")

-  set(lock_file "${HUNTER_BASE}/hunter-build.lock")
-  set(binary_dir_file "${HUNTER_BASE}/binary-dir.lock")
-
-  while(EXISTS "${lock_file}")
-    string(TIMESTAMP time_now)
-    if(NOT EXISTS "${binary_dir_file}")
-      hunter_fatal_error("Lock file exists but `${binary_dir_file}` not found")
+  while(TRUE)
+    hunter_try_lock(lock_successful)
+    if(lock_successful)
+      return()
+    else()
+      file(READ "${lock_file}" build_info)
+      hunter_status_print(
+          "\n"
+          "Another project is using directory right now:\n\n"
+          "    ${HUNTER_BASE}\n\n"
+          "Build info: \n\n"
+          "${build_info}\n\n"
+          "If that build cancelled (interrupted by user or some other reason), "
+          "please remove this file manually:\n\n"
+          "    ${lock_file}\n\n"
+          "Then run CMake again."
+      )
+      ### Lets spin
+      string(TIMESTAMP time_now)
+      execute_process(
+          COMMAND "${CMAKE_COMMAND}" -E echo "[${time_now}] Sleep for 5 sec..."
+      )
+      execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 5)
     endif()
-    file(READ "${binary_dir_file}" locked_binary_dir)
-    if(EXISTS "${locked_binary_dir}")
-      # directory still exists and may be active
-      file(READ "${lock_file}" build_info)
-      message(
-        "\n"
-        "Another project is using directory right now:\n\n"
-        "    ${HUNTER_BASE}\n\n"
-        "Build info: \n\n"
-        "${build_info}\n\n"
-        "If that build cancelled (interrupted by user or some other reason), "
-        "please remove this file manually:\n\n"
-        "    ${lock_file}\n\n"
-        "Then run CMake again."
-      )
-    endif()
-    ### Lets spin
-    execute_process(
-        COMMAND "${CMAKE_COMMAND}" -E echo "[${time_now}] Sleep for 5 sec..." 5
-    )
-    execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 5)
   endwhile()
-
-  string(TIMESTAMP time_now)
-
-  file(
-      WRITE
-      "${lock_file}"
-      "    Project binary directory: ${PROJECT_BINARY_DIR}\n"
-      "    Package name: ${HUNTER_PACKAGE_NAME}\n"
-      "    Install tag: ${HUNTER_INSTALL_TAG}\n"
-      "    Build start at: ${time_now}"
-  )
-
-  file(WRITE "${binary_dir_file}" "${PROJECT_BINARY_DIR}")
 endfunction()


Warn if Tcl/Tk library locations are different.

Add 4.0.0 to the list of possible itk versions.

svn path=/trunk/; revision=12638

--- cmake/modules/tcl-related.cmake
+++ cmake/modules/tcl-related.cmake
@@ -85,15 +85,15 @@
 	OUTPUT_VARIABLE AVAILABLE_ITCL)
       if(AVAILABLE_ITCL)
         execute_process(
-	COMMAND ${TCL_TCLSH} GetITCL_Version.tcl
-	WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules
-	OUTPUT_VARIABLE itcl_library_versions)
+	  COMMAND ${TCL_TCLSH} GetITCL_Version.tcl
+	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules
+	  OUTPUT_VARIABLE itcl_library_versions)
         message(STATUS "Looking for itcl.h")
         find_path(ITCL_INCLUDE_PATH itcl.h ${TCL_INCLUDE_PATH})
         if(ITCL_INCLUDE_PATH)
           message(STATUS "Looking for itcl.h - found")
           message(STATUS "Looking for itcl library")
-	get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH)
+          get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH)
           set(itcl_library_versions 4.0.0 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
           foreach(version ${itcl_library_versions})
             find_library(ITCL_LIBRARY itcl${version} PATHS ${TCL_LIBRARY_PATH}
@@ -132,13 +132,21 @@
     else(ENABLE_itcl)
       set(MKTCLINDEX_ARGS "-tcl")
     endif(ENABLE_itcl)
+
     if(ENABLE_tk AND NOT X11_FOUND)
       message(STATUS "WARNING: X11 not found, disabling Tk interface code")
       set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE)
     endif(ENABLE_tk AND NOT X11_FOUND)
     if(ENABLE_tk)
+      get_filename_component(TK_LIBRARY_PATH ${TK_LIBRARY} PATH)
+      if(NOT ${TK_LIBRARY_PATH} STREQUAL ${TCL_LIBRARY_PATH})
+	message(STATUS "TCL_LIBRARY_PATH = ${TCL_LIBRARY_PATH}")
+	message(STATUS "TK_LIBRARY_PATH = ${TK_LIBRARY_PATH}")
+	message(STATUS "WARNING: the Tcl and Tk library locations are inconsistent so those libraries are likely not compatible")
+      endif(NOT ${TK_LIBRARY_PATH} STREQUAL ${TCL_LIBRARY_PATH})
+    endif(ENABLE_tk)
+    if(ENABLE_tk)
       set(TK_INCLUDE_PATH ${TK_INCLUDE_PATH} ${X11_INCLUDE_DIR})
-      set(TK_LIBRARY ${TK_LIBRARY})
       message(STATUS "TK_INCLUDE_PATH = ${TK_INCLUDE_PATH}")
       message(STATUS "TK_LIBRARY = ${TK_LIBRARY}")
     else(ENABLE_tk)
@@ -153,9 +161,9 @@
       if(ITK_INCLUDE_PATH)
         message(STATUS "Looking for itk.h - found")
         message(STATUS "Looking for itk library")
-        set(itk_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
+        set(itk_library_versions 4.0.0 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
         foreach(version ${itk_library_versions})
-          find_library(ITK_LIBRARY itk${version}
+          find_library(ITK_LIBRARY itk${version} PATHS ${TCL_LIBRARY_PATH}
             PATH_SUFFIXES itk${version})
         endforeach(version ${itk_library_versions})
         if(ITK_LIBRARY)


Fix eos release 0.12.1

Fix eos release 0.12.1

fix config install

--- cmake/projects/eos/hunter.cmake
+++ cmake/projects/eos/hunter.cmake
@@ -18,7 +18,7 @@
     URL
     "https://github.com/hunter-packages/eos/archive/v0.12.1.tar.gz"
     SHA1
-    151444ba987f4f02052534462c6c71e47a338404
+    a3839078423cc81d153db84267e9c2eb14564c88
 )

 hunter_add_version(


Fix "INT" CMake cache variables

Fix "INT" CMake cache variables

CMake does not support "INT" variables, and will
convert them internally to "STRING" variables. Recent
versions of CMake report a warning in this case.
Quiet the warning by using STRING rather than INT.

--- cmake_modules/IMPAddTests.cmake
+++ cmake_modules/IMPAddTests.cmake
@@ -1,14 +1,14 @@
 if(NOT DEFINED IMP_TIMEOUT_FACTOR)
-    if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
-      set(IMP_TIMEOUT_FACTOR 3 CACHE INT "A scaling factor for test timeouts")
-    else()
-      set(IMP_TIMEOUT_FACTOR 1 CACHE INT "A scaling factor for test timeouts")
-    endif()
+  if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
+    set(IMP_TIMEOUT_FACTOR 3 CACHE STRING "A scaling factor for test timeouts")
+  else()
+    set(IMP_TIMEOUT_FACTOR 1 CACHE STRING "A scaling factor for test timeouts")
+  endif()
 endif()

-set(IMP_CHEAP_TIMEOUT 5 CACHE INT "Timeout for cheap tests")
-set(IMP_MEDIUM_TIMEOUT 15 CACHE INT "Timeout for medium tests")
-set(IMP_EXPENSIVE_TIMEOUT 120 CACHE INT "Timeout for expensive tests")
+set(IMP_CHEAP_TIMEOUT 5 CACHE STRING "Timeout for cheap tests")
+set(IMP_MEDIUM_TIMEOUT 15 CACHE STRING "Timeout for medium tests")
+set(IMP_EXPENSIVE_TIMEOUT 120 CACHE STRING "Timeout for expensive tests")
 set(IMP_CHEAP_COST 1 CACHE INTERNAL "")
 set(IMP_MEDIUM_COST 2 CACHE INTERNAL "")
 set(IMP_EXPENSIVE_COST 3 CACHE INTERNAL "")


renaming II

renaming II

--- cmake_modules/ZorbaModule.cmake
+++ cmake_modules/ZorbaModule.cmake
@@ -118,7 +118,7 @@
 #              information; see below
 #       TEST_ONLY - (optional) Module is for testcases only and should not
 #              be installed
-#       TARGET_DEPENDS - (optional) List of targets the module depends on
+#       LIBRARY_DEPENDS - (optional) List of targets the module depends on
 #
 # CONFIG_FILES - any files specific here will be copied to
 # CMAKE_CURRENT_BINARY_DIR using CONFIGURE_FILE(). They may contain
@@ -137,7 +137,7 @@
 # file enough to deduce the URI and version?
 MACRO (DECLARE_ZORBA_MODULE)
   # Parse and validate arguments
-  PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES;CONFIG_FILES;TARGET_DEPENDS"
+  PARSE_ARGUMENTS(MODULE "LINK_LIBRARIES;EXTRA_SOURCES;CONFIG_FILES LIBRARY_DEPENDS"
     "URI;FILE;VERSION" "TEST_ONLY" ${ARGN})
   IF (NOT MODULE_FILE)
     MESSAGE (FATAL_ERROR "'FILE' argument is required for ZORBA_DECLARE_MODULE()")
@@ -269,8 +269,8 @@
     # the module *URI*'s final component.
     SET(module_lib_target "modlib${num_zorba_modules}_${module_name}")
     ADD_LIBRARY(${module_lib_target} SHARED ${SRC_FILES})
-    IF (MODULE_TARGET_DEPENDS)
-      ADD_DEPENDENCIES(${module_lib_target} ${MODULE_TARGET_DEPENDS})
+    IF (MODULE LIBRARY_DEPENDS)
+      ADD_DEPENDENCIES(${module_lib_target} ${MODULE LIBRARY_DEPENDS})
     ENDIF()
     GET_FILENAME_COMPONENT(module_filewe "${module_filename}" NAME_WE)
     IF (MODULE_VERSION)


Fix undefined CMAKE_MRPT_HAS_DUO3D

Fix undefined CMAKE_MRPT_HAS_DUO3D

--- cmakemodules/script_duo3d.cmake
+++ cmakemodules/script_duo3d.cmake
@@ -1,17 +1,16 @@
 # Support for DUO3D stereo camera
 # ==========================================================================================
-IF(UNIX)
-	SET( MRPT_HAS_DUO3D OFF CACHE INTERNAL "Has DUO3D libraries?" FORCE)
-ELSE(UNIX)
-	SET( MRPT_HAS_DUO3D OFF CACHE BOOL "Has DUO3D libraries?")
+SET(CMAKE_MRPT_HAS_DUO3D 0)  # Set default value (it cannot be empty!)

-	IF( MRPT_HAS_DUO3D )
-		SET( DUO3D_ROOT_DIR "" CACHE PATH "Path to DUO3D library root directory")
+SET( MRPT_HAS_DUO3D OFF CACHE BOOL "Build with support for DUO3D libraries?")

-		IF(UNIX)
-			MESSAGE("Sorry! DUO3D camera is supported only for Windows yet. Set MRPT_HAS_DUO3D to OFF")
-			SET(CMAKE_MRPT_HAS_DUO3D 0)
-		ELSE(UNIX)
+IF( MRPT_HAS_DUO3D )
+	IF(UNIX)
+		MESSAGE("Sorry! DUO3D camera is supported only for Windows yet. Set MRPT_HAS_DUO3D to OFF")
+	ELSE(UNIX)
+
+			SET( DUO3D_ROOT_DIR "" CACHE PATH "Path to DUO3D library root directory")
+
 			# Set to 1, next check for missing things and set to 0 on any error & report message:
 			SET(CMAKE_MRPT_HAS_DUO3D 1)

@@ -29,8 +28,6 @@
 				SET(CMAKE_MRPT_HAS_DUO3D 0)
 				MESSAGE("The directory 'DUO3D_ROOT_DIR' does not contain lib/DUOLib.lib. Turn off DUO3D support or provide the correct path.")
 			ENDIF(NOT EXISTS ${DUO3D_ROOT_DIR}/lib/DUOLib.lib)
-		ENDIF(UNIX)
-
-	ENDIF(MRPT_HAS_DUO3D)
-ENDIF(UNIX)
-
+	ENDIF(UNIX)
+
+ENDIF(MRPT_HAS_DUO3D)


Revert previous changes

Revert previous changes

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -98,10 +98,6 @@
     set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")
     set(cxx_no_exception_flags "-EHs-c- -D_HAS_EXCEPTIONS=0")
     set(cxx_no_rtti_flags "-GR-")
-
-    if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-      set(cxx_base_flags "${cxx_base_flags} -Wno-unknown-argument")
-    endif()
   elseif (CMAKE_COMPILER_IS_GNUCXX)
     set(cxx_base_flags "-Wall -Wshadow -Werror")
     if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)


Update boost compute release tag

Update boost compute release tag

--- CMakeModules/build_boost_compute.cmake
+++ CMakeModules/build_boost_compute.cmake
@@ -1,6 +1,9 @@
-SET(VER 79aa8f9086fdf6ef6db78e889de0273b0eb7bd19)
-SET(URL https://github.com/boostorg/compute/archive/${VER}.tar.gz)
-SET(MD5 dba3318cbdac912dddce71f2a38ffa43)
+# If using a commit, remove the v prefix to VER in URL.
+# If using a tag, don't use v in VER
+# This is because of how github handles it's release tar balls
+SET(VER 0.5)
+SET(URL https://github.com/boostorg/compute/archive/v${VER}.tar.gz)
+SET(MD5 69a52598ac539d3b7f6005a3dd2b6f58)

 SET(thirdPartyDir "${CMAKE_BINARY_DIR}/third_party")
 SET(srcDir "${thirdPartyDir}/compute-${VER}")


Fix package configuration for windows.

Fix package configuration for windows.

	* build-aux/cmake/modules/CPackInfo.cmake: Do that.

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

--- build-aux/cmake/modules/CPackInfo.cmake
+++ build-aux/cmake/modules/CPackInfo.cmake
@@ -31,7 +31,7 @@

   #FIXME: Some variables are not set yet. Fix it.

-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_LONGNAME} ${PROJECT_VERSION}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_STRING}")
 set(CPACK_PACKAGE_VENDOR ${PROJECT_COPYRIGHT_HOLDER})
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT")
@@ -40,14 +40,13 @@
 set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
 set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
 set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${PROJECT_VERSION}")
+if(WIN32)
+  set(CPACK_PACKAGE_INSTALL_DIRECTORY "${GOSTAI}\\\\${PROJECT_NAME} ${PROJECT_VERSION}")
+else(WIN32)
+  set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${PROJECT_VERSION}")
+endif(WIN32)
 if(WIN32 AND NOT UNIX)
-  # There is a bug in NSI that does not handle full unix paths properly. Make
-  # sure there is at least one set of four (4) backlasshes.
-#  set(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
-#  set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
-  set(CPACK_NSIS_DISPLAY_NAME
-    "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
+  set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
   set(CPACK_NSIS_HELP_LINK ${PROJECT_HELP_LINK})
   set(CPACK_NSIS_URL_INFO_ABOUT ${PROJECT_HOMEPAGE})
   set(CPACK_NSIS_CONTACT ${PROJECT_SUPPORT})
@@ -61,7 +60,7 @@
 #  set(CPACK_SOURCE_STRIP_FILES "")
 endif(WIN32 AND NOT UNIX)
 # List of pair of executable and label used by NSIS to create start menu items.
-#set(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable")
+set(CPACK_PACKAGE_EXECUTABLES @PROJECT_NAME@ @PROJECT_STRING@)

 # Set generators
 IF(NOT CPACK_GENERATOR)


COMP: turn FEM off by default, as it takes a long time to build

Change-Id: Ib12d788b6483d4f9ad9588c3f291e0f1bc3ffff9

--- Modules/Numerics/FEM/itk-module.cmake
+++ Modules/Numerics/FEM/itk-module.cmake
@@ -15,6 +15,7 @@
     ITKIOSpatialObjects
   DESCRIPTION
     "${DOCUMENTATION}"
+  EXCLUDE_FROM_DEFAULT
 )

 # ITKIOSpatialObjects dependency added for itkFEMSpatialObjectWriter


[cmake] Fix get_llvm_lit_path() to respect LLVM_EXTERNAL_LIT always

Refactor the get_llvm_lit_path() logic to respect LLVM_EXTERNAL_LIT,
and require the fallback to be defined explicitly
as LLVM_DEFAULT_EXTERNAL_LIT. This fixes building libcxx standalone
after r346888.

The old logic was using LLVM_EXTERNAL_LIT both as user-defined cache
variable and an optional pre-definition of default value from caller
(e.g. libcxx). It included a hack to make this work by assigning
the value back and forth but it was fragile and stopped working
in libcxx.

The new logic is simpler and more transparent. Default value is
provided in a separate variable, and used only when user-specified
variable is empty (i.e. not overriden).

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

git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@352374 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -119,7 +119,7 @@
     # Required LIT Configuration ------------------------------------------------
     # Define the default arguments to use with 'lit', and an option for the user
     # to override.
-    set(LLVM_EXTERNAL_LIT "${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")
+    set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")
     set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
     if (MSVC OR XCODE)
       set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")


DOC: Documenting the module.

DOC: Documenting the module.

Change-Id: I8daf51d8d01e7f638965890d7fefcfebcd4fae16

--- Modules/Bridge/VTK/itk-module.cmake
+++ Modules/Bridge/VTK/itk-module.cmake
@@ -1 +1,9 @@
-itk_module(ITK-VTK DEPENDS ITK-Common)
+set(DOCUMENTATION "This module contains classes intended to interconnect ITK
+and VTK (The Visualization Toolkit). It is common to combine this two toolkits
+for the purpose of integrating in a single application the image analysis
+functionalities of ITK with the visualization functionalities of VTK. In
+particular, you will find here the classes that enable you to convert an
+itkImage into an vtkImageData, and to convert a vtkImageData into an itkImage,
+all without having to duplicate their buffers.")
+
+itk_module(ITK-VTK DEPENDS ITK-Common DESCRIPTION "${DOCUMENTATION}")


WIP: use gdal_dem_handler branch from diapotb (new dem handler API)

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


Using correctly VERSION_LESS comparator

Using correctly VERSION_LESS comparator

--- SofaKernel/cmake/CompilerOptions.cmake
+++ SofaKernel/cmake/CompilerOptions.cmake
@@ -84,7 +84,7 @@
 # An important C++11 feature may be not enabled due to
 # the compiler being built without the --enable-libstdcxx-time option.
 if(CMAKE_COMPILER_IS_GNUCXX)
-    if(CMAKE_CXX_COMPILER_VERSION VERSION_LOWER 4.8)
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
     endif()
 endif()


Fix InstallHeaders to use CURRENT source/bin dir

--- standard/InstallHeaders.cmake
+++ standard/InstallHeaders.cmake
@@ -50,18 +50,20 @@
     # We find out what directory part the file is in, we want the shortest
     # relative path on the assumption that the file will be most properly
     # located in the directory whose relative address is the shortest.
-    file(RELATIVE_PATH src_rel ${CMAKE_SOURCE_DIR} ${src})
+    file(RELATIVE_PATH src_rel ${CMAKE_CURRENT_SOURCE_DIR} ${src})
     get_filename_component(src_rel ${src_rel} DIRECTORY)
-    string(LENGTH ${src_rel} src_rel_len)
+    if(src_rel)
+      string(LENGTH ${src_rel} src_rel_len)
+      set(actual_rel ${src_rel})
+    endif()

-    file(RELATIVE_PATH bin_rel ${CMAKE_BINARY_DIR} ${src})
+    file(RELATIVE_PATH bin_rel ${CMAKE_CURRENT_BINARY_DIR} ${src})
     get_filename_component(bin_rel ${bin_rel} DIRECTORY)
-    string(LENGTH ${bin_rel} bin_rel_len)
-
-    if(src_rel_len LESS bin_rel_len)
-      set(actual_rel ${src_rel})
-    else()
-      set(actual_rel ${bin_rel})
+    if(bin_rel)
+      string(LENGTH ${bin_rel} bin_rel_len)
+      if(src_rel AND bin_rel_len LESS src_rel_len)
+        set(actual_rel ${bin_rel})
+      endif()
     endif()

     get_filename_component(src_ext ${src} EXT)


[upgrade] Fix BOOST_ALL_DYN_LINK definition

--- Superbuild/Projects/lidarview.cmake
+++ Superbuild/Projects/lidarview.cmake
@@ -29,10 +29,10 @@
     #$lidarview_appname additional configuration
 )

+# This Disable Boost autolinking feature and ease use of Boost as a dynamic library.
+# Boost_USE_STATIC_LIBS is off by default, but sometimes that is not sufficient
+# on windows (especially with MSVC ?)
 if (WIN32 OR APPLE)
-  # These options are useful to use Boost as a dynamic library.
-  # Boost_USE_STATIC_LIBS is off by default, but sometimes that is not sufficient
-  # on windows (especially with MSVC ?)
   superbuild_append_flags(cxx_flags "-DBOOST_ALL_NO_LIB" PROJECT_ONLY)
-  superbuild_append_flags(cxx_flags "-DBOOST_ALL_DYN" PROJECT_ONLY)
+  superbuild_append_flags(cxx_flags "-DBOOST_ALL_DYN_LINK" PROJECT_ONLY)
 endif()


Update FW with stereo performance improvements

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "ff3310c9e34043ddaf1f7c18bcfc64a22b9305c9")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "c4b3d00943fc95edac6e51602e74ce506f72b191")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Update FW with fix for timesync

Update FW with fix for timesync

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "3da45bce8f1178f33be211861a7848ab3993d9b9")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "a2efd50dde44e2d4e84e18b85d883d6421af68e2")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Complete the fix for ROOT-5736 (CMake)

Complete the fix for ROOT-5736 (CMake)

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -173,6 +173,7 @@
   find_Package(PNG)
   if(PNG_FOUND)
     set(ASEXTRA_LIBRARIES ${ASEXTRA_LIBRARIES} ${PNG_LIBRARIES})
+    list(GET PNG_INCLUDE_DIRS 0 PNG_INCLUDE_DIR)
   endif()
   find_Package(JPEG)
   if(JPEG_FOUND)


cmake: Refactored validation of compiler warning flags.

--- cmake/Modules/CppUTestWarningFlags.cmake
+++ cmake/Modules/CppUTestWarningFlags.cmake
@@ -4,6 +4,24 @@
 else (MSVC)
     include(CheckCCompilerFlag)
     include(CheckCXXCompilerFlag)
+
+    macro(check_and_append_c_warning_flags)
+      foreach (flag ${ARGN})
+        check_c_compiler_flag("-${flag}" WARNING_C_FLAG_${flag})
+        if (WARNING_C_FLAG_${flag})
+            set(CPPUTEST_C_WARNING_FLAGS "${CPPUTEST_C_WARNING_FLAGS} -${flag}")
+        endif (WARNING_C_FLAG_${flag})
+      endforeach (flag)
+    endmacro(check_and_append_c_warning_flags)
+
+    macro(check_and_append_cxx_warning_flags)
+      foreach (flag ${ARGN})
+        check_cxx_compiler_flag("-${flag}" WARNING_CXX_FLAG_${flag})
+        if (WARNING_CXX_FLAG_${flag})
+            set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -${flag}")
+        endif (WARNING_CXX_FLAG_${flag})
+      endforeach (flag)
+    endmacro(check_and_append_cxx_warning_flags)

     set(WARNING_C_FLAGS
         Werror
@@ -18,6 +36,7 @@
         Wsign-conversion
         Woverloaded-virtual
         Wno-padded
+        Wno-disabled-macro-expansion
         )

     set(WARNING_C_ONLY_FLAGS
@@ -25,42 +44,15 @@
         )

     set(WARNING_CXX_FLAGS
+        ${WARNING_C_FLAGS}
         Wno-global-constructors
         Wno-exit-time-destructors
         Wno-weak-vtables
         )

-    foreach (flag ${WARNING_C_FLAGS})
-        check_c_compiler_flag("-${flag}" WARNING_FLAG_${flag})
-        if (WARNING_FLAG_${flag})
-            set(CPPUTEST_C_WARNING_FLAGS "${CPPUTEST_C_WARNING_FLAGS} -${flag}")
-        endif (WARNING_FLAG_${flag})
-    endforeach (flag ${WARNING_C_FLAGS})
-    check_c_compiler_flag(-Wno-disabled-macro-expansion WARNING_FLAG_no_disabled_macro_expansion)
-    if (WARNING_FLAG_no_disabled_macro_expansion)
-        set(CPPUTEST_C_WARNING_FLAGS "${CPPUTEST_C_WARNING_FLAGS} -Wno-disabled-macro-expansion")
-    endif (WARNING_FLAG_no_disabled_macro_expansion)

-    set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} ${CPPUTEST_C_WARNING_FLAGS}")
-    check_cxx_compiler_flag(-Wno-global-constructors WARNING_FLAG_no_global_constructors)
-    if (WARNING_FLAG_no_global_constructors)
-        set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-global-constructors")
-    endif (WARNING_FLAG_no_global_constructors)
+    check_and_append_c_warning_flags(${WARNING_C_FLAGS})
+    check_and_append_c_warning_flags(${WARNING_C_ONLY_FLAGS})
+    check_and_append_cxx_warning_flags(${WARNING_CXX_FLAGS})

-    check_cxx_compiler_flag(-Wno-exit-time-destructors WARNING_FLAG_no_exit_time_destructors)
-    if (WARNING_FLAG_no_exit_time_destructors)
-        set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-exit-time-destructors")
-    endif (WARNING_FLAG_no_exit_time_destructors)
-
-    check_cxx_compiler_flag(-Wno-weak-vtables WARNING_FLAG_no_weak_vtables)
-    if (WARNING_FLAG_no_weak_vtables)
-        set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-weak-vtables")
-    endif (WARNING_FLAG_no_weak_vtables)
-
-    foreach (flag ${WARNING_C_ONLY_FLAGS})
-        check_c_compiler_flag("-${flag}" WARNING_FLAG_${flag})
-        if (WARNING_FLAG_${flag})
-            set(CPPUTEST_C_WARNING_FLAGS "${CPPUTEST_C_WARNING_FLAGS} -${flag}")
-        endif (WARNING_FLAG_${flag})
-    endforeach (flag ${WARNING_C_ONLY_FLAGS})
 endif (MSVC)


CMake: Adjust for visibility settings

CMake: Adjust for visibility settings

Change-Id: I0726fbaad73e809fdb0a07a6535d9f8397f66002
Reviewed-on: http://review.couchbase.org/41657
Tested-by: Mark Nunberg <e7d42768707bf23038325b0b68d4b577e5f6064a@haskalah.org>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

--- cmake/Modules/GetLibcouchbaseFlags.cmake
+++ cmake/Modules/GetLibcouchbaseFlags.cmake
@@ -92,7 +92,7 @@
         SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
         SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
     ENDIF()
-    SET(LCB_CORE_CFLAGS "${LCB_GNUC_C_WARNINGS}")
+    SET(LCB_CORE_CFLAGS "${LCB_GNUC_C_WARNINGS} -DHAVE_VISIBILITY -fvisibility=hidden")
     SET(LCB_CORE_CXXFLAGS "${LCB_GNUC_CXX_WARNINGS}")
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
 ENDIF()


#5006 use find_package(Valgrind) for linux refs[t:5006]

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@44260 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuFeatureDetection.cmake
+++ cmake_modules/TokuFeatureDetection.cmake
@@ -7,7 +7,7 @@
   find_package(BDB REQUIRED)
 endif()

-find_package(VALGRIND REQUIRED)
+find_package(Valgrind REQUIRED)

 include(CheckIncludeFiles)


Added support for UIImage+animatedGif

Added support for UIImage+animatedGif

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -257,6 +257,7 @@
 add_target(SSTOOLKIT sstoolkit)
 add_target(SW_REVEAL_VIEW_CONTROLLER sw_reveal_view_controller)
 add_target(TBB tbb)
+add_target(UIIMAGE_ANIMATED_GIF uiimage_animated_gif)
 add_target(VIRTUALENV virtualenv)
 add_target(XZ xz)
 add_target(ZLIB zlib)
@@ -529,6 +530,8 @@
 set_libraries(sw_reveal_view_controller ${SW_REVEAL_VIEW_CONTROLLER_PREFIX}/lib
               sw_reveal_view_controller)
 set_libraries(tbb ${TBB_PREFIX}/lib tbb)
+set_libraries(uiimage_animated_gif ${UIIMAGE_ANIMATED_GIF_PREFIX}/lib
+              uiimage_animated_gif)
 set_libraries(zlib ${ZLIB_PREFIX}/lib z)

@@ -575,6 +578,8 @@
                          third_party.mobile_commerce_ios_ios_rest_client)
 add_framework_dependencies(
     mobile_commerce_ios_atg_mobile_common CoreData SystemConfiguration)
+
+add_framework_dependencies(uiimage_animated_gif ImageIO)

 # Aliases.
 add_library_dependencies(boost_asio third_party.boost_system)
@@ -713,6 +718,8 @@
 set_include_directories(
     sw_reveal_view_controller ${SW_REVEAL_VIEW_CONTROLLER_PREFIX}/include)
 set_include_directories(tbb ${TBB_PREFIX}/include)
+set_include_directories(
+    uiimage_animated_gif ${UIIMAGE_ANIMATED_GIF_PREFIX}/include)

 # Fixing implicit header dependencies. Again we must be careful to define a DAG.
 add_include_dependencies(arabica third_party.boost_headers third_party.libxml)
@@ -3535,6 +3542,36 @@
 add_install_name_step(TBB)

 ################################################################################
+# UIImage+animatedGif.
+add_external_project(
+  ${UIIMAGE_ANIMATED_GIF_TARGET}_download
+  PREFIX ${UIIMAGE_ANIMATED_GIF_PREFIX}
+  SOURCE_DIR ${UIIMAGE_ANIMATED_GIF_PREFIX}/src/${UIIMAGE_ANIMATED_GIF_TARGET}
+  DOWNLOAD_COMMAND
+      ${GIT} clone --depth 1 git://github.com/mayoff/uiimage-from-animated-gif.git
+          ${UIIMAGE_ANIMATED_GIF_TARGET}
+  CONFIGURE_COMMAND ${NOP}
+  BUILD_COMMAND ${NOP}
+  INSTALL_COMMAND
+      mkdir -p <INSTALL_DIR>/include/UIImage+animatedGIF &&
+      cp <SOURCE_DIR>/uiimage-from-animated-gif/UIImage+animatedGIF.h
+          <INSTALL_DIR>/include/UIImage+animatedGIF)
+ExternalProject_Get_Property(${UIIMAGE_ANIMATED_GIF_TARGET}_download SOURCE_DIR)
+set(SOURCE_DIR ${SOURCE_DIR}/uiimage-from-animated-gif)
+set(UIIMAGE_ANIMATED_GIF_SRCS ${SOURCE_DIR}/UIImage+animatedGIF.m)
+set_source_files_properties(
+    ${UIIMAGE_ANIMATED_GIF_SRCS} PROPERTIES GENERATED TRUE)
+objc_library(${UIIMAGE_ANIMATED_GIF_TARGET} ${UIIMAGE_ANIMATED_GIF_SRCS})
+link_framework(${UIIMAGE_ANIMATED_GIF_TARGET} ImageIO)
+set_target_properties(
+    ${UIIMAGE_ANIMATED_GIF_TARGET} PROPERTIES
+    ARCHIVE_OUTPUT_DIRECTORY ${UIIMAGE_ANIMATED_GIF_PREFIX}/lib
+    LIBRARY_OUTPUT_DIRECTORY ${UIIMAGE_ANIMATED_GIF_PREFIX}/lib
+    OUTPUT_NAME uiimage_animated_gif)
+add_dependencies(
+    ${UIIMAGE_ANIMATED_GIF_TARGET} ${UIIMAGE_ANIMATED_GIF_TARGET}_download)
+
+################################################################################
 # virtualenv.
 if (PYTHON_SUPPORTED)
   add_external_project(


Added support for MWPhotoBrowser

Added support for MWPhotoBrowser

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -232,6 +232,7 @@
 add_target(MOD_JK mod_jk)
 add_target(MPC mpc)
 add_target(MPFR mpfr)
+add_target(MW_PHOTO_BROWSER mw_photo_browser)
 add_target(MYSQL mysql)
 add_target(MYSQLCPPCONN mysqlcppconn)
 add_target(NGINX nginx)
@@ -483,6 +484,7 @@
               ${MOBILE_COMMERCE_IOS_PREFIX}/lib EMMobileClient)
 set_libraries(mpc ${MPC_PREFIX}/lib mpc)
 set_libraries(mpfr ${MPFR_PREFIX}/lib mpfr)
+set_libraries(mw_photo_browser ${MW_PHOTO_BROWSER_PREFIX}/lib MWPhotoBrowser)
 set_libraries(mysqlcppconn ${MYSQLCPPCONN_PREFIX}/lib mysqlcppconn)
 set_libraries(njk_web_view_progress ${NJK_WEB_VIEW_PROGRESS_PREFIX}/lib
               njk_web_view_progress)
@@ -549,6 +551,7 @@
 add_framework_dependencies(formatter_kit AddressBook AddressBookUI CoreLocation)
 add_library_dependencies(gtest pthread)
 add_framework_dependencies(ios_ntp CFNetwork CoreGraphics UIKit)
+add_framework_dependencies(mw_photo_browser AssetsLibrary MapKit MessageUI)
 add_library_dependencies(openssl third_party.gmp)
 add_library_dependencies(libcurl third_party.zlib)
 if (NOT APPLE)
@@ -692,6 +695,7 @@
     mobile_commerce_ios ${MOBILE_COMMERCE_IOS_PREFIX}/include)
 set_include_directories(mpc ${MPC_PREFIX}/include)
 set_include_directories(mpfr ${MPFR_PREFIX}/include)
+set_include_directories(mw_photo_browser ${MW_PHOTO_BROWSER_PREFIX}/include)
 set_include_directories(mysql ${MYSQL_PREFIX}/include)
 set_include_directories(mysqlcppconn ${MYSQLCPPCONN_PREFIX}/include)
 set_include_directories(
@@ -746,6 +750,9 @@
 set(CMAKE_C_FLAGS_WITH_ARCHS "${ARCHS_AS_FLAGS} ${CMAKE_C_FLAGS}")
 set(CMAKE_CXX_FLAGS_WITH_ARCHS "${ARCHS_AS_FLAGS} ${CMAKE_CXX_FLAGS}")
 set(LDFLAGS_WITH_ARCHS "${ARCHS_AS_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}")
+if (IS_IOS)
+  string(REGEX REPLACE "^\\-" "" XCODE_SDK ${CMAKE_XCODE_EFFECTIVE_PLATFORMS})
+endif ()

 # Sets the --host flag to the appropriate value if necessary.
 if (IOS_BUILD)
@@ -2717,6 +2724,28 @@
           LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}
           ${CONFIGURE_LIB_TYPE})
 add_dependencies(${MPFR_TARGET} ${GMP_TARGET})
+
+################################################################################
+# MWPhotoBrowser.
+if (IS_IOS)
+  add_external_project(
+    ${MW_PHOTO_BROWSER_TARGET}
+    PREFIX ${MW_PHOTO_BROWSER_PREFIX}
+    DOWNLOAD_COMMAND
+        ${GIT} clone --depth 1 git://github.com/mwaterfall/MWPhotoBrowser.git
+            ${MW_PHOTO_BROWSER_TARGET}
+    CONFIGURE_COMMAND ${NOP}
+    BUILD_COMMAND
+        xcodebuild -project <SOURCE_DIR>/MWPhotoBrowser/MWPhotoBrowser.xcodeproj
+            -sdk ${XCODE_SDK} ARCHS=${SPACE_SEP_ARCHS}
+    INSTALL_COMMAND
+        ${CMAKE_COMMAND} -E make_directory <INSTALL_DIR>/lib &&
+        cd <SOURCE_DIR>/MWPhotoBrowser &&
+        cp -f build/Release-${XCODE_SDK}/libMWPhotoBrowser.a <INSTALL_DIR>/lib &&
+        cd Classes &&
+        find . -name "*.h" | cpio -dp <INSTALL_DIR>/include/MWPhotoBrowser
+    BUILD_IN_SOURCE 1)
+endif ()

 ################################################################################
 # MySQL.


Doc try to set "-std" flag when CMake cxx standard flags are present

These two variables may conflict, and cause inconsistency with the
expected result. Only allow one to be set.

--- CMake/sitkCheckRequiredFlags.cmake
+++ CMake/sitkCheckRequiredFlags.cmake
@@ -67,21 +67,37 @@
   endforeach()
 endforeach()

+set(HAS_CXX_STD_FLAG ${_HAS_FLAG})
+
+
+#
+# Let the user set the CXX_STANDARD via these CMake variable, although
+# it is preferred to set it in the CXX_FLAGS, as it will be propagated
+# to SimpleITK's public compile options.
+#
+if( DEFINED CMAKE_CXX_STANDARD
+    OR DEFINED CMAKE_CXX_STANDARD_REQUIRED
+    OR DEFINED CMAKE_CXX_EXTENSIONS )
+  if(HAS_CXX_STD_FLAG)
+    message(SEND_ERROR "CMake CXX standard variables are not supported
+      concurrently with CXX flag: \"-std=\"! Use only one to configure CXX standard.")
+  endif()
+elseif(NOT HAS_CXX_STD_FLAG)
+
 #
 # Check if we need to enable C++11 with a compiler flag
 #

-if(NOT _HAS_FLAG)
+  check_cxx_compiler_flag( "-std=c++11" CXX_HAS_stdcxx11)

-  check_cxx_compiler_flag( "-std=c++11" CXX_HAS_stdcxx11)
   if (CXX_HAS_stdcxx11)

     message(STATUS "Checking if c++11 is required...")
-    try_compile(SITK_CHECK_CXX11
+    try_compile(SITK_CXX11_NOT_REQUIRED
       "${PROJECT_BINARY_DIR}"
       "${CMAKE_CURRENT_LIST_DIR}/sitk_check_cxx11_required.cxx"
       OUTPUT_VARIABLE OUTPUT)
-    if(${SITK_CHECK_CXX11})
+    if(SITK_CXX11_NOT_REQUIRED)
       message(STATUS "Checking if c++11 is required... NO" )
     else()
       message(STATUS "Checking if c++11 is required... YES" )


Improved mozjs lib search

Improved mozjs lib search

--- Release/samples/granada/plugin-server/cmake/RequireMOZJS.cmake
+++ Release/samples/granada/plugin-server/cmake/RequireMOZJS.cmake
@@ -1,22 +1,23 @@
-# - Find mozjs
-# Find the SpiderMonkey library
+# Find the SpiderMonkey library (mozjs)
 #
 # This module defines
+# MOZJS_INCLUDE_DIR
 # MOZJS_LIBRARY
-# MOZJS_FOUND, if false, do not try to link to nvtt
-# MOZJS_INCLUDE_DIR, where to find the headers
-#
+# MOZJS_FOUND
+
+FILE(GLOB _MOZJS_INCLUDE_DIRS /usr/include/mozjs*)

 FIND_PATH(MOZJS_INCLUDE_DIR jsapi.h
   PATHS
   /usr/local
   /usr
+  ${_MOZJS_INCLUDE_DIRS}
   $ENV{MOZJS_DIR}
   PATH_SUFFIXES include include-unix
 )

 FIND_LIBRARY(MOZJS_LIBRARY
-  NAMES mozjs
+  NAMES mozjs mozjs-38 mozjs-24 mozjs185
   PATHS
   /usr/local
   /usr


fix glslang link order

fix glslang link order

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -556,7 +556,7 @@

       add_external_project(megamol-shader-factory STATIC
         GIT_REPOSITORY https://github.com/UniStuttgart-VISUS/megamol-shader-factory.git
-        GIT_TAG 2dae25bbeb5395a1711bff0e58c91dee08fc272f
+        GIT_TAG 16849959c277db2e8821e647310b104b17811fc0
         BUILD_BYPRODUCTS
         "<INSTALL_DIR>/${MEGAMOL_SHADER_FACTORY_LIB}"
         "<INSTALL_DIR>/${GLSLANG_LIB}"
@@ -574,7 +574,7 @@

       add_external_library(megamol-shader-factory
         LIBRARY ${MEGAMOL_SHADER_FACTORY_LIB}
-        INTERFACE_LIBRARIES glad ${INSTALL_DIR}/$<CONFIG>/${GLSLANG_LIB} ${INSTALL_DIR}/$<CONFIG>/${GENERICCODEGEN_LIB} ${INSTALL_DIR}/$<CONFIG>/${MACHINEINDEPENDENT_LIB} ${INSTALL_DIR}/$<CONFIG>/${OSDEPENDENT_LIB} ${INSTALL_DIR}/$<CONFIG>/${OGLCOMPILER_LIB} ${INSTALL_DIR}/$<CONFIG>/${SPIRV_LIB})
+        INTERFACE_LIBRARIES glad ${INSTALL_DIR}/$<CONFIG>/${GLSLANG_LIB} ${INSTALL_DIR}/$<CONFIG>/${SPIRV_LIB} ${INSTALL_DIR}/$<CONFIG>/${MACHINEINDEPENDENT_LIB} ${INSTALL_DIR}/$<CONFIG>/${OGLCOMPILER_LIB} ${INSTALL_DIR}/$<CONFIG>/${OSDEPENDENT_LIB} ${INSTALL_DIR}/$<CONFIG>/${GENERICCODEGEN_LIB})
       if(UNIX)
         target_link_libraries(megamol-shader-factory INTERFACE "stdc++fs")
       endif()


fix: Update example config

fix: Update example config

--- examples/config.cmake
+++ examples/config.cmake
@@ -9,13 +9,16 @@

 [colors]
 background = #222
+background-dark = #bb
 foreground = #dfdfdf
-
+foreground-dark = #55
+primary = #ffb52a
+secondary = #e60053
+alert = #bd2c40

 [global/wm]
 margin-top = 5
 margin-bottom = 5
-

 [bar/example]
 ;monitor = ${env:MONITOR:HDMI-1}
@@ -67,10 +70,16 @@
 [module/xkeyboard]
 type = internal/xkeyboard
 blacklist-0 = num lock
-label-layout = %{F#666}%{F#cc} %layout%
+
+format-underline = ${colors.secondary}
+format-prefix = " "
+format-prefix-foreground = ${colors.foreground-dark}
+
+label-layout = %layout%
+
 label-indicator-padding = 2
-label-indicator-background = #e60053
-label-layout-underline = #e60053
+label-indicator-background = ${colors.secondary}
+label-indicator-underline = ${colors.secondary}

 [module/filesystem]
 type = internal/fs
@@ -83,26 +92,26 @@
 label-mounted = %mountpoint%: %percentage_free%

 label-unmounted = %mountpoint%: not mounted
-label-unmounted-foreground = #55
+label-unmounted-foreground = ${colors.foreground-dark}

 [module/bspwm]
 type = internal/bspwm
 ws-icon-default = x

 label-focused = %index%
-label-focused-background = #ee333333
-label-focused-underline= #cc333333
+label-focused-background = ${colors.foreground-dark}
+label-focused-underline= ${colors.primary}
 label-focused-padding = 2

 label-occupied = %index%
 label-occupied-padding = 2

 label-urgent = %index%
-label-urgent-background = #bd2c40
+label-urgent-background = ${colors.alert}
 label-urgent-padding = 2

 label-empty = %index%
-label-empty-foreground = #55
+label-empty-foreground = ${colors.foreground-dark}
 label-empty-padding = 2

 [module/i3]
@@ -112,8 +121,8 @@

 label-mode = %mode%
 label-mode-padding = 2
-label-mode-foreground = #fff
-label-mode-background = #e60053
+label-mode-foreground = #000
+label-mode-background = ${colors.primary}

 label-focused = %index%
 label-focused-background = ${module/bspwm.label-focused-background}
@@ -124,7 +133,7 @@
 label-unfocused-padding = ${module/bspwm.label-occupied-padding}

 label-urgent = %index%!
-label-urgent-background = ${module/bspwm.label-urgent-padding}
+label-urgent-background = ${colors.alert}
 label-urgent-padding = ${module/bspwm.label-urgent-padding}

 label-visible = %index%
@@ -150,7 +159,7 @@
 icon-random = 
 icon-repeat = 

-toggle-on-foreground = #e60053
+toggle-on-foreground = ${colors.primary}
 toggle-off-foreground = #66

 [module/backlight]
@@ -168,19 +177,23 @@
 bar-fill-foreground = #9f78e1
 bar-empty = ─
 bar-empty-font = 2
-bar-empty-foreground = #55
+bar-empty-foreground = ${colors.foreground-dark}

 [module/cpu]
 type = internal/cpu
 interval = 2
-label = %{F#666}%{F#cc} %percentage%
-label-underline = #f90000
+format-prefix = " "
+format-prefix-foreground = ${colors.foreground-dark}
+format-underline = #f90000
+label = %percentage%

 [module/memory]
 type = internal/memory
 interval = 2
-label = %{F#666}%{F#cc} %percentage_used%
-label-underline = #4bffdc
+format-prefix = " "
+format-prefix-foreground = ${colors.foreground-dark}
+format-underline = #4bffdc
+label = %percentage_used%

 [module/wlan]
 type = internal/network
@@ -193,14 +206,14 @@

 label-connected = %essid%
 label-disconnected = %ifname% disconnected
-label-disconnected-foreground = #55
+label-disconnected-foreground = ${colors.foreground-dark}

 ramp-signal-0 = 
 ramp-signal-1 = 
 ramp-signal-2 = 
 ramp-signal-3 = 
 ramp-signal-4 = 
-ramp-signal-foreground = #55
+ramp-signal-foreground = ${colors.foreground-dark}

 [module/eth]
 type = internal/network
@@ -208,29 +221,32 @@
 interval = 3.0

 format-connected-underline = #55aa55
+format-connected-prefix = " "
+format-connected-foreground-foreground = ${colors.foreground-dark}
+label-connected = %local_ip%
+
 format-disconnected-underline = ${self.format-connected-underline}
-
-label-connected = %{F#55}%{F#ff} %local_ip%
 label-disconnected = %ifname% disconnected
-label-disconnected-foreground = #55
+label-disconnected-foreground = ${colors.foreground-dark}

 [module/date]
 type = internal/date
-date = %%{F#55}%%{F#ff} %H:%M
-date-alt = %%{F#55}%{F#ff} %Y-%m-%d  %%{F#55}%%{F#ff} %H:%M
+date = %H:%M
 interval = 5
+format-prefix = " "
+format-prefix-foreground = ${colors.foreground-dark}
 format-underline = #0a6cf5

 [module/volume]
 type = internal/volume

 format-volume = <label-volume> <bar-volume>
-
 label-volume = VOL
 label-volume-foreground = ${root.foreground}

-label-muted =  sound muted
-label-muted-foreground = #55
+format-muted-prefix = " "
+format-muted-foreground = ${colors.foreground-dark}
+label-muted = sound muted

 bar-volume-width = 10
 bar-volume-foreground-0 = #55aa55
@@ -248,7 +264,7 @@
 bar-volume-fill-font = 2
 bar-volume-empty = ─
 bar-volume-empty-font = 2
-bar-volume-empty-foreground = #55
+bar-volume-empty-foreground = ${colors.foreground-dark}

 [module/battery]
 type = internal/battery
@@ -258,20 +274,23 @@

 format-charging = <animation-charging> <label-charging>
 format-charging-underline = #ffb52a
+
 format-discharging = <ramp-capacity> <label-discharging>
 format-discharging-underline = ${self.format-charging-underline}
-format-full = %{F#55}%{F#ff}  <label-full>
+
+format-full-prefix = " "
+format-full-prefix-foreground = ${colors.foreground-dark}
 format-full-underline = ${self.format-charging-underline}

 ramp-capacity-0 = 
 ramp-capacity-1 = 
 ramp-capacity-2 = 
-ramp-capacity-foreground = #55
+ramp-capacity-foreground = ${colors.foreground-dark}

 animation-charging-0 = 
 animation-charging-1 = 
 animation-charging-2 = 
-animation-charging-foreground = #55
+animation-charging-foreground = ${colors.foreground-dark}
 animation-charging-framerate = 750

 [module/temperature]
@@ -286,22 +305,22 @@

 label = %temperature%
 label-warn = %temperature%
-label-warn-foreground = #e60053
+label-warn-foreground = ${colors.secondary}

 ramp-0 = 
 ramp-1 = 
 ramp-2 = 
-ramp-foreground = #55
+ramp-foreground = ${colors.foreground-dark}

 [module/powermenu]
 type = custom/menu

 label-open =  power
-label-open-foreground = #e60053
+label-open-foreground = ${colors.secondary}
 label-close =  cancel
-label-close-foreground = #e60053
+label-close-foreground = ${colors.secondary}
 label-separator = |
-label-separator-foreground = #55
+label-separator-foreground = ${colors.foreground-dark}

 menu-0-0 = reboot
 menu-0-0-exec = menu-open-1


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -11,6 +11,7 @@

 Name=GStreamer
 Name[bg]=GStreamer
+Name[bs]=Gstreamer
 Name[ca]=GStreamer
 Name[ca@valencia]=GStreamer
 Name[cs]=GStreamer


CMake: Fix missing link dependencies from GASNet MPI conduit

--- cmake/FindGASNet.cmake
+++ cmake/FindGASNet.cmake
@@ -67,6 +67,8 @@
 	@echo $(GASNET_CXX)
 gasnet-cxxflags:
 	@echo $(GASNET_CXXCPPFLAGS) $(GASNET_CXXFLAGS) $(GASNETTOOLS_CPPFLAGS) $(GASNETTOOLS_CXXFLAGS)
+gasnet-ld:
+	@echo $(GASNET_LD)
 gasnet-ldflags:
 	@echo $(GASNET_LDFLAGS) $(GASNETTOOLS_LDFLAGS)
 gasnet-libs:
@@ -85,6 +87,11 @@
     execute_process(
       COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-cxxflags
       OUTPUT_VARIABLE _GASNet_CXXFLAGS
+      OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
+    )
+    execute_process(
+      COMMAND ${GASNet_MAKE_PROGRAM} -s -f ${_TEMP_MAKEFILE} gasnet-ld
+      OUTPUT_VARIABLE _GASNet_LD
       OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
     )
     execute_process(
@@ -146,6 +153,11 @@
     endif()
     mark_as_advanced(GASNet_${L}_LIBRARY)
   endforeach()
+  if(COMPONENT_NAME MATCHES "^mpi-.*" AND NOT (_GASNet_LD STREQUAL CMAKE_C_COMPILER))
+    set(MPI_C_COMPILER ${_GASNet_LD})
+    find_package(MPI REQUIRED COMPONENTS C)
+    list(APPEND COMPONENT_DEPS ${MPI_C_LIBRARIES})
+  endif()
   add_library(GASNet::${COMPONENT_NAME} UNKNOWN IMPORTED)
   set_target_properties(GASNet::${COMPONENT_NAME} PROPERTIES
     IMPORTED_LOCATION "${COMPONENT_LIB}"


Support source dir as `LIBCAF_ROOT_DIR`

Support source dir as `LIBCAF_ROOT_DIR`

--- cmake/FindLibcaf.cmake
+++ cmake/FindLibcaf.cmake
@@ -31,8 +31,9 @@
   # look for headers: give CMake hints where to find non-installed CAF versions
   # note that we look for the headers of each component individually: this is
   # necessary to support non-installed versions of CAF, i.e., accessing the
-  # checked out "actor-framework" or "caf" directory structure directly
-  unset(HDRHINT)
+  # checked out "actor-framework" or "caf" directory structure directly;
+  # also check whether LIBCAF_ROOT_DIR is a source directory
+  set(HDRHINT "${LIBCAF_ROOT_DIR}/libcaf_${comp}")
   foreach(dir ".." "../.." "../../..")
     foreach(subdir "actor-framework" "caf")
       set(HDRHINT ${HDRHINT} "${dir}/${subdir}/libcaf_${comp}")
@@ -78,6 +79,7 @@
                      "caf_${comp}"
                    HINTS
                      ${LIBCAF_ROOT_DIR}/lib
+                     ${LIBCAF_ROOT_DIR}/build/lib
                      /usr/lib
                      /usr/local/lib
                      /opt/local/lib
@@ -100,6 +102,7 @@
                                   FOUND_VAR LIBCAF_FOUND
                                   REQUIRED_VARS LIBCAF_LIBRARIES LIBCAF_INCLUDE_DIRS
                                   HANDLE_COMPONENTS)
+
 # final step to tell CMake we're done
 mark_as_advanced(LIBCAF_ROOT_DIR
                  LIBCAF_LIBRARIES


Use ITK v4 code for OpenCL config with cmake

--- cmake/FindOpenCL.cmake
+++ cmake/FindOpenCL.cmake
@@ -1,80 +1,99 @@
-##-----------------------------------------------------------------------------
-##  As posted on NVidia forum
-##  http://forums.nvidia.com/index.php?showtopic=97795
-##  Version: Oct 5, 2009
-##  Downloaded: Nov 14, 2009
-##  Modified by GCS
-##-----------------------------------------------------------------------------
+# - Try to find OpenCL
+# This module tries to find an OpenCL implementation on your system. It supports
+# AMD / ATI, Apple and NVIDIA implementations, but should work, too.
+#
+# Once done this will define
+#  OPENCL_FOUND        - system has OpenCL
+#  OPENCL_INCLUDE_DIRS  - the OpenCL include directory
+#  OPENCL_LIBRARIES    - link these to use OpenCL
+#
+# WIN32 should work, but is untested

-## AMD/ATI
-set(ENV_ATISTREAMSDKROOT $ENV{ATISTREAMSDKROOT})
+FIND_PACKAGE( PackageHandleStandardArgs )

-if(ENV_ATISTREAMSDKROOT)
-  find_path(
-    OPENCL_INCLUDE_DIR
-    NAMES CL/cl.h OpenCL/cl.h
-    PATHS $ENV{ATISTREAMSDKROOT}/include
-    NO_DEFAULT_PATH
-    )
+SET (OPENCL_VERSION_STRING "0.1.0")
+SET (OPENCL_VERSION_MAJOR 0)
+SET (OPENCL_VERSION_MINOR 1)
+SET (OPENCL_VERSION_PATCH 0)

-  ## Both windows and linux follow this directory structure.  Not sure
-  ## about darwin.
-  if(CMAKE_SIZEOF_VOID_P EQUAL 4)
-    set(
-      OPENCL_LIB_SEARCH_PATH
-      ${OPENCL_LIB_SEARCH_PATH}
-      $ENV{ATISTREAMSDKROOT}/lib/x86
+IF (APPLE)
+
+  FIND_LIBRARY(OPENCL_LIBRARIES OpenCL DOC "OpenCL lib for OSX")
+  FIND_PATH(OPENCL_INCLUDE_DIRS OpenCL/cl.h DOC "Include for OpenCL on OSX")
+  FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS OpenCL/cl.hpp DOC "Include for OpenCL CPP bindings on OSX")
+
+ELSE (APPLE)
+
+  IF (WIN32)
+
+ FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h )
+    FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp )
+
+ # AMD
+ IF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD" )
+
+  # The AMD SDK currently installs both x86 and x86_64 libraries
+  # This is only a hack to find out architecture
+  IF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64" )
+    SET(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86_64")
+  ELSE (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
+    SET(OPENCL_LIB_DIR "$ENV{ATISTREAMSDKROOT}/lib/x86")
+  ENDIF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64" )
+
+ # NVIDIA
+ ELSE( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD" )
+
+  IF( ${OPENCL_INCLUDE_DIRS} STREQUAL "OPENCL_INCLUDE_DIRS-NOTFOUND" )
+   SET( SEARCH_PATH ${PATH} "C:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/OpenCL/common/inc")
+   FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS ${SEARCH_PATH} )
+   FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS ${SEARCH_PATH} )
+  ENDIF( ${OPENCL_INCLUDE_DIRS} STREQUAL "OPENCL_INCLUDE_DIRS-NOTFOUND" )
+
+  IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+   SET(OPENCL_LIB_DIR "C:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/OpenCL/common/lib/x64")
+  ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
+   SET(OPENCL_LIB_DIR "C:/ProgramData/NVIDIA Corporation/NVIDIA GPU Computing SDK/OpenCL/common/lib/Win32")
+  ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+
+ ENDIF( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD" )
+
+    FIND_LIBRARY(OPENCL_LIBRARIES OpenCL.lib ${OPENCL_LIB_DIR})
+
+    GET_FILENAME_COMPONENT(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)
+
+    # On Win32 search relative to the library
+    FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS "${_OPENCL_INC_CAND}")
+    FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS "${_OPENCL_INC_CAND}")
+
+  ELSE (WIN32)
+
+    # Unix style platforms
+    FIND_LIBRARY(OPENCL_LIBRARIES OpenCL
+      ENV LD_LIBRARY_PATH
       )
-  else(CMAKE_SIZEOF_VOID_P EQUAL 4)
-    set(
-      OPENCL_LIB_SEARCH_PATH
-      ${OPENCL_LIB_SEARCH_PATH}
-      $ENV{ATISTREAMSDKROOT}/lib/x86_64
-      )
-  endif(CMAKE_SIZEOF_VOID_P EQUAL 4)

-  find_library(
-    OPENCL_LIBRARY
-    NAMES OpenCL
-    PATHS ${OPENCL_LIB_SEARCH_PATH}
-    NO_DEFAULT_PATH
-    )
+    GET_FILENAME_COMPONENT(OPENCL_LIB_DIR ${OPENCL_LIBRARIES} PATH)
+    GET_FILENAME_COMPONENT(_OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE)

-## NVIDIA
-else(ENV_ATISTREAMSDKROOT)
-  find_path(
-    OPENCL_INCLUDE_DIR
-    PATHS $ENV{CUDA_INC_PATH}
-    NAMES CL/cl.h OpenCL/cl.h
-    )
+    # The AMD SDK currently does not place its headers
+    # in /usr/include, therefore also search relative
+    # to the library
+    FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS ${_OPENCL_INC_CAND} /usr/local/cuda/include/)
+    FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS ${_OPENCL_INC_CAND})

-  find_library(
-    OPENCL_LIBRARY
-    PATHS $ENV{CUDA_LIB_PATH}
-    NAMES OpenCL
-    )
-endif(ENV_ATISTREAMSDKROOT)
+  ENDIF (WIN32)

-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
-  OPENCL
-  DEFAULT_MSG
-  OPENCL_LIBRARY OPENCL_INCLUDE_DIR
+ENDIF (APPLE)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS( OpenCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS )
+
+IF( _OPENCL_CPP_INCLUDE_DIRS )
+  SET( OPENCL_HAS_CPP_BINDINGS TRUE )
+  LIST( APPEND OPENCL_INCLUDE_DIRS ${_OPENCL_CPP_INCLUDE_DIRS} )
+  # This is often the same, so clean up
+  LIST( REMOVE_DUPLICATES OPENCL_INCLUDE_DIRS )
+ENDIF( _OPENCL_CPP_INCLUDE_DIRS )
+
+MARK_AS_ADVANCED(
+  OPENCL_INCLUDE_DIRS
   )
-
-# JAS 2010.12.09
-# Edit to allow OpenCL to be delay loaded
-IF (OPENCL_FOUND)
-    SET (OPENCL_LIBRARIES ${OPENCL_LIBRARY})
-ELSE (OPENCL_FOUND)
-    SET (OPENCL_LIBRARIES)
-ENDIF (OPENCL_FOUND)
-
-if(MINGW)
-  set(OPENCL_FOUND FALSE)
-endif(MINGW)
-
-mark_as_advanced(
-  OPENCL_INCLUDE_DIR
-  OPENCL_LIBRARY
-)


add imported library targets for find_package'ed gtest

This makes catkin gtests work again with gtest 1.5 as well as
1.6+ on Arch Linux and others.

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -121,6 +121,10 @@
   endif()
 else()
   message(STATUS "Found gtest: gtests will be built")
+  add_library(gtest SHARED IMPORTED)
+  set_target_properties(gtest PROPERTIES IMPORTED_LOCATION "${GTEST_LIBRARIES}")
+  add_library(gtest_main SHARED IMPORTED)
+  set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION "${GTEST_MAIN_LIBRARIES}")
   set(GTEST_FOUND ${GTEST_FOUND} CACHE INTERNAL "")
   set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} CACHE INTERNAL "")
   set(GTEST_LIBRARIES ${GTEST_LIBRARIES} CACHE INTERNAL "")
@@ -132,4 +136,4 @@
   if(WIN32)
     add_definitions(/D _VARIADIC_MAX=10)
   endif()
-endif()+endif()


Add an additional hint for opencascade

Add an additional hint for opencascade

--- cmake/modules/FindOPENCASCADE.cmake
+++ cmake/modules/FindOPENCASCADE.cmake
@@ -34,6 +34,7 @@
 SET_IF_EMPTY(OPENCASCADE_DIR "$ENV{OPENCASCADE_DIR}")
 SET_IF_EMPTY(OPENCASCADE_DIR "$ENV{OCC_DIR}")
 SET_IF_EMPTY(OPENCASCADE_DIR "$ENV{OCE_DIR}")
+SET_IF_EMPTY(OPENCASCADE_DIR "$ENV{CASROOT}")

 DEAL_II_FIND_PATH(OPENCASCADE_INCLUDE_DIR Standard_Version.hxx


Revert "Define swift include build components but dont wire them up"

--- cmake/modules/SwiftComponents.cmake
+++ cmake/modules/SwiftComponents.cmake
@@ -1,5 +1,3 @@
-include(SwiftList)
-
 # Swift Components
 # ----------------
 #
@@ -69,34 +67,10 @@
 set(_SWIFT_DEFINED_COMPONENTS
   "autolink-driver;compiler;clang-builtin-headers;clang-resource-dir-symlink;clang-builtin-headers-in-clang-resource-dir;stdlib;stdlib-experimental;sdk-overlay;editor-integration;tools;testsuite-tools;toolchain-dev-tools;dev;license;sourcekit-xpc-service;sourcekit-inproc;swift-remote-mirror;swift-remote-mirror-headers")

-# Configure the "Swift Component" system.
-#
-# *NOTE* We generally prefer functions over macros, but in this case, we need a
-# macro to insure that SWIFT_{INCLUDE,BUILD,INSTALL}_COMPONENTS are
-# available/cached at the top CMake scope.
 macro(swift_configure_components)
-  # Define our sets of components. By default, all components are "install
-  # components".
-  set(SWIFT_INCLUDE_COMPONENTS "" CACHE STRING
-    "A semicolon-separated list of components to generate cmake targets for. \
-Must be disjoint from SWIFT_BUILD_COMPONENTS and SWIFT_INSTALL_COMPONENTS")
-  set(SWIFT_BUILD_COMPONENTS "" CACHE STRING
-    "A semicolon-separated list of components to build by default. Must be \
-disjoint from SWIFT_INCLUDE_COMPONENTS and SWIFT_INSTALL_COMPONENTS")
+  # Set the SWIFT_INSTALL_COMPONENTS variable to the default value if it is not passed in via -D
   set(SWIFT_INSTALL_COMPONENTS "${_SWIFT_DEFINED_COMPONENTS}" CACHE STRING
     "A semicolon-separated list of components to install ${_SWIFT_DEFINED_COMPONENTS}")
-
-  # Make sure each component set does not have duplicates. This is necessary
-  # since these sets are represented in cmake as lists.
-  precondition_list_is_set(SWIFT_INCLUDE_COMPONENTS)
-  precondition_list_is_set(SWIFT_BUILD_COMPONENTS)
-  precondition_list_is_set(SWIFT_INSTALL_COMPONENTS)
-
-  # Then make sure that each one of our sets are disjoint.
-  precondition_list_is_disjoint(
-    SWIFT_INCLUDE_COMPONENTS
-    SWIFT_BUILD_COMPONENTS
-    SWIFT_INSTALL_COMPONENTS)

   foreach(component ${_SWIFT_DEFINED_COMPONENTS})
     string(TOUPPER "${component}" var_name_piece)


increase initial rating to 20, making phonon vlc the preferred backend

pvlc currently does a better job at not crashing, so when both are
installed (which is only possible on Linux...) the user really wants pvlc
for the time being.

CCMAIL: b79023b1b6c44221800603da53802a3b299c5de2@kde.org

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -7,7 +7,7 @@
 X-KDE-PhononBackendInfo-Version=@PHONON_VLC_VERSION@
 X-KDE-PhononBackendInfo-Website=http://www.videolan.org/
 Icon=vlc
-InitialPreference=10
+InitialPreference=20

 Name=VLC
 Name[bg]=VLC


Incorrect guard variable

Incorrect guard variable

--- modules/FindGBenchmark.cmake
+++ modules/FindGBenchmark.cmake
@@ -3,7 +3,7 @@
 # - GBENCHMARK_FOUND if the library is found
 # - GBENCHMARK_LIBRARY is the path to the library
 # - GBENCHMARK_INCLUDE_DIR is the path to the include directory
-if(gbenchmark_FOUND)
+if(GBENCHMARK_FOUND)
   return()
 endif()


ENH: remove useless path, no headers in it

--- CMake/otbIncludeDirectories.cmake
+++ CMake/otbIncludeDirectories.cmake
@@ -283,7 +283,6 @@
   Utilities/otb6S
   Utilities/otbkml
   Utilities/otbkml/src
-  Utilities/otbkml/third_party
   Utilities/otbkml/third_party/boost_1_34_1
   Utilities/otbliblas/include
   Utilities/otbedison


Fix FindFFMPEG to not include libraries that were not found in FFMPEG_LIBRARIES

--- CMake/FindFFMPEG.cmake
+++ CMake/FindFFMPEG.cmake
@@ -111,7 +111,7 @@
   /usr/lib
 )

-
+SET(FFMPEG_LIBRARIES)
 IF(FFMPEG_INCLUDE_DIR)
   IF(FFMPEG_avformat_LIBRARY)
     IF(FFMPEG_avcodec_LIBRARY)
@@ -122,16 +122,43 @@
           ${FFMPEG_avformat_LIBRARY}
           ${FFMPEG_avutil_LIBRARY}
           )
-        SET( FFMPEG_LIBRARIES
-          ${FFMPEG_BASIC_LIBRARIES}
-          ${FFMPEG_vorbis_LIBRARY}
-          ${FFMPEG_dc1394_LIBRARY}
-          ${FFMPEG_vorbisenc_LIBRARY}
-          ${FFMPEG_theora_LIBRARY}
-          ${FFMPEG_dts_LIBRARY}
-          ${FFMPEG_gsm_LIBRARY}
-          ${FFMPEG_swscale_LIBRARY}
-          ${FFMPEG_z_LIBRARY})
+
+        SET(FFMPEG_LIBRARIES ${FFMPEG_BASIC_LIBRARIES})
+
+        IF(FFMPEG_vorbis_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_vorbis_LIBRARY})
+        ENDIF(FFMPEG_vorbis_LIBRARY)
+
+        IF(FFMPEG_dc1394_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_dc1394_LIBRARY})
+        ENDIF(FFMPEG_dc1394_LIBRARY)
+
+        IF(FFMPEG_vorbisenc_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_vorbisenc_LIBRARY})
+        ENDIF(FFMPEG_vorbisenc_LIBRARY)
+
+        IF(FFMPEG_theora_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_theora_LIBRARY})
+        ENDIF(FFMPEG_theora_LIBRARY)
+
+        IF(FFMPEG_dts_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_dts_LIBRARY})
+        ENDIF(FFMPEG_dts_LIBRARY)
+
+        IF(FFMPEG_gsm_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_gsm_LIBRARY})
+        ENDIF(FFMPEG_gsm_LIBRARY)
+
+        IF(FFMPEG_swscale_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_swscale_LIBRARY})
+        ENDIF(FFMPEG_swscale_LIBRARY)
+
+        IF(FFMPEG_z_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_z_LIBRARY})
+        ENDIF(FFMPEG_z_LIBRARY)
+
+        SET(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE INTERNAL "All presently found FFMPEG libraries.")
+
       ENDIF(FFMPEG_avutil_LIBRARY)
     ENDIF(FFMPEG_avcodec_LIBRARY)
   ENDIF(FFMPEG_avformat_LIBRARY)


Fix luajit build

Fix luajit build

The luajit lib did not include debug symbols as it should.

--- external/luajit.cmake
+++ external/luajit.cmake
@@ -2,7 +2,8 @@
 set(INSTALL_DIR ${HAKA_INSTALL_PREFIX})
 set(INSTALL_FULLDIR ${CMAKE_HAKA_INSTALL_PREFIX})

-set(LUAJIT_CFLAGS -O2)
+set(LUAJIT_CFLAGS "")
+set(LUAJIT_CCDEBUG "")
 set(LUAJIT_XCFLAGS -DLUAJIT_ENABLE_LUA52COMPAT)

 if(NOT ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")
@@ -18,15 +19,21 @@
 if(CMAKE_BUILD_TYPE STREQUAL Debug)
 	set(LUAJIT_XCFLAGS ${LUAJIT_XCFLAGS} -DLUA_USE_APICHECK) # -DLUAJIT_USE_GDBJIT -DLUA_USE_ASSERT
 	set(LUAJIT_CFLAGS ${LUAJIT_CFLAGS} -O0 -g)
+	set(LUAJIT_CCDEBUG ${LUAJIT_CCDEBUG} -g)
 elseif(CMAKE_BUILD_TYPE STREQUAL Memcheck)
 	set(LUAJIT_XCFLAGS ${LUAJIT_XCFLAGS} -DLUAJIT_USE_VALGRIND -DLUA_USE_APICHECK) # -DLUAJIT_USE_GDBJIT
 	set(LUAJIT_CFLAGS ${LUAJIT_CFLAGS} -O0 -g)
+	set(LUAJIT_CCDEBUG ${LUAJIT_CCDEBUG} -g)
 elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
 	set(LUAJIT_CFLAGS ${LUAJIT_CFLAGS} -g)
+	set(LUAJIT_CCDEBUG ${LUAJIT_CCDEBUG} -g)
+else()
+	set(LUAJIT_CFLAGS ${LUAJIT_CFLAGS} -O2)
 endif()

 execute_process(COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/luajit)
-execute_process(COMMAND echo TARGET_CFLAGS="${LUAJIT_CFLAGS}" TARGET_XCFLAGS="${LUAJIT_XCFLAGS}"
+execute_process(COMMAND echo TARGET_CFLAGS="${LUAJIT_CFLAGS}" TARGET_XCFLAGS="${LUAJIT_XCFLAGS}" TARGET_LDFLAG="${LUAJIT_LDFLAGS}"
+	CCDEBUG="${LUAJIT_CCDEBUG}"
 	PREFIX=${INSTALL_FULLDIR} OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/luajit/cmake.tmp)
 execute_process(COMMAND cmp ${CMAKE_CURRENT_BINARY_DIR}/luajit/cmake.tmp ${CMAKE_CURRENT_BINARY_DIR}/luajit/cmake.build
 	RESULT_VARIABLE FILE_IS_SAME OUTPUT_QUIET ERROR_QUIET)
@@ -47,9 +54,11 @@

 add_custom_target(luajit
 	COMMAND make -C ${CMAKE_CURRENT_BINARY_DIR}/luajit PREFIX=${INSTALL_FULLDIR} BUILDMODE=dynamic
-		TARGET_CFLAGS="${LUAJIT_CFLAGS}" TARGET_XCFLAGS="${LUAJIT_XCFLAGS}"
+		TARGET_CFLAGS="${LUAJIT_CFLAGS}" TARGET_XCFLAGS="${LUAJIT_XCFLAGS}" TARGET_LDFLAG="${LUAJIT_LDFLAGS}"
+		CCDEBUG="${LUAJIT_CCDEBUG}"
 	COMMAND make -C ${CMAKE_CURRENT_BINARY_DIR}/luajit LDCONFIG='/sbin/ldconfig -n' PREFIX=${INSTALL_FULLDIR}
-		BUILDMODE=dynamic CCDEBUG="${LUAJIT_CCDEBUG}" COPTS="${LUAJIT_CCOPT}" XCFLAGS="${LUAJIT_CFLAGS}"
+		BUILDMODE=dynamic TARGET_CFLAGS="${LUAJIT_CFLAGS}" TARGET_XCFLAGS="${LUAJIT_XCFLAGS}"
+		TARGET_LDFLAG="${LUAJIT_LDFLAGS}" CCDEBUG="${LUAJIT_CCDEBUG}"
 		INSTALL_X='install -m 0755 -p' INSTALL_F='install -m 0644 -p' DESTDIR=${CMAKE_CURRENT_BINARY_DIR}/luajit install
 	DEPENDS luajit-sync ${CMAKE_CURRENT_BINARY_DIR}/luajit/cmake.build
 )


The cost of preserving the framepointer is small enough to allow it being default. Performance information benefits is significant and will over time counter the cost. Observed cost has been below the noise level in the 1% range.

--- build_settings.cmake
+++ build_settings.cmake
@@ -30,7 +30,7 @@
 endif()

 # C and C++ compiler flags
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel ${EXTRA_C_FLAGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -fno-omit-frame-pointer ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel ${EXTRA_C_FLAGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} ${CXX_SPECIFIC_WARN_OPTS} -std=c++1z -fvisibility-inlines-hidden -fdiagnostics-color=auto ${EXTRA_CXX_FLAGS}")

 # Linker flags


add swigmake, update eigen, iris

add swigmake, update eigen, iris


ENH: Updated niral_utilities version so that CropDTI handles image origin and orientation correctly

--- SuperBuild/FindExternalTools.cmake
+++ SuperBuild/FindExternalTools.cmake
@@ -600,7 +600,7 @@
   SVN_REPOSITORY "http://www.nitrc.org/svn/niral_utilities/trunk"
   SVN_USERNAME slicerbot
   SVN_PASSWORD slicer
-  SVN_REVISION -r 41 # 01/29/2013
+  SVN_REVISION -r 50 # 08/15/2013
   )
 set( CMAKE_ExtraARGS
   -DCOMPILE_CONVERTITKFORMATS:BOOL=OFF


changed cpack architecture in deploy

changed cpack architecture in deploy

--- deploy/packages/pack-confdesc.cmake
+++ deploy/packages/pack-confdesc.cmake
@@ -189,7 +189,7 @@

 set(CPACK_DEBIAN_PACKAGE_NAME           "${package_name}")
 set(CPACK_DEBIAN_PACKAGE_VERSION        "${CPACK_PACKAGE_VERSION}")
-set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE   "all")
+#set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE   "all")
 set(CPACK_DEBIAN_PACKAGE_DEPENDS       "libboost-dev")
 set(CPACK_DEBIAN_PACKAGE_MAINTAINER     "${package_maintainer}")
 set(CPACK_DEBIAN_PACKAGE_DESCRIPTION    "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
@@ -208,7 +208,7 @@
 set(CPACK_RPM_PACKAGE_NAME                            "${package_name}")
 set(CPACK_RPM_PACKAGE_VERSION                         "${CPACK_PACKAGE_VERSION}")
 set(CPACK_RPM_PACKAGE_RELEASE                         1)
-set(CPACK_RPM_PACKAGE_ARCHITECTURE                    "x86_64")
+#set(CPACK_RPM_PACKAGE_ARCHITECTURE                    "x86_64")
 set(CPACK_RPM_PACKAGE_REQUIRES                        "")
 set(CPACK_RPM_PACKAGE_PROVIDES                        "")
 set(CPACK_RPM_PACKAGE_VENDOR                          "${package_vendor}")


exposing the path to the android toolchain in cache.

--- Toolchains/android.toolchain.cmake
+++ Toolchains/android.toolchain.cmake
@@ -375,6 +375,7 @@
  # see if we have path to Android standalone toolchain
  __INIT_VARIABLE( ANDROID_STANDALONE_TOOLCHAIN PATH ENV_ANDROID_STANDALONE_TOOLCHAIN OBSOLETE_ANDROID_NDK_TOOLCHAIN_ROOT OBSOLETE_ENV_ANDROID_NDK_TOOLCHAIN_ROOT )

+
  if( NOT ANDROID_STANDALONE_TOOLCHAIN )
   #try to find Android NDK in one of the the default locations
   set( __ndkSearchPaths )
@@ -428,11 +429,11 @@
   unset( __androidStandaloneToolchainPreviousPath )
   unset( __length )
  endif()
- set( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" CACHE INTERNAL "Path of the Android standalone toolchain" )
+ set( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" CACHE PATH "Path of the Android standalone toolchain" )
  set( BUILD_WITH_STANDALONE_TOOLCHAIN True )
 else()
  list(GET ANDROID_NDK_SEARCH_PATHS 0 ANDROID_NDK_SEARCH_PATH)
- message( FATAL_ERROR "Could not find neither Android NDK nor Android standalone toolcahin.
+ message( FATAL_ERROR "Could not find neither Android NDK nor Android standalone toolchain.
     You should either set an environment variable:
       export ANDROID_NDK=~/my-android-ndk
     or


Downgrade build system error message to a warning

Instead of requiring MSVC 2013 U4, we simply warn users, since some might
not bt able to immediately upgrade.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -41,8 +41,11 @@
       set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
     endif()
   elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0.31101)
-      message(FATAL_ERROR "Host Visual Studio must be at least 2013 Update 4 (MSVC 18.0.31101)")
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
+      message(FATAL_ERROR "Host Visual Studio must be at least 2013")
+    elseif(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0.31101)
+      message(WARNING "Host Visual Studio should at least be 2013 Update 4 (MSVC 18.0.31101)"
+        "  due to miscompiles from earlier versions")
     endif()
   endif()
 endif()


CMake: #ifdef LLVM_VERSION in config.h (some TCE files include both config.h and llvm headers which define LLVM_VERSION)

--- config.h.in.cmake
+++ config.h.in.cmake
@@ -14,7 +14,9 @@
 /* "Build with ICD" */
 #cmakedefine BUILD_ICD

-#define LLVM_VERSION "@LLVM_VERSION@"
+#ifndef LLVM_VERSION
+#define LLVM_VERSION "@LLVM_VERSION_FULL@"
+#endif

 #define CLANG "@CLANG@"


Fix compiler ABI detection for iOS platform.

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -217,7 +217,9 @@
             endif ()
         endif ()
         # Ensure the module has found the library with the right ABI for the chosen compiler and URHO3D_64BIT build option (if specified)
-        if (URHO3D_LIBRARIES AND NOT URHO3D_COMPILE_RESULT)
+        if (URHO3D_COMPILE_RESULT)
+            break ()    # Use the cached result instead of redoing try_run() each time
+        elseif (URHO3D_LIBRARIES)
             if (NOT (MSVC OR MINGW OR ANDROID OR RPI OR WEB) AND NOT ABI_64BIT)
                 set (COMPILER_32BIT_FLAG -DCOMPILE_DEFINITIONS:STRING=-m32)
             endif ()
@@ -254,6 +256,11 @@
             set (URHO3D_COMPILE_RESULT ${URHO3D_COMPILE_RESULT} CACHE INTERNAL "FindUrho3D module's compile result")
             if (URHO3D_COMPILE_RESULT AND URHO3D_RUN_RESULT EQUAL 0)
                 # Auto-discover build options used by the found library
+                if (IOS)
+                    # Since Urho3D library for iOS is a universal binary, we need another way to find out the compiler ABI when the library was built
+                    execute_process (COMMAND lipo -info ${URHO3D_LIBRARIES} 2>/dev/null COMMAND grep -cq 'arm64' RESULT_VARIABLE GREP_RESULT OUTPUT_QUIET ERROR_QUIET)
+                    math (EXPR ABI_64BIT "1 - ${GREP_RESULT}")
+                endif ()
                 set (URHO3D_64BIT ${ABI_64BIT} CACHE BOOL "Enable 64-bit build, the value is auto-discovered based on the found Urho3D library" FORCE) # Force it as it is more authoritative than user-specified option
                 set (URHO3D_LIB_TYPE ${URHO3D_LIB_TYPE} CACHE BOOL "Urho3D library type, the value is auto-discovered based on the found Urho3D library" FORCE) # Use the Force, Luke
                 foreach (VAR ${AUTO_DISCOVER_VARS})


Fix spelling mistake and remove some whitespace.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -1096,7 +1096,7 @@
     list (APPEND SOURCE_FILES ${RESOURCE_DIRS} ${RESOURCE_PAKS} ${RESOURCE_FILES})
 endmacro()

-# Macro fo adding a HTML shell-file when targeting Web platform
+# Macro for adding a HTML shell-file when targeting Web platform
 macro (add_html_shell)
     check_source_files ("Could not call add_html_shell() macro before define_source_files() macro.")
     if (EMSCRIPTEN)
@@ -1126,7 +1126,7 @@
     # No op when PCH support is not enabled
     if (URHO3D_PCH)
         # Get the optional LANG parameter to indicate whether the header should be treated as C or C++ header, default to C++
-        if ("${ARGN}" STREQUAL C)   # Stringify as the LANG paramater could be empty
+        if ("${ARGN}" STREQUAL C) # Stringify as the LANG paramater could be empty
             set (EXT c)
             set (LANG C)
             set (LANG_H c-header)


Fixed Ubuntu build (2).

Fixed Ubuntu build (2).

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -249,7 +249,11 @@
 function(has_sanitizer has_sanitizer_arg has_sanitizer_retval)
     set(retval 0)
     if(UNIX)
-        execute_process(COMMAND ldconfig -p COMMAND grep -c ${has_sanitizer_arg} OUTPUT_VARIABLE retval )
+        set(CI_ALPINE 0)
+        execute_process(COMMAND cat /etc/os-release COMMAND grep -c Alpine OUTPUT_VARIABLE CI_ALPINE)
+        if(CI_ALPINE EQUAL 0)
+            execute_process(COMMAND ldconfig -p COMMAND grep -c ${has_sanitizer_arg} OUTPUT_VARIABLE retval )
+        endif()
     endif()
     set(${has_sanitizer_retval} ${retval} PARENT_SCOPE)
 endfunction()
@@ -318,13 +322,6 @@
     if(CC_VERSION VERSION_GREATER 5 OR CC_VERSION VERSION_EQUAL 5)
         if(CC_TSAN GREATER 0)
             set(CTEST_MEMORYCHECK_TYPE "ThreadSanitizer")
-            if(UNIX)
-                set(CI_UBUNTU 0)
-                execute_process(COMMAND cat /etc/*-release COMMAND grep -c Ubuntu OUTPUT_VARIABLE CI_UBUNTU )
-                if(CI_UBUNTU GREATER 0)
-                    set(CC_TSAN_FLAGS "-static-libtsan")
-                endif()
-            endif()
         endif()
     endif()
 elseif(CC_NAME STREQUAL "clang")
@@ -335,6 +332,13 @@
     endif()
 endif()
 if(CTEST_MEMORYCHECK_TYPE STREQUAL "ThreadSanitizer")
+    if(UNIX)
+        set(CI_UBUNTU 0)
+        execute_process(COMMAND cat /etc/os-release COMMAND grep -c Ubuntu OUTPUT_VARIABLE CI_UBUNTU )
+        if(CI_UBUNTU GREATER 0)
+            set(CC_TSAN_FLAGS "-static-libtsan")
+        endif()
+    endif()
     set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS "verbosity=1")
     set(CTEST_BUILD_NAME "${CI_BUILD_NAME}-tsan")
     ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})


add_external_library(): add LIBRARY and IMPORT_LIBRARY

--- cmake/External.cmake
+++ cmake/External.cmake
@@ -42,7 +42,7 @@
 #     INTERFACE_LIBRARIES <external_library>*")
 #
 function(add_external_library TARGET LINKAGE)
-  set(ARGS_ONE_VALUE DEPENDS COMPILE_DEFINITIONS INCLUDE_DIR LIBRARY_DEBUG LIBRARY_RELEASE IMPORT_LIBRARY_DEBUG IMPORT_LIBRARY_RELEASE INTERFACE_LIBRARIES)
+  set(ARGS_ONE_VALUE DEPENDS COMPILE_DEFINITIONS INCLUDE_DIR LIBRARY LIBRARY_DEBUG LIBRARY_RELEASE IMPORT_LIBRARY IMPORT_LIBRARY_DEBUG IMPORT_LIBRARY_RELEASE INTERFACE_LIBRARIES)
   cmake_parse_arguments(args "" "${ARGS_ONE_VALUE}" "" ${ARGN})

    if(NOT args_DEPENDS)
@@ -54,10 +54,12 @@
   ExternalProject_Get_Property(${DEPENDS} INSTALL_DIR)
   _argument_default(COMPILE_DEFINITIONS "")
   _argument_default(INCLUDE_DIR include)
-  _argument_default(LIBRARY_DEBUG "NOTFOUND")
-  _argument_default(LIBRARY_RELEASE "NOTFOUND")
-  _argument_default(IMPORT_LIBRARY_DEBUG "NOTFOUND")
-  _argument_default(IMPORT_LIBRARY_RELEASE "NOTFOUND")
+  _argument_default(LIBRARY "NOTFOUND")
+  _argument_default(LIBRARY_DEBUG "${LIBRARY}")
+  _argument_default(LIBRARY_RELEASE "${LIBRARY}")
+  _argument_default(IMPORT_LIBRARY "NOTFOUND")
+  _argument_default(IMPORT_LIBRARY_DEBUG "${IMPORT_LIBRARY}")
+  _argument_default(IMPORT_LIBRARY_RELEASE "${IMPORT_LIBRARY}")

   # Create include directory as required by INTERFACE_INCLUDE_DIRECTORIES.
   file(MAKE_DIRECTORY "${INSTALL_DIR}/${INCLUDE_DIR}")