Install lldb's SB headers (pr36630)

Install lldb's SB headers (pr36630)

These were removed in r309021 in what looks like an accidentally
committed change. This brings them back.

I also rename the header component to lldb-headers (instead of
lldb_headers) to match the llvm style and add a special
install-lldb-headers target, which installs just the headers.

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

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -277,27 +277,31 @@

 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/
-    COMPONENT lldb_headers
+    COMPONENT lldb-headers
     DESTINATION include
     FILES_MATCHING
     PATTERN "*.h"
     PATTERN ".svn" EXCLUDE
     PATTERN ".cmake" EXCLUDE
     PATTERN "Config.h" EXCLUDE
-    PATTERN "lldb-*.h" EXCLUDE
-    PATTERN "API/*.h" EXCLUDE
     )

   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
-    COMPONENT lldb_headers
+    COMPONENT lldb-headers
     DESTINATION include
     FILES_MATCHING
     PATTERN "*.h"
     PATTERN ".svn" EXCLUDE
     PATTERN ".cmake" EXCLUDE
-    PATTERN "lldb-*.h" EXCLUDE
-    PATTERN "API/*.h" EXCLUDE
     )
+
+  add_custom_target(lldb-headers)
+  set_target_properties(lldb-headers PROPERTIES FOLDER "Misc")
+
+  if (NOT CMAKE_CONFIGURATION_TYPES)
+    add_llvm_install_targets(install-lldb-headers
+                             COMPONENT lldb-headers)
+  endif()
 endif()

 if (NOT LIBXML2_FOUND AND NOT (CMAKE_SYSTEM_NAME MATCHES "Windows"))


Tweak commentary.

Tweak commentary.

svn path=/trunk/; revision=8377

--- cmake/modules/pkg-config.cmake
+++ cmake/modules/pkg-config.cmake
@@ -20,10 +20,10 @@
 # Module for determining pkg-config configuration variables related to the
 # install-tree build of the examples.
 # Also create useful macros called pkg_check_pkgconfig to emulate the
-# pkgconfig macro using the pkg_check_modules macro,
-# cmake_to_pkg_config_link_flags to process CMake link flags into
+# pkgconfig macro using the pkg_check_modules macro;
+# pkg_config_link_flags to process CMake link flags into
 # pkg-config standard form for the configured output *.pc files, and
-# pkg_config_to_cmake_link_flags to process input link flags delivered
+# cmake_link_flags to process input link flags delivered
 # by pkg-config into CMake standard form.

 # The following variables are set:


GoogleMock Plugin: Dependen on librt only on linux

Change-Id: I7eee765eedbacc951174aebe328a08fe2d664f05

--- cmake/plugins/GoogleMock.cmake
+++ cmake/plugins/GoogleMock.cmake
@@ -20,13 +20,18 @@
 	IF("${CONFIG_GTEST_URL}" STREQUAL "")
 		SET(CONFIG_GTEST_URL "http://googlemock.googlecode.com/files/gmock-1.6.0.zip")
 	ENDIF()
+
+	SET(NEEDED_LIBRARIES "Threads")
+	IF(NOT "${TARGET_OS}" STREQUAL Windows)
+		SET(NEEDED_LIBRARIES "${NEEDED_LIBRARIES} LibRt")
+	ENDIF()
 	ACME_ADD_CMAKE_PROJECT(	GoogleMock
 						LIBNAMES gmock gtest
 						INCLUDE_DIRS "src/GoogleMock/include" "src/GoogleMock/gtest/include"
 						URL "${CONFIG_GTEST_URL}"
 						CHECKSUM "f547f47321ca88d3965ca2efdcc2a3c1"
 						CMAKE_ARGUMENTS "gtest_force_shared_crt:Bool=1"
-						REQUIRED_PACKAGES "LibRt" "Threads"
+						REQUIRED_PACKAGES "${NEEDED_LIBRARIES}"
 						)

 ENDIF()


STYLE: remove extra GIT_TAG definition

STYLE: remove extra GIT_TAG definition

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -162,9 +162,6 @@

   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git)
-  set(${proj}_GIT_TAG f60bbd3aadc4b9fbf2cff1cf7227cef1e92b979a) ##
-  set(ITK_VERSION_ID ITK-4.10) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID
-
   set(${proj}_GIT_TAG 5aad8ac86968a12be74a31ef6493811c0ea13d05) ##
   set(ITK_VERSION_ID ITK-4.11) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID


Adding liblzma.a

Adding liblzma.a

--- cmake/CMakeDA.cmake
+++ cmake/CMakeDA.cmake
@@ -296,7 +296,7 @@
 #COMMAND @echo 'MONITORLIBS=${monitor1}' >> ${DAMAKEFILE}
 COMMAND @echo "" >> ${DAMAKEFILE}
 COMMAND @echo "${DAMODULE}${SUBDAMODULE}${DANAME}da.exe: ${DAMODULE}${SUBDAMODULE}${DANAME}da.o" >> ${DAMAKEFILE}
-COMMAND @echo -e '\t$$(LD) $$(LDFLAGS) -o ''$$''@ ''$$''< ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${DALIB}.a ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${EXTRAROOTLIB} $$(ROOTSYS)/lib/libRoot.a $$(ROOTSYS)/lib/libfreetype.a $$(ROOTSYS)/lib/libpcre.a ${SYSLIBS} $$(DAQDALIB) ${AMOREDALIBS} ${MONITORLIBS}' >> ${DAMAKEFILE}
+COMMAND @echo -e '\t$$(LD) $$(LDFLAGS) -o ''$$''@ ''$$''< ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${DALIB}.a ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${EXTRAROOTLIB} $$(ROOTSYS)/lib/libRoot.a $$(ROOTSYS)/lib/liblzma.a $$(ROOTSYS)/lib/libfreetype.a $$(ROOTSYS)/lib/libpcre.a ${SYSLIBS} $$(DAQDALIB) ${AMOREDALIBS} ${MONITORLIBS}' >> ${DAMAKEFILE}
 COMMAND @echo "" >> ${DAMAKEFILE}
 COMMAND @echo "${DAMODULE}${SUBDAMODULE}${DANAME}da.o: ${DAMODULE}${SUBDAMODULE}${DANAME}da.cxx" >> ${DAMAKEFILE}
 COMMAND @echo -e '\t$$(CXX) -c $$(CXXFLAGS) -I$$(DAQDADIR) ${mod} ''$$''< -o ''$$''@' >> ${DAMAKEFILE}
@@ -443,7 +443,7 @@

 add_custom_target(${DAEXE}
 COMMAND echo "***** Making executable ${DAEXE} *****"
-COMMAND g++ ${LDFLAGS} ${DAOBJ} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${DALIB}.a ${EXTRAROOTLIB} ${ROOTSYS}/lib/libRoot.a ${ROOTSYS}/lib/libfreetype.a ${ROOTSYS}/lib/libpcre.a ${SYSLIBS} ${DAQDALIB} ${AMOREDALIBS} ${MONITORLIBS} -o ${DAEXE}
+COMMAND g++ ${LDFLAGS} ${DAOBJ} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${DALIB}.a ${EXTRAROOTLIB} ${ROOTSYS}/lib/libRoot.a ${ROOTSYS}/lib/liblzma.a ${ROOTSYS}/lib/libfreetype.a ${ROOTSYS}/lib/libpcre.a  ${SYSLIBS} ${DAQDALIB} ${AMOREDALIBS} ${MONITORLIBS} -o ${DAEXE}
 WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
 )


Add use of LUA_LIBRARY_DIRS, #4646

Add use of LUA_LIBRARY_DIRS, #4646

--- cmake/FindLua.cmake
+++ cmake/FindLua.cmake
@@ -84,11 +84,15 @@
              lua.${CMAKE_MATCH_1}.${CMAKE_MATCH_2}
         )
         pkg_check_modules(LUA QUIET "lua${ver}")
+        list(APPEND _lua_include_subdirs ${LUA_INCLUDE_DIRS})
+        list(APPEND _lua_library_names ${LUA_LIBRARIES})
+        list(APPEND _lua_library_dirs ${LUA_LIBRARY_DIRS})
     endforeach ()

     set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE)
     set(_lua_library_names "${_lua_library_names}" PARENT_SCOPE)
     set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE)
+    set(_lua_library_dirs "${_lua_library_dirs}" PARENT_SCOPE)
 endfunction(_lua_set_version_vars)

 function(_lua_check_header_version _hdr_file)
@@ -161,6 +165,7 @@
     ENV LUA_DIR
   PATH_SUFFIXES lib
   PATHS
+  ${_lua_library_dirs}
   ~/Library/Frameworks
   /Library/Frameworks
   /sw


Fixed linker error about NTL library

Fixed linker error about NTL library

--- cmake/FindNTL.cmake
+++ cmake/FindNTL.cmake
@@ -36,5 +36,10 @@

   set(NTL_INCLUDE_DIRS ${NTL_INCLUDE_DIR})
   set(NTL_LIBRARIES ${NTL_LIBRARY})
+  include_directories(${NTL_INCLUDE_DIRS})
+
+  if (NOT MSVC)
+    list(APPEND CMAKE_EXE_LINKER_FLAGS "-lntl")
+  endif()

 endif(NTL_FOUND)


Strip 'v' off CMake version string

Strip 'v' off CMake version string

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -1,6 +1,6 @@
 find_package(Git)
 if(Git_FOUND)
-    execute_process(COMMAND sh -c "${GIT_EXECUTABLE} describe --abbrev=4 --dirty=-dirty --always --tags  | tr -d '\n'"
+    execute_process(COMMAND sh -c "${GIT_EXECUTABLE} describe --abbrev=4 --dirty=-dirty --always --tags  | cut -c 2- | tr -d '\n'"
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
         OUTPUT_VARIABLE PROJECT_VERSION
         )


Updated the core/cmmand_definitions.

Updated the core/cmmand_definitions.

--- core/command_definitions.cmake
+++ core/command_definitions.cmake
@@ -22,6 +22,8 @@

 f1(a b c) # 3, a, a;b;c, a;b;c
 f2(a b c) # 3, a, a;b;c, b;c
+
+f1() #

 ## The arguments of macro() are not variable ##
@@ -96,3 +98,102 @@
   f5 ARGV element: z
   f6 value: 1
 ]]
+
+message("")
+message("# ARGV<n> problem")
+
+function(f7)
+  message("f7 ARGC: ${ARGC}")
+  message("f7 ARGV: ${ARGV}")
+  message("f7 ARGN: ${ARGN}")
+  message("f7 ARGV0: ${ARGV0}")
+  message("f7 ARGV1: ${ARGV1}")
+endfunction()
+
+function(f8)
+  f7()
+endfunction()
+
+f8() #[[
+  f7 ARGC: 0
+  f7 ARGV:
+  f7 ARGN:
+  f7 ARGV0:
+  f7 ARGV1:
+]]
+message("")
+f8(a b) #[[
+  f7 ARGC: 0
+  f7 ARGV:
+  f7 ARGN:
+  f7 ARGV0: a
+  f7 ARGV1: b
+]]
+message("")
+
+macro(f9)
+  message("f9 ARGC: ${ARGC}")
+  message("f9 ARGV: ${ARGV}")
+  message("f9 ARGN: ${ARGN}")
+  message("f9 ARGV0: ${ARGV0}")
+  message("f9 ARGV1: ${ARGV1}")
+endmacro()
+
+macro(f10)
+  f9()
+endmacro()
+
+f10() #[[
+  f9 ARGC: 0
+  f9 ARGV:
+  f9 ARGN:
+  f9 ARGV0:
+  f9 ARGV1:
+]]
+message("")
+
+f10(a b) #[[
+  f9 ARGC: 0
+  f9 ARGV:
+  f9 ARGN:
+  f9 ARGV0:
+  f9 ARGV1:
+]]
+message("")
+
+function(f11)
+  set(args ${ARGV} "" "")
+  list(GET args 0 arg0)
+  list(GET args 1 arg1)
+  unset(args)
+
+  message("f11 arg0: ${arg0}")
+  message("f11 arg1: ${arg1}")
+endfunction()
+
+function(f12)
+  f11()
+endfunction()
+
+f11() #[[
+  f11 arg0:
+  f11 arg1:
+]]
+message("")
+
+f11(a) #[[
+  f11 arg0: a
+  f11 arg1:
+]]
+message("")
+
+f11(a b) #[[
+  f11 arg0: a
+  f11 arg1: b
+]]
+message("")
+
+f12(a b) #[[
+  f11 arg0:
+  f11 arg1:
+]]


Looks for Accelerate.h on apple

Looks for Accelerate.h on apple

A new variable BLAS_INCLUDE_FILENAME points to one of cblas.h, mkl.h. Accelerate.h

--- modules/FindCBLAS.cmake
+++ modules/FindCBLAS.cmake
@@ -1,5 +1,9 @@
 # First attempts using pkg-config. It is not unlikely to work and should be
 # quite reliable on linuxes.
+
+# Declares the variables BLAS_INCLUDE_DIR and BLAS_INCLUDE_FILENAME
+# The latter could be cblas.h, mkl.h, or Accelerate.h. It can be used to
+# include the right header: "#include BLAS_INCLUDE_FILENAME"

 #####
 #####  Macros corresponding to each step are defined first
@@ -77,11 +81,13 @@
     if(NOT "${directories}" STREQUAL "")
         list(REMOVE_DUPLICATES directories)
         set(${OUTVAR} ${directories} PARENT_SCOPE)
-        # find_package blas does not look for cblas.h
-        find_path(BLAS_INCLUDE_DIR NAMES cblas.h mkl.h HINTS ${directories})
-    else()
-        find_path(BLAS_INCLUDE_DIR NAMES cblas.h mkl.h HINTS ${directories})
     endif()
+    # find_package blas does not look for cblas.h
+    find_path(BLAS_INCLUDE_DIR
+        NAMES cblas.h mkl.h Accelerate.h
+        HINTS ${directories}
+        PATH_SUFFIXES Headers
+    )
     set(BLAS_INCLUDE_DIR ${BLAS_INCLUDE_DIR} PARENT_SCOPE)
 endfunction()

