Find Qt on the mac without frameworks but with debugging.

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

--- cmake/modules/FindQt4.cmake
+++ cmake/modules/FindQt4.cmake
@@ -770,55 +770,55 @@
   ELSE (QT_USE_FRAMEWORKS)

     # Set QT_QTCORE_LIBRARY by searching for a lib with "QtCore."  as part of the filename
-    FIND_LIBRARY(QT_QTCORE_LIBRARY NAMES QtCore QtCore4 QtCored4          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH )
+    FIND_LIBRARY(QT_QTCORE_LIBRARY NAMES QtCore QtCore4 QtCored4 QtCore_debug         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH )

     # Set QT_QT3SUPPORT_LIBRARY
-    FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY NAMES Qt3Support Qt3Support4 Qt3Supportd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY NAMES Qt3Support Qt3Support_debug Qt3Support4 Qt3Supportd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTGUI_LIBRARY
-    FIND_LIBRARY(QT_QTGUI_LIBRARY NAMES QtGui QtGui4 QtGuid4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTGUI_LIBRARY NAMES QtGui QtGui_debug QtGui_debug QtGui4 QtGuid4            PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTMOTIF_LIBRARY
     IF(Q_WS_X11)
-      FIND_LIBRARY(QT_QTMOTIF_LIBRARY NAMES QtMotif          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+      FIND_LIBRARY(QT_QTMOTIF_LIBRARY NAMES QtMotif  QtMotif_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
     ENDIF(Q_WS_X11)

     # Set QT_QTNETWORK_LIBRARY
-    FIND_LIBRARY(QT_QTNETWORK_LIBRARY NAMES QtNetwork QtNetwork4 QtNetworkd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTNETWORK_LIBRARY NAMES QtNetwork QtNetwork_debug QtNetwork4 QtNetworkd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTNSPLUGIN_LIBRARY
-    FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY NAMES QtNsPlugin      PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY NAMES QtNsPlugin QtNsPlugin_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTOPENGL_LIBRARY
-    FIND_LIBRARY(QT_QTOPENGL_LIBRARY NAMES QtOpenGL QtOpenGL4 QtOpenGLd4    PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTOPENGL_LIBRARY NAMES QtOpenGL QtOpenGL_debug QtOpenGL4 QtOpenGLd4    PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTSQL_LIBRARY
-    FIND_LIBRARY(QT_QTSQL_LIBRARY NAMES QtSql QtSql4 QtSqld4       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTSQL_LIBRARY NAMES QtSql QtSql_debug QtSql4 QtSqld4       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTXML_LIBRARY
-    FIND_LIBRARY(QT_QTXML_LIBRARY NAMES QtXml QtXml4 QtXmld4       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTXML_LIBRARY NAMES QtXml QtXml_debug QtXml4 QtXmld4       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTSVG_LIBRARY
-    FIND_LIBRARY(QT_QTSVG_LIBRARY NAMES QtSvg QtSvg4 QtSvgd4       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTSVG_LIBRARY NAMES QtSvg QtSvg_debug QtSvg4 QtSvgd4       PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTSCRIPT_LIBRARY
-    FIND_LIBRARY(QT_QTSCRIPT_LIBRARY NAMES QtScript QtScript4 QtScriptd4   PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTSCRIPT_LIBRARY NAMES QtScript QtScript_debug QtScript4 QtScriptd4   PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTUITOOLS_LIBRARY
-    FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 QtUiToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools_debug QtUiTools4 QtUiToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     # Set QT_QTTEST_LIBRARY
-    FIND_LIBRARY(QT_QTTEST_LIBRARY NAMES QtTest QtTest4 QtTestd4          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTDBUS_LIBRARY NAMES QtDBus QtDBus4 QtDBusd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY NAMES QtAssistantClient QtAssistantClient4 QtAssistantClientd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTHELP_LIBRARY NAMES QtHelp QtHelp4 QtHelpd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTWEBKIT_LIBRARY NAMES QtWebKit QtWebKit4 QtWebKitd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
-    FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY NAMES QtXmlPatterns QtXmlPatterns4 QtXmlPatternsd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+    FIND_LIBRARY(QT_QTTEST_LIBRARY NAMES QtTest QtTest_debug QtTest4 QtTestd4          PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTDBUS_LIBRARY NAMES QtDBus QtDBus_debug QtDBus4 QtDBusd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY NAMES QtAssistantClient QtAssistantClient_debug QtAssistantClient4 QtAssistantClientd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTHELP_LIBRARY NAMES QtHelp QtHelp_debug QtHelp4 QtHelpd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTWEBKIT_LIBRARY NAMES QtWebKit QtWebKit_debug QtWebKit4 QtWebKitd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
+
+    FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY NAMES QtXmlPatterns QtXmlPatterns_debug QtXmlPatterns4 QtXmlPatternsd4         PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

     IF(MSVC)
@@ -867,10 +867,10 @@
   FIND_LIBRARY(QT_QTASSISTANT_LIBRARY NAMES QtAssistantClient QtAssistantClient4 QtAssistant QtAssistant4 QtAssistantd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)

   # Set QT_QTDESIGNER_LIBRARY
-  FIND_LIBRARY(QT_QTDESIGNER_LIBRARY NAMES QtDesigner QtDesigner4 QtDesignerd4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
+  FIND_LIBRARY(QT_QTDESIGNER_LIBRARY NAMES QtDesigner QtDesigner_debug QtDesigner4 QtDesignerd4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)

   # Set QT_QTDESIGNERCOMPONENTS_LIBRARY
-  FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY NAMES QtDesignerComponents QtDesignerComponents4 QtDesignerComponentsd4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)
+  FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY NAMES QtDesignerComponents QtDesignerComponents_debug QtDesignerComponents4 QtDesignerComponentsd4 PATHS ${QT_LIBRARY_DIR}        NO_DEFAULT_PATH)

   # Set QT_QTMAIN_LIBRARY
   IF(WIN32)


Fix FindTBB on linux in debug mode.

Fix FindTBB on linux in debug mode.

--- cmake/modules/FindTBB.cmake
+++ cmake/modules/FindTBB.cmake
@@ -260,6 +260,10 @@
   if(TBB_LIBRARIES_${TBB_BUILD_TYPE})
     set(TBB_LIBRARIES "${TBB_LIBRARIES_${TBB_BUILD_TYPE}}")
   endif()
+
+  if(NOT MSVC AND NOT TBB_LIBRARIES)
+    set(TBB_LIBRARIES ${TBB_LIBRARIES_RELEASE})
+  endif()

   if (MSVC AND TBB_STATIC)
     set(TBB_DEFINITIONS __TBB_NO_IMPLICIT_LINKAGE)


superbuild: resolve the top-level dir properly

If the superbuild is built through a symlink, the '..' resolution may be
wrong. Instead, get the fully-qualified path to the superbuild then
compute the parent from that.

--- superbuild/versions.cmake
+++ superbuild/versions.cmake
@@ -8,6 +8,8 @@
 #   ..
 # endif()

+get_filename_component(superbuild_top_dir "${CMAKE_SOURCE_DIR}" REALPATH)
+
 add_revision(zlib
   URL "http://www.paraview.org/files/dependencies/zlib-1.2.7.tar.gz"
   URL_MD5 60df6a37c56e7c1366cca812414f7b85)
@@ -79,7 +81,7 @@
   URL "http://paraview.org/files/dependencies/manta-r2439.tar.gz"
   URL_MD5 fbf4107fe2f6d7e8a5ae3dda71805bdc)

-add_revision( nuclearRGG SOURCE_DIR ${CMAKE_SOURCE_DIR}/.. )
+add_revision( nuclearRGG SOURCE_DIR ${superbuild_top_dir}/.. )

 add_revision(vtk
   GIT_REPOSITORY http://vtk.org/VTK.git
@@ -189,7 +191,7 @@
   )

 if(BUILD_WITH_CUBIT AND UNIX AND NOT APPLE)
-add_revision(meshkit SOURCE_DIR ${CMAKE_SOURCE_DIR}/../meshkit/ )
+add_revision(meshkit SOURCE_DIR ${superbuild_top_dir}/../meshkit/ )
 else()
 add_revision(meshkit
   GIT_REPOSITORY https://bitbucket.org/fathomteam/meshkit.git
@@ -197,7 +199,7 @@
   )
 endif()

-add_revision(meshkit32bit SOURCE_DIR ${CMAKE_SOURCE_DIR}/../meshkit/ )
+add_revision(meshkit32bit SOURCE_DIR ${superbuild_top_dir}/../meshkit/ )

 #------------------------------------------------------------------------------
 # moab versions


Using more compiler flags in CMakeDInformation.cmake (similiar to CMakeCXXInformation.cmake).

--- cmake-d/CMakeDInformation.cmake
+++ cmake-d/CMakeDInformation.cmake
@@ -4,7 +4,8 @@
 # Copyright (c) 2013, Selman Ulug <selman.ulug@gmail.com>
 #                     Tim Burrell <tim.burrell@gmail.com>
 #                     Steve King <sk@metrokings.com>
-#                     Dragos Carp <dragos.carp@gmail.com>
+#                     Dragos Carp <dragos.carp@gmail.com>
+#                     Konstantin Oblaukhov <oblaukhov.konstantin@gmail.com>
 #
 # All rights reserved.
 #
@@ -84,6 +85,77 @@
    include(${CMAKE_USER_MAKE_RULES_OVERRIDE_D})
 endif(CMAKE_USER_MAKE_RULES_OVERRIDE_D)

+# Lines below was taken from CMakeCXXInformation.cmake
+# Not all of this flags are available on D compilers for now, but some as OPTIONS_PIC are.
+
+if(NOT CMAKE_SHARED_LIBRARY_CREATE_D_FLAGS)
+   set(CMAKE_SHARED_LIBRARY_CREATE_D_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_D_FLAGS})
+endif()
+
+if(NOT CMAKE_D_COMPILE_OPTIONS_PIC)
+   set(CMAKE_DCOMPILE_OPTIONS_PIC ${CMAKE_D_COMPILE_OPTIONS_PIC})
+endif()
+
+if(NOT CMAKE_D_COMPILE_OPTIONS_PIE)
+   set(CMAKE_D_COMPILE_OPTIONS_PIE ${CMAKE_D_COMPILE_OPTIONS_PIE})
+endif()
+
+if(NOT CMAKE_D_COMPILE_OPTIONS_DLL)
+   set(CMAKE_D_COMPILE_OPTIONS_DLL ${CMAKE_D_COMPILE_OPTIONS_DLL})
+endif()
+
+if(NOT CMAKE_SHARED_LIBRARY_D_FLAGS)
+   set(CMAKE_SHARED_LIBRARY_D_FLAGS ${CMAKE_SHARED_LIBRARY_D_FLAGS})
+endif()
+
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_D_FLAGS)
+   set(CMAKE_SHARED_LIBRARY_LINK_D_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_D_FLAGS})
+endif()
+
+if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG)
+   set(CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG})
+endif()
+
+if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG_SEP)
+   set(CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG_SEP})
+endif()
+
+if(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_D_FLAG)
+  set(CMAKE_SHARED_LIBRARY_RPATH_LINK_D_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_D_FLAG})
+endif()
+
+if(NOT DEFINED CMAKE_EXE_EXPORTS_D_FLAG)
+  set(CMAKE_EXE_EXPORTS_D_FLAG ${CMAKE_EXE_EXPORTS_D_FLAG})
+endif()
+
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_D_FLAG)
+   set(CMAKE_SHARED_LIBRARY_SONAME_D_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_D_FLAG})
+endif()
+
+if(NOT CMAKE_EXECUTABLE_RUNTIME_D_FLAG)
+  set(CMAKE_EXECUTABLE_RUNTIME_D_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG})
+endif()
+
+if(NOT CMAKE_EXECUTABLE_RUNTIME_D_FLAG_SEP)
+  set(CMAKE_EXECUTABLE_RUNTIME_D_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG_SEP})
+endif()
+
+if(NOT CMAKE_EXECUTABLE_RPATH_LINK_D_FLAG)
+  set(CMAKE_EXECUTABLE_RPATH_LINK_D_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_D_FLAG})
+endif()
+
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_D_WITH_RUNTIME_PATH)
+  set(CMAKE_SHARED_LIBRARY_LINK_D_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_D_WITH_RUNTIME_PATH})
+endif()
+
+if(NOT CMAKE_INCLUDE_FLAG_D)
+  set(CMAKE_INCLUDE_FLAG_D ${CMAKE_INCLUDE_FLAG_D})
+endif()
+
+if(NOT CMAKE_INCLUDE_FLAG_SEP_D)
+  set(CMAKE_INCLUDE_FLAG_SEP_D ${CMAKE_INCLUDE_FLAG_SEP_D})
+endif()
+
 # for most systems a module is the same as a shared library
 # so unless the variable CMAKE_MODULE_EXISTS is set just
 # copy the values from the LIBRARY variables
@@ -91,6 +163,15 @@
   set(CMAKE_SHARED_MODULE_D_FLAGS ${CMAKE_SHARED_LIBRARY_D_FLAGS})
   set(CMAKE_SHARED_MODULE_CREATE_D_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_D_FLAGS})
 endif(NOT CMAKE_MODULE_EXISTS)
+
+# repeat for modules
+if(NOT CMAKE_SHARED_MODULE_CREATE_D_FLAGS)
+  set(CMAKE_SHARED_MODULE_CREATE_D_FLAGS ${CMAKE_SHARED_MODULE_CREATE_D_FLAGS})
+endif()
+
+if(NOT CMAKE_SHARED_MODULE_D_FLAGS)
+  set(CMAKE_SHARED_MODULE_D_FLAGS ${CMAKE_SHARED_MODULE_D_FLAGS})
+endif()

 set(CMAKE_D_FLAGS_INIT "$ENV{DFLAGS} ${CMAKE_D_FLAGS_INIT}")
 # avoid just having a space as the initial value for the cache
@@ -160,8 +241,9 @@

 # create a D shared module just copy the shared library rule
 if(NOT CMAKE_D_CREATE_SHARED_MODULE)
-  set(CMAKE_D_CREATE_SHARED_MODULE ${CMAKE_D_CREATE_SHARED_LIBRARY})
+  set(CMAKE_D_CREATE_SHARED_MODULE "${CMAKE_D_CREATE_SHARED_LIBRARY}")
 endif(NOT CMAKE_D_CREATE_SHARED_MODULE)
+
 if(NOT CMAKE_D_CREATE_STATIC_LIBRARY AND CMAKE_STATIC_LIBRARY_CREATE_D_FLAGS)
 	set(CMAKE_D_CREATE_STATIC_LIBRARY
 		"<CMAKE_D_COMPILER> ${CMAKE_STATIC_LIBRARY_CREATE_D_FLAGS} <OBJECTS> ${CMAKE_D_DASH_O}<TARGET>")
@@ -183,18 +265,6 @@
   set(CMAKE_D_LINK_EXECUTABLE
     "<CMAKE_D_COMPILER> <FLAGS> <CMAKE_D_LINK_FLAGS> <OBJECTS> ${CMAKE_D_DASH_O}<TARGET> <LINK_LIBRARIES> ${CMAKE_D_STDLIBS}")
 endif(NOT CMAKE_D_LINK_EXECUTABLE)
