First attempt at the generator expression for the target location.

--- VigraAddDep.cmake
+++ VigraAddDep.cmake
@@ -59,6 +59,11 @@
     set_property(GLOBAL PROPERTY _VAD_IMPORTED_NOGLOBAL_LIST ${_LIB_LIST})
   endif()
   _add_library(${NAME} ${ARGN})
+  list(FIND ARGN "INTERFACE" _IDX_IFACE)
+  list(FIND ARGN "ALIAS" _IDX_ALIAS)
+  if(_IDX_IFACE EQUAL -1 AND _IDX_ALIAS EQUAL -1 AND NOT "${NAME}" MATCHES "^_VAD.*_STUB")
+    file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/${NAME}.cmake_location" CONTENT "$<TARGET_FILE:${NAME}>")
+  endif()
 endfunction()

 # An utility function to turn an imported target into a GLOBAL imported target.


Windows: Properly copy liblzma.lib into <INSTALL_DIR>/lib

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -199,11 +199,11 @@
       URL_HASH SHA256=ce92be2df485a2bd461939908ba9666c88f44e3194d4fb2d4990ac8de7c5929f
       PREFIX LZMA
       INSTALL_DIR ${CMAKE_BINARY_DIR}
-      CONFIGURE_COMMAND "" BUILD_COMMAND ""
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ${CMAKE_COMMAND} -E copy lib/liblzma.lib <INSTALL_DIR>/lib
       INSTALL_COMMAND ${CMAKE_COMMAND} -E copy lib/liblzma.dll <INSTALL_DIR>/bin
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1
       BUILD_BYPRODUCTS ${LZMA_LIBRARIES})
-    install(FILES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.dll DESTINATION ${CMAKE_INSTALL_BINDIR})
     set(LZMA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/include)
   else()
     if(CMAKE_CXX_COMPILER_ID MATCHES Clang)


Added option SKIP_INSTALL on FIND_PACKAGE_DLL_WIN32

--- cmake_modules/Windows/ProxyFindModule.cmake
+++ cmake_modules/Windows/ProxyFindModule.cmake
@@ -265,13 +265,15 @@
   IF (NOT WIN32)
     MESSAGE (FATAL_ERROR "This macro is intended only for Windows platforms.")
   ENDIF (NOT WIN32)
-
+
+  PARSE_ARGUMENTS(ARG "" "" "SKIP_INSTALL" ${ARGN})
+
   # get the current DLLs and their paths
   SET (dlls "${ZORBA_REQUIRED_DLLS}")
   SET (paths "${ZORBA_REQUIRED_DLL_PATHS}")
-
-  FOREACH (NAME ${ARGN})
-
+
+  FOREACH (NAME ${ARG_DEFAULT_ARGS})
+
     # first delete the cache entry used during FIND_FILE to make sure the correct file is chosen
     UNSET (TMP_DLL_VAR CACHE)

@@ -291,8 +293,13 @@
       FILE (TO_NATIVE_PATH ${PATH} NATIVE_PATH)
       LIST (APPEND paths "${NATIVE_PATH}")
       MESSAGE (STATUS "Added dll to ZORBA_REQUIRED_DLLS cache variable: ${TMP_DLL_VAR}")
-      INSTALL_DLL (${TMP_DLL_VAR})
-
+
+      IF(ARG_SKIP_INSTALL)
+        MESSAGE(STATUS "Skip installation of ${NAME}.dll")
+      ELSE (ARG_SKIP_INSTALL)
+        INSTALL_DLL (${TMP_DLL_VAR})
+      ENDIF(ARG_SKIP_INSTALL)
+
       # we break the loop if we found one DLL
       BREAK ()

@@ -302,7 +309,7 @@

   # we report a warning if the DLL could not be found
   IF (NOT TMP_DLL_VAR)
-    MESSAGE (WARNING "None of the names provided (${ARGN}) points to a DLL in: ${LIBRARY_LOCATION}. Zorba will not run properly unless you have it in the path.")
+    MESSAGE (WARNING "None of the names provided (${ARG_DEFAULT_ARGS}) points to a DLL in: ${LIBRARY_LOCATION}. Zorba will not run properly unless you have it in the path.")
   ENDIF (NOT TMP_DLL_VAR)

   # make sure we don't leave garbage in the cache and don't influence other logic with this


ARROW-9351: [C++] Fix CMake 3.2 detection in option value validation

Closes #7669 from kou/cpp-cmake32-options

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

--- cpp/cmake_modules/DefineOptions.cmake
+++ cpp/cmake_modules/DefineOptions.cmake
@@ -398,11 +398,12 @@
       set(possible_values ${${name}_OPTION_POSSIBLE_VALUES})
       set(value "${${name}}")
       if(possible_values)
-        if(NOT CMAKE_VERSION VERSION_LESS "3.3"
-           AND NOT ("${value}" IN_LIST possible_values))
-          message(
-            FATAL_ERROR "Configuration option ${name} got invalid value '${value}'. "
-                        "Allowed values: ${${name}_OPTION_ENUM}.")
+        if(NOT CMAKE_VERSION VERSION_LESS "3.3")
+          if(NOT "${value}" IN_LIST possible_values)
+            message(
+              FATAL_ERROR "Configuration option ${name} got invalid value '${value}'. "
+                          "Allowed values: ${${name}_OPTION_ENUM}.")
+          endif()
         endif()
       endif()
     endforeach()


ARROW-6877: [C++] Add additional Boost versions to support 1.71 and the presumed next 2 future versions

Boost 1.71 was released and July and landed in conda-forge about 3 weeks ago.

Closes #5654 from wesm/ARROW-6877 and squashes the following commits:

dcf192713 <Wes McKinney> Add additional Boost versions

Authored-by: Wes McKinney <3be70eed0275ec2606f002bff3514252e145d204@apache.org>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -586,6 +586,12 @@
   set(Boost_USE_STATIC_RUNTIME ON)
 endif()
 set(Boost_ADDITIONAL_VERSIONS
+    "1.73.0"
+    "1.73"
+    "1.72.0"
+    "1.72"
+    "1.71.0"
+    "1.71"
     "1.70.0"
     "1.70"
     "1.69.0"


Toward a CMake standard compliant FindTSP.cmake

--- make/FindTSP.cmake
+++ make/FindTSP.cmake
@@ -1,4 +1,15 @@
+# - This module looks for TSP installation
+# TSP is an Open Source implementation of Transport Sample Protocol
+# See https://savannah.nongnu.org/projects/tsp or http://www.ts2p.org/
+# If you have a non-standard TSP installation
+# You may help this script to find the appropriate
+# TSP installation by setting TSP_CUSTOM_HOME
+# before calling FIND_PACKAGE(TSP REQUIRED)
+# If TSP_CUSTOM_HOME is not set then TSP is search
+# if TSP_HOME env var is set
+# then use /usr
 #
+# Once done this will define:
 # try to find TSP components
 #
 # TSP_INCLUDE_DIRS         - Directories to include to use TSP
@@ -10,16 +21,28 @@
 # TSP_BB_EXECUTABLE_DIRS   - Directories to include to use TSP
 # TSP_BB_FOUND             - If false, don't try to use TSP BlackBoard
 #
+
+MACRO(MESSAGE_QUIETLY QUIET TYPE MSG)
+   IF(NOT ${QUIET})
+       MESSAGE(${TYPE} "${MSG}")
+   ENDIF(NOT ${QUIET})
+ENDMACRO(MESSAGE_QUIETLY QUIET TYPE MSG)
+
 IF (NOT TSP_FIND_QUIETLY)
-  MESSAGE(STATUS "Looking for TSP...")
+  MESSAGE_QUIETLY(TSP_FIND_QUIETLY STATUS "Looking for TSP...")
 ENDIF (NOT TSP_FIND_QUIETLY)

 IF (TSP_CUSTOM_HOME)
   SET(TSP_FIND_HOME ${TSP_CUSTOM_HOME})
-  MESSAGE(STATUS "Using TSP_CUSTOM_HOME : ${TSP_FIND_HOME}")
+  MESSAGE_QUIETLY(TSP_FIND_QUIETLY STATUS "Using TSP_CUSTOM_HOME : ${TSP_FIND_HOME}")
 ELSE (TSP_CUSTOM_HOME)
-  SET(TSP_FIND_HOME $ENV{TSP_HOME})
-  MESSAGE(STATUS "Using TSP_HOME : ${TSP_FIND_HOME}")
+  IF ("$ENV{TSP_HOME}" STRGREATER "")
+     SET(TSP_FIND_HOME "$ENV{TSP_HOME}")
+     MESSAGE_QUIETLY(TSP_FIND_QUIETLY STATUS "Using environment defined TSP_HOME : ${TSP_FIND_HOME}")
+  ENDIF ("$ENV{TSP_HOME}" STRGREATER "")
+  IF (NOT TSP_FIND_HOME)
+     SET(TSP_FIND_HOME "/usr")
+  ENDIF (NOT TSP_FIND_HOME)
 ENDIF (TSP_CUSTOM_HOME)

 SET(TSP_INCLUDE_DIRS)
@@ -28,8 +51,7 @@

 FIND_PATH(TSP_EXECUTABLE_PATH tsp_stub_server
   ${TSP_FIND_HOME}/bin
-  /opt/tsp/bin
-  NO_DEFAULT_PATH)
+  /opt/tsp/bin)

 IF (TSP_EXECUTABLE_PATH)
   SET(TSP_EXECUTABLE_DIRS ${TSP_EXECUTABLE_DIRS} ${TSP_EXECUTABLE_PATH})
@@ -37,8 +59,7 @@

 FIND_PATH(TSP_SCRIPTS_PATH tsp.profile.sh
   ${TSP_FIND_HOME}/scripts
-  /opt/tsp/scripts
-  NO_DEFAULT_PATH)
+  /opt/tsp/scripts)

 IF (TSP_SCRIPTS_PATH)
   SET(TSP_EXECUTABLE_DIRS ${TSP_EXECUTABLE_DIRS} ${TSP_SCRIPTS_PATH})
@@ -46,8 +67,7 @@

 FIND_PATH(TSP_INCLUDE_PATH tsp_consumer.h
   ${TSP_FIND_HOME}/include
-  /opt/tsp/include
-  NO_DEFAULT_PATH)
+  /opt/tsp/include)

 IF (TSP_INCLUDE_PATH)
   SET(TSP_INCLUDE_DIRS ${TSP_INCLUDE_DIRS} ${TSP_INCLUDE_PATH})
@@ -58,8 +78,7 @@
   tsp_consumer
   PATHS
   ${TSP_FIND_HOME}/lib
-  /opt/tsp/lib
-  NO_DEFAULT_PATH)
+  /opt/tsp/lib)

 IF (TSP_CONSUMER_LIBRARY)
   SET(TSP_LIBRARIES ${TSP_LIBRARIES} ${TSP_CONSUMER_LIBRARY})
@@ -77,9 +96,9 @@

 IF (NOT TSP_FIND_QUIETLY)
   IF (TSP_FOUND)
-    MESSAGE(STATUS "Looking for TSP... - found ${TSP_INCLUDE_DIRS}")
+    MESSAGE_QUIETLY(TSP_FIND_QUIETLY STATUS "Looking for TSP... - found ${TSP_INCLUDE_DIRS}")
   ELSE (TSP_FOUND)
-    MESSAGE(STATUS "Looking for TSP... - NOT found")
+    MESSAGE_QUIETLY(TSP_FIND_QUIETLY STATUS "Looking for TSP... - NOT found")
   ENDIF (TSP_FOUND)
 ENDIF (NOT TSP_FIND_QUIETLY)

@@ -90,7 +109,7 @@
 FIND_PATH(TSP_BB_EXECUTABLE_PATH bb_tools
   ${TSP_FIND_HOME}/bin
   /opt/tsp/bin
-  NO_DEFAULT_PATH)
+  )

 IF (TSP_BB_EXECUTABLE_PATH)
   SET(TSP_BB_EXECUTABLE_DIRS ${TSP_BB_EXECUTABLE_DIRS} ${TSP_BB_EXECUTABLE_PATH})
@@ -99,7 +118,7 @@
 FIND_PATH(TSP_BB_SCRIPTS_PATH bb_read
   ${TSP_FIND_HOME}/scripts
   /opt/tsp/scripts
-  NO_DEFAULT_PATH)
+  )

 IF (TSP_BB_SCRIPTS_PATH)
   SET(TSP_BB_EXECUTABLE_DIRS ${TSP_BB_EXECUTABLE_DIRS} ${TSP_BB_SCRIPTS_PATH})
@@ -108,7 +127,7 @@
 FIND_PATH(TSP_BB_INCLUDE_PATH bb_core.h
   ${TSP_FIND_HOME}/include
   /opt/tsp/include
-  NO_DEFAULT_PATH)
+  )

 IF (TSP_BB_INCLUDE_PATH)
   SET(TSP_BB_INCLUDE_DIRS ${TSP_BB_INCLUDE_DIRS} ${TSP_BB_INCLUDE_PATH})
@@ -120,7 +139,7 @@
   PATHS
   ${TSP_FIND_HOME}/lib
   /opt/tsp/lib
-  NO_DEFAULT_PATH)
+  )

 IF (TSP_BB_LIBRARY)
   SET(TSP_BB_LIBRARIES ${TSP_BB_LIBRARIES} ${TSP_BB_LIBRARY})


add comment to clang-format execution

add comment to clang-format execution

Change-Id: Ib059b65419fcd94cb8158c435fc4d0c4136b178b

--- cpp/CMake/AddClangFormat.cmake
+++ cpp/CMake/AddClangFormat.cmake
@@ -26,6 +26,7 @@
             COMMAND "${CLANG_FORMAT_PATH}" -i ${TARGET_SOURCES}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
             VERBATIM
+            COMMENT "${COMMENT}"
         )
         add_dependencies(${TARGET} ${FORMAT_TARGET})
         add_dependencies(format ${FORMAT_TARGET})


Fix incorrect shellcheck binary name.

Fix incorrect shellcheck binary name.

--- build/cmake/test/shellcheck.cmake
+++ build/cmake/test/shellcheck.cmake
@@ -2,7 +2,7 @@
   shellcheck
   URL https://github.com/caarlos0/shellcheck-docker/releases/download/v${SHELLCHECK_VERSION}/shellcheck
   URL_HASH MD5=${SHELLCHECK_HASH}
-  DOWNLOAD_NAME shellcheck-binz
+  DOWNLOAD_NAME shellcheck
   DOWNLOAD_NO_EXTRACT 1
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""


Workaround powerpc processor detection.

Workaround powerpc processor detection.

git-svn-id: bd2008fbba0f7d30fd6598b54f2cd88503fdd2e4@1209 95f4ed2b-212e-0410-8b90-d31948207fce

--- cmake/DetermineProcessor.cmake
+++ cmake/DetermineProcessor.cmake
@@ -10,6 +10,10 @@
 		#IF("${val}" GREATER 0 OR NV_SYSTEM_PROCESSOR STREQUAL "unknown")
 			EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE NV_SYSTEM_PROCESSOR RETURN_VALUE val)
 		#ENDIF("${val}" GREATER 0 OR NV_SYSTEM_PROCESSOR STREQUAL "unknown")