@@ -133,3 +139,12 @@
 endif()

 found_or_not_found_blas()
+
+if(EXISTS "${BLAS_INCLUDE_DIR}/cblas.h")
+    set(BLAS_INCLUDE_FILENAME cblas.h)
+elseif(EXISTS "${BLAS_INCLUDE_DIR}/mkl.h")
+    set(BLAS_INCLUDE_FILENAME mkl.h)
+elseif(APPLE AND EXISTS "${BLAS_INCLUDE_DIR}/Accelerate.h")
+    set(BLAS_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -framework accelerate")
+    set(BLAS_INCLUDE_FILENAME Accelerate.h)
+endif()


Minor clarification in FindHOOMD.cmake.

Minor clarification in FindHOOMD.cmake.

Add a comment and status message to clarify the precedence of
HOOMD_ROOT over the Python module search path.

Remove logically redundant path hint to further avoid surprises.

--- example_plugin/FindHOOMD.cmake
+++ example_plugin/FindHOOMD.cmake
@@ -16,6 +16,7 @@

 set(HOOMD_ROOT "" CACHE FILEPATH "Directory containing a hoomd installation (i.e. _hoomd.so)")

+# Let HOOMD_ROOT take precedence, but if unset, try letting Python find a hoomd package in its default paths.
 if(HOOMD_ROOT)
   set(hoomd_installation_guess ${HOOMD_ROOT})
 else(HOOMD_ROOT)
@@ -31,9 +32,10 @@
   message(STATUS "Python output: " ${hoomd_installation_guess})
 endif(HOOMD_ROOT)

+message(STATUS "Looking for a HOOMD installation at " ${hoomd_installation_guess})
 find_path(FOUND_HOOMD_ROOT
         NAMES _hoomd.so __init__.py
-        HINTS ${HOOMD_ROOT} ${hoomd_installation_guess}
+        HINTS ${hoomd_installation_guess}
         )

 if(FOUND_HOOMD_ROOT)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


support WIN32/VisualStudio -EnableDebug builds needing curl (#2319)

--- cmake/Modules/FindCurl_EP.cmake
+++ cmake/Modules/FindCurl_EP.cmake
@@ -57,6 +57,7 @@
   find_library(CURL_LIBRARIES
     NAMES
       libcurl${CMAKE_STATIC_LIBRARY_SUFFIX}
+      libcurl-d${CMAKE_STATIC_LIBRARY_SUFFIX}
     PATHS ${CURL_PATHS}
     PATH_SUFFIXES lib
     ${TILEDB_DEPS_NO_DEFAULT_PATH}


Fix installation of assets

Fix installation of assets

--- cmake/Modules/data_target.cmake
+++ cmake/Modules/data_target.cmake
@@ -11,7 +11,8 @@
                        ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
                        ${CMAKE_CURRENT_BINARY_DIR}/${filename}
                        MAIN_DEPENDENCY ${filename})
-    install(FILES ${filename} DESTINATION share/${PROJECT_NAME})
+    get_filename_component(SUBDIR ${filename} DIRECTORY)
+    install(FILES ${filename} DESTINATION share/${PROJECT_NAME}/${SUBDIR})
   endforeach(filename)
 endfunction()


WIN32_DEBUG_POSTFIX is only implemented by find_library_with_debug. Calling find_library not only ignored it,
but was looking for libd.so! This cause much trouble to <fatalerrors> on IRC (ok, his nick calls for it, but still)

svn path=/trunk/kdesupport/akonadi/; revision=950620

--- cmake/modules/FindSoprano.cmake
+++ cmake/modules/FindSoprano.cmake
@@ -47,7 +47,7 @@
     ${INCLUDE_INSTALL_DIR}
     )

-  find_library(SOPRANO_INDEX_LIBRARIES
+  find_library_with_debug(SOPRANO_INDEX_LIBRARIES
     WIN32_DEBUG_POSTFIX d
     NAMES
     sopranoindex
@@ -56,7 +56,7 @@
     ${LIB_INSTALL_DIR}
     )

-  find_library(SOPRANO_CLIENT_LIBRARIES
+  find_library_with_debug(SOPRANO_CLIENT_LIBRARIES
     WIN32_DEBUG_POSTFIX d
     NAMES
     sopranoclient
@@ -65,7 +65,7 @@
     ${LIB_INSTALL_DIR}
     )

-  find_library(SOPRANO_LIBRARIES
+  find_library_with_debug(SOPRANO_LIBRARIES
     WIN32_DEBUG_POSTFIX d
     NAMES soprano
     PATHS
@@ -73,7 +73,7 @@
     ${LIB_INSTALL_DIR}
   )

-  find_library(SOPRANO_SERVER_LIBRARIES
+  find_library_with_debug(SOPRANO_SERVER_LIBRARIES
     WIN32_DEBUG_POSTFIX d
     NAMES
     sopranoserver


Style fix

Style fix

--- cmake/projects/xcb/hunter.cmake
+++ cmake/projects/xcb/hunter.cmake
@@ -46,4 +46,3 @@
     PACKAGE_NAME xcb
     PACKAGE_UNRELOCATABLE_TEXT_FILES "${_xcb_text_files}"
 )
-


Updated the hints for the c-client library path.

--- cmake_modules/FindCClient.cmake
+++ cmake_modules/FindCClient.cmake
@@ -22,7 +22,7 @@
 find_file(
   CCLIENT_LIBRARY
   NAMES libc-client.a libc-client4.a
-  PATHS ${CCLIENT_LIBRARY_DIRS} /opt/local/lib
+  PATHS ${CCLIENT_LIBRARY_DIRS} /opt/local/lib /usr/lib
   DOC "Library to link against for the email support")

 if (CCLIENT_LIBRARY)


Disable malloc() use inside littlefs

Disable malloc() use inside littlefs

distortos provides buffers, so littlefs doesn't have to allocate them.

--- source/FileSystem/littlefs/external/littlefs-sources.cmake
+++ source/FileSystem/littlefs/external/littlefs-sources.cmake
@@ -16,6 +16,7 @@
 target_compile_definitions(littlefs PUBLIC
 		LFS_NO_DEBUG
 		LFS_NO_ERROR
+		LFS_NO_MALLOC
 		LFS_NO_WARN)
 target_include_directories(littlefs INTERFACE
 		${CMAKE_CURRENT_LIST_DIR}/littlefs)


Better CMAKE

Better CMAKE

--- boards/avr.cmake
+++ boards/avr.cmake
@@ -38,24 +38,21 @@

     add_custom_target (
         flash
-        sudo ${AVRDUDE} -p ${MCU} -v -c ${PROGRAMMER} -P ${PORT} -U flash:w:"${CMAKE_PROJECT_NAME}.hex"
+        sudo ${AVRDUDE} -p ${MCU} -v -c ${PROGRAMMER} -P ${PORT} -B5 -U flash:w:"${CMAKE_PROJECT_NAME}.hex"
         DEPENDS hex
         COMMENT "Flashing ${CMAKE_PROJECT_NAME}.hex"
         )

     add_custom_target (
         get_fuses
-        sudo ${AVRDUDE} -p ${MCU} -c ${PROGRAMMER} -P ${PORT} -n
-            -U lfuse:r:-:b
-            -U hfuse:r:-:b
+        sudo ${AVRDUDE} -p ${MCU} -c ${PROGRAMMER} -P ${PORT} -n -U lfuse:r:-:b -U hfuse:r:-:b
             COMMENT "Get fuses from ${MCU}"
         )

     if( DEFINED L_FUSE )
         add_custom_target (
             set_fuses
-            sudo ${AVRDUDE} -p ${MCU} -c ${PROGRAMMER} -P ${PORT}
-                -U lfuse:w:${L_FUSE}:m
+            sudo ${AVRDUDE} -p ${MCU} -c ${PROGRAMMER} -P ${PORT} -U lfuse:w:${L_FUSE}:m
                 COMMENT "Setup:\n Low Fuse: ${L_FUSE}"
             )
     endif( DEFINED L_FUSE )


http -> https for ilastik git repository

--- ilastik.cmake
+++ ilastik.cmake
@@ -41,7 +41,7 @@

 external_git_repo (ilastik
     ${ILASTIK_VERSION}
-    http://github.com/janelia-flyem/flyem-ilastik
+    https://github.com/janelia-flyem/flyem-ilastik
     ilastik)
 set(lazyflow_SRC_DIR "${ilastik_SRC_DIR}/lazyflow")


Get full commit hash instead of the abbreviated one

Former-commit-id: 5bf451620bba48f4111f850fc1f0d5c388194af9

--- cmake-modules/gitversion.cmake
+++ cmake-modules/gitversion.cmake
@@ -13,7 +13,7 @@

 # Get the latest abbreviated commit hash of the working branch
 execute_process(
-        COMMAND git log -1 --format=%h
+        COMMAND git rev-parse --verify HEAD
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
         OUTPUT_VARIABLE GIT_COMMIT_HASH
         OUTPUT_STRIP_TRAILING_WHITESPACE


Try and hide older versions of CMake from policy 0094.

--- cmake/FindPython/Support.cmake
+++ cmake/FindPython/Support.cmake
@@ -1094,7 +1094,9 @@
 unset (${_PYTHON_PREFIX}_SOABI)

 # Define lookup strategy
-cmake_policy (GET CMP0094 _${_PYTHON_PREFIX}_LOOKUP_POLICY)
+if (POLICY CMP0094)
+  cmake_policy (GET CMP0094 _${_PYTHON_PREFIX}_LOOKUP_POLICY)
+endif()
 if (_${_PYTHON_PREFIX}_LOOKUP_POLICY STREQUAL "NEW")
   set (_${_PYTHON_PREFIX}_FIND_STRATEGY "LOCATION")
 else()


Fix: the QUIET argument is not correctly handled in cmake < 2.8.3

Treat the two cases separately, state QUIET only when cmake version >= 2.8.3

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@323 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -8,8 +8,12 @@
 # OPENNI_DEFINITIONS - Compiler flags for OPENNI.

 find_package(PkgConfig)
-#don't use QUIET
-pkg_check_modules(PC_OPENNI openni-dev)
+if(${CMAKE_VERSION} VERSION_LESS 2.8.3)
+	pkg_check_modules(PC_OPENNI openni-dev)
+else(${CMAKE_VERSION} VERSION_LESS 2.8.3)
+	pkg_check_modules(PC_OPENNI QUIET openni-dev)
+endif(${CMAKE_VERSION} VERSION_LESS 2.8.3)
+
 set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})

 find_path(OPENNI_INCLUDE_DIR XnStatus.h


issue #506 addition - should now be fixed

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@4034 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -60,6 +60,7 @@
 if(NOT WIN32 AND NOT USB_10_FOUND)
   message(STATUS "OpenNI disabled because libusb-1.0 not found.")
   set(HAVE_OPENNI OFF)
+  set(OPENNI_FOUND OFF)
   return()
 else(NOT WIN32 AND NOT USB_10_FOUND)
 	include_directories(${USB_10_INCLUDE_DIR})


shortened code to not repeat myself

shortened code to not repeat myself

--- cmake/OpenCVGenPkgconfig.cmake
+++ cmake/OpenCVGenPkgconfig.cmake
@@ -58,13 +58,15 @@
 set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_})
 if(OpenCV_EXTRA_COMPONENTS)
   foreach(extra_component ${OpenCV_EXTRA_COMPONENTS})
-    if(extra_component MATCHES "-[lL](.*)" )
-      set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}")
-    elseif(extra_component MATCHES "/")
-      set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${extra_component}")
+
+    if(extra_component MATCHES "-[lL](.*)" OR extra_component MATCHES "/")
+      set(maybe_l_prefix "")
     else()
-      set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} -l${extra_component}")
+      set(maybe_l_prefix "-l")
     endif()
+
+    set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${maybe_l_prefix}${extra_component}")
+
   endforeach()
 endif()


Add new gurobi version to find cmake file

--- cmake/modules/FindGUROBI.cmake
+++ cmake/modules/FindGUROBI.cmake
@@ -29,6 +29,7 @@
         gurobi51
         gurobi52
         gurobi55
+        gurobi56
         gurobi60
               PATHS "$ENV{GUROBI_HOME}/lib"
                     "/Library/gurobi502/mac64/lib"


[CMake] Preload sanitizer runtimes only for python.

Because of a too simple regex, sanitizer runtimes would be preloaded not
only for python scripts, but also for executables which received
arguments such as root/python/...
This lead to failures due to loading the runtimes twice.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -1533,9 +1533,14 @@
   set(_command ${_command} -DSYS=${ROOTSYS})

   #- Handle ENVIRONMENT argument
-  if(ASAN_EXTRA_LD_PRELOAD AND _command MATCHES python)
+  if(ASAN_EXTRA_LD_PRELOAD)
     # Address sanitizer runtime needs to be preloaded in all python tests
-    list(APPEND ARG_ENVIRONMENT ${ld_preload}=${ASAN_EXTRA_LD_PRELOAD})
+    # Check now if the -DCMD= contains "python[0-9.] "
+    set(theCommand ${_command})
+    list(FILTER theCommand INCLUDE REGEX "^-DCMD=.*python[0-9.]*[\\^]")
+    if(theCommand OR _command MATCHES roottest/python/cmdLineUtils)
+      list(APPEND ARG_ENVIRONMENT ${ld_preload}=${ASAN_EXTRA_LD_PRELOAD})
+    endif()
   endif()

   if(ARG_ENVIRONMENT)


[cmake][utils] Add a new utility function precondition_binary_op.

This is a flexible way to assert that a binary operation succeeds. For
instance to precondition equality:

  precondition(EQUAL FOO BAR)

or string equality:

  precondition(STREQUALS FOO BAR)

Since cmake is so loosely typed, it is really important that we
precondition as much as possible to ensure sane behavior.

--- cmake/modules/SwiftUtils.cmake
+++ cmake/modules/SwiftUtils.cmake
@@ -22,6 +22,34 @@
         message(FATAL_ERROR "Error! ${PRECONDITION_MESSAGE}")
       else()
         message(FATAL_ERROR "Error! Variable ${var} is false or not set.")
+      endif()
+    endif()
+  endif()
+endfunction()
+
+# Assert is 'NOT ${LHS} ${OP} ${RHS}' is true.
+function(precondition_binary_op OP LHS RHS)
+  cmake_parse_arguments(
+    PRECONDITIONBINOP # prefix
+    "NEGATE" # options
+    "MESSAGE" # single-value args
+    "" # multi-value args
+    ${ARGN})
+
+  if (PRECONDITIONBINOP_NEGATE)
+    if (${LHS} ${OP} ${RHS})
+      if (PRECONDITIONBINOP_MESSAGE)
+        message(FATAL_ERROR "Error! ${PRECONDITIONBINOP_MESSAGE}")
+      else()
+        message(FATAL_ERROR "Error! ${LHS} ${OP} ${RHS} is true!")
+      endif()
+    endif()
+  else()
+    if (NOT ${LHS} ${OP} ${RHS})
+      if (PRECONDITIONBINOP_MESSAGE)
+        message(FATAL_ERROR "Error! ${PRECONDITIONBINOP_MESSAGE}")
+      else()
+        message(FATAL_ERROR "Error! ${LHS} ${OP} ${RHS} is false!")
       endif()
     endif()
   endif()


[cmake_modules] fix GET_LINKER_VERSION on macOS Catalina

On macOS Catalina the linker version is currently `530`.
The current regex requires a second version component.
The result is an error that looks like the following:

  CMake Error at cmake_modules/KuduLinker.cmake:160 (message):
    Could not extract ld64 version.  Linker version output:
  Call Stack (most recent call first):
    cmake_modules/KuduLinker.cmake:36 (GET_LINKER_VERSION)
    CMakeLists.txt:398 (APPEND_LINKER_FLAGS)

To fix this the regex was updated to make the second version
component optional.

Change-Id: I11b43153279cc44766f5f03c7d59808d555d9321
Reviewed-on: http://gerrit.cloudera.org:8080/15129
Reviewed-by: Alexey Serbin <864f6b82bd94e8dda64141d4274519ee66e0102e@cloudera.com>
Tested-by: Kudu Jenkins

--- cmake_modules/KuduLinker.cmake
+++ cmake_modules/KuduLinker.cmake
@@ -157,7 +157,8 @@
     # ld64 outputs the versioning information into stderr.
     # Sample:
     #   @(#)PROGRAM:ld  PROJECT:ld64-409.12
-    if (NOT "${LINKER_STDERR}" MATCHES "PROJECT:ld64-([0-9]+\\.[0-9]+)")
+    #   @(#)PROGRAM:ld  PROJECT:ld64-530
+    if (NOT "${LINKER_STDERR}" MATCHES "PROJECT:ld64-([0-9]+(\\.[0-9]+)?)")
       message(SEND_ERROR "Could not extract ld64 version. "
         "Linker version output: ${LINKER_STDOUT}")
     endif()


Fix a broken link.

Fix a broken link.

--- doc/www-data.in/download.cmake
+++ doc/www-data.in/download.cmake
@@ -29,7 +29,7 @@

     Source tarball

-        tarantool-@TARANTOOL_VERSION@.src.tar.gz
+        tarantool-@TARANTOOL_VERSION@-src.tar.gz


fix clang-format check

fix clang-format check

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -8,7 +8,7 @@
     set(STYLE "-style=file")
     set(STYLE_FILE "-assume-filename=${CFG_FILE}")
   endif()
-
+
   list(REMOVE_DUPLICATES args_FILES)
   list(SORT args_FILES)

@@ -21,24 +21,23 @@
       OUTPUT_VARIABLE CLANG_FORMAT_VERSION
       OUTPUT_STRIP_TRAILING_WHITESPACE)
     string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CLANG_FORMAT_VERSION ${CLANG_FORMAT_VERSION})
