Avoid creation of duplicate targets

Avoid creation of duplicate targets

--- cmake/FindRuleChecker.cmake
+++ cmake/FindRuleChecker.cmake
@@ -105,19 +105,34 @@
     endforeach(_srcfile ${_sources})

     if(_violfiles)
-      add_custom_target(${MODULE}-check DEPENDS ${_violfiles})
-      add_dependencies(${MODULE}-check factfile)
-      add_dependencies(check-all ${MODULE}-check)
-
-      add_custom_target(${MODULE}-smell DEPENDS ${_smellfiles})
-      add_dependencies(smell-all ${MODULE}-smell)
-
+      #
+      if(TARGET ${MODULE}-check)
+	message("Target ${MODULE}-check already exist, apparently created in nested CMakeLists. Skipping")
+      else()
+	add_custom_target(${MODULE}-check DEPENDS ${_violfiles})
+	add_dependencies(${MODULE}-check factfile)
+	add_dependencies(check-all ${MODULE}-check)
+      endif(TARGET ${MODULE}-check)
+      #
+      if(TARGET ${MODULE}-smell)
+	message("Target ${MODULE}-smell already exist, apparently created in nested CMakeLists. Skipping")
+      else()
+	add_custom_target(${MODULE}-smell DEPENDS ${_smellfiles})
+	add_dependencies(smell-all ${MODULE}-smell)
+      endif(TARGET ${MODULE}-smell)
+      #
       if(_module_factfile_deps)
-	add_custom_target(${MODULE}-hxml DEPENDS ${_module_factfile_deps})
-	add_dependencies(check-hxml ${MODULE}-hxml)
+	#
+	if(TARGET ${MODULE}-hxml)
+	  message("Target ${MODULE}-hxml already exist, apparently created in nested CMakeLists. Skipping")
+	else()
+	  add_custom_target(${MODULE}-hxml DEPENDS ${_module_factfile_deps})
+	  add_dependencies(check-hxml ${MODULE}-hxml)
+	endif(TARGET ${MODULE}-hxml)
+	#
       endif(_module_factfile_deps)
     endif(_violfiles)
-
+

   endif(RULECHECKER_FOUND)
 endmacro(ALICE_CheckModule)


+ Add project root as an explicit value to the .cmake file.

--- cmake/RezInstallCMake.cmake
+++ cmake/RezInstallCMake.cmake
@@ -86,7 +86,8 @@
 	add_custom_command(
 			OUTPUT ${dest_dir}/${cmake_file}
 			COMMAND ${CMAKE_COMMAND} -E make_directory ${dest_dir}
-			COMMAND echo set(${projname}_INCLUDE_DIRS ${inc_dirs}) > ${dest_dir}/${cmake_file}
+			COMMAND echo set(${projname}_ROOT ${root_dir}) > ${dest_dir}/${cmake_file}
+			COMMAND echo set(${projname}_INCLUDE_DIRS ${inc_dirs}) >> ${dest_dir}/${cmake_file}
 			COMMAND echo set(${projname}_LIBRARY_DIRS ${lib_dirs}) >> ${dest_dir}/${cmake_file}
 			COMMAND echo set(${projname}_LIBRARIES ${INSTCM_LIBRARIES}) >> ${dest_dir}/${cmake_file}
 			COMMAND echo set(${projname}_DEFINITIONS ${INSTCM_DEFINITIONS}) >> ${dest_dir}/${cmake_file}


Removing rebase errors... (duplicated ZeroMQ and Protobuf packages)

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -111,9 +111,7 @@
 hunter_config(spdlog VERSION 1.0.0-p0)
 hunter_config(szip VERSION 2.1.0-p1)
 hunter_config(wxWidgets VERSION 3.0.2)
-hunter_config(ZeroMQ VERSION 4.1.4-p2)
 hunter_config(ZMQPP VERSION 4.1.2)
-hunter_config(Protobuf VERSION 3.0.0-beta-2)

 if(MINGW)
   # 1.60.0 broken:


CONFIG: PCRE has to be compiled with fPIC.

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -65,7 +65,7 @@
 hunter_config(OpenCV VERSION 3.0.0-p6)
 hunter_config(OpenCV-Extra VERSION 3.0.0)
 hunter_config(OpenSSL VERSION 1.0.2d)
-hunter_config(pcre VERSION 8.38-rc1-hunter-1)
+hunter_config(pcre VERSION 8.38-rc1-hunter-1 CMAKE_ARGS CMAKE_POSITION_INDEPENDENT_CODE=ON)
 hunter_config(PNG VERSION 1.6.16-p4)
 hunter_config(Qt VERSION 5.5.1-hunter-p1)
 hunter_config(QtAndroidCMake VERSION 1.0.6)


cmake: Fix grammar

cmake: Fix grammar

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -767,8 +767,8 @@
 endfunction(canonicalize_tool_name)

 # Custom add_subdirectory wrapper
-# Takes in a project name (i.e. LLVM), the the subdirectory name, and an
-# and an optional path if it differs from the name.
+# Takes in a project name (i.e. LLVM), the subdirectory name, and an optional
+# path if it differs from the name.
 macro(add_llvm_subdirectory project type name)
   set(add_llvm_external_dir "${ARGN}")
   if("${add_llvm_external_dir}" STREQUAL "")


Removed debug printouts from VTK discovery.

--- cmake_modules/FindVTK.cmake
+++ cmake_modules/FindVTK.cmake
@@ -56,8 +56,15 @@
 # - Check in the LPS standard prerequisites location.
 #=============================================================================

-set(VERSION 5.6)
-#set(VERSION 5.10)
+# VTK 5.10 has a bug that causes a crash in Xwindows upon closing.
+# Revert to 5.6 on Linux for now. 5.10 seems to work fine on windows.
+#
+if(WIN32)
+    set(VERSION 5.10)
+else()
+    set(VERSION 5.6)
+endif()
+
 # Assume not found.
 set(VTK_FOUND 0)

@@ -142,9 +149,7 @@
     get_filename_component(__TMP_DIR "${VTK_LIB_DIR}" PATH)
     get_filename_component(__TMP_DIR "${__TMP_DIR}" PATH)
     set(VTK_BIN_DIR "${__TMP_DIR}/bin" CACHE PATH "VTK Runtime libraries location.")
-message(STATUS "TMP_DIR IS: ${__TMP_DIR}")
-message(STATUS "VTK_LIB_DIR IS: ${VTK_LIB_DIR}")
-message(STATUS "VTK_BIN_DIR IS: ${VTK_BIN_DIR}")
+
     get_filename_component(__TMP_DIR "${VTK_LIB_DIR}" PATH)
     get_filename_component(__TMP_DIR "${__TMP_DIR}" PATH)
     set(VTK_INCLUDE_DIRS "${__TMP_DIR}/include/vtk-5.6" CACHE PATH "VTK Headers location.")


ENH: Use absolute paths for included cmake scripts

SVN-Revision: 3065

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -100,7 +100,7 @@
   message(FATAL_ERROR \"Error: Computed checksum (\${computedChecksum}) did not match expected (${checksum})\")
 endif(NOT computedChecksum STREQUAL ${checksum})
 ")
-      list(APPEND downloadScripts download_${checksum}.cmake)
+      list(APPEND downloadScripts "${MIDAS_DATA_DIR}/FetchScripts/download_${checksum}.cmake")
       list(APPEND testArgs "${MIDAS_DATA_DIR}/${checksum}")
     else(arg MATCHES "^MIDAS{.*}$")
       list(APPEND testArgs ${arg})
@@ -110,7 +110,7 @@
   file(WRITE "${MIDAS_DATA_DIR}/FetchScripts/${testName}_fetchData.cmake"
        "#This is an auto generated file -- do not edit\n\n")
   foreach(downloadScript ${downloadScripts})
-    file(APPEND "${MIDAS_DATA_DIR}/FetchScripts/${testName}_fetchData.cmake" "include(${downloadScript})\n")
+    file(APPEND "${MIDAS_DATA_DIR}/FetchScripts/${testName}_fetchData.cmake" "include(\"${downloadScript}\")\n")
   endforeach(downloadScript)

   add_test(${testName}_fetchData "${CMAKE_COMMAND}" -P "${MIDAS_DATA_DIR}/FetchScripts/${testName}_fetchData.cmake")


bugfix: correct endforeach

bugfix: correct endforeach

--- CMakeModules/FindwxWidgetsCVS.cmake
+++ CMakeModules/FindwxWidgetsCVS.cmake
@@ -562,7 +562,7 @@
       ELSE(_wx_result EQUAL 0)
         FOREACH(_upper_opt_name DEBUG STATIC UNICODE UNIVERSAL)
           SET(wxWidgets_DEFAULT_${_upper_opt_name} OFF)
-        ENDFOREACH(_opt_name)
+        ENDFOREACH(_upper_opt_name)
       ENDIF(_wx_result EQUAL 0)
     ENDMACRO(WX_CONFIG_SELECT_GET_DEFAULT)


tests run on windows now; still need to test this form on linux

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -65,6 +65,6 @@
   CDR(PYTEST_SOURCES ${PYTEST_DEFAULT_ARGS})
   if(RDK_BUILD_PYTHON_WRAPPERS)
     add_test(${PYTEST_NAME}  ${PYTHON_EXECUTABLE}
-             ${EXECUTABLE_OUTPUT_PATH}/${PYTEST_SOURCES})
+             ${PYTEST_SOURCES})
   endif(RDK_BUILD_PYTHON_WRAPPERS)
 endmacro(add_pytest)


CI: update NDK to 15c

CI: update NDK to 15c

--- ci-build.cmake
+++ ci-build.cmake
@@ -55,7 +55,7 @@
 if(DEFINED ENV{ANDROID})
     set(CROSS
         -DANDROID_NATIVE_API_LEVEL=16
-        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r15b
+        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r15c
         -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/CMake/toolchain/android.toolchain.cmake
         "-DANDROID_ABI=armeabi-v7a with NEON")

@@ -71,13 +71,13 @@
         -DOGRE_DEPENDENCIES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/ogredeps)
     set(BUILD_DEPS TRUE)

-    if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r15b)
+    if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r15c)
         message(STATUS "Downloading Android NDK")
         file(DOWNLOAD
-            http://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
-            ./android-ndk-r15b-linux-x86_64.zip)
+            http://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
+            ./android-ndk-r15c-linux-x86_64.zip)
         message(STATUS "Extracting Android NDK")
-        execute_process(COMMAND unzip android-ndk-r15b-linux-x86_64.zip OUTPUT_QUIET)
+        execute_process(COMMAND unzip android-ndk-r15c-linux-x86_64.zip OUTPUT_QUIET)
     endif()
 endif()


Make ifort on Windows create lowercase symbols with appended underscore

tentative fix for #2472

--- cmake/fc.cmake
+++ cmake/fc.cmake
@@ -76,8 +76,11 @@
   endif ()
 endif ()

-if (${F_COMPILER} STREQUAL "INTEL")
+if (${F_COMPILER} STREQUAL "IFORT")
   set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_INTEL")
+  if (MSVC)
+    set(FCOMMON_OPT "${FCOMMON_OPT} -names:lowercase -assume:underscore")
+  endif ()
   if (INTERFACE64)
     set(FCOMMON_OPT "${FCOMMON_OPT} -i8")
   endif ()


[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)


change package vendor to smanders

change package vendor to smanders

--- modules/macpro.cmake
+++ modules/macpro.cmake
@@ -304,7 +304,7 @@
   else()
     set(CPACK_PACKAGE_VERSION "unknown-version")
   endif()
-  set(CPACK_PACKAGE_VENDOR "Space Dynamics Lab")
+  set(CPACK_PACKAGE_VENDOR "smanders")
   if(UNIX AND NOT DEFINED CPACK_GENERATOR)
     set(CPACK_GENERATOR STGZ) # STGZ = Self extracting Tar GZip compression
   endif()


Make ExternalProject module correctly unpack *.tar.xz files.

ToDo:
This change works fine on Linux, but for MSYS/Windows there is an
additional CMake/libarchive issue that leads to an error which I
initially spotted for MSYS/Wine which is now confirmed by Brad King on
MSYS/Microsoft Windows.  This issue has now been fixed privately by
Brad King by importing the latest libarchive into CMake, and he plans
to incorporate that change into the mainstream git version of CMake
for eventual release.  As a workaround until that happens, my next
move is to replace cmake -E tar <options> by the equivalent tar
<options> command in ExternalProject.cmake. That workaround plus the
current change should finally allow unpacking of *.tar.xz files to
work properly for ExternalProject_Add, and that projected breakthrough
is expected to have a large impact on the build_projects project since
essentially _all_ GTK source project tarballs are in *.tar.xz form.

