[Config][CMake] Migrated to new FindPython3 (from deprecated FindPythonLibs)

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -479,48 +479,36 @@
   unset (_required_version)
   if (${ARGC} GREATER 0)
     set (_required_version ${ARGV0})
-    message (STATUS "Requires PythonLibs-${_required_version}")
+    message (STATUS "Requires Python with version ${_required_version}; however just Python3 is considered here")
   else (${ARGC} GREATER 0)
-    message (STATUS "Requires PythonLibs without specifying any version")
+    message (STATUS "Requires Python3; any version will do")
   endif (${ARGC} GREATER 0)

   # The first check searches for the libraries and include paths.
   # However, on some older versions (e.g., on RedHat/CentOS 5.x),
   # only the static library is searched.
-  find_package (PythonLibs ${_required_version} REQUIRED)
+  find_package (Python3 COMPONENTS Interpreter Development REQUIRED)

   # The second check is to get the dynamic library for sure.
-  find_package (PythonLibsWrapper ${_required_version} REQUIRED)
-
-  if (PYTHONLIBS_FOUND)
-	# Derive the version of Python (for whatever reason, FindPythonLibs
-	# does not seem to provide that version variable.
-	get_filename_component (PYTHONLIBS_LIB_FILENAME ${PYTHON_LIBRARIES} NAME)
-	string (REGEX REPLACE "^libpython([0-9]+.[0-9]+).*$" "\\1"
-	  PYTHONLIBS_VERSION "${PYTHONLIBS_LIB_FILENAME}")
-
-	if (${PYTHONLIBS_VERSION_STRING} MATCHES "([0-9]).([0-9]).([0-9])")
-	  set (PY_MAJOR_VERSION "${CMAKE_MATCH_1}")
-	  set (PY_MINOR_VERSION "${CMAKE_MATCH_2}")
-	  set (PY_PATCH_VERSION "${CMAKE_MATCH_3}")
-	endif (${PYTHONLIBS_VERSION_STRING} MATCHES "([0-9]).([0-9]).([0-9])")
-
-	message (STATUS "Found PythonLibs ${PYTHONLIBS_VERSION} (${PYTHONLIBS_VERSION_STRING} / ${PY_MAJOR_VERSION}.${PY_MINOR_VERSION}.${PY_PATCH_VERSION})")
-
-	# Set the Python installation directory
-	set (INSTALL_PY_LIB_DIR
-	  ${INSTALL_LIB_DIR}/python${PYTHONLIBS_VERSION}/site-packages/py${PROJECT_NAME}
-	  CACHE PATH "Installation directory for Python libraries")
-
-	# Update the list of include directories for the project
-    include_directories (${PYTHON_INCLUDE_DIRS})
+  #find_package (PythonLibsWrapper ${_required_version} REQUIRED)
+
+  if (Python3_FOUND)
+    message (STATUS "Found Python3 ${Python3_VERSION} (${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.${Python3_VERSION_PATCH})")
+
+    # Set the Python installation directory
+    set (INSTALL_PY_LIB_DIR
+      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
+      CACHE PATH "Installation directory for Python libraries")
+
+    # Update the list of include directories for the project
+    include_directories (${Python3_INCLUDE_DIRS})

     # Update the list of dependencies for the project
-    list (APPEND PROJ_DEP_LIBS_FOR_LIB ${PYTHON_LIBRARIES})
-
-  else (PYTHONLIBS_FOUND)
+    list (APPEND PROJ_DEP_LIBS_FOR_LIB ${Python3_LIBRARIES})
+
+  else (Python3_FOUND)
 	message (FATAL_ERROR "Python libraries are missing. Please install them (e.g., 'python-devel' for the Fedora/RedHat package)")
-  endif (PYTHONLIBS_FOUND)
+  endif (Python3_FOUND)

 endmacro (get_python)

@@ -618,8 +606,8 @@
   #         On some platform/Boost version combinations, the Python version
   #         may be just the major version (2 or 3 as of 2019) or the major
   #         and minor versions (e.g., 27, 28, 34, 36, 37 as of 2019)
-  set (python_cpt_name1 "python${PY_MAJOR_VERSION}")
-  set (python_cpt_name2 "python${PY_MAJOR_VERSION}${PY_MINOR_VERSION}")
+  set (python_cpt_name1 "python${Python3_VERSION_MAJOR}")
+  set (python_cpt_name2 "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
   set (Boost_USE_STATIC_LIBS OFF)
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_USE_STATIC_RUNTIME OFF)
@@ -1473,7 +1461,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${PYTHONLIBS_VERSION}/site-packages/py${PACKAGE})
+  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)
@@ -2555,27 +2543,26 @@

 # Python
 macro (display_python)
-  if (PYTHONLIBS_FOUND)
+  if (Python3_FOUND)
     message (STATUS)
-	message (STATUS "* Python:")
-	message (STATUS "  - PYTHONLIBS_VERSION ............ : ${PYTHONLIBS_VERSION}")
-	message (STATUS "  - PY_{MAJOR,MINOR,PATCH}_VERSION  : ${PY_MAJOR_VERSION}.${PY_MINOR_VERSION}.${PY_PATCH_VERSION}")
-	message (STATUS "  - PYTHON_LIBRARIES .............. : ${PYTHON_LIBRARIES}")
-	message (STATUS "  - PYTHON_INCLUDE_PATH ........... : ${PYTHON_INCLUDE_PATH}")
-	message (STATUS "  - PYTHON_INCLUDE_DIRS ........... : ${PYTHON_INCLUDE_DIRS}")
-	message (STATUS "  - PYTHON_DEBUG_LIBRARIES ........ : ${PYTHON_DEBUG_LIBRARIES}")
-	message (STATUS "  - Python_ADDITIONAL_VERSIONS .... : ${Python_ADDITIONAL_VERSIONS}")
-  endif (PYTHONLIBS_FOUND)
+    message (STATUS "* Python:")
+    message (STATUS "  - Python3_VERSION ............... : ${Python3_VERSION}")
+    message (STATUS "  - Python3_VERSION_{MJR,MNR,PTCH}  : ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.${Python3_VERSION_PATCH}")
+    message (STATUS "  - Python3_INCLUDE_DIRS .......... : ${Python3_INCLUDE_DIRS}")
+    message (STATUS "  - Python3_LIBRARIES ............. : ${Python3_LIBRARIES}")
+    message (STATUS "  - Python3_LIBRARY_DIRS .......... : ${Python3_LIBRARY_DIRS}")
+    message (STATUS "  - Python3_RUNTIME_LIBRARY_DIRS .. : ${Python3_RUNTIME_LIBRARY_DIRS}")
+  endif (Python3_FOUND)
 endmacro (display_python)

 # ICU
 macro (display_icu)
   if (ICU_FOUND)
     message (STATUS)
-	message (STATUS "* ICU:")
-	message (STATUS "  - ICU_VERSION ................... : ${ICU_VERSION}")
-	message (STATUS "  - ICU_LIBRARIES ................. : ${ICU_LIBRARIES}")
-	message (STATUS "  - ICU_INCLUDE_DIRS .............. : ${ICU_INCLUDE_DIR}")
+    message (STATUS "* ICU:")
+    message (STATUS "  - ICU_VERSION ................... : ${ICU_VERSION}")
+    message (STATUS "  - ICU_LIBRARIES ................. : ${ICU_LIBRARIES}")
+    message (STATUS "  - ICU_INCLUDE_DIRS .............. : ${ICU_INCLUDE_DIR}")
   endif (ICU_FOUND)
 endmacro (display_icu)


fix #16

fix #16

change version of itk in superbuild


ARROW-12793: [Python] Fix support for pyarrow debug builds

Closes #10324 from amol-/ARROW-12793

Authored-by: Alessandro Molina <15e43f79e4563fde6c3452592b20e2241738524d@turbogears.org>
Signed-off-by: David Li <dc24f9cfc84fb1675ce65c8444a2c3e2f0e5f297@gmail.com>

--- cpp/cmake_modules/UseCython.cmake
+++ cpp/cmake_modules/UseCython.cmake
@@ -107,8 +107,9 @@
   endif()

   if(NOT WIN32)
-    if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug"
-       OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
+    string( TOLOWER "${CMAKE_BUILD_TYPE}" build_type )
+    if("${build_type}" STREQUAL "debug"
+       OR "${build_type}" STREQUAL "relwithdebinfo")
       set(cython_debug_arg "--gdb")
     endif()
   endif()


BUG: When a try-run fails to compile create the run result cache entry with a bogus non-zero return value to avoid running the test again.

--- Utilities/kwsys/kwsysPlatformCxxTests.cmake
+++ Utilities/kwsys/kwsysPlatformCxxTests.cmake
@@ -68,6 +68,7 @@
       FILE(APPEND
         ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
+      SET(${var} -1 CACHE INTERNAL "${description} failed to compile.")
     ENDIF(${var}_COMPILED)

     IF(${invert} MATCHES INVERT)


Sort config sub projects

Sort config sub projects

--- SubProject.cmake
+++ SubProject.cmake
@@ -234,6 +234,7 @@
   endif()

   file(GLOB _files *.cmake)
+  list(SORT _files)
   foreach(_file ${_files})
     string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" _config ${_file})
     list(APPEND _localFiles ${_config})


COMP: Enabled BUILD_SHARED in TubeTK-inner.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -111,6 +111,7 @@
     -DTubeTK_USE_SUPERBUILD:BOOL=FALSE
     -DITK_DIR:PATH=${ITK_DIR}
     -DGenerateCLP_DIR:PATH=${prefix}/lib/GenerateCLP
+    -DBUILD_SHARED_LIBS:BOOL=${shared}
   SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
   BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeExternals/Build/TubeTK-inner
   DEPENDS


CMake: Verbosely error out in DEAL_II_SETUP_TARGET if build type is unsupported

--- cmake/macros/macro_deal_ii_setup_target.cmake
+++ cmake/macros/macro_deal_ii_setup_target.cmake
@@ -38,12 +38,16 @@
 #   "${DEAL_II_USER_DEFINITIONS};${DEAL_II_USER_DEFINITIONS_<build type>}"
 #
 # If no "DEBUG" or "RELEASE" keyword is specified after the target, the
-# current CMAKE_BUILD_TYPE is used instead: Every build type that (case
-# insensitively) matches "debug" is considered a debug build.
+# current CMAKE_BUILD_TYPE is used instead. A CMAKE_BUILD_TYPE "Debug" is
+# equivalent to the DEBUG keyword, a CMAKE_BUILD_TYPE "Release" is
+# equivalent to the RELEASE keyword.
+#
+# This macro throws a FATAL_ERROR in case no DEBUG/RELEASE keyword is set
+# and the build type is different from "Debug", or "Release".
 #
 # If the requested build type is not available (e.g. DEBUG request but
-# deal.II was compiled with release mode only), the other available will be
-# used instead.
+# deal.II was compiled with release mode only), the macro throws a
+# FATAL_ERROR.
 #

 MACRO(DEAL_II_SETUP_TARGET _target)
@@ -65,26 +69,32 @@
   CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)

   #
-  # Every build type that (case insensitively) matches "debug" is
-  # considered a debug build:
-  #
-  SET(_build "RELEASE")
-  STRING(TOLOWER "${CMAKE_BUILD_TYPE}" _cmake_build_type)
-  IF("${_cmake_build_type}" MATCHES "debug")
-    SET(_build "DEBUG")
-  ENDIF()
-
-  #
-  # Override _on_debug_build if ${ARGN} is set:
+  # Set build type with the help of the specified keyword, or
+  # CMAKE_BUILD_TYPE:
   #
   IF("${ARGN}" MATCHES "^(DEBUG|RELEASE)$")
     SET(_build "${ARGN}")
-  ELSEIF(NOT "${ARGN}" STREQUAL "")
+  ELSEIF("${ARGN}" STREQUAL "")
+    IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
+      SET(_build "DEBUG")
+    ELSEIF(CMAKE_BUILD_TYPE STREQUAL "Release")
+      SET(_build "RELEASE")
+    ELSE()
+      MESSAGE(FATAL_ERROR
+        "\nDEAL_II_SETUP_TARGET cannot determine DEBUG, or RELEASE flavor "
+        "for target. CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" is neither "
+        "equal to \"Debug\", nor \"Release\"\n"
+        "Set CMAKE_BUILD_TYPE accordingly, or use an explicit annotation: "
+        "  DEAL_II_SETUP_TARGET(<target> DEBUG|RELEASE)\n\n"
+        )
+    ENDIF()
+  ELSE()
     MESSAGE(FATAL_ERROR
-      "\nDEAL_II_SETUP_TARGET called with invalid second argument.
-      Valid arguments are (empty), DEBUG, or RELEASE\n\n"
+      "\nDEAL_II_SETUP_TARGET called with invalid second argument. "
+      "Valid arguments are (empty), DEBUG, or RELEASE\n\n"
       )
   ENDIF()
+

   #
   # We can only append DEBUG link flags and compile definitions if deal.II


Oops, we use this regex (or regexes) to instruct the RPM building process which files NOT to scan for dependencies.

--- .cmake/GeneratePackage.cmake
+++ .cmake/GeneratePackage.cmake
@@ -73,7 +73,7 @@
   set(CPACK_RPM_PACKAGE_ARCHITECTURE, ${DEB_ARCHITECTURE})
   set(CPACK_RPM_PACKAGE_URL "https://www.musikcube.com")
   set(CPACK_RPM_PACKAGE_VERSION "${musikcube_VERSION_MAJOR}.${musikcube_VERSION_MINOR}.${musikcube_VERSION_PATCH}")
-  set(CPACK_RPM_REQUIRES_EXCLUDE_FROM "libboost_.*" "libmusikcore.so" "libncursesw.*" "libpanelw.*" "libtinfo.*")
+  set(CPACK_RPM_REQUIRES_EXCLUDE_FROM "^/.*$")

   include(CPack)
 endif()


fix: added dependency on the gaf compiler so file is regenerated when new gaf is compiled

--- gaf.cmake
+++ gaf.cmake
@@ -51,7 +51,7 @@
             "${CMAKE_CURRENT_BINARY_DIR}/${GAF_PREFIX}${FIL_NAME}.h"
             COMMAND gaf
             ARGS generate ${ABS_FIL} ${CMAKE_CURRENT_BINARY_DIR} ${GAF_EXTENSION_ARG}