-  endif()

-  if(CLANG_FORMAT AND ${CLANG_FORMAT_VERSION} VERSION_GREATER_EQUAL "6.0.0")
-    add_custom_target("${TARGET}_clangformat"
-      COMMAND ${CLANG_FORMAT}
-        "-i"
-        ${STYLE}
-        ${STYLE_FILE}
-        ${args_FILES}
-      DEPENDS ${args_FILES}
-      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-      VERBATIM)
-    add_dependencies(${TARGET} "${TARGET}_clangformat")
-  elseif(CLANG_FORMAT)
-    message(WARNING "clang-format version ${CLANG_FORMAT_VERSION} is too old.\n"
-      "Please download and install a version matching ${CLANG_FORMAT_VERSION_PATTERN}"
-      " from http://releases.llvm.org/download.html\n"
-	  "Also adjust Visual Studio options and PATH variable as necessary!")
+    if("${CLANG_FORMAT_VERSION}" VERSION_GREATER_EQUAL "6.0.0")
+      add_custom_target("${TARGET}_clangformat"
+        COMMAND ${CLANG_FORMAT}
+          "-i"
+          ${STYLE}
+          ${STYLE_FILE}
+          ${args_FILES}
+        DEPENDS ${args_FILES}
+        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+        VERBATIM)
+      add_dependencies(${TARGET} "${TARGET}_clangformat")
+    else()
+      message(WARNING "clang-format version ${CLANG_FORMAT_VERSION} is too old.\n"
+        "Please download and install a current version from http://releases.llvm.org/download.html\n"
+        "Also adjust Visual Studio options and PATH variable as necessary!")
+    endif()
   else()
     message(STATUS "clang-format: not found")
   endif()


Use 'high entropy' ASLR flag on mingw

Use 'high entropy' ASLR flag on mingw

--- cmake/DaemonFlags.cmake
+++ cmake/DaemonFlags.cmake
@@ -249,6 +249,7 @@
         try_linker_flag(LINKER_DYNAMICBASE "-Wl,--dynamicbase")
         try_linker_flag(LINKER_NXCOMPAT "-Wl,--nxcompat")
         try_linker_flag(LINKER_LARGE_ADDRESS_AWARE "-Wl,--large-address-aware")
+        try_linker_flag(LINKER_HIGH_ENTROPY_VA "-Wl,--high-entropy-va")
     endif()

     # The -pthread flag sets some preprocessor defines,


Skip qtremoteobjects

Skip qtremoteobjects

--- cmake/ExternalQt5.cmake
+++ cmake/ExternalQt5.cmake
@@ -28,6 +28,7 @@
         -skip qtquick1
         -skip qtquickcontrols
         -skip qtquickcontrols2
+	-skip qtremoteobjects
         -skip qtrepotools
         -skip qtscript
         -skip qtscxml


Add alias gfortran to gfortran::gfortran so that linking just "gfortran" takes a target instead of -lgfortran

--- cmake/FindFortran.cmake
+++ cmake/FindFortran.cmake
@@ -59,6 +59,7 @@
         set_target_properties(gfortran_lib PROPERTIES IMPORTED_LOCATION "${GFORTRAN_LIB}" INTERFACE_LINK_LIBRARIES quadmath_lib)
         add_library(gfortran::gfortran IMPORTED INTERFACE)
         target_link_libraries(gfortran::gfortran INTERFACE quadmath_lib gfortran_lib)
+        add_library(gfortran ALIAS gfortran::gfortran)
         mark_as_advanced(GFORTRAN_LIB_SUFFIX)
         mark_as_advanced(GFORTRAN_LIB)
         mark_as_advanced(QUADMATH_LIB)


Add include path to config specific opensslcnf.h

--- cmake/FindOpenSSL.cmake
+++ cmake/FindOpenSSL.cmake
@@ -73,7 +73,8 @@
 if (WIN32)
   # 32-bit not officially supported anymore anyway
   set(SSL_BITS "x64")
-  set(SSL_NUGET_TARGET "Release/target") # there also is Debug if you want to...
+  set(SSL_NUGET_RELEASE "Release") # there also is Debug if you want to...
+  set(SSL_NUGET_TARGET "${SSL_NUGET_RELEASE}/target")
   # v140 corresponds to VS 2015
   # dynamic dll openssl looks like that...
   #set(SSL_NUGET_DIR "lib/native/v140/windesktop/msvcstl/dyn/rt-dyn")
@@ -543,3 +544,7 @@
 if(OPENSSL_USE_STATIC_LIBS)
   set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openssl_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
 endif()
+
+if (OPENSSL_ROOT_DIR AND SSL_NUGET)
+  set(OPENSSL_INCLUDE_DIR "${OPENSSL_INCLUDE_DIR};${OPENSSL_INCLUDE_DIR}/v140/${SSL_BITS}/${SSL_NUGET_RELEASE}/static/")
+endif()


fix wrong -l flag for libmetaSMT in generated metaSMT.makefile

--- cmake/config_file.cmake
+++ cmake/config_file.cmake
@@ -44,7 +44,6 @@

 function( generate_config_files )

-  list(INSERT metaSMT_LIBS 0 ${CMAKE_INSTALL_PREFIX}/lib/libmetaSMT.a)
   list(INSERT metaSMT_INCLUDES 0 ${CMAKE_INSTALL_PREFIX}/include)

   set(metaSMT_MLIBS "")
@@ -52,6 +51,7 @@
   foreach( lib  ${metaSMT_LIBS} )
     _append_real_library( ${lib} metaSMT_MLIBS )
   endforeach(lib)
+  set( metaSMT_MLIBS "${CMAKE_INSTALL_PREFIX}/lib/libmetaSMT.a ${metaSMT_MLIBS}")

   string(REPLACE ";" " -I" metaSMT_MINCLUDES ";${metaSMT_INCLUDES}")


Fixed library name on Linux

Fixed library name on Linux

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -347,7 +347,7 @@
     if(WIN32)
       set(IMGUIZMOQUAT_LIB "lib/imguizmoquat.lib")
     else()
-      set(IMGUIZMOQUAT_LIB "lib/imguizmoquat.a")
+      set(IMGUIZMOQUAT_LIB "lib/libimguizmoquat.a")
     endif()

     if(WIN32)


delete glfw dependency from imgui

delete glfw dependency from imgui

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -423,8 +423,12 @@
       return()
     endif()

-    require_external(glfw)
-    external_get_property(glfw INSTALL_DIR)
+    if (ENABLE_GL)
+      require_external(glfw)
+      external_get_property(glfw INSTALL_DIR)
+      set(glfw_include_dir "${INSTALL_DIR}/include")
+      set(glfw_dep "glfw")
+    endif()

     if(WIN32)
       set(IMGUI_LIB "lib/imgui.lib")
@@ -452,10 +456,10 @@
         "${CMAKE_SOURCE_DIR}/externals/imgui/imgui_impl_generic.h"
         "<SOURCE_DIR>/backends/imgui_impl_generic.h"
       DEPENDS
-        glfw
+        ${glfw_dep}
       CMAKE_ARGS
         -DGLAD_INCLUDE_DIR:PATH=${CMAKE_SOURCE_DIR}/externals/glad/include
-        -DGLFW_INCLUDE_DIR:PATH=${INSTALL_DIR}/include
+        -DGLFW_INCLUDE_DIR:PATH=${glfw_include_dir}
         -DENABLE_GL=${ENABLE_GL})

     add_external_library(imgui


Synchronize adm files

Synchronize adm files

--- adm_local_without_kernel/cmake_files/FindSalomeSphinx.cmake
+++ adm_local_without_kernel/cmake_files/FindSalomeSphinx.cmake
@@ -30,7 +30,6 @@

 # Ensure the command is run with the given PYTHONPATH
 IF(WIN32 AND NOT CYGWIN)
-   MESSAGE(WARNING "Sphinx windows command not re-tested.")
    SET(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE})
 ELSE()
    SET(SPHINX_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$$PYTHONPATH" ${SPHINX_EXECUTABLE})


fixed: use release lib as debug lib on windows

--- Source/Contrib/CgFXMaterial/CMake/FindCg.cmake
+++ Source/Contrib/CgFXMaterial/CMake/FindCg.cmake
@@ -53,17 +53,22 @@
         PATH_SUFFIXES ${_OSG_CG_PATH_SUFFIXES})
 ENDIF (APPLE)

-
-IF(CG_LIBRARY_DEBUG AND CG_GL_LIBRARY_DEBUG)
+IF(NOT WIN32)
+  IF(CG_LIBRARY_DEBUG AND CG_GL_LIBRARY_DEBUG)
     SET(CG_LIBRARIES_FOUND TRUE)
     MARK_AS_ADVANCED(CG_LIBRARY_DEBUG)
-ENDIF(CG_LIBRARY_DEBUG AND CG_GL_LIBRARY_DEBUG)
+  ENDIF(CG_LIBRARY_DEBUG AND CG_GL_LIBRARY_DEBUG)
+ENDIF(NOT WIN32)

 IF(CG_LIBRARY_RELEASE AND CG_GL_LIBRARY_RELEASE)
-    SET(CG_LIBRARIES_FOUND TRUE)
-    MARK_AS_ADVANCED(CG_LIBRARY_RELEASE)
+  SET(CG_LIBRARIES_FOUND TRUE)
+  MARK_AS_ADVANCED(CG_LIBRARY_RELEASE)
+  IF(WIN32)
+    MARK_AS_ADVANCED(CG_LIBRARY_DEBUG)
+    SET(CG_LIBRARY_DEBUG    ${CG_LIBRARY_RELEASE}    CACHE FILEPATH "" FORCE)
+    SET(CG_GL_LIBRARY_DEBUG ${CG_GL_LIBRARY_RELEASE} CACHE FILEPATH "" FORCE)
+  ENDIF(WIN32)
 ENDIF(CG_LIBRARY_RELEASE AND CG_GL_LIBRARY_RELEASE)