+
+		IF(NV_SYSTEM_PROCESSOR STREQUAL "Power Macintosh")
+			SET(NV_SYSTEM_PROCESSOR "powerpc")
+		ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "Power Macintosh")

 		# processor may have double quote in the name, and that needs to be removed
 		STRING(REGEX REPLACE "\"" "" NV_SYSTEM_PROCESSOR "${NV_SYSTEM_PROCESSOR}")


Find Augeas: Reformat file with `cmake-format`

--- cmake/Modules/FindAugeas.cmake
+++ cmake/Modules/FindAugeas.cmake
@@ -1,57 +1,51 @@
+# ~~~
 # Finds augeas and its libraries
 # Uses the same semantics as pkg_check_modules, i.e. LIBAUGEAS{_FOUND,_INCLUDE_DIR,_LIBRARIES}
 #
-# This is an adapted version of FindSystemd.cmake:
+# This is an adapted version of FindSystemd.cmake:
 # Copyright: Red Hat, Inc. 2013
 # Author: Martin Briza <mbriza@redhat.com>
 #
 # Distributed under the BSD license. See COPYING-CMAKE-SCRIPTS for details.
+# ~~~

 include (LibFindMacros)

-if (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES AND LIBAUGEAS_PREFIX)
-  # in cache already
-  set (LIBAUGEAS_FOUND TRUE)
+if (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES AND LIBAUGEAS_PREFIX) # in cache already
+	set (LIBAUGEAS_FOUND TRUE)
 else (LIBAUGEAS_INCLUDE_DIR)

-  # try to find libaugeas via pkg-config
-  find_package(PkgConfig)
+	# try to find libaugeas via pkg-config
+	find_package (PkgConfig)

-  if (PKG_CONFIG_FOUND)
-    pkg_check_modules(_LIBAUGEAS_PC QUIET "libaugeas")
-  endif (PKG_CONFIG_FOUND)
+	if (PKG_CONFIG_FOUND)
+		pkg_check_modules (_LIBAUGEAS_PC QUIET "libaugeas")
+	endif (PKG_CONFIG_FOUND)

-  find_path (LIBAUGEAS_INCLUDE_DIR augeas.h
-    ${_LIBAUGEAS_PC_INCLUDE_DIRS}
-    /usr/include
-    /usr/local/include
-  )
+	find_path (LIBAUGEAS_INCLUDE_DIR augeas.h ${_LIBAUGEAS_PC_INCLUDE_DIRS} /usr/include /usr/local/include)

-  pkg_get_variable (_LIBAUGEAS_PREFIX augeas prefix)
-  if (NOT _LIBAUGEAS_PREFIX)
-    set (_LIBAUGEAS_PREFIX "/usr")
-  endif ()
-  set (LIBAUGEAS_PREFIX "${_LIBAUGEAS_PREFIX}" CACHE INTERNAL "prefix path of libaugeas" FORCE)
+	pkg_get_variable (_LIBAUGEAS_PREFIX augeas prefix)
+	if (NOT _LIBAUGEAS_PREFIX)
+		set (_LIBAUGEAS_PREFIX "/usr")
+	endif ()
+	set (LIBAUGEAS_PREFIX "${_LIBAUGEAS_PREFIX}" CACHE INTERNAL "prefix path of libaugeas" FORCE)

-  find_library (LIBAUGEAS_LIBRARIES NAMES augeas
-    PATHS
-    ${_LIBAUGEAS_PC_LIBDIR}
-  )
+	find_library (LIBAUGEAS_LIBRARIES NAMES augeas PATHS ${_LIBAUGEAS_PC_LIBDIR})

-  if (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES)
-    set (LIBAUGEAS_FOUND TRUE)
-  endif (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES)
+	if (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES)
+		set (LIBAUGEAS_FOUND TRUE)
+	endif (LIBAUGEAS_INCLUDE_DIR AND LIBAUGEAS_LIBRARIES)

-  if (LIBAUGEAS_FOUND)
-    if (NOT LIBAUGEAS_FIND_QUIETLY)
-      message(STATUS "Found augeas: ${LIBAUGEAS_LIBRARIES}")
-    endif (NOT LIBAUGEAS_FIND_QUIETLY)
-  else (LIBAUGEAS_FOUND)
-    if (LIBAUGEAS_FIND_REQUIRED)
-      message(FATAL_ERROR "Could NOT find augeas")
-    endif (LIBAUGEAS_FIND_REQUIRED)
-  endif (LIBAUGEAS_FOUND)
+	if (LIBAUGEAS_FOUND)
+		if (NOT LIBAUGEAS_FIND_QUIETLY)
+			message (STATUS "Found augeas: ${LIBAUGEAS_LIBRARIES}")
+		endif (NOT LIBAUGEAS_FIND_QUIETLY)
+	else (LIBAUGEAS_FOUND)
+		if (LIBAUGEAS_FIND_REQUIRED)
+			message (FATAL_ERROR "Could NOT find augeas")
+		endif (LIBAUGEAS_FIND_REQUIRED)
+	endif (LIBAUGEAS_FOUND)

-  mark_as_advanced(LIBAUGEAS_INCLUDE_DIR LIBAUGEAS_LIBRARIES _LIBAUGEAS_PREFIX)
+	mark_as_advanced (LIBAUGEAS_INCLUDE_DIR LIBAUGEAS_LIBRARIES _LIBAUGEAS_PREFIX)

 endif ()


FindLAPACK: Hint LAPACK95_ROOT [skip ci]

--- cmake/Modules/FindLAPACK.cmake
+++ cmake/Modules/FindLAPACK.cmake
@@ -134,12 +134,12 @@
 if(LAPACK95 IN_LIST LAPACK_FIND_COMPONENTS)
   find_path(LAPACK95_INCLUDE_DIR
     NAMES f95_lapack.mod
-    HINTS ${LAPACK95_ROOT}
+    HINTS ${LAPACK95_ROOT} ENV LAPACK95_ROOT
     PATH_SUFFIXES include)

   find_library(LAPACK95_LIBRARY
     NAMES lapack95
-    HINTS ${LAPACK95_ROOT})
+    HINTS ${LAPACK95_ROOT} ENV LAPACK95_ROOT)

   if(NOT (LAPACK95_LIBRARY AND LAPACK95_INCLUDE_DIR))
     return()
@@ -251,9 +251,6 @@
 else()
   list(INSERT _mkl_libs 0 mkl_intel_${_mkl_bitflag}lp64)
 endif()
-
-# Note: Don't remove items from PATH_SUFFIXES unless you're extensively testing,
-# each path is there for a specific reason!

 foreach(s ${_mkl_libs})
   find_library(LAPACK_${s}_LIBRARY


forget to look in sub folder of include/openblas

--- cmake/OpenCVFindOpenBLAS.cmake
+++ cmake/OpenCVFindOpenBLAS.cmake
@@ -46,6 +46,7 @@
 SET(Open_BLAS_INCLUDE_SEARCH_PATHS
   $ENV{OpenBLAS_HOME}
   $ENV{OpenBLAS_HOME}/include
+  $ENV{OpenBLAS_HOME}/include/openblas
   /opt/OpenBLAS/include
   /usr/local/include/openblas
   /usr/include/openblas
@@ -103,4 +104,4 @@
     OpenBLAS_INCLUDE_DIR
     OpenBLAS_LIB
     OpenBLAS
-)+)


CMake: Make FindASSIMP.cmake more pretty

 - use DEAL_II_FIND_PATH to set up include directory
 - don't use tabs :-)

--- cmake/modules/FindASSIMP.cmake
+++ cmake/modules/FindASSIMP.cmake
@@ -26,21 +26,17 @@
 SET_IF_EMPTY(ASSIMP_DIR "$ENV{ASSIMP_DIR}")

 DEAL_II_FIND_LIBRARY(ASSIMP_LIB NAMES assimp
-	HINTS ${ASSIMP_DIR}
-	PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
+  HINTS ${ASSIMP_DIR}
+  PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
   )

-SET(ASSIMP_INC "${ASSIMP_DIR}/include")
+DEAL_II_FIND_PATH(ASSIMP_INC assimp/defs.h
+  HINTS ${ASSIMP_DIR}
+  )

 DEAL_II_PACKAGE_HANDLE(ASSIMP
-  LIBRARIES REQUIRED
-	ASSIMP_LIB
-	INCLUDE_DIRS
-	REQUIRED ASSIMP_INC
-	USER_INCLUDE_DIRS
-	REQUIRED ASSIMP_INC
-	CLEAR
-	ASSIMP_LIB
-	ASSIMP_INC
+  LIBRARIES REQUIRED ASSIMP_LIB
+  INCLUDE_DIRS REQUIRED ASSIMP_INC
+  USER_INCLUDE_DIRS REQUIRED ASSIMP_INC
+  CLEAR ASSIMP_LIB ASSIMP_INC
   )
-


Add hint for getting static GetDNS library on Windows.

--- cmake/modules/FindGetdns.cmake
+++ cmake/modules/FindGetdns.cmake
@@ -26,6 +26,14 @@
 ``GETDNS_VERSION``
   the version of the Getdns library found

+Hints
+^^^^^
+
+``GETDNS_DIR``
+  look here for a getdns install tree (include/ and lib/)
+``GETDNS_STATIC``
+  on Windows, find the static library.
+
 #]=======================================================================]

 find_path(GETDNS_INCLUDE_DIR getdns/getdns.h
@@ -34,11 +42,19 @@
   "${GETDNS_DIR}/include"
   )

-find_library(GETDNS_LIBRARY NAMES getdns libgetdns
-  HINTS
-  "${GETDNS_DIR}"
-  "${GETDNS_DIR}/lib"
-  )
+if (${GETDNS_STATIC} AND (WIN32 OR MINGW OR MSYS OR CYGWIN))
+  find_library(GETDNS_LIBRARY NAMES getdns_static
+    HINTS
+    "${GETDNS_DIR}"
+    "${GETDNS_DIR}/lib"
+    )
+else()
+  find_library(GETDNS_LIBRARY NAMES getdns libgetdns
+    HINTS
+    "${GETDNS_DIR}"
+    "${GETDNS_DIR}/lib"
+    )
+endif()

 set(GETDNS_LIBRARIES "")


cmake no longer needs to deal with -std=c++11 checks.

LLVM requires and handles this now and has the correct compiler
version checks. This block of code for cmake in LLDB is no longer
needed.

Summary: cmake no longer needs to deal with -std=c++11 checks.

Reviewers: labath

Subscribers: lldb-commits

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

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

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -88,32 +88,6 @@
 include_directories(../clang/include)
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")

-# lldb requires c++11 to build. Make sure that we have a compiler and standard
-# library combination that can do that.
-if (NOT MSVC)
-  # gcc and clang require the -std=c++0x or -std=c++11 flag.
-  if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
-      "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-    if (NOT ("${CMAKE_CXX_FLAGS}" MATCHES "-std=c\\+\\+0x" OR
-             "${CMAKE_CXX_FLAGS}" MATCHES "-std=gnu\\+\\+0x" OR
-             "${CMAKE_CXX_FLAGS}" MATCHES "-std=c\\+\\+11" OR
-             "${CMAKE_CXX_FLAGS}" MATCHES "-std=gnu\\+\\+11"))
-      if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
-          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-        else()
-          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-        endif()
-      else()
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-      endif()
-    endif()
-  endif()
-elseif (MSVC_VERSION LESS 1700)
-  message(FATAL_ERROR "The selected compiler does not support c++11 which is "
-          "required to build lldb.")
-endif()
-
 # Disable GCC warnings
 check_cxx_compiler_flag("-Wno-deprecated-declarations"
                         CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS)


Fixed static library and C++/D link error (Optlink requires .obj for C and D files not just D) Now passes all cmaked2 tests on windows using DMD (tested DMD2 only)

--- cmaked/CMakeDInformation.cmake
+++ cmaked/CMakeDInformation.cmake
@@ -29,6 +29,7 @@
 ENDIF(CMAKE_D_COMPILER_ID)

 # SET(CMAKE_D_OUTPUT_EXTENSION .o)
+SET(CMAKE_C_OUTPUT_EXTENSION_REPLACE TRUE )
 SET(CMAKE_D_OUTPUT_EXTENSION_REPLACE TRUE )

 SET(CMAKE_BASE_NAME)
@@ -165,6 +166,11 @@
 IF(NOT CMAKE_D_CREATE_SHARED_MODULE)
   SET(CMAKE_D_CREATE_SHARED_MODULE ${CMAKE_D_CREATE_SHARED_LIBRARY})
 ENDIF(NOT CMAKE_D_CREATE_SHARED_MODULE)
+IF(NOT CMAKE_D_CREATE_STATIC_LIBRARY)
+	SET(CMAKE_D_CREATE_STATIC_LIBRARY
+		"<CMAKE_D_COMPILER> -lib -v <OBJECTS> ${CMAKE_D_DASH_O}<TARGET>")
+ENDIF(NOT CMAKE_D_CREATE_STATIC_LIBRARY)
+

 # Create a static archive incrementally for large object file counts.
 # If CMAKE_D_CREATE_STATIC_LIBRARY is set it will override these.


Changed MITK-Data

Changed MITK-Data

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag af8a3ea5)
+  set(revision_tag 403cc83b)
 #                 ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Remove FLUIDSYNTH_API and FLUID_DEPRECATED macros from documentation

--- doc/Doxyfile.cmake
+++ doc/Doxyfile.cmake
@@ -195,12 +195,14 @@
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
 SEARCH_INCLUDES = YES
 INCLUDE_PATH =
 INCLUDE_FILE_PATTERNS =
-PREDEFINED = __DOXYGEN__
+PREDEFINED = __DOXYGEN__ \
+             FLUIDSYNTH_API \
+             FLUID_DEPRECATED
 EXPAND_AS_DEFINED =
 SKIP_FUNCTION_MACROS = YES
 #---------------------------------------------------------------------------


src/config.h.cmake: Remove obsolete unused define

--- src/config.h.cmake
+++ src/config.h.cmake
@@ -258,9 +258,6 @@

 /* The size of `wchar_t', as computed by sizeof. */
 @SIZEOF_WCHAR_T_CODE@
-
-/* Define to 1 if you have the ANSI C header files. */
-#cmakedefine01 STDC_HEADERS

 /* Set to long if unknown. */
 #define TYPEOF_SF_COUNT_T @TYPEOF_SF_COUNT_T@


Actualize information on /download.html page of web-site

--- doc/www-data.in/download.cmake
+++ doc/www-data.in/download.cmake
@@ -62,9 +62,9 @@
     sudo apt-get update
     sudo apt-get install tarantool tarantool-client

-### CentOS 5-6 GNU/Linux
-
-CentOS GNU/Linux repository is available at
+### CentOS 5-6 and RHEL 5-6
+
+CentOS repository is available at
 http://tarantool.org/dist/centos.

 Add the following section to your yum repository list (/etc/yum.repos.d/tarantool.repo)
@@ -76,47 +76,20 @@
     enabled=1
     gpgcheck=0