-            DEPENDS ${ABS_FIL}
+            DEPENDS ${ABS_FIL} gaf
             COMMENT "Running C++ GAF compiler on ${FIL}"
             VERBATIM
         )


iOS: Guard a media dir variable update since we want to preserve the relative paths on iOS

--HG--
branch : v1-7

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -21,7 +21,7 @@
   set(OGRE_SAMPLES_DIR_DBG ".")
   set(OGRE_CFG_INSTALL_PATH "bin")
 elseif (APPLE)
-  set(OGRE_MEDIA_PATH "media")
+  set(OGRE_MEDIA_PATH "Media")
   if(OGRE_BUILD_PLATFORM_IPHONE)
     set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
     set(OGRE_MEDIA_DIR_DBG "${OGRE_MEDIA_PATH}")
@@ -142,8 +142,11 @@

 # CREATE CONFIG FILES - BUILD DIR VERSIONS
-set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media")
-set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media")
+if (NOT OGRE_BUILD_PLATFORM_IPHONE)
+  set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media")
+  set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media")
+endif ()
+
 if (WIN32)
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")


ENH: Superbuild - Removed unused log4cpp.cmake script

log4qt is now used.

--- CMakeExternals/log4cpp.cmake
+++ CMakeExternals/log4cpp.cmake
@@ -1,20 +0,0 @@
-#
-# log4cpp
-#
-SET(log4cpp_DEPENDS)
-ctkMacroShouldAddExternalProject(log4cpp_LIBRARIES add_project)
-IF(${add_project})
-  IF(NOT DEFINED log4cpp_DIR)
-    SET(proj log4cpp)
-#     MESSAGE(STATUS "Adding project:${proj}")
-    SET(log4cpp_DEPENDS ${proj})
-    ExternalProject_Add(${proj}
-        DOWNLOAD_COMMAND ""
-        CMAKE_GENERATOR ${gen}
-        SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/${proj}
-        CMAKE_ARGS
-          ${ep_common_args}
-        )
-    SET(log4cpp_DIR ${ep_install_dir})
-  ENDIF()
-ENDIF()


fixed xdispatch 'escaping' out of build directory

--- externals/xdispatch/build/macros.cmake
+++ externals/xdispatch/build/macros.cmake
@@ -113,9 +113,8 @@

 macro(__mz_add_target NAME FOLDER)
     get_filename_component(_ABS_FOLDER ${FOLDER} ABSOLUTE)
-    file(RELATIVE_PATH _REL_FOLDER ${CMAKE_SOURCE_DIR} ${_ABS_FOLDER})
-
-    add_subdirectory(${FOLDER} ${CMAKE_BINARY_DIR}/${_REL_FOLDER})
+    file(RELATIVE_PATH _REL_FOLDER ${CMAKE_CURRENT_SOURCE_DIR} ${_ABS_FOLDER})
+    add_subdirectory(${FOLDER} ${CMAKE_CURRENT_BINARY_DIR}/${_REL_FOLDER})
 endmacro()

 macro(mz_target_props NAME)


Modified FindDirectX.cmake to behave closer to our other find scripts. Should fix part 2 of 2765664.

--- CMake/Packages/FindDirectX.cmake
+++ CMake/Packages/FindDirectX.cmake
@@ -6,51 +6,49 @@
 # DirectX_LIBRARY
 # DirectX_ROOT_DIR

-set(DirectX_FOUND false)
-
 if(WIN32) # The only platform it makes sense to check for DirectX SDK
-
-  # We start with Microsoft DirectX SDK (August 2008) 9.24.1400
-  # Example of path is C:\apps_x86\Microsoft DirectX SDK (August 2008)\Include
-  find_path(DirectX_INCLUDE_DIR d3d9.h
-    "$ENV{DXSDK_DIR}/Include"
-    "C:/apps_x86/Microsoft DirectX SDK*/Include"
-    "C:/Program Files (x86)/Microsoft DirectX SDK*/Include"
-    "C:/apps/Microsoft DirectX SDK*/Include"
-    "C:/Program Files/Microsoft DirectX SDK*/Include"
-    )
-  mark_as_advanced(DirectX_INCLUDE_DIR)
+  include(FindPkgMacros)
+  findpkg_begin(DirectX)
+
+  # construct search paths
+  set(DirectX_PREFIX_PATH ${DXSDK_DIR} $ENV{DXSDK_DIR}
+    "C:/apps_x86/Microsoft DirectX SDK*"
+    "C:/Program Files (x86)/Microsoft DirectX SDK*"
+    "C:/apps/Microsoft DirectX SDK*"
+    "C:/Program Files/Microsoft DirectX SDK*"
+	"$ENV{ProgramFiles}/Microsoft DirectX SDK*"
+  )
+  create_search_paths(DirectX)
+  # redo search if prefix path changed
+  clear_if_changed(DirectX_PREFIX_PATH
+    DirectX_LIBRARY
+	DirectX_INCLUDE_DIR
+	DirectX_ROOT_DIR
+  )
+
+  find_path(DirectX_INCLUDE_DIR NAMES d3d9.h HINTS ${DirectX_INC_SEARCH_PATH})
+  # dlls are in DirectX_ROOT_DIR/Developer Runtime/x64|x86
+  # lib files are in DirectX_ROOT_DIR/Lib/x64|x86
+  if(CMAKE_CL_64)
+    set(DirectX_LIBPATH_SUFFIX "x64")
+  else(CMAKE_CL_64)
+    set(DirectX_LIBPATH_SUFFIX "x86")
+  endif(CMAKE_CL_64)
+  find_library(DirectX_LIBRARY NAMES d3d9 HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX})
+
   if(DirectX_INCLUDE_DIR)
     set(DirectX_ROOT_DIR "${DirectX_INCLUDE_DIR}/..")
   endif(DirectX_INCLUDE_DIR)

-  # dlls are in DirectX_ROOT_DIR/Developer Runtime/x64|x86
-  # lib files are in DirectX_ROOT_DIR/Lib/x64|x86

-  set(DirectX_LIBRARY_PATHS)
-  if(CMAKE_CL_64)
-    set(DirectX_LIBRARY_PATHS
-      "${DirectX_ROOT_DIR}/Lib/x64")
-  else(CMAKE_CL_64)
-    set(DirectX_LIBRARY_PATHS
-      "${DirectX_ROOT_DIR}/Lib/x86" "${DirectX_ROOT_DIR}/Lib")
-  endif(CMAKE_CL_64)
+  findpkg_finish(DirectX)

-  find_library(DirectX_LIBRARY d3d9 ${DirectX_LIBRARY_PATHS} NO_DEFAULT_PATH)
-  if(DirectX_INCLUDE_DIR AND DirectX_LIBRARY)
-    set(DirectX_FOUND true)
-  endif(DirectX_INCLUDE_DIR AND DirectX_LIBRARY)
-  mark_as_advanced(DirectX_LIBRARY)
-
-  #message("DirectX_FOUND=${DirectX_FOUND}")
-  #message("DirectX_INCLUDE_DIR=${DirectX_INCLUDE_DIR}")
-  #message("DirectX_LIBRARY=${DirectX_LIBRARY}")
-  #message("DirectX_ROOT_DIR=${DirectX_ROOT_DIR}")
-
   # look for D3D10.1 components
   if (DirectX_FOUND)
-    find_path(DirectX_D3D10_INCLUDE_DIR NAMES d3d10_1shader.h HINTS ${DirectX_INCLUDE_DIR})
-	find_library(DirectX_D3D10_LIBRARY NAMES d3d10 HINTS ${DirectX_LIBRARY_PATHS} NO_DEFAULT_PATH)
+    find_path(DirectX_D3D10_INCLUDE_DIR NAMES d3d10_1shader.h HINTS ${DirectX_INCLUDE_DIR} NO_DEFAULT_PATH)
+	get_filename_component(DirectX_LIBRARY_DIR "${DirectX_LIBRARY}" PATH)
+	message(STATUS "DX lib dir: ${DirectX_LIBRARY_DIR}")
+	find_library(DirectX_D3D10_LIBRARY NAMES d3d10 HINTS ${DirectX_LIBRARY_DIR} NO_DEFAULT_PATH)
 	if (DirectX_D3D10_INCLUDE_DIR AND DirectX_D3D10_LIBRARY)
 	  set(DirectX_D3D10_FOUND TRUE)
 	  set(DirectX_D3D10_INCLUDE_DIRS ${DirectX_D3D10_INCLUDE_DIR})


ENH: update PhaseSymmetry remote module

ENH: update PhaseSymmetry remote module

* BUG: maintain image direction in internal filters. Closes #23.
* ENH: use ITKImageIO and ITKTransformIO in examples' CMakeLists.txt
* COMP: build with legacy disabled
* ENH: allow finding ITK via configuration file

--- Modules/Remote/PhaseSymmetry.remote.cmake
+++ Modules/Remote/PhaseSymmetry.remote.cmake
@@ -11,5 +11,5 @@
 http://www.insight-journal.org/browse/publication/846
 "
   GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKPhaseSymmetry.git
-  GIT_TAG 91041964bb798b16c1caa5cfef0d91f32ada8332
+  GIT_TAG 26e6fbf0823413b956e3ec93f4e6faac076fe37c
   )


git-svn-id: https://svn.icg.tugraz.at/svn/vmgpu/trunk/vmlibraries/imageutilities@10172 358b74ad-2626-0410-af80-f4c3c349ae55

--- imageutilities/cmake/FindImageUtilities.cmake
+++ imageutilities/cmake/FindImageUtilities.cmake
@@ -251,7 +251,7 @@
     if(MATLAB_FOUND)
       include_directories(${MATLAB_INCLUDE_DIRS})
       set(IU_IUMATLAB_LIB_DEPENDENCIES ${IU_IUMATLAB_LIB_DEPENDENCIES} ${MATLAB_LIBRARIES})
-    endif(MATLAB_INCLUDE_DIR)
+    endif(MATLAB_FOUND)

   endif(IU_IUMATLAB_FOUND)


Fix for ROOT-8356 - xrootd just disabled when not found and -Dfail-on-missing=ON

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -833,10 +833,16 @@
     message(STATUS "Looking for XROOTD")
     find_package(XROOTD)
     if(NOT XROOTD_FOUND)
-      message(STATUS "XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation")
-      message(STATUS "                  Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD  internally'")
-      message(STATUS "                  For the time being switching OFF 'xrootd' option")
-      set(xrootd OFF CACHE BOOL "" FORCE)
+      if(fail-on-missing)
+        message(FATAL_ERROR "XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation, "
+                            "or inlcude the installation of XROOTD in the CMAKE_PREFIX_PATH. "
+                            "Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally")
+      else()
+        message(STATUS "XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation")
+        message(STATUS "                  Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally")
+        message(STATUS "                  For the time being switching OFF 'xrootd' option")
+        set(xrootd OFF CACHE BOOL "" FORCE)
+      endif()
     else()
       set(xrootd_versionnum ${xrdversnum})  # variable used internally
     endif()


[CMake] When building for APPLE, and not targeting 11.3+, don't even look for `aligned_alloc()`

See https://github.com/darktable-org/darktable/issues/10087

While generally `CHECK_CXX_SYMBOL_EXISTS()` would work here,
when backdeploying on OSX the symbol is there on the build host,
but possibly not on the deploy target. There's a clang diagnostic
that makes it work, but only when `-w` was not passed.

I'm not seeing any reasonable way to workaround `-w`,
so let's just hardcode it.

--- cmake/Modules/memory-align-alloc.cmake
+++ cmake/Modules/memory-align-alloc.cmake
@@ -8,9 +8,11 @@
   message(SEND_ERROR "Can't even find plain malloc() / free() !")
 endif()

-CHECK_CXX_SYMBOL_EXISTS(aligned_alloc cstdlib HAVE_ALIGNED_ALLOC)
-if(HAVE_ALIGNED_ALLOC)
-  return()
+if(NOT APPLE OR NOT CMAKE_OSX_DEPLOYMENT_TARGET OR CMAKE_OSX_DEPLOYMENT_TARGET GREATER_EQUAL 11.3)
+  CHECK_CXX_SYMBOL_EXISTS(aligned_alloc cstdlib HAVE_ALIGNED_ALLOC)
+  if(HAVE_ALIGNED_ALLOC)
+    return()
+  endif()
 endif()

 CHECK_CXX_SYMBOL_EXISTS(posix_memalign cstdlib HAVE_POSIX_MEMALIGN)


Fixed annoying issue where if we found a prev breakpad build, the find module wouldn't create the interface target correctly causing a build error when using ninja

--- cmake/modules/FindGoogleBreakpad.cmake
+++ cmake/modules/FindGoogleBreakpad.cmake
@@ -76,7 +76,7 @@
 # handle the QUIETLY and REQUIRED arguments and set BREAKPAD_FOUND to TRUE if
 # all listed variables are TRUE
 find_package_handle_standard_args(breakpad
-                                  REQUIRED_VARS BREAKPAD_EXCEPTION_HANDLER_LIBRARIES BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR)
+                                  REQUIRED_VARS BREAKPAD_EXCEPTION_HANDLER_FOUND BREAKPAD_EXCEPTION_HANDLER_LIBRARIES BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR)

 mark_as_advanced(
   BREAKPAD_EXCEPTION_HANDLER_LIBRARY
@@ -84,8 +84,8 @@
   BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR
   )

-if(BREAKPAD_EXCEPTION_HANDLER_FOUND AND NOT TARGET utils::breakpad)
-  add_library(utils::breakpad UNKNOWN IMPORTED)
+if(BREAKPAD_FOUND AND NOT TARGET utils::breakpad)
+  add_library(utils::breakpad INTERFACE IMPORTED)
   set_target_properties(utils::breakpad PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR}")
   set_target_properties(utils::breakpad PROPERTIES INTERFACE_LINK_LIBRARIES "${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}")
 endif()


MAJ via l'implémentation de l'écriture GDAL Suppression de la CAI

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -35,16 +35,6 @@
    		${ITK_INCLUDE_DIRS_BUILD_TREE}
    	)
 ENDIF(NOT OTB_USE_EXTERNAL_ITK)