-
-if(NOT CMAKE_EXECUTABLE_RUNTIME_D_FLAG)
-  set(CMAKE_EXECUTABLE_RUNTIME_D_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG})
-endif(NOT CMAKE_EXECUTABLE_RUNTIME_D_FLAG)
-
-if(NOT CMAKE_EXECUTABLE_RUNTIME_D_FLAG_SEP)
-  set(CMAKE_EXECUTABLE_RUNTIME_D_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_D_FLAG_SEP})
-endif(NOT CMAKE_EXECUTABLE_RUNTIME_D_FLAG_SEP)
-
-if(NOT CMAKE_EXECUTABLE_RPATH_LINK_D_FLAG)
-  set(CMAKE_EXECUTABLE_RPATH_LINK_D_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_D_FLAG})
-endif(NOT CMAKE_EXECUTABLE_RPATH_LINK_D_FLAG)

 mark_as_advanced(
 CMAKE_D_FLAGS


Fix some bugs in FindChibios.cmake

Fix some bugs in FindChibios.cmake

--- cmake/Modules/FindChibiOS.cmake
+++ cmake/Modules/FindChibiOS.cmake
@@ -196,9 +196,7 @@
             MESSAGE(STATUS "ChibiOS doesn't have linker script for your chip, please specify it directly using ChibiOS_LINKER_SCRIPT variable.")
         ENDIF()
     ENDIF()
-
-    SET(CHIBIOS_${module}_PLATFORM_SEARCH_PATH ${CHIBIOS_ext_PLATFORM_SEARCH_PATH} ${CHIBIOS_ROOT}/os/hal/platforms/STM32F4xx)
-
+
 ELSEIF(STM32_FAMILY STREQUAL "F1")

     SET(CHIBIOS_kernel_PLATFORM_SEARCH_PATH
@@ -272,8 +270,6 @@
             ENDIF()
         ENDIF()
     ENDIF()
-
-    SET(CHIBIOS_${module}_PLATFORM_SEARCH_PATH ${CHIBIOS_ext_PLATFORM_SEARCH_PATH} ${CHIBIOS_ROOT}/os/hal/platforms/STM32F1xx)
 ENDIF()

 IF(NOT ChibiOS_LINKER_SCRIPT)
@@ -296,6 +292,12 @@
     MATH(EXPR INDEX "${INDEX} + 1")
 ENDFOREACH()

+IF(STM32_FAMILY STREQUAL "F4")
+    SET(CHIBIOS_ext_PLATFORM_SEARCH_PATH ${CHIBIOS_ext_PLATFORM_SEARCH_PATH} ${CHIBIOS_ROOT}/os/hal/platforms/STM32F4xx)
+ELSEIF(STM32_FAMILY STREQUAL "F1")
+    SET(CHIBIOS_ext_PLATFORM_SEARCH_PATH ${CHIBIOS_ext_PLATFORM_SEARCH_PATH} ${CHIBIOS_ROOT}/os/hal/platforms/STM32F1xx)
+ENDIF()
+
 FOREACH(comp ${ChibiOS_FIND_COMPONENTS})
     LIST(FIND CHIBIOS_COMPONENTS ${comp} INDEX)
     IF(INDEX EQUAL -1)


Squashed '3rdparty/github/cmake-utils-remote/' changes from d9d0d5b..293f037

293f037 Fix depend options parsing

git-subtree-dir: 3rdparty/github/cmake-utils-remote
git-subtree-split: 293f03762dc4c3424a978e1984beccbf97d89ef1

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


LIBS scope implies TEST scopeSay public to all links

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -21,10 +21,11 @@
     ENDIF ()
     IF (${_var} STREQUAL LIBS)
       IF (MYPACKAGE_DEBUG)
-        MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} library scope argument")
+        MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] ${packageDepend} library scope argument, implies test")
       ENDIF ()
       SET (_ALL FALSE)
       SET (_LIBS TRUE)
+      SET (_TESTS TRUE)
     ENDIF ()
     IF (${_var} STREQUAL EXES)
       IF (MYPACKAGE_DEBUG)


fix ninja external (#1507)

fix ninja external (#1507)

--- cmake/external/googletest.cmake
+++ cmake/external/googletest.cmake
@@ -27,4 +27,5 @@
         -DBUILD_GMOCK:BOOL=OFF
         -DBUILD_GTEST:BOOL=ON
         -Dgtest_force_shared_crt:BOOL=OFF
+    BUILD_BYPRODUCTS ${googletest_STATIC_LIBRARIES}
 )


[NFC] Improve cmake diagnostic when checking atomics

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

--- cmake/modules/CheckAtomic.cmake
+++ cmake/modules/CheckAtomic.cmake
@@ -69,10 +69,10 @@
     list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
     check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
     if (NOT HAVE_CXX_ATOMICS64_WITH_LIB)
-      message(FATAL_ERROR "Host compiler must support std::atomic!")
+      message(FATAL_ERROR "Host compiler must support 64-bit std::atomic!")
     endif()
   else()
-    message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
+    message(FATAL_ERROR "Host compiler appears to require libatomic for 64-bit operations, but cannot find it.")
   endif()
 endif()


update cpack settings

update cpack settings

--- cpack.cmake
+++ cpack.cmake
@@ -1,35 +1,54 @@
-set(SUFFIX_ARCH "")
-if(CPACK_GENERATOR STREQUAL "PackageMaker") # macosx (dmg)
-	set(SUFFIX_ARCH "_macosx")
-	file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/README
-		DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-	file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/LICENSE
-		${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt)
-	file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/README
-		${CMAKE_CURRENT_BINARY_DIR}/README.txt)
-	set(CPACK_PACKAGING_INSTALL_PREFIX /usr/local)
-	set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt)
-	set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_BINARY_DIR}/README.txt)
-elseif(CPACK_GENERATOR STREQUAL "DEB") # linux (deb)
-	if(CMAKE_SIZEOF_VOID_P MATCHES "8")
-		set(SUFFIX_ARCH "_amd64")
-	else(CMAKE_SIZEOF_VOID_P MATCHES "8")
-		set(SUFFIX_ARCH "_i386")
-	endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
-	set(CPACK_DEBIAN_PACKAGE_DEPENDS
-		"libc6 (>= 2.11), libpcre3-dev")
-	set(CPACK_DEBIAN_PACKAGE_MAINTAINER
-		"Konoha Developers <admin@konohascript.org>")
-elseif(CPACK_GENERATOR STREQUAL "RPM") # linux (rpm)
-	set(CPACK_RPM_PACKAGE_LICENSE "Simplified BSD")
-	set(CPACK_RPM_PACKAGE_GROUP "Development/Languages")
-	set(CPACK_RPM_PACKAGE_URL "http://konohascript.org")
-	if(CMAKE_SIZEOF_VOID_P MATCHES "8")
-		set(SUFFIX_ARCH "_x86_64")
-	else(CMAKE_SIZEOF_VOID_P MATCHES "8")
-		set(SUFFIX_ARCH "_i386")
-	endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
-endif(CPACK_GENERATOR STREQUAL "PackageMaker")
-set(CPACK_PACKAGE_FILE_NAME ${PACKAGE_STRING}${SUFFIX_ARCH})
-
-include(CPack)
+if(CPACK_GENERATOR)
+	set(CPACK_SOURCE_GENERATOR "TGZ")
+	set(CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_STRING})
+	set(CPACK_PACKAGE_NAME ${PACKAGE_NAME})
+	set(CPACK_PACKAGE_VENDOR ${PACKAGE_NAME})
+	set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Statically-typed scripting language")
+	set(CPACK_PACKAGE_VERSION       ${PACKAGE_VERSION})
+	set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
+	set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
+	set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
+	if(NOT RELEASE_NUMBER)
+		set(RELEASE_NUMBER "0")
+	endif(NOT RELEASE_NUMBER)
+	if(CPACK_GENERATOR STREQUAL "PackageMaker") # macosx (dmg)
+		set(CPACK_PACKAGE_FILE_NAME
+			"${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${RELEASE_NUMBER}")
+		file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/README
+			DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+		file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/LICENSE
+			${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt)
+		file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/README
+			${CMAKE_CURRENT_BINARY_DIR}/README.txt)
+		set(CPACK_PACKAGING_INSTALL_PREFIX /usr/local)
+		set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt)
+		set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_BINARY_DIR}/README.txt)
+	elseif(CPACK_GENERATOR STREQUAL "DEB") # linux (deb)
+		find_program(DPKG NAMES dpkg)
+		if(DPKG)
+			execute_process(COMMAND ${DPKG} --print-architecture
+				OUTPUT_VARIABLE PROCESSOR OUTPUT_STRIP_TRAILING_WHITESPACE)
+		else(DPKG)
+			set(PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
+			if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+				set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
+				set(PROCESSOR "amd64")
+			elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686")
+				set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
+				set(PROCESSOR "i386")
+			endif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+		endif(DPKG)
+		set(CPACK_PACKAGE_FILE_NAME
+			"${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${RELEASE_NUMBER}_${PROCESSOR}")
+		set(CPACK_DEBIAN_PACKAGE_DEPENDS
+			"libc6 (>= 2.11), libpcre3, libcurl3")
+		set(CPACK_DEBIAN_PACKAGE_MAINTAINER
+			"Konoha Developers <admin@konohascript.org>")
+	elseif(CPACK_GENERATOR STREQUAL "RPM") # linux (rpm)
+		set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${RELEASE_NUMBER}.${CMAKE_SYSTEM_PROCESSOR}")
+		set(CPACK_RPM_PACKAGE_LICENSE "Simplified BSD")
+		set(CPACK_RPM_PACKAGE_GROUP "Development/Languages")
+		set(CPACK_RPM_PACKAGE_URL "http://konohascript.org")
+	endif(CPACK_GENERATOR STREQUAL "PackageMaker")
+	include(CPack)
+endif(CPACK_GENERATOR)


fbcode_builder: minor style cleanup in ThriftCppLibrary.cmake

Summary:
Add explicit double quotes around arguments that are intended to be exactly a
single parameter.  Also line wrap to 80 characters.

Reviewed By: wez

Differential Revision: D16738443

fbshipit-source-id: b8c9b6d50da72b44e23eaf5effbc384b6cbbc1c0

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -17,7 +17,11 @@
   )

   # Generate relative paths in #includes
-  file(RELATIVE_PATH include_prefix ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE})
+  file(
+    RELATIVE_PATH include_prefix
+    "${CMAKE_SOURCE_DIR}"
+    "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
+  )
   get_filename_component(include_prefix ${include_prefix} DIRECTORY)

   if (NOT "${include_prefix}" STREQUAL "")
@@ -29,33 +33,33 @@

   # Compute the list of generated files
   list(APPEND generated_headers
-    ${output_dir}/gen-cpp2/${base}_constants.h
-    ${output_dir}/gen-cpp2/${base}_constants.cpp
-    ${output_dir}/gen-cpp2/${base}_types.h
-    ${output_dir}/gen-cpp2/${base}_types.tcc
-    ${output_dir}/gen-cpp2/${base}_types_custom_protocol.h
+    "${output_dir}/gen-cpp2/${base}_constants.h"
+    "${output_dir}/gen-cpp2/${base}_constants.cpp"
+    "${output_dir}/gen-cpp2/${base}_types.h"
+    "${output_dir}/gen-cpp2/${base}_types.tcc"
+    "${output_dir}/gen-cpp2/${base}_types_custom_protocol.h"
   )
   list(APPEND generated_sources
-    ${output_dir}/gen-cpp2/${base}_data.h
-    ${output_dir}/gen-cpp2/${base}_data.cpp
-    ${output_dir}/gen-cpp2/${base}_types.cpp
+    "${output_dir}/gen-cpp2/${base}_data.h"
+    "${output_dir}/gen-cpp2/${base}_data.cpp"
+    "${output_dir}/gen-cpp2/${base}_types.cpp"
   )
   foreach(service IN LISTS ARG_SERVICES)
     list(APPEND generated_headers
-      ${output_dir}/gen-cpp2/${service}.h
-      ${output_dir}/gen-cpp2/${service}.tcc
-      ${output_dir}/gen-cpp2/${service}AsyncClient.h
-      ${output_dir}/gen-cpp2/${service}_custom_protocol.h
+      "${output_dir}/gen-cpp2/${service}.h"
+      "${output_dir}/gen-cpp2/${service}.tcc"
+      "${output_dir}/gen-cpp2/${service}AsyncClient.h"
+      "${output_dir}/gen-cpp2/${service}_custom_protocol.h"
     )
     list(APPEND generated_sources
-      ${output_dir}/gen-cpp2/${service}.cpp
-      ${output_dir}/gen-cpp2/${service}AsyncClient.cpp
-      ${output_dir}/gen-cpp2/${service}_processmap_binary.cpp
-      ${output_dir}/gen-cpp2/${service}_processmap_compact.cpp
+      "${output_dir}/gen-cpp2/${service}.cpp"
+      "${output_dir}/gen-cpp2/${service}AsyncClient.cpp"
+      "${output_dir}/gen-cpp2/${service}_processmap_binary.cpp"
+      "${output_dir}/gen-cpp2/${service}_processmap_compact.cpp"
     )
   endforeach()