-

 # handle the QUIETLY and REQUIRED arguments and set CG_FOUND to TRUE if
 # all listed variables are TRUE


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


Add some quotes

Add some quotes

Former-commit-id: 4b27622ea4f241fb1820f6947133ad1f4b7dd9fe

--- test/HalideGenerator.cmake
+++ test/HalideGenerator.cmake
@@ -109,7 +109,7 @@
     if (NOT target_is_pnacl)
       add_custom_command(OUTPUT "${FILTER_LIB}" "${FILTER_HDR}"
         DEPENDS "${args_GENERATOR_TARGET}"
-        COMMAND "${CMAKE_BINARY_DIR}/bin/${gen_target}${CMAKE_EXECUTABLE_SUFFIX}" "-g" "${gen_name}" "-f" "${func_name}" "-o" "${SCRATCH_DIR}" ${ARGN}
+        COMMAND "${CMAKE_BINARY_DIR}/bin/${gen_target}${CMAKE_EXECUTABLE_SUFFIX}" "-g" "${gen_name}" "-f" "${func_name}" "-o" "${SCRATCH_DIR}" "${ARGN}"
         # Create an archive using ar (or similar)
         COMMAND "${CMAKE_AR}" q "${FILTER_LIB}" "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.o"
         WORKING_DIRECTORY "${SCRATCH_DIR}"


Fix test build on Windows

Fix test build on Windows

Former-commit-id: 9c9e95ee6e9113df7848a44c175d48bdc58182dd

--- test/HalideGenerator.cmake
+++ test/HalideGenerator.cmake
@@ -27,10 +27,9 @@

   # Add a custom target to output the Halide generated static library
   if (WIN32)
-    # TODO(srj): this has not yet been tested on Windows.
     add_custom_command(OUTPUT "${FILTER_LIB}" "${FILTER_HDR}"
       DEPENDS "${gen_target}"
-      COMMAND "${CMAKE_BINARY_DIR}/bin/${BUILD_TYPE}/${gen_target}${CMAKE_EXECUTABLE_SUFFIX}" "-g" "${gen_name}" "-f" "${func_name}" "-o" "${SCRATCH_DIR}" ${ARGN}
+      COMMAND "${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${gen_target}${CMAKE_EXECUTABLE_SUFFIX}" "-g" "${gen_name}" "-f" "${func_name}" "-o" "${SCRATCH_DIR}" ${ARGN}
       COMMAND "lib.exe" "/OUT:${FILTER_LIB}" "${SCRATCH_DIR}\\${func_name}.o"
       WORKING_DIRECTORY "${SCRATCH_DIR}"
       )


fix(docs): Update example config font

fix(docs): Update example config font

--- doc/config.cmake
+++ doc/config.cmake
@@ -46,7 +46,7 @@
 module-margin-right = 2

 font-0 = @FONT_FIXED@;1
-font-1 = @FONT_UNIFONT@:size=11:heavy;0
+font-1 = @FONT_UNIFONT@:size=6:heavy:antialias=false;0
 font-2 = @FONT_SIJI@;1

 modules-left = @MODULES_LEFT@


update shader factory

update shader factory

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

     add_external_project(megamol-shader-factory STATIC
       GIT_REPOSITORY https://github.com/UniStuttgart-VISUS/megamol-shader-factory.git
-      GIT_TAG "v0.7"
+      GIT_TAG "v0.8"
       BUILD_BYPRODUCTS "<INSTALL_DIR>/${MEGAMOL_SHADER_FACTORY_LIB}"
       DEPENDS glad)


cmake: fix typo in FindOrocosCORBA for TAO.

Signed-off-by: Peter Soetens <4b8373d016f277527198385ba72fda0feb5da015@thesourceworks.com>

--- lib/orogen/templates/config/FindOrocosCORBA.cmake
+++ lib/orogen/templates/config/FindOrocosCORBA.cmake
@@ -23,7 +23,7 @@
     # In the case of the TAO ORB, we add TAO_Strategies to be able to use
     # multiple communication methods
     IF (CORBA_IMPLEMENTATION STREQUAL "TAO")
-        LIST(APPEND OrocosCORBA_LIBS TAO_Strategies)
+        LIST(APPEND OrocosCORBA_LIBRARIES TAO_Strategies TAO_AnyTypeCode)
     ENDIF (CORBA_IMPLEMENTATION STREQUAL "TAO")

     # ORB-specific configuration steps if the TYPEKIT component


emscripten does not currently support position independent code

- fastcomp simply ignores the -fPIC option, but upstream LLVM generates
  a binary that crashes on startup

--- toolchains/emscripten.cmake
+++ toolchains/emscripten.cmake
@@ -33,3 +33,5 @@
 set( strict_mode "SHELL:-s STRICT=1" )
 add_compile_options( ${strict_mode} )
 add_link_options( ${strict_mode} )
+
+add_compile_options( -fno-PIC )


[RFID-02]: Cmake Inconsistency fixed

[RFID-02]: Cmake Inconsistency fixed

--- modules/RFID/cmake_modules/Findmysqlcppconn.cmake
+++ modules/RFID/cmake_modules/Findmysqlcppconn.cmake
@@ -8,7 +8,7 @@
   PATHS ${mysqlcppconn_PKGCONF_INCLUDE_DIRS}
 )

-find_library(mysqlcppconn_LIBRARY
+find_library(mysqlcppconn_LIBRARIES
   NAMES mysqlcppconn
   PATHS ${mysqlcppconn_PKGCONF_LIBRARY_DIRS}
 )


do not commit google test fix

do not commit google test fix

--- googletest.cmake
+++ googletest.cmake
@@ -20,8 +20,8 @@
 set(LIBPREFIX "${CMAKE_STATIC_LIBRARY_PREFIX}")
 set(LIBSUFFIX "${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set(GTEST_LOCATION "${GTEST_PREFIX}/src/googletest-build")
-set(GTEST_LIBRARY  "${GTEST_LOCATION}/Debug/${LIBPREFIX}gtest${LIBSUFFIX}")
-set(GTEST_MAINLIB  "${GTEST_LOCATION}/Debug/${LIBPREFIX}gtest_main${LIBSUFFIX}")
+set(GTEST_LIBRARY  "${GTEST_LOCATION}/${LIBPREFIX}gtest${LIBSUFFIX}")
+set(GTEST_MAINLIB  "${GTEST_LOCATION}/${LIBPREFIX}gtest_main${LIBSUFFIX}")

 add_library(GTest IMPORTED STATIC GLOBAL)
 set_target_properties(GTest PROPERTIES


Revert "[CMake][Darwin] Match cxx-headers -> cxx_headers libcxx target rename."

This reverts commit r334550. Try to fix the stage2 build failing on
Green Dragon for a while.

http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/11124/console

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

--- cmake/caches/Apple-stage2.cmake
+++ cmake/caches/Apple-stage2.cmake
@@ -61,7 +61,7 @@
   LTO
   clang-format
   clang-headers
-  cxx_headers
+  cxx-headers
   ${LLVM_TOOLCHAIN_TOOLS}
   CACHE STRING "")


Use post-build event for bin() function

Use post-build event for bin() function

--- cmake/distortos-utilities.cmake
+++ cmake/distortos-utilities.cmake
@@ -8,15 +8,14 @@
 #

 #
-# Converts ELF file named `elfFilename` to binary file named `binFilename`.
+# Converts output file of `target` to binary file named `binFilename`.
 #

-function(bin elfFilename binFilename)
-	add_custom_command(OUTPUT ${binFilename}
-			COMMAND ${CMAKE_OBJCOPY} -O binary ${elfFilename} ${binFilename}
-			DEPENDS ${elfFilename}
-			USES_TERMINAL)
-	add_custom_target(${elfFilename}-to-${binFilename} ALL DEPENDS ${binFilename})
+function(bin target binFilename)
+	add_custom_command(TARGET ${target} POST_BUILD
+			COMMAND ${CMAKE_OBJCOPY} -O binary $<TARGET_FILE:${target}> ${binFilename}
+			BYPRODUCTS ${binFilename}
+			VERBATIM)
 endfunction()

 #


fix(cmake/modules): add system libyaml as dep for DEB packages

Co-Authored-by: Lorenzo Fontana <638e8f0171575864326f06d2a5f8e72287427b15@linux.com>
Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>


Fix for atomic intrinsics detection when using MSVC.

Patch by Michael Beck!

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

--- cmake/modules/CheckAtomic.cmake
+++ cmake/modules/CheckAtomic.cmake
@@ -1,14 +1,26 @@
 # atomic builtins are required for threading support.

 INCLUDE(CheckCXXSourceCompiles)
+
+#ifdef _MSC_VER
+#include <windows.h>
+#endif

 CHECK_CXX_SOURCE_COMPILES("
 int main() {
+#ifdef _MSC_VER
+        volatile LONG val = 1;
+        MemoryBarrier();
+        InterlockedCompareExchange(&val, 0, 1);
+        InterlockedIncrement(&val);
+        InterlockedDecrement(&val);
+#else
         volatile unsigned long val = 1;
         __sync_synchronize();
         __sync_val_compare_and_swap(&val, 1, 0);
         __sync_add_and_fetch(&val, 1);
         __sync_sub_and_fetch(&val, 1);
+#endif
         return 0;
       }
 " LLVM_MULTITHREADED)


[CMAKE] Build the background dist image on native OSX

Summary:
D4381 introduced the generation of the background image to the `dist`
directory. This diff adds support for the image transformation using
tools available on OSX.

Depends on D4381.

Test Plan:
On OSX:
  ninja osx-deploydir
Check the background file is correctly generated.

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D4382

--- cmake/modules/ImageHelper.cmake
+++ cmake/modules/ImageHelper.cmake
@@ -16,6 +16,22 @@
 			-o "${PNG}"
 		MAIN_DEPENDENCY
 			"${SVG}"
+	)
+endmacro()
+
+macro(_convert_png_to_tiff_darwin PNG TIFF)
+	find_program_or_fail(SIPS_EXECUTABLE sips)
+
+	add_custom_command(
+		OUTPUT
+			"${TIFF}"
+		COMMAND
+			"${SIPS_EXECUTABLE}"
+			-s format tiff
+			"${PNG}"
+			--out "${TIFF}"
+		MAIN_DEPENDENCY
+			"${PNG}"
 	)
 endmacro()

@@ -43,7 +59,7 @@

 macro(convert_png_to_tiff PNG TIFF)
 	if(NOT CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-		message(FATAL_ERROR "The PNG to TIFF conversion is only supported on Linux.")
+		_convert_png_to_tiff_darwin("${PNG}" "${TIFF}")
 	else()
 		_convert_png_to_tiff_linux("${PNG}" "${TIFF}")
 	endif()
@@ -65,9 +81,24 @@
 	)
 endmacro()

+macro(_cat_multi_resolution_tiff_darwin OUTPUT)
+	find_program_or_fail(TIFFUTIL_EXECUTABLE tiffutil)
+
+	add_custom_command(
+		OUTPUT
+			"${OUTPUT}"
+		COMMAND
+			"${TIFFUTIL_EXECUTABLE}"
+			-cathidpicheck ${ARGN}
+			-out "${OUTPUT}"
+		DEPENDS
+			${ARGN}
+	)
+endmacro()
+
 macro(cat_multi_resolution_tiff OUTPUT)
 	if(NOT CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-		message(FATAL_ERROR "The PNG to TIFF concatenation is only supported on Linux.")
+		_cat_multi_resolution_tiff_darwin("${OUTPUT}" ${ARGN})
 	else()
 		_cat_multi_resolution_tiff_linux("${OUTPUT}" ${ARGN})
 	endif()


Another try at fixing cmake.

Another try at fixing cmake.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -17,7 +17,7 @@
 set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMInstCombine LLVMMC LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils LLVMipa LLVMipo)
 set(MSVC_LIB_DEPS_LLVMCore LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMMC LLVMSupport)


fix win32 build

fix win32 build

--- cmake_admin/FluidUnitTest.cmake
+++ cmake_admin/FluidUnitTest.cmake
@@ -5,7 +5,9 @@
     set_target_properties(${_test} PROPERTIES EXCLUDE_FROM_ALL TRUE)

     # import necessary compile flags and dependency libraries
-    set_target_properties (${_test} PROPERTIES COMPILE_FLAGS $<TARGET_PROPERTY:fluidsynth,COMPILE_FLAGS> )
+    if ( FLUID_CPPFLAGS )
+        set_target_properties ( ${_test} PROPERTIES COMPILE_FLAGS ${FLUID_CPPFLAGS} )
+    endif ( FLUID_CPPFLAGS )
     TARGET_LINK_LIBRARIES(${_test} $<TARGET_PROPERTY:libfluidsynth,INTERFACE_LINK_LIBRARIES>)

     # use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed


Disable parallel execution.

Disable parallel execution.

--- src/inserts/build.cmake
+++ src/inserts/build.cmake
@@ -62,7 +62,7 @@
 # maybe add similar options to cppan? '-- pass all args after two dashes to cmake build'
 set(parallel)
 if (MULTICORE)
-    set(parallel "-j ${N_CORES}") # temporary
+    #set(parallel "-j ${N_CORES}") # temporary
 endif()

 if (CONFIG)


Added missing Python dependencies

Added missing Python dependencies

Signed-off-by: Maciej Kurc <572803cc6e8d7bb35033942e4b03254951a2e0d6@antmicro.com>
Signed-off-by: Tim 'mithro' Ansell <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@mith.ro>

--- xc7/make/project_xray.cmake
+++ xc7/make/project_xray.cmake
@@ -101,7 +101,7 @@
     DEPENDS
     ${TILE_IMPORT}
       ${DEPS}
-      ${PYTHON3} ${PYTHON3_TARGET}
+      ${PYTHON3} ${PYTHON3_TARGET} simplejson
     )

   add_file_target(FILE ${TILE}.pb_type.xml GENERATED)
@@ -167,7 +167,7 @@
       DEPENDS
         ${CREATE_SYNTH_TILES}
         ${PROJECT_XRAY_ARCH_USE_ROI}
-        ${PYTHON3} ${PYTHON3_TARGET}
+        ${PYTHON3} ${PYTHON3_TARGET} simplejson intervaltree
         )

     add_file_target(FILE synth_tiles.json GENERATED)