-
-
-#-----------------------------------------------------------------------------
-# Include directories from the CAI build tree.
-INCLUDE(${OTB_SOURCE_DIR}/Utilities/CAI/caiIncludeDirectories.cmake)
-SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
-  ${CAI_INCLUDE_DIRS_BUILD_TREE}
-  )
-
-

 #-----------------------------------------------------------------------------


ENH: Bump elastix to latest bug fixed

ENH: Bump elastix to latest bug fixed

Bug was fixed in https://github.com/SuperElastix/elastix/pull/54
#184

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -19,8 +19,8 @@

 set( proj Elastix )

-set( ELASTIX_GIT_REPOSITORY https://github.com/FBerendsen/elastix )
-set( ELASTIX_GIT_TAG fc295ee2ee232a4e07e8404d602a4bfe7b6b5072 )
+set( ELASTIX_GIT_REPOSITORY https://github.com/SuperElastix/elastix )
+set( ELASTIX_GIT_TAG 81b498e32688e2dac34ed1fbd84d576ceac1cfb3 )

 UPDATE_SELX_SUPERBUILD_COMMAND(${proj})


Update to BSD3?

Update to BSD3?

Main license is BSD3 https://github.com/rolinh/dfc/blob/master/LICENSE but this file has BSD2. @jarro2783 Either this file should be updated, or software should be under both BSD3 and BSD2 licenses

--- cmake/modules/GettextTranslate.cmake
+++ cmake/modules/GettextTranslate.cmake
@@ -1,26 +1,30 @@
 # Copyright (c) 2012, Jarryd Beck
 # All rights reserved.
 #
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-# Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+#   * Redistributions of source code must retain the above copyright notice, this
+#     list of conditions and the following disclaimer.
+#
+#   * Redistributions in binary form must reproduce the above copyright notice,
+#     this list of conditions and the following disclaimer in the documentation
+#     and/or other materials provided with the distribution.
+#
+#   * Neither the name of the author nor the names of its contributors may be used
+#     to endorse or promote products derived from this software without specific
+#     prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 # This module creates build rules for updating translation files made


cmake: let really disable webui option

cmake: let really disable webui option

It should be possible build root7, but not build webui

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -293,6 +293,10 @@
   set(webui_defvalue OFF)
 endif()

+if("${webui}" STREQUAL "OFF")
+   set(webui_disabled ON)
+endif()
+
 #---roottest option implies testing
 if(roottest OR rootbench)
   set(testing ON CACHE BOOL "" FORCE)
@@ -303,7 +307,10 @@

 if(root7)
   if(NOT CMAKE_CXX_STANDARD GREATER 11)
-      set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to be used")
+      set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++14 standard used with root7")
+   endif()
+   if(NOT webui AND NOT webui_disabled)
+      set(webui ON CACHE BOOL "(webui build automatically when root7 is enabled)" FORCE)
    endif()
 endif()


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -20,7 +20,6 @@
 Name[el]=GStreamer
 Name[en_GB]=GStreamer
 Name[es]=GStreamer
-Name[et]=GStreamer
 Name[eu]=GStreamer
 Name[fa]=GStreamer
 Name[fi]=GStreamer
@@ -77,7 +76,6 @@
 Comment[el]=Σύστημα υποστήριξης GStreamer του Phonon
 Comment[en_GB]=Phonon GStreamer backend
 Comment[es]=Motor GStreamer para Phonon
-Comment[et]=Phononi GStreameri taustaprogramm
 Comment[eu]=Phonon-en GStreamer bizkarraldekoa
 Comment[fa]=پسانه‌ی جی‌استریمر برای فنون (Phonon GStreamer backend)
 Comment[fi]=Phonon GStreamer -taustajärjestelmä


Changed forge tag to af3.0.1 in build_forge.cmake

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -16,7 +16,7 @@
 ExternalProject_Add(
     forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
-    GIT_TAG master
+    GIT_TAG af3.0.1
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


Change freetype-external to freetype-ext

* Problem when building forge with arrayfire on windows

--- CMakeModules/build_freetype.cmake
+++ CMakeModules/build_freetype.cmake
@@ -3,12 +3,12 @@
 SET(prefix ${CMAKE_BINARY_DIR}/third_party/freetype)

 ExternalProject_Add(
-    freetype-external
+    freetype-ext
     GIT_REPOSITORY git://git.sv.nongnu.org/freetype/freetype2.git
     GIT_TAG 14df6b1a63f5c5773bb498063205cb79aac21173
     PREFIX "${prefix}"
     UPDATE_COMMAND ""
-    CONFIGURE_COMMAND ${CMAKE_COMMAND} -Wno-dev "-G${CMAKE_GENERATOR}" ${prefix}/src/freetype-external
+    CONFIGURE_COMMAND ${CMAKE_COMMAND} -Wno-dev "-G${CMAKE_GENERATOR}" ${prefix}/src/freetype-ext
     -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
     "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -w -fPIC"
     -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
@@ -20,7 +20,7 @@
 ADD_LIBRARY(freetype IMPORTED STATIC)
 SET(freetype_location ${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX})
 SET_TARGET_PROPERTIES(freetype PROPERTIES IMPORTED_LOCATION ${freetype_location})
-ADD_DEPENDENCIES(freetype freetype-external)
+ADD_DEPENDENCIES(freetype freetype-ext)

 SET(FREETYPE_INCLUDE_DIRS ${prefix}/include/freetype2)
 SET(FREETYPE_LIBRARIES freetype)


Update protobuf.cmake

Update protobuf.cmake

--- 3rd_party/protobuf/protobuf.cmake
+++ 3rd_party/protobuf/protobuf.cmake
@@ -44,11 +44,8 @@
 if (COMPILER_CLANG_HAS_LIBCXX AND COMPILER_CLANG_HAS_LIBCXXABI)
     set(3RD_PARTY_PROTOBUF_CXX_FLAGS "${3RD_PARTY_PROTOBUF_CXX_FLAGS} -stdlib=libc++")
 endif()
-if(NOT WIN32 AND NOT CYGWIN AND NOT MINGW)
-    set(3RD_PARTY_PROTOBUF_C_FLAGS "-fPIC ${3RD_PARTY_PROTOBUF_C_FLAGS}")
-    set(3RD_PARTY_PROTOBUF_CXX_FLAGS "-fPIC ${3RD_PARTY_PROTOBUF_CXX_FLAGS}")
-endif()
-set(3RD_PARTY_PROTOBUF_PIE "-DCMAKE_C_FLAGS=${3RD_PARTY_PROTOBUF_C_FLAGS}" "-DCMAKE_CXX_FLAGS=${3RD_PARTY_PROTOBUF_CXX_FLAGS}")
+
+set(3RD_PARTY_PROTOBUF_FLAG_OPTIONS "-DCMAKE_C_FLAGS=${3RD_PARTY_PROTOBUF_C_FLAGS}" "-DCMAKE_CXX_FLAGS=${3RD_PARTY_PROTOBUF_CXX_FLAGS}")

 if (NOT EXISTS ${3RD_PARTY_PROTOBUF_PKG_DIR})
     file(MAKE_DIRECTORY ${3RD_PARTY_PROTOBUF_PKG_DIR})
@@ -76,7 +73,8 @@
 FindConfigurePackage(
     PACKAGE Protobuf
     BUILD_WITH_CMAKE
-    CMAKE_FLAGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} ${3RD_PARTY_PROTOBUF_PIE} -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} -DBUILD_SHARED_LIBS=${3RD_PARTY_PROTOBUF_BUILD_SHARED_LIBS}
+    CMAKE_FLAGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+        ${3RD_PARTY_PROTOBUF_FLAG_OPTIONS} -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} -DBUILD_SHARED_LIBS=${3RD_PARTY_PROTOBUF_BUILD_SHARED_LIBS}
     WORKING_DIRECTORY "${3RD_PARTY_PROTOBUF_PKG_DIR}"
     PREFIX_DIRECTORY "${3RD_PARTY_PROTOBUF_ROOT_DIR}"
     SRC_DIRECTORY_NAME "protobuf-${3RD_PARTY_PROTOBUF_VERSION}"


bump version to 0.3.1

bump version to 0.3.1

--- src/CPackConfig.cmake
+++ src/CPackConfig.cmake
@@ -4,7 +4,7 @@

 set(CPACK_PACKAGE_VERSION_MAJOR "0")
 set(CPACK_PACKAGE_VERSION_MINOR "3")
-set(CPACK_PACKAGE_VERSION_PATCH "0")
+set(CPACK_PACKAGE_VERSION_PATCH "1")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libtmx")


CMake: Recognize FreeType version 2.3.11

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%401515

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239)
+set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239 freetype2311)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


COMP: support for cmake < 2.6.4

COMP: support for cmake < 2.6.4

--- CMake/PreventInSourceBuilds.cmake
+++ CMake/PreventInSourceBuilds.cmake
@@ -1,9 +1,14 @@
 #
 # This function will prevent in-source builds
 function(AssureOutOfSourceBuilds)
-  # make sure the user doesn't play dirty with symlinks
-  get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
-  get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
+  if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.6)
+    # make sure the user doesn't play dirty with symlinks
+    get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
+    get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
+  else()
+    get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" ABSOLUTE)
+    get_filename_component(bindir "${CMAKE_BINARY_DIR}" ABSOLUTE)
+  endif()

   # disallow in-source builds
   if("${srcdir}" STREQUAL "${bindir}")


From Jorge Ciges, "Update to FindAndroidNDK to make it use the latest Ndk (r5c) automatically.

That fixes compatibilities with some 2.1 devices. And it looks like all goes well."

--- CMakeModules/FindAndroidNDK.cmake
+++ CMakeModules/FindAndroidNDK.cmake
@@ -19,6 +19,11 @@

 IF(NOT ANDROID_NDK)
     FIND_PATH(ANDROID_NDK ndk-build
+    # search for r5c
+        ~/android-ndk-r5c
+        ~/android_develop/android-ndk-r5c
+        ~/ndk-r5c
+        ~/android_develop/ndk-r5c
         # search for r5b
         ~/android-ndk-r5b
         ~/android_develop/android-ndk-r5b


Update TCL/TK/TKDND build settings for MacOS

--- cmake_modules/ExternalProject_TCLTK.cmake
+++ cmake_modules/ExternalProject_TCLTK.cmake
@@ -5,7 +5,7 @@
     UPDATE_COMMAND "" # Disable update
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ""
-    BUILD_COMMAND make -C macosx install INSTALL_ROOT=${HOME}/ NATIVE_TCLSH=${HOME}/usr/local/bin/tclsh
+    BUILD_COMMAND make -C macosx install-embedded INSTALL_ROOT=${INSTALL_DIR}/../../ INSTALL_PATH=/Frameworks #NATIVE_TCLSH=${HOME}/usr/local/bin/tclsh
     INSTALL_COMMAND ""
     LOG_DOWNLOAD 1
     LOG_BUILD 1
@@ -18,7 +18,7 @@
     UPDATE_COMMAND "" # Disable update
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ""
-    BUILD_COMMAND make -C macosx install INSTALL_ROOT=${HOME}/
+    BUILD_COMMAND make -C macosx install-embedded INSTALL_ROOT=${INSTALL_DIR}/../../ INSTALL_PATH=/Frameworks
     INSTALL_COMMAND ""#make -C macosx install
     LOG_DOWNLOAD 1
     LOG_BUILD 1
@@ -31,7 +31,7 @@
     PATCH_COMMAND  patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch
     UPDATE_COMMAND "" # Disable update
     BUILD_IN_SOURCE 1
-    CONFIGURE_COMMAND ./configure --libdir=${HOME}/Library/Tcl --with-tcl=${HOME}/Library/Frameworks/Tcl.framework --with-tk=${HOME}/Library/Frameworks/Tk.framework --prefix=${HOME}
+    CONFIGURE_COMMAND ./configure --with-tcl=${INSTALL_DIR}/../../Frameworks/Tcl.framework --with-tk=${INSTALL_DIR}/../../Frameworks/Tk.framework --prefix=${INSTALL_DIR}
     BUILD_COMMAND make
     INSTALL_COMMAND make install
     LOG_DOWNLOAD 1


Change VMTK repository back to upstream master.

We now fetch VMTK from Luca's official repository.

--- SlicerVmtk4/SuperBuild/VMTK.cmake
+++ SlicerVmtk4/SuperBuild/VMTK.cmake
@@ -1,4 +1,3 @@
-
 # Fetch the VMTK Package
 #-----------------------------------------------------------------------------

@@ -17,7 +16,7 @@
 if(NOT DEFINED VMTK_DIR)
   message(STATUS "Adding external project: ${proj}")
   ExternalProject_Add(${proj}
-    GIT_REPOSITORY "${git_protocol}://github.com/haehn/vmtk.git"
+    GIT_REPOSITORY "${git_protocol}://github.com/lantiga/vmtk.git"
     GIT_TAG "origin/master"
     SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-build


SCIPY detection

SCIPY detection

--- salome_adm/cmake_files/FindSalomePython.cmake
+++ salome_adm/cmake_files/FindSalomePython.cmake
@@ -167,7 +167,14 @@
   ELSE(NUMPY_FOUND)
     MESSAGE(STATUS "NumPy not found.")
   ENDIF(NUMPY_FOUND)
-
+  # SciPy detection
+  EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import scipy ; import sys ; sys.stdout.write(scipy.version.version)" OUTPUT_VARIABLE SCIPY_VERSION ERROR_QUIET )
+  IF(SCIPY_VERSION)
+    SET(SCIPY_FOUND TRUE)
+  ENDIF(SCIPY_VERSION)
+  IF(SCIPY_FOUND)
+    MESSAGE(STATUS "Scipy found : Version ${SCIPY_VERSION}")
+  ENDIF(SCIPY_FOUND)
   ## None here
 ELSE()
   MESSAGE(STATUS "Python was only partially (or not at all) found .")


Squashed 'cmake/yacma/' changes from 1c81092..8db9ea9

8db9ea9 yacma: enable new GCC 8 warning flag.

git-subtree-dir: cmake/yacma
git-subtree-split: 8db9ea97856effb31d489515587c30ebf9238e8f

--- YACMACompilerLinkerSettings.cmake
+++ YACMACompilerLinkerSettings.cmake
@@ -131,6 +131,8 @@
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wduplicated-branches)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wrestrict)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Waligned-new)
+        # From GCC 8.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wcast-align=strict)
         if(YACMA_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.999")
             # NOTE: GCC >= 6 seems to be wrongly warning about visibility attributes
             # in some situations:


Attempt to fix Mac build error

Attempt to fix Mac build error

Merged changes from other VMTK repositories that might fix the build error on Mac

--- SuperBuild/External_VMTK.cmake
+++ SuperBuild/External_VMTK.cmake
@@ -25,7 +25,7 @@

   ExternalProject_SetIfNotDefined(
     ${CMAKE_PROJECT_NAME}_${proj}_GIT_TAG
-    "91bc715e79e55ac63e83ffcefce66e67b52fac69"
+    "01855002f11db665f4d8ca1528cf9e95d111d96b"
     QUIET
     )


Enable boost to link static runtime.

Enable boost to link static runtime.

--- CMake/ExternalProjects/Boost.cmake
+++ CMake/ExternalProjects/Boost.cmake
@@ -156,7 +156,7 @@
       ${_boost_linkflags}
       ${_boost_address_model}
       threading=multi
-      runtime-link=shared
+      runtime-link=${_boost_link}
       --ignore-site-config
       -q
   )


