Fix: no need for pcl_examples it is all handled in examples/CMakeLists.txt

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

--- cmake/pcl_examples.cmake
+++ cmake/pcl_examples.cmake
@@ -1,17 +0,0 @@
-# Example management
-
-# Add an option so the user can turn tests off
-option(BUILD_EXAMPLES "Build the library examples" ${DEFAULT})
-
-# Print a suitable status message
-if(NOT ${DEFAULT} AND NOT ${BUILD_EXAMPLES})
-    if(REASON)
-        message(STATUS "Examples will not be built: ${REASON}")
-    else(REASON)
-        message(STATUS "Examples will not be built: Disabled manually")
-    endif(REASON)
-elseif(NOT ${BUILD_EXAMPLES})
-    message(STATUS "Examples will not be built: Disabled manually")
-else(NOT ${DEFAULT} AND NOT ${BUILD_EXAMPLES})
-    message(STATUS "Examples will be built")
-endif(NOT ${DEFAULT} AND NOT ${BUILD_EXAMPLES})


Removed cmake warnings

Removed cmake warnings

--- pybind11/cmake/pybind.cmake
+++ pybind11/cmake/pybind.cmake
@@ -5,14 +5,10 @@

 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../pybind11/tools")

-message(WARN "Checking python executable: ${PYBIND_PYTHON_EXECUTABLE}")
 set(TEMP_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
 if(DEFINED PYBIND_PYTHON_EXECUTABLE)
-    message(WARN "Changing executable")
     set(PYTHON_EXECUTABLE ${PYBIND_PYTHON_EXECUTABLE} CACHE INTERNAL "")
 endif()
-
-message(WARN "Using python executable: ${PYTHON_EXECUTABLE}")

 include(pybind11Tools)

@@ -22,11 +18,6 @@
 set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} CACHE INTERNAL "")
 set(PYTHON_MODULE_PREFIX ${PYTHON_MODULE_PREFIX} CACHE INTERNAL "")
 set(PYTHON_MODULE_EXTENSION ${PYTHON_MODULE_EXTENSION} CACHE INTERNAL "")
-
-message(WARN "Python: ${PYTHON_INCLUDE_DIRS}")
-message(WARN "Python: ${PYTHON_LIBRARIES}")
-message(WARN "Python: ${PYTHON_MODULE_PREFIX}")
-message(WARN "Python: ${PYTHON_MODULE_EXTENSION}")

 set(PYTHON_EXECUTABLE ${TEMP_PYTHON_EXECUTABLE} CACHE INTERNAL "")