svn path=/trunk/; revision=12436

--- cmake/build_projects/ExternalProject.cmake
+++ cmake/build_projects/ExternalProject.cmake
@@ -504,7 +504,7 @@
 function(_ep_write_extractfile_script script_filename name filename directory)
   set(args "")

-  if(filename MATCHES "(\\.|=)(bz2|tar\\.gz|tgz|zip)$")
+  if(filename MATCHES "(\\.|=)(bz2|tar\\.gz|tar\\.xz|tgz|zip)$")
     set(args xfz)
   endif()

@@ -513,7 +513,7 @@
   endif()

   if(args STREQUAL "")
-    message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .bz2, .tar, .tar.gz, .tgz and .zip")
+    message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .bz2, .tar, .tar.gz, tar.xz, .tgz and .zip")
     return()
   endif()

@@ -1301,11 +1301,11 @@
         if("x${fname}" STREQUAL "x")
           string(REGEX MATCH "[^/\\?]*$" fname "${url}")
         endif()
-        if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$")
-          string(REGEX MATCH "([^/\\?]+(\\.|=)(bz2|tar|tgz|tar\\.gz|zip))/.*$" match_result "${url}")
+        if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|tar\\.xz|zip)$")
+          string(REGEX MATCH "([^/\\?]+(\\.|=)(bz2|tar|tgz|tar\\.gz|tar\\.xz|zip))/.*$" match_result "${url}")
           set(fname "${CMAKE_MATCH_1}")
         endif()
-        if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$")
+        if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|tar\\.xz|zip)$")
           message(FATAL_ERROR "Could not extract tarball filename from url:\n  ${url}")
         endif()
         string(REPLACE ";" "-" fname "${fname}")


update libevent

update libevent

--- cmake/Modules/FindLibEvent.cmake
+++ cmake/Modules/FindLibEvent.cmake
@@ -2,27 +2,36 @@
 # This module defines
 # LIBEVENT_INCLUDE_DIR, where to find LibEvent headers
 # LIBEVENT_LIB, LibEvent libraries
-# LIBEVENT_FOUND, If false, do not try to use libevent
+# LibEvent_FOUND, If false, do not try to use libevent

-find_path(
-  LIBEVENT_INCLUDE_DIR
-  event2/event.h
-  HINTS
-  ${LIBEVENT_DIR}
-  $ENV{LIBEVENT_DIR}
-  /usr
-  /opt
-  PATH_SUFFIXES include )
+set(LibEvent_EXTRA_PREFIXES /usr/local /opt/local "$ENV{HOME}")
+foreach(prefix ${LibEvent_EXTRA_PREFIXES})
+  list(APPEND LibEvent_INCLUDE_PATHS "${prefix}/include")
+  list(APPEND LibEvent_LIB_PATHS "${prefix}/lib")
+endforeach()

-find_library(
-  LIBEVENT_LIB
-  NAMES event
-  HINTS
-  ${LIBEVENT_DIR}
-  $ENV{LIBEVENT_DIR}
-  /usr
-  /opt
-  PATH_SUFFIXES lib )
+find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS})
+find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS})

-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(LibEvent DEFAULT_MSG LIBEVENT_LIB LIBEVENT_INCLUDE_DIR)
+if (LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR)
+  set(LibEvent_FOUND TRUE)
+  set(LIBEVENT_LIB ${LIBEVENT_LIB})
+else ()
+  set(LibEvent_FOUND FALSE)
+endif ()
+
+if (LibEvent_FOUND)
+  if (NOT LibEvent_FIND_QUIETLY)
+    message(STATUS "Found libevent: ${LIBEVENT_LIB}")
+  endif ()
+else ()
+  if (LibEvent_FIND_REQUIRED)
+    message(FATAL_ERROR "Could NOT find libevent.")
+  endif ()
+  message(STATUS "libevent NOT found.")
+endif ()
+
+mark_as_advanced(
+    LIBEVENT_LIB
+    LIBEVENT_INCLUDE_DIR
+  )


Don't needlessly apply INTERFACE properties to PCH object target

--- cmake/kl/PrecompileHeaders.cmake
+++ cmake/kl/PrecompileHeaders.cmake
@@ -65,8 +65,8 @@
         file(TO_NATIVE_PATH ${pch_file} pch_file_native)
         file(TO_NATIVE_PATH ${prefix_file} prefix_file_native)

-        # This is required because of some really weird handling
-        # of $(Configuration) in COMPILE_OPTIONS property (but not COMPILE_FLAGS!)
+        # This is required because of some really weird handling
+        # of $(Configuration) in COMPILE_OPTIONS property (but not COMPILE_FLAGS!)
         # when a option with a path has native slashes.
         string(REPLACE "$(" "\\$(" pch_file_native ${pch_file_native})

@@ -115,7 +115,7 @@
         endif()
         file(TO_NATIVE_PATH ${host_file} host_file_native)

-        set(gch_file ${host_file}.gch)
+        set(gch_file ${host_file}.gch)

         # Add target to compile the prefix header with exactly the same properties as the source target
         add_library(${_target}.pch OBJECT ${host_file})
@@ -125,13 +125,6 @@
         )

         set(properties
-            INTERFACE_COMPILE_DEFINITIONS
-            INTERFACE_COMPILE_FEATURES
-            INTERFACE_COMPILE_OPTIONS
-            INTERFACE_INCLUDE_DIRECTORIES
-            INTERFACE_LINK_LIBRARIES
-            INTERFACE_POSITION_INDEPENDENT_CODE
-            INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
             COMPILE_DEFINITIONS
             COMPILE_FEATURES
             COMPILE_OPTIONS
@@ -145,7 +138,7 @@
         foreach(property IN ITEMS ${properties})
             get_target_property(var ${_target} ${property})
             if(NOT (var STREQUAL var-NOTFOUND OR var STREQUAL ""))
-                # Simply checking for if(var) is not sufficient
+                # Simply checking for if(var) is not sufficient
                 # since some properties can have value of OFF
                 set_target_properties(${_target}.pch PROPERTIES ${property} "${var}")
             endif()


Added ${CMAKE_CFG_INTDIR} to get full build variant path (IDE case) for cpp_rsc tool

--- cmake/modules/cpp_resource.cmake
+++ cmake/modules/cpp_resource.cmake
@@ -5,13 +5,13 @@
   if(NOT (COMMAND cpp_rsc))
     include(ExternalProject)
     ExternalProject_Add(cpp_rsc_prj
-                        GIT_REPOSITORY https://github.com/orex/cpp_rsc.git
+                        GIT_REPOSITORY https://github.com/headupinclouds/cpp_rsc.git
                         GIT_TAG master
                         INSTALL_COMMAND "")

     get_property(RSC_BIN_FOLDER TARGET cpp_rsc_prj PROPERTY _EP_BINARY_DIR)
-    set_property(GLOBAL PROPERTY CPPRSC_CMD ${RSC_BIN_FOLDER}/src/cpp_rsc)
+    set_property(GLOBAL PROPERTY CPPRSC_CMD ${RSC_BIN_FOLDER}/src/${CMAKE_CFG_INTDIR}/cpp_rsc)
   else()
     set_property(GLOBAL PROPERTY CPPRSC_CMD cpp_rsc)
   endif()


Do not build tests in date library (#131)

--- cmake/projects/date/hunter.cmake
+++ cmake/projects/date/hunter.cmake
@@ -20,7 +20,7 @@
     4ed983e1d19ee28bc565bd62907d203304b38cf7
 )

-hunter_cmake_args(date CMAKE_ARGS USE_SYSTEM_TZ_DB=ON)
+hunter_cmake_args(date CMAKE_ARGS ENABLE_DATE_TESTING=OFF USE_SYSTEM_TZ_DB=ON)

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(date)


Add reliable preprocessor definition to identify the target system

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -2,6 +2,9 @@
 #
 # Platform and architecture setup
 #
+
+# Get upper case system name
+string(TOUPPER ${CMAKE_SYSTEM_NAME} SYSTEM_NAME_UPPER)

 # Determine architecture (32/64 bit)
 set(X64 OFF)
@@ -41,7 +44,9 @@
 # Compile definitions
 #

-set(DEFAULT_COMPILE_DEFINITIONS)
+set(DEFAULT_COMPILE_DEFINITIONS
+    SYSTEM_${SYSTEM_NAME_UPPER}
+)

 #


Add MetalClaw to OxConfig.cmake

Add MetalClaw to OxConfig.cmake

--- OxConfig.cmake
+++ OxConfig.cmake
@@ -3,9 +3,10 @@
 	set(OxStd_LIBRARY /usr/local/lib/ox/libOxStd.a)
 	set(OxFS_LIBRARY /usr/local/lib/ox/libOxFS.a)
 	set(OxClArgs_LIBRARY /usr/local/lib/ox/libOxClArgs.a)
+	set(OxMetalClaw /usr/local/lib/ox/libOxMetalClaw.a)
 else("${CMAKE_FIND_ROOT_PATH}" STREQUAL "")
 	set(Ox_INCLUDE_DIRS ${CMAKE_FIND_ROOT_PATH}/include/)
 	set(OxStd_LIBRARY ${CMAKE_FIND_ROOT_PATH}/lib/ox/libOxStd.a)
 	set(OxFS_LIBRARY ${CMAKE_FIND_ROOT_PATH}/lib/ox/libOxFS.a)
-	set(OxClArgs_LIBRARY ${CMAKE_FIND_ROOT_PATH}/lib/ox/libOxClArgs.a)
+	set(OxMetalClaw ${CMAKE_FIND_ROOT_PATH}/lib/ox/libOxMetalClaw.a)
 endif("${CMAKE_FIND_ROOT_PATH}" STREQUAL "")


Flags for reduced binary size

Flags for reduced binary size

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -101,6 +101,14 @@
 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
     set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
     PRIVATE
+	# Shared Object size
+	-s
+	-fmerge-all-constants
+	-fno-unroll-loops
+	-fno-unwind-tables
+	-fno-asynchronous-unwind-tables
+
+	# General
         -Wall
         -Wextra
         -Wunused
@@ -113,7 +121,7 @@
         -Wswitch-default
         -Wuninitialized
         -Wmissing-field-initializers
-
+
         $<$<CXX_COMPILER_ID:GNU>:
             -Wmaybe-uninitialized

@@ -149,7 +157,10 @@

 # Use pthreads on mingw and linux
 if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
-    set(DEFAULT_LINKER_OPTIONS
+    set(DEFAULT_LINKER_OPTIONS ${DEFAULT_LINKER_OPTIONS}
+    PRIVATE
+	# Shared Object size
+	-Wl,-z,norelro,--build-id=none
     PUBLIC
         -pthread
         -ldl


CMake version fix

CMake version fix

--- cmake/External_build.cmake
+++ cmake/External_build.cmake
@@ -5,11 +5,17 @@
   message(STATUS "INSTALL_COMMANDS: ${INSTALL_COMMANDS}")
   message(STATUS "COMMANDS: ${COMMANDS}")

+  # Output based on CMake version
+  set(CMD_ECHO)
+  if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.15.0")
+    set(CMD_ECHO COMMAND_ECHO STDOUT)
+  endif()
+
   # Build external project
   execute_process(
     COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    COMMAND_ECHO STDOUT
+    ${CMD_ECHO}
     RESULT_VARIABLE BUILD_RESULT)

   if(NOT "${BUILD_RESULT}" STREQUAL "0")
@@ -20,7 +26,7 @@
   execute_process(
     COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CONFIG}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    COMMAND_ECHO STDOUT
+    ${CMD_ECHO}
     RESULT_VARIABLE INSTALL_RESULT)

   if(NOT "${INSTALL_RESULT}" STREQUAL "0")
@@ -33,7 +39,7 @@
     ${INSTALL_COMMANDS}
     ${COMMANDS}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    COMMAND_ECHO STDOUT
+    ${CMD_ECHO}
     RESULTS_VARIABLE COMMANDS_RESULTS)

   foreach(COMMAND_RESULT IN LISTS COMMANDS_RESULTS)


Added another ACG path to search for gtest

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@624 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/FindGoogleTest.cmake
+++ cmake/FindGoogleTest.cmake
@@ -42,22 +42,31 @@
   else(GTEST_PREFIX)
     find_path(_GTEST_INCLUDE_DIR "gtest/gtest.h"
       PATHS
+      /ACG/acgdev/gcc-4.7-x86_64/gtest/include
       ~/sw/gtest/include
       /opt/local/include
       /usr/local/include
-	  "C:/libs/win32/gtest/include")
+      /usr/include
+      "C:/libs/win32/gtest/include"
+      NO_DEFAULT_PATH )
     find_library(_GTEST_LIBRARY gtest
       PATHS
+      /ACG/acgdev/gcc-4.7-x86_64/gtest/lib
       ~/sw/gtest/lib
       /opt/local/lib
       /usr/local/lib
-	  "C:/libs/win32/gtest/lib")
+      /usr/include
+      "C:/libs/win32/gtest/lib"
+      NO_DEFAULT_PATH )
     find_library(_GTEST_MAIN_LIBRARY gtest_main
       PATHS
+      /ACG/acgdev/gcc-4.7-x86_64/gtest/lib
       ~/sw/gtest/lib
       /opt/local/lib
       /usr/local/lib
-	  "C:/libs/win32/gtest/lib")
+      /usr/include
+      "C:/libs/win32/gtest/lib"
+      NO_DEFAULT_PATH )

      if ( _GTEST_LIBRARY )
         get_filename_component(_GTEST_LIBRARY_DIR ${_GTEST_LIBRARY} PATH CACHE )