removed TargetBuildOption macro. double use with WkAddCFLags() macros

--- WkCompilerSetup.cmake
+++ WkCompilerSetup.cmake
@@ -351,37 +351,3 @@
 endmacro ( WkCompilerSetup )

-
-
-#setting target properties (replacing defaults from wkcmake - but not defaults from cmake )
-#WkTargetBuildOptions ( target_name build_type compile_flags [link_flags] )
-macro (WkTargetBuildOptions target_name build_type compile_flags )
-    string ( REGEX MATCH "${build_type}" BUILD_TYPE_MATCH "${CMAKE_CONFIGURATION_TYPES};All" )
-    #to get optional link_flags
-    if ( ${ARGC} GREATER 3 )
-        set(link_flags ${ARGV3})
-    endif ( ${ARGC} GREATER 3 )
-    #here we assume buildtype is correct
-
-	IF ( BUILD_TYPE_MATCH )
-        if ( ${PROJECT_NAME}_C_COMPILER_LOADED )
-            WkSetCFlags( ${build_type} ${compile_flags} )
-            #TODO : per target version of these. pb : defining option on target before target is defined ?
-        endif ()
-        if ( ${PROJECT_NAME}_CXX_COMPILER_LOADED )
-            WkSetCXXFlags( ${build_type} ${compile_flags} )
-        endif ()
-        if ( link_flags )
-	       	get_target_property(${PROJECT_NAME}_TYPE ${PROJECT_NAME} TYPE)
-   		    if ( ${PROJECT_NAME}_TYPE STREQUAL "EXECUTABLE" )
-		    	WkSetExeLinkerFlags( ${build_type} ${link_flags} )
-		    elseif ( ${PROJECT_NAME}_TYPE STREQUAL "SHARED_LIBRARY" )
-		    	WkSetSharedLinkerFlags( ${build_type} ${link_flags} )
-            elseif( ${PROJECT_NAME}_TYPE STREQUAL "MODULE_LIBRARY" )
-		    	WkSetModuleLinkerFlags( ${build_type} ${link_flags} )
-            endif()
-        endif ( link_flags )
-    ENDIF ( BUILD_TYPE_MATCH )
-endmacro (WkTargetBuildOptions)
-
-


fix quote space issue

fix quote space issue

--- superbuild/Projects/win32/nuclearRGG.bundle.cmake
+++ superbuild/Projects/win32/nuclearRGG.bundle.cmake
@@ -14,7 +14,7 @@
 if(BUILD_DOCUMENTATION)
   set (CPACK_NSIS_MENU_LINKS
     "bin/RGGNuclear.exe" "RGG Nuclear GUI"
-    "Documentation/RGGUsersGuide.pdf "Documentation")
+    "Documentation/RGGUsersGuide.pdf" "Documentation")
 else()
   set (CPACK_NSIS_MENU_LINKS
        "bin/RGGNuclear.exe" "RGG Nuclear GUI")


FindMPI: search the HPC MPI registry path

--- CMake/FindMPI.cmake
+++ CMake/FindMPI.cmake
@@ -155,6 +155,7 @@
   list(APPEND _MPI_PREFIX_PATH "${msmpi_bin_path}")
   unset(msmpi_bin_path)
   list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]/Bin")
+  list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\HPC;HpcMpiInstallDir]/..")
   list(APPEND _MPI_PREFIX_PATH "$ENV{MSMPI_INC}/..") # The SDK is installed separately from the runtime
   # MPICH
   list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")


RemoteModule: update git_tag for mosaic

RemoteModule: update git_tag for mosaic

--- Modules/Remote/Mosaic.remote.cmake
+++ Modules/Remote/Mosaic.remote.cmake
@@ -5,5 +5,5 @@
 https://github.com/remicres/otb-mosaic
 "
   GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
-  GIT_TAG 5b180a274b731bfd366f731cb829797e6d1ec756
+  GIT_TAG 964778a05c66a1215504ca2a8bfc4b87da7989b9
 )


Removing changes that I added, this is the original FindTBB.cmake

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@5253 e6417c60-b987-48fd-844e-b20f0fcc1017