-### Standalone packages for RedHat, FreeBSD, Mac OS X
+### Gentoo Linux
+
+Tarantool is available from `tarantool` portage overlay. Use
+[layman](http://wiki.gentoo.org/wiki/Layman) to add the overlay to your system:
+
+    # layman -S
+    # layman -a tarantool
+    # emerge dev-db/tarantool -av
+
+### Other Linux distributions

-
-
-
-  RedHat
-
-

-
-        RedHat .rpm
-
-
-
-        32-bit
-
-
-
-        64-bit
-
-

-
-

-
-        RedHat .rpm, with debug info
-
-
-        32-bit
-
-
-
-        64-bit
-
-

-

-  Other Linux distributions
-
+  Static builds for Linux

         Binary tarball (.tar.gz)
@@ -129,30 +102,22 @@
         64-bit

-
-  FreeBSD
-
-
-
-

-
-        Binary tarball (.tar.gz)
-
-
-        32-bit
-
-
-
-
-

-  Mac OS X
-

-    brew install http://tarantool.org/dist/tarantool.rb
-

-

+### FreeBSD
+
+Tarantool is available from the FreeBSD Ports collection
+(`databases/tarantool`).
+
+### OS X
+
+You can install Tarantool using homebrew:
+
+    $ brew install --use-clang http://tarantool.org/dist/tarantool.rb
+
+Please upgrade `clang` to version 3.2 or later using
+```Command Line Tools for Xcode``` disk image version 4.6+ from
+[Apple Developer](https://developer.apple.com/downloads/) web-site.

 # Development branch

@@ -171,6 +136,8 @@
 - PHP driver, [https://github.com/tarantool/tarantool-php](https://github.com/tarantool/tarantool-php)
 - node.js driver,
   [https://github.com/devgru/node-tarantool](https://github.com/devgru/node-tarantool)
+- Erlang driver,
+  [https://github.com/rtsisyk/etarantool](https://github.com/rtsisyk/etarantool)
 - C connector [is maintained in the server source tree](https://github.com/tarantool/tarantool/blob/master/connector/c)

 {% page download ru %}


Sensable: search OpenHaptics in more places

Former-commit-id: 55c65ac903073529de5177a7c212b61ead0a1ed1

--- applications/plugins/Sensable/FindOpenHaptics.cmake
+++ applications/plugins/Sensable/FindOpenHaptics.cmake
@@ -26,6 +26,7 @@
 FIND_PATH(OPENHAPTICS_UTIL_INCLUDE_DIR NAMES HDU/hdu.h
     HINTS $ENV{3DTOUCH_BASE}/utilities/include
     $ENV{OH_SDK_BASE}/utilities/include
+    $ENV{OH_SDK_BASE}/include
     "${program_files_path}/SensAble/3DTouch/utilities/include"
     DOC "Path in which the files HDU/hdu.h are located." )
 MARK_AS_ADVANCED(OPENHAPTICS_UTIL_INCLUDE_DIR)
@@ -34,6 +35,7 @@
 SET( OPENHAPTICS_LIBRARY_DIRECTORIES $ENV{3DTOUCH_BASE}/lib        # OpenHaptics 2.0
     $ENV{3DTOUCH_BASE}/lib/${LIB}  # OpenHaptics 3.0
     $ENV{OH_SDK_BASE}/lib        # OpenHaptics 2.0
+    $ENV{OH_SDK_BASE}/lib64
     $ENV{OH_SDK_BASE}/lib/${LIB}  # OpenHaptics 3.0
     $ENV{OH_SDK_BASE}/lib/${LIB}/Release
     $ENV{OH_SDK_BASE}/lib/${LIB}/ReleaseAcademicEdition
@@ -59,6 +61,7 @@
     $ENV{3DTOUCH_BASE}/utilities/lib/${LIB}/Release  # OpenHaptics 3.0
     $ENV{OH_SDK_BASE}/utilities/lib        # OpenHaptics 2.0
     $ENV{OH_SDK_BASE}/utilities/lib/${LIB}/Release  # OpenHaptics 3.0
+    $ENV{OH_SDK_BASE}/lib64
     "${program_files_path}/SensAble/3DTouch/utilities/lib"        # OpenHaptics 2.0
     "${program_files_path}/SensAble/3DTouch/utilities/lib/${LIB}/Release"  # OpenHaptics 3.0
     "/usr/lib64"


flags/hidden: modify HUNTER_TOOLCHAIN_UNDETECTABLE_ID

--- flags/hidden.cmake
+++ flags/hidden.cmake
@@ -11,3 +11,7 @@

 polly_add_cache_flag(CMAKE_CXX_FLAGS "-fvisibility=hidden")
 polly_add_cache_flag(CMAKE_CXX_FLAGS "-fvisibility-inlines-hidden")
+
+# There is no macro to detect this flags on toolchain calculation so we must
+# mark this toolchain explicitly.
+list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "hidden")


ilastik: Updated default git tag.

ilastik: Updated default git tag.

--- ilastik.cmake
+++ ilastik.cmake
@@ -31,7 +31,7 @@
 include (scikit-learn)

 # select the desired ilastik commit
-set(DEFAULT_ILASTIK_VERSION "20131203")
+set(DEFAULT_ILASTIK_VERSION "20131205")
 IF(NOT DEFINED ILASTIK_VERSION)
     SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}")
 ENDIF()


adjusted cmake project file to not check for gams when building gams

--- include.cmake
+++ include.cmake
@@ -37,13 +37,12 @@
 set(GAMS_DISTRIB_C_API "${GAMS_DISTRIB}/apifiles/C/api")
 set(GAMS_DISTRIB_CPP_API "${GAMS_DISTRIB}/apifiles/C++/api")

-if (NOT EXISTS ${GAMS_DISTRIB_C_API})
-    message(FATAL_ERROR "No GAMS found in path ${GAMS_DISTRIB}. GAMS is required to compile the C++ API.
-Please adjust ${CMAKE_SOURCE_DIR}/gamsinclude.txt to point to your GAMS installation.")
-endif()
-
 # create variable GAMSPATH from gamsinclude.txt
 if("$ENV{GAMS_BUILD}" STREQUAL "")
+    if (NOT EXISTS ${GAMS_DISTRIB_C_API})
+        message(FATAL_ERROR "No GAMS found in path ${GAMS_DISTRIB}. GAMS is required to compile the C++ API.
+            Please adjust ${CMAKE_SOURCE_DIR}/gamsinclude.txt to point to your GAMS installation.")
+    endif()
     file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/../gamsinclude.txt" GAMSINCLUDE LIMIT_COUNT 1)
     string(REGEX MATCH "[^=]+$" GAMSPATH ${GAMSINCLUDE})
 else()


python: add special targets gen_opencv_python2(3)

--- modules/python/common.cmake
+++ modules/python/common.cmake
@@ -48,17 +48,28 @@
     "${CMAKE_CURRENT_BINARY_DIR}/pyopencv_generated_funcs.h"
     "${CMAKE_CURRENT_BINARY_DIR}/pyopencv_generated_types.h"
     "${CMAKE_CURRENT_BINARY_DIR}/pyopencv_generated_type_reg.h"
-    "${CMAKE_CURRENT_BINARY_DIR}/pyopencv_generated_ns_reg.h")
+    "${CMAKE_CURRENT_BINARY_DIR}/pyopencv_generated_ns_reg.h"
+)
+
+set(OPENCV_${PYTHON}_SIGNATURES_FILE "${CMAKE_CURRENT_BINARY_DIR}/pyopencv_signatures.json" CACHE INTERNAL "")
+
+set(cv2_generated_files ${cv2_generated_hdrs}
+    "${OPENCV_${PYTHON}_SIGNATURES_FILE}"
+)

 string(REPLACE ";" "\n" opencv_hdrs_ "${opencv_hdrs}")
 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/headers.txt" "${opencv_hdrs_}")
 add_custom_command(
-   OUTPUT ${cv2_generated_hdrs}
-   COMMAND ${PYTHON_DEFAULT_EXECUTABLE} "${PYTHON_SOURCE_DIR}/src2/gen2.py" ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/headers.txt" "${PYTHON}"
-   DEPENDS ${PYTHON_SOURCE_DIR}/src2/gen2.py
-   DEPENDS ${PYTHON_SOURCE_DIR}/src2/hdr_parser.py
-   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/headers.txt
-   DEPENDS ${opencv_hdrs})
+    OUTPUT ${cv2_generated_files}
+    COMMAND ${PYTHON_DEFAULT_EXECUTABLE} "${PYTHON_SOURCE_DIR}/src2/gen2.py" ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/headers.txt" "${PYTHON}"
+    DEPENDS ${PYTHON_SOURCE_DIR}/src2/gen2.py
+    DEPENDS ${PYTHON_SOURCE_DIR}/src2/hdr_parser.py
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/headers.txt
+    DEPENDS ${opencv_hdrs}
+    COMMENT "Generate files for ${the_module}"
+)
+
+add_custom_target(gen_${the_module} DEPENDS ${cv2_generated_files})

 set(cv2_custom_hdr "${CMAKE_CURRENT_BINARY_DIR}/pyopencv_custom_headers.h")
 file(WRITE ${cv2_custom_hdr} "//user-defined headers\n")
@@ -67,6 +78,7 @@
 endforeach(uh)

 ocv_add_library(${the_module} MODULE ${PYTHON_SOURCE_DIR}/src2/cv2.cpp ${cv2_generated_hdrs} ${opencv_userdef_hdrs} ${cv2_custom_hdr})
+add_dependencies(${the_module} gen_${the_module})

 if(APPLE)
   set_target_properties(${the_module} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")


Add CMake support for export decoration

Add CMake support for export decoration

Teach `lcm_wrap_types` a new `C_EXPORT` option to leverage the newly
added ability of lcmgen to do export decoration. This is intended to be
used with `generate_export_header`.

--- lcm-cmake/lcmUtilities.cmake
+++ lcm-cmake/lcmUtilities.cmake
@@ -1,6 +1,7 @@
 # Usage:
 #   lcm_wrap_types([C_HEADERS <VARIABLE_NAME> C_SOURCES <VARIABLE_NAME>
-#                   [C_INCLUDE <PATH>] [C_NOPUBSUB] [C_TYPEINFO]]
+#                   [C_INCLUDE <PATH>] [C_EXPORT <NAME>]
+#                   [C_NOPUBSUB] [C_TYPEINFO]]
 #                  [CPP_HEADERS <VARIABLE_NAME>
 #                   [CPP_INCLUDE <PATH>] [CPP11]]
 #                  [JAVA_SOURCES <VARIABLE_NAME>]
@@ -150,7 +151,7 @@
     CREATE_CPP_AGGREGATE_HEADER
   )
   set(_sv_opts
-    C_HEADERS C_SOURCES C_INCLUDE
+    C_HEADERS C_SOURCES C_INCLUDE C_EXPORT
     CPP_HEADERS CPP_INCLUDE
     JAVA_SOURCES
     PYTHON_SOURCES
@@ -193,6 +194,11 @@
   set(_args "")
   if(DEFINED _C_HEADERS)
     list(APPEND _args --c --c-cpath ${_DESTINATION} --c-hpath ${_DESTINATION})
+    if(DEFINED _C_EXPORT)
+      string(TOUPPER "${_C_EXPORT}_EXPORT" _C_EXPORT_SYMBOL)
+      list(APPEND _args --c-export-symbol ${_C_EXPORT_SYMBOL})
+      list(APPEND _args --c-export-include "${_C_EXPORT}_export.h")
+    endif()
     if(DEFINED _C_INCLUDE)
       list(APPEND _args --cinclude ${_C_INCLUDE})
     endif()


Add Python install helper

Add Python install helper

Add a CMake function to our exported utilities to install Python files.
Specifically, this picks a reasonable default DESTINATION and preserves
subdirectory components of files to be installed.

--- lcm-cmake/lcmUtilities.cmake
+++ lcm-cmake/lcmUtilities.cmake
@@ -8,6 +8,9 @@
 #                  [DESTIONATION <PATH>]
 #                  <FILE> [<FILE>...])
 #     generate bindings for specified LCM type definition files
+#
+#   lcm_install_python([DESTINATION <PATH>]
+#                      <FILE> [<FILE>...])

 cmake_minimum_required(VERSION 2.8.3)
 include(CMakeParseArguments)
@@ -241,3 +244,33 @@
   _lcm_export(_CPP_HEADERS)
   _lcm_export(_PYTHON_SOURCES)
 endfunction()
+
+#------------------------------------------------------------------------------
+function(lcm_install_python)
+  # Parse arguments
+  set(_flags "")
+  set(_sv_opts DESTINATION RELATIVE_PATH)
+  set(_mv_opts "")
+  cmake_parse_arguments("" "${_flags}" "${_sv_opts}" "${_mv_opts}" ${ARGN})
+
+  # Set default destination and relative path, if none given
+  if(NOT DEFINED _DESTINATION)
+    if(NOT PYTHONINTERP_FOUND)
+      message(SEND_ERROR
+        "lcm_install_python: no DESTINATION given"
+        " and no Python interpreter found (required to guess DESTINATION)")
+      return()
+    endif()
+    set(_pyshort python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+    set(_DESTINATION lib${LIB_SUFFIX}/${_pyshort}/site-packages)
+  endif()
+  if(NOT DEFINED _RELATIVE_PATH)
+    set(_RELATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+  endif()
+
+  foreach(_file ${_UNPARSED_ARGUMENTS})
+    file(RELATIVE_PATH _package_dir ${_RELATIVE_PATH} ${_file})
+    get_filename_component(_package_dir ${_package_dir} PATH)
+    install(FILES ${_file} DESTINATION ${_DESTINATION}/${_package_dir})
+  endforeach()
+endfunction()


set ATLAS_FOUND

set ATLAS_FOUND

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

--- Numerics/cmake/FindBLAS.cmake
+++ Numerics/cmake/FindBLAS.cmake
@@ -93,7 +93,7 @@
   "cblas;f77blas;atlas"
   )
   if (BLAS_LIBRARIES)
-    set (ATLAS_FOUND)
+    set (ATLAS_FOUND TRUE)
   endif(BLAS_LIBRARIES)
 endif(NOT BLAS_LIBRARIES)


SWDEV-273235 - Fix warning in the cmake build

Change-Id: I8f9d51ea676cb015abf47a2998fa053c2d4a6e81

--- rocclr/cmake/FindROCclr.cmake
+++ rocclr/cmake/FindROCclr.cmake
@@ -42,7 +42,7 @@
     include)

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(ROCCLR
+find_package_handle_standard_args(ROCclr
   "\nROCclr not found"
   ROCCLR_INCLUDE_DIR)
 mark_as_advanced(ROCCLR_INCLUDE_DIR)


CMake: check_xml() macro: depend on XSD too

macro is used for not rerunning the check if nothing changed.

--- cmake/Modules/run-xmllint.cmake
+++ cmake/Modules/run-xmllint.cmake
@@ -9,7 +9,7 @@
     OUTPUT  ${TOUCH}
     COMMAND ${Xmllint_BIN} --nonet --valid --noout --schema ${XSD} ${XML}
     COMMAND ${CMAKE_COMMAND} -E touch ${TOUCH} # will be empty!
-    DEPENDS ${XML}
+    DEPENDS ${XML} ${XSD}
     COMMENT "Checking validity of ${FILENAME}"
   )


Removed unecessary CMake comment

Removed unecessary CMake comment

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

--- cmake/OpenVDBHoudiniSetup.cmake
+++ cmake/OpenVDBHoudiniSetup.cmake
@@ -328,7 +328,6 @@
 elseif(Houdini_VERSION VERSION_LESS 18)
   set(OPENVDB_HOUDINI_ABI 5)
 else()
-  # Anticipated ABI version for H18
   set(OPENVDB_HOUDINI_ABI 6)
 endif()


Hmm, ok, to use @rpath on Mac OS X (for an OpenCOR plugin's dependencies on one or several other OpenCOR plugins) seems to require a bit more work which is not documented at http://doc.qt.nokia.com/latest/deployment-mac.html, so… reverting to @executable_path

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -296,13 +296,13 @@

     IF(APPLE)
         ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
-                           COMMAND install_name_tool -id @rpath/PlugIns/${MAIN_PROJECT_NAME}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
+                           COMMAND install_name_tool -id @executable_path/../PlugIns/${MAIN_PROJECT_NAME}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
                                                          ${MAC_OS_X_PROJECT_BINARY_DIR}/Contents/PlugIns/${MAIN_PROJECT_NAME}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})

         FOREACH(OPENCOR_DEPENDENCY ${OPENCOR_DEPENDENCIES})
             ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
                                COMMAND install_name_tool -change ${MAC_OS_X_PROJECT_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${OPENCOR_DEPENDENCY}${CMAKE_SHARED_LIBRARY_SUFFIX}
-                                                                 @rpath/PlugIns/${MAIN_PROJECT_NAME}/${CMAKE_SHARED_LIBRARY_PREFIX}${OPENCOR_DEPENDENCY}${CMAKE_SHARED_LIBRARY_SUFFIX}
+                                                                 @executable_path/../PlugIns/${MAIN_PROJECT_NAME}/${CMAKE_SHARED_LIBRARY_PREFIX}${OPENCOR_DEPENDENCY}${CMAKE_SHARED_LIBRARY_SUFFIX}
                                                                  ${MAC_OS_X_PROJECT_BINARY_DIR}/Contents/PlugIns/${MAIN_PROJECT_NAME}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
         ENDFOREACH()
     ENDIF()
@@ -434,6 +434,6 @@
     SET(PLUGIN_FILE ${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN}${CMAKE_SHARED_LIBRARY_SUFFIX})

     ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
-                       COMMAND install_name_tool -id @rpath/PlugIns/${PLUGIN_DIR}/${PLUGIN_FILE}
+                       COMMAND install_name_tool -id @executable_path/../PlugIns/${PLUGIN_DIR}/${PLUGIN_FILE}
                                                      ${MAC_OS_X_PROJECT_BINARY_DIR}/Contents/PlugIns/${PLUGIN_DIR}/${PLUGIN_FILE})
 ENDMACRO()


Oops, forgot to undo something!

Oops, forgot to undo something!

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -121,7 +121,7 @@
         IF(DEBUG_MODE)
             SET(DISTRIB_BINARY_DIR ${DISTRIB_DIR}/debug)
         ELSE()
-            SET(DISTRIB_BINARY_DIR ${DISTRIB_DIR}/debug)
+            SET(DISTRIB_BINARY_DIR ${DISTRIB_DIR}/release)
         ENDIF()
     ELSE()
         SET(DISTRIB_BINARY_DIR ${DISTRIB_DIR})


Removed LibCSS, MSVC 2015 still can't deal with C99 code (enum)

--- cmake/libcss.cmake
+++ cmake/libcss.cmake
@@ -1,18 +0,0 @@
-# Copyright 2015 AeonGames, Rodrigo Hernandez
-# Licensed under the terms of the Apache 2.0 License.
-if(NOT EXISTS "${CMAKE_SOURCE_DIR}/libcss-0.5.0-src.tar.gz")
-	message(STATUS "Downloading libcss...")
-	file(DOWNLOAD "http://download.netsurf-browser.org/libs/releases/libcss-0.5.0-src.tar.gz" "${CMAKE_SOURCE_DIR}/libcss-0.5.0-src.tar.gz" STATUS libcss_dl_status LOG libcss_dl_log SHOW_PROGRESS)
-	if(NOT libcss_dl_status MATCHES "0;\"No error\"")
-		message("Download failed, did you set a proxy? ${libcss_dl_status}")
-		file(REMOVE "${CMAKE_SOURCE_DIR}/libcss-0.5.0-src.tar.gz")
-	endif()
-	message(STATUS "Done downloading libcss")
-endif()
-if(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/libcss-0.5.0")
-	message(STATUS "Extracting libcss...")
-	execute_process(COMMAND cmake -E tar xzvf libcss-0.5.0-src.tar.gz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ERROR_VARIABLE extract_result)
-	message(STATUS "Extract Result ${extract_result}")
-else()
-	#TODO Set projects
-endif()


build: luajit: macos: Handle macOS Monterey

Signed-off-by: Hiroshi Hatake <a476a6e5b5893650242fbf0b2961500a9bd9032e@calyptia.com>

--- cmake/luajit.cmake
+++ cmake/luajit.cmake
@@ -14,7 +14,7 @@
 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   set(CFLAGS "${CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT} -fno-stack-check")
   if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 20
-      AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 21)
+      AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 22)
     set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=11.0")
   else()
     set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=10.15")
@@ -30,7 +30,7 @@
   EXCLUDE_FROM_ALL TRUE
   SOURCE_DIR ${LUAJIT_SRC}
   CONFIGURE_COMMAND ./configure
-  BUILD_COMMAND $(MAKE) CC=${CMAKE_C_COMPILER} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC"
+  BUILD_COMMAND $(MAKE) CC=${CMAKE_C_COMPILER} ${DEPLOYMENT_TARGET} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC"
   INSTALL_COMMAND cp src/libluajit.a "${LUAJIT_DEST}/lib/libluajit.a")

 # luajit (Windows)


cmake: fix compiler flags filtering

cmake: fix compiler flags filtering

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -508,7 +508,7 @@
       foreach(var ${_flag_vars})
         foreach(warning ${_gxx_warnings})
           if(NOT warning MATCHES "^-Wno-")
-            string(REGEX REPLACE "${warning}(=[^ ]*)?" "" ${var} "${${var}}")
+            string(REGEX REPLACE "(^|[ ]+)${warning}(=[^ ]*)?([ ]+|$)" " " ${var} "${${var}}")
             string(REPLACE "-W" "-Wno-" warning "${warning}")
           endif()
           ocv_check_flag_support(${var} "${warning}" _varname "")


cmake: Cannot run an executable when cross compiling.

check_c_source_compiles compiles and links an executable

--- cmake/CheckCLinkerFlag.cmake
+++ cmake/CheckCLinkerFlag.cmake
@@ -1,9 +1,9 @@
 include(CMakePushCheckState)
-include(CheckCSourceRuns)
+include(CheckCSourceCompiles)

 macro(CHECK_C_LINKER_FLAG _FLAG _RESULT)
     cmake_push_check_state(RESET)
     set(CMAKE_REQUIRED_FLAGS "${_FLAG}")
-    check_c_source_runs("int main() { return 0;}" ${_RESULT})
+    check_c_source_compiles("int main() { return 0;}" ${_RESULT})
     cmake_pop_check_state()
 endmacro(CHECK_C_LINKER_FLAG)


cpack packaging bug

cpack packaging bug

garbage at end of dpkg description

--- cmake/ElektraPackaging.cmake
+++ cmake/ElektraPackaging.cmake
@@ -12,7 +12,7 @@
 set (CPACK_DEBIAN_PACKAGE_VERSION "${PROJECT_VERSION}")

 set (PACKAGE_DESCRIPTION "Elektra provides a universal and secure framework to store configuration parameters in a global, hierarchical key database. The core is a small library implemented in C. The plugin-based framework fulfills many configuration-related tasks to avoid any unnecessary code duplication across applications while it still allows the core to stay without any external dependency.  Elektra abstracts from cross-platform-related issues with an consistent API, and allows applications to be aware of other applications' configurations, leveraging easy application integration.")
-set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE_DESCRIPTION}"})
+set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE_DESCRIPTION}")
 set (CPACK_PACKAGE_CONTACT "${PACKAGE_URL}")
 set (CPACK_SOURCE_IGNORE_FILES
 	"/.cvsignore"


Fix checksum

Fix checksum

--- cmake/LIEFDependencies.cmake
+++ cmake/LIEFDependencies.cmake
@@ -166,7 +166,7 @@
   target_include_directories(lief_spdlog SYSTEM INTERFACE ${SPDLOG_INC_DIR})
 else()
   set(SPDLOG_VERSION 1.10.0)
-  set(SPDLOG_SHA256 SHA256=130bd593c33e2e2abba095b551db6a05f5e4a5a19c03ab31256c38fa218aa0a6)
+  set(SPDLOG_SHA256 SHA256=7be28ff05d32a8a11cfba94381e820dd2842835f7f319f843993101bcab44b66)
   set(SPDLOG_URL "${THIRD_PARTY_DIRECTORY}/spdlog-${SPDLOG_VERSION}.zip" CACHE STRING "URL to the spdlog source")
   ExternalProject_Add(lief_spdlog_project
     URL               ${SPDLOG_URL}


cmake: fix LAPACK/MKL detection

cmake: fix LAPACK/MKL detection

--- cmake/OpenCVFindLAPACK.cmake
+++ cmake/OpenCVFindLAPACK.cmake
@@ -121,23 +121,22 @@
         set(LAPACK_IMPL         "LAPACK/MKL")
         ocv_lapack_check()
       endif()
-      if(LAPACKE_INCLUDE_DIR AND NOT HAVE_LAPACK)
-        set(LAPACK_INCLUDE_DIR  ${LAPACKE_INCLUDE_DIR})
-        set(LAPACK_CBLAS_H      "cblas.h")
-        set(LAPACK_LAPACKE_H    "lapacke.h")
-        set(LAPACK_IMPL         "LAPACK/Generic")
-        ocv_lapack_check()
-      elseif(APPLE)
-        set(LAPACK_CBLAS_H      "Accelerate/Accelerate.h")
-        set(LAPACK_LAPACKE_H    "Accelerate/Accelerate.h")
-        set(LAPACK_IMPL         "LAPACK/Apple")
-        ocv_lapack_check()
-      else()
-        unset(LAPACK_LIBRARIES)
-        unset(LAPACK_LIBRARIES CACHE)
+      if(NOT HAVE_LAPACK)
+        if(LAPACKE_INCLUDE_DIR)
+          set(LAPACK_INCLUDE_DIR  ${LAPACKE_INCLUDE_DIR})
+          set(LAPACK_CBLAS_H      "cblas.h")
+          set(LAPACK_LAPACKE_H    "lapacke.h")
+          set(LAPACK_IMPL         "LAPACK/Generic")
+          ocv_lapack_check()
+        elseif(APPLE)
+          set(LAPACK_CBLAS_H      "Accelerate/Accelerate.h")
+          set(LAPACK_LAPACKE_H    "Accelerate/Accelerate.h")
+          set(LAPACK_IMPL         "LAPACK/Apple")
+          ocv_lapack_check()
+        endif()
       endif()
-    else()
-      # LAPACK not found
+    endif()
+    if(NOT HAVE_LAPACK)
       unset(LAPACK_LIBRARIES)
       unset(LAPACK_LIBRARIES CACHE)
     endif()


cmake: Do not use visibility attribute with GCC on Tru64

Closes #67.

--- cmake/VisibilityDetect.cmake
+++ cmake/VisibilityDetect.cmake
@@ -7,10 +7,11 @@

         # Check GCC
         check_c_source_compiles ("int main () {
-                                        #if (__GNUC__ >= 4) && !defined(_CRAYC) && \\\\
-                                            !defined(__sun)  && !defined(sun)  && \\\\
-                                            !defined(__hpux) && !defined(hpux) && \\\\
-                                            !defined(__sgi)  && !defined(sgi)  && \\\\
+                                        #if (__GNUC__ >= 4)   && !defined(_CRAYC) && \\\\
+                                            !defined(__sun)   && !defined(sun)    && \\\\
+                                            !defined(__hpux)  && !defined(hpux)   && \\\\
+                                            !defined(__sgi)   && !defined(sgi)    && \\\\
+                                            !defined(__osf__) && !defined(__osf)  && \\\\
                                             !defined(_AIX)   && !defined(__CYGWIN__) && !defined(__MSYS__)
                                         return 0;
                                         #else


Add flag required for orc detection

Add flag required for orc detection

--- cmake/embed/embed_llvm.cmake
+++ cmake/embed/embed_llvm.cmake
@@ -21,14 +21,17 @@

 if(${LLVM_VERSION} VERSION_GREATER_EQUAL "9")
   set(LLVM_FULL_VERSION "9.0.1")
+  set(LLVM_VERSION_MAJOR "9")
   set(LLVM_DOWNLOAD_URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_FULL_VERSION}/llvm-${LLVM_FULL_VERSION}.src.tar.xz")
   set(LLVM_URL_CHECKSUM "SHA256=00a1ee1f389f81e9979f3a640a01c431b3021de0d42278f6508391a2f0b81c9a")
 elseif(${LLVM_VERSION} VERSION_GREATER_EQUAL "8")
   set(LLVM_FULL_VERSION "8.0.1")
+  set(LLVM_VERSION_MAJOR "8")
   set(LLVM_DOWNLOAD_URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_FULL_VERSION}/llvm-${LLVM_FULL_VERSION}.src.tar.xz")
   set(LLVM_URL_CHECKSUM "SHA256=44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7")
 elseif(${LLVM_VERSION} VERSION_GREATER_EQUAL "7")
   set(LLVM_FULL_VERSION "7.1.0")
+  set(LLVM_VERSION_MAJOR "7")
   set(LLVM_DOWNLOAD_URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_FULL_VERSION}/llvm-${LLVM_FULL_VERSION}.src.tar.xz")
   set(LLVM_URL_CHECKSUM "SHA256=1bcc9b285074ded87b88faaedddb88e6b5d6c331dfcfb57d7f3393dd622b3764")
 else()


Consolidate common fuse-ld linker flag setting in AddSwift

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -358,6 +358,16 @@
   if(NOT "${SWIFT_${LFLAGS_SDK}_ICU_I18N}" STREQUAL "")
     list(APPEND library_search_directories "${SWIFT_${sdk}_ICU_I18N}")
   endif()
+
+  if(SWIFT_ENABLE_GOLD_LINKER AND
+     "${SWIFT_SDK_${LFLAGS_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
+    list(APPEND result "-fuse-ld=gold")
+  endif()
+  if(SWIFT_ENABLE_LLD_LINKER OR
+     ("${LFLAGS_SDK}" STREQUAL "WINDOWS" AND
+      NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WINDOWS"))
+    list(APPEND result "-fuse-ld=lld")
+  endif()

   set("${LFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)
   set("${LFLAGS_LIBRARY_SEARCH_DIRECTORIES_VAR_NAME}" "${library_search_directories}" PARENT_SCOPE)
@@ -1065,16 +1075,6 @@
     RESULT_VAR_NAME link_flags
     LIBRARY_SEARCH_DIRECTORIES_VAR_NAME library_search_directories
       )
-
-  if(SWIFT_ENABLE_GOLD_LINKER AND
-     "${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
-    list(APPEND link_flags "-fuse-ld=gold")
-  endif()
-  if(SWIFT_ENABLE_LLD_LINKER OR
-     ("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS" AND
-      NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WINDOWS"))
-    list(APPEND link_flags "-fuse-ld=lld")
-  endif()

   # Configure plist creation for OS X.
   set(PLIST_INFO_PLIST "Info.plist" CACHE STRING "Plist name")
@@ -1825,16 +1825,6 @@
         "-Xlinker" "@executable_path/../lib/swift/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}")
   endif()

-  if(SWIFT_ENABLE_GOLD_LINKER AND
-     "${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
-    list(APPEND link_flags "-fuse-ld=gold")
-  endif()
-  if(SWIFT_ENABLE_LLD_LINKER OR
-     ("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS" AND
-      NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WINDOWS"))
-    list(APPEND link_flags "-fuse-ld=lld")
-  endif()
-
   # Find the names of dependency library targets.
   #
   # We don't add the ${ARCH} to the target suffix because we want to link


Fix build break on windows arm64 (#8361)


Added cmake variable TUDAT_FORCE_DYNAMIC_RUNTIME for MSVC conda

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -113,23 +113,35 @@
          # MinGW gives some c11plus.xe out of memory messages:
          # http://sourceforge.net/p/mingw-w64/mailman/message/33182613/
          set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrack-macro-expansion=0")
-#         set(CMAKE_EXE_LINKER_FLAGS "-Wl,--large-address-aware")
+         #         set(CMAKE_EXE_LINKER_FLAGS "-Wl,--large-address-aware")
      endif ()

  elseif (TUDAT_BUILD_MSVC)
      add_compile_definitions(TUDAT_BUILD_MSVC)
      message(STATUS "Using MSVC compiler.")
      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /Ox /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
-     # Because we are using static boost libraries, with static runtime, we need to force MSVC to
-     # also use static runtime: (from http://www.cmake.org/Wiki/CMake_FAQ#Dynamic_Replace).
-     foreach (flag_var
-             CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
-             CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
-         # Find all dynamic runtime (MD) references and replace with static (MT)
-         if (${flag_var} MATCHES "/MD")
-             string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
-         endif (${flag_var} MATCHES "/MD")
-     endforeach (flag_var)
+     if (TUDAT_FORCE_DYNAMIC_RUNTIME)
+         # This is needed for conda builds, as the prebuilt libraries are MD.
+         foreach (flag_var
+                 CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+                 CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+             # Find all dynamic runtime (MD) references and replace with static (MT)
+             set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MD")
+             message(STATUS "Forcing MD_DynamicRuntime on MSVC")
+         endforeach (flag_var)
+     else ()
+         # The following applied to legacy Tudat.
+         # Because we are using static boost libraries, with static runtime, we need to force MSVC to
+         # also use static runtime: (from http://www.cmake.org/Wiki/CMake_FAQ#Dynamic_Replace).
+         foreach (flag_var
+                 CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+                 CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+             # Find all dynamic runtime (MD) references and replace with static (MT)
+             if (${flag_var} MATCHES "/MD")
+                 string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+             endif (${flag_var} MATCHES "/MD")
+         endforeach (flag_var)
+     endif ()
      if (MSVC_VERSION GREATER 1500)
          # Multiprocessor support during compilation
          add_definitions("/MP")


Clarify the backward compatibility policy.

--- doc/www-data.in/download.cmake
+++ doc/www-data.in/download.cmake
@@ -4,9 +4,9 @@

 Tarantool/Box uses a 3-digit versioning scheme
 <major>-<minor>-<patch>.
-Major digits change rarely. A minor version increase
-indicates an incompatibile change. Minor version change happens
-when the source tree receives a few important bugfixes.
+Major digits change rarely. A minor version increase indicates one
+or few incompatibile changes. Patch verison counter is increased
+whenever the source tree receives a few important bugfixes.

 The version string may also contain a git revision id, to ease
 identification of the unqiue commit used to generate the build.


Add OpenCV_DIR variable to CMake cache also if library not found so user can specify it.

--- config/FindOpenCV.cmake
+++ config/FindOpenCV.cmake
@@ -60,6 +60,8 @@
     set (OpenCV_DIR "$ENV{OpenCV_DIR}" CACHE PATH "Installation prefix of OpenCV Library." FORCE)
   elseif (DEFINED ENV{OPENCV_DIR})
     set (OpenCV_DIR "$ENV{OPENCV_DIR}" CACHE PATH "Installation prefix of OpenCV Library." FORCE)
+  else ()
+    set (OpenCV_DIR "OpenCV_DIR-NOTFOUND" CACHE PATH "Installation prefix of OpenCV Library." FORCE)
   endif ()
 endif ()
 # 2. otherwise, try to derive it from include path


Bazel/CMake: create compilation database by default

If on Windows and not in developer mode, the creation of the symbolic
link can be skipped by setting `CREATE_COMPILATION_DATABASE_LINK` to
`OFF`.

--- misc/bazel/cmake/setup.cmake
+++ misc/bazel/cmake/setup.cmake
@@ -1,4 +1,9 @@
-option(BUILD_SHARED_LIBS "" 0)
+option(BUILD_SHARED_LIBS "Build and use shared libraries" 0)
+option(CREATE_COMPILATION_DATABASE_LINK "Create compilation database link. Implies CMAKE_EXPORT_COMPILE_COMMANDS" 1)
+
+if (CREATE_COMPILATION_DATABASE_LINK)
+    set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
+endif ()

 macro(bazel)
     execute_process(COMMAND bazel ${ARGN} COMMAND_ERROR_IS_FATAL ANY OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -20,6 +25,6 @@
     include(${BAZEL_WORKSPACE}/bazel-bin/${target}.cmake)
 endforeach ()

-if (CMAKE_EXPORT_COMPILE_COMMANDS)
+if (CREATE_COMPILATION_DATABASE_LINK)
     file(CREATE_LINK ${PROJECT_BINARY_DIR}/compile_commands.json ${PROJECT_SOURCE_DIR}/compile_commands.json SYMBOLIC)
 endif ()


Fix diagnostic color handling

Fix diagnostic color handling

--- cmake/ilcsoft_default_cxx_flags.cmake
+++ cmake/ilcsoft_default_cxx_flags.cmake
@@ -4,7 +4,7 @@

 INCLUDE(CheckCXXCompilerFlag)

-SET(COMPILER_FLAGS -Wall -Wextra -Wshadow -Weffc++ -pedantic -Wno-long-long -Wuninitialized )
+SET(COMPILER_FLAGS -Wall -Wextra -Wshadow -Weffc++ -pedantic -Wno-long-long -Wuninitialized -fdiagnostics-color=auto )

 IF(("${CMAKE_CXX_COMPILER_ID}" EQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" EQUAL "Clang"))
     SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
@@ -39,9 +39,3 @@
 ELSE()
   MESSAGE( STATUS "NOT building with CXX11 standard" )
 ENDIF()
-
-
-CHECK_CXX_COMPILER_FLAG("-fdiagnostics-color=auto" CXX_FLAG_WORKS_-fdiagnostics-color)
-IF(CXX_FLAG_WORKS_-fdiagnostics-color)
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=auto")
-ENDIF()


build: rename a variable to be more descriptive (NFC)

This variable is the build host, not a suffix.  Name it appropriately.  NFC.

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -191,12 +191,12 @@

       # Get the prebuilt suffix to create the correct toolchain path when using the NDK
       if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin")
-        set(_swift_android_prebuilt_suffix "darwin-x86_64")
+        set(_swift_android_prebuilt_build "darwin-x86_64")
       elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
-        set(_swift_android_prebuilt_suffix "linux-x86_64")
+        set(_swift_android_prebuilt_build "linux-x86_64")
       endif()
       set(SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_PREBUILT_PATH
-          "${SWIFT_ANDROID_NDK_PATH}/toolchains/${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE}-${SWIFT_ANDROID_NDK_GCC_VERSION}/prebuilt/${_swift_android_prebuilt_suffix}")
+          "${SWIFT_ANDROID_NDK_PATH}/toolchains/${SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_TRIPLE}-${SWIFT_ANDROID_NDK_GCC_VERSION}/prebuilt/${_swift_android_prebuilt_build}")

       # Resolve the correct linker based on the file name of CMAKE_LINKER (being 'ld' or 'ld.gold' the options)
       get_filename_component(SWIFT_ANDROID_LINKER_NAME "${CMAKE_LINKER}" NAME)


CMake: DARWIN_USE_INTERNAL_SDK: Actually use the internal SDK

Swift SVN r32361

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -65,26 +65,11 @@
   # variables.

   # Find the SDK
-  set(SWIFT_SDK_${prefix}_PUBLIC_PATH "" CACHE PATH
-      "Path to the ${name} pubilc SDK")
-
-  if(NOT SWIFT_SDK_${prefix}_PUBLIC_PATH)
-    execute_process(
-        COMMAND "xcrun" "--sdk" "${xcrun_name}" "--show-sdk-path"
-        OUTPUT_VARIABLE SWIFT_SDK_${prefix}_PUBLIC_PATH
-        OUTPUT_STRIP_TRAILING_WHITESPACE)
-  endif()
-
-  if(NOT EXISTS "${SWIFT_SDK_${prefix}_PUBLIC_PATH}/System/Library/Frameworks/module.map")
-    message(FATAL_ERROR "${name} SDK not found at SWIFT_SDK_${prefix}_PUBLIC_PATH.")
-  endif()
-
-  # Find the SDK
   set(SWIFT_SDK_${prefix}_PATH "" CACHE PATH "Path to the ${name} SDK")

   if(NOT SWIFT_SDK_${prefix}_PATH)
     if(${SWIFT_DARWIN_USE_INTERNAL_SDK})
-      # Prefer the internal SDK, if present, for building C code and linking.
+      # If requested, require the internal SDK.
       execute_process(
           COMMAND "xcrun" "--sdk" "${xcrun_name}.internal" "--show-sdk-path"
           OUTPUT_VARIABLE SWIFT_SDK_${prefix}_PATH
@@ -96,6 +81,14 @@
   endif()

   if(NOT SWIFT_SDK_${prefix}_PATH)
+    execute_process(
+        COMMAND "xcrun" "--sdk" "${xcrun_name}" "--show-sdk-path"
+        OUTPUT_VARIABLE SWIFT_SDK_${prefix}_PUBLIC_PATH
+        OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(NOT EXISTS "${SWIFT_SDK_${prefix}_PUBLIC_PATH}/System/Library/Frameworks/module.map")
+      message(FATAL_ERROR "${name} SDK not found at SWIFT_SDK_${prefix}_PUBLIC_PATH.")
+    endif()
+
     set(SWIFT_SDK_${prefix}_PATH "${SWIFT_SDK_${prefix}_PUBLIC_PATH}")
   endif()

@@ -116,7 +109,6 @@
   else()
     set(SWIFT_SDK_${prefix}_INTERNAL_PATH "${SWIFT_SDK_${prefix}_PATH}")
   endif()
-

   if(NOT EXISTS "${SWIFT_SDK_${prefix}_PATH}/System/Library/Frameworks/module.map")
     message(FATAL_ERROR "${name} SDK not found at SWIFT_SDK_${prefix}_PATH.")


cmake: new qibuild.cmake template

cmake: new qibuild.cmake template

--- cmake/qibuild/templates/qibuild.cmake
+++ cmake/qibuild/templates/qibuild.cmake
@@ -10,7 +10,7 @@

 set(QIBUILD_BOOTSTRAP_VERSION 1)

-find_program(QI_BUILD qibuild)
+find_program(QI_BUILD_EXECUTABLE qibuild)
 if(NOT QI_BUILD)
   message(STATUS
     "
@@ -29,11 +29,12 @@
 # and include it.
 # This allow us to find all qibuild/qibuild.cmake
 function(bootstrap)
+  message(STATUS "blam: ${QI_BUILD_EXECUTABLE}")
   execute_process(
-      COMMAND ${QI_BUILD} configure --bootstrap ${CMAKE_BINARY_DIR}
+      COMMAND "${QI_BUILD_EXECUTABLE}" configure --single --bootstrap "--build-directory=${CMAKE_BINARY_DIR}"
       RESULT_VARIABLE  _retcode
-      OUTPUT_VARIABLE  _stdout
-      ERROR_VARIABLE   _stderr
+      # OUTPUT_VARIABLE  _stdout
+      # ERROR_VARIABLE   _stderr
       )
   if(NOT ${_retcode} EQUAL 0)
     message(STATUS
@@ -55,7 +56,7 @@
 endfunction()

 if(NOT EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
-  #bootstrap()
+  bootstrap()
 endif()

 if(EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)


COMP: No <module>-all targets in TestExternal

Commit 771df980 (Move <module>-all targets into module directories,
2011-04-26) taught itk_module_target_label to add dependencies directly
to the <module>-all targets.  However, these targets do not exist in the
non-modular TestExternal project.  Add the dependencies conditionally on
the existence of the targets.

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -134,7 +134,9 @@
 macro(itk_module_target_label _target_name)
   if(itk-module)
     set(_label ${itk-module})
-    add_dependencies(${itk-module}-all ${_target_name})
+    if(TARGET ${itk-module}-all)
+      add_dependencies(${itk-module}-all ${_target_name})
+    endif()
   else()
     set(_label ${_ITKModuleMacros_DEFAULT_LABEL})
   endif()


* forgot the dev/null

* forgot the dev/null

--- CMakeModules/CPP_WSDL.cmake
+++ CMakeModules/CPP_WSDL.cmake
@@ -9,7 +9,7 @@
 	TARGET ${PROJECT_NAME}
 	POST_BUILD
 	#OUTPUT ${CMAKE_BINARY_DIR}/services.xml ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.js
-	COMMAND PROJECT_NAME=${PROJECT_NAME} INPUT_PATH='${CMAKE_CURRENT_SOURCE_DIR} ${ARGN}' doxygen ${CMAKE_CURRENT_SOURCE_DIR}/../tools/doxygen_cpp_wsdl/Doxyfile 2>&1
+	COMMAND PROJECT_NAME=${PROJECT_NAME} INPUT_PATH='${CMAKE_CURRENT_SOURCE_DIR} ${ARGN}' doxygen ${CMAKE_CURRENT_SOURCE_DIR}/../tools/doxygen_cpp_wsdl/Doxyfile 2>&1 >/dev/null
 	COMMAND xsltproc --stringparam project_name ${PROJECT_NAME} --path "${CMAKE_BINARY_DIR}/xml" ${CMAKE_CURRENT_SOURCE_DIR}/../tools/doxygen_cpp_wsdl/services.xml.xslt namespace_web_services.xml > ${CMAKE_BINARY_DIR}/services.xml
 	COMMAND xsltproc --path "${CMAKE_BINARY_DIR}/xml" ${CMAKE_CURRENT_SOURCE_DIR}/../tools/doxygen_cpp_wsdl/json_payloads.xslt namespace_web_services.xml > ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.js
 	COMMAND xsltproc --stringparam project_name ${PROJECT_NAME} --path "${CMAKE_BINARY_DIR}/xml" ${CMAKE_CURRENT_SOURCE_DIR}/../tools/doxygen_cpp_wsdl/documentation.xslt namespace_web_services.xml > ${CMAKE_BINARY_DIR}/${PROJECT_NAME}_documentation.html


add additional path to look for glut

add additional path to look for glut

--- CMakeModules/FindGLUT.cmake
+++ CMakeModules/FindGLUT.cmake
@@ -1,6 +1,8 @@
 # IVS has freeglut 2.4 installed, and 2.8 at the location below:
 set(CMAKE_LIBRARY_PATH /research/kuhl/public-vrlab/glut/src/.libs ${CMAKE_LIBRARY_PATH})
 set(CMAKE_INCLUDE_PATH /research/kuhl/public-vrlab/glut/include/ ${CMAKE_INCLUDE_PATH})
+# freeglut version 3 on newell.cs.  Note that the library is in a different subfolder starting with freeglut 3.0.0
+set(CMAKE_LIBRARY_PATH /home/kuhl/public-vrlab/glut/lib ${CMAKE_LIBRARY_PATH})

 # - try to find glut library and include files


fix: Append finalized targets of module to top-level project list [Modules]

--- CMake/Basis/ProjectTools.cmake
+++ CMake/Basis/ProjectTools.cmake
@@ -2566,14 +2566,15 @@
   if (NOT PROJECT_IS_MODULE)
     # copy properties of modules
     foreach (M IN LISTS PROJECT_MODULES_ENABLED)
-      foreach (P IN ITEMS IMPORTED_TARGETS
+      foreach (P IN ITEMS TARGETS
+                          FINALIZED_TARGETS
+                          IMPORTED_TARGETS
                           IMPORTED_TYPES
                           IMPORTED_LOCATIONS
                           IMPORTED_RANKS
                           PROJECT_INCLUDE_DIRS
                           PROJECT_LINK_DIRS
-                          BUNDLE_LINK_DIRS
-                          TARGETS)
+                          BUNDLE_LINK_DIRS)
         basis_get_project_property (V ${M} ${P})
         basis_set_project_property (APPEND PROPERTY ${P} ${V})
       endforeach ()


Updated build script output to not mark libint2 as found when it is not.

--- CMake/TBTKConfigTemplate.cmake
+++ CMake/TBTKConfigTemplate.cmake
@@ -133,7 +133,7 @@
 	INCLUDE_DIRECTORIES(${LIBINT2_INCLUDES})
 	LIST(APPEND TBTK_LIBRARIES ${LIBINT2_LIBRARIES})
 ELSE(LIBINT2_FOUND)
-	MESSAGE("[X] Libint2")
+	MESSAGE("[ ] Libint2")
 ENDIF(LIBINT2_FOUND)

 IF(OpenCV_FOUND)


build: quotes around parameter

build: quotes around parameter

--- CMakeModules/FindLibXml2.cmake
+++ CMakeModules/FindLibXml2.cmake
@@ -81,7 +81,7 @@
    /opt
    )

-IF(${LIBXML2_LIBRARIES} MATCHES "framework")
+IF("${LIBXML2_LIBRARIES}" MATCHES "framework")
   SET( LIBXML2_LIBRARIES "${LIBXML2_LIBRARIES}" CACHE STRING "LibXml2 framework")
 ENDIF()


never truncate ctest dashboard summary

never truncate ctest dashboard summary

--- ament_cmake_test/ament_cmake_test-extras.cmake
+++ ament_cmake_test/ament_cmake_test-extras.cmake
@@ -24,6 +24,10 @@

 if(AMENT_ENABLE_TESTING)
   enable_testing()
+  # configure ctest not to truncate the dashboard summary
+  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.ctest"
+    "set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 0)\n"
+    "set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 0)\n")
 endif()

 find_package(ament_cmake_core QUIET REQUIRED)


Fix compilation using both VS2008 or VS2010

--- NinjaUrls.cmake
+++ NinjaUrls.cmake
@@ -6,6 +6,12 @@

 set(windows_source_url    "https://github.com/kitware/ninja/archive/v1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1.zip")
 set(windows_source_sha256 "01a2bb09bb2f6e6c0e4c9634e0491ad137fde80c3e99de581ee311401d07976a")
+
+if(MSVC AND (MSVC_VERSION EQUAL 1600 OR MSVC_VERSION LESS 1600))
+  # Fix compilation using "Microsoft Visual C++ Compiler for Python 2.7" or "Visual Studio 2010"
+  set(windows_source_url    "https://github.com/jcfr/ninja/archive/kitware-staged-features-support-vs2008-vs2010.zip")
+  set(windows_source_sha256 "d64d6ae2eaeed28832e9a9c28901b01f9d070d3f440346e585f68d490447f262")
+endif()

 #-----------------------------------------------------------------------------
 # Ninja binaries


Append more useful information to the build name: Replace the obvious "x86_64-Linux" by the config file name

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30873 0785d39b-7218-0410-832d-ea1e28bc413d

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -232,14 +232,7 @@
 # CTEST_BUILD_NAME:
 #

-SET(CTEST_BUILD_NAME
-  "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}"
-  )
-
-#
 # Append compiler information to CTEST_BUILD_NAME:
-#
-
 IF(NOT EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log)
   # Apparently, ${CTEST_BINARY_DIRECTORY} is not a configured build
   # directory. In this case we need a trick: set up a dummy project and
@@ -289,6 +282,15 @@
   SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}-r${_svn_WC_REVISION}")
 ENDIF()

+#
+# Append config file name to CTEST_BUILD_NAME:
+#
+
+IF(NOT "${CONFIG_FILE}" STREQUAL "")
+  GET_FILENAME_COMPONENT(_conf ${CONFIG_FILE} NAME_WE)
+  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${conf}")
+ENDIF()
+
 MESSAGE("-- CTEST_BUILD_NAME:       ${CTEST_BUILD_NAME}")

 #


FindLLVM: allow LLVM/Clang 3.6

FindLLVM: allow LLVM/Clang 3.6

As beignet now works with LLVM/Clang 3.6, accept this version
when searching for llvm-config.

Signed-off-by: Rebecca Palmer <2decb937e7eca5e941ec22bc308fd452fe4ab2bb@zoho.com>
Reviewed-by: Zhigang Gong <e04a7b9b70b1e4c6318cf117dcd1a9056e14b97a@linux.intel.com>

--- CMake/FindLLVM.cmake
+++ CMake/FindLLVM.cmake
@@ -8,12 +8,12 @@
 # LLVM_FOUND       - True if llvm found.
 if (LLVM_INSTALL_DIR)
   find_program(LLVM_CONFIG_EXECUTABLE
-               NAMES llvm-config-35 llvm-config-3.5 llvm-config-33 llvm-config-3.3 llvm-config-34 llvm-config-3.4 llvm-config
+               NAMES llvm-config-35 llvm-config-3.5 llvm-config-36 llvm-config-3.6 llvm-config-33 llvm-config-3.3 llvm-config-34 llvm-config-3.4 llvm-config
                DOC "llvm-config executable"
                PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
 else (LLVM_INSTALL_DIR)
   find_program(LLVM_CONFIG_EXECUTABLE
-               NAMES llvm-config-35 llvm-config-3.5 llvm-config-33 llvm-config-3.3 llvm-config-34 llvm-config-3.4 llvm-config
+               NAMES llvm-config-35 llvm-config-3.5 llvm-config-36 llvm-config-3.6 llvm-config-33 llvm-config-3.3 llvm-config-34 llvm-config-3.4 llvm-config
                DOC "llvm-config executable")
 endif (LLVM_INSTALL_DIR)


Allow custom test command and arguments for automatically generated tests, with a view to supporting MPI tests.

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -47,7 +47,10 @@
   get_target_property(EXECUTABLE ${NAME} LOCATION)
   string(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}"
          EXECUTABLE "${EXECUTABLE}")
-  add_test(${NAME} ${EXECUTABLE})
+
+  # Per target test command customisation with
+  # ${NAME}_TEST_PREFIX and ${NAME}_TEST_ARGS
+  add_test(${NAME} ${${NAME}_TEST_PREFIX} ${EXECUTABLE} ${${NAME}_TEST_ARGS})
 endforeach()

 add_custom_target(run_cpp_tests


Update FindGluonAudio to look for alure and not vorbis.

--- audio/cmake/FindGluonAudio.cmake
+++ audio/cmake/FindGluonAudio.cmake
@@ -27,8 +27,8 @@
 set(CMAKE_MODULE_PATH ${SHARE_INSTALL_DIR}/gluon/cmake)

 find_package(OpenAL ${_gluonAudioReq})
+find_package(Alure ${_gluonAudioReq})
 find_package(SndFile ${_gluonAudioReq})
-find_package(OggVorbis ${_gluonAudioReq})

 find_path(GLUON_AUDIO_INCLUDE_DIR
     NAMES


make sure that regex does not match cmake

--- cmake/EigenConfigureTesting.cmake
+++ cmake/EigenConfigureTesting.cmake
@@ -26,7 +26,7 @@
 # try to grab the default flags
 string(REGEX MATCH "MakeCommand:.*-- (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
 if(NOT CMAKE_MATCH_1)
-string(REGEX MATCH "MakeCommand:.*make (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
+string(REGEX MATCH "MakeCommand:.*[^c]make (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
 endif()
 string(REGEX REPLACE "MakeCommand:.*DefaultCTestConfigurationType" "MakeCommand: ${CMAKE_COMMAND} --build . --target buildtests --config \"\${CTEST_CONFIGURATION_TYPE}\" -- ${CMAKE_MATCH_1} ${EIGEN_TEST_BUILD_FLAGS}\nDefaultCTestConfigurationType"
        EIGEN_DART_CONFIG_FILE2 ${EIGEN_DART_CONFIG_FILE})


[compiler-rt] Don't explicitly set CMAKE_CXX_FLAGS.

Summary:
C++ flags should not be used for not-C++ files as it may trigger
-Werror=unused-command-line-argument. CMake will use CMAKE_C_FLAGS,
CMAKE_CXX_FLAGS, and CMAKE_ASM_FLAGS as appropriate implicitly, so
this does not need to be explicitly handled here.

This change depends on https://reviews.llvm.org/D53301, since one of
the builders depended on this behavior because it was not configuring
CMAKE_ASM_FLAGS.

Reviewers: eugenis, vitalybuka

Reviewed By: eugenis, vitalybuka

Subscribers: dberris, mgorny, delcypher, #sanitizers, llvm-commits

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

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@344751 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -77,7 +77,7 @@
     endif()

     set_target_compile_flags(${libname}
-      ${CMAKE_CXX_FLAGS} ${extra_cflags_${libname}} ${target_flags})
+      ${extra_cflags_${libname}} ${target_flags})
     set_property(TARGET ${libname} APPEND PROPERTY
       COMPILE_DEFINITIONS ${LIB_DEFS})
     set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Libraries")


Fix the KAccounts cmake module

Fix the KAccounts cmake module

Matches AccountsQt module now

--- cmake/modules/FindKAccounts.cmake
+++ cmake/modules/FindKAccounts.cmake
@@ -7,21 +7,24 @@
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

 SET (KACCOUNTS_FIND_REQUIRED ${KAccounts_FIND_REQUIRED})
-if (KACCOUNTS_INCLUDE_DIRS AND KACCOUNTS_LIBRARIES)
+if (KACCOUNTS_INCLUDE_DIR AND KACCOUNTS_LIBRARY)
   # Already in cache, be silent
   set(KACCOUNTS_FIND_QUIETLY TRUE)
-endif (KACCOUNTS_INCLUDE_DIRS AND KACCOUNTS_LIBRARIES)
+endif (KACCOUNTS_INCLUDE_DIR AND KACCOUNTS_LIBRARY)

 find_path(KACCOUNTS_INCLUDE_DIR
   NAMES KAccounts/kaccountsuiplugin.h
   PATHS ${CMAKE_INSTALL_FULL_INCLUDEDIR}
 )

-find_library(KACCOUNTS_LIBRARIES NAMES kaccounts)
+find_library(KACCOUNTS_LIBRARY NAMES kaccounts)
+
+set(KACCOUNTS_INCLUDE_DIRS ${KACCOUNTS_INCLUDE_DIR})
+set(KACCOUNTS_LIBRARIES ${KACCOUNTS_LIBRARY})

 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(KAccounts DEFAULT_MSG
-                                  KACCOUNTS_LIBRARIES
+                                  KACCOUNTS_LIBRARY
                                   KACCOUNTS_INCLUDE_DIR)

-mark_as_advanced(KACCOUNTS_INCLUDE_DIRS KACCOUNTS_LIBRARIES)
+mark_as_advanced(KACCOUNTS_INCLUDE_DIR KACCOUNTS_LIBRARY)


Add a FIXME.

Add a FIXME.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -245,6 +245,7 @@
   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/inc/" ""  rheaderfiles "${headerfiles}")
   # Replace the non-standard folder layout of Core.
   if (ARG_STAGE1 AND ARG_MODULE STREQUAL "Core")
+    # FIXME: Glob these folder.
     set(core_folders "base|clib|clingutils|cont|dictgen|doc|foundation|lzma|macosx|meta|metacling|multiproc|newdelete|pcre|rint|rootcling_stage1|textinput|thread|unix|winnt|zip")
     string(REGEX REPLACE "${CMAKE_SOURCE_DIR}/core/(${core_folders})/inc/" ""  rheaderfiles "${rheaderfiles}")
   endif()


Updates for generation of correct relative path for core headers

After removing globbing in core module, if to fetch a fresh master
some headers were not able to get a valid relative path causing next error:
-- /home/oksana/CERN_sources/root/builds/include/TArrayF.h
CMake Error at cmake/modules/RootNewMacros.cmake:292 (message):
  Header path '/home/oksana/CERN_sources/root/builds/include/TArrayF.h'
  TArrayF.h is not relative!
Call Stack (most recent call first):
  core/base/CMakeLists.txt:232 (ROOT_GENERATE_DICTIONARY)
Adding extra replacement pattern, matching - $CMAKE_BUILD_DIR/include, fixes issue.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -272,6 +272,7 @@
                      rootcling_stage1 textinput thread unix winnt zip)
     foreach(core_folder ${core_folders})
       string(REPLACE "${CMAKE_SOURCE_DIR}/core/${core_folder}/inc/" ""  headerfiles "${headerfiles}")
+      string(REPLACE "${CMAKE_BINARY_DIR}/include/" "" headerfiles "${headerfiles}")
     endforeach()
   endif()

@@ -281,6 +282,7 @@
   if(PROJECT_NAME STREQUAL ROOT)
     foreach(hf ${headerfiles})
       string(REPLACE "${PROJECT_SOURCE_DIR}" "" hfrel "${hf}")
+      string(REPLACE "${CMAKE_BINARY_DIR}/include/" "" hfrel "${hf}")
       # Test folders don't follow this pattern and need absolute paths,
       # so we don't run our sanity check on them.
       if(NOT "${hfrel}" MATCHES "/test/")


Fix for ROOT-9055. Avoid searching in the standard system environment variables (i.e. PATH)

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -251,7 +251,7 @@
       list(APPEND _list_of_header_dependencies ${fp})
     else()
       find_file(headerFile ${fp} HINTS ${localinclude} ${incdirs} NO_DEFAULT_PATH)
-      find_file(headerFile ${fp})
+      find_file(headerFile ${fp} NO_SYSTEM_ENVIRONMENT_PATH)
       if(headerFile)
         list(APPEND headerfiles ${headerFile})
         list(APPEND _list_of_header_dependencies ${headerFile})


Add cpackappend arg to package.cmake to allow renaming the resulting file.

Review-URL: https://codereview.appspot.com/197350043

--- make/package.cmake
+++ make/package.cmake
@@ -1,5 +1,5 @@
 # **********************************************************
-# Copyright (c) 2011-2014 Google, Inc.    All rights reserved.
+# Copyright (c) 2011-2015 Google, Inc.    All rights reserved.
 # Copyright (c) 2009-2010 VMware, Inc.    All rights reserved.
 # **********************************************************

@@ -56,6 +56,7 @@
 # also takes args parsed by runsuite_common_pre.cmake, in particular:
 set(arg_preload "")    # cmake file to include prior to each 32-bit build
 set(arg_preload64 "")  # cmake file to include prior to each 64-bit build
+set(arg_cpackappend "")# string to append to CPackConfig.cmake before packaging

 foreach (arg ${CTEST_SCRIPT_ARG})
   if (${arg} MATCHES "^build=")
@@ -80,6 +81,9 @@
   endif ()
   if (${arg} MATCHES "^invoke=")
     string(REGEX REPLACE "^invoke=" "" arg_invoke "${arg}")
+  endif ()
+  if (${arg} MATCHES "^cpackappend=")
+    string(REGEX REPLACE "^cpackappend=" "" arg_cpackappend "${arg}")
   endif ()
 endforeach (arg)

@@ -144,6 +148,13 @@
   set(last_package_build_dir ${save_last_dir})
 endif ()

+if (arg_cpackappend)
+  # Like DrMem, we use ${last_package_build_dir} from testbuild_ex to locate
+  # CPackConfig.cmake.
+  file(APPEND "${last_package_build_dir}/CPackConfig.cmake"
+    "\n${arg_cpackappend}\n")
+endif ()
+
 set(build_package ON)
 include("${CTEST_SCRIPT_DIRECTORY}/../suite/runsuite_common_post.cmake")


CMake: raise the default C++ standard to cxx_std_14

PiperOrigin-RevId: 459761499
Change-Id: Ifb4b8b9f2dc598f3f4afc66a9efc403e001e0262

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -189,7 +189,7 @@
   endif()

   if (NOT "${CMAKE_VERSION}" VERSION_LESS "3.8")
-    target_compile_features(${name} PUBLIC cxx_std_11)
+    target_compile_features(${name} PUBLIC cxx_std_14)
   endif()
 endfunction()


Fix test build issue with GCC7.2.

Fix test build issue with GCC7.2.

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -95,6 +95,9 @@
     set(cxx_no_rtti_flags "-GR-")
   elseif (CMAKE_COMPILER_IS_GNUCXX)
     set(cxx_base_flags "-Wall -Wshadow -Werror")
+    if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
+      set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else")
+    endif()
     set(cxx_exception_flags "-fexceptions")
     set(cxx_no_exception_flags "-fno-exceptions")
     # Until version 4.3.2, GCC doesn't define a macro to indicate


Installing OIS dependency didn't work on RelWithDebInfo with MingW

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -90,7 +90,9 @@
 	  endif ()
 	  if (MINGW)
 		install(FILES ${OIS_LIBRARY_DBG} DESTINATION lib/debug CONFIGURATIONS Debug)
+		install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
 		install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/release CONFIGURATIONS Release)
+		install(FILES ${OIS_LIBRARY_REL} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
 	  endif ()
 	elseif(APPLE)
 	  if (EXISTS ${OGRE_DEP_DIR}/lib/debug/libOIS.a)


Determine OGRE_DEP_DIR relative to OIS in case someone uses one of the alternate auto locations

--HG--
branch : v1-7
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/branches/v1-7%401851

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -14,11 +14,9 @@
   return()
 endif()

-if (OGRE_DEPENDENCIES_DIR)
-	set(OGRE_DEP_DIR ${OGRE_DEPENDENCIES_DIR})
-else()
-	set(OGRE_DEP_DIR "${OGRE_SOURCE_DIR}/Dependencies")
-endif()
+# TODO - most of this file assumes a common dependencies root folder
+# This is not robust, we should instead source dependencies from their individual locations
+get_filename_component(OGRE_DEP_DIR ${OIS_INCLUDE_DIR}/../../ ABSOLUTE)

 option(OGRE_INSTALL_DEPENDENCIES "Install dependency libs needed for samples" TRUE)
 option(OGRE_COPY_DEPENDENCIES "Copy dependency libs to the build directory" TRUE)


ENH: remove non mandatory add_dependencies for header tests to avoid non-existent dependency

--- CMake/OTBModuleHeaderTest.cmake
+++ CMake/OTBModuleHeaderTest.cmake
@@ -131,13 +131,11 @@
         )
       add_executable( ${_test_name} ${_header_test_src} )
       target_link_libraries( ${_test_name} OTBCommon )
+
       if (${_name}_LIBRARIES)
-        # OTBBoostAdapters depends only on OTBBoost,
-        # and OTBBoost_LIBRARIES can be empty, so check for it
-        add_dependencies(${_test_name} ${${_name}_LIBRARIES})
-        # this target_link should be needed only on WIN32
         target_link_libraries(${_test_name} ${${_name}_LIBRARIES})
       endif()
+
       add_dependencies(${_name}-all ${_test_name})
       math( EXPR _test_num "${_test_num} + 1" )
     endforeach()


Support MVAPICH2 1.9

Support MVAPICH2 1.9

--- CMake/hoomd/HOOMDMPISetup.cmake
+++ CMake/hoomd/HOOMDMPISetup.cmake
@@ -12,7 +12,7 @@
             # find out if this is MVAPICH2
             get_filename_component(_mpi_library_dir ${MPI_LIBRARY} PATH)
             find_program(MPICH2_VERSION
-                NAMES mpich2version
+                NAMES mpichversion mpich2version
                 HINTS ${_mpi_library_dir} ${_mpi_library_dir}/../bin
             )
             if (MPICH2_VERSION)


Android: Update AndroidUtils.cmake.

Android: Update AndroidUtils.cmake.

--- CMakeModules/AndroidUtils.cmake
+++ CMakeModules/AndroidUtils.cmake
@@ -159,7 +159,7 @@

     macro( package_with_target prog_name lib_path )
         # Mark lib_path as dependent of prog_name
-        set_property(TARGET ${prog_name} APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG ${lib_path} )
+        set_property(TARGET ${prog_name} APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE ${lib_path} )

         # If prog_name is to be packaged, add file copy command to package .so's.
         get_target_property( package_dependent_libs ${prog_name} MAKE_APK )
@@ -175,7 +175,14 @@

     macro( add_to_depend_libs prog_name depend_file lib_name )
         # Recursively Process dependents of lib_name
-        get_target_property(TARGET_LIBS ${lib_name} IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG)
+        get_target_property(TARGET_LIBS ${lib_name} IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE)
+        if(NOT TARGET_LIBS)
+            get_target_property(TARGET_LIBS ${lib_name} IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG)
+        endif()
+        if(NOT TARGET_LIBS)
+            get_target_property(TARGET_LIBS ${lib_name} IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG)
+        endif()
+
         foreach(SUBLIB ${TARGET_LIBS})
             if(SUBLIB)
                 add_to_depend_libs( ${prog_name} ${depend_file} ${SUBLIB} )


Search for SiSo wrapper

Search for SiSo wrapper

--- cmake/FindPF.cmake
+++ cmake/FindPF.cmake
@@ -10,10 +10,16 @@

 find_path(PF_INCLUDE_DIRS libpf/pfcam.h)
 find_library(PF_LIBRARY_COMDLL NAMES comdll)
+find_library(PF_LIBRARY_COMDLL_FG NAMES comdll_fg)
 find_library(PF_LIBRARY_MV2 NAMES mv2_d1280_640)
 find_library(PF_LIBRARY_PFCAM NAMES pfcam)

-set(PF_LIBRARIES ${PF_LIBRARY_MV2} ${PF_LIBRARY_PFCAM} ${PF_LIBRARY_COMDLL})
+set(PF_LIBRARIES
+    ${PF_LIBRARY_MV2}
+    ${PF_LIBRARY_PFCAM}
+    ${PF_LIBRARY_COMDLL}
+    ${PF_LIBRARY_COMDLL_FG}
+    )

 find_package_handle_standard_args(PF DEFAULT_MSG PF_LIBRARIES PF_INCLUDE_DIRS)


Addressing the testing of plugins (#87).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -400,7 +400,19 @@
     ENDIF()

     ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
-                       COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BUILD_DIR}/${PLUGIN_FILENAME} ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
+                       COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BUILD_DIR}/${PLUGIN_FILENAME}
+                                                        ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
+
+    # On Windows, make a copy of the plugin to our main build directory, since
+    # this is where it will be on Linux and Mac OS X and where any test which
+    # requires the plugin will expect it to be, but this is not where MSVC
+    # generates the plugin, so...
+
+    IF(WIN32)
+        ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD
+                           COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BUILD_DIR}/${PLUGIN_FILENAME}
+                                                            ${CMAKE_BINARY_DIR}/${PLUGIN_FILENAME})
+    ENDIF()

     # A few Mac OS X specific things

@@ -636,13 +648,24 @@
     SET(PLUGIN_FILENAME ${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})

     IF(NOT EXISTS ${DEST_PLUGINS_DIR})
-        ADD_CUSTOM_TARGET(${MAIN_PROJECT_NAME}_${PLUGIN_NAME}_MAKE_DIRECTORY ALL
+        ADD_CUSTOM_TARGET(${MAIN_PROJECT_NAME}_${PLUGIN_NAME}_CREATE_PLUGINS_DIRECTORY ALL
                           COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_PLUGINS_DIR})
     ENDIF()

-    ADD_CUSTOM_TARGET(${MAIN_PROJECT_NAME}_${PLUGIN_NAME}_COPY ALL
+    ADD_CUSTOM_TARGET(${MAIN_PROJECT_NAME}_${PLUGIN_NAME}_COPY_PLUGIN_TO_PLUGINS_DIRECTORY ALL
                       COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME}
                                                        ${DEST_PLUGINS_DIR}/${PLUGIN_FILENAME})
+
+    # On Windows, make a copy of the plugin to our main build directory, since
+    # this is where it will be on Linux and Mac OS X and where any test which
+    # requires the plugin will expect it to be, but this is not where MSVC
+    # generates the plugin, so...
+
+    IF(WIN32)
+    ADD_CUSTOM_TARGET(${MAIN_PROJECT_NAME}_${PLUGIN_NAME}_COPY_PLUGIN_TO_BUILD_DIRECTORY ALL
+                      COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME}
+                                                       ${CMAKE_BINARY_DIR}/${PLUGIN_FILENAME})
+    ENDIF()

     # Package the plugin itself


CMake[.Net]: Add Signing Key support

CMake[.Net]: Add Signing Key support


silence cmake warning

silence cmake warning

--- src/deb/package_details.cmake
+++ src/deb/package_details.cmake
@@ -3,7 +3,7 @@
 # message(STATUS " called with version  = " ${MY_VERSION})
 message(STATUS "package_details.cmake: Configuring debian package details.")

-set(CPACK_GENERATOR "DEB" CACHE string "generator" )
+set(CPACK_GENERATOR "DEB" CACHE STRING "generator" )
 set(CPACK_PACKAGE_CONTACT "Anders Wallin <anders.e.e.wallin@gmail.com>" CACHE STRING "email")
 set(CPACK_PACKAGE_NAME "openvoronoi" CACHE STRING "name")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "2D voronoi diagram algorithm" CACHE STRING "name")
@@ -11,7 +11,7 @@
 set(CPACK_DEBIAN_PACKAGE_SECTION "science" CACHE STRING "name3")

 # the debian source-package builder wants dependencies as an array
-set(DEBSRC_BUILD_DEPENDS debhelper python git cmake libboost-dev "libqd0 | libqd2c2a" libqd-dev libboost-python-dev libgomp1 CACHE STRINGS "name")
+set(DEBSRC_BUILD_DEPENDS debhelper python git cmake libboost-dev "libqd0 | libqd2c2a" libqd-dev libboost-python-dev libgomp1 CACHE STRING "name")

 # we need to explicitly list the libboost-python versions here. why??
 # quantal has 1.49.0


blas.cmake: Emit a warning to indicate that OpenBLAS doesn't compile correctly on Mac.

--- blas.cmake
+++ blas.cmake
@@ -7,11 +7,19 @@
     CACHE BOOL "Use ATLAS (WITH_ATLAS=1) or openBLAS (WITH_ATLAS=0) ?"
     FORCE)

-
 if(WITH_ATLAS)
     include (atlas)
     set(blas_NAME ${atlas_NAME})
 else()
+    # On Mac, warn that openblas might not work.
+    if (${APPLE})
+        # Only emit this warning once.
+        if ("${emitted_warning_for_openblas_osx}" STREQUAL "")
+            message(WARNING "\n*** OpenBLAS does not always successfully build on Mac OS X.  Consider using -DWITH_ATLAS=1 instead. ***\n")
+            set (emitted_warning_for_openblas_osx 1)
+        endif ()
+    endif ()
+
     include (openblas)
     set(blas_NAME ${openblas_NAME})
 endif()


Update verbose into cmake

Update verbose into cmake

--- CMakeModules/LibFindMacros.cmake
+++ CMakeModules/LibFindMacros.cmake
@@ -64,7 +64,8 @@
     # Print message and/or exit on fatal error
     if (${PREFIX}_FOUND)
       if (NOT ${PREFIX}_FIND_QUIETLY)
-        message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
+        message (STATUS "Found ${PREFIX} include directory: ${${PREFIX}_INCLUDE_DIR}")
+        message (STATUS "Found ${PREFIX} library: ${${PREFIX}_LIBRARY}")
       endif (NOT ${PREFIX}_FIND_QUIETLY)
     else (${PREFIX}_FOUND)
       if (${PREFIX}_FIND_REQUIRED)


Fixed CMake warning on quoted variable

Fixed CMake warning on quoted variable

--- cmake/BALLCompilerSpecific.cmake
+++ cmake/BALLCompilerSpecific.cmake
@@ -98,7 +98,7 @@
 		ADD_BALL_DEFINITIONS(-pedantic)
 	ENDIF()

-ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
+ELSEIF(MSVC)

 	SET(CXX_COMPILER_ID "MSVC")


MAINT: fix CMake script.

MAINT: fix CMake script.

--- cmake/FindNvidiaVideoCodec.cmake
+++ cmake/FindNvidiaVideoCodec.cmake
@@ -38,7 +38,7 @@

       find_library(NvidiaVideoCodec_encode_LIBRARY
         NAMES nvencodeapi
-        ${search}
+        PATHS ${search}
         PATH_SUFFIXES Lib/x64)
     else ()
       find_library(NvidiaVideoCodec_nvcuvid_LIBRARY


added search paths for freeglut

added search paths for freeglut

Windows nightly build was failing after installing the autobuilt version of freeglut.  ${CMAKE_INSTALL_PREFIX}/lib needs to be included as a hint because this is where the autobuild process installs things.

--- cmake/Modules/FindFreeGLUT.cmake
+++ cmake/Modules/FindFreeGLUT.cmake
@@ -22,21 +22,34 @@

 # Look for the header file.
 FIND_PATH(FREEGLUT_INCLUDE_DIR
-  NAMES GL/freeglut.h
-	HINTS
-	ENV CPATH # For OSCAR modules at Brown/CCV
-  /usr/local/Cellar/freeglut/2.8.1/include # This is how it comes with Brew.
-  /usr/local/Cellar/freeglut/3.0.0/include # This another way it comes with Brew.
-	)
+  NAMES
+    GL/freeglut.h
+  HINTS
+    ${CMAKE_INSTALL_PREFIX}/include
+    $ENV{FREEGLUT_ROOT}/include
+    /usr/local/include
+    ENV CPATH # For OSCAR modules at Brown/CCV
+    /usr/local/Cellar/freeglut/2.8.1/include # This is how it comes with Brew.
+    /usr/local/Cellar/freeglut/3.0.0/include # This another way it comes with Brew.
+)

 # Look for the library.
 FIND_LIBRARY(FREEGLUT_LIBRARY
-  NAMES glut
-	HINTS
-	ENV LD_LIBRARY_PATH # For OSCAR modules at Brown/CCV
-  /usr/local/Cellar/freeglut/2.8.1/lib/libglut.3.dylib # Brew version.
-  /usr/local/Cellar/freeglut/3.0.0/lib/libglut.3.dylib # Another Brew version.
-	)
+  NAMES
+    glut
+    glutd
+    freeglut
+    freeglutd
+    freeglut_static
+    freeglut_staticd
+  HINTS
+    ${CMAKE_INSTALL_PREFIX}/lib
+    $ENV{FREEGLUT_ROOT}/lib
+    /usr/local/lib
+    ENV LD_LIBRARY_PATH # For OSCAR modules at Brown/CCV
+    /usr/local/Cellar/freeglut/2.8.1/lib/libglut.3.dylib # Brew version.
+    /usr/local/Cellar/freeglut/3.0.0/lib/libglut.3.dylib # Another Brew version.
+  )

 # Undo the above hack.
 set(CMAKE_FIND_FRAMEWORK)


Fixed cmake macro bug in add_external_project

--- cmake/add_external_project.cmake
+++ cmake/add_external_project.cmake
@@ -30,10 +30,10 @@
                         URL               ${EXT_PROJ_ARGS_URL}
                         URL_MD5           ${EXT_PROJ_ARGS_URL_HASH}
                         SOURCE_DIR        ${SAFECASS_BUILD_ROOT}/external_packages/${EXT_PROJ_ARGS_NAME}/src
-                        BUILD_DIR         ${SAFECASS_BUILD_ROOT}/external_packages/${EXT_PROJ_ARGS_NAME}/build
+                        BINARY_DIR        ${SAFECASS_BUILD_ROOT}/external_packages/${EXT_PROJ_ARGS_NAME}/build
                         DOWNLOAD_DIR      ${SAFECASS_BUILD_ROOT}/external_packages/${EXT_PROJ_ARGS_NAME}/download
                         CONFIGURE_COMMAND ""
-                        BUILD_COMMAND     ""
+                        BUILD_COMMAND     ${EXT_PROJ_ARGS_BUILD_CMD}
                         INSTALL_COMMAND   ""
                         TEST_COMMAND      ""
                         CMAKE_CACHE_ARGS  ${EXT_PROJ_ARGS_CMAKE_OPTIONS})


CMake first check defualts enviroment .. later the appended pathes. If
other libraries already installed in the system enviroment this will
found .. instead of the libraries in the extended PATHS list (quote from CMake help):

       The reason the paths listed in the call to the command are searched
       last is that most users of CMake would expect things to be found first
       in the locations specified by their environment.  Projects may
       override this behavior by simply calling the command twice:

          FIND_LIBRARY(<VAR> NAMES name PATHS paths NO_DEFAULT_PATH)
          FIND_LIBRARY(<VAR> NAMES name)

       Once one of these calls succeeds the result variable will be set and
       stored in the cache so that neither call will search again.

git-svn-id: e31799a7ad59d6ea355ca047c69e0aee8a59fcd3@2617 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e

--- cmake/modules/FindOpenSync.cmake
+++ cmake/modules/FindOpenSync.cmake
@@ -19,10 +19,12 @@
 	PKGCONFIG( opensync-1.0 _opensync_include_DIR _opensync_link_DIR _opensync_link_FLAGS _opensync_cflags )
 ENDIF ( NOT WIN32 )

-# Look for OpenSync include dir and libraries
-FIND_PATH( OPENSYNC_INCLUDE_DIR opensync/opensync.h PATHS ${_opensync_include_DIR} PATH_SUFFIXES opensync-1.0 )
+# Look for OpenSync include dir and libraries, and take care about pkg-config first...
+FIND_PATH( OPENSYNC_INCLUDE_DIR opensync/opensync.h PATHS ${_opensync_include_DIR} PATH_SUFFIXES opensync-1.0 NO_DEFAULT_PATH )
+FIND_PATH( OPENSYNC_INCLUDE_DIR opensync/opensync.h PATH_SUFFIXES opensync-1.0 )

-FIND_LIBRARY( OPENSYNC_LIBRARIES opensync PATHS ${_opensync_link_DIR} )
+FIND_LIBRARY( OPENSYNC_LIBRARIES opensync PATHS ${_opensync_link_DIR} NO_DEFAULT_PATH )
+FIND_LIBRARY( OPENSYNC_LIBRARIES opensync )

 # Report results
 IF ( OPENSYNC_LIBRARIES AND OPENSYNC_INCLUDE_DIR )


Patched geos source to fix Android link error

--- cmake/projects/geos/hunter.cmake
+++ cmake/projects/geos/hunter.cmake
@@ -19,7 +19,7 @@
     URL
     "https://github.com/pretyman/libgeos/archive/libgeos-3.4.2.tar.gz"
     SHA1
-    bee9fa1bb30bb0cd6d7d770e43886c3ff8e393eb
+    f6ea15c96b478cf33f2aa81b00e31c2cdd8ee951
 )

 hunter_pick_scheme(DEFAULT url_sha1_autotools)


Fix DCMTK dictionary crashes in plugins

Fix DCMTK dictionary crashes in plugins

Build it as a shared library in superbuild

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -60,7 +60,7 @@
     CMAKE_CACHE_ARGS
       ${ep_common_cache_args}
       ${ep_project_include_arg}
-      -DBUILD_SHARED_LIBS:BOOL=OFF
+      -DBUILD_SHARED_LIBS:BOOL=ON
       -DDCMTK_WITH_DOXYGEN:BOOL=OFF
       -DDCMTK_WITH_ZLIB:BOOL=OFF # see github issue #25
       -DDCMTK_WITH_OPENSSL:BOOL=OFF # see github issue #25


cmake: find gslcblas

cmake: find gslcblas

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -24,14 +24,15 @@
 find_path(GSL_INCLUDE_DIR gsl/gsl_linalg.h HINTS ${PC_GSL_INCLUDE_DIRS})

 find_library(GSL_LIBRARY NAMES gsl HINTS ${PC_GSL_LIBRARY_DIRS} )
-
-set(GSL_LIBRARIES ${GSL_LIBRARY} )
-set(GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )
+find_library(GSL_CBLAS_LIBRARY NAMES gslcblas HINTS ${PC_GSL_LIBRARY_DIRS} )

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE
 # if all listed variables are TRUE
+find_package_handle_standard_args(GSL DEFAULT_MSG GSL_LIBRARY GSL_INCLUDE_DIR )
+find_package_handle_standard_args(GSL DEFAULT_MSG GSL_CBLAS_LIBRARY GSL_INCLUDE_DIR )

-find_package_handle_standard_args(GSL DEFAULT_MSG GSL_LIBRARY GSL_INCLUDE_DIR )
+set(GSL_LIBRARIES "${GSL_LIBRARY};${GSL_CBLAS_LIBRARY}" )
+set(GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )

-mark_as_advanced(GSL_INCLUDE_DIR GSL_LIBRARY )
+mark_as_advanced(GSL_INCLUDE_DIR GSL_LIBRARY GSL_CBLAS_LIBRARY)


Remove libdvdnav from mpv dependencies

Remove libdvdnav from mpv dependencies

It doesn’t actually support that anymore.

--- packages/mpv.cmake
+++ packages/mpv.cmake
@@ -1,5 +1,15 @@
 ExternalProject_Add(mpv
-    DEPENDS winpthreads ffmpeg fribidi libass libdvdnav openal-soft libpng libjpeg libquvi libiconv portaudio
+    DEPENDS
+        ffmpeg
+        fribidi
+        libass
+        libiconv
+        libjpeg
+        libpng
+        libquvi
+        openal-soft
+        portaudio
+        winpthreads
     GIT_REPOSITORY git://github.com/mpv-player/mpv.git
     #GIT_TAG lua_experiment
     CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure


cplex-shared.cmake: Fixed linux targets.

--- cplex-shared.cmake
+++ cplex-shared.cmake
@@ -19,9 +19,11 @@
 find_package( Cplex REQUIRED )

 if (APPLE)
-    set(SHARED_CPLEX_LINK_FLAGS "-all_load")
+    set(SHARED_CPLEX_LINK_FLAGS_1 "-Wl,-all_load")
+    set(SHARED_CPLEX_LINK_FLAGS_2 "-Wl,-noall_load")
 else()
-    set(SHARED_CPLEX_LINK_FLAGS "-whole-archive")
+    set(SHARED_CPLEX_LINK_FLAGS_1 "-Wl,-whole-archive")
+    set(SHARED_CPLEX_LINK_FLAGS_2 "-Wl,-no-whole-archive")
 endif()

 ##
@@ -35,10 +37,9 @@
 file(WRITE ${EMPTY_CPP} "// This is an empty file generated by cplex-shared.cmake" )

 add_library( cplex-shared SHARED ${EMPTY_CPP} )
-target_link_libraries( cplex-shared ${CPLEX_LIBRARY_STATIC} )
+target_link_libraries( cplex-shared ${SHARED_CPLEX_LINK_FLAGS_1} ${CPLEX_LIBRARY_STATIC} ${SHARED_CPLEX_LINK_FLAGS_2} )
 set_target_properties( cplex-shared PROPERTIES
-                       LINK_FLAGS ${SHARED_CPLEX_LINK_FLAGS}
-                       COMPILE_FLAGS -fpic
+                       COMPILE_FLAGS "-shared -fpic"
                        OUTPUT_NAME cplex
                        LIBRARY_OUTPUT_DIRECTORY ${CPLEX_LIB_DIR} )

@@ -52,9 +53,8 @@
 get_filename_component(CONCERT_LIB_DIR "${CONCERT_LIBRARY_STATIC}" PATH)

 add_library( concert-shared SHARED ${EMPTY_CPP} )
-target_link_libraries( concert-shared ${CONCERT_LIBRARY_STATIC} )
+target_link_libraries( concert-shared ${SHARED_CPLEX_LINK_FLAGS_1} ${CONCERT_LIBRARY_STATIC} ${SHARED_CPLEX_LINK_FLAGS_2} )
 set_target_properties( concert-shared PROPERTIES
-                       LINK_FLAGS ${SHARED_CPLEX_LINK_FLAGS}
                        COMPILE_FLAGS -fpic
                        OUTPUT_NAME concert
                        LIBRARY_OUTPUT_DIRECTORY ${CONCERT_LIB_DIR} )
@@ -69,9 +69,8 @@

 add_library( ilocplex-shared SHARED ${EMPTY_CPP} )
 add_dependencies( ilocplex-shared cplex-shared concert-shared )
-target_link_libraries( ilocplex-shared ${ILOCPLEX_LIBRARY_STATIC} ${CPLEX_LIB_LOCATION} ${CONCERT_LIB_LOCATION} )
+target_link_libraries( ilocplex-shared ${SHARED_CPLEX_LINK_FLAGS_1} ${ILOCPLEX_LIBRARY_STATIC} ${SHARED_CPLEX_LINK_FLAGS_2} ${CPLEX_LIB_LOCATION} ${CONCERT_LIB_LOCATION} )
 set_target_properties( ilocplex-shared PROPERTIES
-                       LINK_FLAGS ${SHARED_CPLEX_LINK_FLAGS}
                        COMPILE_FLAGS -fpic
                        OUTPUT_NAME ilocplex
                        LIBRARY_OUTPUT_DIRECTORY ${ILOCPLEX_LIB_DIR} )


Use UPS sqlite lib name in FindSQLite

Use UPS sqlite lib name in FindSQLite

UPS installs of sqlite3 rename the library from "libsqlite3.EXT" to
"libsqlite3_ups.EXT". This causes FindSQLite to fail finding the package
as the new name is unknown.

When in a UPS environment where SQLite has been setup, prepend
"sqlite3_ups" to the list of library names to be searched for. This
is a temporary measure to allow usability of cetbuildtools2 with
UPS installed packages, and only couples to UPS via existence, not
behaviour. Non-UPS usage is unaffected.

--- Modules/FindSQLite.cmake
+++ Modules/FindSQLite.cmake
@@ -24,6 +24,18 @@
 #  SQLite_EXECUTABLE   - Path to sqlite executable
 #  SQLite_VERSION      - The version of the found SQLite install
 #
+# Note
+# ^^^^
+#
+# Fermilab "UPS" installs of SQLite rename the sqlite3 library to
+# `libsqlite3_ups.EXT`. When using this module in a UPS environment
+# where sqlite has been "setup", `sqlite3_ups` is prepended to the list
+# of library names to be searched for by find_library.
+
+# This should not affect general usage as the name is only added when a
+# UPS-setup sqlite is detected (existence of a `SQLITE_FQ_DIR` environment
+# variable.
+#

 #=======================================================================
 # Copyright (c) 2016, Ben Morgan <Ben.Morgan@warwick.ac.uk>
@@ -42,7 +54,16 @@
 #-----------------------------------------------------------------------
 # Find SQLite paths only using defaults for now
 find_path(SQLite_INCLUDE_DIR sqlite3.h)
-find_library(SQLite_LIBRARY sqlite3)
+
+# - TEMP HACK TO MAKE THIS WORK IN UPS
+# Fermi UPS systems tag lib filename with `_ups`, so if we're in a UPS
+# environment with Sqlite "setup" prepend this name to find_library's list
+if(DEFINED ENV{SQLITE_FQ_DIR})
+  set(__SQLite_additional_names sqlite3_ups)
+endif()
+
+find_library(SQLite_LIBRARY NAMES ${__SQLite_additional_names} sqlite3)
+
 find_program(SQLite_EXECUTABLE sqlite3)

 # If we have the executable, use it to extract the version


Only try to use an artifact when main artifact and all sub-artifacts are available.

--- Buildroot.cmake
+++ Buildroot.cmake
@@ -236,7 +236,9 @@
     set(build_log ${CMAKE_CURRENT_BINARY_DIR}/${name}-log.txt)
     set(extra_depends ${BR_CONFIG} ${toolchain_depends})

-    if(artifact_prebuilt)
+    if(artifact_prebuilt
+       AND (device_tree_artifact_prebuilt OR NOT BR_DEVICE_TREE_ARTIFACT_PREBUILT)
+       AND (host_tools_artifact_prebuilt OR NOT BR_HOST_TOOLS_ARTIFACT_PREBUILT))
         _buildroot_use_prebuilt_file(
             ${name} ${artifact_prebuilt} ${main_output})