python extras is required to build c extensions (#239)

--- rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
+++ rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
@@ -21,7 +21,7 @@
 find_package(PythonInterp 3.5 REQUIRED)

 find_package(python_cmake_module REQUIRED)
-find_package(PythonExtra MODULE)
+find_package(PythonExtra MODULE REQUIRED)

 # Get a list of typesupport implementations from valid rmw implementations.
 rosidl_generator_py_get_typesupports(_typesupport_impls)


Fix cpplint CMake option description.

Fix cpplint CMake option description.

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -142,7 +142,7 @@
 ## CMake support for running Google's cpplint over the C++ source.

 # Should we bother with cpplint at all?
-option(SURGSIM_CPPLINT "Include the unit tests in the build" ON)
+option(SURGSIM_CPPLINT "Include cpplint in the build" ON)

 # Running cpplint requires Python
 if(SURGSIM_CPPLINT)


Resolve MatchPoint plugin dependencies

Resolve MatchPoint plugin dependencies

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -163,8 +163,10 @@
       endforeach()
     endif()

+    file(GLOB _match_point_plugins \"\${_bin_path}/mdra-*\")
+
     set(PLUGINS )
-    foreach(_plugin ${_install_PLUGINS} \${GLOBBED_PLUGINS})
+    foreach(_plugin ${_install_PLUGINS} \${GLOBBED_PLUGINS} \${_match_point_plugins})
       get_filename_component(_plugin_realpath \${_plugin} REALPATH)
       list(APPEND PLUGINS \${_plugin_realpath})
     endforeach()


Added missing included module.

Added missing included module.

--- CMakeModules/FindEXPAT.cmake
+++ CMakeModules/FindEXPAT.cmake
@@ -25,10 +25,7 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-
-MACRO (FIND_EXPAT)
-
-ENDMACRO ()
+include(CheckCSourceCompiles)

 string(TOUPPER ${PROJECT_NAME} _UPPER_PROJECT_NAME)
 set(_PROJECT_DEPENDENCY_DIR ${_UPPER_PROJECT_NAME}_DEPENDENCY_DIR)


[cmake] enhance OT CMake config options (allow on/off/unspecified) (#7979)

This commit enhances OT CMake config options allowing them to use 3
values of "on", "off", and unspecified (empty string).

With this change is an `OT_{FEATURE}` option is set to "off", it is
explicitly disabled (`-DOPENTHREAD_CONFIG_{FEATURE}=0` is added which
defines the corresponding OT config as zero). This changes the CMake OT
option behavior from before where "off" was treated as unspecified.

If `OT_{FEATURE}` is left unspecified (or set to empty string), then
the related OT config is not defined by CMake build allowing it to be
to be determined by other means, e.g., a project specific config
header or default config specified in `src/core/config` header files).

This commit adds a CMake macro `ot_option()` to help simplify defining
CMake OT config options. This macro also help emit status messages
indicating the value of each OT config.

--- etc/cmake/options.cmake
+++ etc/cmake/options.cmake
@@ -34,58 +34,126 @@
 option(OT_MTD "enable MTD" ON)
 option(OT_RCP "enable RCP" ON)

-option(OT_ANYCAST_LOCATOR "enable anycast locator support")
-if(OT_ANYCAST_LOCATOR)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE=1")
+set(OT_CONFIG_VALUES
+    ""
+    "ON"
+    "OFF"
+)
+
+macro(ot_option name ot_config description)
+    # Declare an OT cmake config with `name` mapping to OPENTHREAD_CONFIG
+    # `ot_config`. Parameter `description` provides the help string for this
+    # OT cmake config. There is an optional last parameter which if provided
+    # determines the default value for the cmake config. If not provided
+    # empty string is used which will be treated as "not specified". In this
+    # case, the variable `name` would still be false but the related
+    # OPENTHREAD_CONFIG is not added in `ot-config`.
+
+    if (${ARGC} GREATER 3)
+        set(${name} ${ARGN} CACHE STRING "enable ${description}")
+    else()
+        set(${name} "" CACHE STRING "enable ${description}")
+    endif()
+
+    set_property(CACHE ${name} PROPERTY STRINGS ${OT_CONFIG_VALUES})
+
+    string(COMPARE EQUAL "${${name}}" "" is_empty)
+    if (is_empty)
+        message(STATUS "${name}=\"\"")
+    elseif (${name})
+        message(STATUS "${name}=ON --> ${ot_config}=1")
+        target_compile_definitions(ot-config INTERFACE "${ot_config}=1")
+    else()
+        message(STATUS "${name}=OFF --> ${ot_config}=0")
+        target_compile_definitions(ot-config INTERFACE "${ot_config}=0")
+    endif()
+endmacro()
+
+ot_option(OT_ANYCAST_LOCATOR OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE "anycast locator")
+ot_option(OT_ASSERT OPENTHREAD_CONFIG_ASSERT_ENABLE "assert function OT_ASSERT()")
+ot_option(OT_BACKBONE_ROUTER OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE "backbone router functionality")
+ot_option(OT_BACKBONE_ROUTER_DUA_NDPROXYING OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE "BBR DUA ND Proxy")
+ot_option(OT_BACKBONE_ROUTER_MULTICAST_ROUTING OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE "BBR MR")
+ot_option(OT_BORDER_AGENT OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE "border agent")
+ot_option(OT_BORDER_ROUTER OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE "border router")
+ot_option(OT_BORDER_ROUTING OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE "border routing")
+ot_option(OT_BORDER_ROUTING_NAT64 OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE "border routing NAT64")
+ot_option(OT_CHANNEL_MANAGER OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE "channel manager")
+ot_option(OT_CHANNEL_MONITOR OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE "channel monitor")
+ot_option(OT_CHILD_SUPERVISION OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE "child supervision")
+ot_option(OT_COAP OPENTHREAD_CONFIG_COAP_API_ENABLE "coap api")
+ot_option(OT_COAP_BLOCK OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE "coap block-wise transfer (RFC7959)")
+ot_option(OT_COAP_OBSERVE OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE "coap observe (RFC7641)")
+ot_option(OT_COAPS OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE "secure coap")
+ot_option(OT_COMMISSIONER OPENTHREAD_CONFIG_COMMISSIONER_ENABLE "commissioner")
+ot_option(OT_CSL_AUTO_SYNC OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE "data polling based on csl")
+ot_option(OT_CSL_DEBUG OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE "csl debug")
+ot_option(OT_CSL_RECEIVER OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE "csl receiver")
+ot_option(OT_DATASET_UPDATER OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE "dataset updater")
+ot_option(OT_DHCP6_CLIENT OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE "DHCP6 client")
+ot_option(OT_DHCP6_SERVER OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE "DHCP6 server")
+ot_option(OT_DIAGNOSTIC OPENTHREAD_CONFIG_DIAG_ENABLE "diagnostic")
+ot_option(OT_DNS_CLIENT OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE "DNS client")
+ot_option(OT_DNS_DSO OPENTHREAD_CONFIG_DNS_DSO_ENABLE "DNS Stateful Operations (DSO)")
+ot_option(OT_DNSSD_SERVER OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE "DNS-SD server")
+ot_option(OT_DUA OPENTHREAD_CONFIG_DUA_ENABLE "Domain Unicast Address (DUA)")
+ot_option(OT_ECDSA OPENTHREAD_CONFIG_ECDSA_ENABLE "ECDSA")
+ot_option(OT_EXTERNAL_HEAP OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE "external heap")
+ot_option(OT_FIREWALL OPENTHREAD_POSIX_CONFIG_FIREWALL_ENABLE "firewall")
+ot_option(OT_HISTORY_TRACKER OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE "history tracker")
+ot_option(OT_IP6_FRAGM OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE "ipv6 fragmentation")
+ot_option(OT_JAM_DETECTION OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE "jam detection")
+ot_option(OT_JOINER OPENTHREAD_CONFIG_JOINER_ENABLE "joiner")
+ot_option(OT_LEGACY OPENTHREAD_CONFIG_LEGACY_ENABLE "legacy network")
+ot_option(OT_LINK_METRICS_INITIATOR OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE "link metrics initiator")
+ot_option(OT_LINK_METRICS_SUBJECT OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE "link metrics subject")
+ot_option(OT_LINK_RAW OPENTHREAD_CONFIG_LINK_RAW_ENABLE "link raw service")
+ot_option(OT_LOG_LEVEL_DYNAMIC OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE "dynamic log level control")
+ot_option(OT_MAC_FILTER OPENTHREAD_CONFIG_MAC_FILTER_ENABLE "mac filter")
+ot_option(OT_MESSAGE_USE_HEAP OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE "heap allocator for message buffers")
+ot_option(OT_MLE_LONG_ROUTES OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE "MLE long routes extension (experimental)")
+ot_option(OT_MLR OPENTHREAD_CONFIG_MLR_ENABLE "Multicast Listener Registration (MLR)")
+ot_option(OT_MTD_NETDIAG OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE "TMF network diagnostics on MTDs")
+ot_option(OT_MULTIPLE_INSTANCE OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE "multiple instances")
+ot_option(OT_NEIGHBOR_DISCOVERY_AGENT OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE "neighbor discovery agent")
+ot_option(OT_NETDATA_PUBLISHER OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE "Network Data publisher")
+ot_option(OT_OTNS OPENTHREAD_CONFIG_OTNS_ENABLE "OTNS")
+ot_option(OT_PING_SENDER OPENTHREAD_CONFIG_PING_SENDER_ENABLE "ping sender" ${OT_APP_CLI})
+ot_option(OT_PLATFORM_NETIF OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE "platform netif")
+ot_option(OT_PLATFORM_UDP OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE "platform UDP")
+ot_option(OT_REFERENCE_DEVICE OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE "test harness reference device")
+ot_option(OT_SERVICE OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE "Network Data service")
+ot_option(OT_SETTINGS_RAM OPENTHREAD_SETTINGS_RAM "volatile-only storage of settings")
+ot_option(OT_SLAAC OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE "SLAAC address")
+ot_option(OT_SNTP_CLIENT OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE "SNTP client")
+ot_option(OT_SRP_CLIENT OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE "SRP client")
+ot_option(OT_SRP_SERVER OPENTHREAD_CONFIG_SRP_SERVER_ENABLE "SRP server")
+ot_option(OT_TIME_SYNC OPENTHREAD_CONFIG_TIME_SYNC_ENABLE "time synchronization service")
+ot_option(OT_TREL OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE "TREL radio link for Thread over Infrastructure feature")
+ot_option(OT_TX_BEACON_PAYLOAD OPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE "tx beacon payload")
+ot_option(OT_UDP_FORWARD OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE "UDP forward")
+ot_option(OT_UPTIME OPENTHREAD_CONFIG_UPTIME_ENABLE "uptime")
+
+option(OT_DOC "Build OpenThread documentation")
+
+option(OT_FULL_LOGS "enable full logs")
+if(OT_FULL_LOGS)
+    if(NOT OT_LOG_LEVEL)
+        message(STATUS "OT_FULL_LOGS=ON --> Setting LOG_LEVEL to DEBG")
+        target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LOG_LEVEL=OT_LOG_LEVEL_DEBG")
+    endif()
+    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL=1")
 endif()

-option(OT_ASSERT "enable assert function OT_ASSERT()" ON)
-if(OT_ASSERT)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_ASSERT_ENABLE=1")
+set(OT_RCP_RESTORATION_MAX_COUNT "0" CACHE STRING "set max RCP restoration count")
+if(OT_RCP_RESTORATION_MAX_COUNT MATCHES "^[0-9]+$")
+    message(STATUS "OT_RCP_RESTORATION_MAX_COUNT=${OT_RCP_RESTORATION_MAX_COUNT}")
+    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=${OT_RCP_RESTORATION_MAX_COUNT}")
 else()
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_ASSERT_ENABLE=0")
+    message(FATAL_ERROR "Invalid max RCP restoration count: ${OT_RCP_RESTORATION_MAX_COUNT}")
 endif()

-option(OT_BACKBONE_ROUTER "enable backbone router functionality")
-if(OT_BACKBONE_ROUTER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=1")
-    set(OT_BACKBONE_ROUTER_DUA_NDPROXYING ON CACHE BOOL "Enable DUA NDProxying by default")
-    set(OT_BACKBONE_ROUTER_MULTICAST_ROUTING ON CACHE BOOL "Enable Multicast Routing by default")
-endif()
-
-option(OT_BACKBONE_ROUTER_DUA_NDPROXYING "enable Backbone Router DUA ND Proxying functionality" OFF)
-if(OT_BACKBONE_ROUTER_DUA_NDPROXYING)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=1")
-else()
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0")
-endif()
-
-option(OT_BACKBONE_ROUTER_MULTICAST_ROUTING "enable Backbone Router Multicast Routing functionality" OFF)
-if(OT_BACKBONE_ROUTER_MULTICAST_ROUTING)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=1")
-else()
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0")
-endif()
-
-option(OT_BORDER_AGENT "enable border agent support")
-if(OT_BORDER_AGENT)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1")
-endif()
-
-option(OT_BORDER_ROUTER "enable border router support")
-if(OT_BORDER_ROUTER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1")
-endif()
-
-option(OT_BORDER_ROUTING "enable border routing support")
-if(OT_BORDER_ROUTING)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=1")
-endif()
-
-option(OT_BORDER_ROUTING_NAT64 "enable border routing NAT64 support")
-if(OT_BORDER_ROUTING_NAT64)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_BORDER_ROUTING_NAT64_ENABLE=1")
-endif()
+option(OT_EXCLUDE_TCPLP_LIB "exclude TCPlp library from build")

 if(NOT OT_EXTERNAL_MBEDTLS)
     set(OT_MBEDTLS mbedtls)
@@ -102,307 +170,7 @@
     target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0")
 endif()

-option(OT_CHANNEL_MANAGER "enable channel manager support")
-if(OT_CHANNEL_MANAGER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1")
-endif()
-
-option(OT_CHANNEL_MONITOR "enable channel monitor support")
-if(OT_CHANNEL_MONITOR)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1")
-endif()
-
-option(OT_CHILD_SUPERVISION "enable child supervision support")
-if(OT_CHILD_SUPERVISION)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1")
-endif()
-
-option(OT_COAP "enable coap api support")
-if(OT_COAP)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_COAP_API_ENABLE=1")
-endif()
-
-option(OT_COAPS "enable secure coap api support")
-if(OT_COAPS)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1")
-endif()
-
-option(OT_COAP_BLOCK "enable coap block-wise transfer (RFC7959) api support")
-if(OT_COAP_BLOCK)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE=1")
-endif()
-
-option(OT_COAP_OBSERVE "enable coap observe (RFC7641) api support")
-if(OT_COAP_OBSERVE)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=1")
-endif()
-
-option(OT_COMMISSIONER "enable commissioner support")
-if(OT_COMMISSIONER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1")
-endif()
-
-option(OT_CSL_RECEIVER "enable csl receiver")
-if(OT_CSL_RECEIVER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1")
-endif()
-
-option(OT_CSL_AUTO_SYNC "enable data polling based on csl config" ${OT_CSL_RECEIVER})
-if(OT_CSL_AUTO_SYNC)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1")
-else()
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=0")
-endif()
-
-option(OT_CSL_DEBUG "enable csl debug")
-if(OT_CSL_DEBUG)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE=1")
-endif()
-
-option(OT_DATASET_UPDATER "enable dataset updater support")
-if(OT_DATASET_UPDATER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=1")
-endif()
-
-option(OT_DHCP6_CLIENT "enable DHCP6 client support")
-if(OT_DHCP6_CLIENT)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1")
-endif()
-
-option(OT_DHCP6_SERVER "enable DHCP6 server support")
-if(OT_DHCP6_SERVER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1")
-endif()
-
-option(OT_DIAGNOSTIC "enable diagnostic support")
-if(OT_DIAGNOSTIC)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_DIAG_ENABLE=1")
-endif()
-
-option(OT_DNS_CLIENT "enable DNS client support")
-if(OT_DNS_CLIENT)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1")
-endif()
-
-option(OT_DNS_DSO "enable DNS Stateful Operations (DSO) support")
-if(OT_DNS_DSO)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_DNS_DSO_ENABLE=1")
-endif()
-
-option(OT_DNSSD_SERVER "enable DNS-SD server support")
-if(OT_DNSSD_SERVER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=1")
-endif()
-
-option(OT_DOC "Build OpenThread documentation")
-
-option(OT_ECDSA "enable ECDSA support")
-if(OT_ECDSA)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_ECDSA_ENABLE=1")
-endif()
-
-option(OT_SRP_CLIENT "enable SRP client support")
-if (OT_SRP_CLIENT)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1")
-endif()
-
-option(OT_DUA "enable Domain Unicast Address feature for Thread 1.2")
-if(OT_DUA)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_DUA_ENABLE=1")
-endif()
-
-option(OT_MESSAGE_USE_HEAP "enable heap allocator for message buffers")
-if(OT_MESSAGE_USE_HEAP)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1")
-endif()
-
-option(OT_MLR "enable Multicast Listener Registration feature for Thread 1.2")
-if(OT_MLR)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MLR_ENABLE=1")
-endif()
-
-option(OT_EXTERNAL_HEAP "enable external heap support")
-if(OT_EXTERNAL_HEAP)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1")
-endif()
-
-option(OT_HISTORY_TRACKER "enable history tracker support")
-if(OT_HISTORY_TRACKER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=1")
-endif()
-
-option(OT_IP6_FRAGM "enable ipv6 fragmentation support")
-if(OT_IP6_FRAGM)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1")
-endif()
-
-option(OT_JAM_DETECTION "enable jam detection support")
-if(OT_JAM_DETECTION)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1")
-endif()
-
-option(OT_JOINER "enable joiner support")
-if(OT_JOINER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_JOINER_ENABLE=1")
-endif()
-
-option(OT_LEGACY "enable legacy network support")
-if(OT_LEGACY)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LEGACY_ENABLE=1")
-endif()
-
-option(OT_LINK_RAW "enable link raw service")
-if(OT_LINK_RAW)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LINK_RAW_ENABLE=1")
-endif()
-
-option(OT_LINK_METRICS_INITIATOR "enable link metrics initiator")
-if (OT_LINK_METRICS_INITIATOR)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=1")
-endif()
-
-option(OT_LINK_METRICS_SUBJECT "enable link metrics subject")
-if (OT_LINK_METRICS_SUBJECT)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=1")
-endif()
-
-option(OT_LOG_LEVEL_DYNAMIC "enable dynamic log level control")
-if(OT_LOG_LEVEL_DYNAMIC)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1")
-endif()
-
-option(OT_MAC_FILTER "enable mac filter support")
-if(OT_MAC_FILTER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1")
-endif()
-
-option(OT_MLE_LONG_ROUTES "enable MLE long routes extension (experimental, breaks Thread conformance)")
-if(OT_MLE_LONG_ROUTES)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=1")
-endif()
-
-option(OT_MTD_NETDIAG "enable TMF network diagnostics on MTDs")
-if(OT_MTD_NETDIAG)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1")
-endif()
-
-option(OT_MULTIPLE_INSTANCE "enable multiple instances")
-if(OT_MULTIPLE_INSTANCE)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=1")
-endif()
-
-option(OT_NEIGHBOR_DISCOVERY_AGENT "enable neighbor discovery agent support")
-if(OT_NEIGHBOR_DISCOVERY_AGENT)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE=1")
-endif()
-
-option(OT_NETDATA_PUBLISHER "enable Thread Network Data publisher")
-if(OT_NETDATA_PUBLISHER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=1")
-endif()
-
-option(OT_PING_SENDER "enable ping sender support" ${OT_APP_CLI})
-if(OT_PING_SENDER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1")
-endif()
-
-option(OT_PLATFORM_NETIF "enable platform netif support")
-if(OT_PLATFORM_NETIF)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=1")
-endif()
-
-option(OT_PLATFORM_UDP "enable platform UDP support")
-if(OT_PLATFORM_UDP)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1")
-endif()
-
 if(OT_POSIX_SETTINGS_PATH)
     target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH=${OT_POSIX_SETTINGS_PATH}")
 endif()

-option(OT_REFERENCE_DEVICE "enable Thread Test Harness reference device support")
-if(OT_REFERENCE_DEVICE)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=1")
-endif()
-
-option(OT_SERVICE "enable support for injecting Service entries into the Thread Network Data")
-if(OT_SERVICE)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1")
-endif()
-
-option(OT_SETTINGS_RAM "enable volatile-only storage of settings")
-if(OT_SETTINGS_RAM)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_SETTINGS_RAM=1")
-endif()
-
-option(OT_SLAAC "enable support for adding of auto-configured SLAAC addresses by OpenThread")
-if(OT_SLAAC)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1")
-endif()
-
-option(OT_SNTP_CLIENT "enable SNTP Client support")
-if(OT_SNTP_CLIENT)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1")
-endif()
-
-option(OT_SRP_SERVER "enable SRP server")
-if (OT_SRP_SERVER)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_SRP_SERVER_ENABLE=1")
-endif()
-
-option(OT_TIME_SYNC "enable the time synchronization service feature")
-if(OT_TIME_SYNC)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_TIME_SYNC_ENABLE=1")
-endif()
-
-option(OT_TREL "enable TREL radio link for Thread over Infrastructure feature")
-if (OT_TREL)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=1")
-endif()
-
-option(OT_TX_BEACON_PAYLOAD "enable Thread beacon payload in outgoing beacons")
-if (OT_TX_BEACON_PAYLOAD)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE=1")
-endif()
-
-option(OT_UDP_FORWARD "enable UDP forward support")
-if(OT_UDP_FORWARD)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1")
-endif()
-
-option(OT_UPTIME "enable support for tracking OpenThread instance's uptime")
-if(OT_UPTIME)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_UPTIME_ENABLE=1")
-endif()
-
-option(OT_FIREWALL "enable firewall")
-if (OT_FIREWALL)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_POSIX_CONFIG_FIREWALL_ENABLE=1")
-endif()
-
-option(OT_FULL_LOGS "enable full logs")
-if(OT_FULL_LOGS)
-    if(NOT OT_LOG_LEVEL)
-        target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LOG_LEVEL=OT_LOG_LEVEL_DEBG")
-    endif()
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_LOG_PREPEND_LEVEL=1")
-endif()
-
-option(OT_OTNS "enable OTNS support")
-if(OT_OTNS)
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_OTNS_ENABLE=1")
-endif()
-
-set(OT_RCP_RESTORATION_MAX_COUNT "0" CACHE STRING "set max RCP restoration count")
-if(OT_RCP_RESTORATION_MAX_COUNT MATCHES "^[0-9]+$")
-    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=${OT_RCP_RESTORATION_MAX_COUNT}")
-else()
-    message(FATAL_ERROR "Invalid max RCP restoration count: ${OT_RCP_RESTORATION_MAX_COUNT}")
-endif()
-
-option(OT_EXCLUDE_TCPLP_LIB "exclude TCPlp library from build")
-
-# Checks
-if(OT_PLATFORM_UDP AND OT_UDP_FORWARD)
-    message(FATAL_ERROR "OT_PLATFORM_UDP and OT_UDP_FORWARD are exclusive")
-endif()


xc: disable non-critical DRC check that causes failures

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- xc/common/cmake/vivado.cmake
+++ xc/common/cmake/vivado.cmake
@@ -642,6 +642,7 @@
     COMMAND ${CMAKE_COMMAND} -E echo "set_property CONFIG_VOLTAGE 3.3 [current_design]"                >> ${RUNME}
     COMMAND ${CMAKE_COMMAND} -E echo "set_property BITSTREAM.GENERAL.PERFRAMECRC YES [current_design]" >> ${RUNME}
     COMMAND ${CMAKE_COMMAND} -E echo "set_property IS_ENABLED 0 [get_drc_checks {LUTLP-1}]"            >> ${RUNME}
+    COMMAND ${CMAKE_COMMAND} -E echo "set_property IS_ENABLED 0 [get_drc_checks {RTRES-2}]"            >> ${RUNME}
     COMMAND ${CMAKE_COMMAND} -E echo "report_utilization -file ${NAME}_utilization.rpt"                >> ${RUNME}
     COMMAND ${CMAKE_COMMAND} -E echo "report_clock_utilization -file ${NAME}_clock_utilization.rpt"    >> ${RUNME}
     COMMAND ${CMAKE_COMMAND} -E echo "report_timing_summary -datasheet -max_paths 10 -file ${NAME}_timing_summary.rpt" >> ${RUNME}


Fixed device_cmake that prevented prog_cmd from getting through

Signed-off-by: Nathan Francque <2a1e616e407425593180c6aaeeb463fd82f78c9b@gmail.com>

--- xc7/make/device_define.cmake
+++ xc7/make/device_define.cmake
@@ -43,7 +43,7 @@
     DEVICE ${ADD_XC7_BOARD_DEVICE}
     PACKAGE ${ADD_XC7_BOARD_PACKAGE}
     PROG_TOOL ${ADD_XC7_BOARD_PROG_TOOL}
-    PROG_CMD ${ADD_XC7_BOARD_PROG_PROG_CMD}
+    PROG_CMD ${ADD_XC7_BOARD_PROG_CMD}
     )

   set(DEVICE ${ADD_XC7_BOARD_DEVICE})


CMake: changed variable used for conflict detection: MEDFILE_INCLUDE_DIRS which exists in both CONFIG and MODULE mode.

--- salome_adm/cmake_files/FindSalomeMEDFile.cmake
+++ salome_adm/cmake_files/FindSalomeMEDFile.cmake
@@ -24,5 +24,5 @@
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #

-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MEDFile MEDFILE_ROOT_DIR_EXP 0)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(MEDFile MEDFILE_INCLUDE_DIRS 1)
 #MARK_AS_ADVANCED()


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].


Simplifiying KEEP option of package lookup

--- scripts/PackageLookup.cmake
+++ scripts/PackageLookup.cmake
@@ -150,19 +150,12 @@
                " and install a local version of ${package}")
         endif()
         set(CURRENT_LOOKUP_DIRECTORY "${${package}_LOOKUP_RECIPE_DIR}")
-        if(${package}_KEEP)
-            set(${package}_LOOKUP_BUILD TRUE CACHE BOOL
-                "Whether package is obtained from a lookup build"
-                FORCE
-            )
-        else()
-            set(${package}_LOOKUP_BUILD FALSE CACHE BOOL
-                "Whether package is obtained from a lookup build"
-                FORCE
-            )
-        endif()
         include(${${package}_LOOKUP_RECIPE_FILE})
         unset(CURRENT_LOOKUP_DIRECTORY)
+        set(${package}_LOOKUP_BUILD ${${package}_KEEP} CACHE BOOL
+            "Whether package is obtained from a lookup build"
+            FORCE
+        )
         add_dependencies(lookup_dependencies ${package})
     endif()
 endmacro()
@@ -184,6 +177,12 @@
         "ARGUMENTS;COMPONENTS"
         ${ARGN}
     )
+    # Set explicitly to TRUE or FALSE to simplify setting ${package}_LOOKUP_BUILD
+    if(${package}_KEEP)
+        set(${package}_KEEP TRUE)
+    else()
+        set(${package}_KEEP FALSE)
+    endif()

     # Reappends components
     if(${package}_COMPONENTS)
@@ -204,7 +203,7 @@
         set(${package}_FOUND ${${PACKAGE}_FOUND})
     endif()
     # If package is not found, then look for a recipe to download and build it
-    if(NOT ${package}_FOUND OR ${package}_LOOKUP_BUILD)
+    if(NOT ${package}_FOUND OR ${package}_LOOKUP_BUILD OR ${package}_KEEP)
         _perform_actual_lookup(${package})
         # Sets a variable saying we are building this source externally
         set(${package}_BUILT_AS_EXTERNAL_PROJECT TRUE CACHE INTERNAL


Update the installer name

Update the installer name

--- CMakeModules/osx_install/OSXInstaller.cmake
+++ CMakeModules/osx_install/OSXInstaller.cmake
@@ -52,7 +52,12 @@
     CONFIGURE_FILE(${WELCOME_FILE} ${WELCOME_FILE_OUT})
     CONFIGURE_FILE(${README_FILE} ${README_FILE_OUT})

-    SET(PACKAGE_NAME "Install ArrayFire.pkg")
+    IF(BUILD_GRAPHICS)
+        SET(PACKAGE_NAME "arrayfire-${AF_VERSION}.pkg")
+    ELSE(BUILD_GRAPHICS)
+        SET(PACKAGE_NAME "arrayfire-no-gl-${AF_VERSION}.pkg")
+    ENDIF(BUILD_GRAPHICS)
+
     ADD_CUSTOM_COMMAND( OUTPUT ${PACKAGE_NAME}
                         DEPENDS ${ARGS_DEPENDS}
                         COMMAND pwd


Update FW

Update FW

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "75872198a5bd40518d7bbce42a5d38e7dcdd2d38")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "0bf6dc104ee8ad8ed0c44879ccd988325c57f521")

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


cmake: AeroFC: Remove unused apps and libs (#7993)

We are running out of flash space in AeroFC so a cleanup is necessary.

Tools not used in Aero RTF, INAV, fixed wing control, vtol control and
unused libs was removed.

before
$ size build_aerofc-v1_default/src/firmware/nuttx/firmware_nuttx
   text    data     bss     dec     hex filename
 956880    3524   14608  975012   ee0a4 firmware_nuttx

after
$ size build_aerofc-v1_default/src/firmware/nuttx/firmware_nuttx
   text    data     bss     dec     hex filename
 832200    3508   14616  850324   cf994 build_aerofc-v1_default/src/firmware/nuttx/firmware_nuttx

--- cmake/configs/nuttx_aerofc-v1_default.cmake
+++ cmake/configs/nuttx_aerofc-v1_default.cmake
@@ -28,22 +28,17 @@
 	#
 	# System commands
 	#
-	systemcmds/bl_update
 	systemcmds/mixer
 	systemcmds/param
 	systemcmds/perf
 	systemcmds/pwm
-	systemcmds/esc_calib
-	systemcmds/hardfault_log
 	systemcmds/motor_test
 	systemcmds/reboot
 	systemcmds/top
 	systemcmds/config
 	systemcmds/nshterm
-	systemcmds/mtd
 	systemcmds/dumpfile
 	systemcmds/ver
-	systemcmds/topic_listener

 	#
 	# General system control
@@ -55,23 +50,17 @@
 	modules/land_detector

 	#
-	# Estimation modules (EKF/ SO3 / other filters)
+	# Estimation modules
 	#
 	modules/attitude_estimator_q
-	modules/position_estimator_inav
 	modules/local_position_estimator
 	modules/ekf2

 	#
 	# Vehicle Control
 	#
-	modules/fw_att_control
-	modules/fw_pos_control_l1
-	modules/gnd_att_control
-	modules/gnd_pos_control
 	modules/mc_att_control
 	modules/mc_pos_control
-	modules/vtol_att_control

 	#
 	# Logging
@@ -94,21 +83,15 @@
 	lib/mathlib
 	lib/mathlib/math/filter
 	lib/ecl
-	lib/external_lgpl
 	lib/geo
 	lib/geo_lookup
 	lib/conversion
-	lib/launchdetection
-	lib/terrain_estimation
-	lib/runway_takeoff
 	lib/tailsitter_recovery
 	lib/version
 	lib/DriverFramework/framework
 	lib/rc
 	platforms/nuttx
 	lib/micro-CDR
-
-	# had to add for cmake, not sure why wasn't in original config
 	platforms/common
 	platforms/nuttx/px4_layer
 )


Reduce verbosity when building builtin packages.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -87,14 +87,16 @@
   message(STATUS "Building LZMA version ${lzma_version} included in ROOT itself")
   if(WIN32)
     ExternalProject_Add(
-     LZMA
-     URL ${CMAKE_SOURCE_DIR}/core/lzma/src/xz-${lzma_version}-win32.tar.gz
-     #URL_MD5  65693dc257802b6778c28ed53ecca678
-     PREFIX LZMA
-     INSTALL_DIR ${CMAKE_BINARY_DIR}
+      LZMA
+      URL ${CMAKE_SOURCE_DIR}/core/lzma/src/xz-${lzma_version}-win32.tar.gz
+      #URL_MD5  65693dc257802b6778c28ed53ecca678
+      PREFIX LZMA
+      INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND "" BUILD_COMMAND ""
-     INSTALL_COMMAND ${CMAKE_COMMAND} -E copy lib/liblzma.dll <INSTALL_DIR>/bin
-     BUILD_IN_SOURCE 1)
+      INSTALL_COMMAND ${CMAKE_COMMAND} -E copy lib/liblzma.dll <INSTALL_DIR>/bin
+      LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
+      BUILD_IN_SOURCE 1
+    )
     install(FILES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.dll DESTINATION ${CMAKE_INSTALL_BINDIR})
     set(LZMA_LIBRARIES ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/lib/liblzma.lib)
     set(LZMA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/include)
@@ -113,7 +115,9 @@
       CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR> --libdir <INSTALL_DIR>/lib
                         --with-pic --disable-shared --quiet
                         CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=${LZMA_CFLAGS} LDFLAGS=${LZMA_LDFLAGS}
-      BUILD_IN_SOURCE 1)
+      LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
+      BUILD_IN_SOURCE 1
+)
     set(LZMA_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}lzma${CMAKE_STATIC_LIBRARY_SUFFIX})
     set(LZMA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
   endif()
@@ -229,6 +233,7 @@
       URL ${repository_tarfiles}/gsl-${gsl_version}.tar.gz
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR> --enable-shared=no CFLAGS=${CMAKE_C_FLAGS}
+      LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
     )
     set(GSL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
     foreach(l gsl gslcblas)
@@ -566,7 +571,9 @@
     INSTALL_DIR ${CMAKE_BINARY_DIR}
     CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR>
     BUILD_COMMAND make CFLAGS=-fPIC
-    BUILD_IN_SOURCE 1 )
+    LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
+    BUILD_IN_SOURCE 1
+  )
   set(FFTW_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
   set(FFTW_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libfftw3.a)
   set(fftw3 ON CACHE BOOL "" FORCE)
@@ -584,6 +591,7 @@
       URL ${repository_tarfiles}/cfitsio${cfitsio_version_no_dots}.tar.gz
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR>
+      LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
       BUILD_IN_SOURCE 1
     )
     set(CFITSIO_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
@@ -664,6 +672,7 @@
                -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
                -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
                -DENABLE_PYTHON=OFF
+    LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
   )
   # We cannot call find_package(XROOTD) becuase the package is not yet built. So, we need to emulate what it defines....
   set(_LIBDIR_DEFAULT "lib")
@@ -965,6 +974,7 @@
                                        -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
       INSTALL_COMMAND ""
       BUILD_IN_SOURCE 1
+      LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
     )
     set(TBB_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
     set(TBB_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libtbb${CMAKE_SHARED_LIBRARY_SUFFIX})


Fix indentation in cmake/common.cmake

Fix indentation in cmake/common.cmake

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -242,7 +242,7 @@
       set(SYSTEM_NAME Unix-Based)
     endif()
   else()
-      message( FATAL_ERROR "Don't yet know this system." )
+    message( FATAL_ERROR "Don't yet know this system." )
   endif()

   string(REPLACE "\n" "_" SYSTEM_NAME ${SYSTEM_NAME})


Use virgil-sdk-cpp lib v3.0.6

Use virgil-sdk-cpp lib v3.0.6

--- cmake/virgil.cmake
+++ cmake/virgil.cmake
@@ -137,7 +137,7 @@
         if (NOT TARGET ${VIRGIL}_project)
             ExternalProject_Add (${VIRGIL}_project
                 GIT_REPOSITORY "https://github.com/VirgilSecurity/virgil-sdk-cpp.git"
-                GIT_TAG "v3.0.5"
+                GIT_TAG "v3.0.6"
                 PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ext/virgil-sdk"
                 CMAKE_ARGS ${CMAKE_ARGS}
             )


fix ei_add_property

fix ei_add_property

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -1,7 +1,7 @@

 macro(ei_add_property prop value)
   get_property(previous GLOBAL PROPERTY ${prop})
-  if (NOT ${previous} OR ${previous} STREQUAL "")
+  if ((NOT previous) OR (previous STREQUAL ""))
     set_property(GLOBAL PROPERTY ${prop} "${value}")
   else()
     set_property(GLOBAL PROPERTY ${prop} "${previous} ${value}")


Fix bug 542: fix detection of compiler version on systems without the head command.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -322,13 +322,21 @@
     endif()
   else()
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
-    # supporting a "--version" flag
-    execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
-                    COMMAND head -n 1
-                    OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+    # supporting a "--version" flag

-    ei_get_compilerver_from_cxx_version_string(${eigen_cxx_compiler_version_string} CNAME CVER)
+    # check whether the head command exists
+    find_program(HEAD_EXE head NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_SYSTEM_PATH)
+    if(HEAD_EXE)
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+                      COMMAND head -n 1
+                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+    else()
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+      string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})
+    endif()

+    ei_get_compilerver_from_cxx_version_string("${eigen_cxx_compiler_version_string}" CNAME CVER)
     set(${VAR} "${CNAME}-${CVER}")
   endif()
 endmacro(ei_get_compilerver)


build: clean up after failed -fconcepts detection

The cmake code sets CMAKE_REQUIRED_FLAGS to "-fconcepts" in order
to see if that flag is available. But if not (as is expected with
clang), it leaves CMAKE_REQUIRED_FLAGS, and so every following test
becomes poisoned, since it will fail on the unsupported flag.

This break the membarrier test which follows. As a result membarrier()
will not be used even if it is available. This is more or less okay
on x86 which has a fallback (even there, the fallback is pretty bad
on large machines), but on aarch64 there is no fallback, so Seastar
programs spin even when they have nothing to do.

Fix this by clearing the flag after the test. In order to change
as little as possible, if the test succeeded, we set it again.
Message-Id: <3ffbe95afc9d140ce4bc659316c97090cb1c3580@scylladb.com>

--- cmake/FindConcepts.cmake
+++ cmake/FindConcepts.cmake
@@ -24,8 +24,10 @@
 file (READ ${CMAKE_CURRENT_LIST_DIR}/code_tests/Concepts_test.cc _concepts_test_code)
 set (CMAKE_REQUIRED_FLAGS -fconcepts)
 check_cxx_source_compiles ("${_concepts_test_code}" Concepts_FOUND)
+set (CMAKE_REQUIRED_FLAGS "")

 if (Concepts_FOUND AND NOT (TARGET Concepts::concepts))
+  set (CMAKE_REQUIRED_FLAGS -fconcepts)
   add_library (Concepts::concepts INTERFACE IMPORTED)

   set_target_properties (Concepts::concepts


Remove old QDictZip cmake script.

Remove old QDictZip cmake script.

--- cmake/FindQDictZip.cmake
+++ cmake/FindQDictZip.cmake
@@ -1,11 +0,0 @@
-FIND_PATH(QDICTZIP_INCLUDE_DIR NAMES QDictZip/QDictZipFile.hh)
-
-FIND_LIBRARY(QDICTZIP_LIBRARIES NAMES qdictzip)
-
-# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(QDictZip DEFAULT_MSG QDICTZIP_LIBRARIES QDICTZIP_INCLUDE_DIR)
-
-MARK_AS_ADVANCED(QDICTZIP_INCLUDE_DIR QDICTZIP_LIBRARIES)
-


ADDED missing L0 section to find HAL files

--- cmake/FindSTM32HAL.cmake
+++ cmake/FindSTM32HAL.cmake
@@ -136,6 +136,28 @@

     SET(HAL_SRCS
         stm32f7xx_hal.c
+    )
+ELSEIF(STM32_FAMILY STREQUAL "L0")
+    SET(HAL_COMPONENTS adc comp cortex crc crs cryp dac dma exti firewall flash gpio i2c
+                       i2s irda iwdg lcd lptim lpuart pcd pwr rcc rng rtc smartcard
+                       smbus spi tim tsc uart usart utils wwdg)
+
+    SET(HAL_REQUIRED_COMPONENTS cortex pwr rcc)
+
+    # Components that have _ex sources
+    SET(HAL_EX_COMPONENTS adc comp crc cryp dac flash i2c pcd pwr rcc rtc smartcard tim uart usart)
+
+    # Components that have ll_ in names instead of hal_
+    SET(HAL_LL_COMPONENTS crs exti lpuart utils)
+
+    SET(HAL_PREFIX stm32l0xx_)
+
+    SET(HAL_HEADERS
+        stm32l0xx_hal.h
+        stm32l0xx_hal_def.h
+    )
+    SET(HAL_SRCS
+        stm32l0xx_hal.c
     )
 ENDIF()


Fix CMake issues per Paul R fixes

Fix CMake issues per Paul R fixes

--- cmake/OpenMCConfig.cmake
+++ cmake/OpenMCConfig.cmake
@@ -1,5 +1,8 @@
 get_filename_component(OpenMC_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)

+find_package(fmt REQUIRED HINTS ${OpenMC_CMAKE_DIR}/../fmt)
+find_package(gsl-lite REQUIRED HINTS ${OpenMC_CMAKE_DIR}/../gsl-lite)
+find_package(pugixml REQUIRED HINTS ${OpenMC_CMAKE_DIR}/../pugixml)
 find_package(xtl REQUIRED HINTS ${OpenMC_CMAKE_DIR}/../xtl)
 find_package(xtensor REQUIRED HINTS ${OpenMC_CMAKE_DIR}/../xtensor)


[cmake] fix conflict with use of ccache

[cmake] fix conflict with use of ccache

--- cmake/SiconosSetup.cmake
+++ cmake/SiconosSetup.cmake
@@ -214,3 +214,11 @@
     #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
   ENDIF()
 ENDIF()
+
+# =========== use ccache if available ===========
+find_program(CCACHE_FOUND ccache)
+if(CCACHE_FOUND)
+  set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+  set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+endif(CCACHE_FOUND)
+


Post 0.9.10.0 development version bump

Post 0.9.10.0 development version bump

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -30,7 +30,7 @@
 set(IVW_MAJOR_VERSION 0)
 set(IVW_MINOR_VERSION 9)
 set(IVW_PATCH_VERSION 10)
-set(IVW_BUILD_VERSION 0) # set to zero when doing a release, bump to 1 directly after the release.
+set(IVW_BUILD_VERSION 1) # set to zero when doing a release, bump to 1 directly after the release.

 if(${IVW_BUILD_VERSION})
     set(IVW_VERSION ${IVW_MAJOR_VERSION}.${IVW_MINOR_VERSION}.${IVW_PATCH_VERSION}.${IVW_BUILD_VERSION})


CMake: added folders for other stuff then VS...

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -638,6 +638,8 @@
              LINK_FLAGS_MINSIZEREL
              ${VS_MULTITHREADED_RELEASE_DLL_IGNORE_LIBRARY_FLAGS} FOLDER ${folder_name})
         endif(MSVC)
+    else()
+         set_target_properties(${project_name} PROPERTIES FOLDER ${folder_name})
     endif(WIN32)
 endmacro()


Alternative FindDbgHelp.cmake.

Alternative FindDbgHelp.cmake.

--- cmake/FindDbgHelp.cmake
+++ cmake/FindDbgHelp.cmake
@@ -1,51 +1,22 @@
-# Slightly modified version from:
-# https://github.com/openclonk/openclonk/blob/master/cmake/FindDbgHelp.cmake
-# Original copyright notice follows.
+# Locate the DbgHelp library for MSVC.

-# OpenClonk, http://www.openclonk.org
-#
-# Copyright (c) 2011-2017, The OpenClonk Team and contributors
-#
-# Distributed under the terms of the ISC license; see accompanying file
-# "COPYING" for details.
-#
-# "Clonk" is a registered trademark of Matthes Bender, used with permission.
-# See accompanying file "TRADEMARK" for details.
-#
-# To redistribute this file separately, substitute the full license texts
-# for the above references.
-
-# - Find DbgHelp
-# Find the DbgHelp library
-# This module defines
-#  DBGHELP_INCLUDE_DIR, where to find dbghelp.h, etc.
-#  DBGHELP_LIBRARIES, the libraries needed to use DbgHelp.
-#  DBGHELP_FOUND, If false, do not try to use DbgHelp.
-
-# MSVC knows how to find the Windows SDK on its own, and replicating that
-# in CMake is very tricky, especially with the SDK's layout changing
-# occasionally. So instead we'll just leave it to MSVC to do correctly.
-if(MSVC AND NOT DEFINED DBGHELP_INCLUDE_DIR AND NOT DEFINED DBGHELP_LIBRARY)
-	set(DBGHELP_INCLUDE_DIR "")
-	set(DBGHELP_LIBRARY "dbghelp")
-	set(DBGHELP_FOUND TRUE)
+if(DbgHelp_INCLUDE_DIR AND DbgHelp_LIBRARY)
+    # Already in cache, be silent
+    set(DbgHelp_FIND_QUIETLY TRUE)
 endif()

-if(NOT DBGHELP_FOUND)
-	find_path(DBGHELP_INCLUDE_DIR NAMES dbghelp.h PATH_SUFFIXES include)
-	set(DBGHELP_NAMES ${DBGHELP_NAMES} dbghelp)
-	find_library(DBGHELP_LIBRARY NAMES ${DBGHELP_NAMES})
+find_path(DbgHelp_INCLUDE_DIR NAMES Dbghelp.h)
+find_library(DbgHelp_LIBRARY NAMES dbghelp)

-	include(FindPackageHandleStandardArgs)
-	FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBGHELP DEFAULT_MSG DBGHELP_LIBRARY DBGHELP_INCLUDE_DIR)
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(DbgHelp DEFAULT_MSG DbgHelp_INCLUDE_DIR DbgHelp_LIBRARY)
+
+mark_as_advanced(DbgHelp_INCLUDE_DIR DbgHelp_LIBRARY)
+
+# NOTE: this has been adapted from CMake's FindPNG.cmake.
+if(DbgHelp_FOUND AND NOT TARGET DbgHelp::DbgHelp)
+    add_library(DbgHelp::DbgHelp UNKNOWN IMPORTED)
+    set_target_properties(DbgHelp::DbgHelp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${DbgHelp_INCLUDE_DIR}"
+        IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${DbgHelp_LIBRARY}")
 endif()
-
-if(DBGHELP_FOUND)
-    set(DBGHELP_LIBRARIES ${DBGHELP_LIBRARY})
-    add_library(DbgHelp::DbgHelp UNKNOWN IMPORTED)
-    set_target_properties(DbgHelp::DbgHelp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${DBGHELP_INCLUDE_DIR}"
-        IMPORTED_LINK_INTERFACE_LANGUAGES "C"
-        IMPORTED_LOCATION "${DBGHELP_LIBRARIES}")
-endif()
-
-mark_as_advanced(DBGHELP_LIBRARY DBGHELP_INCLUDE_DIR)


Make the checkinstall a bit more robust. Was having issues with shared libs on the second install.

--- cmake/ectoInstall.cmake
+++ cmake/ectoInstall.cmake
@@ -55,8 +55,18 @@
 add_custom_target(checkinstall
   COMMENT "Install using checkinstall." VERBATIM
   )
+add_custom_target(checkinstall-remove
+  COMMENT "Uninstall using the package name from checkinstall." VERBATIM
+  )
+
+add_dependencies(checkinstall checkinstall-remove)
+
+add_custom_command(TARGET checkinstall-remove
+  COMMAND sh -c "sudo dpkg --force-all -r ecto-${ECTO_CODE_NAME}"
+  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+  )

 add_custom_command(TARGET checkinstall
-  COMMAND sh -c "sudo dpkg -r ecto-${ECTO_CODE_NAME} || true && sudo checkinstall --exclude=/home -y --nodoc --pkgname ecto-${ECTO_CODE_NAME} make install"
+  COMMAND sh -c "sudo checkinstall --exclude=/home -y --nodoc --pkgname ecto-${ECTO_CODE_NAME} make install"
   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
   )


Implement SKIP_PDL_CHECK option for the case where the
libplplotd soversion required by PDL-Graphics-PLplot is not (yet)
installed.

svn path=/trunk/; revision=11261

--- cmake/modules/pdl.cmake
+++ cmake/modules/pdl.cmake
@@ -35,75 +35,86 @@
 endif(ENABLE_pdl)

 if(ENABLE_pdl)
-  if(PERL_FOUND)
-    execute_process(
-      COMMAND ${PERL_EXECUTABLE}
-      -e "use PDL"
-      RESULT_VARIABLE PDL_RETURNCODE
-      OUTPUT_QUIET
-      ERROR_QUIET
-      )
-    if(NOT PDL_RETURNCODE)
+  option(SKIP_PDL_CHECK "SKIP all PDL checks because libplplotd not yet available at cmake time" OFF)
+  if(SKIP_PDL_CHECK)
+    message(STATUS "Assume PDL exists and has version >= 2.4.1")
+    message(STATUS "Assume PDL-Graphics-PLplot exists and has version >= 0.47")
+    set(HAVE_PDL_GRAPHICS_PLPLOT_40 ON CACHE BOOL "PDL-Graphics-PLplot version is 0.47 or higher" FORCE)
+  else(SKIP_PDL_CHECK)
+    # N.B. Some of the checks below only work if the correct version
+    # of libplplotd.so (currently libplplotd.so.10) is accessible
+    # somewhere on the disk, and LD_LIBRARY_PATH
+    # points to that directory location.
+    if(PERL_FOUND)
       execute_process(
 	COMMAND ${PERL_EXECUTABLE}
-	"-e use PDL; print \"$PDL::VERSION\""
-	OUTPUT_VARIABLE PDL_VERSION
+	-e "use PDL"
+	RESULT_VARIABLE PDL_RETURNCODE
+	OUTPUT_QUIET
+	ERROR_QUIET
 	)
-      message(STATUS "PDL_VERSION = ${PDL_VERSION}")
-      transform_version(NUMERICAL_PDL_MINIMUM_VERSION "2.4.1")
-      transform_version(NUMERICAL_PDL_VERSION "${PDL_VERSION}")
-      if(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
-        message(STATUS "WARNING: "
-          "PDL version < 2.4.1. Disabling Perl/PDL examples in tests")
-        set(ENABLE_pdl OFF CACHE BOOL "Enable Perl/PDL examples in tests" FORCE)
-      else(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
-        execute_process(
+      if(NOT PDL_RETURNCODE)
+	execute_process(
 	  COMMAND ${PERL_EXECUTABLE}
-	  -MPDL::Graphics::PLplot "-e print \"$PDL::Graphics::PLplot::VERSION\""
-	  RESULT_VARIABLE PDL_GRAPHICS_PLPLOT_RETURN_CODE
-          OUTPUT_QUIET
-          ERROR_QUIET
-          )
-	if(NOT PDL_GRAPHICS_PLPLOT_RETURN_CODE)
-          message(STATUS
-	    "PDL version >= 2.4.1 and  PDL::Graphics::PLplot found."
-	    )
+	  "-e use PDL; print \"$PDL::VERSION\""
+	  OUTPUT_VARIABLE PDL_VERSION
+	  )
+	message(STATUS "PDL_VERSION = ${PDL_VERSION}")
+	transform_version(NUMERICAL_PDL_MINIMUM_VERSION "2.4.1")
+	transform_version(NUMERICAL_PDL_VERSION "${PDL_VERSION}")
+	if(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
+          message(STATUS "WARNING: "
+            "PDL version < 2.4.1. Disabling Perl/PDL examples in tests")
+          set(ENABLE_pdl OFF CACHE BOOL "Enable Perl/PDL examples in tests" FORCE)
+	else(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
           execute_process(
 	    COMMAND ${PERL_EXECUTABLE}
 	    -MPDL::Graphics::PLplot "-e print \"$PDL::Graphics::PLplot::VERSION\""
-            OUTPUT_VARIABLE PDL_PLPLOT_VERSION
-            ERROR_VARIABLE PDL_PLPLOT_VERSION
+	    RESULT_VARIABLE PDL_GRAPHICS_PLPLOT_RETURN_CODE
+            OUTPUT_QUIET
+            ERROR_QUIET
             )
-          message(STATUS "PDL_PLPLOT_VERSION = ${PDL_PLPLOT_VERSION}")
-          transform_version(NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION "0.47.0")
-          transform_version(NUMERICAL_PDL_PLPLOT_VERSION "${PDL_PLPLOT_VERSION}.0")
-	  #message("NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION = ${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
-	  #message("NUMERICAL_PDL_PLPLOT_VERSION = ${NUMERICAL_PDL_PLPLOT_VERSION}")
-          if(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
-            message(STATUS "WARNING: "
-              "perl PDL PLplot version < 0.47\n"
-              "   Using limited set of Perl/PDL examples that work with this old version")
-            set(HAVE_PDL_GRAPHICS_PLPLOT_40 OFF CACHE BOOL "PDL-Graphics-PLplot version is 0.47 or higher" FORCE)
-          else(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
-            message(STATUS
-              "perl PDL PLplot version >= 0.47\n"
-              "   Using full set of Perl/PDL examples that work with this version")
-            set(HAVE_PDL_GRAPHICS_PLPLOT_40 ON CACHE BOOL "PDL-Graphics-PLplot version is 0.47 or higher" FORCE)
-          endif(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
-	else(NOT PDL_GRAPHICS_PLPLOT_RETURN_CODE)
-	  message(STATUS "WARNING: "
-	    "perl PDL::GRAPHICS_PLplot module not found. Disabling Perl/PDL examples")
-	  set(ENABLE_pdl OFF CACHE BOOL "Enable Perl/PDL examples in tests" FORCE)
-	endif(NOT PDL_GRAPHICS_PLPLOT_RETURN_CODE)
-      endif(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
-    else(NOT PDL_RETURNCODE)
+	  if(NOT PDL_GRAPHICS_PLPLOT_RETURN_CODE)
+            message(STATUS
+	      "PDL version >= 2.4.1 and  PDL::Graphics::PLplot found."
+	      )
+            execute_process(
+	      COMMAND ${PERL_EXECUTABLE}
+	      -MPDL::Graphics::PLplot "-e print \"$PDL::Graphics::PLplot::VERSION\""
+              OUTPUT_VARIABLE PDL_PLPLOT_VERSION
+              ERROR_VARIABLE PDL_PLPLOT_VERSION
+              )
+            message(STATUS "PDL_PLPLOT_VERSION = ${PDL_PLPLOT_VERSION}")
+            transform_version(NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION "0.47.0")
+            transform_version(NUMERICAL_PDL_PLPLOT_VERSION "${PDL_PLPLOT_VERSION}.0")
+	    #message("NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION = ${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
+	    #message("NUMERICAL_PDL_PLPLOT_VERSION = ${NUMERICAL_PDL_PLPLOT_VERSION}")
+            if(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
+              message(STATUS "WARNING: "
+		"perl PDL PLplot version < 0.47\n"
+		"   Using limited set of Perl/PDL examples that work with this old version")
+              set(HAVE_PDL_GRAPHICS_PLPLOT_40 OFF CACHE BOOL "PDL-Graphics-PLplot version is 0.47 or higher" FORCE)
+            else(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
+              message(STATUS
+		"perl PDL PLplot version >= 0.47\n"
+		"   Using full set of Perl/PDL examples that work with this version")
+              set(HAVE_PDL_GRAPHICS_PLPLOT_40 ON CACHE BOOL "PDL-Graphics-PLplot version is 0.47 or higher" FORCE)
+            endif(NUMERICAL_PDL_PLPLOT_VERSION LESS "${NUMERICAL_PDL_PLPLOT_MINIMUM_VERSION}")
+	  else(NOT PDL_GRAPHICS_PLPLOT_RETURN_CODE)
+	    message(STATUS "WARNING: "
+	      "perl PDL::GRAPHICS_PLplot module not found. Disabling Perl/PDL examples")
+	    set(ENABLE_pdl OFF CACHE BOOL "Enable Perl/PDL examples in tests" FORCE)
+	  endif(NOT PDL_GRAPHICS_PLPLOT_RETURN_CODE)
+	endif(NUMERICAL_PDL_VERSION LESS "${NUMERICAL_PDL_MINIMUM_VERSION}")
+      else(NOT PDL_RETURNCODE)
+	message(STATUS "WARNING: "
+	  "perl PDL module not found. Disabling Perl/PDL examples")
+	set(ENABLE_pdl OFF CACHE BOOL "Enable Perl/PDL examples in tests" FORCE)
+      endif(NOT PDL_RETURNCODE)
+    else(PERL_FOUND)
       message(STATUS "WARNING: "
-	"perl PDL module not found. Disabling Perl/PDL examples")
+	"perl not found. Disabling Perl/PDL examples")
       set(ENABLE_pdl OFF CACHE BOOL "Enable Perl/PDL examples in tests" FORCE)
-    endif(NOT PDL_RETURNCODE)
-  else(PERL_FOUND)
-    message(STATUS "WARNING: "
-      "perl not found. Disabling Perl/PDL examples")
-    set(ENABLE_pdl OFF CACHE BOOL "Enable Perl/PDL examples in tests" FORCE)
-  endif(PERL_FOUND)
+    endif(PERL_FOUND)
+  endif(SKIP_PDL_CHECK)
 endif(ENABLE_pdl)


gtest 1.5 fix

gtest 1.5 fix

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -134,17 +134,19 @@
     cmake_parse_arguments(PCL_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
     add_executable(${_exename} ${PCL_ADD_TEST_FILES})
     PCL_ADD_OPENMP_FLAGS(${_exename})
+    target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     # must link explicitly against boost only on Windows
     target_link_libraries(${_exename} ${Boost_LIBRARIES})
     #
     # Only link if needed
     if(UNIX)
       SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS -Wl,--as-needed)
+      # GTest >= 1.5 requires pthread and CMake's 2.8.4 FindGTest is broken
+      target_link_libraries(${_exename} pthread)
     elseif(WIN32)
       SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS /OPT:REF)
     endif()
     #
-    target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     PCL_LINK_OPENMP(${_exename})

     if(${CMAKE_VERSION} VERSION_LESS 2.8.4)


Projects names with hyphens would break the defines file

--- source/defines.h.cmake
+++ source/defines.h.cmake
@@ -14,8 +14,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */

-#ifndef @CMAKE_PROJECT_NAME@_DEFINES_H
-#define @CMAKE_PROJECT_NAME@_DEFINES_H
+#ifndef GLOBAL_DEFINES_H
+#define GLOBAL_DEFINES_H

 const char* PROJECT_NAME = "@PROJECT_LONGNAME@"
 const char* PROJECT_VERSION = "@PROJECT_VERSION@"


Fix zlib issues

Fix zlib issues

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -38,17 +38,6 @@
     add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
   endif()

-  # Module assembler files
-  if(NOT APPLE AND NOT CYGWIN AND NOT MINGW AND NOT MSVC)
-    add_definitions(-DASMV)
-    set(ASSEMBLER_FILES "zlib/contrib/amd64/amd64-match.S")
-    set_source_files_properties(${ASSEMBLER_FILES} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
-  elseif(MSVC)
-    ENABLE_LANGUAGE(ASM_MASM)
-    add_definitions(-DASMV -DASMINF)
-    set(ASSEMBLER_FILES "zlib/contrib/masmx64/gvmat64.asm" "zlib/contrib/masmx64/inffasx64.asm")
-  endif()
-
   # Module library
   file(GLOB SOURCE_FILES "zlib/*.c")
   if(NOT MSVC)
@@ -58,8 +47,10 @@
     # C4131: 'function' : uses old-style declarator
     # C4210: nonstandard extension used : function given file scope
     # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
+    # C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
+    # C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data
     set(${SOURCE_FILES} "zlib/contrib/masmx64/inffas8664.c" "zlib/contrib/masmx64/inffas8664.c")
-    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4127 /wd4131 /wd4210 /wd4244")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4127 /wd4131 /wd4210 /wd4244 /wd4245 /wd4267")
   endif()
   add_library(zlib ${SOURCE_FILES} ${ASSEMBLER_FILES})
   target_link_libraries(zlib)


Exclude UnitTest++ code from coverage.

Exclude UnitTest++ code from coverage.

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -62,7 +62,7 @@

 		# Capturing lcov counters and generating report
 		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
-		COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
+		COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' 'lib/unittestpp/*' '/usr/*' --output-file ${_outputname}.info.cleaned
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
 		COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned


Added google-benchmark cmake dependency

Added google-benchmark cmake dependency

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -75,3 +75,27 @@
   endif()
   find_package(GTest REQUIRED)
 endif()
+
+# Benchmark dependencies
+if(BUILD_BENCHMARK)
+  if(NOT DEPENDENCIES_FORCE_DOWNLOAD)
+    find_package(benchmark QUIET)
+  endif()
+
+  if(NOT BENCHMARK_FOUND)
+    message(STATUS "Google Benchmark not found. Downloading and building Google Benchmark.")
+    # Download, build and install googlebenchmark library
+    set(GOOGLEBENCHMARK_ROOT ${CMAKE_CURRENT_BINARY_DIR}/googlebenchmark CACHE PATH "")
+    download_project(PROJ   googlebenchmark
+             GIT_REPOSITORY https://github.com/google/benchmark.git
+             GIT_TAG        master
+             INSTALL_DIR    ${GOOGLEBENCHMARK_ROOT}
+             CMAKE_ARGS     -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+             LOG_DOWNLOAD   TRUE
+             LOG_CONFIGURE  TRUE
+             LOG_BUILD      TRUE
+             LOG_INSTALL    TRUE
+             ${UPDATE_DISCONNECTED_IF_AVAILABLE}
+    )
+  endif()
+endif()


ospray_embree_<isa> libraries are static to fix Mac build.

--- cmake/build_embree.cmake
+++ cmake/build_embree.cmake
@@ -183,7 +183,7 @@
       (${OSPRAY_XEON_TARGET} STREQUAL "SSE42") OR
       (${OSPRAY_XEON_TARGET} STREQUAL "SSE41") OR
       (${OSPRAY_XEON_TARGET} STREQUAL "SSE"))
-    OSPRAY_ADD_LIBRARY(ospray_embree_sse41 SHARED
+    OSPRAY_ADD_LIBRARY(ospray_embree_sse41 STATIC
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/bvh4/bvh4_builder_binner.cpp
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/bvh4/bvh4_builder_toplevel.cpp
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/bvh4/bvh4_intersector1.cpp
@@ -201,7 +201,7 @@
       (${OSPRAY_XEON_TARGET} STREQUAL "AVX") OR
       (${OSPRAY_XEON_TARGET} STREQUAL "SSE42") OR
       (${OSPRAY_XEON_TARGET} STREQUAL "SSE"))
-    OSPRAY_ADD_LIBRARY(ospray_embree_sse42 SHARED
+    OSPRAY_ADD_LIBRARY(ospray_embree_sse42 STATIC
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/bvh4/bvh4_intersector4_hybrid.cpp
       )
     SET_TARGET_PROPERTIES(ospray_embree_sse42 PROPERTIES COMPILE_FLAGS "${OSPRAY_ARCH_SSE42}")
@@ -213,7 +213,7 @@
   # ------------------------------------------------------------------
   IF ((${OSPRAY_XEON_TARGET} STREQUAL "AVX2") OR
       (${OSPRAY_XEON_TARGET} STREQUAL "AVX"))
-    OSPRAY_ADD_LIBRARY(ospray_embree_avx SHARED
+    OSPRAY_ADD_LIBRARY(ospray_embree_avx STATIC
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/builders/bezierrefgen.cpp
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/builders/primrefgen.cpp
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/builders/heuristic_object_partition_unaligned.cpp
@@ -267,7 +267,7 @@
   # now, build and link in AVX2 support (for AVX2 only)
   # ------------------------------------------------------------------
   IF ((${OSPRAY_XEON_TARGET} STREQUAL "AVX2"))
-    OSPRAY_ADD_LIBRARY(ospray_embree_avx2 SHARED
+    OSPRAY_ADD_LIBRARY(ospray_embree_avx2 STATIC
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/geometry/instance_intersector1.cpp
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/geometry/instance_intersector4.cpp
       ${OSPRAY_EMBREE_SOURCE_DIR}/kernels/xeon/geometry/instance_intersector8.cpp


use xcfun v2.0.1

use xcfun v2.0.1

--- cmake/custom/xcfun.cmake
+++ cmake/custom/xcfun.cmake
@@ -12,7 +12,7 @@
     GIT_REPOSITORY
       https://github.com/dftlibs/xcfun.git
     GIT_TAG
-      v2.0.0
+      v2.0.1
     )

   add_subdirectory(


fetch pre-compiled fifechan (with DLLs and VC14.zip suffix)

--- cmake/get-fifechan.cmake
+++ cmake/get-fifechan.cmake
@@ -34,12 +34,13 @@
       fifechan
       PREFIX              ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
-      #URL                 https://github.com/fifengine/fifechan/releases/tag/${FIFECHAN_VERSION}/fifechan-v${FIFECHAN_VERSION}-VS.tar.gz
-      URL                 https://ci.appveyor.com/api/projects/jakoch/fifechan/artifacts/fifechan-VS.zip
-      URL_MD5             87ab39fb56fa331aa410ec4139e64fc9
+      #URL                 https://github.com/fifengine/fifechan/releases/tag/${FIFECHAN_VERSION}/fifechan-v${FIFECHAN_VERSION}-VC14.zip
+      URL                 https://ci.appveyor.com/api/buildjobs/kbycmt20k0g1ah61/artifacts/fifechan-VC14.zip
+      URL_MD5             c96b3b8451120a729c8cc88277b1d18c
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""
       INSTALL_COMMAND
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/fifechan/bin     ${DEPENDENCY_INSTALL_DIR}/bin
         COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/fifechan/lib     ${DEPENDENCY_INSTALL_DIR}/lib
         COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/fifechan/include ${DEPENDENCY_INSTALL_DIR}/include/fifechan
     )


Group HDF5 and zlib together

Group HDF5 and zlib together

--- cmake/thirdParties.cmake
+++ cmake/thirdParties.cmake
@@ -20,6 +20,36 @@
         set(HAVE_HDF5 1)
     endif()
 endif()
+
+if(HDF5_FOUND)
+    add_library(HDF5::HDF5 INTERFACE IMPORTED)
+    if(HDF5_USE_STATIC_LIBRARIES AND TARGET hdf5::hdf5-static)
+        # static target from hdf5 1.10 or 1.12 config
+        target_link_libraries(HDF5::HDF5 INTERFACE hdf5::hdf5-static)
+    elseif(NOT HDF5_USE_STATIC_LIBRARIES AND TARGET hdf5::hdf5-shared)
+        # shared target from hdf5 1.10 or 1.12 config
+        target_link_libraries(HDF5::HDF5 INTERFACE hdf5::hdf5-shared)
+    elseif(TARGET hdf5)
+        # target from hdf5 1.8 config
+        target_link_libraries(HDF5::HDF5 INTERFACE hdf5)
+        if(NOT HDF5_USE_STATIC_LIBRARIES)
+            set_target_properties(HDF5::HDF5 PROPERTIES
+                INTERFACE_COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
+            )
+        endif()
+    else()
+        # results from CMake FindHDF5
+        set_target_properties(HDF5::HDF5 PROPERTIES
+            INTERFACE_INCLUDE_DIRECTORIES "${HDF5_INCLUDE_DIRS}"
+            INTERFACE_LINK_LIBRARIES "${HDF5_LIBRARIES}"
+        )
+    endif()
+endif()
+
+if(NOT HAVE_HDF5 AND MATIO_MAT73)
+    message(FATAL_ERROR "MAT73 requires HDF5")
+endif()
+

 macro(matio_create_zlib target)
     add_library(ZLIB::ZLIB INTERFACE IMPORTED)
@@ -61,32 +91,3 @@
         set(HAVE_ZLIB 1)
     endif()
 endif()
-
-if(HDF5_FOUND)
-    add_library(HDF5::HDF5 INTERFACE IMPORTED)
-    if(HDF5_USE_STATIC_LIBRARIES AND TARGET hdf5::hdf5-static)
-        # static target from hdf5 1.10 or 1.12 config
-        target_link_libraries(HDF5::HDF5 INTERFACE hdf5::hdf5-static)
-    elseif(NOT HDF5_USE_STATIC_LIBRARIES AND TARGET hdf5::hdf5-shared)
-        # shared target from hdf5 1.10 or 1.12 config
-        target_link_libraries(HDF5::HDF5 INTERFACE hdf5::hdf5-shared)
-    elseif(TARGET hdf5)
-        # target from hdf5 1.8 config
-        target_link_libraries(HDF5::HDF5 INTERFACE hdf5)
-        if(NOT HDF5_USE_STATIC_LIBRARIES)
-            set_target_properties(HDF5::HDF5 PROPERTIES
-                INTERFACE_COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
-            )
-        endif()
-    else()
-        # results from CMake FindHDF5
-        set_target_properties(HDF5::HDF5 PROPERTIES
-            INTERFACE_INCLUDE_DIRECTORIES "${HDF5_INCLUDE_DIRS}"
-            INTERFACE_LINK_LIBRARIES "${HDF5_LIBRARIES}"
-        )
-    endif()
-endif()
-
-if(NOT HAVE_HDF5 AND MATIO_MAT73)
-    message(FATAL_ERROR "MAT73 requires HDF5")
-endif()


[ASan/Win] Fix PR20944 -- run ASan gtests as part of check-asan on Windows

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -168,6 +168,9 @@
   else()
     set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${test_name}")
   endif()
+  if(MSVC)
+    set(output_bin "${output_bin}.exe")
+  endif()
   # Use host compiler in a standalone build, and just-built Clang otherwise.
   if(NOT COMPILER_RT_STANDALONE_BUILD)
     list(APPEND TEST_DEPS clang)


ARC: MWDT: don't use compact C library

ARC: MWDT: don't use compact C library

-Hcl option instructs linker to use MetaWare C Compactlib.
According to MWDT documentation "Compactlib is not thread-safe"

So, let's use MetaWare C library instead which is thread-safe.

Signed-off-by: Evgeniy Paltsev <7de4ab8b01334d64e4e84734c688a8a936513edc@gmail.com>

--- cmake/linker/arcmwdt/target.cmake
+++ cmake/linker/arcmwdt/target.cmake
@@ -114,7 +114,6 @@
     -Xtimer0 # to suppress the warning message
     -Hnoxcheck_obj
     -Hnocplus
-    -Hcl
     -Hheap=0
     -Hnoivt
   )


CMake: minor: OpenGL detection: setting OPENGL_INCLUDE_DIR to blank under Win32

--- adm_local/cmake_files/FindSalomeOpenGL.cmake
+++ adm_local/cmake_files/FindSalomeOpenGL.cmake
@@ -23,5 +23,10 @@
 #
 #  !! Please read the generic detection procedure in SalomeMacros.cmake !!
 #
+IF(WIN32)
+  # The variable is not even set under Windows 32. Force it to blank so that
+  # we don't get a warning in the big macro.
+  SET(OPENGL_INCLUDE_DIR "")
+ENDIF()
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenGL OPENGL_INCLUDE_DIR 1)
 #MARK_AS_ADVANCED()


Added "notags" argument to support checking out HEAD revision.

--- modules/DownloadModules.cmake
+++ modules/DownloadModules.cmake
@@ -19,9 +19,11 @@
 #   Valid options:
 #      modname = short module name (see modules/ExternalModules.conf);
 #                may be a semicolon-separated list
-#      allmodules = if true, download all known modules
+#      allmodules = if true: download all known modules
 #      outdir = full path to Zorba's external modules directory to download
 #               modules into (will be created if necessary)
+#      notags = if true: ignore tags, check out HEAD revision of module(s)
+#               (bzr only - svn uses different URLs for tags)

 # Figure out what directory we're running in - ExternalModules.txt is here too
 get_filename_component (cwd ${CMAKE_CURRENT_LIST_FILE} PATH)
@@ -95,9 +97,9 @@
         endif (NOT bzr)

         set (_modtagargs)
-        if (_modtag)
+        if (_modtag AND NOT notags)
           set (_modtagargs "-r" "${_modtag}")
-        endif (_modtag)
+        endif (_modtag AND NOT notags)
         execute_process (COMMAND "${bzr}" branch "${_modurl}" "${_modname}"
           ${_modtagargs} WORKING_DIRECTORY "${outdir}" TIMEOUT 60)


added utilities for removing compile options

--- build_options.cmake
+++ build_options.cmake
@@ -28,6 +28,23 @@
     endforeach()
 endfunction()

+function( TNUN_remove_compile_options_for_config configuration )
+    string( TOUPPER ${configuration} configuration )
+    get_directory_property( current_compile_options COMPILE_OPTIONS )
+    foreach( arg ${ARGN} )
+        set( option $<$<CONFIG:${configuration}>:${arg}> )
+        string( REPLACE "${option}" "" current_compile_options "${current_compile_options}" )
+    endforeach()
+    set_directory_properties( PROPERTIES COMPILE_OPTIONS "${current_compile_options}" )
+endfunction()
+
+function( TNUN_remove_compile_options )
+    get_directory_property( current_compile_options COMPILE_OPTIONS )
+    foreach( option ${ARGN} )
+        string( REPLACE "${option}" "" current_compile_options "${current_compile_options}" )
+    endforeach()
+    set_directory_properties( PROPERTIES COMPILE_OPTIONS "${current_compile_options}" )
+endfunction()

 ################################################################################
 #


Remove dead cmake code

Remove dead cmake code

Signed-off-by: Connor Davis <0978cef2209bbd72870cf32a629250c9625726a8@ainfosec.com>

--- scripts/cmake/macros.cmake
+++ scripts/cmake/macros.cmake
@@ -838,52 +838,6 @@
 endfunction(add_subproject)

 # ------------------------------------------------------------------------------
-# EFI Build
-# ------------------------------------------------------------------------------
-
-macro(add_efi_source)
-    list(APPEND EFI_EXTENSION_SOURCES
-        ${ARGN}
-    )
-endmacro(add_efi_source)
-
-# ------------------------------------------------------------------------------
-# Extensions
-# ------------------------------------------------------------------------------
-
-function(vmm_extension NAME)
-    if (ENABLE_BUILD_VMM)
-        list(APPEND ARGN
-            DEPENDS bfvmm
-            DEPENDS bfintrinsics
-        )
-
-        add_subproject(
-            ${NAME} vmm
-            ${ARGN}
-        )
-    endif()
-endfunction(vmm_extension)
-
-function(userspace_extension NAME)
-    if (ENABLE_BUILD_USERSPACE)
-        add_subproject(
-            ${NAME} userspace
-            ${ARGN}
-        )
-    endif()
-endfunction(userspace_extension)
-
-function(test_extension NAME)
-    if (ENABLE_BUILD_TEST)
-        add_subproject(
-            ${NAME} test
-            ${ARGN}
-        )
-    endif()
-endfunction(test_extension)
-
-# ------------------------------------------------------------------------------
 # init_project
 # ------------------------------------------------------------------------------

@@ -1021,121 +975,6 @@
     set(BUILD_VALIDATOR_ERROR ON)
 endmacro(invalid_config)

-# Add Static Library
-#
-# Creates a static library, sets the appropriate defintions and dependencies
-# and installs the library into the prefix
-#
-# @param NAME The name of the library. "_static" is added for you
-# @param ALWAYS Always compile this library regardless of BUILD_STATIC_LIBS
-# @param SOURCES The source files for the library
-# @param DEFINES The definitions to add to the library
-#
-function(add_static_library NAME)
-    set(options ALWAYS)
-    set(multiVal SOURCES DEFINES)
-    cmake_parse_arguments(ARG "${options}" "" "${multiVal}" ${ARGN})
-
-    if(NOT ARG_SOURCES)
-        return()
-    endif()
-
-    if(NOT ARG_SOURCES)
-        message(FATAL_ERROR "SOURCES must be defined when creating a library")
-    endif()
-
-    add_library(${NAME} STATIC ${ARG_SOURCES})
-    set_target_properties(${NAME} PROPERTIES LINKER_LANGUAGE C)
-    target_compile_definitions(${NAME} PRIVATE ${ARG_DEFINES})
-    install(TARGETS ${NAME} DESTINATION lib)
-endfunction(add_static_library)
-
-# ------------------------------------------------------------------------------
-# target_link_xxx_libraries
-# ------------------------------------------------------------------------------
-
-# Target Link Static Libraries
-#
-# This function is similar to target_link_libraries, but adds _static
-# to the library name before adding the library to the target
-#
-# @param NAME The name of the target.
-#
-function(target_link_static_libraries NAME)
-    foreach(l ${ARGN})
-        target_link_libraries(${NAME} ${l})
-    endforeach(l)
-endfunction(target_link_static_libraries)
-
-# ------------------------------------------------------------------------------
-# add_vmm
-# ------------------------------------------------------------------------------
-
-# Add VMM Executable
-#
-# Creates a VMM executable. Specifically, this takes a set of sources,
-# compiles them, and then links the result to the provided libraries and
-# installs the result into the VMM prefix.
-#
-# @param NOVMMLIBS Do not include the bfvmm libraries.
-# @param LIBRARIES Additional libraries to link the new executable against.
-# @param SOURCES Sources to compile for the executable. If this is left blank,
-#     a null.cpp file will be compiled for you.
-# @param DEFINES Additional definitions to add to the executable
-#
-function(add_vmm_executable NAME)
-    set(options NOVMMLIBS)
-    set(multiVal LIBRARIES EXT_LIBRARIES SOURCES DEFINES)
-    cmake_parse_arguments(ARG "${options}" "" "${multiVal}" ${ARGN})
-
-    if(NOT ARG_SOURCES)
-        if(NOT EXISTS ${CMAKE_BINARY_DIR}/null.cpp)
-            file(WRITE
-                ${CMAKE_BINARY_DIR}/null.cpp ""
-            )
-        endif()
-        set(ARG_SOURCES ${CMAKE_BINARY_DIR}/null.cpp)
-    endif()
-
-    add_executable(${NAME} ${ARG_SOURCES})
-    target_compile_definitions(${NAME} PRIVATE ${ARG_DEFINES})
-
-    set(LIBRARIES "")
-    foreach(d ${ARG_LIBRARIES})
-        list(APPEND LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/lib${d}.a")
-    endforeach(d)
-
-    foreach(d ${ARG_EXT_LIBRARIES})
-        list(APPEND LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/lib${d}.a")
-    endforeach(d)
-
-    if(NOT ARG_NOVMMLIBS)
-        list(APPEND LIBRARIES
-            --whole-archive ${CMAKE_INSTALL_PREFIX}/lib/libbfvmm_entry.a --no-whole-archive
-            ${CMAKE_INSTALL_PREFIX}/lib/libbfvmm_vcpu.a
-            ${CMAKE_INSTALL_PREFIX}/lib/libbfvmm_hve.a
-            ${CMAKE_INSTALL_PREFIX}/lib/libbfvmm_memory_manager.a
-            ${CMAKE_INSTALL_PREFIX}/lib/libbfvmm_debug.a
-            ${CMAKE_INSTALL_PREFIX}/lib/libbfintrinsics.a
-        )
-    endif()
-
-    list(APPEND LIBRARIES
-        ${CMAKE_INSTALL_PREFIX}/lib/libc++.a
-        ${CMAKE_INSTALL_PREFIX}/lib/libc++abi.a
-        ${CMAKE_INSTALL_PREFIX}/lib/libbfpthread.a
-        ${CMAKE_INSTALL_PREFIX}/lib/libbfunwind.a
-        ${CMAKE_INSTALL_PREFIX}/lib/libc.a
-        ${CMAKE_INSTALL_PREFIX}/lib/libm.a
-        ${CMAKE_INSTALL_PREFIX}/lib/libbfsyscall.a
-        --whole-archive ${CMAKE_INSTALL_PREFIX}/lib/libbfcrt.a --no-whole-archive
-    )
-
-    target_link_libraries(${NAME} ${LIBRARIES})
-    install(TARGETS ${NAME} DESTINATION bin)
-
-endfunction(add_vmm_executable)
-
 # ------------------------------------------------------------------------------
 # do_test
 # ------------------------------------------------------------------------------


Fix XML tag

Fix XML tag

--- CMake/mitkFunctionGenerateProjectXml.cmake
+++ CMake/mitkFunctionGenerateProjectXml.cmake
@@ -8,7 +8,7 @@
   set(xml_subprojects )

   if(${is_superbuild})
-    set(xml_subprojects ${xml_subprojects} "  <SubProject name=\"SuperBuild\">\n")
+    set(xml_subprojects ${xml_subprojects} "  <SubProject name=\"SuperBuild\"/>\n")
   endif()

   foreach(target ${targets})


Updated FW with a fix for stuck PoE devices that required to be power cycled

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "a3c3514fb2da2a0af03744de0b8226475be9bafb")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "7dd0007f2083d194228210b095c5cbf3440f0871")

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


Update firmware.

Update firmware.

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "37eaa353c5baabb2d05bd5bca9072da766eda329")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "819c1c01771e2cfe36cfef4ee79d32d6f602c3b2")

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


Add motor_test command to FMUv3

Add motor_test command to FMUv3

--- cmake/configs/nuttx_px4fmu-v3_default.cmake
+++ cmake/configs/nuttx_px4fmu-v3_default.cmake
@@ -69,6 +69,7 @@
 	systemcmds/led_control
 	systemcmds/mixer
 	systemcmds/motor_ramp
+	systemcmds/motor_test
 	systemcmds/mtd
 	systemcmds/nshterm
 	systemcmds/param


FMUv4: ENable PCA9685 driver so it is compiled at least in one config by default

--- cmake/configs/nuttx_px4fmu-v4_default.cmake
+++ cmake/configs/nuttx_px4fmu-v4_default.cmake
@@ -30,6 +30,7 @@
 	drivers/trone
 	drivers/gps
 	drivers/pwm_out_sim
+	drivers/pca9685
 	drivers/hott
 	drivers/hott/hott_telemetry
 	drivers/hott/hott_sensors


Build SF10A on FMUv4

Build SF10A on FMUv4

--- cmake/configs/nuttx_px4fmu-v4_default.cmake
+++ cmake/configs/nuttx_px4fmu-v4_default.cmake
@@ -23,6 +23,7 @@
 	drivers/mb12xx
 	drivers/srf02
 	drivers/sf0x
+	drivers/sf10a
 	drivers/ll40ls
 	drivers/trone
 	drivers/gps


px4fmu-v4_default: compile snapdragon_rc_pwm

--- cmake/configs/nuttx_px4fmu-v4_default.cmake
+++ cmake/configs/nuttx_px4fmu-v4_default.cmake
@@ -43,6 +43,7 @@
 	drivers/pwm_input
 	drivers/camera_trigger
 	drivers/bst
+	drivers/snapdragon_rc_pwm

 	#
 	# System commands


Set PYTHON_PREFER_VERSION to match PYTHON_EXECUTABLE

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -511,16 +511,16 @@
   # If so, it will be passed to find_package(Python) below. Otherwise,
   # check what `python` points to: Python 2 or 3:
   if(NOT PYTHON_EXECUTABLE)
-    find_program(PYTHON_BINARY_IN_PATH "python")
-    if(PYTHON_BINARY_IN_PATH)
-      execute_process(COMMAND ${PYTHON_BINARY_IN_PATH} -c "import sys;print(sys.version_info[0])"
-                      OUTPUT_VARIABLE PYTHON_PREFER_VERSION
-                      ERROR_VARIABLE PYTHON_PREFER_VERSION_ERR)
-      if(PYTHON_PREFER_VERSION_ERR)
-        message(WARNING "Unable to determine version of ${PYTHON_BINARY_IN_PATH}: ${PYTHON_PREFER_VERSION_ERR}")
-      endif()
-      string(STRIP "${PYTHON_PREFER_VERSION}" PYTHON_PREFER_VERSION)
-    endif()
+    find_program(PYTHON_EXECUTABLE "python")
+  endif()
+  if(PYTHON_EXECUTABLE)
+    execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys;print(sys.version_info[0])"
+                    OUTPUT_VARIABLE PYTHON_PREFER_VERSION
+                    ERROR_VARIABLE PYTHON_PREFER_VERSION_ERR)
+    if(PYTHON_PREFER_VERSION_ERR)
+      message(WARNING "Unable to determine version of ${PYTHON_EXECUTABLE}: ${PYTHON_PREFER_VERSION_ERR}")
+    endif()
+    string(STRIP "${PYTHON_PREFER_VERSION}" PYTHON_PREFER_VERSION)
   endif()

   if(python)


[cmake] Build xrootd in release mode with warnings enabled

 * xrootd does not have anymore the -Werror flag in release mode.
   Therefore, we can remove the -w flag and use the standard
   ROOT_EXTERNAL_CXX_FLAGS for the builtin xrootd.
 * Explicitely set the build type of xrootd to Release. This switches
   from the default RelWithDebInfo to plain Release and ensures that
   -Werror is not set.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -877,10 +877,6 @@
   set(XROOTD_DESTDIR ${CMAKE_BINARY_DIR})
   set(XROOTD_ROOTDIR ${XROOTD_DESTDIR})
   message(STATUS "Downloading and building XROOTD version ${xrootd_version}")
-  string(REPLACE "-Wall " "" __cxxflags "${ROOT_EXTERNAL_CXX_FLAGS}")  # Otherwise it produces many warnings
-  string(REPLACE "-W " "" __cxxflags "${__cxxflags}")          # Otherwise it produces many warnings
-  string(REPLACE "-Wshadow" "" __cxxflags "${__cxxflags}")          # Otherwise it produces many warnings
-  string(REPLACE "-Woverloaded-virtual" "" __cxxflags "${__cxxflags}")  # Otherwise it produces manywarnings

   # Guess under which directory XRootD will install its libraires
   set(XROOTD_LIBDIR "lib")
@@ -898,10 +894,11 @@
     URL_HASH SHA256=6f2ca1accc8d49d605706bb556777c753860bf46d845b1ee11393a5cb5987f15
     INSTALL_DIR ${XROOTD_ROOTDIR}
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+               -DCMAKE_BUILD_TYPE=Release
                -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
                -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-               -DCMAKE_CXX_FLAGS=${__cxxflags}\ -w
+               -DCMAKE_CXX_FLAGS=${ROOT_EXTERNAL_CXX_FLAGS}
                -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
                -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
                -DENABLE_PYTHON=OFF


[cmake] Use --depth=1 when cloning gtest.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1472,6 +1472,7 @@
   ExternalProject_Add(
     googletest
     GIT_REPOSITORY https://github.com/google/googletest.git
+    GIT_SHALLOW 1
     GIT_TAG release-1.8.0
     UPDATE_COMMAND ""
     # TIMEOUT 10


Fixed the quicklogic_plugins target

Fixed the quicklogic_plugins target

Signed-off-by: Maciej Kurc <572803cc6e8d7bb35033942e4b03254951a2e0d6@antmicro.com>

--- quicklogic/common/cmake/quicklogic_env.cmake
+++ quicklogic/common/cmake/quicklogic_env.cmake
@@ -40,22 +40,33 @@
   fetch_qlfpga(${QLFPGA_SLOW_VPR_ARCH}	    ${QLFPGA_SLOW_VPR_ARCH_REL})
   fetch_qlfpga(${QLFPGA_SLOW_VPR_RR_GRAPH}  ${QLFPGA_SLOW_VPR_RR_GRAPH_REL})

+  get_file_target(QLFPGA_FASM_DB_TAR_GZ_TARGET ${QLFPGA_FASM_DB_TAR_GZ})
   add_custom_command(
 	OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${QLFPGA_FASM_DB}
 	COMMAND bash -c 'tar -xf ${QLFPGA_FASM_DB_TAR_GZ} -C ${QLFPGA_BASE_DIR}'
-        DEPENDS ${QLFPGA_FASM_DB_TAR_GZ}
+        DEPENDS ${QLFPGA_FASM_DB_TAR_GZ_TARGET}
 	COMMENT "Generating ${QLFPGA_FASM_DB}"
   )
   add_file_target(FILE ${QLFPGA_FASM_DB} GENERATED)

+  set(QLFPGA_PLUGINS_FILES
+    ${QLFPGA_REPACKING_RULES}
+    ${QLFPGA_FASM_DB}
+    ${QLFPGA_FAST_VPR_ARCH}
+    ${QLFPGA_FAST_VPR_RR_GRAPH}
+    ${QLFPGA_SLOW_VPR_ARCH}
+    ${QLFPGA_SLOW_VPR_RR_GRAPH}
+  )
+
+  set(QLFPGA_PLUGINS_DEPS )
+  foreach(FILE_NAME ${QLFPGA_PLUGINS_FILES})
+    get_file_target(FILE_TARGET ${FILE_NAME})
+    list(APPEND QLFPGA_PLUGINS_DEPS ${FILE_TARGET})
+  endforeach()
+
   add_custom_target(qlfpga_plugins
-	  DEPENDS ${QLFPGA_REPACKING_RULES}
-	  ${QLFPGA_FASM_DB}
-	  ${QLFPGA_FAST_VPR_ARCH}
-	  ${QLFPGA_FAST_VPR_RR_GRAPH}
-	  ${QLFPGA_SLOW_VPR_ARCH}
-	  ${QLFPGA_SLOW_VPR_RR_GRAPH}
-	)
+    DEPENDS ${QLFPGA_PLUGINS_DEPS}
+  )
 endfunction()

 function(FETCH_QLFPGA FILE_PATH FILE_REL_PATH)


Issue #12: Don't install command line apps to separate bin folder if doing GUI.

--- CMake/mpMacroInstallCommandLineApp.cmake
+++ CMake/mpMacroInstallCommandLineApp.cmake
@@ -28,7 +28,7 @@
         set(_app_installed TRUE)
       endforeach()
     endif()
-    if(NOT _app_installed OR BUILD_SHARED_LIBS)
+    if(NOT _app_installed)
       install(${ARGS} DESTINATION ${MYPROJECT_INSTALL_BIN_DIR})
     endif()


Allow hip cmake to link libraries

Allow hip cmake to link libraries

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -520,7 +520,7 @@
     if("x${HCC_HOME}" STREQUAL "x")
         set(HCC_HOME "/opt/rocm/hcc")
     endif()
-    set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>")
+    set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
     add_executable(${hip_target} ${_cmake_options} ${_generated_files} ${_sources})
     set_target_properties(${hip_target} PROPERTIES LINKER_LANGUAGE HIP)
 endmacro()


Update FindLua.cmake

Update FindLua.cmake

--- cmake/FindLua.cmake
+++ cmake/FindLua.cmake
@@ -54,6 +54,7 @@
         /opt/local # DarwinPorts
         /opt/csw # Blastwave
         /opt
+        /usr/local
         C:/Lua
         )

@@ -69,6 +70,7 @@
         /opt/local
         /opt/csw
         /opt
+        /usr/local
         )

 if(LUA_LIBRARY)


Include CMake version in configuration summary

Summary: Closes https://github.com/caffe2/caffe2/pull/1731

Reviewed By: Yangqing

Differential Revision: D6699495

Pulled By: pietern

fbshipit-source-id: 4c30ea595f8ea3b0c7bffac15e80c7412b516a16

--- cmake/Summary.cmake
+++ cmake/Summary.cmake
@@ -3,6 +3,8 @@
   message(STATUS "")
   message(STATUS "******** Summary ********")
   message(STATUS "General:")
+  message(STATUS "  CMake version         : ${CMAKE_VERSION}")
+  message(STATUS "  CMake command         : ${CMAKE_COMMAND}")
   message(STATUS "  Git version           : ${CAFFE2_GIT_VERSION}")
   message(STATUS "  System                : ${CMAKE_SYSTEM_NAME}")
   message(STATUS "  C++ compiler          : ${CMAKE_CXX_COMPILER}")


CMake: [skip ci] report which C++ standard is required

--- cMake/FreeCAD_Helpers/PrintFinalReport.cmake
+++ cMake/FreeCAD_Helpers/PrintFinalReport.cmake
@@ -10,6 +10,7 @@

     message(STATUS "Compiler:            ${CMAKE_CXX_COMPILER} (${CMAKE_CXX_COMPILER_VERSION})")
     message(STATUS "Flags:               ${CMAKE_CXX_FLAGS}")
+    message(STATUS "Standard:            Requires C++${CMAKE_CXX_STANDARD}")

     # Qt5 needs/sets PYTHON_CONFIG_SUFFIX regarding Shiboken
     message(STATUS "Python:              [${PYTHON_EXECUTABLE}] [${PYTHON_CONFIG_SUFFIX}]")


[windows] use "arrays" to avoid large env vars

the limit is 8192, but that the combined number
of characters for all the concatenated env
hook paths for each package.

i think it could be further separated into
one variable per env hook per package,
but that seemed like overkill for now.

--- ament_cmake_core/cmake/environment_hooks/ament_generate_package_environment.cmake
+++ ament_cmake_core/cmake/environment_hooks/ament_generate_package_environment.cmake
@@ -40,8 +40,13 @@
       if(NOT "${_AMENT_CMAKE_ENVIRONMENT_HOOKS_${extension}} " STREQUAL " ")
         list(SORT _AMENT_CMAKE_ENVIRONMENT_HOOKS_${extension})
         foreach(hook ${_AMENT_CMAKE_ENVIRONMENT_HOOKS_${extension}})
-          set(ENVIRONMENT_HOOKS
-            "${ENVIRONMENT_HOOKS}ament_append_value AMENT_ENVIRONMENT_HOOKS \"$AMENT_CURRENT_PREFIX/${hook}\"\n")
+          if(WIN32)
+            set(ENVIRONMENT_HOOKS
+                "${ENVIRONMENT_HOOKS}call:ament_append_value AMENT_ENVIRONMENT_HOOKS[${PROJECT_NAME}] \"%AMENT_CURRENT_PREFIX%/${hook}\"\n")
+          else()
+            set(ENVIRONMENT_HOOKS
+                "${ENVIRONMENT_HOOKS}ament_append_value AMENT_ENVIRONMENT_HOOKS \"$AMENT_CURRENT_PREFIX/${hook}\"\n")
+          endif()
         endforeach()
       endif()


ENH: Automatic enabling of the -fPIC flag for external modules

Enabling the "Position Independent Code" option for the external modules
of ITK in order to avoid the following error message during compilation:
"some_librairy" can not be used when making a shared object; recompile with -fPIC"

This error particularly appears when trying to wrap an ITK external module
for python

--- CMake/ITKModuleExternal.cmake
+++ CMake/ITKModuleExternal.cmake
@@ -72,6 +72,9 @@
 set(BUILD_EXAMPLES ${ITK_BUILD_EXAMPLES})
 set(BUILD_DOCUMENTATION ${ITK_BUILD_DOCUMENTATION})
 option(BUILD_SHARED_LIBS "Build ITK with shared libraries." ${ITK_BUILD_SHARED})
+if(NOT CMAKE_POSITION_INDEPENDENT_CODE)
+  set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+endif()

 # Add the ITK_MODULES_DIR to the CMAKE_MODULE_PATH and then use the binary
 # directory for the project to write out new ones to.


fix empty OGRE_FRAMEWORK_INCLUDES variable

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -240,7 +240,7 @@
   set(OGRE_LIBRARY "NOTFOUND")
 endif ()

-if(${OGRE_FRAMEWORK_INCLUDES} STREQUAL NOTFOUND)
+if("${OGRE_FRAMEWORK_INCLUDES}" STREQUAL NOTFOUND)
   unset(OGRE_FRAMEWORK_INCLUDES CACHE)
 endif()
 set(OGRE_INCLUDE_DIR ${OGRE_CONFIG_INCLUDE_DIR} ${OGRE_INCLUDE_DIR} ${OGRE_FRAMEWORK_INCLUDES})


New Hashvalue for new reference screen shots.

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag dc06cc67)
+  set(revision_tag 8e15bc7f)

   ExternalProject_Add(${proj}
     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz


bump version

bump version

--- CMakeModules/FCLVersion.cmake
+++ CMakeModules/FCLVersion.cmake
@@ -1,7 +1,7 @@
 # set the version in a way CMake can use
 set(FCL_MAJOR_VERSION 0)
 set(FCL_MINOR_VERSION 3)
-set(FCL_PATCH_VERSION 1)
+set(FCL_PATCH_VERSION 2)
 set(FCL_VERSION "${FCL_MAJOR_VERSION}.${FCL_MINOR_VERSION}.${FCL_PATCH_VERSION}")

 # increment this when we have ABI changes


fixed CACHE.. FORCE in CMake/hoomd/HOOMDBoostSetup.cmake

--- CMake/hoomd/HOOMDBoostSetup.cmake
+++ CMake/hoomd/HOOMDBoostSetup.cmake
@@ -26,7 +26,7 @@

     if (NOT Boost_FOUND)
         message(WARNING "Boost (>= 1.44.0) with mpi and serialization components not found. Disabling MPI.")
-        set(ENABLE_MPI FALSE CACHE FORCE)
+        set(ENABLE_MPI FALSE CACHE BOOL "Enable the compilation of the MPI communication code" FORCE)
     endif (NOT Boost_FOUND)
 endif(ENABLE_MPI)


Fix Apple Toolchain-ID changing on reconfigure (#383)

* Setting CMAKE_OSX_ARCHITECTURES to "arm64;x86_64" can cause output
  in either order so predefined macros must be alphanumerically
  sorted before putting into toolchain file.

--- scripts/create-toolchain-info.cmake
+++ scripts/create-toolchain-info.cmake
@@ -142,6 +142,7 @@
   endif()
 endforeach()

+list(SORT macros_list)
 list(REMOVE_DUPLICATES macros_list)
 string(REPLACE ";" "\n" macros_string "${macros_list}")


ENH: Update version of DTI-Reg

ENH: Update version of DTI-Reg

--- CMake/FindExternalTools.cmake
+++ CMake/FindExternalTools.cmake
@@ -487,7 +487,7 @@
   SVN_REPOSITORY "http://www.nitrc.org/svn/dtireg/trunk"
   SVN_USERNAME slicerbot
   SVN_PASSWORD slicer
-  SVN_REVISION -r 33 # 01/06/2013
+  SVN_REVISION -r 34 # 01/06/2013
   )
 set( CMAKE_ExtraARGS
   -DANTSTOOL:PATH=${ANTSPath}


Fix to detect system qwt linked agains qt5.

--- CMakeModules/FindQwtQt4.cmake
+++ CMakeModules/FindQwtQt4.cmake
@@ -25,18 +25,18 @@
           /opt/csw/include   # Blastwave
           /opt/include
           /usr/freeware/include
-    PATH_SUFFIXES qwt qwt-qt4 qwt-qt5 qwt6
+    PATH_SUFFIXES qt5/qwt6 qwt qwt-qt4 qwt-qt5 qwt6
     NO_DEFAULT_PATH)

 if (NOT QWT_INCLUDE_DIR)
     find_path(QWT_INCLUDE_DIR qwt.h
-        PATH_SUFFIXES qwt qwt-qt4 qwt-qt5 qwt6)
+        PATH_SUFFIXES qt5/qwt6 qwt qwt-qt4 qwt-qt5 qwt6)
 endif ()

 find_library(QWT_LIBRARY
-    NAMES qwt-static
+    NAMES qwt-qt5
           qwt-qt4
-          qwt-qt5
+          qwt-static
           qwt
     PATHS $ENV{QWT_DIR}/lib
           $ENV{QWT_DIR}
@@ -51,9 +51,9 @@

 if (NOT QWT_LIBRARY)
     find_library(QWT_LIBRARY
-        NAMES qwt-static
+        NAMES qwt-qt5
               qwt-qt4
-              qwt-qt5
+              qwt-static
               qwt)
 endif (NOT QWT_LIBRARY)


Don't pass FALSE value to ament_add_test when SKIP_TEST is not provided (#236)

Signed-off-by: Emerson Knapp <b25b3c45ba64169164815a0a22a3494e7ace199b@gmail.com>

--- ament_cmake_gmock/cmake/ament_add_gmock.cmake
+++ ament_cmake_gmock/cmake/ament_add_gmock.cmake
@@ -87,8 +87,11 @@
   if(ARG_APPEND_LIBRARY_DIRS)
     set(ARG_APPEND_LIBRARY_DIRS "APPEND_LIBRARY_DIRS" ${ARG_APPEND_LIBRARY_DIRS})
   endif()
+  # Options come out TRUE or FALSE but need to be passed as value or empty
   if(ARG_SKIP_TEST)
     set(ARG_SKIP_TEST "SKIP_TEST")
+  else()
+    set(ARG_SKIP_TEST "")
   endif()
   if(ARG_RUNNER)
     set(ARG_RUNNER "RUNNER" ${ARG_RUNNER})


Add SKIP_TEST flag to ament_add_gmock() (#143)

--- ament_cmake_gmock/cmake/ament_add_gmock.cmake
+++ ament_cmake_gmock/cmake/ament_add_gmock.cmake
@@ -31,6 +31,8 @@
 # :param SKIP_LINKING_MAIN_LIBRARIES: if set skip linking against the gmock
 #   main libraries
 # :type SKIP_LINKING_MAIN_LIBRARIES: option
+# :param SKIP_TEST: if set mark the test as being skipped
+# :type SKIP_TEST: option
 # :param ENV: list of env vars to set; listed as ``VAR=value``
 # :type ENV: list of strings
 # :param APPEND_ENV: list of env vars to append if already set, otherwise set;
@@ -51,7 +53,7 @@

 function(_ament_add_gmock target)
   cmake_parse_arguments(ARG
-    "SKIP_LINKING_MAIN_LIBRARIES"
+    "SKIP_LINKING_MAIN_LIBRARIES;SKIP_TEST"
     "TIMEOUT;WORKING_DIRECTORY"
     "APPEND_ENV;APPEND_LIBRARY_DIRS;ENV"
     ${ARGN})
@@ -83,6 +85,9 @@
   if(ARG_APPEND_LIBRARY_DIRS)
     set(ARG_APPEND_LIBRARY_DIRS "APPEND_LIBRARY_DIRS" ${ARG_APPEND_LIBRARY_DIRS})
   endif()
+  if(ARG_SKIP_TEST)
+    set(ARG_SKIP_TEST "SKIP_TEST")
+  endif()
   if(ARG_TIMEOUT)
     set(ARG_TIMEOUT "TIMEOUT" ${ARG_TIMEOUT})
   endif()
@@ -98,6 +103,7 @@
     ${ARG_ENV}
     ${ARG_APPEND_ENV}
     ${ARG_APPEND_LIBRARY_DIRS}
+    ${ARG_SKIP_TEST}
     ${ARG_TIMEOUT}
     ${ARG_WORKING_DIRECTORY}
   )


Migration to OCCT > 6.9.0

Migration to OCCT > 6.9.0

--- salome_adm/cmake_files/FindCAS.cmake
+++ salome_adm/cmake_files/FindCAS.cmake
@@ -76,17 +76,8 @@
   ENDIF()
 ENDIF()

-#FIND_LIBRARY(CAS_BinLPlugin BinLPlugin )
-#FIND_LIBRARY(CAS_BinPlugin BinPlugin )
-#FIND_LIBRARY(CAS_BinTObjPlugin BinTObjPlugin )
-#FIND_LIBRARY(CAS_BinXCAFPlugin BinXCAFPlugin )
 FIND_LIBRARY(CAS_FWOSPlugin FWOSPlugin )
 FIND_LIBRARY(CAS_PTKernel PTKernel )
-#FIND_LIBRARY(CAS_StdLPlugin StdLPlugin )
-#FIND_LIBRARY(CAS_StdPlugin StdPlugin )
-IF(CAS_VERSION_STR VERSION_LESS "6.7.2")
-FIND_LIBRARY(CAS_TKAdvTools TKAdvTools )
-ENDIF()
 FIND_LIBRARY(CAS_TKBin TKBin )
 FIND_LIBRARY(CAS_TKBinL TKBinL )
 FIND_LIBRARY(CAS_TKBinTObj TKBinTObj )
@@ -109,7 +100,9 @@
 FIND_LIBRARY(CAS_TKMath TKMath )
 FIND_LIBRARY(CAS_TKMesh TKMesh )
 FIND_LIBRARY(CAS_TKMeshVS TKMeshVS )
-FIND_LIBRARY(CAS_TKNIS TKNIS )
+IF(CAS_VERSION_STR VERSION_LESS "6.9.1")
+  FIND_LIBRARY(CAS_TKNIS TKNIS )
+ENDIF()
 FIND_LIBRARY(CAS_TKOffset TKOffset )
 FIND_LIBRARY(CAS_TKOpenGl TKOpenGl )
 FIND_LIBRARY(CAS_TKPCAF TKPCAF )
@@ -128,7 +121,6 @@
 FIND_LIBRARY(CAS_TKSTL TKSTL )
 FIND_LIBRARY(CAS_TKTObj TKTObj )
 FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo )
-#FIND_LIBRARY(CAS_TKV2d TKV2d )
 FIND_LIBRARY(CAS_TKV3d TKV3d )
 FIND_LIBRARY(CAS_TKVRML TKVRML )
 FIND_LIBRARY(CAS_TKXCAF TKXCAF )
@@ -141,11 +133,6 @@
 FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj )
 FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF )
 FIND_LIBRARY(CAS_TKXSBase TKXSBase )
-#FIND_LIBRARY(CAS_XCAFPlugin XCAFPlugin )
-#FIND_LIBRARY(CAS_XmlLPlugin XmlLPlugin )
-#FIND_LIBRARY(CAS_XmlPlugin XmlPlugin )
-#FIND_LIBRARY(CAS_XmlTObjPlugin XmlTObjPlugin )
-#FIND_LIBRARY(CAS_XmlXCAFPlugin XmlXCAFPlugin )

 SET(CAS_KERNEL ${CAS_TKernel} ${CAS_TKMath})
 SET(CAS_OCAF ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKCDF} ${CAS_TKLCAF})
@@ -194,7 +181,6 @@
   CAS_TKMath
   CAS_TKMesh
   CAS_TKMeshVS
-  CAS_TKNIS
   CAS_TKOffset
   CAS_TKOpenGl
   CAS_TKPCAF
@@ -227,8 +213,8 @@
   CAS_TKXSBase
 )

-IF(CAS_VERSION_STR VERSION_LESS "6.7.2")
-  LIST(APPEND _libs CAS_TKAdvTools)
+IF(CAS_VERSION_STR VERSION_LESS "6.9.1")
+  LIST(APPEND _libs CAS_TKNIS)
 ENDIF()

 INCLUDE(FindPackageHandleStandardArgs)


ENH: Update Remote/LesionSizingToolkit to newer commit

Change-Id: I8e1ff66130dc0dd3395d3007d6d120a75b167479

--- Modules/Remote/LesionSizingToolkit.remote.cmake
+++ Modules/Remote/LesionSizingToolkit.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(LesionSizingToolkit
   "Framework for determining the sizes of lesions in medical images."
   GIT_REPOSITORY http://public.kitware.com/LesionSizingToolkit.git
-  GIT_TAG 76235ea768b
+  GIT_TAG 32c415ebb36
   )