--- seqan/projects/library/cmake/CMake/FindTBB/FindTBB.cmake
+++ seqan/projects/library/cmake/CMake/FindTBB/FindTBB.cmake
@@ -151,7 +151,6 @@
     message(STATUS "[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set $ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
     set (TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib")
 endif (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
-message("TBB_FOUND = ${TBB_FOUND}")

 find_library(TBB_LIBRARY        ${_TBB_LIB_NAME}        ${TBB_LIBRARY_DIR} NO_DEFAULT_PATH)


Pass macOS framework directories to shiboken's preprocessor

On macOS shiboken skipped all methods that contained OpenGL types like
GLuint. This happened because gl.h was included using an absolute path
which is generated inside global.h.in, whereas subsequent includes like
OpenGL/gltypes.h did not get resolved by the preprocessor due to
missing include paths.

Fix consists in taking the system framework paths that CMake knows
about, and passing them as additional include paths to shiboken.

Task-number: PYSIDE-457
Change-Id: Ic7d9157e95f370074b03bbfbe2f0691a0798a4df
Reviewed-by: Friedemann Kleint <1b9f2592239daaec4856ccc1cfb4d2d55b35fb71@qt.io>
Reviewed-by: Christian Tismer <3f32342346a37828fd9c8841ea4579d28b46cf08@stackless.com>

--- cmake/Macros/PySideModules.cmake
+++ cmake/Macros/PySideModules.cmake
@@ -67,10 +67,20 @@
     # Remove any possible duplicates.
     list(REMOVE_DUPLICATES total_type_system_files)

+    # Contains include directories to pass to shiboken's preprocessor.
+    set(shiboken_include_dirs ${pyside2_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR})
+    if(CMAKE_HOST_APPLE)
+        # On macOS, provide the framework paths for OpenGL headers.
+        set(shiboken_include_dirs ${shiboken_include_dirs} ${CMAKE_SYSTEM_FRAMEWORK_PATH})
+    endif()
+
+    # Transform the path separators into something shiboken understands.
+    make_path(shiboken_include_dirs ${shiboken_include_dirs})
+
     add_custom_command(OUTPUT ${${module_sources}}
                         COMMAND "${SHIBOKEN_BINARY}" ${GENERATOR_EXTRA_FLAGS}
                         ${pyside2_BINARY_DIR}/pyside2_global.h
-                        --include-paths=${pyside2_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}
+                        --include-paths=${shiboken_include_dirs}
                         --typesystem-paths=${pyside2_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}
                         --output-directory=${CMAKE_CURRENT_BINARY_DIR}
                         --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt


add /bigboj for windows

add /bigboj for windows

--- cmake/Saiga_compiler_flags.cmake
+++ cmake/Saiga_compiler_flags.cmake
@@ -77,6 +77,8 @@
 endif()

 if(SAIGA_CXX_MSVC OR SAIGA_CXX_WCLANG)
+	# required for some crazy eigen stuff
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
     #multiprocessor compilation for visual studio
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
     add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)


optionally enable/disable exceptions for unittest++

--- cmake/emscripten.toolchain.cmake
+++ cmake/emscripten.toolchain.cmake
@@ -25,6 +25,17 @@
 set(EMSCRIPTEN_BUILD_VERBOSE 0)
 set(EMSCRIPTEN_OUTLINING_LIMIT 20000)

+# exceptions on/off?
+if (ORYOL_EXCEPTIONS)
+    message("C++ exceptions are enabled")
+    set(ORYOL_EMSC_EXCEPTION_FLAGS "")
+    set(EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING 0)
+else()
+    message("C++ exceptions are disabled")
+    set(ORYOL_EMSC_EXCEPTION_FLAGS "-fno-exceptions")
+    set(EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING 1)
+endif()
+
 message("EMSCRIPTEN_TOTAL_MEMORY: ${EMSCRIPTEN_TOTAL_MEMORY}")
 message("EMSCRIPTEN_TOTAL_MEMORY_WORKER: ${EMSCRIPTEN_TOTAL_MEMORY_WORKER}")
 message("EMSCRIPTEN_USE_MEMORY_INIT_FILE: ${EMSCRIPTEN_USE_MEMORY_INIT_FILE}")
@@ -32,6 +43,7 @@
 message("EMSCRIPTEN_USE_CLOSURE: ${EMSCRIPTEN_USE_CLOSURE}")
 message("EMSCRIPTEN_ASSERTIONS: ${EMSCRIPTEN_ASSERTIONS}")
 message("EMSCRIPTEN_OUTLINING_LIMIT: ${EMSCRIPTEN_OUTLINING_LIMIT}")
+message("EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING: ${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING}")

 set(CMAKE_SYSTEM_NAME Linux)
 set(CMAKE_SYSTEM_VERSION 1)
@@ -91,7 +103,7 @@
 set(CMAKE_SYSTEM_INCLUDE_PATH "${EMSCRIPTEN_ROOT_PATH}/system/include")

 # c++ compiler flags
-set(CMAKE_CXX_FLAGS "${ORYOL_PLATFORM_DEFINES} -std=c++11 -stdlib=libc++ -fno-exceptions -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
+set(CMAKE_CXX_FLAGS "${ORYOL_PLATFORM_DEFINES} -std=c++11 -stdlib=libc++ ${ORYOL_EMSC_EXCEPTION_FLAGS} -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
 set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG -DORYOL_DEBUG=1")

@@ -101,12 +113,12 @@
 set(CMAKE_C_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG -DORYOL_DEBUG=1")

 # linker flags
-set(CMAKE_EXE_LINKER_FLAGS "--memory-init-file ${EMSCRIPTEN_USE_MEMORY_INIT_FILE} -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY} -s DISABLE_EXCEPTION_CATCHING=1")
+set(CMAKE_EXE_LINKER_FLAGS "--memory-init-file ${EMSCRIPTEN_USE_MEMORY_INIT_FILE} -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY} -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING}")
 set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE}")

 # dynamic lib linker flags
-set(CMAKE_SHARED_LINKER_FLAGS "-shared --memory-init-file 0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=[\\\"_dowork\\\"] -s DISABLE_EXCEPTION_CATCHING=1")
+set(CMAKE_SHARED_LINKER_FLAGS "-shared --memory-init-file 0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=[\\\"_dowork\\\"] -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING}")
 set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
 set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} --closure 0")


Update the Firebase open source version of Flatbuffers

Update to the version of flatbuffers used by google3

PiperOrigin-RevId: 300209371

--- cmake/external/flatbuffers.cmake
+++ cmake/external/flatbuffers.cmake
@@ -18,7 +18,7 @@
   return()
 endif()

-set(version v1.10.0)
+set(version c957550511689e1052059fc2cf2e43a06a24a05b)

 ExternalProject_Add(
   flatbuffers


Im gonna be mad if this works

Im gonna be mad if this works

--- cmake/modules/FindSDL2_gpu.cmake
+++ cmake/modules/FindSDL2_gpu.cmake
@@ -102,14 +102,6 @@
     PATHS ${SDL2_gpu_SEARCH_PATHS}
 )

-# SDL2_gpu may require threads on your system.
-# The Apple build may not need an explicit flag because one of the
-# frameworks may already provide it.
-# But for non-OSX systems, I will use the CMake Threads package.
-IF(NOT APPLE)
-    FIND_PACKAGE(Threads)
-ENDIF(NOT APPLE)
-
 # MinGW needs an additional link flag, -mwindows
 # It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -mwindows
 IF(MINGW)
@@ -127,13 +119,6 @@
         SET(SDL2_gpu_LIBRARY_TEMP ${SDL2_gpu_LIBRARY_TEMP} "-framework Cocoa")
     ENDIF(APPLE)

-    # For threads, as mentioned Apple doesn't need this.
-    # In fact, there seems to be a problem if I used the Threads package
-    # and try using this line, so I'm just skipping it entirely for OS X.
-    IF(NOT APPLE)
-        SET(SDL2_gpu_LIBRARY_TEMP ${SDL2_gpu_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
-    ENDIF(NOT APPLE)
-
     # For MinGW library
     IF(MINGW)
         SET(SDL2_gpu_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_gpu_LIBRARY_TEMP})


The wxWidgets driver is now turned on again by default.

svn path=/trunk/; revision=9010

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -126,7 +126,7 @@
 "tk:tk:ON"
 "tkwin:tkwin:ON"
 "wingcc:wingcc:ON"
-"wxwidgets:wxwidgets:OFF"
+"wxwidgets:wxwidgets:ON"
 "xfig:xfig:ON"
 "xwin:xwin:ON"
 )


Call airframes script with board arg

Call airframes script with board arg

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -400,7 +400,6 @@

 	set(cmake_test ${PX4_SOURCE_DIR}/cmake/test/cmake_tester.py)

-
 	set(extras)
 	foreach(extra ${EXTRAS})
 		get_filename_component(file_name ${extra} NAME)
@@ -420,8 +419,10 @@
 		COMMAND ${PYTHON_EXECUTABLE} ${romfs_autostart}
 			-a ${romfs_temp_dir}/init.d
 			-s ${romfs_temp_dir}/init.d/rc.autostart
+			--board ${BOARD}
 		COMMAND ${PYTHON_EXECUTABLE} ${romfs_pruner}
 			--folder ${romfs_temp_dir}
+			--board ${BOARD}
 		COMMAND ${GENROMFS} -f ${CMAKE_CURRENT_BINARY_DIR}/romfs.bin
 			-d ${romfs_temp_dir} -V "NSHInitVol"
 		#COMMAND cmake -E remove_directory ${romfs_temp_dir}


Update ZLIB configuration and version for chromium zlib drop-in (#74)

--- cmake/projects/ZLIB/hunter.cmake
+++ cmake/projects/ZLIB/hunter.cmake
@@ -85,10 +85,24 @@
     2fc1f19ef5ba48c415a614e56e1c12507f4676ab
 )

+hunter_add_version(
+    PACKAGE_NAME
+    ZLIB
+    VERSION
+    "0.0.0-chromium-f87c2b10efb4-p1"
+    URL
+    "https://github.com/cpp-pm/chromium_zlib/archive/v0.0.0-f87c2b10efb4-p1.tar.gz"
+    SHA1
+    c11a03c2db12d8af908c91a8dfd0f75e44c90e47
+)
+
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(ZLIB)
-hunter_download(PACKAGE_NAME ZLIB
+string(FIND "${HUNTER_ZLIB_VERSION}" "chromium" HUNTER_ZLIB_IS_CHROMIUM)
+if(HUNTER_ZLIB_IS_CHROMIUM EQUAL -1)
+  hunter_download(PACKAGE_NAME ZLIB
     PACKAGE_INTERNAL_DEPS_ID "1"
     PACKAGE_UNRELOCATABLE_TEXT_FILES
     "share/pkgconfig/zlib.pc"
-)
+  )
+endif()


Fix gRPC source

Fix gRPC source

--- cmake/projects/gRPC/hunter.cmake
+++ cmake/projects/gRPC/hunter.cmake
@@ -8,8 +8,8 @@
 hunter_add_version(
     PACKAGE_NAME gRPC
     VERSION "1.6.6"
-    URL "https://github.com/isaachier/grpc/archive/hunter-1.6.6-p6.tar.gz"
-    SHA1 "c4abbf4a411f794f4cac2a0ec2311187b6fee31f")
+    URL "https://github.com/hunter-packages/grpc/archive/v1.6.6-p7.tar.gz"
+    SHA1 "4658a5f88aad19dc8105a8662db616837bacb6cd")

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(gRPC)


changed the custom test script to account for no autoload feature.

Signed-off-by: The Mathworks, Inc. <84dd9758784f644395c0f001c659d360269016e4@mathworks.com>

--- cmake/usCTestScript_custom.cmake
+++ cmake/usCTestScript_custom.cmake
@@ -23,7 +23,7 @@
 set(US_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../")

 set(US_BUILD_CONFIGURATION )
-foreach(i RANGE 7)
+foreach(i RANGE 3)
   list(APPEND US_BUILD_CONFIGURATION ${i})
 endforeach()


[ci] fix allow_parallel_build option

[ci] fix allow_parallel_build option

--- ci_gitlab/ctest_common.cmake
+++ ci_gitlab/ctest_common.cmake
@@ -33,7 +33,10 @@
 cmake_host_system_information(RESULT fqdn QUERY FQDN)
 cmake_host_system_information(RESULT NP QUERY NUMBER_OF_LOGICAL_CORES)

-set(ALLOW_PARALLEL_BUILD 1 CACHE BOOL "Allow parallel build")
+if(NOT DEFINED ALLOW_PARALLEL_BUILD)
+  set(ALLOW_PARALLEL_BUILD ON)
+endif()
+option(ALLOW_PARALLEL_BUILD "Allow parallel build" ${ALLOW_PARALLEL_BUILD})
 if(NOT ALLOW_PARALLEL_BUILD)
   set(NP 1)
 endif()


backward-cpp: Make sure to properly link against bfd.a

On some distributions, libbfd is only available as static library. E.g.
on OpenSuse Leap 42.2, there are these two files:
  libbfd.a
  libbfd-2.28-system.so

backward-cpp, when attempting to link to bfd, will select the static
library and fail b/c there are undefined references to symbols from
libiberty/libz:
```
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libbfd.a(elflink.o):
In function `elf_link_add_object_symbols':
/home/abuild/rpmbuild/BUILD/binutils-2.26.1/build-dir/bfd/../../bfd/elflink.c:4733:
undefined reference to `objalloc_free_block'
/home/abuild/rpmbuild/BUILD/binutils-2.26.1/build-dir/bfd/../../bfd/elflink.c:5027:
undefined reference to `_sch_istable'
...
```

After this patch we also link against the direct dependencies of libbfd.a, namely libiberty and libz

Also see: https://github.com/KDAB/GammaRay/issues/386

--- BackwardConfig.cmake
+++ BackwardConfig.cmake
@@ -78,6 +78,13 @@
 	elseif(LIBBFD_FOUND)
 		LIST(APPEND _BACKWARD_INCLUDE_DIRS ${LIBBFD_INCLUDE_DIRS})
 		LIST(APPEND BACKWARD_LIBRARIES ${LIBBFD_LIBRARIES})
+
+		# If we attempt to link against static bfd, make sure to link its dependencies, too
+		get_filename_component(bfd_lib_ext "${LIBBFD_LIBRARY}" EXT)
+		if (bfd_lib_ext STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
+			list(APPEND BACKWARD_LIBRARIES iberty z)
+		endif()
+
 		set(STACK_DETAILS_DW FALSE)
 		set(STACK_DETAILS_BFD TRUE)
 		set(STACK_DETAILS_BACKTRACE_SYMBOL FALSE)


CMake: SDL2

CMake: SDL2

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -282,7 +282,7 @@
 ELSEIF(MINGW_CROSS_COMPILE)
 	INCLUDE_DIRECTORIES(${OLXROOTDIR}/build/mingw/include/SDL)
 ELSE()
-	EXEC_PROGRAM(sdl-config ARGS --cflags OUTPUT_VARIABLE SDLCFLAGS)
+	EXEC_PROGRAM(sdl2-config ARGS --cflags OUTPUT_VARIABLE SDLCFLAGS)
 	string(REGEX REPLACE "[\r\n]" " " SDLCFLAGS "${SDLCFLAGS}")
 	ADD_DEFINITIONS(${SDLCFLAGS})
 endif(WIN32)
@@ -347,7 +347,7 @@
 	SET(LIBS ${LIBS} "-framework OpenAL")
 	SET(LIBS ${LIBS} "-logg" "-lvorbis" "-lvorbisfile")
 else(APPLE)
-	SET(LIBS ${LIBS} SDL SDL_image)
+	SET(LIBS ${LIBS} SDL2 SDL2_image)
 endif(APPLE)

 IF(WIN32)


Python libs do not like tbb_debug linked into library during runtime

--- cmake/Packages/FindTBB.cmake
+++ cmake/Packages/FindTBB.cmake
@@ -148,10 +148,30 @@
     DOC "TBB debug library")

 IF (TBB_LIBRARY_RELEASE AND TBB_LIBRARY_DEBUG)
+    # decide if we should use debug version
+    SET (_USE_DEBUG OFF)
+    STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _BUILD_TYPE)
+    IF ("${_BUILD_TYPE}" STREQUAL "DEBUG" OR
+        "${_BUILD_TYPE}" STREQUAL "RELWITHDEBINFO" OR
+        "${CMAKE_CXX_FLAGS}" MATCHES " -g " OR
+        "${CMAKE_CXX_FLAGS}" MATCHES " -DDEBUG " OR
+        "${CMAKE_CXX_FLAGS}" MATCHES " -debug ")
+        SET (_USE_DEBUG ON)
+    ENDIF ("${_BUILD_TYPE}" STREQUAL "DEBUG" OR
+        "${_BUILD_TYPE}" STREQUAL "RELWITHDEBINFO" OR
+        "${CMAKE_CXX_FLAGS}" MATCHES " -g " OR
+        "${CMAKE_CXX_FLAGS}" MATCHES " -DDEBUG " OR
+        "${CMAKE_CXX_FLAGS}" MATCHES " -debug ")
+
     IF (NOT TBB_LIBRARY)
-        SET (TBB_LIBRARY optimized ${TBB_LIBRARY_RELEASE} debug ${TBB_LIBRARY_DEBUG}
-            CACHE DOC "TBB library" FORCE)
+        IF (_USE_DEBUG)
+            SET (TBB_LIBRARY ${TBB_LIBRARY_DEBUG} CACHE DOC "TBB library" FORCE)
+        ELSE (_USE_DEBUG)
+            SET (TBB_LIBRARY ${TBB_LIBRARY_RELEASE} CACHE DOC "TBB library" FORCE)
+        ENDIF (_USE_DEBUG)
     ENDIF (NOT TBB_LIBRARY)
+
+    UNSET (_USE_DEBUG)
 ELSEIF (TBB_LIBRARY_RELEASE)
     IF (NOT TBB_LIBRARY)
         SET (TBB_LIBRARY ${TBB_LIBRARY_RELEASE} CACHE DOC "TBB library" FORCE)


Propagate cmake generator

Propagate cmake generator

--- cmake/language_support.cmake
+++ cmake/language_support.cmake
@@ -43,7 +43,7 @@
   if(return_code EQUAL 0)
     # Second run
     execute_process (
-      COMMAND ${CMAKE_COMMAND} .
+      COMMAND ${CMAKE_COMMAND} . -G "${CMAKE_GENERATOR}"
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language}
       RESULT_VARIABLE return_code
       OUTPUT_QUIET


build: remove `MODULE` path from `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -824,11 +824,7 @@
     set(SWIFTLIB_SINGLE_SOURCES ${SWIFTLIB_SINGLE_SOURCES} ${SWIFTLIB_SINGLE_HEADERS} ${SWIFTLIB_SINGLE_TDS})
   endif()

-  if(MODULE)
-    set(libkind MODULE)
-  # If both SHARED and STATIC are specified, we add the SHARED library first.
-  # The STATIC library is handled further below.
-  elseif(SWIFTLIB_SINGLE_SHARED)
+  if(SWIFTLIB_SINGLE_SHARED)
     set(libkind SHARED)
   elseif(SWIFTLIB_SINGLE_STATIC)
     set(libkind STATIC)
@@ -981,12 +977,6 @@
   set_output_directory(${target}
       BINARY_DIR ${SWIFT_RUNTIME_OUTPUT_INTDIR}
       LIBRARY_DIR ${SWIFT_LIBRARY_OUTPUT_INTDIR})
-
-  if(MODULE)
-    set_target_properties("${target}" PROPERTIES
-        PREFIX ""
-        SUFFIX ${LLVM_PLUGIN_EXT})
-  endif()

   if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
     set(install_name_dir "@rpath")


Only use either mxml or mxml1

Only use either mxml or mxml1

--- cmake_include/FindMXML.cmake
+++ cmake_include/FindMXML.cmake
@@ -44,8 +44,4 @@
     message(FATAL_ERROR "User requested MXML not found!")
 endif()

-if(CMAKE_HOST_UNIX)
-    list(APPEND NAPI_LINK_LIBS mxml)
-else()
-    list(APPEND NAPI_LINK_LIBS mxml mxml1)
-endif()
+list(APPEND NAPI_LINK_LIBS ${MXML_LIBFILES})


Enable GMock to be built out of tree

Enable GMock to be built out of tree

Signed-off-by: Oscar Andreasson <7c96881024bc55b9728595b077993338c023b07f@pelagicore.com>

--- cmake_modules/AddGMock.cmake
+++ cmake_modules/AddGMock.cmake
@@ -33,7 +33,7 @@
     endif()

     if(IS_DIRECTORY ${MOCKDIR})
-        add_subdirectory(${MOCKDIR} EXCLUDE_FROM_ALL)
+        add_subdirectory(${MOCKDIR} ${CMAKE_CURRENT_BINARY_DIR}/gmock EXCLUDE_FROM_ALL)
     else()
         message(FATAL_ERROR "No ${MOCKDIR} found, can't add googletest")
     endif()


findblis updated

findblis updated

--- cmake_modules/FindBLIS.cmake
+++ cmake_modules/FindBLIS.cmake
@@ -5,11 +5,22 @@
 # BLIS_FOUND
 # BLIS_LIBRARIES

+# create list of libs to find
+set(BLIS_LIBS_to_find "blis")
+list(APPEND BLIS_LIBS_to_find "memkind")
+list(APPEND BLIS_LIBS_to_find "autohbw")

-# create list of libs to find
-FIND_LIBRARY(BLIS_LIBRARIES
-  NAMES blis
-)
+set(BLIS_LIBRARIES "")
+
+foreach(BLIS_lib ${BLIS_LIBS_to_find})
+  SET(BLIS_${BLIS_lib}_LIBRARY "BLIS_${BLIS_lib}_LIBRARY-NOTFOUND")
+  FIND_LIBRARY(BLIS_${BLIS_lib}_LIBRARY
+    NAMES ${BLIS_lib}
+    PATHS ${BLIS_CHECK_LIBRARY_DIRS}
+  )
+  mark_as_advanced(BLIS_${BLIS_lib}_LIBRARY)
+  list(APPEND BLIS_LIBRARIES ${BLIS_${BLIS_lib}_LIBRARY})
+endforeach ()

 # Handle the QUIETLY and REQUIRED arguments and set the HPDDM_FOUND to TRUE


Updated common.cmake

Updated common.cmake

--- common.cmake
+++ common.cmake
@@ -339,6 +339,20 @@
 	list(REMOVE_DUPLICATES ARGN)
 	list(SORT ARGN)
 	target_include_directories(${target} PRIVATE ${ARGN})
+endfunction()
+
+## target_add_system_includes(target includes...)
+# Add input system includes (files or directories) to target.
+#   {value} [in] target:     Target to add includes
+#   {value} [in] includes:   Includes to add
+function(target_add_system_includes target)
+	list(LENGTH ARGN size)
+	if(NOT ${size} GREATER 0)
+		return()
+	endif()
+	list(REMOVE_DUPLICATES ARGN)
+	list(SORT ARGN)
+	target_include_directories(${target} SYSTEM PRIVATE ${ARGN})
 endfunction()

 ## target_add_flag(target flag [configs...])
@@ -371,19 +385,51 @@
 endfunction()

 ## target_set_output_directory(target directory)
-# Set the target output directory to <input directory>/<config>.
+# Set the target runtime, library and archive output directory to the input directory.
 #   {value} [in] target:      Target to configure
 #   {value} [in] directory:   Output directory
 function(target_set_output_directory target directory)
+	target_set_runtime_output_directory(${target} "${directory}")
+	target_set_library_output_directory(${target} "${directory}")
+	target_set_archive_output_directory(${target} "${directory}")
+endfunction()
+
+## target_set_runtime_output_directory(target directory)
+# Set the target runtime output directory to the input directory.
+#   {value} [in] target:      Target to configure
+#   {value} [in] directory:   Output directory
+function(target_set_runtime_output_directory target directory)
 	set_target_properties(${target} PROPERTIES
 	  RUNTIME_OUTPUT_DIRECTORY                "${directory}"
-	  RUNTIME_OUTPUT_DIRECTORY_DEBUG          "${directory}/Debug"
-	  RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${directory}/RelWithDebInfo"
-	  RUNTIME_OUTPUT_DIRECTORY_RELEASE        "${directory}/Release"
+	  RUNTIME_OUTPUT_DIRECTORY_DEBUG          "${directory}"
+	  RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${directory}"
+	  RUNTIME_OUTPUT_DIRECTORY_RELEASE        "${directory}"
+	  )
+endfunction()
+
+## target_set_library_output_directory(target directory)
+# Set the target library output directory to the input directory.
+#   {value} [in] target:      Target to configure
+#   {value} [in] directory:   Output directory
+function(target_set_library_output_directory target directory)
+	set_target_properties(${target} PROPERTIES
 	  LIBRARY_OUTPUT_DIRECTORY                "${directory}"
-	  LIBRARY_OUTPUT_DIRECTORY_DEBUG          "${directory}/Debug"
-	  LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${directory}/RelWithDebInfo"
-	  LIBRARY_OUTPUT_DIRECTORY_RELEASE        "${directory}/Release"
+	  LIBRARY_OUTPUT_DIRECTORY_DEBUG          "${directory}"
+	  LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${directory}"
+	  LIBRARY_OUTPUT_DIRECTORY_RELEASE        "${directory}"
+	  )
+endfunction()
+
+## target_set_archive_output_directory(target directory)
+# Set the target archive output directory to the input directory.
+#   {value} [in] target:      Target to configure
+#   {value} [in] directory:   Output directory
+function(target_set_archive_output_directory target directory)
+	set_target_properties(${target} PROPERTIES
+	  ARCHIVE_OUTPUT_DIRECTORY                "${directory}"
+	  ARCHIVE_OUTPUT_DIRECTORY_DEBUG          "${directory}"
+	  ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO "${directory}"
+	  ARCHIVE_OUTPUT_DIRECTORY_RELEASE        "${directory}"
 	  )
 endfunction()

@@ -455,7 +501,7 @@
 endfunction()

 ## setup_gcc(target [OPTIONS [static_runtime] [c] [cxx] [no_warnings] [low_warnings]])
-# Set up msvc-specific options of the target.
+# Set up gcc-specific options of the target.
 # Without options: maximum warnings are enabled.
 #   {value}  [in] target:           Target to configure
 #   {option} [in] static_runtime:   If present, C runtime library is statically linked
@@ -517,6 +563,7 @@
 		  "-Wcast-align"
 		  "-Wwrite-strings"
 		  "-Wconversion"
+		  "-Wsign-conversion"
 		  "-Wdate-time"
 		  "-Wextra-semi"
 		  "-Wlogical-op"
@@ -526,10 +573,27 @@
 		  #"-Winline"
 		  "-Winvalid-pch"
 		  "-Woverlength-strings"
+		  "-Wformat=2"
+		  "-Wformat-signedness"
+		  "-Winit-self"
+
+		  ## Optimisation dependant flags
+		  "-Wstrict-overflow=5"
+
+		  ## Info flags
+		  #"-Winvalid-pch"
+		  #"-Wvolatile-register-var"
+		  #"-Wdisabled-optimization"
+		  #"-Woverlength-strings"
+		  #"-Wunsuffixed-float-constants"
+		  #"-Wvector-operation-performance"

 		  ## Apocalypse flags:
 		  #"-Wsystem-headers"
 		  #"-Werror"
+
+		  ## Exit on first error
+		  "-Wfatal-errors"
 		  )
 		if(option_c)
 			set(c_flags
@@ -548,18 +612,166 @@
 		endif()
 		if(option_cxx)
 			set(cxx_flags
-			  "-Wsuggest-override"
 			  "-Wzero-as-null-pointer-constant"
 			  "-Wsubobject-linkage"
 			  "-Wdelete-incomplete"
 			  "-Wuseless-cast"
+			  "-Wctor-dtor-privacy"
+			  "-Wnoexcept"
+			  "-Wregister"
+			  "-Wstrict-null-sentinel"
+			  "-Wold-style-cast"
+			  "-Woverloaded-virtual"
+
+			  ## Suggestions
+			  "-Wsuggest-override"
+			  #"-Wsuggest-final-types"
+			  #"-Wsuggest-final-methods"
+			  #"-Wsuggest-attribute=pure"
+			  #"-Wsuggest-attribute=const"
+			  #"-Wsuggest-attribute=noreturn"
+			  #"-Wsuggest-attribute=format"
+
+			  ## Guidelines from Scott Meyers’ Effective C++ series of books
+			  "-Weffc++"
+
+			  ## Special purpose
+			  #"-Wsign-promo"
+			  #"-Wtemplates"
+			  #"-Wmultiple-inheritance"
+			  #"-Wvirtual-inheritance"
+			  #"-Wnamespaces"
+
+			  ## Standard versions
 			  #"-Wc++11-compat"
 			  #"-Wc++14-compat"
-			  #"-Wc++1z-compat"
+			  #"-Wc++17-compat"
 			  )
 		endif()
 	endif()
 	foreach(flag IN ITEMS ${flags} ${c_flags} ${cxx_flags})
+		target_add_flag(${target} ${flag})
+	endforeach()
+endfunction()
+
+## setup_clang(target [OPTIONS [static_runtime] [no_warnings] [low_warnings]])
+# Set up clang-specific options of the target.
+# Without options: maximum warnings are enabled.
+#   {value}  [in] target:           Target to configure
+#   {option} [in] static_runtime:   If present, C runtime library is statically linked
+#   {option} [in] no_warnings:      If present, warnings are disabled (useful for external projects)
+#   {option} [in] low_warnings:     If present, low/normal warnings are enabled
+function(setup_clang target)
+	split_args(ignore "OPTIONS" options ${ARGN})
+	has_item(option_static_runtime "static_runtime" ${options})
+	has_item(option_no_warnings "no_warnings" ${options})
+	has_item(option_low_warnings "low_warnings" ${options})
+
+	# statically link C runtime library to static_runtime targets
+	if(option_static_runtime)
+		target_add_flag(${target} "-static-libgcc")
+		target_add_flag(${target} "-static-libstdc++")
+	endif()
+
+	# manage warnings
+	set(flags)
+	if(option_no_warnings)
+		set(flags "-Wno-everything")
+	elseif(option_low_warnings)
+		set(flags "-pedantic" "-Wall")
+	else()
+		set(flags
+		  ## Base flags:
+		  "-pedantic"
+		  "-Wall"
+		  "-Wextra"
+
+		  ## Extra flags:
+		  "-Wbad-function-cast"
+		  "-Wcomplex-component-init"
+		  "-Wconditional-uninitialized"
+		  "-Wcovered-switch-default"
+		  "-Wcstring-format-directive"
+		  "-Wdelete-non-virtual-dtor"
+		  "-Wdeprecated"
+		  "-Wdollar-in-identifier-extension"
+		  "-Wdouble-promotion"
+		  "-Wduplicate-enum"
+		  "-Wduplicate-method-arg"
+		  "-Wembedded-directive"
+		  "-Wexpansion-to-defined"
+		  "-Wextended-offsetof"
+		  "-Wfloat-conversion"
+		  "-Wfloat-equal"
+		  "-Wfor-loop-analysis"
+		  "-Wformat-pedantic"
+		  "-Wgnu"
+		  "-Wimplicit-fallthrough"
+		  "-Winfinite-recursion"
+		  "-Winvalid-or-nonexistent-directory"
+		  "-Wkeyword-macro"
+		  "-Wmain"
+		  "-Wmethod-signatures"
+		  "-Wmicrosoft"
+		  "-Wmismatched-tags"
+		  "-Wmissing-field-initializers"
+		  "-Wmissing-method-return-type"
+		  "-Wmissing-prototypes"
+		  "-Wmissing-variable-declarations"
+		  "-Wnested-anon-types"
+		  "-Wnon-virtual-dtor"
+		  "-Wnonportable-system-include-path"
+		  "-Wnull-pointer-arithmetic"
+		  "-Wnullability-extension"
+		  "-Wold-style-cast"
+		  "-Woverriding-method-mismatch"
+		  "-Wpacked"
+		  "-Wpedantic"
+		  "-Wpessimizing-move"
+		  "-Wredundant-move"
+		  "-Wreserved-id-macro"
+		  "-Wself-assign"
+		  "-Wself-move"
+		  "-Wsemicolon-before-method-body"
+		  "-Wshadow"
+		  "-Wshadow-field"
+		  "-Wshadow-field-in-constructor"
+		  "-Wshadow-uncaptured-local"
+		  "-Wshift-sign-overflow"
+		  "-Wshorten-64-to-32"
+		  #"-Wsign-compare"
+		  #"-Wsign-conversion"
+		  "-Wsigned-enum-bitfield"
+		  "-Wstatic-in-inline"
+		  #"-Wstrict-prototypes"
+		  #"-Wstring-conversion"
+		  #"-Wswitch-enum"
+		  "-Wtautological-compare"
+		  "-Wtautological-overlap-compare"
+		  "-Wthread-safety"
+		  "-Wundefined-reinterpret-cast"
+		  "-Wuninitialized"
+		  #"-Wunknown-pragmas"
+		  "-Wunreachable-code"
+		  "-Wunreachable-code-aggressive"
+		  #"-Wunused"
+		  "-Wunused-const-variable"
+		  "-Wunused-lambda-capture"
+		  "-Wunused-local-typedef"
+		  "-Wunused-parameter"
+		  "-Wunused-private-field"
+		  "-Wunused-template"
+		  "-Wunused-variable"
+		  "-Wused-but-marked-unused"
+		  "-Wzero-as-null-pointer-constant"
+		  "-Wzero-length-array"
+
+		  ## Info flags
+		  "-Wcomma"
+		  "-Wcomment"
+		  )
+	endif()
+	foreach(flag ${flags})
 		target_add_flag(${target} ${flag})
 	endforeach()
 endfunction()
@@ -575,12 +787,14 @@
 		setup_msvc(${target} OPTIONS ${ARGN})
 	elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
 		setup_gcc(${target} OPTIONS ${ARGN})
+	elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
+		setup_clang(${target} OPTIONS ${ARGN})
 	else()
-		message(FATAL_ERROR "unsupported compiler ${CMAKE_CXX_COMPILER_ID}")
-	endif()
-endfunction()
-
-## make_target(target group files... [INCLUDES includes...]
+		message(WARNING "Unsupported compiler (${CMAKE_CXX_COMPILER_ID}) setup")
+	endif()
+endfunction()
+
+## make_target(target group files... [INCLUDES includes...] [EXT_INCLUDES ext_includes...]
 ##     [OPTIONS [executable] [test] [shared] [static_runtime] [c] [cxx] [no_warnings] [low_warnings]])
 # Make a new target with the input options
 # By default targets are static libraries.
@@ -588,6 +802,7 @@
 #   {value}  [in] group:            Group of the target (can contain '/'' for subgroups)
 #   {value}  [in] files:            Source files
 #   {value}  [in] includes:         Include files
+#   {value}  [in] ext_includes:     External include files (no warnings)
 #   {option} [in] executable:       If present, build an executable
 #   {option} [in] test:             If present, build a test executable
 #   {option} [in] shared:           If present, build a shared library
@@ -601,10 +816,12 @@

 	# initialize additional include directory list
 	set(includes)
+	set(ext_includes)

 	# get options
 	split_args(inputs "OPTIONS" options ${ARGN})
-	split_args(files "INCLUDES" includes ${inputs})
+	split_args(inputs2 "EXT_INCLUDES" ext_includes ${inputs})
+	split_args(files "INCLUDES" includes ${inputs2})
 	has_item(is_executable "executable" ${options})
 	has_item(is_test "test" ${options})
 	has_item(is_shared "shared" ${options})
@@ -630,6 +847,7 @@

 	# add all additional include directories
 	target_add_includes(${target} ${includes})
+	target_add_system_includes(${target} ${ext_includes})

 	# set directories for IDE
 	source_group(CMake REGULAR_EXPRESSION ".*[.](cmake|rule)$")
@@ -637,6 +855,18 @@
 	set_target_properties(${target} PROPERTIES FOLDER ${group})
 endfunction()

+## configure_folder(input_folder output_folder)
+# Recursively copie all files from an input folder to an output folder
+#   {value} [in] input_folder:    Input folder
+#   {value} [in] output_folder:   Output folder
+function(configure_folder input_folder output_folder)
+	file(GLOB_RECURSE files "${input_folder}" "${input_folder}/*")
+	foreach(file ${files})
+		file(RELATIVE_PATH relative_file ${input_folder} ${file})
+		configure_file(${file} "${output_folder}/${relative_file}" COPYONLY)
+	endforeach()
+endfunction()
+

 # disable compiler specific extensions
 set(CMAKE_C_EXTENSIONS OFF)
@@ -652,10 +882,19 @@

 # place generated binaries in build/bin
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/bin)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/build/bin/)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/build/bin/)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/build/bin/)

 # place generated libs in build/lib
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib)
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/build/lib/)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/build/lib/)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/build/lib/)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/build/lib/)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/build/lib/)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/build/lib/)

 # enable IDE folders
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
@@ -677,7 +916,7 @@
 	add_cx_flag(${target} "/Ox" RELEASE)

 	# enables automatic parallelization of loops