@@ -200,7 +200,7 @@
     DEPENDS
     ${ARCH_IMPORT}
     ${DEPS}
-    ${PYTHON3} ${PYTHON3_TARGET}
+    ${PYTHON3} ${PYTHON3_TARGET} simplejson
     )

   add_file_target(FILE arch.xml GENERATED)
@@ -279,7 +279,7 @@
     DEPENDS
     ${ASSIGN_PINS}
     ${DEPS} ${DEPS2} ${CHANNELS}
-    ${PYTHON3} ${PYTHON3_TARGET}
+    ${PYTHON3} ${PYTHON3_TARGET} simplejson progressbar2
     )

   add_file_target(FILE ${PIN_ASSIGNMENTS} GENERATED)


Make sure the correct resource path is inserted into config files when building the OS X SDK.

--HG--
branch : v1-7

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -26,7 +26,7 @@
     set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
     set(OGRE_MEDIA_DIR_DBG "${OGRE_MEDIA_PATH}")
   else()
-    if(OGRE_INSTALL_SAMPLES)
+    if(OGRE_INSTALL_SAMPLES_SOURCE)
       set(OGRE_MEDIA_PATH "media")
       set(OGRE_MEDIA_DIR_REL "../../../${OGRE_MEDIA_PATH}")
       set(OGRE_MEDIA_DIR_DBG "../../../${OGRE_MEDIA_PATH}")


STYLE: Minor change to custom command message.

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -129,7 +129,7 @@
       COMMAND ${CMAKE_COMMAND}
       "-E" "touch" "${quote}${OUTPUT_DIR}/${TARGET}.target${quote}"

-      COMMENT "vtk${KIT} - updating vtk${KIT}Hierarchy.txt"
+      COMMENT "For vtk${KIT} - updating vtk${KIT}Hierarchy.txt"
       ${verbatim}
       )


Bug 3117: Fixed printf to include verifiable format string.

--- CMakeModules/FindEXPAT.cmake
+++ CMakeModules/FindEXPAT.cmake
@@ -134,7 +134,7 @@
 int
 main(void)
 {
-    printf(XML_ExpatVersion());
+    printf(\"%s\", XML_ExpatVersion());
     return 0;
 }
 "


Added toolchain sources

Added toolchain sources

--- lib/components/toolchain/toolchain.cmake
+++ lib/components/toolchain/toolchain.cmake
@@ -0,0 +1,18 @@
+# Softdevice inclusion
+
+include_directories(
+	${CMAKE_CURRENT_LIST_DIR}
+	${CMAKE_CURRENT_LIST_DIR}/gcc
+	)
+
+set(TOOLCHAIN_SOURCES
+	${CMAKE_CURRENT_LIST_DIR}/system_nrf52.c
+)
+
+set(STARTUP_FILE ${CMAKE_CURRENT_LIST_DIR}/gcc/gcc_startup_nrf52.s)
+
+set(LINKER_FILE ${CMAKE_CURRENT_LIST_DIR}/gcc/nrf52_xxaa.ld)
+
+
+add_library(toolchain ${TOOLCHAIN_SOURCES})
+


Update pkg-config generation to fix libdir

Should fix issue #42

--- librtosc.pc.cmake
+++ librtosc.pc.cmake
@@ -3,9 +3,8 @@
 #

 prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=${prefix}
-libdir=${exec_prefix}
-includedir=${prefix}/include
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

 Name: rtosc
 Description: rtosc - a realtime safe open sound control serialization and dispatch system


ENH: Path to headers fixed for a non-installed build.

--- FindFLTK.cmake
+++ FindFLTK.cmake
@@ -43,7 +43,7 @@
 IF(FLTK_FLUID_EXECUTABLE)
   GET_FILENAME_COMPONENT(FLTK_BIN_DIR "${FLTK_FLUID_EXECUTABLE}" PATH)
   SET(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH}
-      ${FLTK_BIN_DIR}/../include)
+      ${FLTK_BIN_DIR}/../include ${FLTK_BIN_DIR}/..)
   SET(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH}
       ${FLTK_BIN_DIR}/../lib)
   SET(FLTK_WRAP_UI 1)


Defaulting the generation of tag file to OFF as DWA convention already includes the required hearder for DSO version information

--- cmake/FindHDK.cmake
+++ cmake/FindHDK.cmake
@@ -17,7 +17,7 @@
 # MESSAGE ( "HDK_PACKAGE_DIR ${HDK_PACKAGE_DIR}" )

 SET ( HDK_VERSION_IN_SYS_SYS_VERSION_H ON )
-OPTION ( HDK_AUTO_GENERATE_SESITAG "Automatically generate <Target>_sesitag.C and add to SOP being built" ON )
+OPTION ( HDK_AUTO_GENERATE_SESITAG "Automatically generate <Target>_sesitag.C and add to SOP being built" OFF )

 # Houdini 15 and above defines version in SYS/SYS_Version.h
 SET ( HDK_VERSION_FILE_PATH "toolkit/include/SYS/SYS_Version.h" )


Suppress error message thrown by FindSIP.cmake

--- cmake/FindSIP.cmake
+++ cmake/FindSIP.cmake
@@ -113,6 +113,7 @@
   EXECUTE_PROCESS ( COMMAND ${PYTHON_EXECUTABLE} -c "import sipconfig; print sipconfig.Configuration().sip_bin"
 		OUTPUT_VARIABLE SIP_CONFIG_EXECUTABLE
 		OUTPUT_STRIP_TRAILING_WHITESPACE
+		ERROR_QUIET
   )
   GET_FILENAME_COMPONENT(SIP_CONFIG_BIN_DIRS "${SIP_CONFIG_EXECUTABLE}" PATH)


go back to VERSION_LESS for TBB, but now REGEX_MATCH will work for "2017"

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -14,7 +14,7 @@
 ## limitations under the License.                                           ##
 ## ======================================================================== ##

-SET(TBB_MAJOR_VERSION_REQUIRED "3")
+SET(TBB_MAJOR_VERSION_REQUIRED "3.0")

 IF (NOT TBB_ROOT)
   SET(TBB_ROOT $ENV{TBB_ROOT})
@@ -135,10 +135,10 @@
   STRING(REGEX MATCH "#define TBB_VERSION_MAJOR ([0-9]+)" DUMMY "${TBB_STDDEF_H}")
   SET(TBB_VERSION_MAJOR ${CMAKE_MATCH_1})

-  STRING(REGEX MATCH "#define TBB_VERSION_MINOR ([0-9])" DUMMY "${TBB_STDDEF_H}")
+  STRING(REGEX MATCH "#define TBB_VERSION_MINOR ([0-9]+)" DUMMY "${TBB_STDDEF_H}")
   SET(TBB_VERSION "${TBB_VERSION_MAJOR}.${CMAKE_MATCH_1}")

-  IF (TBB_VERSION_MAJOR LESS TBB_MAJOR_VERSION_REQUIRED)
+  IF (TBB_VERSION_MAJOR VERSION_LESS TBB_VERSION_REQUIRED)
     MESSAGE(FATAL_ERROR ${TBB_ERROR_MESSAGE})
   ENDIF()


- addition of suffix such as fc10.x86_64.rpm when building an rpm.

--- cmake/dtkPack.cmake
+++ cmake/dtkPack.cmake
@@ -25,7 +25,18 @@

 if(NOT DTK_AGGREGATE_PLUGINS)
   set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
-  set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}")
+  if( "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" )
+    # To obtain rpm named such as dtk-...-.fc10.x86_64.rpm
+    execute_process( COMMAND uname -r
+                     COMMAND sed "s/.*\\.\\(\\w*\\.\\w*\\)$/\\1/"
+                     OUTPUT_VARIABLE PACKAGE_EXTENSION
+                     OUTPUT_STRIP_TRAILING_WHITESPACE)
+    set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}.${PACKAGE_EXTENSION}")
+  else( "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" )
+    # Default situation
+    set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}.${CMAKE_SYSTEM_PROCESSOR}")
+  endif( "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" )
+
   set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-src")
   set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_NAME})
   set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_NAME})


r9932/sofa : cmake: SOFA-EXTERNAL_BOOST option added to use system Boost libraries, or Boost located in SOFA-EXTERNAL_BOOST_PATH if not empty

Former-commit-id: c32658d2a7e5348238015d175d9ede56bce6a30c

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -28,13 +28,15 @@
 endif()

 ## boost
+option(SOFA-EXTERNAL_BOOST "Use the system / user compiled boost library instead of extlib/miniBoost" OFF)
 set(SOFA-EXTERNAL_BOOST_PATH "" CACHE PATH "Boost full version path (must contain the compiled libraries)")
-if(EXISTS ${SOFA-EXTERNAL_BOOST_PATH})
-	set(SOFA-EXTERNAL_HAVE_BOOST 1 CACHE INTERNAL "Use the system / user compiled boost library instead of extlib/miniBoost" FORCE)
+if(SOFA-EXTERNAL_BOOST)
+    set(SOFA-EXTERNAL_HAVE_BOOST 1 CACHE INTERNAL "Use the system / user compiled boost library instead of extlib/miniBoost" FORCE)
 	list(APPEND compilerDefines SOFA_HAVE_BOOST)
 else()
 	unset(SOFA-EXTERNAL_HAVE_BOOST CACHE)
 endif()
+

 ## geometric tools
 set(SOFA-EXTERNAL_GEOMETRIC_TOOLS_PATH "" CACHE PATH "Path to Geometric tools folder containing the cmake project")


build: temporary suppress enum conversion warnings

--- tools/cmake/build.cmake
+++ tools/cmake/build.cmake
@@ -103,6 +103,9 @@
                                     "-Wextra"
                                     "-Wno-unused-parameter"
                                     "-Wno-sign-compare"
+                                    # ignore multiple enum conversion warnings since gcc 11
+                                    # TODO: IDF-5163
+                                    "-Wno-enum-conversion"
                                     # Default is dwarf-5 since GCC 11, fallback to dwarf-4 because of binary size
                                     # TODO: IDF-5160
                                     "-gdwarf-4"


build system: fix NOTFOUND git version error

CMake would fail to find the git version of the IDF repo due to
not being able to parse the whitespace in the git describe command

--- tools/cmake/build.cmake
+++ tools/cmake/build.cmake
@@ -64,7 +64,7 @@
 #
 function(__build_get_idf_git_revision)
     idf_build_get_property(idf_path IDF_PATH)
-    git_describe(idf_ver_git "${idf_path}" "--match v*.*")
+    git_describe(idf_ver_git "${idf_path}" "--match=v*.*")
     if(EXISTS "${idf_path}/version.txt")
         file(STRINGS "${idf_path}/version.txt" idf_ver_t)
         set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${idf_path}/version.txt")


[Build] Re-instated the CMake support for Xapian (which had unfortunately disappeared after a Git merge).

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

+    if (${_arg_lower} STREQUAL "xapian")
+      get_xapian (${_arg_version})
+    endif (${_arg_lower} STREQUAL "xapian")
+
     if (${_arg_lower} STREQUAL "readline")
       get_readline (${_arg_version})
     endif (${_arg_lower} STREQUAL "readline")
@@ -469,6 +473,28 @@
   endif (Boost_FOUND)

 endmacro (get_boost)
+
+# ~~~~~~~~~~ Xapian ~~~~~~~~~
+macro (get_xapian)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires Xapian-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires Xapian without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (Xapian ${_required_version} REQUIRED)
+
+  if (XAPIAN_FOUND)
+    # Update the list of include directories for the project
+    include_directories (${XAPIAN_INCLUDE_DIR})
+
+    # Update the list of dependencies for the project
+    list (APPEND PROJ_DEP_LIBS_FOR_LIB ${XAPIAN_LIBRARIES})
+  endif (XAPIAN_FOUND)
+
+endmacro (get_xapian)

 # ~~~~~~~~~~ Readline ~~~~~~~~~
 macro (get_readline)
@@ -1883,6 +1909,17 @@
     message (STATUS "  - Boost required libraries ... : ${BOOST_REQUIRED_LIBS}")
   endif (Boost_FOUND)
 endmacro (display_boost)
+
+# Xapian
+macro (display_xapian)
+  if (XAPIAN_FOUND)
+    message (STATUS)
+	message (STATUS "* Xapian:")
+	message (STATUS "  - XAPIAN_VERSION ............. : ${XAPIAN_VERSION}")
+	message (STATUS "  - XAPIAN_LIBRARIES ........... : ${XAPIAN_LIBRARIES}")
+	message (STATUS "  - XAPIAN_INCLUDE_DIR ......... : ${XAPIAN_INCLUDE_DIR}")
+  endif (XAPIAN_FOUND)
+endmacro (display_xapian)

 # Readline
 macro (display_readline)
@@ -2170,6 +2207,7 @@
   display_python ()
   display_zeromq ()
   display_boost ()
+  display_xapian ()
   display_readline ()
   display_mysql ()
   display_soci ()


[Build] Added support for RMOL and AirInv in the CMake framework.

--- project_config_embeddable.cmake
+++ project_config_embeddable.cmake
@@ -120,7 +120,11 @@
   if (NOT EXISTS ${DOC_INSTALL_FILE})
     unset (DOC_INSTALL_FILE)
   endif (NOT EXISTS ${DOC_INSTALL_FILE})
-  set (BASICDOC_FILES AUTHORS NEWS README ${DOC_INSTALL_FILE})
+  set (DOC_NEWS_FILE NEWS)
+  if (NOT EXISTS ${DOC_NEWS_FILE})
+    unset (DOC_NEWS_FILE)
+  endif (NOT EXISTS ${DOC_NEWS_FILE})
+  set (BASICDOC_FILES AUTHORS ${DOC_NEWS_FILE} README ${DOC_INSTALL_FILE})
   set (BASICDOC_PATH "share/doc/${PACKAGE}-${PACKAGE_VERSION}")

 endmacro (set_project_options)