-  list(APPEND thrift_include_options -I ${CMAKE_SOURCE_DIR})
+  list(APPEND thrift_include_options -I "${CMAKE_SOURCE_DIR}")
   foreach(depends IN LISTS ARG_DEPENDS)
     get_property(thrift_include_directory
       TARGET ${depends}
@@ -64,14 +68,17 @@
     if (thrift_include_directory STREQUAL "")
       message(STATUS "No thrift dependency found for ${depends}")
     else()
-      list(APPEND thrift_include_options -I
-        ${thrift_include_directory})
+      list(
+        APPEND thrift_include_options
+        -I "${thrift_include_directory}"
+      )
     endif()
   endforeach()

   file(
     GLOB_RECURSE THRIFT_TEMPLATE_FILES
-    FOLLOW_SYMLINKS ${FBTHRIFT_TEMPLATES_DIR}/*.mustache)
+    FOLLOW_SYMLINKS "${FBTHRIFT_TEMPLATES_DIR}/*.mustache"
+  )

   # Emit the rule to run the thrift compiler
   add_custom_command(
@@ -79,25 +86,26 @@
       ${generated_headers}
       ${generated_sources}
     COMMAND
-      ${CMAKE_COMMAND} -E make_directory ${output_dir}
+      "${CMAKE_COMMAND}" -E make_directory "${output_dir}"
     COMMAND
-      ${FBTHRIFT_COMPILER}
+      "${FBTHRIFT_COMPILER}"
       --strict
-      --templates ${FBTHRIFT_TEMPLATES_DIR}
+      --templates "${FBTHRIFT_TEMPLATES_DIR}"
       --gen "mstch_cpp2:${GEN_ARG_STR}"
       ${thrift_include_options}
-      -o ${output_dir}
-      ${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}
+      -o "${output_dir}"
+      "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
     WORKING_DIRECTORY
-      ${CMAKE_BINARY_DIR}
+      "${CMAKE_BINARY_DIR}"
     MAIN_DEPENDENCY
-      ${THRIFT_FILE}
+      "${THRIFT_FILE}"
     DEPENDS
       ${ARG_DEPENDS}
   )

   # Now emit the library rule to compile the sources
-  add_library(${LIB_NAME} STATIC
+  add_library(
+    "${LIB_NAME}" STATIC
     ${generated_sources}
   )

@@ -107,7 +115,7 @@
   )

   target_include_directories(
-    ${LIB_NAME}
+    "${LIB_NAME}"
     PRIVATE
       ${CMAKE_SOURCE_DIR}
       ${CMAKE_BINARY_DIR}
@@ -116,7 +124,7 @@
       ${FBTHRIFT_INCLUDE_DIR}
   )
   target_link_libraries(
-    ${LIB_NAME}
+    "${LIB_NAME}"
     PUBLIC
       ${ARG_DEPENDS}
       FBThrift::thriftcpp2
@@ -124,13 +132,13 @@
   )

   set_target_properties(
-    ${LIB_NAME}
+    "${LIB_NAME}"
     PROPERTIES
       EXPORT_PROPERTIES "THRIFT_INCLUDE_DIRECTORY"
-      THRIFT_INCLUDE_DIRECTORY ${CMAKE_SOURCE_DIR}
+      THRIFT_INCLUDE_DIRECTORY "${CMAKE_SOURCE_DIR}"
   )

   get_property(thrift_include_directory
-    TARGET ${LIB_NAME}
+    TARGET "${LIB_NAME}"
     PROPERTY THRIFT_INCLUDE_DIRECTORY)
 endfunction()


add marker file with run dependencies

add marker file with run dependencies

--- ament_cmake_core/cmake/environment/ament_cmake_environment_package_hook.cmake
+++ ament_cmake_core/cmake/environment/ament_cmake_environment_package_hook.cmake
@@ -1,6 +1,19 @@
 if(AMENT_CMAKE_ENVIRONMENT_GENERATION)
   ament_generate_environment()
 endif()
+
+function(ament_cmake_environment_generate_package_run_dependencies_marker)
+  # use all run dependencies from the package.xml
+  set(run_depends "")
+  list_append_unique(run_depends
+    ${${PROJECT_NAME}_BUILD_EXPORT_DEPENDS}
+    ${${PROJECT_NAME}_BUILDTOOL_EXPORT_DEPENDS}
+    ${${PROJECT_NAME}_EXEC_DEPENDS}
+    ${${PROJECT_NAME}_TEST_DEPENDS})
+
+  # register direct run dependencies
+  ament_index_register_resource("package_run_dependencies" CONTENT "${run_depends}")
+endfunction()

 function(ament_cmake_environment_generate_parent_prefix_path_marker)
   if(NOT "$ENV{AMENT_PREFIX_PATH} " STREQUAL " ")
@@ -17,5 +30,6 @@
 endfunction()

 if(AMENT_CMAKE_ENVIRONMENT_PARENT_PREFIX_PATH_GENERATION)
+  ament_cmake_environment_generate_package_run_dependencies_marker()
   ament_cmake_environment_generate_parent_prefix_path_marker()
 endif()


Change end fx line

Change end fx line

--- test/BuildGPUTests.cmake
+++ test/BuildGPUTests.cmake
@@ -55,7 +55,7 @@
     if(MPI_FOUND)
 	    target_link_libraries(${name} ${MPI_LIBRARIES})
     endif()
-endif()
+endfunction(add_GPU_NVT_test)

 function(add_GPU_NPT_test name)
     add_executable(${name} ${cudaSources} ${cudaHeaders} ${GOMCHeaders} ${GOMCSources} ${libHeaders} ${libSources}
@@ -75,7 +75,7 @@
     if(MPI_FOUND)
 	    target_link_libraries(${name} ${MPI_LIBRARIES})
     endif()
-endif()
+endfunction(add_GPU_NPT_test)

 function(add_GPU_GCMC_test name)
     add_executable(${name} ${cudaSources} ${cudaHeaders} ${GOMCHeaders} ${GOMCSources} ${libHeaders} ${libSources}
@@ -95,7 +95,7 @@
     if(MPI_FOUND)
 	    target_link_libraries(${name} ${MPI_LIBRARIES})
     endif()
-endif()
+endfunction(add_GPU_GCMC_test)

 function(add_GPU_GEMC_test name)
     add_executable(${name} ${cudaSources} ${cudaHeaders} ${GOMCHeaders} ${GOMCSources} ${libHeaders} ${libSources}
@@ -115,7 +115,7 @@
     if(MPI_FOUND)
 	    target_link_libraries(${name} ${MPI_LIBRARIES})
     endif()
-endif()
+endfunction(add_GPU_GEMC_test)

 add_GPU_NVT_test(GOMC_GPU_NVT_Test)
 add_GPU_NPT_test(GOMC_GPU_NPT_Test)


change the day switch time to 5:00 UTC

change the day switch time to 5:00 UTC

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -5,7 +5,7 @@
 ##   ENABLE_TESTING()
 ##   INCLUDE(Dart)
 set(CTEST_PROJECT_NAME "Eigen")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
+set(CTEST_NIGHTLY_START_TIME "05:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "www.cdash.org")


Updated CTestConfig.cmake

Updated CTestConfig.cmake

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,26 +1,26 @@
 # CTest/CDash configuration
 IF(USE_REMOTE_CDASH)
-	set(CTEST_PROJECT_NAME "NetCDF-C")
+	set(CTEST_PROJECT_NAME "netcdf-c")
 	set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
 	set(CTEST_SITE "Unidata OSX")
 	set(CTEST_DROP_METHOD "http")
 	set(CTEST_DROP_SITE "my.cdash.org")
-	set(CTEST_DROP_LOCATION "/submit.php?project=NetCDF-C")
+	set(CTEST_DROP_LOCATION "/submit.php?project=netcdf-c")
 	set(CTEST_DROP_SITE_CDASH TRUE)
 ELSEIF(BUILDING_TRUNK)
 	SET (CTEST_DROP_METHOD "http")
 	SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/")
-	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=netCDF")
+	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=netcdf-c")
 	SET (CTEST_DROP_SITE_CDASH TRUE)
 ELSEIF(WORKING_FROM_HOME)
 	SET (CTEST_DROP_METHOD "http")
 	SET (CTEST_DROP_SITE "localhost:4111/")
-	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=WinNETCDF")
+	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=netcdf-cmake")
 	SET (CTEST_DROP_SITE_CDASH TRUE)
 ELSE()
-	SET (CTEST_PROJECT_NAME "WinNETCDF")
+	SET (CTEST_PROJECT_NAME "netcdf-cmake")
 	SET (CTEST_DROP_METHOD "http")
 	SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/")
-	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=WinNETCDF")
+	SET (CTEST_DROP_LOCATION "CDash/submit.php?project=netcdf-cmake")
 	SET (CTEST_DROP_SITE_CDASH TRUE)
 ENDIF()


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


TEST: Adding regression testing

TEST: Adding regression testing

--- Modules/Learning/Supervised/test/tests-shark.cmake
+++ Modules/Learning/Supervised/test/tests-shark.cmake
@@ -20,6 +20,11 @@

 otb_add_test(NAME leTvImageClassificationFilterSharkFast COMMAND  otbSupervisedTestDriver
+  --compare-n-images ${NOTOL} 2
+  ${BASELINE}/leSharkImageClassificationFilterOutput.tif
+  ${TEMP}/leSharkImageClassificationFilterOutput.tif
+  ${BASELINE}/leSharkImageClassificationFilterConfidence.tif
+  ${TEMP}/leSharkImageClassificationFilterConfidence.tif
   otbSharkImageClassificationFilter
   ${INPUTDATA}/Classification/QB_1_ortho.tif
   ${TEMP}/leSharkImageClassificationFilterOutput.tif
@@ -41,10 +46,15 @@
 #   )

 otb_add_test(NAME leTvImageClassificationFilterSharkFastMask COMMAND  otbSupervisedTestDriver
+  --compare-n-images ${NOTOL} 2
+  ${BASELINE}/leSharkImageClassificationFilterWithMaskOutput.tif
+  ${TEMP}/leSharkImageClassificationFilterWithMaskOutput.tif
+  ${BASELINE}/leSharkImageClassificationFilterWithMaskConfidence.tif
+  ${TEMP}/leSharkImageClassificationFilterWithMaskConfidence.tif
   otbSharkImageClassificationFilter
   ${INPUTDATA}/Classification/QB_1_ortho.tif
-  ${TEMP}/leSharkImageClassificationFilterOutput.tif
-  ${TEMP}/leSharkImageClassificationFilterConfidence.tif
+  ${TEMP}/leSharkImageClassificationFilterWithMaskOutput.tif
+  ${TEMP}/leSharkImageClassificationFilterWithMaskConfidence.tif
   1
   ${INPUTDATA}/Classification/otbSharkImageClassificationFilter_RFmodel.txt
   ${INPUTDATA}/Classification/QB_1_ortho_mask.tif


Improve FindGLEW_MX.cmake to find glew module

--- FindGLEW_MX.cmake
+++ FindGLEW_MX.cmake
@@ -8,11 +8,11 @@
 endif()

 find_path(_glew_mx_INCLUDE_DIR GL/glew.h
-  /usr/include /usr/local/include /opt/local/include)
+  HINTS ${GLEW_ROOT}/include $ENV{GLEW_ROOT}/include /usr/include /usr/local/include /opt/local/include)

 find_library(_glew_mx_LIBRARY
   NAMES GLEWmx glew32mx GLEW glew glew32
-  PATHS /usr/lib /usr/local/lib)
+  HINTS ${GLEW_ROOT}/lib64 $ENV{GLEW_ROOT}/lib64 /usr/lib /usr/local/lib)

 if(_glew_mx_INCLUDE_DIR AND _glew_mx_LIBRARY)
   set(TEST_SRC ${PROJECT_BINARY_DIR}/glew_test.cpp)


- test for SBW_LIBRARY and set if not present

--- cmake-set-dependencies.cmake
+++ cmake-set-dependencies.cmake
@@ -35,8 +35,9 @@
 if (NOT EXISTS ${SBW_INCLUDE_DIR})
 set (SBW_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "SBW include directory" FORCE)
 endif()
-if (NOT EXISTS ${SBW_LIBRARIES})
-set (SBW_LIBRARIES ${COPASI_DEPENDENCY_DIR}/lib/SBW-static.lib CACHE FILEPATH "SBW library" FORCE)
+if (NOT EXISTS ${SBW_LIBRARY})
+set (SBW_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/SBW-static.lib CACHE FILEPATH "SBW library" FORCE)
+set (SBW_LIBRARIES ${SBW_LIBRARY};ws2_32.lib CACHE STRING "SBW libraries" FORCE)
 endif()

 # libsbml
@@ -124,7 +125,8 @@
 if (NOT EXISTS ${SBW_INCLUDE_DIR})
 set (SBW_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "SBW include directory" FORCE)
 endif()
-if (NOT EXISTS ${SBW_LIBRARIES})
+if (NOT EXISTS ${SBW_LIBRARY})
+set (SBW_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libSBW-static.a CACHE FILEPATH "SBW library" FORCE)
 set (SBW_LIBRARIES ${COPASI_DEPENDENCY_DIR}/lib/libSBW-static.a CACHE FILEPATH "SBW library" FORCE)
 endif()


Added check for CUDA toolkit version ( older can't compile Kepler )

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -13,7 +13,7 @@

   message(STATUS "CUDA detected: " ${CUDA_VERSION})

-  if("CUDA_VERSION_STRING" VERSION_GREATER "4.1")
+  if(${CUDA_VERSION_STRING} VERSION_GREATER "4.1")
     set(CUDA_ARCH_BIN "1.1 1.2 1.3 2.0 2.1(2.0) 3.0" CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
   else()
     set(CUDA_ARCH_BIN "1.1 1.2 1.3 2.0 2.1(2.0)" CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")


Added default compilation for Kepler

Added default compilation for Kepler

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -13,7 +13,7 @@

   message(STATUS "CUDA detected: " ${CUDA_VERSION})

-  set(CUDA_ARCH_BIN "1.1 1.2 1.3 2.0 2.1(2.0)" CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
+  set(CUDA_ARCH_BIN "1.1 1.2 1.3 2.0 2.1(2.0) 3.0" CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
   set(CUDA_ARCH_PTX "2.0" CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for")

   string(REGEX REPLACE "\\." "" ARCH_BIN_NO_POINTS "${CUDA_ARCH_BIN}")


build: use `LINKER_LANGUAGE` to control linking on Android

Rather than using `-nolibstd++` which is not supported by the android toolchain,
use CMake's `LINKER_LANGAUGE` property on the targets.  Since we explicitly link
against the C++ runtime anyways, this avoids the problem of having to remove the
C++ runtime from the link.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -463,9 +463,8 @@
     list(APPEND result "-Wl,-Bsymbolic")
   elseif("${LFLAGS_SDK}" STREQUAL "ANDROID")
     list(APPEND link_libraries "dl" "log" "atomic" "icudataswift" "icui18nswift" "icuucswift")
-    # We provide our own C++ below, so we ask the linker not to do it. However,
-    # we need to add the math library, which is linked implicitly by libc++.
-    list(APPEND result "-nostdlib++" "-lm")
+    # We need to add the math library, which is linked implicitly by libc++
+    list(APPEND result "-lm")
     if("${LFLAGS_ARCH}" MATCHES armv7)
       set(android_libcxx_path "${SWIFT_ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a")
     elseif("${LFLAGS_ARCH}" MATCHES aarch64)
@@ -1371,8 +1370,16 @@
         ${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
   endif()

-  set_property(TARGET "${target}" PROPERTY
+  # NOTE(compnerd) use the C linker language to invoke `clang` rather than
+  # `clang++` as we explicitly link against the C++ runtime.  We were previously
+  # actually passing `-nostdlib++` to avoid the C++ runtime linkage.
+  if(SWIFTLIB_SINGLE_SDK STREQUAL ANDROID)
+    set_property(TARGET "${target}" PROPERTY
+      LINKER_LANGUAGE "C")
+  else()
+    set_property(TARGET "${target}" PROPERTY
       LINKER_LANGUAGE "CXX")
+  endif()

   if(target_static)
     set_property(TARGET "${target_static}" APPEND_STRING PROPERTY


Add an AppleInternal path to framework search paths

watchOS XCTest was temporarily moved to an AppleInternal path,
so we need to add it to the framework search path to continue to
build the watchOS overlay.

rdar://problem/20883853

Swift SVN r28353

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -68,6 +68,7 @@
     list(APPEND result
         "-arch" "${arch}"
         "-F" "${SWIFT_SDK_${sdk}_PATH}/../../../Developer/Library/Frameworks"
+        "-F" "${SWIFT_SDK_${sdk}_PATH}/../../../Developer/AppleInternal/Library/Frameworks"
         "-m${SWIFT_SDK_${sdk}_VERSION_MIN_NAME}-version-min=${SWIFT_SDK_${sdk}_DEPLOYMENT_VERSION}")

     append_darwin_segalign_link_flags("${arch}" result)
@@ -125,7 +126,8 @@

   if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
     list(APPEND result
-        "-F" "${SWIFT_SDK_${sdk}_PATH}/../../../Developer/Library/Frameworks")
+        "-F" "${SWIFT_SDK_${sdk}_PATH}/../../../Developer/Library/Frameworks"
+        "-F" "${SWIFT_SDK_${sdk}_PATH}/../../../Developer/AppleInternal/Library/Frameworks")

     append_darwin_segalign_link_flags("${arch}" result)
   endif()


64 bit arm build fix

64 bit arm build fix

--- cmake/platform/android.cmake
+++ cmake/platform/android.cmake
@@ -60,7 +60,7 @@
     if(ABI MATCHES "armeabi")
         set(__toolchain_name "arm-linux-androideabi-clang")
     elseif(ABI MATCHES "arm64")
-        set(__toolchain_name "aarch64-linux-androideabi-clang")
+        set(__toolchain_name "aarch64-linux-android-clang")
     elseif(ABI MATCHES "x86_64")
         set(__toolchain_name "x86_64-clang")
     elseif(ABI MATCHES "x86")


Boost 1.47 required for CMake Check

Boost 1.47 required for CMake Check

--- source/ConfigureChecks.cmake
+++ source/ConfigureChecks.cmake
@@ -92,8 +92,8 @@
 FIND_PACKAGE(xml2 REQUIRED)
 FIND_PACKAGE(Threads REQUIRED)

-SET(Boost_ADDITIONAL_VERSIONS 1.40 1.40.0 1.39 1.39.0 1.38 1.38.0 1.37 1.37.0)
-FIND_PACKAGE(Boost 1.38 REQUIRED
+SET(Boost_ADDITIONAL_VERSIONS 1.47)
+FIND_PACKAGE(Boost 1.47 REQUIRED
   COMPONENTS
   system
   program_options


added dedicated target with manual tests only

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -19,7 +19,9 @@
   set(app but_${name}.manual)
   add_executable(${app} EXCLUDE_FROM_ALL ${src})
   target_link_libraries(${app} but)
-  list(APPEND TEST_TARGETS ${app})
+  list(APPEND TEST_TARGETS_MANUAL ${app})
+  list(APPEND TEST_TARGETS        ${app})
 endforeach()

+add_custom_target(but_manual    DEPENDS ${TEST_TARGETS_MANUAL})
 add_custom_target(but_tests_all DEPENDS ${TEST_TARGETS})


ctest: removed unused xcode ctest dashboard

--- cmake/xcode.cmake
+++ cmake/xcode.cmake
@@ -1,43 +0,0 @@
-cmake_minimum_required(VERSION 3.6)
-
-if("${CTEST_BUILD_NAME}" STREQUAL "")
-    set(CTEST_BUILD_NAME "${CTEST_BUILD_TYPE}")
-else()
-    set(CTEST_BUILD_NAME "${CTEST_BUILD_TYPE}/${CTEST_BUILD_NAME}")
-endif()
-
-set(CTEST_SOURCE_DIRECTORY ".")
-set(CTEST_BINARY_DIRECTORY "build")
-
-set(CTEST_CMAKE_GENERATOR "Xcode")
-
-set(CTEST_USE_LAUNCHERS 1)
-set(CTEST_MODEL "Continuous")
-
-ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
-
-ctest_start(${CTEST_MODEL} TRACK ${CTEST_MODEL})
-ctest_configure(BUILD ${CTEST_BINARY_DIRECTORY} RETURN_VALUE ret_con)
-ctest_build(BUILD ${CTEST_BINARY_DIRECTORY} RETURN_VALUE ret_bld)
-
-if(ret_bld EQUAL 0)
-    ctest_test(BUILD ${CTEST_BINARY_DIRECTORY} RETURN_VALUE ret_tst)
-endif()
-
-ctest_submit(RETURN_VALUE ret_sub)
-
-if(NOT ret_con EQUAL 0)
-    message(FATAL_ERROR "CI failing on config")
-endif()
-
-if(NOT ret_bld EQUAL 0)
-    message(FATAL_ERROR "CI failing on build")
-endif()
-
-if(NOT ret_tst EQUAL 0)
-    message(FATAL_ERROR "CI failing on tests")
-endif()
-
-if(NOT ret_sub EQUAL 0)
-    message(WARNING "Unable to submit results to CDash")
-endif()


Update toolchain file.

Update toolchain file.

--- cmake/gcc.cmake
+++ cmake/gcc.cmake
@@ -3,6 +3,6 @@

 SET(CMAKE_C_COMPILER gcc)
 SET(CMAKE_CXX_COMPILER g++)
-SET(CMAKE_AR gcc-ar)
-SET(CMAKE_RANLIB gcc-ranlib)
+SET(CMAKE_AR gcc-ar CACHE FILEPATH "Archiver")
+SET(CMAKE_RANLIB gcc-ranlib CACHE FILEPATH "Ranlib")


windows compatibility

windows compatibility

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -28,9 +28,11 @@

 if (WIN32 AND NOT MINGW)
-    set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "\"$<TARGET_OBJECTS:secp256k1>\" \"$<TARGET_OBJECTS:scrypt>\" \"$<TARGET_OBJECTS:ethcrypto-core>\"")
+#    set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "\"$<TARGET_OBJECTS:secp256k1>\" \"$<TARGET_OBJECTS:scrypt>\" \"$<TARGET_OBJECTS:ethcrypto-core>\"")
+    set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "\"${CMAKE_CURRENT_BINARY_DIR}\\lib.obj\\secp256k1.lib\" \"${CMAKE_CURRENT_BINARY_DIR}\\lib.obj\\scrypt.lib\" \"${CMAKE_CURRENT_BINARY_DIR}\\lib.obj\\ethcrypto-core.lib\"")
 elseif (${CMAKE_GENERATOR} STREQUAL "Xcode")
-    set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "$<TARGET_OBJECTS:secp256k1> $<TARGET_OBJECTS:scrypt> $<TARGET_OBJECTS:ethcrypto-core>")
+#    set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "$<TARGET_OBJECTS:secp256k1> $<TARGET_OBJECTS:scrypt> $<TARGET_OBJECTS:ethcrypto-core>")
+    set_property (TARGET ethcrypto APPEND PROPERTY STATIC_LIBRARY_FLAGS "${CMAKE_CURRENT_BINARY_DIR}/lib.obj/secp256k1.a ${CMAKE_CURRENT_BINARY_DIR}/lib.obj/libscrypt.a ${CMAKE_CURRENT_BINARY_DIR}/lib.obj/ethcrypto-core.a")
 else()
     set(LIB_OBJ_DIR ${CMAKE_CURRENT_BINARY_DIR}/lib.obj/obj)
     make_directory (${LIB_OBJ_DIR})


fix: Setting of DEPENDS_<Pkg>_DIR from <Pkg>_DIR [BASIS]

--- CMake/Basis/CommonTools.cmake
+++ CMake/Basis/CommonTools.cmake
@@ -137,14 +137,15 @@
       endif ()
     endif ()
     string (REGEX REPLACE "/+(cmake|CMake)/*$" "" prefix "${PKG_DIR}")
-    if (UNIX)
+    set (SUBDIR_RE "/+(lib[0-9]*(/[^/]+)?|share)(/+cmake)?")
+    if (UNIX AND prefix MATCHES "${SUBDIR_RE}(/+[^/]+|/*$)")
       get_filename_component (subdir "${prefix}" NAME)
       string (TOLOWER "${subdir}" subdir)
       string (TOLOWER "${PKG}"    pkg)
       if ("^${subdir}$" STREQUAL "^${pkg}$")
         get_filename_component (prefix "${prefix}" PATH)
       endif ()
-      string(REGEX REPLACE "/+(lib(/[^/]+)?|share)(/+cmake)?/*$" "" prefix "${prefix}")
+      string(REGEX REPLACE "${SUBDIR_RE}/*$" "" prefix "${prefix}")
     endif ()
   else ()
     set(prefix "NOTFOUND")


Set default to don't align eigen types

Set default to don't align eigen types

Since alignment doesn't appear to be working on all platfroms (VS2012
and VS2013) this changes the default setting to be not aligned. To
enable alignment, simply change the EIGEN3_DONT_ALIGN to off in cmake
for the performance improvement.

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -123,7 +123,7 @@
 	add_definitions( -D_POSIX_C_SOURCE=200809L )  # request POSIX APIs
 endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

-option(EIGEN3_DONT_ALIGN "Disable alignment of vectors in Eigen " OFF)
+option(EIGEN3_DONT_ALIGN "Disable alignment of vectors in Eigen " ON)
 mark_as_advanced(EIGEN3_DONT_ALIGN)
 if(EIGEN3_DONT_ALIGN)
 	add_definitions( -DEIGEN_DONT_ALIGN )


Started calling gen*py scripts with --noinitpy and --initpy options, to separate out the generation of __init__.py, making it the last step.  The individual file parsing is now allowed to happen in parallel. #1827.

--- core/rospy/cmake/rospy.cmake
+++ core/rospy/cmake/rospy.cmake
@@ -3,10 +3,13 @@
 # Message-generation support.
 macro(genmsg_py)
   rosbuild_get_msgs(_msglist)
+  set(_inlist "")
   set(_autogen "")
   foreach(_msg ${_msglist})
     # Construct the path to the .msg file
     set(_input ${PROJECT_SOURCE_DIR}/msg/${_msg})
+    # Append it to a list, which we'll pass back to gensrv below
+    list(APPEND _inlist ${_input})

     rosbuild_gendeps(${PROJECT_NAME} ${_msg})

@@ -15,21 +18,23 @@
     set(_output_py ${PROJECT_SOURCE_DIR}/src/${PROJECT_NAME}/msg/_${_msg})
     string(REPLACE ".msg" ".py" _output_py ${_output_py})

-    # Add the rule to build the .h the .msg.
-    #
-    # Note the dependency on ${_autogen}.  This is done to force serial
-    # execution of the message-generation steps, because genmsg_py is not
-    # parallel-safe.  When that's fixed
-    # (https://code.ros.org/trac/ros/ticket/1827), this dependency  can be
-    # removed.
+    # Add the rule to build the .py from the .msg.
     add_custom_command(OUTPUT ${_output_py}
-                       COMMAND ${genmsg_py_exe} ${_input}
-                       DEPENDS ${_input} ${genmsg_py_exe} ${gendeps_exe} ${${PROJECT_NAME}_${_msg}_GENDEPS} ${ROS_MANIFEST_LIST} ${_autogen})
+                       COMMAND ${genmsg_py_exe} --noinitpy ${_input}
+                       DEPENDS ${_input} ${genmsg_py_exe} ${gendeps_exe} ${${PROJECT_NAME}_${_msg}_GENDEPS} ${ROS_MANIFEST_LIST})
     list(APPEND _autogen ${_output_py})
   endforeach(_msg)
-  # Create a target that depends on the union of all the autogenerated
-  # files
-  add_custom_target(ROSBUILD_genmsg_py DEPENDS ${_autogen})
+
+  # Set up to create the __init__.py file that will import the .py
+  # files created by the above loop.  It can't run until those files are
+  # generated, so it depends on them.
+  set(_output_py ${PROJECT_SOURCE_DIR}/src/${PROJECT_NAME}/msg/__init__.py)
+  add_custom_command(OUTPUT ${_output_py}
+                     COMMAND ${genmsg_py_exe} --initpy ${_inlist}
+                     DEPENDS ${_autogen})
+
+  # A target that depends on generation of the __init__.py
+  add_custom_target(ROSBUILD_genmsg_py DEPENDS ${_output_py})
   # Add our target to the top-level genmsg target, which will be fired if
   # the user calls genmsg()
   add_dependencies(rospack_genmsg ROSBUILD_genmsg_py)
@@ -41,10 +46,13 @@
 # Service-generation support.
 macro(gensrv_py)
   rosbuild_get_srvs(_srvlist)
+  set(_inlist "")
   set(_autogen "")
   foreach(_srv ${_srvlist})
     # Construct the path to the .srv file
     set(_input ${PROJECT_SOURCE_DIR}/srv/${_srv})
+    # Append it to a list, which we'll pass back to gensrv below
+    list(APPEND _inlist ${_input})

     rosbuild_gendeps(${PROJECT_NAME} ${_srv})

@@ -53,21 +61,23 @@
     set(_output_py ${PROJECT_SOURCE_DIR}/src/${PROJECT_NAME}/srv/_${_srv})
     string(REPLACE ".srv" ".py" _output_py ${_output_py})

-    # Add the rule to build the .h from the .srv
-    #
-    # Note the dependency on ${_autogen}.  This is done to force serial
-    # execution of the service-generation steps, because genmsg_py is not
-    # parallel-safe.  When that's fixed
-    # (https://code.ros.org/trac/ros/ticket/1827), this dependency  can be
-    # removed.
+    # Add the rule to build the .py from the .srv
     add_custom_command(OUTPUT ${_output_py}
-                       COMMAND ${gensrv_py_exe} ${_input}
-                       DEPENDS ${_input} ${gensrv_py_exe} ${gendeps_exe} ${${PROJECT_NAME}_${_srv}_GENDEPS} ${ROS_MANIFEST_LIST} ${_autogen})
+                       COMMAND ${gensrv_py_exe} --noinitpy ${_input}
+                       DEPENDS ${_input} ${gensrv_py_exe} ${gendeps_exe} ${${PROJECT_NAME}_${_srv}_GENDEPS} ${ROS_MANIFEST_LIST})
     list(APPEND _autogen ${_output_py})
   endforeach(_srv)
-  # Create a target that depends on the union of all the autogenerated
-  # files
-  add_custom_target(ROSBUILD_gensrv_py DEPENDS ${_autogen})
+
+  # Set up to create the __init__.py file that will import the .py
+  # files created by the above loop.  It can't run until those files are
+  # generated, so it depends on them.
+  set(_output_py ${PROJECT_SOURCE_DIR}/src/${PROJECT_NAME}/srv/__init__.py)
+  add_custom_command(OUTPUT ${_output_py}
+                     COMMAND ${gensrv_py_exe} --initpy ${_inlist}
+                     DEPENDS ${_autogen})
+
+  # A target that depends on generation of the __init__.py
+  add_custom_target(ROSBUILD_gensrv_py DEPENDS ${_output_py})
   # Add our target to the top-level gensrv target, which will be fired if
   # the user calls gensrv()
   add_dependencies(rospack_gensrv ROSBUILD_gensrv_py)


Semihosting lib

Semihosting lib

--- STM32F303xC.cmake
+++ STM32F303xC.cmake
@@ -8,7 +8,7 @@

 SET(LINKER_SCRIPT ${CMAKE_SOURCE_DIR}/STM32F303VCTx_FLASH.ld)

-SET(COMMON_FLAGS "-g -mlittle-endian -mthumb -mcpu=cortex-m4 -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffreestanding --specs=nano.specs  --specs=nosys.specs")
+SET(COMMON_FLAGS "-g -mlittle-endian -mthumb -mcpu=cortex-m4 -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffreestanding --specs=nano.specs  --specs=nosys.specs --specs=rdimon.specs")
 #SET(COMMON_FLAGS "-mcpu=cortex-m0 -mthumb -mfloat-abi=soft -ffunction-sections -fdata-sections -g -fno-common -fmessage-length=0 --specs=nano.specs  --specs=nosys.specs ")
 SET(CMAKE_CXX_FLAGS "${COMMON_FLAGS} -std=c++11")
 SET(CMAKE_C_FLAGS "${COMMON_FLAGS} -std=gnu99")


Doxygen: Remove redundant qcollectiongenerator

--- tools/doxygen/doxygen.cmake
+++ tools/doxygen/doxygen.cmake
@@ -284,7 +284,6 @@
         GENERATE_QHP
     )

-    find_program(IVW_DOXY_QCOLLECTIONGENERATOR "qcollectiongenerator")
     find_program(IVW_DOXY_QHELPGENERATOR "qhelpgenerator")

     add_custom_target("DOXY-HELP-${HARG_NAME}"


#51 Don't use BAT files when not building with VS

--- Shell.cmake
+++ Shell.cmake
@@ -8,7 +8,7 @@
 	endif()

-	if (WINDOWS)
+	if (MSVC)
 		add_custom_target(${customTargetName} ALL DEPENDS ${THIS_OUTPUT})
 		add_custom_command(OUTPUT ${THIS_OUTPUT}
 					COMMAND BatchBridgeToShell ARGS ${MINGW_DIR} ${THIS_COMMAND}


cmake: use STREQUAL to compare strings

cmake: use STREQUAL to compare strings

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

--- cmake/hg.cmake
+++ cmake/hg.cmake
@@ -44,7 +44,7 @@
 gethgrev(VERSION
 	"{ifeq(latesttagdistance,0,\"{latesttag}\",\"{latesttag}-{latesttagdistance}-{node|short}\")}")

-if(${HG_COMMIT} EQUAL "unknown")
+if(${HG_COMMIT} STREQUAL "unknown")
 	message(WARNING "Failed to get revision info from Mercurial.")
 endif()


--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -625,6 +625,25 @@
 	list (REMOVE_DUPLICATES _systemIncludeDirs)
 	if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES)
 		list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES})
+	endif()
+	if (WIN32)
+		# convert Windows paths in include directories to CMake paths
+		if (_includeDirs)
+			set (_paths "")
+			foreach (_dir ${_includeDirs})
+				file (TO_CMAKE_PATH "${_dir}" _path)
+				list (APPEND _paths "${_path}")
+			endforeach()
+			set (_includeDirs ${_paths})
+		endif()
+		if (_systemIncludeDirs)
+			set (_paths "")
+			foreach (_dir ${_systemIncludeDirs})
+				file (TO_CMAKE_PATH "${_dir}" _path)
+				list (APPEND _paths "${_path}")
+			endforeach()
+			set (_systemIncludeDirs ${_paths})
+		endif()
 	endif()
 	if (COTIRE_DEBUG AND _includeDirs)
 		message (STATUS "Target ${_target} include dirs: ${_includeDirs}")


cmake: define Ruby scripts path related macros

--- config.h.cmake
+++ config.h.cmake
@@ -37,6 +37,10 @@

 #define GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE "${GRN_QUERY_EXPANDER_TSV_RELATIVE_SYNONYMS_FILE}"
 #define GRN_QUERY_EXPANDER_TSV_SYNONYMS_FILE          "${GRN_QUERY_EXPANDER_TSV_SYNONYMS_FILE}"
+
+#define GRN_RELATIVE_RUBY_SCRIPTS_DIR \
+  "${GRN_RELATIVE_RUBY_SCRIPTS_DIR}"
+#define GRN_RUBY_SCRIPTS_DIR "${GRN_RUBY_SCRIPTS_DIR}"

 #define GRN_DLL_FILENAME     L"${GRN_DLL_FILENAME}"


Properly display name of project with dependency found on the system.

Fix type introduced by commit 74d440c5.

See #418

--- CMake/ctkMacroCheckExternalProjectDependency.cmake
+++ CMake/ctkMacroCheckExternalProjectDependency.cmake
@@ -495,7 +495,7 @@
   if(NOT "${${proj}_DEPENDENCIES}" STREQUAL "")
     set(_msg "${proj}[OK]")
     if(${SUPERBUILD_TOPLEVEL_PROJECT}_USE_SYSTEM_${proj})
-      set(_msg "${_ok_message} (SYSTEM)")
+      set(_msg "${_msg} (SYSTEM)")
     endif()
     superbuild_message(${proj} ${_msg})
   endif()


Add python version to find for Ubuntu 16.04

--- ChoosePython.cmake
+++ ChoosePython.cmake
@@ -53,7 +53,7 @@
   # Finding Boost first if needed because if the Python3 interpreter is found
   # first there's no way back.
   if(NOT CHOOSE_PYTHON_IGNORE_BOOST)
-    foreach(__suffix 3 -py34 -py33 -py32)
+    foreach(__suffix 3  -py39 -py38 -py37 -py36 -py35 -py34 -py34 -py33 -py32)
       find_package(Boost COMPONENTS python${__suffix} QUIET)
       if(Boost_FOUND)
         string(TOUPPER  ${__suffix} __boost_python_library_suffix)
@@ -76,8 +76,8 @@
   set(USE_PYTHON3 ON)
   # Enforcing a Python version to be searched by scripts included by
   # Common.cmake that search for Python (e.g. cpplint)
-  set(PYTHON_ADDITIONAL_VERSIONS 3.4 3.3 3.2)
-  set(Python_ADDITIONAL_VERSIONS 3.4 3.3 3.2)
+  set(PYTHON_ADDITIONAL_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2)
+  set(Python_ADDITIONAL_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2)
   set(PythonLibs_FIND_VERSION 3)
   set(PythonInterp_FIND_VERSION 3)
   add_definitions(-DUSE_PYTHON3=1)


cmake: moving tile import cmake files near other tile import definitions

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

--- xc7/make/project_xray.cmake
+++ xc7/make/project_xray.cmake
@@ -44,176 +44,6 @@

   add_file_target(FILE ${SITE}.pb_type.xml GENERATED)
   add_file_target(FILE ${SITE}.model.xml GENERATED)
-endfunction()
-
-function(PROJECT_XRAY_TILE)
-  #
-  # This function is used to create targets to generate pb_type, model and tile XML definitions.
-  #
-  # ARCH name of the arch that is considered (e.g. artix7, zynq7, etc.)
-  # TILE name of the tile that has to be generated (e.g. CLBLM_R, BRAM_L, etc.)
-  # SITE_TYPES list of sites contained in the considered tile (e.g. CLBLM_R contains a SLICEM and SLICEL sites)
-  # EQUIVALENT_TILES list of pb_types that can be placed at the tile's location (e.g. SLICEM tile can have both SLICEM and SLICEL pb_types)
-  # SITE_AS_TILE option to state if the tile physically is a site, but it needs to be treated as a site
-  # USE_DATABASE option enables usage of connection database for tile
-  #     definition, instead of using the project X-Ray database.
-  # FILTER_X can be supplied to filter to sites that have the given X
-  #     coordinate.
-  #
-  # Usage:
-  # ~~~
-  # project_xray_tile(
-  #   ARCH <arch_name>
-  #   TILE <tile_name>
-  #   SITE_TYPES <site_name_1> <site_name_2> ...
-  #   EQUIVALENT_SITES <equivalent_site_name_1> <equivalent_site_name_2> ...
-  #   SITE_AS_TILE (option)
-  #   FUSED_SITES (option)
-  #   USE_DATABASE (option)
-  #   SITE_COORDS (option)
-  #   NO_FASM_PREFIX (option)
-  #   [FILTER_X <x_coord>]
-  #   )
-  # ~~~
-
-  set(options FUSED_SITES SITE_AS_TILE USE_DATABASE NO_FASM_PREFIX)
-  set(oneValueArgs ARCH TILE FILTER_X SITE_COORDS)
-  set(multiValueArgs SITE_TYPES EQUIVALENT_SITES)
-  cmake_parse_arguments(
-    PROJECT_XRAY_TILE
-    "${options}"
-    "${oneValueArgs}"
-    "${multiValueArgs}"
-    ${ARGN}
-  )
-
-  string(TOLOWER ${PROJECT_XRAY_TILE_TILE} TILE)
-
-  get_target_property_required(PYTHON3 env PYTHON3)
-  get_target_property(PYTHON3_TARGET env PYTHON3_TARGET)
-
-  set(ARCH ${PROJECT_XRAY_TILE_ARCH})
-  get_target_property(PROTOTYPE_PART ${ARCH} PROTOTYPE_PART)
-
-  set(TILE_IMPORT ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_tile_import.py)
-  get_project_xray_dependencies(DEPS ${ARCH} ${TILE})
-
-  set(PB_TYPE_INCLUDE_FILES "")
-  set(MODEL_INCLUDE_FILES "")
-  foreach(SITE_TYPE ${PROJECT_XRAY_TILE_SITE_TYPES})
-    string(TOLOWER ${SITE_TYPE} SITE_TYPE_LOWER)
-    append_file_dependency(DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/primitives/${SITE_TYPE_LOWER}.pb_type.xml)
-    append_file_dependency(DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/primitives/${SITE_TYPE_LOWER}.model.xml)
-    list(APPEND PB_TYPE_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/primitives/${SITE_TYPE_LOWER}.pb_type.xml)
-    list(APPEND MODEL_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/primitives/${SITE_TYPE_LOWER}.model.xml)
-  endforeach()
-  string(REPLACE ";" "," SITE_TYPES_COMMA "${PROJECT_XRAY_TILE_SITE_TYPES}")
-
-  append_file_dependency(DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/pin_assignments.json)
-  get_file_location(PIN_ASSIGNMENTS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/pin_assignments.json)
-
-  set(FUSED_SITES_ARGS "")
-  if(PROJECT_XRAY_TILE_FUSED_SITES)
-      set(FUSED_SITES_ARGS "--fused_sites")
-  endif()
-  if(PROJECT_XRAY_TILE_SITE_AS_TILE)
-      set(FUSED_SITES_ARGS "--site_as_tile")
-  endif()
-  if(PROJECT_XRAY_TILE_USE_DATABASE)
-      set(GENERIC_CHANNELS
-        ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/channels/${PROTOTYPE_PART}/channels.db)
-      get_file_location(GENERIC_CHANNELS_LOCATION ${GENERIC_CHANNELS})
-      append_file_dependency(DEPS ${GENERIC_CHANNELS})
-      set(FUSED_SITES_ARGS --connection_database ${GENERIC_CHANNELS_LOCATION})
-  endif()
-
-  set(SITE_COORDS_ARGS "")
-  if(NOT "${PROJECT_XRAY_TILE_SITE_COORDS}" STREQUAL "")
-    set(SITE_COORDS_ARGS "--site_coords" ${PROJECT_XRAY_TILE_SITE_COORDS})
-  endif()
-
-  set(FILTER_X_ARGS "")
-  if(NOT "${PROJECT_XRAY_TILE_FILTER_X}" STREQUAL "")
-      set(FILTER_X_ARGS --filter_x ${PROJECT_XRAY_TILE_FILTER_X})
-  endif()
-
-  set(FASM_ARGS "")
-  if(PROJECT_XRAY_TILE_NO_FASM_PREFIX)
-    set(FASM_ARGS "--no_fasm_prefix")
-  endif()
-
-  string(TOUPPER ${TILE} TILE_UPPER)
-
-  add_custom_command(
-    OUTPUT ${TILE}.pb_type.xml ${TILE}.model.xml
-    COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${PRJXRAY_DIR}:${symbiflow-arch-defs_SOURCE_DIR}/utils
-    ${PYTHON3} ${TILE_IMPORT}
-    --db_root ${PRJXRAY_DB_DIR}/${ARCH}/
-    --part ${PROTOTYPE_PART}
-    --tile ${TILE_UPPER}
-    --site_directory ${symbiflow-arch-defs_BINARY_DIR}/xc7/primitives
-    --site_types ${SITE_TYPES_COMMA}
-    --pin_assignments ${PIN_ASSIGNMENTS}
-    --output-pb-type ${CMAKE_CURRENT_BINARY_DIR}/${TILE}.pb_type.xml
-    --output-model ${CMAKE_CURRENT_BINARY_DIR}/${TILE}.model.xml
-    ${FUSED_SITES_ARGS}
-    ${SITE_COORDS_ARGS}
-    ${FASM_ARGS}
-    ${FILTER_X_ARGS}
-    DEPENDS
-    ${TILE_IMPORT}
-      ${DEPS}
-      ${PYTHON3} ${PYTHON3_TARGET} simplejson
-    )
-
-  add_file_target(FILE ${TILE}.pb_type.xml GENERATED)
-  get_file_target(PB_TYPE_TARGET ${TILE}.pb_type.xml)
-  set_target_properties(${PB_TYPE_TARGET} PROPERTIES INCLUDE_FILES "${PB_TYPE_INCLUDE_FILES}")
-
-  get_file_target(MODEL_TARGET ${TILE}.model.xml)
-  add_custom_target(${MODEL_TARGET})
-
-  # Linearize the dependency to prevent double builds.
-  add_dependencies(${MODEL_TARGET} ${PB_TYPE_TARGET})
-  set_target_properties(${MODEL_TARGET} PROPERTIES
-      INCLUDE_FILES "${MODEL_INCLUDE_FILES}"
-      LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${TILE}.model.xml
-      )
-
-  # tile tags
-  set(PHYSICAL_TILE_IMPORT ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_physical_tile_import.py)
-  get_project_xray_dependencies(DEPS ${ARCH} ${TILE})
-
-  foreach(EQUIVALENT_SITE ${PROJECT_XRAY_TILE_EQUIVALENT_SITES})
-    string(TOLOWER ${EQUIVALENT_SITE} EQUIVALENT_SITE_LOWER)
-    append_file_dependency(TILES_DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/tiles/${EQUIVALENT_SITE_LOWER}/${EQUIVALENT_SITE_LOWER}.pb_type.xml)
-    list(APPEND EQUIVALENT_SITES_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/tiles/${EQUIVALENT_SITE_LOWER}/${EQUIVALENT_SITE_LOWER}.pb_type.xml)
-  endforeach()
-  append_file_dependency(TILES_DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/tiles/${TILE}/${TILE}.pb_type.xml)
-  list(APPEND EQUIVALENT_SITES_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/tiles/${TILE}/${TILE}.pb_type.xml)
-
-  string(REPLACE ";" "," EQUIVALENT_SITES_COMMA "${PROJECT_XRAY_TILE_EQUIVALENT_SITES}")
-
-  add_custom_command(
-    OUTPUT ${TILE}.tile.xml
-    COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${PRJXRAY_DIR}:${symbiflow-arch-defs_SOURCE_DIR}/utils
-    ${PYTHON3} ${PHYSICAL_TILE_IMPORT}
-    --arch ${ARCH}
-    --tile ${TILE_UPPER}
-    --tiles-directory ${symbiflow-arch-defs_BINARY_DIR}/xc7/archs/${ARCH}/tiles
-    --equivalent-sites=${EQUIVALENT_SITES_COMMA}
-    --pin-prefix=${PIN_PREFIX_COMMA}
-    --output-tile ${CMAKE_CURRENT_BINARY_DIR}/${TILE}.tile.xml
-    --pin_assignments ${PIN_ASSIGNMENTS}
-    DEPENDS
-    ${PHYSICAL_TILE_IMPORT}
-      ${TILES_DEPS}
-      ${PYTHON3} ${PYTHON3_TARGET} simplejson
-    )
-
-  add_file_target(FILE ${TILE}.tile.xml GENERATED)
-  get_file_target(TILE_TARGET ${TILE}.tile.xml)
-  set_target_properties(${TILE_TARGET} PROPERTIES INCLUDE_FILES "${EQUIVALENT_SITES_INCLUDE_FILES}")
 endfunction()

 function(PROJECT_XRAY_ARCH)
@@ -433,6 +263,175 @@
   add_file_target(FILE ${PIN_ASSIGNMENTS} GENERATED)
 endfunction()

+function(PROJECT_XRAY_TILE)
+  #
+  # This function is used to create targets to generate pb_type, model and tile XML definitions.
+  #
+  # ARCH name of the arch that is considered (e.g. artix7, zynq7, etc.)
+  # TILE name of the tile that has to be generated (e.g. CLBLM_R, BRAM_L, etc.)
+  # SITE_TYPES list of sites contained in the considered tile (e.g. CLBLM_R contains a SLICEM and SLICEL sites)
+  # EQUIVALENT_TILES list of pb_types that can be placed at the tile's location (e.g. SLICEM tile can have both SLICEM and SLICEL pb_types)
+  # SITE_AS_TILE option to state if the tile physically is a site, but it needs to be treated as a site
+  # USE_DATABASE option enables usage of connection database for tile
+  #     definition, instead of using the project X-Ray database.
+  # FILTER_X can be supplied to filter to sites that have the given X
+  #     coordinate.
+  #
+  # Usage:
+  # ~~~
+  # project_xray_tile(
+  #   ARCH <arch_name>
+  #   TILE <tile_name>
+  #   SITE_TYPES <site_name_1> <site_name_2> ...
+  #   EQUIVALENT_SITES <equivalent_site_name_1> <equivalent_site_name_2> ...
+  #   SITE_AS_TILE (option)
+  #   FUSED_SITES (option)
+  #   USE_DATABASE (option)
+  #   SITE_COORDS (option)
+  #   NO_FASM_PREFIX (option)
+  #   [FILTER_X <x_coord>]
+  #   )
+  # ~~~
+
+  set(options FUSED_SITES SITE_AS_TILE USE_DATABASE NO_FASM_PREFIX)
+  set(oneValueArgs ARCH TILE FILTER_X SITE_COORDS)
+  set(multiValueArgs SITE_TYPES EQUIVALENT_SITES)
+  cmake_parse_arguments(
+    PROJECT_XRAY_TILE
+    "${options}"
+    "${oneValueArgs}"
+    "${multiValueArgs}"
+    ${ARGN}
+  )
+
+  string(TOLOWER ${PROJECT_XRAY_TILE_TILE} TILE)
+
+  get_target_property_required(PYTHON3 env PYTHON3)
+  get_target_property(PYTHON3_TARGET env PYTHON3_TARGET)
+
+  set(ARCH ${PROJECT_XRAY_TILE_ARCH})
+  get_target_property(PROTOTYPE_PART ${ARCH} PROTOTYPE_PART)
+
+  set(TILE_IMPORT ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_tile_import.py)
+  get_project_xray_dependencies(DEPS ${ARCH} ${TILE})
+
+  set(PB_TYPE_INCLUDE_FILES "")
+  set(MODEL_INCLUDE_FILES "")
+  foreach(SITE_TYPE ${PROJECT_XRAY_TILE_SITE_TYPES})
+    string(TOLOWER ${SITE_TYPE} SITE_TYPE_LOWER)
+    append_file_dependency(DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/primitives/${SITE_TYPE_LOWER}.pb_type.xml)
+    append_file_dependency(DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/primitives/${SITE_TYPE_LOWER}.model.xml)
+    list(APPEND PB_TYPE_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/primitives/${SITE_TYPE_LOWER}.pb_type.xml)
+    list(APPEND MODEL_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/primitives/${SITE_TYPE_LOWER}.model.xml)
+  endforeach()
+  string(REPLACE ";" "," SITE_TYPES_COMMA "${PROJECT_XRAY_TILE_SITE_TYPES}")
+
+  append_file_dependency(DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/pin_assignments.json)
+  get_file_location(PIN_ASSIGNMENTS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/pin_assignments.json)
+
+  set(FUSED_SITES_ARGS "")
+  if(PROJECT_XRAY_TILE_FUSED_SITES)
+      set(FUSED_SITES_ARGS "--fused_sites")
+  endif()
+  if(PROJECT_XRAY_TILE_SITE_AS_TILE)
+      set(FUSED_SITES_ARGS "--site_as_tile")
+  endif()
+  if(PROJECT_XRAY_TILE_USE_DATABASE)
+      set(GENERIC_CHANNELS
+        ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/channels/${PROTOTYPE_PART}/channels.db)
+      get_file_location(GENERIC_CHANNELS_LOCATION ${GENERIC_CHANNELS})
+      append_file_dependency(DEPS ${GENERIC_CHANNELS})
+      set(FUSED_SITES_ARGS --connection_database ${GENERIC_CHANNELS_LOCATION})
+  endif()
+
+  set(SITE_COORDS_ARGS "")
+  if(NOT "${PROJECT_XRAY_TILE_SITE_COORDS}" STREQUAL "")
+    set(SITE_COORDS_ARGS "--site_coords" ${PROJECT_XRAY_TILE_SITE_COORDS})
+  endif()
+
+  set(FILTER_X_ARGS "")
+  if(NOT "${PROJECT_XRAY_TILE_FILTER_X}" STREQUAL "")
+      set(FILTER_X_ARGS --filter_x ${PROJECT_XRAY_TILE_FILTER_X})
+  endif()
+
+  set(FASM_ARGS "")
+  if(PROJECT_XRAY_TILE_NO_FASM_PREFIX)
+    set(FASM_ARGS "--no_fasm_prefix")
+  endif()
+
+  string(TOUPPER ${TILE} TILE_UPPER)
+
+  add_custom_command(
+    OUTPUT ${TILE}.pb_type.xml ${TILE}.model.xml
+    COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${PRJXRAY_DIR}:${symbiflow-arch-defs_SOURCE_DIR}/utils
+    ${PYTHON3} ${TILE_IMPORT}
+    --db_root ${PRJXRAY_DB_DIR}/${ARCH}/
+    --part ${PROTOTYPE_PART}
+    --tile ${TILE_UPPER}
+    --site_directory ${symbiflow-arch-defs_BINARY_DIR}/xc7/primitives
+    --site_types ${SITE_TYPES_COMMA}
+    --pin_assignments ${PIN_ASSIGNMENTS}
+    --output-pb-type ${CMAKE_CURRENT_BINARY_DIR}/${TILE}.pb_type.xml
+    --output-model ${CMAKE_CURRENT_BINARY_DIR}/${TILE}.model.xml
+    ${FUSED_SITES_ARGS}
+    ${SITE_COORDS_ARGS}
+    ${FASM_ARGS}
+    ${FILTER_X_ARGS}
+    DEPENDS
+    ${TILE_IMPORT}
+      ${DEPS}
+      ${PYTHON3} ${PYTHON3_TARGET} simplejson
+    )
+
+  add_file_target(FILE ${TILE}.pb_type.xml GENERATED)
+  get_file_target(PB_TYPE_TARGET ${TILE}.pb_type.xml)
+  set_target_properties(${PB_TYPE_TARGET} PROPERTIES INCLUDE_FILES "${PB_TYPE_INCLUDE_FILES}")
+
+  get_file_target(MODEL_TARGET ${TILE}.model.xml)
+  add_custom_target(${MODEL_TARGET})
+
+  # Linearize the dependency to prevent double builds.
+  add_dependencies(${MODEL_TARGET} ${PB_TYPE_TARGET})
+  set_target_properties(${MODEL_TARGET} PROPERTIES
+      INCLUDE_FILES "${MODEL_INCLUDE_FILES}"
+      LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${TILE}.model.xml
+      )
+
+  # tile tags
+  set(PHYSICAL_TILE_IMPORT ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_physical_tile_import.py)
+  get_project_xray_dependencies(DEPS ${ARCH} ${TILE})
+
+  foreach(EQUIVALENT_SITE ${PROJECT_XRAY_TILE_EQUIVALENT_SITES})
+    string(TOLOWER ${EQUIVALENT_SITE} EQUIVALENT_SITE_LOWER)
+    append_file_dependency(TILES_DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/tiles/${EQUIVALENT_SITE_LOWER}/${EQUIVALENT_SITE_LOWER}.pb_type.xml)
+    list(APPEND EQUIVALENT_SITES_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/tiles/${EQUIVALENT_SITE_LOWER}/${EQUIVALENT_SITE_LOWER}.pb_type.xml)
+  endforeach()
+  append_file_dependency(TILES_DEPS ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/tiles/${TILE}/${TILE}.pb_type.xml)
+  list(APPEND EQUIVALENT_SITES_INCLUDE_FILES ${symbiflow-arch-defs_SOURCE_DIR}/xc7/archs/${ARCH}/tiles/${TILE}/${TILE}.pb_type.xml)
+
+  string(REPLACE ";" "," EQUIVALENT_SITES_COMMA "${PROJECT_XRAY_TILE_EQUIVALENT_SITES}")
+
+  add_custom_command(
+    OUTPUT ${TILE}.tile.xml
+    COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${PRJXRAY_DIR}:${symbiflow-arch-defs_SOURCE_DIR}/utils
+    ${PYTHON3} ${PHYSICAL_TILE_IMPORT}
+    --tile ${TILE_UPPER}
+    --tiles-directory ${symbiflow-arch-defs_BINARY_DIR}/xc7/archs/${ARCH}/tiles
+    --equivalent-sites=${EQUIVALENT_SITES_COMMA}
+    --pin-prefix=${PIN_PREFIX_COMMA}
+    --output-tile ${CMAKE_CURRENT_BINARY_DIR}/${TILE}.tile.xml
+    --pin_assignments ${PIN_ASSIGNMENTS}
+    DEPENDS
+    ${PHYSICAL_TILE_IMPORT}
+      ${TILES_DEPS}
+      ${PYTHON3} ${PYTHON3_TARGET} simplejson
+    )
+
+  add_file_target(FILE ${TILE}.tile.xml GENERATED)
+  get_file_target(TILE_TARGET ${TILE}.tile.xml)
+  set_target_properties(${TILE_TARGET} PROPERTIES INCLUDE_FILES "${EQUIVALENT_SITES_INCLUDE_FILES}")
+endfunction()
+
 function(PROJECT_XRAY_EQUIV_TILE)
   #
   # This function is used to create targets to generate pb_type, model and


Fix the cmake file for linking sfml

Fix the cmake file for linking sfml

--- SFML-2.3.2/share/SFML/cmake/Modules/FindSFML.cmake
+++ SFML-2.3.2/share/SFML/cmake/Modules/FindSFML.cmake
@@ -98,7 +98,7 @@
     math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10000 + ${SFML_FIND_VERSION_MINOR} * 100 + ${SFML_FIND_VERSION_PATCH}")

     # if we could extract them, compare with the requested version number
-    if (SFML_VERSION_MAJOR AND SFML_VERSION_MINOR AND SFML_VERSION_PATCH)
+    if (SFML_VERSION_MAJOR)
         # transform version numbers to an integer
         math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10000 + ${SFML_VERSION_MINOR} * 100 + ${SFML_VERSION_PATCH}")


Test travisci windows build workaround. (4)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -12,13 +12,16 @@
     message(FATAL_ERROR "Not a CI server.")
 endif()

+if(DEFINED ENV{CC})
+    find_program(CC_FOUND NAMES $ENV{CC})
+    if(NOT CC_FOUND)
+        message( FATAL_ERROR "Compiler $ENV{CC} not found.")
+    endif()
+endif()
+
 # Compiler
 if(UNIX)
     if(DEFINED ENV{CC})
-        find_program(CC_FOUND NAMES $ENV{CC})
-        if(NOT CC_FOUND)
-            message( FATAL_ERROR "Compiler $ENV{CC} not found.")
-        endif()
         get_filename_component(CC $ENV{CC} NAME)
         if(CC STREQUAL "icc")
             set(CC_NAME "icc")
@@ -122,7 +125,8 @@
 else()
     set(CC_NAME "msvc")
     set(CC_PLATFORM "windows")
-    exec_program(cl OUTPUT_VARIABLE CC_VERSION_VERBOSE)
+    exec_program(cl.exe OUTPUT_VARIABLE CC_VERSION_VERBOSE)
+    message( WARNING "DEBUG: ${CC_VERSION_VERBOSE}")
     string(FIND "${CC_VERSION_VERBOSE}" "19.2" CC_VERSION_2019)
     if(CC_VERSION_2019 GREATER_EQUAL 0)
         set(CC_VERSION "2019")


[perftest][cmake] Standardize on using ${source} instead of ${srcdir}/${module_name_path}.swift.

This is an intermediate commit in a series of commits towards being able to
build the perf test suite from *.sib files.

Doing so will enable us to:

1. Stress the serialization pipeline.
2. Provide an interesting test case for verifying that executables compiled
from *.sib yield the same object files as if we compiled directly to *.o files.

Keep in mind this is a longer term effort that I am doing on the side.

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -107,7 +107,7 @@
           "-module-name" "${module_name}"
           "-emit-sib"
           "-o" "${sibfile}"
-          "${srcdir}/${module_name_path}.swift" ${extra_sources})
+          "${source}" ${extra_sources})
     endif()
   endforeach()

@@ -116,6 +116,7 @@

     set(objfile "${objdir}/${module_name}.o")
     set(swiftmodule "${objdir}/${module_name}.swiftmodule")
+    set(source "${srcdir}/${module_name_path}.swift")
     list(APPEND bench_library_objects "${objfile}")
     add_custom_command(
         OUTPUT "${objfile}"
@@ -129,7 +130,7 @@
         "-module-name" "${module_name}"
         "-emit-module" "-emit-module-path" "${swiftmodule}"
         "-o" "${objfile}"
-        "${srcdir}/${module_name_path}.swift" ${extra_sources})
+        "${source}" ${extra_sources})
     if (SWIFT_BENCHMARK_EMIT_SIB)
       set(sibfile "${objdir}/${module_name}.sib")
       list(APPEND bench_library_sibfiles "${sibfile}")
@@ -145,7 +146,7 @@
           "-module-name" "${module_name}"
           "-emit-sib"
           "-o" "${sibfile}"
-          "${srcdir}/${module_name_path}.swift" ${extra_sources})
+          "${source}" ${extra_sources})
     endif()
   endforeach()

@@ -157,6 +158,7 @@
     if(module_name)
       set(objfile "${objdir}/${module_name}.o")
       set(swiftmodule "${objdir}/${module_name}.swiftmodule")
+      set(source "${srcdir}/${module_name_path}.swift")
       list(APPEND SWIFT_BENCH_OBJFILES "${objfile}")
       add_custom_command(
           OUTPUT "${objfile}"
@@ -171,7 +173,7 @@
           "-emit-module" "-emit-module-path" "${swiftmodule}"
           "-I" "${objdir}"
           "-o" "${objfile}"
-          "${srcdir}/${module_name_path}.swift")
+          "${source}")
       if (SWIFT_BENCHMARK_EMIT_SIB)
         set(sibfile "${objdir}/${module_name}.sib")
         list(APPEND SWIFT_BENCH_SIBFILES "${sibfile}")
@@ -188,7 +190,7 @@
             "-I" "${objdir}"
             "-emit-sib"
             "-o" "${sibfile}"
-            "${srcdir}/${module_name_path}.swift")
+            "${source}")
       endif()
     endif()
   endforeach()


Bluetooth: controller: ll_sw: Fix wrong cmake code that adds radio_df.c

Fix error introduced by pull request:
https://github.com/zephyrproject-rtos/zephyr/pull/31591

Zephyrs CMake extension function zephyr_library_sources_ifdef()
does not allow to use complex conditions to toggle if
sources should be included in build or not.
It allows to use only single variable as an input for
feature_toggle argument because it is double-expanded
in contition statement in the function.

In case there is a requirement that source file is included
when more complicated condition is true we have to fall-back
to reqular if() statement and zephyr_library_sources().

The fix is required because without it radio_df.c source
is never compiled. If DF functionality is enabled build
will fail because of missing functions implementation.

Signed-off-by: Piotr Pryga <4cae3388a6c6e480df2109bb21aa832bf2c59595@nordicsemi.no>

--- subsys/bluetooth/controller/ll_sw/nrf.cmake
+++ subsys/bluetooth/controller/ll_sw/nrf.cmake
@@ -56,10 +56,9 @@
     CONFIG_BT_CTLR_DF
     ll_sw/nordic/lll/lll_df.c
     )
-  zephyr_library_sources_ifdef(
-    (CONFIG_BT_CTLR_DF AND NOT CONFIG_SOC_SERIES_BSIM_NRFXX)
+  if(CONFIG_BT_CTLR_DF AND NOT CONFIG_SOC_SERIES_BSIM_NRFXX)
     zephyr_library_sources(ll_sw/nordic/hal/nrf5/radio/radio_df.c)
-    )
+  endif()
   zephyr_library_include_directories(
     ll_sw/nordic/lll
     )


Point to more recent test data

Point to more recent test data

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

 if(BUILD_TESTING)

-  set(revision_tag a9c994aa)
+  set(revision_tag d8921ed0)

   #if(${proj}_REVISION_TAG)
   #  set(revision_tag ${${proj}_REVISION_TAG})


Fix find assimp

Fix find assimp

--- CMakeModules/FindAssimp.cmake
+++ CMakeModules/FindAssimp.cmake
@@ -14,6 +14,7 @@

 FIND_LIBRARY( Assimp_LIBRARY
   NAMES assimp assimp32.lib assimp.lib libassimp.a
+  PATHS
   ${CMAKE_SOURCE_DIR}/3rdPartyLibraries/Assimp/lib/Release
   ${CMAKE_SOURCE_DIR}/3rdPartyLibraries/Assimp/lib/
   /usr/lib64


Improvements to FindFFmpeg.cmake

Improvements to FindFFmpeg.cmake

1. If only a src dir is supplied consider it build dir (in-source tree build)
2. Find uninstalled versions of the libraries if builddir is supplied
3. Find configuration header when ffmpeg is built out of source tree

--- CMakeModules/FindFFmpeg.cmake
+++ CMakeModules/FindFFmpeg.cmake
@@ -1,30 +1,25 @@
-# Try to find FFmpeg
+# Try to find FFmpeg, paying special attention to its uninstalled builds.
+#
 # Defines:
 #
 #   FFmpeg_FOUND (true/false)
 #
 # if found, defines additionally:
 #
-#   FFmpeg_INCLUDE_DIRS
-#   FFmpeg_LIBRARIES
-#   FFmpeg_CXX_FLAGS
+#   FFmpeg_INCLUDE_DIRS FFmpeg_LIBRARIES FFmpeg_CXX_FLAGS
 #
-# TODO
+#  Copyright 2011 Watch that Sound / V2_ Lab
 #
-# - use *-uninstalled.pc files from the source directory if supplied
-# - extend lists with LIST(APPEND ...)
-# - other components
-# - components selector
+#  Based on scripts by Andreas Schneider and Lasse Kärkkäinen:
 #
-# Based on scripts by Andreas Schneider and Lasse Kärkkäinen:
+#  Copyright (c) 2008 Andreas Schneider <mail@cynapses.org> Modified for other
+#  libraries by Lasse Kärkkäinen <tronic>
 #
-#  Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
-#  Modified for other libraries by Lasse Kärkkäinen <tronic>
-#
-#  Redistribution and use is allowed according to the terms of the New
-#  BSD license.
+#  Redistribution and use is allowed according to the terms of the New BSD
+#  license.
 #

+SET(FFmpeg_BUILDDIR CACHE PATH "Path to FFmpeg build directory")
 SET(FFmpeg_SRCDIR CACHE PATH "Path to FFmpeg source directory")

 IF (FFmpeg_LIBRARIES AND FFmpeg_INCLUDE_DIRS)
@@ -37,15 +32,42 @@
   # in the FIND_PATH() and FIND_LIBRARY() calls
   FIND_PACKAGE(PkgConfig)

+  SET(COMPONENTS avformat avcodec avutil swscale)
+  # can't seem to find this anywhere
+  IF(WIN32)
+    SET(dirsep ";")
+  ELSE(WIN32)
+    SET(dirsep ":")
+  ENDIF(WIN32)
+
+  IF(NOT FFmpeg_BUILDDIR AND FFmpeg_SRCDIR)
+    # in source build
+    SET(FFmpeg_BUILDDIR ${FFmpeg_SRCDIR})
+  ENDIF(NOT FFmpeg_BUILDDIR AND FFmpeg_SRCDIR)
+
+  IF(FFmpeg_BUILDDIR)
+    FOREACH(COMPONENT ${COMPONENTS})
+      SET(ENV{PKG_CONFIG_PATH}
+          "${FFmpeg_BUILDDIR}/lib${COMPONENT}${dirsep}$ENV{PKG_CONFIG_PATH}")
+    ENDFOREACH(COMPONENT ${COMPONENTS})
+  ENDIF(FFmpeg_BUILDDIR)
+
   MACRO(FFmpeg_FIND COMPONENT)
     IF (PKG_CONFIG_FOUND)
-      PKG_CHECK_MODULES(_FFmpeg_${COMPONENT} lib${COMPONENT})
+
+      SET(MODULE lib${COMPONENT})
+      IF(FFmpeg_BUILDDIR)
+        SET(MODULE lib${COMPONENT}-uninstalled)
+      ENDIF(FFmpeg_BUILDDIR)
+
+      PKG_CHECK_MODULES(FFmpeg_${COMPONENT} ${MODULE})
+
     ENDIF (PKG_CONFIG_FOUND)

     FIND_PATH(FFmpeg_${COMPONENT}_INCLUDE_DIR
       NAMES lib${COMPONENT}/${COMPONENT}.h
       HINTS ${FFmpeg_SRCDIR}
-            ${_FFmpeg_${COMPONENT}_INCLUDE_DIRS}
+            ${FFmpeg_${COMPONENT}_INCLUDE_DIRS}
       PATHS /usr/include
             /usr/local/include
             /opt/local/include
@@ -53,13 +75,26 @@

     FIND_LIBRARY(FFmpeg_${COMPONENT}_LIBRARY
       NAMES ${COMPONENT}
-      HINTS ${FFmpeg_SRCDIR}/lib${COMPONENT}
-            ${_FFmpeg_${COMPONENT}_LIBRARY_DIRS}
-      PATH /usr/lib
+      HINTS ${FFmpeg_BUILDDIR}/lib${COMPONENT}
+            ${FFmpeg_SRCDIR}/lib${COMPONENT}
+            ${FFmpeg_${COMPONENT}_LIBRARY_DIRS}
+      PATHS /usr/lib
             /usr/local/lib
             /opt/local/lib
             /sw/lib)
   ENDMACRO(FFmpeg_FIND)
+
+  # When using uninstalled out of source build of ffmpeg this header ends up in
+  # the build directory while the rest are in the source directory
+  FIND_PATH(FFmpeg_avconfig_h_INCLUDE_DIR
+    NAMES libavutil/avconfig.h
+    HINTS ${FFmpeg_BUILDDIR}
+          ${FFmpeg_SRCDIR}
+          ${FFmpeg_avutil_INCLUDE_DIRS}
+    PATHS /usr/include
+          /usr/local/include
+          /opt/local/include
+          /sw/include)

   FFmpeg_FIND(avformat)
   FFmpeg_FIND(avcodec)
@@ -70,12 +105,13 @@
     FFmpeg_avformat_INCLUDE_DIR
     FFmpeg_avcodec_INCLUDE_DIR
     FFmpeg_avutil_INCLUDE_DIR
+    FFmpeg_avconfig_h_INCLUDE_DIR
     FFmpeg_swscale_INCLUDE_DIR)
   SET(FFmpeg_PROCESS_LIBS
-    FFmpeg_avformat_LIBRARY
-    FFmpeg_avcodec_LIBRARY
-    FFmpeg_avutil_LIBRARY
-    FFmpeg_swscale_LIBRARY)
+    FFmpeg_avformat_LIBRARY FFmpeg_avformat_LIBRARIES
+    FFmpeg_avcodec_LIBRARY FFmpeg_avcodec_LIBRARIES
+    FFmpeg_avutil_LIBRARY FFmpeg_avutil_LIBRARIES
+    FFmpeg_swscale_LIBRARY FFmpeg_swscale_LIBRARIES)
   LIBFIND_PROCESS(FFmpeg)
 endif (FFmpeg_LIBRARIES AND FFmpeg_INCLUDE_DIRS)


Added xml output to the gtests

Added xml output to the gtests

For use with the Jenkins build server, this change has the unit tests
write their results into an xml file.

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -100,6 +100,9 @@
 	endif(SURGSIM_TESTS_RUN_WITH_VALGRIND)
 endif(NOT WIN32)

+# Also output the test results as an xml file for use with Jenkins
+# Build Server.
+set(SURGSIM_TEST_RUN_SUFFIX ${SURGSIM_TEST_RUN_SUFFIX} --gtest_output=xml)

 # Copy zero or more files to the location of a built target, after the
 # target is built successfully, but only if the condition (which


ENH: Update FFTW to latest release

ENH: Update FFTW to latest release

Update from 3.3.4 (circa 2014) to 3.3.8 (circa 2018)
to include performance updates and improved compiler
compatibility.

FFTW 3.3.8 May 28th, 2018
  Fixed AVX, AVX2 for gcc-8.
  By default, FFTW 3.3.7 was broken with gcc-8. AVX and AVX2 code
  assumed that the compiler honors the distinction between +0 and -0,
  but gcc-8 -ffast-math does not. The default CFLAGS included
  -ffast-math . This release ensures that FFTW works with gcc-8
  -ffast-math , and removes -ffast-math from the default CFLAGS for good
  measure.
FFTW 3.3.7 Oct 29th, 2017
  Experimental support for CMake
  The primary build mechanism for FFTW remains GNU autoconf/automake.
  CMake support is meant to offer an easy way to compile FFTW on
  Windows, and as such it does not cover all the features of the
  automake build system, such as exotic cycle counters, cross-compiling,
  or build of binaries for a mixture of ISA's (e.g., amd64 vs amd64+avx
    vs amd64+avx2). Patches are welcome.

  Fixes for armv7a cycle counter.
  Official support for aarch64, now that we have hardware to test it.
  Tweak usage of FMA instructions in a way that favors newer processors (Skylake and Ryzen) over older processors (Haswell).
  tests/bench: use 64-bit precision to compute mflops.
FFTW 3.3.6-pl2 Mar 25th, 2017
  Bugfix: MPI Fortran-03 headers were missing in FFTW 3.3.6-pl1.
FFTW 3.3.6-pl1 (withdrawn) Jan 16th, 2017
  Bugfix: FFTW 3.3.6 had the wrong libtool version number, and generated shared libraries of the form libfftw3.so.2.6.6 instead of libfftw3.so.3.*.
FFTW 3.3.6 (withdrawn) Jan 15th, 2017
  The fftw_make_planner_thread_safe() API introduced in 3.3.5 didn't work, and this 3.3.6 fixes it. Sorry about that.
  Compilation fixes for IBM XLC.
  Compilation fixes for threads on Windows.
  fix SIMD autodetection on amd64 when (_MSC_VER > 1500)
FFTW 3.3.5 Jul 31, 2016
  New SIMD support:
  Power8 VSX instructions in single and double precision. To use, add --enable-vsx to configure.
  Support for AVX2 (256-bit FMA instructions). To use, add --enable-avx2 to configure.
  Experimental support for AVX512 and KCVI. (--enable-avx512, --enable-kcvi) This code is expected to work but the FFTW maintainers do not have hardware to test it.
  Support for AVX128/FMA (for some AMD machines) (--enable-avx128-fma)
  Double precision Neon SIMD for aarch64. This code is expected to work but the FFTW maintainers do not have hardware to test it.
  generic SIMD support using gcc vector intrinsics.
  Add fftw_make_planner_thread_safe() API.
  fix #18 (disable float128 for CUDACC).
  fix #19: missing Fortran interface for fftwq_alloc_real.
  fix #21 (don't use float128 on Portland compilers, which pretend to be gcc).
  fix: Avoid segfaults due to double free in MPI transpose.
  Special note for distribution maintainers: Although FFTW supports a
  zillion SIMD instruction sets, enabling them all at the same time is a
  bad idea, because it increases the planning time for minimal gain. We
  recommend that general-purpose x86 distributions only enable SSE2 and
  perhaps AVX. Users who care about the last ounce of performance should
  recompile FFTW themselves.

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -87,8 +87,8 @@
       set(GCC_POSITION_INDEPENDENT_CODE_FLAG "-fPIC")
     endif()

-    set(_fftw_target_version 3.3.4)
-    set(_fftw_url_hash "1ee2c7bec3657f6846e63c6dfa71410563830d2b951966bf0123bd8f4f2f5d6b50f13b76d9a7b0eae70e44856f829ca6ceb3d080bb01649d1572c9f3f68e8eb1")
+    set(_fftw_target_version 3.3.8)
+    set(_fftw_url_hash "ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38")
     set(_fftw_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_fftw_url_hash}/download")

     if(ITK_USE_FFTWF)


Message about the ICONV_ACCEPTS_ cmake tests.

People keep asking about the FAILURE that gets printed. This should stop that

--- CMakeModules/FindIconv.cmake
+++ CMakeModules/FindIconv.cmake
@@ -66,6 +66,11 @@
 if(ICONV_FOUND)
     set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
     set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
+
+    if (NOT DEFINED ICONV_ACCEPTS_NONCONST_INPUT)
+        # Display a useful message first time we come through here
+        message(STATUS "One (and only one) of the ICONV_ACCEPTS_... tests must pass")
+    endif()
     check_cxx_source_compiles(
         "#include <iconv.h>
          int main() {
@@ -74,8 +79,6 @@
          }"
         ICONV_ACCEPTS_NONCONST_INPUT)

-    set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
-    set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
     check_cxx_source_compiles(
         "#include <iconv.h>
          int main() {


COMP: Fix centOS build of libpng to install in lib instead of lib64

--- SuperBuild/CMake/External_png.cmake
+++ SuperBuild/CMake/External_png.cmake
@@ -46,6 +46,7 @@
   -DSKIP_INSTALL_FILES:BOOL=ON
   -DSKIP_INSTALL_EXPORT:BOOL=ON
   -DSKIP_INSTALL_EXECUTABLES:BOOL=OFF
+  -DCMAKE_INSTALL_LIBDIR:STRING=lib
   ${PNG_SB_CONFIG}
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   LOG_DOWNLOAD 1


ENH: Bump remote module ParabolicMorphology

to be compatible with #855

--- Modules/Remote/ParabolicMorphology.remote.cmake
+++ Modules/Remote/ParabolicMorphology.remote.cmake
@@ -5,5 +5,5 @@
   http://www.insight-journal.org/browse/publication/228
   https://hdl.handle.net/1926/1370"
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKParabolicMorphology.git
-  GIT_TAG d4bc69362c3e435ff5d97ed5bee0167199da69ac
+  GIT_TAG 996cfee503279ddb47e4969ef07a31f498429fe0
   )


Bugfix: Strip path from output name before trying to match

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

--- tests/cmake/macros/macro_pickup_tests.cmake
+++ tests/cmake/macros/macro_pickup_tests.cmake
@@ -34,13 +34,13 @@
   FILE(GLOB _tests "*.output")
   FOREACH(_test ${_tests})
     SET(_comparison ${_test})
+    GET_FILENAME_COMPONENT(_test ${_test} NAME)

     #
     # Respect TEST_PICKUP_REGEX:
     #
     IF( "${TEST_PICKUP_REGEX}" STREQUAL "" OR
         _test MATCHES "${TEST_PICKUP_REGEX}" )
-      GET_FILENAME_COMPONENT(_test ${_test} NAME)
       SET(_define_test TRUE)
     ELSE()
       SET(_define_test FALSE)


Try to pass ltsan again to travis

Try to pass ltsan again to travis

--- Testing/script/travis_script.cmake
+++ Testing/script/travis_script.cmake
@@ -81,7 +81,8 @@
     #set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE ${CTEST_SCRIPT_DIRECTORY}/MercuryValgrindSuppressions.supp)
   endif()
   if(${MERCURY_MEMORYCHECK_TYPE} MATCHES "ThreadSanitizer")
-    set(MERCURY_MEMCHECK_FLAGS "-O1 -fsanitize=thread -fno-omit-frame-pointer -fPIC -ltsan")
+    set(MERCURY_MEMCHECK_FLAGS "-O1 -fsanitize=thread -fno-omit-frame-pointer -fPIC -pie")
+    set(MERCURY_MEMCHECK_LDFLAGS "-L/usr/lib/x86_64-linux-gnu -ltsan")
   endif()

   # needed by mercury_common.cmake
@@ -111,6 +112,8 @@
 set(dashboard_cache "
 CMAKE_C_FLAGS:STRING=-Wall -Wextra -Wshadow -Winline -Wundef -Wcast-qual -std=gnu99 ${MERCURY_MEMCHECK_FLAGS}
 CMAKE_CXX_FLAGS:STRING=${MERCURY_MEMCHECK_FLAGS}
+CMAKE_EXE_LINKER_FLAGS:STRING=${MERCURY_MEMCHECK_LDFLAGS}
+CMAKE_SHARED_LINKER_FLAGS:STRING=${MERCURY_MEMCHECK_LDFLAGS}

 BUILD_SHARED_LIBS:BOOL=${mercury_build_shared}
 BUILD_TESTING:BOOL=ON


Add required dlls to installer

Add required dlls to installer

--- CMake/mitkInstallRules.cmake
+++ CMake/mitkInstallRules.cmake
@@ -45,11 +45,17 @@
     install(FILES "${_qmake_path}/../plugins/sqldrivers/qsqlite.dll"
             DESTINATION "bin/plugins/sqldrivers"
             CONFIGURATIONS Release)
+    install(FILES "${_qmake_path}/../plugins/imageformats/qsvg.dll"
+            DESTINATION "bin/plugins/imageformats"
+            CONFIGURATIONS Release)
     install(FILES "${_qmake_path}/../plugins/platforms/qwindowsd.dll"
             DESTINATION "bin/plugins/platforms"
             CONFIGURATIONS Debug)
     install(FILES "${_qmake_path}/../plugins/sqldrivers/qsqlited.dll"
             DESTINATION "bin/plugins/sqldrivers"
+            CONFIGURATIONS Debug)
+    install(FILES "${_qmake_path}/../plugins/imageformats/qsvgd.dll"
+            DESTINATION "bin/plugins/imageformats"
             CONFIGURATIONS Debug)
   endif()


Summary:
Fixed Linux-specific Qt plugin path

Summary: Looked at Online Qt 5.6 and 5.10 as well as Fedora's directory layout, fix is necessary for all of these

Test Plan: mitkPackageTest on Linux

Reviewers: kislinsk

Reviewed By: kislinsk

Maniphest Tasks: T24609

Differential Revision: https://phabricator.mitk.org/D139

--- CMake/mitkInstallRules.cmake
+++ CMake/mitkInstallRules.cmake
@@ -45,7 +45,7 @@
   elseif(UNIX)
     MITK_INSTALL(FILES
       "${_qmake_path}/../plugins/platforms/libqxcb.so"
-      "${_qmake_path}/../plugins/platforms/libqxcb-glx-integration.so")
+      "${_qmake_path}/../plugins/xcbglintegrations/libqxcb-glx-integration.so")
   endif()

   # Install Qt WebEngine


more debug info to figure out why buildbot is failing

--- CMakeModules/Findflann.cmake
+++ CMakeModules/Findflann.cmake
@@ -7,10 +7,12 @@
     file(READ "${FLANN_INCLUDE_DIRS}/config.h" FLANN_CONFIG)
     string(REGEX REPLACE ".*FLANN_VERSION_ \"([0-9.]+)\".*" "\\1" FLANN_VERSION ${FLANN_CONFIG})
     if(FLANN_VERSION VERSION_LESS flann_FIND_VERSION)
+        message(STATUS "Installed version of flann is too old. Version ${flann_FIND_VERSION} or above required")
         unset(FLANN_INCLUDE_DIRS)
     else()
         string(REGEX REPLACE "/flann$" "" FLANN_INCLUDE_DIRS ${FLANN_INCLUDE_DIRS})
+        message(STATUS "Found flann -- ${FLANN_INCLUDE_DIRS}")
     endif()
 endif()
-
+message("FLANN_INCLUDE_DIRS = ${FLANN_INCLUDE_DIRS}")
 find_package_handle_standard_args(flann DEFAULT_MSG FLANN_INCLUDE_DIRS)


fix the minimum boost version

fix the minimum boost version


remove a debug message

remove a debug message

git-svn-id: 9eeea04daec118c8b99ac1589bcc03db7f3e68a4@174 3149698f-976c-419d-aa71-eec1decff2c2

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -481,7 +481,7 @@
   # for linux/osx

   if((NOT DEFINED MATLAB_USER_ROOT) OR (NOT MATLAB_USER_ROOT))
-    message("2222")
+
     # if MATLAB_USER_ROOT not specified, we look for Matlab from the command line PATH
     # maybe using CMAKE_PROGRAM_PATH to add some more hints
     find_program(


Disable doxygen in dashboard tests

Disable doxygen in dashboard tests

So the unavoidable citelist warnings don't pollute the dashboard.

--- test/ctest/test_setup.cmake
+++ test/ctest/test_setup.cmake
@@ -47,6 +47,7 @@
 SITE:STRING=${SITE_NAME}
 CMAKE_BUILD_TYPE:STRING=${BUILD_TYPE}
 ENABLE_CUDA:BOOL=${ENABLE_CUDA}
+ENABLE_DOXYGEN:BOOL=OFF
 ENABLE_OPENMP:BOOL=${ENABLE_OPENMP}
 SINGLE_PRECISION:BOOL=${SINGLE_PRECISION}
 ENABLE_STATIC:BOOL=${ENABLE_STATIC}


bump to version 0.1.1

bump to version 0.1.1

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

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

 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libsimple")


Cleanup if statement

Cleanup if statement

--- cmake/modules/hunter_pkgconfig_export_target.cmake
+++ cmake/modules/hunter_pkgconfig_export_target.cmake
@@ -33,12 +33,7 @@
   hunter_status_debug(
       "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} INCLUDE_DIRS: ${${PKG_CONFIG_MODULE}_INCLUDE_DIRS}"
   )
-  string(COMPARE NOTEQUAL
-      "${${PKG_CONFIG_MODULE}_INCLUDE_DIRS}"
-      ""
-      has_include_dirs
-  )
-  if(has_include_dirs)
+  if(NOT "${${PKG_CONFIG_MODULE}_INCLUDE_DIRS}" STREQUAL "")
     set_target_properties("${target_name}"
         PROPERTIES
           INTERFACE_INCLUDE_DIRECTORIES
@@ -53,24 +48,14 @@
   hunter_status_debug(
       "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} LDFLAGS: ${${PKG_CONFIG_MODULE}_LDFLAGS}"
   )
-  string(COMPARE NOTEQUAL
-      "${${PKG_CONFIG_MODULE}_LDFLAGS}"
-      ""
-      has_ldflags
-  )
-  if(has_ldflags)
+  if(NOT "${${PKG_CONFIG_MODULE}_LDFLAGS}" STREQUAL "")
     list(APPEND link_libs ${${PKG_CONFIG_MODULE}_LDFLAGS})
   endif()

   hunter_status_debug(
       "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} LDFLAGS_OTHER: ${${PKG_CONFIG_MODULE}_LDFLAGS_OTHER}"
   )
-  string(COMPARE NOTEQUAL
-      "${${PKG_CONFIG_MODULE}_LDFLAGS_OTHER}"
-      ""
-      has_ldflags_other
-  )
-  if(has_ldflags_other)
+  if(NOT "${${PKG_CONFIG_MODULE}_LDFLAGS_OTHER}" STREQUAL "")
     # turn "-framework;A;-framework;B" into "-framework A;-framework B"
     string(REPLACE "-framework;" "-framework " ldflags_other "${${PKG_CONFIG_MODULE}_LDFLAGS_OTHER}")
     list(APPEND link_libs ${ldflags_other})
@@ -78,12 +63,7 @@

   # No need to treat the pkg-config module's _LIBRARY_DIRS and _LIBRARIES
   # as they are already included in LD_FLAGS
-  string(COMPARE NOTEQUAL
-      "${link_libs}"
-      ""
-      has_link_libs
-  )
-  if(has_link_libs)
+  if(NOT "${link_libs}" STREQUAL "")
     set_target_properties("${target_name}"
         PROPERTIES
           INTERFACE_LINK_LIBRARIES
@@ -98,32 +78,18 @@
   hunter_status_debug(
       "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} CFLAGS: ${${PKG_CONFIG_MODULE}_CFLAGS}"
   )
-  string(COMPARE NOTEQUAL
-      "${${PKG_CONFIG_MODULE}_CFLAGS}"
-      ""
-      has_cflags)
-  if(has_cflags)
+  if(NOT "${${PKG_CONFIG_MODULE}_CFLAGS}" STREQUAL "")
     list(APPEND compile_opts ${${PKG_CONFIG_MODULE}_CFLAGS})
   endif()

   hunter_status_debug(
       "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} CFLAGS_OTHER: ${${PKG_CONFIG_MODULE}_CFLAGS_OTHER}"
   )
-  string(COMPARE NOTEQUAL
-      "${${PKG_CONFIG_MODULE}_CFLAGS_OTHER}"
-      ""
-      has_cflags_other
-  )
-  if(has_cflags_other)
+  if(NOT "${${PKG_CONFIG_MODULE}_CFLAGS_OTHER}" STREQUAL "")
     list(APPEND compile_opts ${${PKG_CONFIG_MODULE}_CFLAGS_OTHER})
   endif()

-  string(COMPARE NOTEQUAL
-     "${compile_opts}"
-     ""
-     has_compile_opts
-  )
-  if(has_compile_opts)
+  if(NOT "${compile_opts}" STREQUAL "")
       set_target_properties("${target_name}"
           PROPERTIES
             INTERFACE_COMPILE_OPTIONS


fptu: pull erthink devel-upstream.

fptu: pull erthink devel-upstream.

Merge commit '61c4970d4dbcd7ab8fe526ce3db9d8c69298ad37' into devel

--- fast_positive/details/erthink/cmake/compiler.cmake
+++ fast_positive/details/erthink/cmake/compiler.cmake
@@ -189,6 +189,7 @@
   check_compiler_flag("-Wextra" CC_HAS_WEXTRA)
   check_compiler_flag("-Werror" CC_HAS_WERROR)
   check_compiler_flag("-fexceptions" CC_HAS_FEXCEPTIONS)
+  check_cxx_compiler_flag("-fcxx-exceptions" CC_HAS_FCXX_EXCEPTIONS)
   check_compiler_flag("-funwind-tables" CC_HAS_FUNWIND_TABLES)
   check_compiler_flag("-fno-omit-frame-pointer" CC_HAS_FNO_OMIT_FRAME_POINTER)
   check_compiler_flag("-fno-common" CC_HAS_FNO_COMMON)
@@ -415,6 +416,9 @@

   if(CC_HAS_FEXCEPTIONS)
     add_compile_flags("C;CXX" "-fexceptions")
+  endif()
+  if(CC_HAS_FCXX_EXCEPTIONS)
+    add_compile_flags("CXX" "-fcxx-exceptions -frtti")
   endif()

   # In C a global variable without a storage specifier (static/extern) and
@@ -588,6 +592,12 @@
     unset(config)
   endif()

+  if(CMAKE_COMPILER_IS_CLANG AND OSX_ARCHITECTURES)
+    set(EXE_LINKER_FLAGS "${EXE_LINKER_FLAGS} -Wl,-keep_dwarf_unwind")
+    set(SHARED_LINKER_FLAGS "${SHARED_LINKER_FLAGS} -Wl,-keep_dwarf_unwind")
+    set(MODULE_LINKER_FLAGS "${MODULE_LINKER_FLAGS} -Wl,-keep_dwarf_unwind")
+  endif()
+
   if(CMAKE_COMPILER_IS_CLANG AND LTO_ENABLED)
     if(CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 3.9)
       set(CLANG_LTO_FLAG "-flto")


fix default path for Mac installer

fix default path for Mac installer

--- CMake/VisomicsCPack.cmake
+++ CMake/VisomicsCPack.cmake
@@ -43,7 +43,7 @@
 SET(CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/VisomicsCPackOptions.cmake")

 if(APPLE)
-  set(CPACK_PACKAGING_INSTALL_PREFIX "/Applications")
+  set(CPACK_PACKAGING_INSTALL_PREFIX "/Applications/${APP_NAME}")
 else()
   set(CPACK_PACKAGING_INSTALL_PREFIX "/")
 endif()


Improved fake OpenGL, GLU, GLUT, GLEW, WGL, and GLX for SOFA.

--- CMakeExternals/SOFA.cmake
+++ CMakeExternals/SOFA.cmake
@@ -96,7 +96,7 @@
   set(url_base "http://dl.dropbox.com/u/5822501/")
   set(rev "8935")
   set(file "sofa-rev${rev}.zip")
-  set(md5 "ec5028b9b3ec23293983c4d785325847")
+  set(md5 "3d151df2b797130a9b8fa4fd60cc4cab")

   write_downloadfile_script(
     "${stamp_dir}/download-sofa.cmake"
@@ -115,7 +115,7 @@
   list(APPEND download_cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-sofa.cmake)

   set(file "sofa-rev${rev}-patch.zip")
-  set(md5 "34709f71ad134502ca2cec68737f1883")
+  set(md5 "1584acde8a206d96b837c2b04855667e")

   write_downloadfile_script(
     "${stamp_dir}/download-patch.cmake"
@@ -134,7 +134,7 @@
   list(APPEND download_cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-patch.cmake)

   set(file "sofa-rev${rev}-cmake.zip")
-  set(md5 "bc49343e153ff0eec563d20dc0bbd91f")
+  set(md5 "8235d8790e084fe8209ef74bfb353dcd")

   write_downloadfile_script(
     "${stamp_dir}/download-cmake.cmake"