-	#add_cx_flag(${target} "/Qpar" RELEASE)
+	add_cx_flag(${target} "/Qpar" RELEASE)

 	# enable runtime checks
 	add_cx_flag("/RTC1" DEBUG)


CMake Fixes for win32

CMake Fixes for win32

--- common.cmake
+++ common.cmake
@@ -12,20 +12,27 @@
 INCLUDE (CPack)
 INCLUDE (CTest)

-set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-
 # Compiler-specific C++11 activation.
 if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
+    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
+    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
+    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
+    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+
     execute_process(
         COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
     if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
         message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.")
     endif ()
 elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+
+    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
+    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
+    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
+    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
 elseif(${CMAKE_MAKE_PROGRAM} MATCHES "(msdev|devenv|nmake|MSBuild)")
     add_definitions("/W2")


Introduce "SUPERBUILD_TOPLEVEL_PROJECT" project variable

For any explicit call to "ctkMacroCheckExternalProjectDependency(<projname>)",
the variable SUPERBUILD_TOPLEVEL_PROJECT will be ensured to be set to <projname>
within each of the dependent external project.

This variable can be used within any external project to set variable or
property specific to a given top-level project.

See #418

--- CMake/ctkMacroCheckExternalProjectDependency.cmake
+++ CMake/ctkMacroCheckExternalProjectDependency.cmake
@@ -69,11 +69,15 @@
     message(FATAL_ERROR "${__indent}${proj}_DEPENDENCIES variable is NOT defined !")
   endif()

+  if(NOT DEFINED SUPERBUILD_TOPLEVEL_PROJECT)
+    set(SUPERBUILD_TOPLEVEL_PROJECT ${proj})
+  endif()
+
   # Keep track of the projects
-  list(APPEND __epd_${CMAKE_PROJECT_NAME}_projects ${proj})
-
-  # Is this the first run ? (used to set the <CMAKE_PROJECT_NAME>_USE_SYSTEM_* variables)
-  if(${proj} STREQUAL ${CMAKE_PROJECT_NAME} AND NOT DEFINED __epd_first_pass)
+  list(APPEND __epd_${SUPERBUILD_TOPLEVEL_PROJECT}_projects ${proj})
+
+  # Is this the first run ? (used to set the <SUPERBUILD_TOPLEVEL_PROJECT>_USE_SYSTEM_* variables)
+  if(${proj} STREQUAL ${SUPERBUILD_TOPLEVEL_PROJECT} AND NOT DEFINED __epd_first_pass)
     message(STATUS "SuperBuild - First pass")
     set(__epd_first_pass TRUE)
   endif()
@@ -81,7 +85,7 @@
   # Set message strings
   set(__${proj}_indent ${__indent})
   set(__${proj}_superbuild_message "SuperBuild - ${__indent}${proj}[OK]")
-  if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
+  if(${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${proj})
     set(__${proj}_superbuild_message "${__${proj}_superbuild_message} (SYSTEM)")
   endif()

@@ -102,11 +106,11 @@
   endif()

   foreach(dep ${${proj}_DEPENDENCIES})
-    if(${${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}})
-      set(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${dep} ${${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}})
+    if(${${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${proj}})
+      set(${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${dep} ${${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${proj}})
     endif()
     #if(__epd_first_pass)
-    #  message("${CMAKE_PROJECT_NAME}_USE_SYSTEM_${dep} set to [${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}:${${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}}]")
+    #  message("${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${dep} set to [${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${proj}:${${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${proj}}]")
     #endif()
   endforeach()

@@ -139,17 +143,17 @@
     string(SUBSTRING "${__indent}" 0 ${__indent_length} __indent)
   endif()

-  if(${proj} STREQUAL ${CMAKE_PROJECT_NAME} AND __epd_first_pass)
+  if(${proj} STREQUAL ${SUPERBUILD_TOPLEVEL_PROJECT} AND __epd_first_pass)
     message(STATUS "SuperBuild - First pass - done")
     unset(__indent)
-    if(${CMAKE_PROJECT_NAME}_SUPERBUILD)
+    if(${SUPERBUILD_TOPLEVEL_PROJECT}_SUPERBUILD)
       set(__epd_first_pass FALSE)
     endif()

-    unset(${CMAKE_PROJECT_NAME}_DEPENDENCIES) # XXX - Refactor
-
-    foreach(possible_proj ${__epd_${CMAKE_PROJECT_NAME}_projects})
-      if(NOT ${possible_proj} STREQUAL ${CMAKE_PROJECT_NAME})
+    unset(${SUPERBUILD_TOPLEVEL_PROJECT}_DEPENDENCIES) # XXX - Refactor
+
+    foreach(possible_proj ${__epd_${SUPERBUILD_TOPLEVEL_PROJECT}_projects})
+      if(NOT ${possible_proj} STREQUAL ${SUPERBUILD_TOPLEVEL_PROJECT})

         set_property(GLOBAL PROPERTY ${EXTERNAL_PROJECT_FILE_PREFIX}${possible_proj}_FILE_INCLUDED 0)

@@ -157,23 +161,23 @@
         if(DEFINED ${possible_proj}_enabling_variable)
           ctkMacroShouldAddExternalproject(${${possible_proj}_enabling_variable} add_project)
           if(${add_project})
-            list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES ${possible_proj})
+            list(APPEND ${SUPERBUILD_TOPLEVEL_PROJECT}_DEPENDENCIES ${possible_proj})
           else()
             # XXX HACK
             if(${possible_proj} STREQUAL "VTK"
                AND CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
-              list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES VTK)
+              list(APPEND ${SUPERBUILD_TOPLEVEL_PROJECT}_DEPENDENCIES VTK)
             else()
               unset(${${possible_proj}_enabling_variable}_INCLUDE_DIRS)
               unset(${${possible_proj}_enabling_variable}_LIBRARY_DIRS)
               unset(${${possible_proj}_enabling_variable}_FIND_PACKAGE_CMD)
-              if(${CMAKE_PROJECT_NAME}_SUPERBUILD)
+              if(${SUPERBUILD_TOPLEVEL_PROJECT}_SUPERBUILD)
                 message(STATUS "SuperBuild - ${possible_proj}[OPTIONAL]")
               endif()
             endif()
           endif()
         else()
-          list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES ${possible_proj})
+          list(APPEND ${SUPERBUILD_TOPLEVEL_PROJECT}_DEPENDENCIES ${possible_proj})
         endif()
         # XXX

@@ -182,10 +186,11 @@
       endif()
     endforeach()

-    list(REMOVE_DUPLICATES ${CMAKE_PROJECT_NAME}_DEPENDENCIES)
-
-    if(${CMAKE_PROJECT_NAME}_SUPERBUILD)
-      ctkMacroCheckExternalProjectDependency(${CMAKE_PROJECT_NAME})
+    list(REMOVE_DUPLICATES ${SUPERBUILD_TOPLEVEL_PROJECT}_DEPENDENCIES)
+
+    if(${SUPERBUILD_TOPLEVEL_PROJECT}_SUPERBUILD)
+
+      ctkMacroCheckExternalProjectDependency(${SUPERBUILD_TOPLEVEL_PROJECT})
     endif()

   endif()


Remove now unneccessary Argtable CMake include

--- cmake/Modules/FindArgtable.cmake
+++ cmake/Modules/FindArgtable.cmake
@@ -1,44 +0,0 @@
-# https://raw.githubusercontent.com/cinemast/libjson-rpc-cpp/master/cmake/FindArgtable.cmake
-# - Try to find ARGTABLE
-# Once done this will define
-#
-#  ARGTABLE_FOUND - system has ARGTABLE
-#  ARGTABLE_INCLUDE_DIRS - the ARGTABLE include directory
-#  ARGTABLE_LIBRARIES - Link these to use ARGTABLE
-
-find_path(
-    ARGTABLE_INCLUDE_DIR
-    NAMES argtable2.h
-    DOC "argtable include dir"
-)
-
-find_library(
-    ARGTABLE_LIBRARY
-    NAMES argtable2
-    DOC "argtable library"
-)
-
-set(ARGTABLE_INCLUDE_DIRS ${ARGTABLE_INCLUDE_DIR})
-set(ARGTABLE_LIBRARIES ${ARGTABLE_LIBRARY})
-
-# debug library on windows
-# same naming convention as in qt (appending debug library with d)
-# boost is using the same "hack" as us with "optimized" and "debug"
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-    find_library(
-        ARGTABLE_LIBRARY_DEBUG
-        NAMES argtable2d
-        DOC "argtable debug library"
-    )
-
-    set(ARGTABLE_LIBRARIES optimized ${ARGTABLE_LIBRARIES} debug ${ARGTABLE_LIBRARY_DEBUG})
-
-endif()
-
-# handle the QUIETLY and REQUIRED arguments and set JSONCPP_FOUND to TRUE
-# if all listed variables are TRUE, hide their existence from configuration view
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
-    argtable DEFAULT_MSG ARGTABLE_INCLUDE_DIR ARGTABLE_LIBRARY
-)
-mark_as_advanced(ARGTABLE_INCLUDE_DIR ARGTABLE_LIBRARY)


llvm: use bintools/gnu/target_bintools.cmake

Fixes llvm inclusion of gnu/target_bintools.cmake.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/bintools/llvm/target.cmake
+++ cmake/bintools/llvm/target.cmake
@@ -14,9 +14,5 @@
 find_program(CMAKE_OBJCOPY objcopy      ${find_program_binutils_args})
 find_program(CMAKE_READELF readelf      ${find_program_binutils_args})

-# Use the gnu binutil abstraction macros
-include(${ZEPHYR_BASE}/cmake/bintools/gnu/target_memusage.cmake)
-include(${ZEPHYR_BASE}/cmake/bintools/gnu/target_objcopy.cmake)
-include(${ZEPHYR_BASE}/cmake/bintools/gnu/target_objdump.cmake)
-include(${ZEPHYR_BASE}/cmake/bintools/gnu/target_readelf.cmake)
-include(${ZEPHYR_BASE}/cmake/bintools/gnu/target_strip.cmake)
+# Use the gnu binutil abstraction
+include(${ZEPHYR_BASE}/cmake/bintools/gnu/target_bintools.cmake)


Simplify per-configuration target directory logic

If the loop is being executed CMAKE_CONFIGURATION_TYPES is non-empty.

--- conf/sprokit-macro-targets.cmake
+++ conf/sprokit-macro-targets.cmake
@@ -177,12 +177,7 @@
     configure-config.h)

   foreach (config IN LISTS CMAKE_CONFIGURATION_TYPES)
-    set(subdir "${library_subdir}${library_subdir_suffix}")
-
-    if (CMAKE_CONFIGURATION_TYPES)
-      set(subdir "${library_subdir}/${config}${library_subdir_suffix}")
-    endif ()
-
+    set(subdir "${library_subdir}/${config}${library_subdir_suffix}")
     string(TOUPPER "${config}" upper_config)

     set_target_properties(${name}


remove dead code

remove dead code

--- cmake/cocl.cmake
+++ cmake/cocl.cmake
@@ -10,50 +10,3 @@
         DEPENDS ${OUTPUT}
     )
 endmacro(add_cocl_executable)
-
-# add_custom_command()
-
-# aMACRO(add_ srcfile)
-
-
-#   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-
-#   ### C/C++ sources
-#   IF(src)
-
-#     ADD_LIBRARY(${package} MODULE ${src})
-#     if(BUILD_STATIC)
-#       ADD_LIBRARY(${package}_static STATIC ${src})
-#     endif()
-
-#     ### Torch packages supposes libraries prefix is "lib"
-#     SET_TARGET_PROPERTIES(${package} PROPERTIES
-#       PREFIX "lib"
-#       IMPORT_PREFIX "lib"
-#       INSTALL_NAME_DIR "@executable_path/${Torch_INSTALL_BIN2CPATH}")
-
-#     IF(APPLE)
-#       SET_TARGET_PROPERTIES(${package} PROPERTIES
-#         LINK_FLAGS "-undefined dynamic_lookup")
-#     ENDIF()
-
-#     if(BUILD_STATIC)
-#       SET_TARGET_PROPERTIES(${package}_static PROPERTIES
-#         COMPILE_FLAGS "-fPIC")
-#       SET_TARGET_PROPERTIES(${package}_static PROPERTIES
-#         PREFIX "lib" IMPORT_PREFIX "lib" OUTPUT_NAME "${package}")
-#     endif()
-
-#     INSTALL(TARGETS ${package}
-#       RUNTIME DESTINATION ${Torch_INSTALL_LUA_CPATH_SUBDIR}
-#       LIBRARY DESTINATION ${Torch_INSTALL_LUA_CPATH_SUBDIR})
-
-#   ENDIF(src)
-
-#   ### lua sources
-#   IF(luasrc)
-#     INSTALL(FILES ${luasrc}
-#       DESTINATION ${Torch_INSTALL_LUA_PATH_SUBDIR}/${package})
-#   ENDIF(luasrc)
-
-# ENDMACRO(add_cocl_executable)


Update FIPS_PROJECT_xxx_DIR inside fips_project() (fixes #136)

--- cmake/fips.cmake
+++ cmake/fips.cmake
@@ -67,6 +67,9 @@
     endif()
     if (_fs_PROJECT)
         project(${_fs_PROJECT})
+        message("=== fips_setup(PROJECT ${_fs_PROJECT})")
+    else()
+        message("=== fips_setup()")
     endif()

     message("CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
@@ -231,7 +234,12 @@
 #   Starts a new project.
 #
 macro(fips_project proj)
+    message("=== fips_project(${proj})")
     project(${proj})
+    get_filename_component(FIPS_PROJECT_BUILD_DIR "${FIPS_BUILD_DIR}/${CMAKE_PROJECT_NAME}/${FIPS_CONFIG}" ABSOLUTE)
+    message("FIPS_PROJECT_BUILD_DIR: ${FIPS_PROJECT_BUILD_DIR}")
+    get_filename_component(FIPS_PROJECT_DEPLOY_DIR "${FIPS_DEPLOY_DIR}/${CMAKE_PROJECT_NAME}/${FIPS_CONFIG}" ABSOLUTE)
+    message("FIPS_PROJECT_DEPLOY_DIR: ${FIPS_PROJECT_DEPLOY_DIR}")
 endmacro()

 #-------------------------------------------------------------------------------


minor cleanup

minor cleanup

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@7833 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/pods.cmake
+++ cmake/pods.cmake
@@ -400,9 +400,9 @@
                     add_dependencies(${target} ${__depend_target_name})
                 endif()
         endforeach()
-    endif()
-
-    unset(_split_ldflags)
+ 	unset(_split_ldflags)
+    endif()
+
     unset(_pods_pkg_include_flags)
     unset(_pods_pkg_ldflags)
 endmacro()


Finishing touches before sim

Finishing touches before sim

Former-commit-id: 3ca3b705bdb888c27e56ad036d45abf70244d321

--- cmake-modules/Fetch_h5pp.cmake
+++ cmake-modules/Fetch_h5pp.cmake
@@ -35,6 +35,7 @@
     add_library(h5pp::h5pp ALIAS h5pp)
     set(H5PP_INCLUDE_DIR ${INSTALL_DIR}/include)
     add_dependencies(h5pp external_H5PP)
+    add_dependencies(h5pp Eigen3::Eigen spdlog::spdlog hdf5::hdf5)
     target_include_directories(h5pp INTERFACE ${H5PP_INCLUDE_DIR})
 #    target_link_libraries(h5pp INTERFACE Eigen3 hdf5 spdlog)
 endif()


#55 Remove unneeded search of stdint.h as of VS2013+ in FindFFMPEG.cmake

--- cmake/Modules/FindFFMPEG.cmake
+++ cmake/Modules/FindFFMPEG.cmake
@@ -89,37 +89,6 @@

 SET(FFMPEG_ROOT "$ENV{FFMPEG_ROOT}" CACHE PATH "Location of FFmpeg")

-# find stdint.h
-IF(MSVC)
-
-    FIND_PATH(FFMPEG_STDINT_INCLUDE_DIR stdint.h
-        PATHS
-        ${FFMPEG_ROOT}/include
-        $ENV{FFMPEG_ROOT}/include
-        ~/Library/Frameworks
-        /Library/Frameworks
-        /usr/local/include
-        /usr/include
-        /sw/include # Fink
-        /opt/local/include # DarwinPorts
-        /opt/csw/include # Blastwave
-        /opt/include
-        /usr/freeware/include
-        ${CMAKE_SOURCE_DIR}/deps/headers/msvc
-        PATH_SUFFIXES ffmpeg
-        DOC "Location of FFMPEG stdint.h Header"
-    )
-
-    IF (FFMPEG_STDINT_INCLUDE_DIR)
-        SET(STDINT_OK TRUE)
-    ENDIF()
-
-ELSE()
-
-    SET(STDINT_OK TRUE)
-
-ENDIF()
-
 FFMPEG_FIND(LIBAVFORMAT avformat avformat.h)
 FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h)
 FFMPEG_FIND(LIBAVCODEC  avcodec  avcodec.h)
@@ -128,7 +97,7 @@
 FFMPEG_FIND(LIBSWRESAMPLE swresample swresample.h)

 SET(FFMPEG_FOUND "NO" CACHE STRING "FFmpeg found status" FORCE)
-IF   (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND AND FFMPEG_LIBSWSCALE_FOUND AND FFMPEG_LIBSWRESAMPLE_FOUND AND STDINT_OK)
+IF   (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND AND FFMPEG_LIBSWSCALE_FOUND AND FFMPEG_LIBSWRESAMPLE_FOUND)

     SET(FFMPEG_FOUND "YES" CACHE STRING "FFmpeg found status" FORCE)

@@ -141,16 +110,6 @@
         ${FFMPEG_LIBSWRESAMPLE_INCLUDE_DIRS}
         CACHE STRING "FFmpeg include paths" FORCE
     )
-
-# Using the new include style for FFmpeg prevents issues with #include <time.h>
-    IF (FFMPEG_STDINT_INCLUDE_DIR)
-        SET(FFMPEG_INCLUDE_DIRS
-            ${FFMPEG_INCLUDE_DIRS}
-            ${FFMPEG_STDINT_INCLUDE_DIR}
-            CACHE STRING "FFmpeg include paths" FORCE
-        )
-    ENDIF()
-

     SET(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBAVFORMAT_LIBRARY_DIRS} PARENT_SCOPE)
     SET(FFMPEG_LIBRARIES


Mourads patch

Mourads patch

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -19,10 +19,11 @@
 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
     HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni
+    $ENV{PROGRAMFILES}/OpenNI/include
     PATH_SUFFIXES openni)
 #add a hint so that it can find it without the pkg-config
 find_library(OPENNI_LIBRARY OpenNI
-    HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib)
+    HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib $ENV{PROGRAMFILES}/OpenNI/Lib)

 set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
 set(OPENNI_LIBRARIES ${OPENNI_LIBRARY})