[mips] Always use _LARGEFILE_SOURCE / _FILE_OFFSET_BITS for building MIPS 32-bit

When MIPS 32-bit compiler-rt is building on 32-bit host or using 32-bit
`DLLVM_HOST_TRIPLE` the `_LARGEFILE_SOURCE` and the `_FILE_OFFSET_BITS=64`
macros defined by statements from the `HandleLLVMOptions.cmake`. In case
of building 32-bit libraries on 64-bit host using default host triple
these macros are not defined. As a result assertions check a consistency
between the `struct_kernel_stat_sz` constant and the `struct_kernel_stat_sz`
start to fail.

To resolve this problem and enable building both 32/64-bit versions
of MIPS compiler-rt libraries on 64-bit host at once always explicitly
define the `_LARGEFILE_SOURCE` and the `_FILE_OFFSET_BITS=64` macros
for MIPS 32-bit.

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

--- cmake/base-config-ix.cmake
+++ cmake/base-config-ix.cmake
@@ -191,10 +191,10 @@
       # clang's default CPU's. In the 64-bit case, we must also specify the ABI
       # since the default ABI differs between gcc and clang.
       # FIXME: Ideally, we would build the N32 library too.
-      test_target_arch(mipsel "" "-mips32r2" "-mabi=32")
+      test_target_arch(mipsel "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
       test_target_arch(mips64el "" "-mips64r2" "-mabi=64")
     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
-      test_target_arch(mips "" "-mips32r2" "-mabi=32")
+      test_target_arch(mips "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
       test_target_arch(mips64 "" "-mips64r2" "-mabi=64")
     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
       if(WIN32)


update mklml.cmake to 2019.0.5 (#24022)

update mklml.cmake to 2019.0.5 (#24022)

* update mklml.cmake to 2019.0.5

test=develop

* update mklml.cmake with new version

test=develop

--- cmake/external/mklml.cmake
+++ cmake/external/mklml.cmake
@@ -32,8 +32,8 @@
     SET(MKLML_SHARED_IOMP_LIB     ${MKLML_LIB_DIR}/libiomp5md.dll)
 ELSE()
     #TODO(intel-huying):
-    #  Now enable Erf function in mklml library temporarily, it will be updated as offical version later.
-    SET(MKLML_VER "csrmm2_mklml_lnx_2019.0.2" CACHE STRING "" FORCE)
+    #  Now enable csrmm function in mklml library temporarily, it will be updated as offical version later.
+    SET(MKLML_VER "Csrmm_mklml_lnx_2019.0.5.20190502" CACHE STRING "" FORCE)
     SET(MKLML_URL "http://paddlepaddledeps.bj.bcebos.com/${MKLML_VER}.tgz" CACHE STRING "" FORCE)
     SET(MKLML_LIB                 ${MKLML_LIB_DIR}/libmklml_intel.so)
     SET(MKLML_IOMP_LIB            ${MKLML_LIB_DIR}/libiomp5.so)


Disable python support if numpy is not found and issue warning. Support
for Numeric can (for now) be re-enabled by setting USE_NUMERIC. In due
course support for Numeric will be dropped.

svn path=/trunk/; revision=11006

--- cmake/modules/python.cmake
+++ cmake/modules/python.cmake
@@ -61,6 +61,7 @@
 endif(ENABLE_python)

 option(HAVE_NUMPY "Use numpy rather than deprecated Numeric" ON)
+option(USE_NUMERIC "Force use of deprecated Numeric" OFF)

 if(ENABLE_python)
   # NUMERIC_INCLUDE_PATH = path to arrayobject.h for either Numeric or numpy.
@@ -125,6 +126,15 @@
   endif(EXCLUDE_PYTHON_LIBRARIES)
 endif(ENABLE_python AND HAVE_NUMPY)

+if(ENABLE_python AND NOT HAVE_NUMPY)
+  message(STATUS "WARNING: The Numeric extensions for python are deprecated. "
+                 "Support for Numeric will be dropped in a future plplot release. Please switch to numpy.")
+  if(NOT USE_NUMERIC)
+    message(STATUS "Disabling python. If you wish enable Numeric support set USE_NUMERIC.")
+    set(ENABLE_python OFF CACHE BOOL "Enable Python bindings" FORCE)
+  endif(NOT USE_NUMERIC)
+endif(ENABLE_python AND NOT HAVE_NUMPY)
+
 if(ENABLE_python)
   # N.B. This is a nice way to obtain all sorts of python information
   # using distutils.
@@ -135,7 +145,3 @@
     OUTPUT_STRIP_TRAILING_WHITESPACE
     )
 endif(ENABLE_python)
-
-if(ENABLE_python AND NOT HAVE_NUMPY)
-  message(STATUS "WARNING: " "The Numeric extensions for python are deprecated. Support for Numeric will be dropped in a future plplot release. Please switch to numpy.")
-endif(ENABLE_python AND NOT HAVE_NUMPY)


Avoid using GLOB as it confuses legion

Avoid using GLOB as it confuses legion

--- tests/python_modules/pure_build.cmake
+++ tests/python_modules/pure_build.cmake
@@ -33,11 +33,14 @@
     )
 endif()

-add_python_module("pure" GLOB ${PROJECT_BINARY_DIR}/pure/*.py)
+add_python_module("pure"
+	${PROJECT_BINARY_DIR}/pure/__init__.py
+	${PROJECT_BINARY_DIR}/pure/that.py
+)
 add_python_module("pure.tests"
-    GLOB ${PROJECT_BINARY_DIR}/pure/tests/*.py FAKE_INIT)
+    ${PROJECT_BINARY_DIR}/pure/tests/this.py FAKE_INIT)
 add_python_module("pure.noinstall"
-    GLOB "${PROJECT_BINARY_DIR}/pure/noinstall/*.py"
+    "${PROJECT_BINARY_DIR}/pure/noinstall/__init__.py"
     TARGETNAME nope
     NOINSTALL
 )


removed my cmake_uninstall that was erroneously committed in the repository

--- tcp-linux/cmake_uninstall.cmake
+++ tcp-linux/cmake_uninstall.cmake
@@ -1,25 +0,0 @@
-# -----------------------------------------------
-# File that provides "make uninstall" target
-#  We use the file 'install_manifest.txt'
-# -----------------------------------------------
-IF(NOT EXISTS "/home/rdenardi/complacs/qrsim/tcp-linux/build/install_manifest.txt")
-  MESSAGE(FATAL_ERROR "Cannot find install manifest: \"/home/rdenardi/complacs/qrsim/tcp-linux/build/install_manifest.txt\"")
-ENDIF(NOT EXISTS "/home/rdenardi/complacs/qrsim/tcp-linux/build/install_manifest.txt")
-
-FILE(READ "/home/rdenardi/complacs/qrsim/tcp-linux/build/install_manifest.txt" files)
-STRING(REGEX REPLACE "\n" ";" files "${files}")
-FOREACH(file ${files})
-  MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
-  IF(EXISTS "$ENV{DESTDIR}${file}")
-    EXEC_PROGRAM(
-      "/usr/bin/cmake" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
-      OUTPUT_VARIABLE rm_out
-      RETURN_VALUE rm_retval
-      )
-    IF(NOT "${rm_retval}" STREQUAL 0)
-      MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
-    ENDIF(NOT "${rm_retval}" STREQUAL 0)
-  ELSE(EXISTS "$ENV{DESTDIR}${file}")
-    MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
-  ENDIF(EXISTS "$ENV{DESTDIR}${file}")
-ENDFOREACH(file)


ANGLE: require gyp on host system

ANGLE: require gyp on host system

--- packages/angle.cmake
+++ packages/angle.cmake
@@ -1,3 +1,9 @@
+find_program(GYP gyp)
+
+if(NOT GYP)
+    message(FATAL_ERROR "gyp is required to build ANGLE")
+endif()
+
 ExternalProject_Add(angle
     DEPENDS gcc
     GIT_REPOSITORY https://chromium.googlesource.com/angle/angle


build: add cmake dependency from test plugin to api

Type: fix

Signed-off-by: Tom Seidenberg <f8f4907d1abb6fe57cc0a831bead45885944172c@cisco.com>
Change-Id: I00fa22733bd293e56eb6b81346fdf2d75ad9d88f

--- src/cmake/plugin.cmake
+++ src/cmake/plugin.cmake
@@ -78,6 +78,9 @@
     add_library(${test_plugin_name} SHARED ${PLUGIN_API_TEST_SOURCES}
 		${api_includes})
     set_target_properties(${test_plugin_name} PROPERTIES NO_SONAME 1)
+    if(PLUGIN_API_FILES)
+      add_dependencies(${test_plugin_name} ${plugin_name}_api_headers)
+    endif()
     if(NOT VPP_EXTERNAL_PROJECT)
       add_dependencies(${test_plugin_name} api_headers)
     endif()


ImageManip setResize crop fix

ImageManip setResize crop fix


Alter to improve finding cfitsio in both std and non-std locations.

--- cmake/Modules/FindCfitsio.cmake
+++ cmake/Modules/FindCfitsio.cmake
@@ -12,9 +12,9 @@
 #  CCFITS_INCLUDE
 #  CCFITS_LIBRARY
 #
-# Affected by environment variables:
-#  CFITSIOINC_PATH
-#  CFITSIOLIB_PATH
+# Hints for non-standard locations:
+# CFITSIO_ROOT_DIR
+# CCFITS_ROOT_DIR
 #
 #   Copyright 2011  Jacek Becla, Daniel Liwei Wang
 #
@@ -33,14 +33,21 @@
 include(FindPackageHandleStandardArgs)

 # Look for includes and libraries
-find_path(CFITSIO_INCLUDE_DIR  fitsio.h PATHS $ENV{CFITSIOINC_PATH})
-find_library(CFITSIO_LIBRARY  cfitsio  PATHS $ENV{CFITSIOLIB_PATH})
-
-find_path(CCFITS_INCLUDE_DIR  CCfits/CCfits PATHS $ENV{CFITSIOINC_PATH})
-find_library(CCFITS_LIBRARY  CCfits PATHS $ENV{CFITSIOLIB_PATH})
+find_path(CFITSIO_INCLUDE_DIR
+  NAMES fitsio.h
+  HINTS ${CFITSIO_ROOT_DIR} PATH_SUFFIXES include include/cfitsio
+  )
+find_library(CFITSIO_LIBRARY  cfitsio
+  HINTS ${CFITSIO_ROOT_DIR} PATH_SUFFIXES lib)

 find_package_handle_standard_args(CFITSIO  DEFAULT_MSG
   CFITSIO_INCLUDE_DIR CFITSIO_LIBRARY)
+
+
+find_path(CCFITS_INCLUDE_DIR  CCfits/CCfits
+  HINTS ${CCFITS_ROOT_DIR} PATH_SUFFIXES include)
+find_library(CCFITS_LIBRARY  CCfits
+  HINTS ${CCFITS_ROOT_DIR} PATH_SUFFIXES lib)
 find_package_handle_standard_args(CCFITS  DEFAULT_MSG
   CCFITS_INCLUDE_DIR CCFITS_LIBRARY)
 #find_package_handle_standard_args(LIBSZ  DEFAULT_MSG  SZ_LIB)


Bump the maximum version searched for to 4.0.0 for iTcl.  (Note that version
is an integral part of the Tcl-8.6.1 source code and automatically
builds when Tcl-8.6.1 is built.)

svn path=/trunk/; revision=12627

--- cmake/modules/tcl-related.cmake
+++ cmake/modules/tcl-related.cmake
@@ -94,7 +94,7 @@
           message(STATUS "Looking for itcl.h - found")
           message(STATUS "Looking for itcl library")
 	get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH)
-          set(itcl_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
+          set(itcl_library_versions 4.0.0 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
           foreach(version ${itcl_library_versions})
             find_library(ITCL_LIBRARY itcl${version} PATHS ${TCL_LIBRARY_PATH}
               PATH_SUFFIXES itcl${version})


Do not add resources from other bundles which would lead to duplicates.

Adding the resources from other bundles should only happend if that
bundle is static and the current bundle is dynamic or an executable.
The current build system does not support mixing static and dynamic
bundles in a generic way, so this is completely disabled for now.

Signed-off-by: Sascha Zelzer <8b245f326623c6b9583b29a36433184f04a0f42a@gmail.com>

--- cmake/usMacroCreateBundle.cmake
+++ cmake/usMacroCreateBundle.cmake
@@ -124,7 +124,7 @@

 # Embed bundle resources

-if(${PROJECT_NAME}_RESOURCES OR US_LIBRARIES)
+if(${PROJECT_NAME}_RESOURCES)
   set(_wd ${CMAKE_CURRENT_SOURCE_DIR})
   if(${PROJECT_NAME}_RESOURCES)
     set(_wd ${CMAKE_CURRENT_SOURCE_DIR}/resources)
@@ -132,7 +132,6 @@
   usFunctionAddResources(TARGET ${${PROJECT_NAME}_TARGET}
                          WORKING_DIRECTORY ${_wd}
                          FILES ${${PROJECT_NAME}_RESOURCES}
-                         ZIP_ARCHIVES ${US_LIBRARIES}
                         )
 endif()
 if(${PROJECT_NAME}_BINARY_RESOURCES)


path bugfix

path bugfix

--- cmake_modules/FindXercesC.cmake
+++ cmake_modules/FindXercesC.cmake
@@ -14,9 +14,7 @@
 FIND_PATH(
   XERCESC_INCLUDE
   NAMES util/XercesVersion.hpp
-  PATHS
-  c:\Libs\xerces-c_2_8_0\
-  ${XERCES_INCLUDE_DIR}
+  PATHS c:/Libs/xerces-c_2_8_0 ${XERCES_INCLUDE_DIR}
   PATH_SUFFIXES xercesc)

 FIND_LIBRARY(


GAMS_BUILD; location gmd files changed and env variables renamed

--- include.cmake
+++ include.cmake
@@ -106,20 +106,21 @@
     endif()

     set(GPRODUCTS_ENV $ENV{GPRODUCTS})
-    set(GPRODUCTS_JOAT_ENV $ENV{BTREE}/joat/$ENV{GSYS})
-    set(GPRODUCTS_OBTOBJ_ENV $ENV{BTREE}/optobj/$ENV{GSYS})
+    set(BTREE_GMD_ENV $ENV{BTREE}/gmdxxx/$ENV{GSYS})
+    set(BTREE_JOAT_ENV $ENV{BTREE}/joat/$ENV{GSYS})
+    set(BTREE_OPT_ENV $ENV{BTREE}/optobj/$ENV{GSYS})
     include_directories(${GPRODUCTS_ENV}/gclib
-                        ${GPRODUCTS_ENV}/apiwrap/gmdobj
-                        ${GPRODUCTS_JOAT_ENV}
-                        ${GPRODUCTS_OBTOBJ_ENV})
+                        ${BTREE_GMD_ENV}
+                        ${BTREE_JOAT_ENV}
+                        ${BTREE_OPT_ENV})

     set(SOURCE ${SOURCE} ${GPRODUCTS_ENV}/gclib/gclgms.c
                          ${GPRODUCTS_ENV}/gclib/gcmt.c
-                         ${GPRODUCTS_ENV}/apiwrap/gmdobj/gmdcc.c
-                         ${GPRODUCTS_JOAT_ENV}/cfgmcc.c
-                         ${GPRODUCTS_JOAT_ENV}/gevmcc.c
-                         ${GPRODUCTS_JOAT_ENV}/gmomcc.c
-                         ${GPRODUCTS_OBTOBJ_ENV}/optcc.c)
+                         ${BTREE_GMD_ENV}/gmdcc.c
+                         ${BTREE_JOAT_ENV}/cfgmcc.c
+                         ${BTREE_JOAT_ENV}/gevmcc.c
+                         ${BTREE_JOAT_ENV}/gmomcc.c
+                         ${BTREE_OPT_ENV}/optcc.c)

     include_directories(${GPRODUCTS_ENV}/apiexamples/C++/api)
     set(SOURCE ${SOURCE} ${GPRODUCTS_ENV}/apiexamples/C++/api/gamsoptions.cpp


New defaults.cmake.

New defaults.cmake.

--- defaults.cmake
+++ defaults.cmake
@@ -667,8 +667,12 @@
   check_cxx_flag("-fdiagnostics-color=auto" HAS_CXX_FLAG_FDIAGNOSTICS_COLOR)
   check_c_flag("-fdiagnostics-show-option" HAS_C_FLAG_FDIAGNOSTICS_SHOW_OPTION)
   check_cxx_flag("-fdiagnostics-show-option" HAS_CXX_FLAG_FDIAGNOSTICS_SHOW_OPTION)
+  check_c_flag("-flto" HAS_C_FLAG_FLTO)
+  check_cxx_flag("-flto" HAS_CXX_FLAG_FLTO)
   check_c_flag("-ftracer" HAS_C_FLAG_FTRACER)
   check_cxx_flag("-ftracer" HAS_CXX_FLAG_FTRACER)
+  check_c_flag("-fvisibility=hidden" HAS_C_FLAG_FVISIBILITY_HIDDEN)
+  check_cxx_flag("-fvisibility=hidden" HAS_CXX_FLAG_FVISIBILITY_HIDDEN)
   check_c_flag("-fweb" HAS_C_FLAG_FWEB)
   check_cxx_flag("-fweb" HAS_CXX_FLAG_FWEB)
   check_c_flag("-pipe" HAS_C_FLAG_PIPE)


Apply cmake-init 0f6a6662dfbae3564a597b731b9eeddc811e264f

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -124,7 +124,7 @@
             -pthread
         >

-        $<$<VERSION_LESS:${CMAKE_VERSION},3.2>:
+        $<$<VERSION_LESS:${CMAKE_VERSION},3.1>:
             -std=c++11
         >
     )


cmake/compiler/clang: don't fail on register usage

--- cmake/Compiler/Clang.cmake
+++ cmake/Compiler/Clang.cmake
@@ -8,6 +8,7 @@
   -Wno-c++98-compat-pedantic
   -Wno-disabled-macro-expansion
   -Wno-documentation
+  -Wno-deprecated-register
   -Wno-exit-time-destructors
   -Wno-global-constructors
   -Wno-weak-vtables


cmake: XercesIntTypes: Add a <cstdint> functional check

Header presence isn't always sufficient; if the headers is
present but the compiler is in C++98 mode it will error out.

git-svn-id: 3ec853389310512053d525963cab269c063bb453@1798747 13f79535-47bb-0310-9956-ffa450edef68

--- cmake/XercesIntTypes.cmake
+++ cmake/XercesIntTypes.cmake
@@ -20,13 +20,29 @@

 # Integer type checks.

+include(CheckCXXSourceCompiles)
 include(CheckIncludeFileCXX)
 include(CheckTypeSize)

-check_include_file_cxx(cstdint  HAVE_CSTDINT)
+check_include_file_cxx(cstdint HAVE_CSTDINT)
+
+check_cxx_source_compiles("
+#include <cstdint>
+
+int main() {
+  uint32_t v1 = 342;
+  int64_t v2 = -23;
+  return 0;
+}" CSTDINT_FUNCTIONAL)
+
 check_include_file_cxx(stdint.h HAVE_STDINT_H)
 check_include_file_cxx(inttypes.h HAVE_INTTYPES_H)
-set(XERCES_HAVE_CSTDINT ${HAVE_CSTDINT})
+
+if(HAVE_CSTDINT AND CSTDINT_FUNCTIONAL)
+  set(XERCES_HAVE_CSTDINT TRUE)
+else()
+  set(XERCES_HAVE_CSTDINT FALSE)
+endif()
 set(XERCES_HAVE_STDINT_H ${HAVE_STDINT_H})
 set(XERCES_HAVE_INTTYPES_H ${HAVE_INTTYPES_H})


[compiler-rt] Enable building iOS by default.

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

--- cmake/base-config-ix.cmake
+++ cmake/base-config-ix.cmake
@@ -81,7 +81,7 @@
     set(OSX_SYSROOT_FLAG "-isysroot${OSX_SYSROOT}")
   endif()

-  option(COMPILER_RT_ENABLE_IOS "Enable building for iOS" Off)
+  option(COMPILER_RT_ENABLE_IOS "Enable building for iOS" On)
   option(COMPILER_RT_ENABLE_WATCHOS "Enable building for watchOS - Experimental" Off)
   option(COMPILER_RT_ENABLE_TVOS "Enable building for tvOS - Experimental" Off)
 endif()


Fix typo, allow SVR4 packages to be built again.

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -86,7 +86,7 @@
     SET(CMAKE_INSTALL_PREFIX ${default_prefix}
       CACHE PATH "install prefix" FORCE)
   ENDIF()
-  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR5")
+  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4")
   LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
   IF(ind EQUAL -1)
     MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."


Fix: Boost filesystem v3 are supported starting 1.44 only

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@161 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -4,7 +4,7 @@
     set(Boost_USE_STATIC_LIBS ON)
 endif(NOT PCL_SHARED_LIBS)

-find_package(Boost 1.36.0 COMPONENTS system filesystem thread)
+find_package(Boost 1.44.0 COMPONENTS system filesystem thread)
 # TODO: What should the minimum version number be?
 include_directories(${Boost_INCLUDE_DIRS})
 link_directories(${Boost_LIBRARY_DIRS})


applied patch to add rosbuild_find_ros_stack, #3557

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -19,6 +19,18 @@
   # todo: catch return code and be smart about it
   set(${pkgname}_PACKAGE_PATH ${__pkg_dir})
 endmacro(rosbuild_find_ros_package)
+
+# Find a ros stack.
+macro(rosbuild_find_ros_stack stackname)
+  # catch the error output to suppress it
+  execute_process(
+    COMMAND rosstack find ${stackname}
+    ERROR_VARIABLE __rospack_err_ignore
+    OUTPUT_VARIABLE __stack_dir
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  # todo: catch return code and be smart about it
+  set(${stackname}_STACK_PATH ${__stack_dir})
+endmacro(rosbuild_find_ros_stack)

 # Retrieve the current COMPILE_FLAGS for the given target, append the new
 # ones, and set the result.


Add toolchain 'android-ndk-r10e-api-19-armeabi-v7a-neon-c11'

--- android-ndk-r10e-api-19-armeabi-v7a-neon-c11.cmake
+++ android-ndk-r10e-api-19-armeabi-v7a-neon-c11.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2015, Ruslan Baratov
+# Copyright (c) 2015-2017, Ruslan Baratov
 # Copyright (c) 2015, David Hirvonen
 # Copyright (c) 2015, Alexandre Pretyman
 # All rights reserved.
@@ -22,13 +22,14 @@
 polly_init(
     "Android NDK ${ANDROID_NDK_VERSION} / \
 API ${CMAKE_SYSTEM_VERSION} / ${CMAKE_ANDROID_ARCH_ABI} / \
-NEON / 32-bit ARM / c++11 support / C11"
+NEON / 32-bit ARM / c++11 / c11"
     "Unix Makefiles"
 )

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake")

 include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx11.cmake") # before toolchain!
-include("${CMAKE_CURRENT_LIST_DIR}/flags/c11.cmake")

 include("${CMAKE_CURRENT_LIST_DIR}/os/android.cmake")
+
+include("${CMAKE_CURRENT_LIST_DIR}/flags/c11.cmake")


ENH: remove module activation options

ENH: remove module activation options

--- Modules/Wrappers/QGIS/otb-module.cmake
+++ Modules/Wrappers/QGIS/otb-module.cmake
@@ -11,4 +11,4 @@
   DESCRIPTION
     "${DOCUMENTATION}"
 )
-otb_module_activation_option("Generating descriptors for QGIS processing" OFF)
+


ceres MSVC_USE_STATIC_CRT to ON

ceres MSVC_USE_STATIC_CRT to ON

* match PRIMUSPro and this is the option that makes sense, too
* issue https://github.com/smanders/externpro/issues/248

--- projects/ceres.cmake
+++ projects/ceres.cmake
@@ -44,7 +44,7 @@
     -DCERES_VER:STRING=${VER}
     )
   if(MSVC)
-    list(APPEND XP_CONFIGURE -DMSVC_USE_STATIC_CRT:BOOL=OFF)
+    list(APPEND XP_CONFIGURE -DMSVC_USE_STATIC_CRT:BOOL=ON)
   elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
     list(APPEND XP_CONFIGURE -DLIB_SUFFIX:STRING=) # install to lib, not lib64
   endif()


be quiet in first call to find_package

be quiet in first call to find_package

--- project/cmake/modules/FindConfigurePackage.cmake
+++ project/cmake/modules/FindConfigurePackage.cmake
@@ -101,7 +101,7 @@
     string(TOUPPER "${FindConfigurePackage_PACKAGE}_FOUND" FIND_CONFIGURE_PACKAGE_UPPER_NAME)

     # step 1. find using standard method
-    find_package(${FindConfigurePackage_PACKAGE})
+    find_package(${FindConfigurePackage_PACKAGE} QUIET)
     if(NOT ${FindConfigurePackage_PACKAGE}_FOUND AND NOT ${FIND_CONFIGURE_PACKAGE_UPPER_NAME})
         if(NOT FindConfigurePackage_PREFIX_DIRECTORY)
             # prefix
@@ -111,7 +111,7 @@
         list(APPEND CMAKE_FIND_ROOT_PATH ${FindConfigurePackage_PREFIX_DIRECTORY})

         # step 2. find in prefix
-        find_package(${FindConfigurePackage_PACKAGE})
+        find_package(${FindConfigurePackage_PACKAGE} QUIET)

         # step 3. build
         if(NOT ${FindConfigurePackage_PACKAGE}_FOUND AND NOT ${FIND_CONFIGURE_PACKAGE_UPPER_NAME})


ENH: update sqlite version to 3.36

ENH: update sqlite version to 3.36

--- SuperBuild/CMake/External_sqlite.cmake
+++ SuperBuild/CMake/External_sqlite.cmake
@@ -24,8 +24,8 @@

 ExternalProject_Add(SQLITE
   PREFIX SQLITE
-  URL "https://www.sqlite.org/2015/sqlite-amalgamation-3080801.zip"
-  URL_MD5 b1cbcbd710bdfd762dc169f1676053b5
+  URL "https://www.sqlite.org/2021/sqlite-amalgamation-3360000.zip"
+  URL_MD5 c5d360c74111bafae1b704721ff18fe6
   SOURCE_DIR ${SQLITE_SB_SRC}
   BINARY_DIR ${SQLITE_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


[cmake] Fix problem concering linking against DRAWEXE

--- cmake/siconos_find_common_dep.cmake
+++ cmake/siconos_find_common_dep.cmake
@@ -161,8 +161,14 @@
   if(NOT WITH_MECHANISMS)
     COMPILE_WITH(OCE 0.15 REQUIRED ONLY mechanics)
     SET(SICONOS_HAVE_OCC TRUE)
-    LIST(REMOVE_ITEM SICONOS_LINK_LIBRARIES DRAWEXE)
-    LIST(REMOVE_ITEM mechanics_LINK_LIBRARIES DRAWEXE)
+  endif()
+  if(OCE_VERSION VERSION_LESS 0.18)
+    # DRAWEXE link fails on some systems and must be removed.
+    # MESSAGE(STATUS "DRAWEXE link fails on some systems is removed.")
+    list(REMOVE_ITEM SICONOS_LINK_LIBRARIES DRAWEXE)
+    list(REMOVE_ITEM mechanics_LINK_LIBRARIES DRAWEXE)
+    set(SICONOS_LINK_LIBRARIES ${SICONOS_LINK_LIBRARIES} "m" CACHE INTERNAL "List of external libraries")
+    set(mechanics_LINK_LIBRARIES ${mechanics_LINK_LIBRARIES} "m" CACHE INTERNAL "List of external libraries")
   endif()
 ENDIF()

@@ -172,8 +178,9 @@

   message(STATUS "Searching for OCE ....")
   compile_with(OCE COMPONENTS ${OCE_TOOLKITS} ONLY mechanics)
-  if(OCE_VERSION VERSION_LESS 0.16)
+  if(OCE_VERSION VERSION_LESS 0.18)
     # DRAWEXE link fails on some systems and must be removed.
+    #MESSAGE(STATUS "DRAWEXE link fails on some systems is removed.")
     list(REMOVE_ITEM mechanics_LINK_LIBRARIES DRAWEXE)
     list(REMOVE_ITEM SICONOS_LINK_LIBRARIES DRAWEXE)
     set(SICONOS_LINK_LIBRARIES ${SICONOS_LINK_LIBRARIES} "m" CACHE INTERNAL "List of external libraries")
@@ -186,7 +193,6 @@
       message(WARNING "Ignoring OCE installation due to missing toolkit(s): ${OCE_MISSING_TOOLKITS}")
     endif(NOT OCE_ALL_FOUND)
   endif(OCE_FOUND)
-
   if(OCE_FOUND)
     # Include files reside in ${OCE_INCLUDE_DIRS};
     #    include_directories(${OCE_INCLUDE_DIRS})


these do not work as expected

these do not work as expected

--- toolchains/apple.cmake
+++ toolchains/apple.cmake
@@ -41,9 +41,9 @@
 set( TNUN_ABIs ${TNUN_ABI} )

 #...mrmlj...reinvestigate this...
-set( CMAKE_XCODE_ATTRIBUTE_OBJROOT          "${PROJECT_BINARY_DIR}" )
-set( CMAKE_XCODE_ATTRIBUTE_BUILD_DIR        "${PROJECT_BINARY_DIR}" )
-set( CMAKE_XCODE_ATTRIBUTE_BUILD_ROOT       "${PROJECT_BINARY_DIR}" )
-set( CMAKE_XCODE_ATTRIBUTE_PROJECT_TEMP_DIR "${PROJECT_BINARY_DIR}" )
-set( CMAKE_XCODE_ATTRIBUTE_SYMROOT          "${PROJECT_BINARY_DIR}/lib" )
-set( CMAKE_XCODE_ATTRIBUTE_SYMROOT_RELEASE  "${PROJECT_BINARY_DIR}/lib" )
+# set( CMAKE_XCODE_ATTRIBUTE_OBJROOT          "${PROJECT_BINARY_DIR}" )
+# set( CMAKE_XCODE_ATTRIBUTE_BUILD_DIR        "${PROJECT_BINARY_DIR}" )
+# set( CMAKE_XCODE_ATTRIBUTE_BUILD_ROOT       "${PROJECT_BINARY_DIR}" )
+# set( CMAKE_XCODE_ATTRIBUTE_PROJECT_TEMP_DIR "${PROJECT_BINARY_DIR}" )
+# set( CMAKE_XCODE_ATTRIBUTE_SYMROOT          "${PROJECT_BINARY_DIR}/lib" )
+# set( CMAKE_XCODE_ATTRIBUTE_SYMROOT_RELEASE  "${PROJECT_BINARY_DIR}/lib" )


Clang:  - added -fwhole-program-vtables to LTO builds  - quick-documented (new) sanitizers that Apple's Clang does not yet support.

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -12,11 +12,12 @@

 list( APPEND TNUN_compiler_optimize_for_speed -fvectorize -fslp-vectorize -fslp-vectorize-aggressive )
 list( APPEND TNUN_compiler_report_optimization -Rpass=loop-.* )
+list( APPEND TNUN_compiler_LTO -fwhole-program-vtables )

 # http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
 # http://clang.llvm.org/docs/AddressSanitizer.html
 # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
-set( TNUN_linker_runtime_sanity_checks -fsanitize=undefined -fsanitize=integer -fsanitize=address )
+set( TNUN_linker_runtime_sanity_checks -fsanitize=undefined -fsanitize=integer -fsanitize=address ) # AppleClang lag: -fsanitize=thread -fsanitize=memory -fsanitize=dataflow -fsanitize=cfi -fsanitize=safe-stack
 set( TNUN_compiler_runtime_sanity_checks ${TNUN_linker_runtime_sanity_checks} -fno-omit-frame-pointer )

 # Leak sanitizer is available only on Clang on Linux x64.


Drop extra REQUIRED in macro_log_feature

--- gstreamer/ConfigureChecks.cmake
+++ gstreamer/ConfigureChecks.cmake
@@ -19,7 +19,7 @@
     find_package(GStreamerPlugins REQUIRED)
 else()
     find_package(GStreamer0.10 REQUIRED)
-    macro_log_feature(GSTREAMER_FOUND "GStreamer" "gstreamer 0.10 is required for the multimedia backend" "http://gstreamer.freedesktop.org/modules/" TRUE "0.10" REQUIRED)
+    macro_log_feature(GSTREAMER_FOUND "GStreamer" "gstreamer 0.10 is required for the multimedia backend" "http://gstreamer.freedesktop.org/modules/" TRUE "0.10")
     find_package(GStreamerPlugins0.10 REQUIRED)
 endif (GSTREAMER_FOUND)


Fix conditional statement in FindMAGMA.cmake

--- src/cmake/FindMAGMA.cmake
+++ src/cmake/FindMAGMA.cmake
@@ -17,6 +17,8 @@
 #If environment variable MAGMA_ROOT is specified, it has same effect as MAGMA_ROOT
 if( NOT MAGMA_ROOT AND NOT $ENV{MAGMA_ROOT} STREQUAL "" )
     set( MAGMA_ROOT $ENV{MAGMA_ROOT} )
+endif()
+if(MAGMA_ROOT)
     # set library directories
     set(MAGMA_LIBRARY_DIRS ${MAGMA_ROOT}/lib)
     # set include directories
@@ -32,4 +34,4 @@
     set(MAGMA_FOUND TRUE)
 else()
     set(MAGMA_FOUND FALSE)
-endif()+endif()


Include lcms2 in the .pc when building against lcms2 (#429)

In the lcms2 case, the static library libjxl.a installed depends on
lcms2 symbols so linking the final application against lcms2 is
required.

--- lib/jxl.cmake
+++ lib/jxl.cmake
@@ -554,6 +554,9 @@
 # Add a pkg-config file for libjxl.
 set(JPEGXL_LIBRARY_REQUIRES
     "libhwy libbrotlicommon libbrotlienc libbrotlidec")
+if(NOT JPEGXL_ENABLE_SKCMS)
+  set(JPEGXL_LIBRARY_REQUIRES "${JPEGXL_LIBRARY_REQUIRES} lcms2")
+endif()
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/jxl/libjxl.pc.in"
                "libjxl.pc" @ONLY)
 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libjxl.pc"


ENH: change loc of log files

ENH: change loc of log files

--- kwsysPlatformCxxTests.cmake
+++ kwsysPlatformCxxTests.cmake
@@ -7,10 +7,10 @@
       COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES}
       OUTPUT_VARIABLE OUTPUT)
     IF(${var}_COMPILED)
-      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeOutput.log
+      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeOutput.log
         "${description} compiled with the following output:\n${OUTPUT}\n\n" APPEND)
     ELSE(${var}_COMPILED)
-      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeError.log
+      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeError.log
         "${description} failed to compile with the following output:\n${OUTPUT}\n\n" APPEND)
     ENDIF(${var}_COMPILED)
     IF(${invert} MATCHES INVERT)


Split off 7.8.4

Split off 7.8.4

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 3 )
+set ( HPCC_POINT 5 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.0.26

Split off 8.0.26

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 25 )
+set ( HPCC_POINT 27 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.0.28

Split off 8.0.28

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 27 )
+set ( HPCC_POINT 29 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Nagios Monitoring 5.4.0-1 Gold

Nagios Monitoring 5.4.0-1 Gold

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,6 +5,6 @@
 set ( HPCC_MAJOR 5 )
 set ( HPCC_MINOR 4 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 5 )
+set ( HPCC_MATURITY "release" )
+set ( HPCC_SEQUENCE 1 )
 ###


Split off 8.8.0

Split off 8.8.0

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -4,8 +4,8 @@
 set ( HPCC_NAME "Nagios Monitoring" )
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
-set ( HPCC_MINOR 7 )
+set ( HPCC_MINOR 8 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
+set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.10.4

Split off 8.10.4

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 3 )
+set ( HPCC_POINT 5 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Version 1.14.1 (#90)

Version 1.14.1 (#90)

--- version.cmake
+++ version.cmake
@@ -1,4 +1,4 @@
 # Copyright (c) 2017-2018 Prism Skylabs
 set(ConnectSDK_VERSION_MAJOR 1)
 set(ConnectSDK_VERSION_MINOR 14)
-set(ConnectSDK_VERSION_REVISION 0)
+set(ConnectSDK_VERSION_REVISION 1)


ununsed cmake list variable

ununsed cmake list variable

--- CMake/External_GDAL.cmake
+++ CMake/External_GDAL.cmake
@@ -167,14 +167,13 @@
         ${CMAKE_INSTALL_PREFIX}/include/kml
         DEPENDEES install
     )
-     set(KMLLIBS)
+
     foreach(KMLLIB "base" "convenience" "regionator" "dom" "engine" "xsd")
         ExternalProject_Add_Step(${proj} remove_libkml_${KMLLIB}
         COMMAND ${CMAKE_COMMAND} -E remove
         ${CMAKE_INSTALL_PREFIX}/lib/libkml${KMLLIB}.lib
         DEPENDEES remove_libkml_headers
     )
-    list(APPEND KMLLIBS ${proj}_${KMLLIB})
     endforeach()


Make zlib and nifti dependencies opt-out. Closes #19

--- CMake/IRTKBuildDeps.cmake
+++ CMake/IRTKBuildDeps.cmake
@@ -18,7 +18,7 @@
 include_directories(${Boost_INCLUDE_DIRS})
 link_libraries(${Boost_LIBRARIES})

-option(WITH_ZLIB "Build with optional support for ZLIB." OFF)
+option(WITH_ZLIB "Build with optional support for ZLIB." ON)
 if(WITH_ZLIB)
   find_package(ZLIB REQUIRED)
   include_directories(${ZLIB_INCLUDE_DIRS})
@@ -91,7 +91,7 @@
   add_definitions(-DHAS_PNG -DHAVE_PNG)
 endif()

-option(WITH_NIFTI "Build with optional support for NIFTI." OFF)
+option(WITH_NIFTI "Build with optional support for NIFTI." ON)
 if(WITH_NIFTI)
   find_package(NifTICLib REQUIRED)
   include_directories(${NIFTICLIB_INCLUDE_DIRS})


Make thrift metadata available across fbcode oss builds.

Summary: There are downstream oss builds showing build failure caused by introduction of metadata. We want to make them proceed to build so we won't get errors in CI.

Reviewed By: iahs

Differential Revision: D19900007

fbshipit-source-id: 4201448f7980b53e407fd2bc1c74ed4ffa8e18c1

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -62,12 +62,14 @@
     "${output_dir}/gen-cpp2/${base}_types.h"
     "${output_dir}/gen-cpp2/${base}_types.tcc"
     "${output_dir}/gen-cpp2/${base}_types_custom_protocol.h"
+    "${output_dir}/gen-cpp2/${base}_metadata.h"
   )
   list(APPEND generated_sources
     "${output_dir}/gen-cpp2/${base}_constants.cpp"
     "${output_dir}/gen-cpp2/${base}_data.h"
     "${output_dir}/gen-cpp2/${base}_data.cpp"
     "${output_dir}/gen-cpp2/${base}_types.cpp"
+    "${output_dir}/gen-cpp2/${base}_metadata.cpp"
   )
   foreach(service IN LISTS ARG_SERVICES)
     list(APPEND generated_headers


Take missing code snippets from viewer-release for Variables.cmake/Darwin.

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -1,6 +1,6 @@
 # -*- cmake -*-
 #
-# Definitions of variables used throughout the build
+# Definitions of variables used throughout the Second Life build
 # process.
 #
 # Platform variables:
@@ -124,10 +124,10 @@
   if (INSTALL_PROPRIETARY)
     # Only turn on headless if we can find osmesa libraries.
     include(FindPkgConfig)
-    pkg_check_modules(OSMESA osmesa)
-    if (OSMESA_FOUND)
-      set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
-    endif (OSMESA_FOUND)
+    #pkg_check_modules(OSMESA osmesa)
+    #if (OSMESA_FOUND)
+    #  set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
+    #endif (OSMESA_FOUND)
   endif (INSTALL_PROPRIETARY)

 endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
@@ -172,7 +172,15 @@
     set(CMAKE_OSX_ARCHITECTURES i386)
   endif (NOT CMAKE_OSX_ARCHITECTURES)

-  # *TODO: x86_64 support?
+  if (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
+    set(ARCH universal)
+  else (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
+    if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
+      set(ARCH ppc)
+    else (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
+      set(ARCH i386)
+    endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
+  endif (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")

   set(LL_ARCH ${ARCH}_darwin)
   set(LL_ARCH_DIR universal-darwin)


Add -lmtmalloc to server linker flags on Solaris 10 and later

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -70,6 +70,10 @@

   # Solaris flags
   IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
+    IF(CMAKE_SYSTEM_VERSION VERSION_GREATER "5.9")
+      # Link mysqld with mtmalloc on Solaris 10 and later
+      SET(WITH_MYSQLD_LDFLAGS "-lmtmalloc" CACHE STRING "")
+    ENDIF()
     IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
       IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
         IF(CMAKE_SIZEOF_VOIDP EQUAL 4)


Update falcosecurity-libs cmake revision

This has recent changes to support more general purpose event
formatting.

Signed-off-by: Mark Stemm <1b6cbc2e568a933a16c6fa30b73e50cd507debf7@gmail.com>

--- cmake/modules/falcosecurity-libs.cmake
+++ cmake/modules/falcosecurity-libs.cmake
@@ -20,8 +20,8 @@
 # default below In case you want to test against another falcosecurity/libs version just pass the variable - ie., `cmake
 # -DFALCOSECURITY_LIBS_VERSION=dev ..`
 if(NOT FALCOSECURITY_LIBS_VERSION)
-  set(FALCOSECURITY_LIBS_VERSION "3aa7a83bf7b9e6229a3824e3fd1f4452d1e95cb4")
-  set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=1edb535b3778fcfb46bbeeda891f176a1bd591bebd7b89c27f04837e55a52beb")
+  set(FALCOSECURITY_LIBS_VERSION "a03ccfda795f2ba711b80f69cb06869f2b63121b")
+  set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=97ce5c30b985b77e1abb04ef7037c69be176cbe2122acf67a7f6ec6b39dbdc27")
 endif()

 # cd /path/to/build && cmake /path/to/source


[Build] Added a dependency on Boost::RegEx.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -108,6 +108,11 @@
       set (${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
     endif ()
   endforeach (_path_type)
+
+  # Define STDAIR_SAMPLE_DIR if the project is STDAIR
+  if ("${PROJECT_NAME}" STREQUAL "stdair")
+    set (STDAIR_SAMPLE_DIR ${INSTALL_SAMPLE_DIR})
+  endif ("${PROJECT_NAME}" STREQUAL "stdair")

   ##
   # Basic documentation (i.e., AUTHORS, NEWS, README, INSTALL)
@@ -378,7 +383,7 @@
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_USE_STATIC_RUNTIME OFF)
   set (BOOST_REQUIRED_COMPONENTS
-    program_options date_time iostreams serialization filesystem
+    regex program_options date_time iostreams serialization filesystem
     unit_test_framework python)

   # The first check is for the required components.
@@ -395,18 +400,19 @@

     # Update the list of dependencies for the project
     list (APPEND PROJ_DEP_LIBS_FOR_LIB
-      ${Boost_IOSTREAMS_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
-      ${Boost_FILESYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY}
-      ${Boost_PYTHON_LIBRARY})
-    list (APPEND PROJ_DEP_LIBS_FOR_BIN ${Boost_PROGRAM_OPTIONS_LIBRARY})
+      ${Boost_REGEX_LIBRARY} ${Boost_IOSTREAMS_LIBRARY}
+	  ${Boost_SERIALIZATION_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
+	  ${Boost_DATE_TIME_LIBRARY} ${Boost_PYTHON_LIBRARY})
+    list (APPEND PROJ_DEP_LIBS_FOR_BIN
+	  ${Boost_REGEX_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY})
     list (APPEND PROJ_DEP_LIBS_FOR_TST ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})

     # For display purposes
     set (BOOST_REQUIRED_LIBS
-      ${Boost_IOSTREAMS_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
-      ${Boost_FILESYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY}
-      ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
-      ${Boost_PYTHON_LIBRARY})
+      ${Boost_REGEX_LIBRARY} ${Boost_IOSTREAMS_LIBRARY}
+	  ${Boost_SERIALIZATION_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
+	  ${Boost_DATE_TIME_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
+	  ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_PYTHON_LIBRARY})
   endif (Boost_FOUND)

 endmacro (get_boost)
@@ -600,7 +606,8 @@
   set (pkgdatadir    ${datarootdir}/${PACKAGE})
   set (sampledir     ${STDAIR_SAMPLE_DIR})
   set (docdir        ${datarootdir}/doc/${PACKAGE}-${PACKAGE_VERSION})
-  set (htmldir       ${docdir})
+  set (htmldir       ${docdir}/html)
+  set (pdfdir        ${htmldir})
   set (mandir        ${datarootdir}/man)
   set (infodir       ${datarootdir}/info)
   set (pkgincludedir ${includedir}/stdair)


vtk: bump superbuild hash

vtk: bump superbuild hash

Contains a fix for Windows (missing includes).

--- superbuild/versions.cmake
+++ superbuild/versions.cmake
@@ -85,7 +85,7 @@

 add_revision(vtk
   GIT_REPOSITORY http://vtk.org/VTK.git
-  GIT_TAG bac5c2a5293cc2da9c0b86b419ad01a7aa7b0589 )
+  GIT_TAG 758c71bae1b4b244e72279d032c7b57081bf30e8 )

 if (UNIX)
   add_revision(mpi


Fix ffmpeg cmake feature test.

Fix ffmpeg cmake feature test.

--- CMakeModules/FindFFMPEG.cmake
+++ CMakeModules/FindFFMPEG.cmake
@@ -55,10 +55,12 @@

    include(CheckCXXSourceCompiles)

+   SET(CMAKE_REQUIRED_INCLUDES ${FFMPEG_INCLUDE_DIRS})
+
    CHECK_CXX_SOURCE_COMPILES(
      "#include \"${AVCODEC_INCLUDE_DIR}/libavformat/avformat.h\"
       int main() {
-        &AVFormatContext::max_analyze_duration2;
+        sizeof(AVFormatContext::max_analyze_duration2);
       }" HAVE_FFMPEG_MAX_ANALYZE_DURATION2
    )
    CHECK_CXX_SOURCE_COMPILES(


FIX (#1571): added pointSet.mps in the new format

--- Core/Code/Testing/files.cmake
+++ Core/Code/Testing/files.cmake
@@ -51,7 +51,7 @@
   mitkStepperTest.cpp
   itkTotalVariationDenoisingImageFilterTest.cpp
   mitkDICOMLocaleTest.cpp
-  #mitkPointSetLocaleTest.cpp
+  mitkPointSetLocaleTest.cpp
   mitkRenderingManagerTest.cpp
   vtkMitkThickSlicesFilterTest.cpp
 )


Update CMake modules

Update CMake modules

--- cmake/AddSAMPPlugin.cmake
+++ cmake/AddSAMPPlugin.cmake
@@ -23,7 +23,15 @@
                  LINK_FLAGS " -Wl,--enable-stdcall-fixup")
   endif()

-  if(UNIX AND NOT WIN32 AND NOT APPLE)
+  if(CYGWIN)
+    set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS "WIN32")
+    set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--kill-at")
+  elseif(UNIX AND NOT WIN32 AND NOT APPLE)
     set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS "LINUX")
   endif()
+
+  if(MINGW)
+    # Work around missing #include <stddef.h> in <SDK>/amx/amx.h.
+    set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS " -include stddef.h")
+  endif()
 endfunction()


fixing c++11 flag

fixing c++11 flag

--- cmake/CXX/GNU/Flags.cmake
+++ cmake/CXX/GNU/Flags.cmake
@@ -1 +1 @@
-BOTG_AddCompilerFlags( CXX "" )
+BOTG_AddCompilerFlags( CXX "-std=c++11" )


Fix check to detect compiler

Fix check to detect compiler

--HG--
branch : no_ign_msgs_findzmq

--- cmake/DefaultCFlags.cmake
+++ cmake/DefaultCFlags.cmake
@@ -56,6 +56,10 @@
     endif ()
 elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+    if (NOT MSVC12)
+        message(FATAL_ERROR "${PROJECT_NAME} requires VS 2013 os greater.")
+    endif()
 else ()
     message(FATAL_ERROR "Your C++ compiler does not support C++11.")
 endif ()


fixed cmake hack for automoc in windows

fixed cmake hack for automoc in windows

--- cmake/Depdendencies.cmake
+++ cmake/Depdendencies.cmake
@@ -34,14 +34,15 @@
         add_dependencies(Qt5::moc qt5)
         set(MOC_FILENAME "${PROJECT_BINARY_DIR}/bin/moc${CMAKE_EXECUTABLE_SUFFIX}" )
         set_target_properties(Qt5::moc PROPERTIES IMPORTED_LOCATION ${MOC_FILENAME})
-        # Create fake moc file to avoid errors on newer cmake
+        # HACK: Create fake moc executable to avoid errors on newer cmake
         if(NOT EXISTS ${MOC_FILENAME})
-            file(WRITE "${PROJECT_BINARY_DIR}/moc${CMAKE_EXECUTABLE_SUFFIX}" "")
-            file(COPY "${PROJECT_BINARY_DIR}/moc${CMAKE_EXECUTABLE_SUFFIX}"
+            # Copy an executable we know exist: cmake(.exe)
+            file(COPY ${CMAKE_COMMAND}
                 DESTINATION "${PROJECT_BINARY_DIR}/bin/"
                 FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
+            # Rename it to moc(.exe)
+            file(RENAME ${PROJECT_BINARY_DIR}/bin/cmake${CMAKE_EXECUTABLE_SUFFIX} ${PROJECT_BINARY_DIR}/bin/moc${CMAKE_EXECUTABLE_SUFFIX})
         endif()
-        #set(Qt5Core_DIR ${PROJECT_BINARY_DIR}/lib/cmake/Qt5Core/)
         find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets OpenGL Multimedia MultimediaWidgets PATHS ${PROJECT_SOURCE_DIR}/cmake/)
         list(APPEND LIBRARIES ${Qt5Core_LIBRARY})
         list(APPEND LIBRARIES ${Qt5Gui_LIBRARY})


- Remove linking options from Linux SDL2

--- cmake/Find/FindSDL2.cmake
+++ cmake/Find/FindSDL2.cmake
@@ -179,17 +179,17 @@
               )
       endif()
       set ( SDL2_LIBRARIES_TEMP ${SDL2_LIBRARIES_TEMP}
-          asound
-          pulse
-          pulse-simple
-          sndio
-          Xcursor
-          Xinerama
-          Xi
-          Xrandr
-          Xss
-          Xxf86vm
-          xkbcommon
+#          asound
+#          pulse
+#          pulse-simple
+#          sndio
+#          Xcursor
+#          Xinerama
+#          Xi
+#          Xrandr
+#          Xss
+#          Xxf86vm
+#          xkbcommon
           )
   endif()


Additional CMake check on gengetopt

Additional CMake check on gengetopt

--- cmake/FindGengetopt.cmake
+++ cmake/FindGengetopt.cmake
@@ -5,8 +5,13 @@
   GET_FILENAME_COMPONENT(CLITK_CMAKE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
   ADD_SUBDIRECTORY(${CLITK_CMAKE_DIR}/../utilities/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt)
 ELSE(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
-  ADD_EXECUTABLE(gengetopt IMPORTED)
-  SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})
+  IF(EXISTS ${GENGETOPT})
+    ADD_EXECUTABLE(gengetopt IMPORTED)
+    SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})
+  ELSE(EXISTS ${GENGETOPT})
+	  SET(GENGETOPT "GENGETOPT-NOTFOUND" CACHE FILEPATH "Path to a program." FORCE)
+    MESSAGE(FATAL_ERROR "No gengetopt executable found at the specified location")
+  ENDIF(EXISTS ${GENGETOPT})
 ENDIF(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")

 MACRO (WRAP_GGO GGO_SRCS)


Another attempted fix at linker flags.

Another attempted fix at linker flags.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -16,10 +16,11 @@

 set(DEV_BUILD 1)
-
+set(CI_BUILD 0)

 # Gitlab CI support
 if (DEFINED ENV{CI_COMMIT_REF_SLUG})
+	set(CI_BUILD 1)
 	set(REF_SLUG $ENV{CI_COMMIT_REF_SLUG})
 	string_starts_with(${REF_SLUG} "release" IS_RELEASE)
 	if (IS_RELEASE)
@@ -51,27 +52,24 @@
 	else()
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast /WX -D_ENABLE_EXTENDED_ALIGNED_STORAGE -Wno-unused-private-field -Wno-unused-variable -Wno-deprecated-declarations -Wno-microsoft-cast -Wno-switch -Wno-missing-declarations -Wno-string-plus-int -Wno-unused-function -Wno-assume")
 	endif()
-	if (MSVC_VERSION GREATER_EQUAL 1910)
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /permissive-")
-	endif ()
+
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /permissive-")
 	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /sdl /Oi /Ot /Oy /Ob2 /Zi")
 	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /sdl /Oi /Ot /Oy /Ob2 /Zi")

 	if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
-		if(DEV_BUILD EQUAL 0)
+		if(CI_BUILD EQUAL 1)
 			set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
 			set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /GL")
-			set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
-			set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
+			set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF")
+			set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /LTCG /OPT:REF")
+			set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF")
+			set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /LTCG /OPT:REF")
+			set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF")
+			set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /LTCG /OPT:REF")
 		endif()

 		set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG:FASTLINK")
-		set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
-		set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF /MAP")
-		set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO} /LTCG")
-		set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /LTCG /OPT:REF /MAP")
-		set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /OPT:REF /MAP")
-		set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /OPT:REF /MAP")
 	endif()
 	set(CMAKE_CXX_STANDARD 17)


Hotfix - updated XLink with a segfault fix

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -7,9 +7,9 @@

 hunter_config(
     XLink
-    VERSION "luxonis-2021.3-develop"
-    URL "https://github.com/luxonis/XLink/archive/1a89b3003529ccbed90a32cf7c13438be1901744.tar.gz"
-    SHA1 "5a0ce8016edf9a5092290b2971eba5e1f37059ee"
+    VERSION "luxonis-2021.3-master"
+    URL "https://github.com/luxonis/XLink/archive/2c6cdb857f3d21088b34ec172a0ea8df16528d00.tar.gz"
+    SHA1 "736da6528515d9c969008e2334f1387428f91a3b"
 )

 hunter_config(


remove unsued variable

remove unsued variable

--- cmake/InstallGBench.cmake
+++ cmake/InstallGBench.cmake
@@ -9,8 +9,7 @@

 set (GBENCH_ROOT_DIR        ${INSTALL_DIR})
 set (GBENCH_INCLUDE_PATH    ${GBENCH_ROOT_DIR}/include)
-set (GBENCH_LIBRARY_PATH    ${GBENCH_ROOT_DIR}/lib)
-set (GBENCH_LIBRARY         ${GBENCH_LIBRARY_PATH}/libbenchmark.a)
+set (GBENCH_LIBRARY         ${GBENCH_ROOT_DIR}/lib/libbenchmark.a)
 set (GBENCH_FOUND           YES)

 add_library(GBENCH_LIBRARY STATIC IMPORTED)


fix macro broken during merge

fix macro broken during merge


Avoid building dtk Composer when QtDeclarative is not present.

--- cmake/externals/dtk.cmake
+++ cmake/externals/dtk.cmake
@@ -16,6 +16,16 @@
         set(location GIT_REPOSITORY "git://dtk.inria.fr/+medinria/dtk/dtk-clone-medinria.git")
     endif()

+    #   Old ubuntu/fedora do not have QtDeclarative, disable the dtk composer for them.
+
+    include(CheckIncludeFileCXX)
+    Check_Include_File_CXX(QtDeclarative/QtDeclarative HasQtDeclarative)
+
+    set(DISABLE_DTK_COMPOSER)
+    if (NOT HasQtDeclarative)
+        set(DISABLE_DTK_COMPOSER -DDTK_BUILD_COMPOSER:BOOL=OFF)
+    endif()
+
     ExternalProject_Add(dtk
       PREFIX dtk
       ${location}
@@ -24,6 +34,7 @@
       CMAKE_GENERATOR ${gen}
       CMAKE_CACHE_ARGS
           -DDTK_HAVE_NITE:BOOL=OFF
+          ${DISABLE_DTK_COMPOSER}
     )

     set(dtk_DIR ${CMAKE_BINARY_DIR}/dtk/src/dtk-build PARENT_SCOPE)


set OGG_LIBRARY and OGG_INCLUDE_DIR

set OGG_LIBRARY and OGG_INCLUDE_DIR

--- cmake/get-libvorbis.cmake
+++ cmake/get-libvorbis.cmake
@@ -15,7 +15,9 @@
       -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
       -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
       # find libogg
-      -DCMAKE_PREFIX_PATH=${DEPENDENCY_INSTALL_DIR} ${CMAKE_PREFIX_PATH}
+      -DCMAKE_PREFIX_PATH=${DEPENDENCY_INSTALL_DIR} ${CMAKE_PREFIX_PATH}
+      -DOGG_LIBRARY=${DEPENDENCY_INSTALL_DIR}/lib/ogg.lib
+      -DOGG_INCLUDE_DIR=${DEPENDENCY_INSTALL_DIR}/lib
 )

 ExternalProject_Add(


do not look for examples in PCLConfig.cmake

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

--- cmake/pcl_pclconfig.cmake
+++ cmake/pcl_pclconfig.cmake
@@ -1,6 +1,6 @@

 set(PCL_SUBSYSTEMS_MODULES ${PCL_SUBSYSTEMS})
-list(REMOVE_ITEM PCL_SUBSYSTEMS_MODULES tools cuda_apps global_tests proctor gpu_kinfu)
+list(REMOVE_ITEM PCL_SUBSYSTEMS_MODULES tools cuda_apps global_tests proctor examples)

 set(PCLCONFIG_AVAILABLE_COMPONENTS)
 set(PCLCONFIG_AVAILABLE_COMPONENTS_LIST)


CI: update for new OGRE_RESOURCEMANAGER_STRICT value

--- ci-build.cmake
+++ ci-build.cmake
@@ -85,7 +85,7 @@
 execute_process(COMMAND ${CMAKE_COMMAND}
     -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
     -DOGRE_BUILD_TESTS=ON
-    -DOGRE_RESOURCEMANAGER_STRICT=ON
+    -DOGRE_RESOURCEMANAGER_STRICT=2
     -DOGRE_BUILD_DEPENDENCIES=${BUILD_DEPS}
     -DSWIG_EXECUTABLE=/usr/bin/swig3.0
     ${RENDERSYSTEMS}


update version 1.0

update version 1.0

--- superbuild/versions.cmake
+++ superbuild/versions.cmake
@@ -85,7 +85,7 @@

 add_revision(nuclearRGG
   GIT_REPOSITORY https://github.com/Kitware/RGG
-  GIT_TAG origin/master)
+  GIT_TAG 4186f7ce3af93e23d1864d5f8624ea5c9afd109c)

 add_revision(vtk
   GIT_REPOSITORY git://vtk.org/VTK.git
@@ -194,10 +194,6 @@
   URL_MD5 8d77df722a01cc86b292300a007a3282
   )

-add_revision(shiboken
-  GIT_REPOSITORY https://github.com/OpenGeoscience/shiboken.git
-  GIT_TAG smtk-head)
-
 #------------------------------------------------------------------------------
 # moab versions
 #------------------------------------------------------------------------------


clean up

clean up

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -447,7 +447,6 @@
 endif()

 if(CMAKE_GENERATOR MATCHES "Xcode" AND PLATFORM_INT MATCHES "^MAC_CATALYST")
-  message(STATUS "Define maccatalyst settings for ${PLATFORM_INT}")
   set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
   set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx")
   set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-maccatalyst")


[compiler-rt][cmake] Fix not lipo libclang_rt.cc_kext.a when building on OS X

Summary:

Fix r252525 - cmake configure failed to connect target builtins to target compiler-rt  because of early return call.

Patch by: Jacky Tsao (cao.zhong1)

Reviewers: beanz

Subscribers: llvm-commits

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

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -343,96 +343,94 @@
   # architectures we bail here.
   set(DARWIN_SOFT_FLOAT_ARCHS armv6m armv7m armv7em armv7)
   set(DARWIN_HARD_FLOAT_ARCHS armv7em armv7)
-  if(NOT COMPILER_RT_SUPPORTED_ARCH MATCHES ".*armv.*")
-    return()
-  endif()
-
-  list(FIND COMPILER_RT_SUPPORTED_ARCH i386 i386_idx)
-  if(i386_idx GREATER -1)
-    list(APPEND DARWIN_HARD_FLOAT_ARCHS i386)
-  endif()
-
-  list(FIND COMPILER_RT_SUPPORTED_ARCH x86_64 x86_64_idx)
-  if(x86_64_idx GREATER -1)
-    list(APPEND DARWIN_HARD_FLOAT_ARCHS x86_64)
-  endif()
-
-  set(MACHO_SYM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/macho_embedded)
-
-  set(CFLAGS "-Oz -Wall -fomit-frame-pointer -ffreestanding")
-  set(CMAKE_C_FLAGS "")
-  set(CMAKE_CXX_FLAGS "")
-  set(CMAKE_ASM_FLAGS "")
-
-  set(SOFT_FLOAT_FLAG -mfloat-abi=soft)
-  set(HARD_FLOAT_FLAG -mfloat-abi=hard)
-
-  set(ENABLE_PIC Off)
-  set(PIC_FLAG -fPIC)
-  set(STATIC_FLAG -static)
-
-  set(DARWIN_macho_embedded_ARCHS armv6m armv7m armv7em armv7 i386 x86_64)
-
-  set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
-    ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
-  set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR
-    ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded)
-
-  set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
-  set(CFLAGS_i386 "-march=pentium")
-
-  darwin_read_list_from_file(common_FUNCTIONS ${MACHO_SYM_DIR}/common.txt)
-  darwin_read_list_from_file(thumb2_FUNCTIONS ${MACHO_SYM_DIR}/thumb2.txt)
-  darwin_read_list_from_file(thumb2_64_FUNCTIONS ${MACHO_SYM_DIR}/thumb2-64.txt)
-  darwin_read_list_from_file(arm_FUNCTIONS ${MACHO_SYM_DIR}/arm.txt)
-  darwin_read_list_from_file(i386_FUNCTIONS ${MACHO_SYM_DIR}/i386.txt)
-
-
-  set(armv6m_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS})
-  set(armv7m_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS} ${thumb2_FUNCTIONS})
-  set(armv7em_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS} ${thumb2_FUNCTIONS})
-  set(armv7_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS} ${thumb2_FUNCTIONS} ${thumb2_64_FUNCTIONS})
-  set(i386_FUNCTIONS ${common_FUNCTIONS} ${i386_FUNCTIONS})
-  set(x86_64_FUNCTIONS ${common_FUNCTIONS})
-
-  foreach(arch ${DARWIN_macho_embedded_ARCHS})
-    darwin_filter_builtin_sources(${arch}_filtered_sources
-      INCLUDE ${arch}_FUNCTIONS
-      ${${arch}_SOURCES})
-    if(NOT ${arch}_filtered_sources)
-      message("${arch}_SOURCES: ${${arch}_SOURCES}")
-      message("${arch}_FUNCTIONS: ${${arch}_FUNCTIONS}")
-      message(FATAL_ERROR "Empty filtered sources!")
-    endif()
-  endforeach()
-
-  foreach(float_type SOFT HARD)
-    foreach(type PIC STATIC)
-      string(TOLOWER "${float_type}_${type}" lib_suffix)
-      foreach(arch ${DARWIN_${float_type}_FLOAT_ARCHS})
-        set(DARWIN_macho_embedded_SYSROOT ${DARWIN_osx_SYSROOT})
-        set(float_flag)
-        if(${arch} MATCHES "^arm")
-          # x86 targets are hard float by default, but the complain about the
-          # float ABI flag, so don't pass it unless we're targeting arm.
-          set(float_flag ${${float_type}_FLOAT_FLAG})
-        endif()
-        darwin_add_builtin_library(clang_rt ${lib_suffix}
-                              OS macho_embedded
-                              ARCH ${arch}
-                              SOURCES ${${arch}_filtered_sources}
-                              CFLAGS ${CFLAGS} -arch ${arch} ${${type}_FLAG} ${float_flag} ${CFLAGS_${arch}}
-                              PARENT_TARGET builtins)
+  if(COMPILER_RT_SUPPORTED_ARCH MATCHES ".*armv.*")
+    list(FIND COMPILER_RT_SUPPORTED_ARCH i386 i386_idx)
+    if(i386_idx GREATER -1)
+      list(APPEND DARWIN_HARD_FLOAT_ARCHS i386)
+    endif()
+
+    list(FIND COMPILER_RT_SUPPORTED_ARCH x86_64 x86_64_idx)
+    if(x86_64_idx GREATER -1)
+      list(APPEND DARWIN_HARD_FLOAT_ARCHS x86_64)
+    endif()
+
+    set(MACHO_SYM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/macho_embedded)
+
+    set(CFLAGS "-Oz -Wall -fomit-frame-pointer -ffreestanding")
+    set(CMAKE_C_FLAGS "")
+    set(CMAKE_CXX_FLAGS "")
+    set(CMAKE_ASM_FLAGS "")
+
+    set(SOFT_FLOAT_FLAG -mfloat-abi=soft)
+    set(HARD_FLOAT_FLAG -mfloat-abi=hard)
+
+    set(ENABLE_PIC Off)
+    set(PIC_FLAG -fPIC)
+    set(STATIC_FLAG -static)
+
+    set(DARWIN_macho_embedded_ARCHS armv6m armv7m armv7em armv7 i386 x86_64)
+
+    set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
+      ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
+    set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR
+      ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded)
+
+    set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
+    set(CFLAGS_i386 "-march=pentium")
+
+    darwin_read_list_from_file(common_FUNCTIONS ${MACHO_SYM_DIR}/common.txt)
+    darwin_read_list_from_file(thumb2_FUNCTIONS ${MACHO_SYM_DIR}/thumb2.txt)
+    darwin_read_list_from_file(thumb2_64_FUNCTIONS ${MACHO_SYM_DIR}/thumb2-64.txt)
+    darwin_read_list_from_file(arm_FUNCTIONS ${MACHO_SYM_DIR}/arm.txt)
+    darwin_read_list_from_file(i386_FUNCTIONS ${MACHO_SYM_DIR}/i386.txt)
+
+
+    set(armv6m_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS})
+    set(armv7m_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS} ${thumb2_FUNCTIONS})
+    set(armv7em_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS} ${thumb2_FUNCTIONS})
+    set(armv7_FUNCTIONS ${common_FUNCTIONS} ${arm_FUNCTIONS} ${thumb2_FUNCTIONS} ${thumb2_64_FUNCTIONS})
+    set(i386_FUNCTIONS ${common_FUNCTIONS} ${i386_FUNCTIONS})
+    set(x86_64_FUNCTIONS ${common_FUNCTIONS})
+
+    foreach(arch ${DARWIN_macho_embedded_ARCHS})
+      darwin_filter_builtin_sources(${arch}_filtered_sources
+        INCLUDE ${arch}_FUNCTIONS
+        ${${arch}_SOURCES})
+      if(NOT ${arch}_filtered_sources)
+        message("${arch}_SOURCES: ${${arch}_SOURCES}")
+        message("${arch}_FUNCTIONS: ${${arch}_FUNCTIONS}")
+        message(FATAL_ERROR "Empty filtered sources!")
+      endif()
+    endforeach()
+
+    foreach(float_type SOFT HARD)
+      foreach(type PIC STATIC)
+        string(TOLOWER "${float_type}_${type}" lib_suffix)
+        foreach(arch ${DARWIN_${float_type}_FLOAT_ARCHS})
+          set(DARWIN_macho_embedded_SYSROOT ${DARWIN_osx_SYSROOT})
+          set(float_flag)
+          if(${arch} MATCHES "^arm")
+            # x86 targets are hard float by default, but the complain about the
+            # float ABI flag, so don't pass it unless we're targeting arm.
+            set(float_flag ${${float_type}_FLOAT_FLAG})
+          endif()
+          darwin_add_builtin_library(clang_rt ${lib_suffix}
+                                OS macho_embedded
+                                ARCH ${arch}
+                                SOURCES ${${arch}_filtered_sources}
+                                CFLAGS ${CFLAGS} -arch ${arch} ${${type}_FLAG} ${float_flag} ${CFLAGS_${arch}}
+                                PARENT_TARGET builtins)
+        endforeach()
+        foreach(lib ${macho_embedded_${lib_suffix}_libs})
+          set_target_properties(${lib} PROPERTIES LINKER_LANGUAGE C)
+        endforeach()
+        darwin_lipo_libs(clang_rt.${lib_suffix}
+                      PARENT_TARGET builtins
+                      LIPO_FLAGS ${macho_embedded_${lib_suffix}_lipo_flags}
+                      DEPENDS ${macho_embedded_${lib_suffix}_libs}
+                      OUTPUT_DIR ${DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR}
+                      INSTALL_DIR ${DARWIN_macho_embedded_LIBRARY_INSTALL_DIR})
       endforeach()
-      foreach(lib ${macho_embedded_${lib_suffix}_libs})
-        set_target_properties(${lib} PROPERTIES LINKER_LANGUAGE C)
-      endforeach()
-      darwin_lipo_libs(clang_rt.${lib_suffix}
-                    PARENT_TARGET builtins
-                    LIPO_FLAGS ${macho_embedded_${lib_suffix}_lipo_flags}
-                    DEPENDS ${macho_embedded_${lib_suffix}_libs}
-                    OUTPUT_DIR ${DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR}
-                    INSTALL_DIR ${DARWIN_macho_embedded_LIBRARY_INSTALL_DIR})
     endforeach()
-  endforeach()
+  endif()
 endmacro()


Updating towards v4.7.2

Updating towards v4.7.2

NOTE: The prior has was incorrect and not part of the 4.7 release
branch

Change-Id: I26c222863cf3a68b9adae30fb1c826385499fc07

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 8f7c404aff99f5ae3dfedce6e480701f0304864c) # after v4.7.1 release
+set(ITK_TAG_COMMAND GIT_TAG 3260c917254b52382edda14733ca262debaaeff5) # after v4.7.1 release

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


modules: put the OSX framework workaround also into FindOpenGLES2.cmake.

--- modules/FindOpenGLES2.cmake
+++ modules/FindOpenGLES2.cmake
@@ -69,9 +69,17 @@

 if(NOT TARGET OpenGLES2::OpenGLES2)
     if(OPENGLES2_LIBRARY_NEEDED)
-        add_library(OpenGLES2::OpenGLES2 UNKNOWN IMPORTED)
-        set_property(TARGET OpenGLES2::OpenGLES2 PROPERTY
-            IMPORTED_LOCATION ${OPENGLES2_LIBRARY})
+        # Work around BUGGY framework support on OSX
+        # http://public.kitware.com/pipermail/cmake/2016-April/063179.html
+        if(CORRADE_TARGET_APPLE AND ${OPENGLES2_LIBRARY} MATCHES "\\.framework$")
+            add_library(OpenGLES2::OpenGLES2 INTERFACE IMPORTED)
+            set_property(TARGET OpenGLES2::OpenGLES2 APPEND PROPERTY
+                INTERFACE_LINK_LIBRARIES ${OPENGLES2_LIBRARY})
+        else()
+            add_library(OpenGLES2::OpenGLES2 UNKNOWN IMPORTED)
+            set_property(TARGET OpenGLES2::OpenGLES2 PROPERTY
+                IMPORTED_LOCATION ${OPENGLES2_LIBRARY})
+        endif()
     else()
         # This won't work in CMake 2.8.12, but that affects Emscripten only so
         # I assume people building for that are not on that crap old Ubuntu


enh: Substitute CMake license header by full BSD License text [Templates]

--- Templates/mirtk-module/1.0/config/FindMIRTK.cmake
+++ Templates/mirtk-module/1.0/config/FindMIRTK.cmake
@@ -76,15 +76,34 @@
 # Copyright 2016 Imperial College London
 # Copyright 2016 Andreas Schuh
 #
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
+# 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 names of Kitware, Inc., the Insight Software Consortium,
+#   nor the names of their 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.
 #=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)

 # Set MIRTKConfig.cmake directory from installation prefix path
 function (_mirtk_root_to_config_dir OUT IN)