@@ -291,9 +295,49 @@
       get_stdair (${_arg_version})
     endif (${_arg_lower} STREQUAL "stdair")

+    if (${_arg_lower} STREQUAL "sevmgr")
+      get_sevmgr (${_arg_version})
+    endif (${_arg_lower} STREQUAL "sevmgr")
+
+    if (${_arg_lower} STREQUAL "trademgen")
+      get_trademgen (${_arg_version})
+    endif (${_arg_lower} STREQUAL "trademgen")
+
+    if (${_arg_lower} STREQUAL "travelccm")
+      get_travelccm (${_arg_version})
+    endif (${_arg_lower} STREQUAL "travelccm")
+
+    if (${_arg_lower} STREQUAL "airsched")
+      get_airsched (${_arg_version})
+    endif (${_arg_lower} STREQUAL "airsched")
+
     if (${_arg_lower} STREQUAL "airrac")
       get_airrac (${_arg_version})
     endif (${_arg_lower} STREQUAL "airrac")
+
+    if (${_arg_lower} STREQUAL "rmol")
+      get_rmol (${_arg_version})
+    endif (${_arg_lower} STREQUAL "rmol")
+
+    if (${_arg_lower} STREQUAL "airinv")
+      get_airinv (${_arg_version})
+    endif (${_arg_lower} STREQUAL "airinv")
+
+    if (${_arg_lower} STREQUAL "avlcal")
+      get_avlcal (${_arg_version})
+    endif (${_arg_lower} STREQUAL "avlcal")
+
+    if (${_arg_lower} STREQUAL "simfqt")
+      get_simfqt (${_arg_version})
+    endif (${_arg_lower} STREQUAL "simfqt")
+
+    if (${_arg_lower} STREQUAL "simlfs")
+      get_simlfs (${_arg_version})
+    endif (${_arg_lower} STREQUAL "simlfs")
+
+    if (${_arg_lower} STREQUAL "simcrs")
+      get_simcrs (${_arg_version})
+    endif (${_arg_lower} STREQUAL "simcrs")

     if (${_arg_lower} STREQUAL "doxygen")
       get_doxygen (${_arg_version})
@@ -577,6 +621,70 @@
   endif (AirRAC_FOUND)

 endmacro (get_airrac)
+
+# ~~~~~~~~~~ RMOL ~~~~~~~~~
+macro (get_rmol)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires RMOL-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires RMOL without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (RMOL ${_required_version} REQUIRED
+	HINTS ${WITH_RMOL_PREFIX})
+  if (RMOL_FOUND)
+    #
+    message (STATUS "Found RMOL version: ${RMOL_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${RMOL_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${RMOL_LIBRARIES})
+
+  else (RMOL_FOUND)
+    set (ERROR_MSG "The RMOL library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_RMOL_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<RMOL install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (RMOL_FOUND)
+
+endmacro (get_rmol)
+
+# ~~~~~~~~~~ Airinv ~~~~~~~~~
+macro (get_airinv)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires Airinv-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires Airinv without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (Airinv ${_required_version} REQUIRED
+	HINTS ${WITH_AIRINV_PREFIX})
+  if (Airinv_FOUND)
+    #
+    message (STATUS "Found Airinv version: ${AIRINV_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${AIRINV_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRINV_LIBRARIES})
+
+  else (Airinv_FOUND)
+    set (ERROR_MSG "The Airinv library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRINV_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<Airinv install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (Airinv_FOUND)
+
+endmacro (get_airinv)

 ##############################################
@@ -1572,6 +1680,34 @@
     message (STATUS "  - AIRRAC_INCLUDE_DIRS ........ : ${AIRRAC_INCLUDE_DIRS}")
   endif (AirRAC_FOUND)
 endmacro (display_airrac)
+
+# RMOL
+macro (display_rmol)
+  if (RMOL_FOUND)
+    message (STATUS)
+    message (STATUS "* RMOL:")
+    message (STATUS "  - RMOL_VERSION ............... : ${RMOL_VERSION}")
+    message (STATUS "  - RMOL_BINARY_DIRS ........... : ${RMOL_BINARY_DIRS}")
+    message (STATUS "  - RMOL_EXECUTABLES ........... : ${RMOL_EXECUTABLES}")
+    message (STATUS "  - RMOL_LIBRARY_DIRS .......... : ${RMOL_LIBRARY_DIRS}")
+    message (STATUS "  - RMOL_LIBRARIES ............. : ${RMOL_LIBRARIES}")
+    message (STATUS "  - RMOL_INCLUDE_DIRS .......... : ${RMOL_INCLUDE_DIRS}")
+  endif (RMOL_FOUND)
+endmacro (display_rmol)
+
+# Airinv
+macro (display_airinv)
+  if (Airinv_FOUND)
+    message (STATUS)
+    message (STATUS "* Airinv:")
+    message (STATUS "  - AIRINV_VERSION ............. : ${AIRINV_VERSION}")
+    message (STATUS "  - AIRINV_BINARY_DIRS ......... : ${AIRINV_BINARY_DIRS}")
+    message (STATUS "  - AIRINV_EXECUTABLES ......... : ${AIRINV_EXECUTABLES}")
+    message (STATUS "  - AIRINV_LIBRARY_DIRS ........ : ${AIRINV_LIBRARY_DIRS}")
+    message (STATUS "  - AIRINV_LIBRARIES ........... : ${AIRINV_LIBRARIES}")
+    message (STATUS "  - AIRINV_INCLUDE_DIRS ........ : ${AIRINV_INCLUDE_DIRS}")
+  endif (Airinv_FOUND)
+endmacro (display_airinv)

 ##
 macro (display_status_all_modules)
@@ -1658,6 +1794,8 @@
   display_soci ()
   display_stdair ()
   display_airrac ()
+  display_rmol ()
+  display_airinv ()
   #
   message (STATUS)
   message (STATUS "Change a value with: cmake -D<Variable>=<Value>" )


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


now use cplus env var

now use cplus env var

--- CMake/CyclusModuleMacros.cmake
+++ CMake/CyclusModuleMacros.cmake
@@ -12,21 +12,21 @@

   GET_PROPERTY(DIRS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
   #SET(INCL_ARG "")
-  SET(INCL_ARG "$ENV{C_INCLUDE_PATH}")
+  SET(INCL_ARG "$ENV{CPLUS_INCLUDE_PATH}")
   FOREACH(DIR ${DIRS})
     SET(INCL_ARG "${INCL_ARG}:${DIR}")
   ENDFOREACH(DIR ${DIRS})
   # SET(INCL_ARG "-I=\"${INCL_ARG}\"")
-  SET(ENV{C_INCLUDE_PATH} ${INCL_ARG})
-  MESSAGE("C_INCLUDE_PATH: $ENV{C_INCLUDE_PATH}")
+  SET(ENV{CPLUS_INCLUDE_PATH} ${INCL_ARG})
+  MESSAGE("CPLUS_INCLUDE_PATH: $ENV{CPLUS_INCLUDE_PATH}")
   #SET(INCL_ARG "-I=\"${DIRS}\"")
   #MESSAGE("INCL ARG: ${INCL_ARG}")

   SET(HIN "${CMAKE_CURRENT_SOURCE_DIR}/${_name}.h")
   SET(HOUT "-o=${BUILD_DIR}/${_name}.h")
   IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_name}.h")
-    EXECUTE_PROCESS(COMMAND ${CYCPP} ${HIN} ${HOUT})# ${INCL_ARG})
-    MESSAGE("Executing ${CYCPP} ${HIN} ${HOUT}")# ${INCL_ARG}")
+    EXECUTE_PROCESS(COMMAND ${CYCPLUS} ${HIN} ${HOUT})# ${INCL_ARG})
+    MESSAGE("Executing ${CYCPLUS} ${HIN} ${HOUT}")# ${INCL_ARG}")
   ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_name}.h")

   SET(CCIN "${CMAKE_CURRENT_SOURCE_DIR}/${_name}.cc")


Update FW with Script node (DynamicPool) related fixes


Update flag for compatibility with Ant 1.7.1

--- properties.cmake
+++ properties.cmake
@@ -6,7 +6,7 @@

 # Define build variables
 set(BUILD_DIR "${CMAKE_SOURCE_DIR}/build")
-set(ANT_FLAGS "-silent")
+set(ANT_FLAGS "-quiet")

 # Define CX2X libraries names
 set(OMNI_CX2X_CLAW_NAME "om-cx2x-claw")


standardize target suffix

standardize target suffix

--- rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
@@ -63,7 +63,7 @@
   VERBATIM
 )

-set(_target_suffix "__typesupport_introspection_cpp")
+set(_target_suffix "__rosidl_typesupport_introspection_cpp")

 add_library(${rosidl_generate_interfaces_TARGET}${_target_suffix} SHARED ${_generated_files})
 if(WIN32)


build: remove support for `EXCLUDE_FROM_ALL` (NFC)

This parameter is unused.  Simply remove the option from the
`add_swift_sourcekit_executable`.

--- tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
+++ tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
@@ -213,21 +213,16 @@
 #   add_sourcekit_executable(name        # Name of the executable
 #     [LLVM_LINK_COMPONENTS comp1 ...] # LLVM components this executable
 #                                        # depends on
-#     [EXCLUDE_FROM_ALL]              # Whether to exclude this executable from
-#                                     # the ALL_BUILD target
 #     source1 [source2 source3 ...])  # Sources to add into this executable
 macro(add_sourcekit_executable name)
-  cmake_parse_arguments(SOURCEKITEXE
-    "EXCLUDE_FROM_ALL"
-    ""
-    "LLVM_LINK_COMPONENTS"
-    ${ARGN})
-
-  if (${SOURCEKITEXE_EXCLUDE_FROM_ALL})
-    add_executable(${name} EXCLUDE_FROM_ALL ${SOURCEKITEXE_UNPARSED_ARGUMENTS})
-  else()
-    add_executable(${name} ${SOURCEKITEXE_UNPARSED_ARGUMENTS})
-  endif()
+  set(SOURCEKIT_EXECUTABLE_options)
+  set(SOURCEKIT_EXECUTABLE_single_parameter_options)
+  set(SOURCEKIT_EXECUTABLE_multiple_parameter_options LLVM_LINK_COMPONENTS)
+  cmake_parse_arguments(SOURCEKITEXE "${SOURCEKIT_EXECUTABLE_options}"
+    "${SOURCEKIT_EXECUTABLE_single_parameter_options}"
+    "${SOURCEKIT_EXECUTABLE_multiple_parameter_options}" ${ARGN})
+
+  add_executable(${name} ${SOURCEKITEXE_UNPARSED_ARGUMENTS})
   if(NOT SWIFT_BUILT_STANDALONE AND NOT CMAKE_C_COMPILER_ID MATCHES Clang)
     add_dependencies(${name} clang)
   endif()


Update PCRE version to 8.40

Update PCRE version to 8.40

--- SuperBuild/External_PCRE.cmake
+++ SuperBuild/External_PCRE.cmake
@@ -19,8 +19,8 @@
   #  PCRE (Perl Compatible Regular Expressions)
   #

-  set(PCRE_TARGET_VERSION 8.37)
-  set(PCRE_DOWNLOAD_SOURCE_HASH "6e0cc6d1bdac7a4308151f9b3571b86e")
+  set(PCRE_TARGET_VERSION 8.40)
+  set(PCRE_DOWNLOAD_SOURCE_HASH "890c808122bd90f398e6bc40ec862102")
   sitkSourceDownload(PCRE_URL "pcre-${PCRE_TARGET_VERSION}.tar.gz" ${PCRE_DOWNLOAD_SOURCE_HASH})


Fix openexr linking against libstdc++

Fix openexr linking against libstdc++

--- openexr.cmake
+++ openexr.cmake
@@ -50,7 +50,8 @@
         --prefix=${BUILDEM_DIR}
         --disable-ilmbasetest
         PKG_CONFIG_PATH=${BUILDEM_PKGCONFIG_DIR}
-        "LDFLAGS=${BUILDEM_LDFLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}"
+        "LDFLAGS=${BUILDEM_LDFLAGS}"
+        "LIBS=${BUILDEM_ADDITIONAL_CXX_FLAGS}"
         "CPPFLAGS=-I${BUILDEM_DIR}/include ${BUILDEM_ADDITIONAL_CXX_FLAGS}"
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} $(MAKE)
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} $(MAKE) install


Add LIBRARY_DIRS to FunctionCreateBlueBerryApplication to pass to MITK_INSTALL_TARGETS

--- BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake
+++ BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake
@@ -14,6 +14,7 @@
 #! \param EXCLUDE_PLUGINS (optional) A list of plug-ins which should not be used. Mainly
 #!        useful if PLUGINS was not used.
 #! \param LINK_LIBRARIES A list of libraries to be linked with the executable.
+#! \param LIBRARY_DIRS A list of directories to pass through to MITK_INSTALL_TARGETS
 #! \param SHOW_CONSOLE (option) Show the console output window (on Windows).
 #! \param NO_PROVISIONING (option) Do not create provisioning files.
 #! \param NO_INSTALL (option) Do not install this executable
@@ -30,7 +31,7 @@
 #!
 function(FunctionCreateBlueBerryApplication)

-macro_parse_arguments(_APP "NAME;DESCRIPTION;SOURCES;PLUGINS;EXCLUDE_PLUGINS;LINK_LIBRARIES" "SHOW_CONSOLE;NO_PROVISIONING;NO_INSTALL" ${ARGN})
+macro_parse_arguments(_APP "NAME;DESCRIPTION;SOURCES;PLUGINS;EXCLUDE_PLUGINS;LINK_LIBRARIES;LIBRARY_DIRS" "SHOW_CONSOLE;NO_PROVISIONING;NO_INSTALL" ${ARGN})

 if(NOT _APP_NAME)
   message(FATAL_ERROR "NAME argument cannot be empty.")