cmake: find libjeffpc-comm.so as well

cmake: find libjeffpc-comm.so as well

Signed-off-by: Josef 'Jeff' Sipek <a620f141433c70aa9e43778305a6c68cbfadfb25@josefsipek.net>

--- cmake/Modules/Findjeffpc.cmake
+++ cmake/Modules/Findjeffpc.cmake
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2016 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+# Copyright (c) 2016-2017 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -26,10 +26,12 @@
 # This module defines:
 #   JEFFPC_INCLUDE_DIR
 #   JEFFPC_LIBRARY
+#   JEFFPC_COMM_LIBRARY
 #   JEFFPC_FOUND
 #
 # Use the following variables to help locate the library and header files.
 #   WITH_JEFFPC_LIB=x      - directory containing libjeffpc.so
+#   WITH_JEFFPC_COMM_LIB=x - directory containing libjeffpc-comm.so
 #   WITH_JEFFPC_INCLUDES=x - directory containing jeffpc/jeffpc.h
 #   WITH_JEFFPC=x          - same as setting WITH_JEFFPC_LIB=x/lib and
 #                            WITH_JEFFPC_INCLUDES=x/include
@@ -38,6 +40,9 @@
 if (WITH_JEFFPC)
 	if (NOT WITH_JEFFPC_LIB)
 		set(WITH_JEFFPC_LIB "${WITH_JEFFPC}/lib")
+	endif()
+	if (NOT WITH_JEFFPC_COMM_LIB)
+		set(WITH_JEFFPC_COMM_LIB "${WITH_JEFFPC}/lib")
 	endif()
 	if (NOT WITH_JEFFPC_INCLUDES)
 		set(WITH_JEFFPC_INCLUDES "${WITH_JEFFPC}/include")
@@ -49,6 +54,9 @@
 find_library(JEFFPC_LIBRARY NAMES jeffpc
 	PATHS ${WITH_JEFFPC_LIB}
 )
+find_library(JEFFPC_COMM_LIBRARY NAMES jeffpc-comm
+	PATHS ${WITH_JEFFPC_COMM_LIB}
+)

 #
 # Handle the QUIETLY and REQUIRED arguments and set JEFFPC_FOUND to TRUE if
@@ -57,3 +65,5 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(JEFFPC DEFAULT_MSG JEFFPC_LIBRARY
 	JEFFPC_INCLUDE_DIR)
+find_package_handle_standard_args(JEFFPC_COMM DEFAULT_MSG JEFFPC_COMM_LIBRARY
+	JEFFPC_INCLUDE_DIR)


cmake: simplify recuperation of git hash

--- cmake/Modules/git_commit.cmake
+++ cmake/Modules/git_commit.cmake
@@ -8,15 +8,12 @@
       execute_process(
          COMMAND           "${GIT}" rev-parse --short HEAD
          WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
-         OUTPUT_VARIABLE   GIT_SHORT_HASH
+         OUTPUT_VARIABLE   EOVIM_GIT_HASH
          RESULT_VARIABLE   GIT_STATUS
-         ERROR_QUIET)
+         ERROR_QUIET
+         OUTPUT_STRIP_TRAILING_WHITESPACE)
       if (GIT_STATUS EQUAL 0)
-         # Git adds a newline, that needs to be nuked.
-         # XXX Windows?? How about your godammit \r\n?
-         string(REPLACE "\n" "" GIT_SHORT_HASH "${GIT_SHORT_HASH}")
-         set(EOVIM_GIT_HASH "${GIT_SHORT_HASH}")
+         message(STATUS "Short git hash: ${EOVIM_GIT_HASH}")
       endif ()
-
    endif ()
 endif ()


Unable to checkout a git commit hash if you shadow clone the repo

--- cmake/modules/BuildGTest.cmake
+++ cmake/modules/BuildGTest.cmake
@@ -19,7 +19,6 @@
     gtest
     GIT_REPOSITORY https://github.com/google/googletest.git
     GIT_TAG 4e4df226fc197c0dda6e37f5c8c3845ca1e73a49
-    GIT_SHALLOW true

     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${GTEST_INSTALL_DIR} -DCMAKE_CXX_FLAGS=${GTEST_ADD_CXX_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_GMOCK=${BUILD_GMOCK} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -Dgmock_build_tests=OFF -Dgtest_force_shared_crt=ON
     INSTALL_DIR ${GTEST_INSTALL_DIR}


cmake/modules/FindCYTHON.cmake: Use `print` with parentheses.

--- cmake/modules/FindCYTHON.cmake
+++ cmake/modules/FindCYTHON.cmake
@@ -4,7 +4,7 @@
 IF(PYTHONINTERP_FOUND)
     IF(NOT PYTHON_CYTHON)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "import cython; print cython.__file__"
+                            "import cython; print(cython.__file__)"
                             RESULT_VARIABLE PYTHON_CYTHON_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_CYTHON
                             OUTPUT_STRIP_TRAILING_WHITESPACE)


build: fix pythonarchlib for non /usr installs

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -113,7 +113,7 @@
             set(PYTHON_QUERY_PART_08 "print(sysconfig.get_config_var('LIBDIR'));")
             set(PYTHON_QUERY_PART_09 "print(sysconfig.get_config_var('MULTIARCH'));")
             set(PYTHON_QUERY_PART_10 "print(sysconfig.get_config_var('LDLIBRARY'));")
-            set(PYTHON_QUERY_PART_11 "print(sysconfig.get_python_lib()[5:]);")
+            set(PYTHON_QUERY_PART_11 "print(sysconfig.get_python_lib(plat_specific=True, prefix=''));")
 	    set(PYTHON_QUERY_PART_12 "print(sysconfig.get_config_var('SO'));")

             set(PYTHON_QUERY_COMMAND "${PYTHON_QUERY_PART_01}${PYTHON_QUERY_PART_02}${PYTHON_QUERY_PART_03}${PYTHON_QUERY_PART_04}${PYTHON_QUERY_PART_05}${PYTHON_QUERY_PART_06}${PYTHON_QUERY_PART_07}${PYTHON_QUERY_PART_08}${PYTHON_QUERY_PART_09}${PYTHON_QUERY_PART_10}${PYTHON_QUERY_PART_11}${PYTHON_QUERY_PART_12}")
@@ -166,7 +166,7 @@
             set(PYTHON_QUERY_PART_08 "print(sysconfig.get_config_var('LIBDIR'));")
             set(PYTHON_QUERY_PART_09 "print(sysconfig.get_config_var('MULTIARCH'));")
             set(PYTHON_QUERY_PART_10 "print(sysconfig.get_config_var('LDLIBRARY'));")
-            set(PYTHON_QUERY_PART_11 "print(sysconfig.get_python_lib()[5:]);")
+            set(PYTHON_QUERY_PART_11 "print(sysconfig.get_python_lib(plat_specific=True, prefix=''));")
 	    set(PYTHON_QUERY_PART_12 "print(sysconfig.get_config_var('SO'));")

             set(PYTHON_QUERY_COMMAND "${PYTHON_QUERY_PART_01}${PYTHON_QUERY_PART_02}${PYTHON_QUERY_PART_03}${PYTHON_QUERY_PART_04}${PYTHON_QUERY_PART_05}${PYTHON_QUERY_PART_06}${PYTHON_QUERY_PART_07}${PYTHON_QUERY_PART_08}${PYTHON_QUERY_PART_09}${PYTHON_QUERY_PART_10}${PYTHON_QUERY_PART_11}${PYTHON_QUERY_PART_12}")


make CMake script able to change llvm bitcode file name extension

The default LLVM bitcode suffix is .llvm

--- scripts/buildBitcode.cmake
+++ scripts/buildBitcode.cmake
@@ -6,7 +6,10 @@
 #    LLVMC_FLAGS
 #    LLVM_OPT_FLAGS

-SET(LLVM_EXT llvm)
+if(NOT DEFINED LLVM_EXT)
+  SET(LLVM_EXT llvm)
+endif()
+

 macro(collect_included_headers f_abso_temp_src)
   # collect the header dependency of source code.


[CMake] One more attempt to fix PR24144.

This time, exclude ExternalProject from build using set_target_properties.

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -245,7 +245,6 @@
     list(APPEND LIBCXX_DEPS clang)
   endif()

-  set(EXCLUDE_FROM_ALL TRUE)
   ExternalProject_Add(${name}
     PREFIX ${prefix}
     SOURCE_DIR ${COMPILER_RT_LIBCXX_PATH}
@@ -259,6 +258,7 @@
     LOG_CONFIGURE 1
     LOG_INSTALL 1
     )
+  set_target_properties(${name} PROPERTIES EXCLUDE_FROM_ALL TRUE)

   ExternalProject_Add_Step(${name} force-reconfigure
     DEPENDERS configure
@@ -272,5 +272,4 @@
     DEPENDERS configure
     DEPENDS ${LIBCXX_DEPS}
     )
-  set(EXCLUDE_FROM_ALL FALSE)
-endmacro()
+endmacro()


[sanitizer] Pass the CMake compiler to custom libc++ build

This addresses the error introduced in r323054 on some bots.

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -482,6 +482,9 @@
     if(NOT COMPILER_RT_STANDALONE_BUILD)
       set(force_deps DEPENDS clang)
     endif()
+  else()
+    set(compiler_args -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+                      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
   endif()

   if(CMAKE_SYSROOT)


setting 'char' to be signed by default since some tests fail when it's wrong (e.g. native compilation on ARM Linux)

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -46,6 +46,9 @@
     set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} ${option}")
   endif()
 endmacro()
+
+# some OpenCV tests fail when 'char' is 'unsigned' by default
+add_extra_compiler_option(-fsigned-char)

 if(MINGW)
   # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838