@@ -181,7 +182,7 @@
   endif()

   # Install the executable
-  MITK_INSTALL_TARGETS(EXECUTABLES ${_APP_NAME} GLOB_PLUGINS )
+  MITK_INSTALL_TARGETS(EXECUTABLES ${_APP_NAME} LIBRARY_DIRS ${_APP_LIBRARY_DIRS} GLOB_PLUGINS )

   if(NOT _APP_NO_PROVISIONING)
     # Install the provisioning file


Fix license header

Fix license header

--- client/client-multi/client-cpp/toolchains/edison.cmake
+++ client/client-multi/client-cpp/toolchains/edison.cmake
@@ -1,59 +1,74 @@
-
-if(NOT DEFINED SDK_32bits)
-	set(SDK_32bits FALSE)
-endif()
-
-#Set the target parameters
-set(CMAKE_SYSTEM_NAME Linux)
-set(CMAKE_SYSTEM_VERSION 3.10.17-poky-edison+)
-set(CMAKE_SYSTEM_PROCESSOR i686)
-
-if(NOT DEFINED EDISON_SDK_ROOT AND WIN32)
-	if(${SDK_32bits})
-		set(EDISON_SDK_ROOT C:/Edison/poky-edison-eglibc-i686-edison-image-core2-32-toolchain-1.7.2)
-	else()
-		set(EDISON_SDK_ROOT C:/Edison/poky-edison-eglibc-x86_64-edison-image-core2-32-toolchain-1.7.2)
-	endif()
-else(NOT DEFINED EDISON_SDK_ROOT)
-	set(EDISON_SDK_ROOT /opt/poky-edison/1.7.2)
-endif()
-
-#Set the host parameters
-if(WIN32)
-    	#Windows host
-	if(${SDK_32bits})
-		set(cross_compiler_sysroot ${EDISON_SDK_ROOT}/sysroots/i686-pokysdk-mingw32)
-		#MinGW make
-		set(CMAKE_MAKE_PROGRAM "C:/Program Files/mingw/i686-4.9.2-posix-dwarf-rt_v3-rev1/mingw32/bin/mingw32-make.exe")
-	else()
-		set(cross_compiler_sysroot ${EDISON_SDK_ROOT}/sysroots/x86_64-pokysdk-mingw32)
-		#MinGW make
-		set(CMAKE_MAKE_PROGRAM "C:/Program Files (x86)/mingw/i686-4.9.2-posix-dwarf-rt_v3-rev1/mingw32/bin/mingw32-make.exe")
-	endif()
-	set(CMAKE_C_COMPILER ${cross_compiler_sysroot}/usr/bin/i586-poky-linux/i586-poky-linux-gcc.exe)
-	set(CMAKE_CXX_COMPILER ${cross_compiler_sysroot}/usr/bin/i586-poky-linux/i586-poky-linux-g++.exe)
-else()
-	#Linux host
-	if(${SDK_32bits})
-		set(cross_compiler_sysroot ${EDISON_SDK_ROOT}/sysroots/i686-pokysdk-linux)
-	else()
-		set(cross_compiler_sysroot ${EDISON_SDK_ROOT}/sysroots/x86_64-pokysdk-linux)
-	endif()
-	set(CMAKE_C_COMPILER ${cross_compiler_sysroot}/usr/bin/i586-poky-linux/i586-poky-linux-gcc)
-	set(CMAKE_CXX_COMPILER ${cross_compiler_sysroot}/usr/bin/i586-poky-linux/i586-poky-linux-g++)
-endif()
-
-
-set(CMAKE_SYSROOT ${EDISON_SDK_ROOT}/sysroots/core2-32-poky-linux)
-set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
-
-SET(CMAKE_C_FLAGS "-Os -g3 -Wall --sysroot=${CMAKE_SYSROOT} -m32 -march=i586 -ffunction-sections -fdata-sections"  CACHE STRING "" FORCE)
-SET(CMAKE_CXX_FLAGS "-Os -g3 -Wall --sysroot=${CMAKE_SYSROOT} -m32 -march=i586 -ffunction-sections -fdata-sections"  CACHE STRING "" FORCE)
-
-INCLUDE_DIRECTORIES(${CMAKE_SYSROOT}/usr/include)
-INCLUDE_DIRECTORIES(${CMAKE_SYSROOT}/usr/include/c++)
-INCLUDE_DIRECTORIES(${CMAKE_SYSROOT}/usr/include/c++/i586-poky-linux)
+#
+# Copyright 2014-2015 CyberVision, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if(NOT DEFINED SDK_32bits)
+	set(SDK_32bits FALSE)
+endif()
+
+#Set the target parameters
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_VERSION 3.10.17-poky-edison+)
+set(CMAKE_SYSTEM_PROCESSOR i686)
+
+if(NOT DEFINED EDISON_SDK_ROOT AND WIN32)
+	if(${SDK_32bits})
+		set(EDISON_SDK_ROOT C:/Edison/poky-edison-eglibc-i686-edison-image-core2-32-toolchain-1.7.2)
+	else()
+		set(EDISON_SDK_ROOT C:/Edison/poky-edison-eglibc-x86_64-edison-image-core2-32-toolchain-1.7.2)
+	endif()
+else(NOT DEFINED EDISON_SDK_ROOT)
+	set(EDISON_SDK_ROOT /opt/poky-edison/1.7.2)
+endif()
+
+#Set the host parameters
+if(WIN32)
+    	#Windows host
+	if(${SDK_32bits})
+		set(cross_compiler_sysroot ${EDISON_SDK_ROOT}/sysroots/i686-pokysdk-mingw32)
+		#MinGW make
+		set(CMAKE_MAKE_PROGRAM "C:/Program Files/mingw/i686-4.9.2-posix-dwarf-rt_v3-rev1/mingw32/bin/mingw32-make.exe")
+	else()
+		set(cross_compiler_sysroot ${EDISON_SDK_ROOT}/sysroots/x86_64-pokysdk-mingw32)
+		#MinGW make
+		set(CMAKE_MAKE_PROGRAM "C:/Program Files (x86)/mingw/i686-4.9.2-posix-dwarf-rt_v3-rev1/mingw32/bin/mingw32-make.exe")
+	endif()
+	set(CMAKE_C_COMPILER ${cross_compiler_sysroot}/usr/bin/i586-poky-linux/i586-poky-linux-gcc.exe)
+	set(CMAKE_CXX_COMPILER ${cross_compiler_sysroot}/usr/bin/i586-poky-linux/i586-poky-linux-g++.exe)
+else()
+	#Linux host
+	if(${SDK_32bits})
+		set(cross_compiler_sysroot ${EDISON_SDK_ROOT}/sysroots/i686-pokysdk-linux)
+	else()
+		set(cross_compiler_sysroot ${EDISON_SDK_ROOT}/sysroots/x86_64-pokysdk-linux)
+	endif()
+	set(CMAKE_C_COMPILER ${cross_compiler_sysroot}/usr/bin/i586-poky-linux/i586-poky-linux-gcc)
+	set(CMAKE_CXX_COMPILER ${cross_compiler_sysroot}/usr/bin/i586-poky-linux/i586-poky-linux-g++)
+endif()
+
+
+set(CMAKE_SYSROOT ${EDISON_SDK_ROOT}/sysroots/core2-32-poky-linux)
+set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+SET(CMAKE_C_FLAGS "-Os -g3 -Wall --sysroot=${CMAKE_SYSROOT} -m32 -march=i586 -ffunction-sections -fdata-sections"  CACHE STRING "" FORCE)
+SET(CMAKE_CXX_FLAGS "-Os -g3 -Wall --sysroot=${CMAKE_SYSROOT} -m32 -march=i586 -ffunction-sections -fdata-sections"  CACHE STRING "" FORCE)
+
+INCLUDE_DIRECTORIES(${CMAKE_SYSROOT}/usr/include)
+INCLUDE_DIRECTORIES(${CMAKE_SYSROOT}/usr/include/c++)
+INCLUDE_DIRECTORIES(${CMAKE_SYSROOT}/usr/include/c++/i586-poky-linux)


CMake: enable C++11

CMake: enable C++11

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -239,6 +239,7 @@
 				${OLXROOTDIR}/libs/boost_process)
 ELSE(WIN32)
 	ADD_DEFINITIONS(-Wall)
+	ADD_DEFINITIONS("-std=c++0x")

 	EXEC_PROGRAM(sh ARGS ${CMAKE_CURRENT_SOURCE_DIR}/get_version.sh OUTPUT_VARIABLE OLXVER)
 	string(REGEX REPLACE "[\r\n]" " " OLXVER "${OLXVER}")


Add TEST_ENABLE_BOOST_HEADER option in cache

* Turns on define for boost tests to add a main function,
  by default this is maintained for tests, but can be disabled using
  the above flag

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -27,6 +27,7 @@
 # * UNIT_AND_PERF_TESTS a list with files which should be compiled
 #   also as performance tests. The unit test will be named 'file',
 #   whereas the performance test will be named 'perf-file'.
+# * TEST_ENABLE_BOOST_HEADER adds -DBOOST_TEST_DYN_LINK to tests

 include(CommonCheckTargets)

@@ -46,6 +47,13 @@

 set(ALL_CPP_TESTS)
 set(ALL_CPP_PERF_TESTS)
+
+set(TEST_ENABLE_BOOST_HEADER "Add -DBOOST_TEST_DYN_LINK to tests" CACHE BOOL ON)
+# backwards compat: generate main() for unit tests
+#  should really #define BOOST_TEST_DYN_LINK if using boost
+if(NOT Boost_USE_STATIC_LIBS AND TEST_ENABLE_BOOST_HEADER)
+  add_definitions(-DBOOST_TEST_DYN_LINK)
+endif()

 macro(common_add_cpp_test NAME FILE)
   set(TEST_NAME ${PROJECT_NAME}-${NAME})


Adding support for easybuild

Adding support for easybuild

Former-commit-id: bfdcf339af16250a98d9064c12251a14902564cb

--- cmake-modules/Fetch_Ceres.cmake
+++ cmake-modules/Fetch_Ceres.cmake
@@ -10,6 +10,8 @@
 else()
     message(STATUS "ceres will be installed into ${INSTALL_DIRECTORY}/ceres on first build.")
     get_target_property(EIGEN3_INCLUDE_DIR Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES)
+    get_target_property(GLOG_INCLUDE_DIR   glog::glog    INTERFACE_INCLUDE_DIRECTORIES)
+
     list (GET EIGEN3_INCLUDE_DIR 0 EIGEN3_INCLUDE_DIR)

 #    set(FLAGS "-DEIGEN_MAX_STATIC_ALIGN_BYTES=0 -DNDEBUG -O3 -fstack-protector  -g -fno-omit-frame-pointer -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCXX_DEBUG -D_FORTIFY_SOURCE=2")
@@ -43,6 +45,7 @@
             -DEIGEN_INCLUDE_DIR:PATH=${EIGEN3_INCLUDE_DIR}
             -DEIGEN_INCLUDE_DIR_HINTS:PATH=${EIGEN3_INCLUDE_DIR}
             -DEIGEN_PREFER_EXPORTED_EIGEN_CMAKE_CONFIGURATION:BOOL=OFF
+            -DGLOG_INCLUDE_DIR:PATH=${GLOG_INCLUDE_DIR}
             -DLAPACK:BOOL=OFF
             -DEIGENSPARSE:BOOL=ON
             -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>


Fix OpenSSL version detection.

Fix OpenSSL version detection.

More recent OpenSSL versions change the spacing of the
OPENSSL_VERSION_NUMBER constant, breaking the cmake script that uses a
regex to determine the value of this constant.

Shout out to Joe Damato for helping me fix this. Dude's a prince.

--- cmake-scripts/Findopenssl.cmake
+++ cmake-scripts/Findopenssl.cmake
@@ -35,16 +35,17 @@
 SET(OPENSSL_MINIMUM_VERSION "1.0.1")

 IF(OPENSSL_FOUND)
-  file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*")
-
+  file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
+    REGEX "^#[\t ]?define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*")
+
   string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1" OPENSSL_VERSION_MAJOR "${openssl_version_str}")
   string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9]([0-9][0-9]).*$" "\\1" OPENSSL_VERSION_MINOR  "${openssl_version_str}")
   string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1" OPENSSL_VERSION_PATCH "${openssl_version_str}")
-
+
   string(REGEX REPLACE "^0" "" OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_MINOR}")
   string(REGEX REPLACE "^0" "" OPENSSL_VERSION_PATCH "${OPENSSL_VERSION_PATCH}")

-  # hack: the above regex-replaces consume versions of the form "00" too greedily,
+  # hack: the above regex-replaces consume versions of the form "00" too greedily,
   # giving us an empty string, so make sure they're 0 if empty.
   if(OPENSSL_VERSION_MINOR STREQUAL "")
     SET(OPENSSL_VERSION_MINOR "0")
@@ -53,11 +54,11 @@
   if(OPENSSL_VERSION_PATCH STREQUAL "")
     SET(OPENSSL_VERSION_PATCH "0")
   endif(OPENSSL_VERSION_PATCH STREQUAL "")
-
+
   set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_PATCH}")

   if(${OPENSSL_VERSION} VERSION_LESS ${OPENSSL_MINIMUM_VERSION})
     message(FATAL_ERROR "OpenSSL version found (${OPENSSL_VERSION}) is less then the minimum required (${OpenSSL_FIND_VERSION}), aborting.")
   endif(${OPENSSL_VERSION} VERSION_LESS ${OPENSSL_MINIMUM_VERSION})
-
+
 ENDIF (OPENSSL_FOUND)


prefer static libjsoncpp

prefer static libjsoncpp

--- cmake/Modules/FindJsonCpp.cmake
+++ cmake/Modules/FindJsonCpp.cmake
@@ -13,10 +13,12 @@

 FIND_LIBRARY(
     JSONCPP_LIBRARIES
-    NAMES jsoncpp
+    NAMES
+        libjsoncpp.a
+        jsoncpp
     PATHS
-        /usr/lib${LIB_SUFFIX}
-        /usr/local/lib${LIB_SUFFIX}
+        /usr/lib
+        /usr/local/lib
         ${JSONCPP_PATH_LIB}
 )


Fix depend options parsing

Fix depend options parsing

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -2,22 +2,47 @@
   #
   # Optional argument: TESTS, LIBS, EXES
   #
-  SET (_TESTS TRUE)
-  SET (_LIBS TRUE)
-  SET (_EXES TRUE)
+  SET (_ALL TRUE)
+  SET (_TESTS FALSE)
+  SET (_LIBS FALSE)
+  SET (_EXES FALSE)
   FOREACH (_var ${ARGN})
-    IF ("\"${_var}\"" STREQUAL TESTS)
+    IF (${_var} STREQUAL TESTS)
+      IF (MYPACKAGE_DEBUG)
+        MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} test scope argument")
+      ENDIF ()
+      SET (_ALL FALSE)
       SET (_TESTS TRUE)
     ELSE ()
-      IF ("\"${_var}\"" STREQUAL LIBS)
+      IF (${_var} STREQUAL LIBS)
+        IF (MYPACKAGE_DEBUG)
+          MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} library scope argument")
+        ENDIF ()
+        SET (_ALL FALSE)
         SET (_LIBS TRUE)
       ELSE ()
-        IF ("\"${_var}\"" STREQUAL EXES)
+        IF (${_var} STREQUAL EXES)
+          IF (MYPACKAGE_DEBUG)
+            MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} executables scope argument")
+          ENDIF ()
+          SET (_ALL FALSE)
           SET (_EXES TRUE)
+        ELSE ()
+          IF (MYPACKAGE_DEBUG)
+            MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} unknown scope argument: ${_var}")
+          ENDIF ()
         ENDIF ()
       ENDIF ()
     ENDIF ()
   ENDFOREACH ()
+  IF (_ALL)
+    SET (_TESTS TRUE)
+    SET (_LIBS TRUE)
+    SET (_EXES TRUE)
+  ENDIF ()
+  IF (MYPACKAGE_DEBUG)
+    MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} dependency scopes are: ALL=${_ALL} TEST=${_TESTS} LIBS=${_LIBS} EXES=${_EXES}")
+  ENDIF ()
   #
   # Check if inclusion was already done - via us or another mechanism... guessed with TARGET check
   #


Configure OpenVDB for Houdini with _GLIBCXX_USE_CXX11_ABI=0

Signed-off-by: Nick Avramoussis <ce9ae7fb000f2865db247e53b12753caeda92c74@users.noreply.github.com>

--- cmake/OpenVDBHoudiniSetup.cmake
+++ cmake/OpenVDBHoudiniSetup.cmake
@@ -329,3 +329,50 @@
   # Anticipated ABI version for H18
   set(OPENVDB_HOUDINI_ABI 6)
 endif()
+
+# ------------------------------------------------------------------------
+#  Configure GCC CXX11 ABI
+# ------------------------------------------------------------------------
+
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+  if((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 5.1) OR
+     (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.1))
+    message(STATUS "GCC >= 5.1 detected. Configuring GCC CXX11 ABI for Houdini compatibility...")
+
+    execute_process(COMMAND echo "#include" " " "<string>"
+      COMMAND g++ "-x" "c++" "-E" "-dM" "-"
+      COMMAND grep "-F" "_GLIBCXX_USE_CXX11_ABI"
+      TIMEOUT 10
+      RESULT_VARIABLE QUERIED_GCC_CXX11_ABI_SUCCESS
+      OUTPUT_VARIABLE _GCC_CXX11_ABI)
+
+    set(GLIBCXX_USE_CXX11_ABI -1)
+    if(NOT QUERIED_GCC_CXX11_ABI_SUCCESS)
+      string(FIND ${_GCC_CXX11_ABI} "0" GCC_OLD_CXX11_ABI)
+      string(FIND ${_GCC_CXX11_ABI} "1" GCC_NEW_CXX11_ABI)
+      if(NOT (${GCC_OLD_CXX11_ABI} EQUAL -1))
+        set(GLIBCXX_USE_CXX11_ABI 0)
+      endif()
+      if(NOT (${GCC_NEW_CXX11_ABI} EQUAL -1))
+        set(GLIBCXX_USE_CXX11_ABI 1)
+      endif()
+    endif()
+
+    if(${GLIBCXX_USE_CXX11_ABI} EQUAL 0)
+      message(STATUS "  Newer GCC CXX11 ABI already disabled - compatible for Houdini")
+    elseif(${GLIBCXX_USE_CXX11_ABI} EQUAL 1)
+      message(WARNING "GCC has been built with newer CXX11 ABI automatically enabled. "
+        "Disabling for all OpenVDB components for Houdini compatibility. Make sure all "
+        "dependencies have been build with older GCC ABI. "
+        "See https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html and "
+        "https://vfxplatform.com/#footnote-gcc6 for more information.")
+    else()
+      message(WARNING "Unable to determine the current ABI configuration of GCC CXX11."
+        " Disabling for all OpenVDB components for Houdini compatibility. Make sure all "
+        "dependencies have been build with older GCC ABI. "
+        "See https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html and "
+        "https://vfxplatform.com/#footnote-gcc6 for more information.")
+    endif()
+    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
+  endif()
+endif()


googletest.cmake: remove GIT_SHALLOW when cloning (#9712)

--- cmake/external/googletest.cmake
+++ cmake/external/googletest.cmake
@@ -28,7 +28,6 @@
   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
   GIT_REPOSITORY https://github.com/google/googletest.git
   GIT_TAG "${version}"
-  GIT_SHALLOW "ON"

   PREFIX ${PROJECT_BINARY_DIR}


Use official FLANN (no more pods)

Use official FLANN (no more pods)

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -21,13 +21,24 @@
     -DWITH_CUDA:BOOL=OFF
   )

-set(flann-pod_url https://github.com/openhumanoids/flann-pod.git)
-set(flann-pod_revision 9619e03a1d1f8b4b27d370810b9b2ccfe00adf58)
-set(flann-pod_depends)
+set(flann_url https://github.com/mariusmuja/flann.git)
+set(flann_revision 4969acc) # master from march 2015
+set(flann_depends)
+set(flann_external_args
+  CMAKE_CACHE_ARGS
+    -DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}
+    -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
+    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+    -DBUILD_MATLAB_BINDINGS:BOOL=OFF
+    -DBUILD_PYTHON_BINDINGS:BOOL=OFF
+    -DBUILD_C_BINDINGS:BOOL=OFF
+    -DBUILD_TESTS:BOOL=OFF
+    -DBUILD_EXAMPLES:BOOL=OFF
+  )

 set(pcl_url http://github.com/pointcloudlibrary/pcl.git)
 set(pcl_revision pcl-1.7.1)
-set(pcl_depends flann-pod Eigen_pod)
+set(pcl_depends flann Eigen_pod)
 set(pcl_external_args
   CMAKE_CACHE_ARGS
     -DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}
@@ -158,7 +169,7 @@
   Eigen_pod
   libbot
   opencv
-  flann-pod
+  flann
   pcl
   octomap-pod
   libmultisense


Add an install path

Add an install path

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -111,7 +111,9 @@
 set ( PROJECT_SOURCE_DIR "${OTB_SOURCE_DIR}" )

 # SuperBuild case : one configure option
-set ( CONFIGURE_OPTIONS  "-DCMAKE_PREFIX_PATH=${XDK_PATH}" )
+set ( CONFIGURE_OPTIONS
+"-DCMAKE_PREFIX_PATH=${XDK_PATH};\
+-DCMAKE_INSTALL_PREFIX=${CTEST_INSTALL_DIRECTORY};" )

 # FIX ME this part might platform dependent
 set( GDAL_DATA "${XDK_PATH}/share/gdal" )


Fix typo in CMake

Fix typo in CMake

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -25,7 +25,7 @@
     "${OGRE_BINARY_DIR}/../iOSDependencies"
     "${OGRE_SOURCE_DIR}/../iOSDependencies"
   )
-elif(OGRE_BUILD_PLATFORM_ANDROID)
+elseif(OGRE_BUILD_PLATFORM_ANDROID)
   set(OGRE_DEP_SEARCH_PATH
     ${OGRE_DEPENDENCIES_DIR}
     ${ENV_OGRE_DEPENDENCIES_DIR}


WRG: no need to issue a warning for local modifications

--- CMake/SourceStatus.cmake
+++ CMake/SourceStatus.cmake
@@ -61,7 +61,7 @@
   if(OTB_WC_STATUS)
     message(STATUS "  Local file modifications (${dir_name}) :")
     string(REPLACE "\n" "\n--     " OTB_WC_STATUS_PRETTYPRINT "    ${OTB_WC_STATUS}")
-    message(WARNING "${OTB_WC_STATUS_PRETTYPRINT}")
+    message(STATUS "${OTB_WC_STATUS_PRETTYPRINT}")
   else()
     message(STATUS "  No files modified locally (${dir_name})")
   endif()


Use a daylight saving fixed Qt4.6 CTK

Use a daylight saving fixed Qt4.6 CTK

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag 834f67b5)
+    SET(revision_tag c84cfa3c)
     IF(${proj}_REVISION_TAG)
       SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


excluding GEOVIS and CHARTS from superbuild

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -30,6 +30,8 @@
         -DVTK_WRAP_JAVA:BOOL=OFF
         -DBUILD_SHARED_LIBS:BOOL=ON
         -DVTK_USE_PARALLEL:BOOL=ON
+        -DVTK_USE_CHARTS:BOOL=OFF
+        -DVTK_USE_GEOVIS:BOOL=OFF
         -DVTK_USE_SYSTEM_FREETYPE:BOOL=${VTK_USE_SYSTEM_FREETYPE}
         ${vtk_QT_ARGS}
      DEPENDS ${proj_DEPENDENCIES}


Added some docs

Added some docs

--- CheckCXX11Features.cmake
+++ CheckCXX11Features.cmake
@@ -1,16 +1,18 @@
 # Checks for C++11 features
-#  HAS_CXX11_AUTO               - auto keyword
-#  HAS_CXX11_NULLPTR            - nullptr
-#  HAS_CXX11_LAMBDA             - lambdas
-#  HAS_CXX11_STATIC_ASSERT      - static_assert()
-#  HAS_CXX11_RVALUE_REFERENCES  - rvalue references
-#  HAS_CXX11_DECLTYPE           - decltype keyword
-#  HAS_CXX11_CSTDINT_H          - cstdint header
-#  HAS_CXX11_LONG_LONG          - long long signed & unsigned types
-#  HAS_CXX11_VARIADIC_TEMPLATES - variadic templates
-#  HAS_CXX11_CONSTEXPR          - constexpr keyword
-#  HAS_CXX11_SIZEOF_MEMBER      - sizeof() non-static members
-#  HAS_CXX11_FUNC               - __func__ preprocessor constant
+#
+# USAGE: There are two functions
+#
+# cxx11_find_all_features(OUTPUT_VARIABLE)
+# This function returns a variable with all possible features.
+#
+# cxx11_feature_check([feature feature] [REQUIRED [feature feature]])
+# If no arguments are provided, then checks all available features
+# Features appeacing before REQUIRED are optional.
+# If arguments are provided and those features are available, sets
+# the variable HAS_CXX11_FEATURENAME, where FEATURENAME is the input in capital letters.
+# Fails if required feature are not available
+#
+# For possible features, please print out the result from the first function.
 #
 # Original script by Rolf Eike Beer
 # Modifications by Andreas Weis


Lower annoyance

Lower annoyance

--- GithubOrganization.cmake
+++ GithubOrganization.cmake
@@ -13,7 +13,7 @@
 endif()

 if(NOT GIT_ORIGIN_ORG OR GIT_ORIGIN_ORG STREQUAL GIT_ORIGIN_URL)
-  message(WARNING "Can't determine github organization for ${GIT_ORIGIN_URL}")
+  message(STATUS "Can't determine github organization for ${GIT_ORIGIN_URL}")
   set(GIT_ORIGIN_ORG)
 else()
   string(TOLOWER ${GIT_ORIGIN_ORG} GIT_ORIGIN_org)


Fixed WASM_ROOT for Ubuntu in FindWasm.cmake

--- CMakeModules/FindWasm.cmake
+++ CMakeModules/FindWasm.cmake
@@ -7,7 +7,7 @@
    if (APPLE)
       set( WASM_ROOT "/usr/local/wasm" )
    elseif (UNIX AND NOT APPLE)
-      set( WASM_ROOT "/opt/wasm" )
+      set( WASM_ROOT "$ENV{HOME}/opt/wasm" )
    else()
       message(FATAL_ERROR "WASM not found and don't know where to look, please specify WASM_ROOT")
    endif()


cmake: removed debug statements

cmake: removed debug statements

--- CMakeModules/hgscript.cmake
+++ CMakeModules/hgscript.cmake
@@ -9,8 +9,6 @@
 endif(MERCURIAL_FOUND)
 file(READ ${INPUT} CONTENT)
 string(REGEX REPLACE "#CSG_HG_ID#" "${THIS_HG_ID}" NEW_CONTENT "${CONTENT}")
-string(REGEX MATCH "Copyright.*License" XXX "${CONTENT}")
-message("hallo ${XXX}")
 file(WRITE "${OUTPUT}.tmp" "${NEW_CONTENT}")
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${OUTPUT}.tmp ${OUTPUT})
 execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${OUTPUT}.tmp)


start 3.2.5

start 3.2.5

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -34,7 +34,7 @@
 cmake_policy(POP)

 set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set (Mathematica_CMAKE_MODULE_VERSION "3.2.4")
+set (Mathematica_CMAKE_MODULE_VERSION "3.2.5")

 # activate select policies
 if (POLICY CMP0025)