Detect RISC-V compiler from PATH environment variable

--- platforms/linux/riscv64-gcc.toolchain.cmake
+++ platforms/linux/riscv64-gcc.toolchain.cmake
@@ -1,11 +1,20 @@
 set(CMAKE_SYSTEM_NAME Linux)
 set(CMAKE_SYSTEM_PROCESSOR riscv64)

-set(RISCV_GCC_INSTALL_ROOT /opt/RISCV CACHE PATH "Path to GCC for RISC-V cross compiler installation directory")
+if(NOT DEFINED CMAKE_C_COMPILER)
+  find_program(CMAKE_C_COMPILER NAMES riscv64-unknown-linux-gnu-gcc
+                                PATHS /opt/RISCV/bin ENV PATH)
+endif()
+
+if(NOT DEFINED CMAKE_CXX_COMPILER)
+  find_program(CMAKE_CXX_COMPILER NAMES riscv64-unknown-linux-gnu-g++
+                                  PATHS /opt/RISCV/bin ENV PATH)
+endif()
+
+get_filename_component(RISCV_GCC_INSTALL_ROOT ${CMAKE_C_COMPILER} DIRECTORY)
+get_filename_component(RISCV_GCC_INSTALL_ROOT ${RISCV_GCC_INSTALL_ROOT} DIRECTORY)
+
 set(CMAKE_SYSROOT ${RISCV_GCC_INSTALL_ROOT}/sysroot CACHE PATH "RISC-V sysroot")
-
-set(CMAKE_C_COMPILER ${RISCV_GCC_INSTALL_ROOT}/bin/riscv64-unknown-linux-gnu-gcc)
-set(CMAKE_CXX_COMPILER ${RISCV_GCC_INSTALL_ROOT}/bin/riscv64-unknown-linux-gnu-g++)

 # Don't run the linker on compiler check
 set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)


new DartConfig.

new DartConfig.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -6,9 +6,10 @@

 # Dart server to submit results (used by client)
-SET (DROP_METHOD "http")
-SET (DROP_SITE "nemo/dart_server")
-SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
+SET (DROP_METHOD "xmlrpc")
+SET (DROP_SITE "http://nemo:8081")
+SET (DROP_LOCATION "OTB")
+SET (COMPRESS_SUBMISSION ON)
 #SET (DROP_LOCATION "/incoming")
 #SET (DROP_SITE_USER "ftpuser")
 #SET (DROP_SITE_PASSWORD "public")


switch to vlc 2.0.4

switch to vlc 2.0.4

--- PluginConfig.cmake
+++ PluginConfig.cmake
@@ -13,7 +13,7 @@
 #if you want embed vlc into FBVLC distribution:
 # 1) place vlc into FBVLC\Win\WiX\vlc-${VLC_VERSION}
 # 2) uncomment following line
-set(VLC_VERSION "2.0.3")
+set(VLC_VERSION "2.0.4")
 # 3) run prepXXXX.cmd from FireBreath

 #unfortunately current implementation does not work :(


Disable USE_SIGNALS_FOR_THREAD_SUSPENSION

--- src/pal/src/configure.cmake
+++ src/pal/src/configure.cmake
@@ -894,7 +894,7 @@
   set(PAL_PT_DETACH PT_DETACH)
   set(PAL_PT_READ_D PT_READ_D)
   set(PAL_PT_WRITE_D PT_WRITE_D)
-  set(USE_SIGNALS_FOR_THREAD_SUSPENSION 1)
+  set(USE_SIGNALS_FOR_THREAD_SUSPENSION 0)
   set(JA_JP_LOCALE_NAME ja_JP_LOCALE_NOT_FOUND)
   set(KO_KR_LOCALE_NAME ko_KR_LOCALE_NOT_FOUND)
   set(ZH_TW_LOCALE_NAME zh_TW_LOCALE_NOT_FOUND)
@@ -925,7 +925,7 @@
   set(PAL_PT_DETACH PTRACE_DETACH)
   set(PAL_PT_READ_D PTRACE_PEEKDATA)
   set(PAL_PT_WRITE_D PTRACE_POKEDATA)
-  set(USE_SIGNALS_FOR_THREAD_SUSPENSION 1)
+  set(USE_SIGNALS_FOR_THREAD_SUSPENSION 0)
   set(JA_JP_LOCALE_NAME ja_JP_LOCALE_NOT_FOUND)
   set(KO_KR_LOCALE_NAME ko_KR_LOCALE_NOT_FOUND)
   set(ZH_TW_LOCALE_NAME zh_TW_LOCALE_NOT_FOUND)


remove factorial.cpp from compile list

remove factorial.cpp from compile list

--- ProjectFiles.cmake
+++ ProjectFiles.cmake
@@ -4,7 +4,6 @@

 # Set project source files.
 set(SRC
-  "${SRC_PATH}/factorial.cpp"
   "${SRC_PATH}/ellipsoidSurfacePoints.cpp"
   "${SRC_PATH}/cubicRoot.cpp"
   "${SRC_PATH}/ellipsoidGravitationalAcceleration.cpp"


Make sure with packages to include the genXrdPattern binary

Signed-off-by: Geoff Hutchison <9cf35bacc9f8512ca007341c9e919cf5dc03e0c7@gmail.com>

--- cmake/AvogadroCPack.cmake
+++ cmake/AvogadroCPack.cmake
@@ -50,6 +50,14 @@
   install(DIRECTORY "${AvogadroLibs_DATA_DIR}/avogadro2"
     DESTINATION ${INSTALL_DATA_DIR})

+  # look for genXrd
+  find_program(GENXRD_EXE genXrdPattern)
+  install(FILES ${GENXRD_EXE} DESTINATION ${INSTALL_RUNTIME_DIR}
+    PERMISSIONS
+      OWNER_READ OWNER_EXECUTE
+      GROUP_READ GROUP_EXECUTE
+      WORLD_READ WORLD_EXECUTE)
+
   find_program(OBABEL_EXE obabel)
   if(OBABEL_EXE)
     find_program(OBMM_EXE obmm)


fix the location for README and LICENSE - remove wrong escape

--- cmake/InstallMacros.cmake
+++ cmake/InstallMacros.cmake
@@ -75,7 +75,7 @@
     set(CRLFSTYLE "CRLF")
   endif ()
   install(
-    CODE "configure_file(${PROJECT_SOURCE_DIR}/${input} \$ENV{DESTDIR}\/${where}${PKG_VERSION}/${output} NEWLINE_STYLE ${CRLFSTYLE})"
+    CODE "configure_file(${PROJECT_SOURCE_DIR}/${input} \$ENV{DESTDIR}/${where}${PKG_VERSION}/${output} NEWLINE_STYLE ${CRLFSTYLE})"
     )
 endmacro ()


CMake: Do not generate .isystem files for libtooling interface generator

The generated `compile_commands.json` contains everything that the interface
generator needs.

PiperOrigin-RevId: 439800377
Change-Id: I5b364edc20eaae9554ce10a96caa3559fb780210

--- cmake/SapiBuildDefs.cmake
+++ cmake/SapiBuildDefs.cmake
@@ -145,7 +145,6 @@
     set(_sapi_embed_name "${_sapi_NAME}")
   endif()

-  set(_sapi_isystem "${_sapi_NAME}.isystem")
   list(APPEND _sapi_generator_args
     "--sapi_name=${_sapi_LIBRARY_NAME}"
     "--sapi_out=${_sapi_gen_header}"
@@ -153,7 +152,6 @@
     "--sapi_embed_name=${_sapi_embed_name}"
     "--sapi_functions=${_sapi_funcs}"
     "--sapi_ns=${_sapi_NAMESPACE}"
-    "--sapi_isystem=${_sapi_isystem}"
   )
   if(SAPI_ENABLE_GENERATOR)
     list(APPEND _sapi_generator_command
@@ -162,26 +160,35 @@
       ${_sapi_generator_args}
       ${_sapi_full_inputs}
     )
+    add_custom_command(
+      OUTPUT "${_sapi_gen_header}"
+      COMMAND ${_sapi_generator_command}
+      COMMENT "Generating interface"
+      DEPENDS ${_sapi_INPUTS}
+      VERBATIM
+    )
   else()
+    set(_sapi_isystem "${_sapi_NAME}.isystem")
     list(JOIN _sapi_full_inputs "," _sapi_full_inputs)
     list(APPEND _sapi_generator_command
       "${SAPI_PYTHON3_EXECUTABLE}" -B
       "${SAPI_SOURCE_DIR}/sandboxed_api/tools/generator2/sapi_generator.py"
       ${_sapi_generator_args}
+      "--sapi_isystem=${_sapi_isystem}"
       "--sapi_in=${_sapi_full_inputs}"
     )
-  endif()
-  add_custom_command(
-    OUTPUT "${_sapi_gen_header}" "${_sapi_isystem}"
-    COMMAND sh -c
-            "${CMAKE_CXX_COMPILER} -E -x c++ -v /dev/null 2>&1 | \
-             awk '/> search starts here:/{f=1;next}/^End of search/{f=0}f{print $1}' \
-             > \"${_sapi_isystem}\""
-    COMMAND ${_sapi_generator_command}
-    COMMENT "Generating interface"
-    DEPENDS ${_sapi_INPUTS}
-    VERBATIM
-  )
+    add_custom_command(
+      OUTPUT "${_sapi_gen_header}" "${_sapi_isystem}"
+      COMMAND sh -c
+              "${CMAKE_CXX_COMPILER} -E -x c++ -v /dev/null 2>&1 | \
+               awk '/> search starts here:/{f=1;next}/^End of search/{f=0}f{print $1}' \
+               > \"${_sapi_isystem}\""
+      COMMAND ${_sapi_generator_command}
+      COMMENT "Generating interface"
+      DEPENDS ${_sapi_INPUTS}
+      VERBATIM
+    )
+  endif()

   # Library with the interface
   if(NOT _sapi_SOURCES)


MDEV-13836 mariadb_config & mysql_config output differ

allow to build with the default port number 3306.
Now -DMYSQL_TCP_PORT=# sets the default port name and
-DMYSQL_TCP_PORT_DEFAULT=# sets the magic port=0 behavior,
if it's MYSQL_TCP_PORT_DEFAULT=0 it's enabled, otherwise - disabled.

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -69,13 +69,9 @@
 # Get mysql version and other interesting variables
 GET_MYSQL_VERSION()

-SET(MYSQL_TCP_PORT_DEFAULT "3306")
-
+SET(MYSQL_TCP_PORT_DEFAULT 0)
 IF(NOT MYSQL_TCP_PORT)
-  SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT})
-  SET(MYSQL_TCP_PORT_DEFAULT "0")
-ELSEIF(MYSQL_TCP_PORT EQUAL MYSQL_TCP_PORT_DEFAULT)
-  SET(MYSQL_TCP_PORT_DEFAULT "0")
+  SET(MYSQL_TCP_PORT 3306)
 ENDIF()

 IF(NOT COMPILATION_COMMENT)


Fixed a bug when adding multiple OSX frameworks

--- cmake/oryol_private.cmake
+++ cmake/oryol_private.cmake
@@ -77,19 +77,19 @@
     list(APPEND ${output} ${input})
     get_property(sub_input GLOBAL PROPERTY ${input}_libs)
     foreach(lib ${sub_input})
-        oryol_recurse_deps(${lib} ${output})
+        oryol_recurse_libs(${lib} ${output})
     endforeach()
 endmacro()

 #-------------------------------------------------------------------------------
 #   oryol_resolve_dependencies(target)
-#   Recursively resolve dependencies of a target.
+#   Recursively resolve link-libs of a target.
 #
 macro(oryol_resolve_linklibs target)
     set(resolvedLibs)
     get_property(input GLOBAL PROPERTY ${target}_libs)
     foreach(lib ${input})
-        oryol_recurse_deps(${lib} resolvedLibs)
+        oryol_recurse_libs(${lib} resolvedLibs)
     endforeach()
     if (resolvedLibs)
        list(REMOVE_DUPLICATES resolvedLibs)
@@ -105,7 +105,7 @@
     list(APPEND ${output} ${input})
     get_property(sub_input GLOBAL PROPERTY ${input}_frameworks)
     foreach(fw ${sub_input})
-        oryol_recurse_deps(${fw} ${output})
+        oryol_recurse_frameworks(${fw} ${output})
     endforeach()
 endmacro()

@@ -117,14 +117,15 @@
     set(resolvedFws)
     get_property(input GLOBAL PROPERTY ${target}_frameworks)
     foreach(fw ${input})
-        oryol_recurse_deps(${fw} resolvedFws)
+        oryol_recurse_frameworks(${fw} resolvedFws)
     endforeach()
     if (resolvedFws)
        list(REMOVE_DUPLICATES resolvedFws)
     endif()
     message("${target} Frameworks: ${resolvedFws}")
     foreach (fw ${resolvedFws})
-        FIND_LIBRARY(found_framework ${fw})
+        unset(found_framework CACHE)
+        find_library(found_framework ${fw})
         target_link_libraries(${target} ${found_framework})
     endforeach()
 endmacro()


Try another approach.

Try another approach.

--- ModularDeps.cmake
+++ ModularDeps.cmake
@@ -4,14 +4,9 @@

 find_package(Git REQUIRED)

-# The global dependency list.
-set(DEPENDENCY_LIST)
-
 function(add_dependency DEP_NAME DEP_REPO)
-  # Determine if the dependency has already been added.
-  set(DEP_INDEX)
-  list(FIND DEPENDENCY_LIST "${DEP_NAME}" DEP_INDEX)
-  if(DEP_INDEX GREATER -1)
+  # Determine if the dependency has already been satisfied.
+  if(${DEP_NAME}_DEP_SATISFIED)
     message(STATUS "The dependency '${DEP_NAME}' is already satisfied.")
     return()
   endif()
@@ -41,13 +36,11 @@
     message(STATUS "'${DEP_NAME}' was successfully cloned.")
   endif()

-  # Add the dependency to the global dependency list.
-  # NOTE: we cannot use list(APPEND) here because DEPENDENCY_LIST is a global variable,
-  # and in order to access it we need to use the PARENT_SCOPE option of the set() command.
-  set(DEPENDENCY_LIST ${DEPENDENCY_LIST} "${DEP_NAME}" PARENT_SCOPE)
-
   # Add the subdirectory of the dependency.
   add_subdirectory("${PROJECT_SOURCE_DIR}/deps/${DEP_NAME}")
+
+  # Mark the dependency as satisfied.
+  set(${DEP_NAME}_DEP_SATISFIED YES PARENT_SCOPE)
 endfunction()

 # Mark as included.


Removed objective-c dependency on deb builds & added missing libpcre3 runtime dependency

--- .cmake/Modules/DebConfig.cmake
+++ .cmake/Modules/DebConfig.cmake
@@ -8,14 +8,13 @@
   cmake
   gettext
   libpcre3-dev
-  gobjc
-  gnustep-devel
 )

-set(CPACK_DEBIAN_CMAKE_OPTIONS
-  "-DLANG_OBJC=ON"
+set(CPACK_DEBIAN_PACKAGE_DEPENDS
+  libpcre3
 )

+set(CPACK_DEBIAN_CMAKE_OPTIONS)
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/description.txt")

 set(CPACK_DEBIAN_PACKAGE_SOURCE_COPY "${CMAKE_SOURCE_DIR}/.cmake/copy-source.sh")


fixed an error in DetectOptions.cmake

fixed an error in DetectOptions.cmake

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -96,6 +96,7 @@
     elseif(ADIOS2_USE_DataMan)
         if(ZeroMQ_FOUND AND MPI_FOUND)
             set(ADIOS2_HAVE_DataMan TRUE)
+        endif()
     endif()
 endif()

@@ -109,6 +110,7 @@
     elseif(ADIOS2_USE_WDM)
         if(ZeroMQ_FOUND AND MPI_FOUND)
             set(ADIOS2_HAVE_WDM TRUE)
+        endif()
     endif()
 endif()


Fix errors with extended aligned storage.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -75,6 +75,7 @@
 		add_definitions(-D_WIN32_WINNT=0x0601 -DWINVER=0x0601)
 	endif()
 	add_definitions(-D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS)
+	add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
 else()
 	if ((NOT EMSCRIPTEN) AND (NOT ANDROID_NDK))
 		set(EXTRA_LIBS pthread)


Fixed cmake: used option not avaliavle in cmake 12.0

--- cmake/compile_flags.cmake
+++ cmake/compile_flags.cmake
@@ -122,7 +122,9 @@
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=unsigned-integer-overflow")
     endif(WITH_SANITIZE_UNSIGNED_INTEGER_OVERFLOW)

-    add_link_options(-fsanitize=address)
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
+    # CMake 3.13 can replace with: add_link_options(-fsanitize=address)
 endif()


fix term core only

fix term core only

--- cmake/external/grpc.cmake
+++ cmake/external/grpc.cmake
@@ -33,10 +33,18 @@
   SET(BUILD_CMD make HAS_SYSTEM_PROTOBUF=false -s -j ${NUM_OF_PROCESSOR} static grpc_cpp_plugin)
 ENDIF()

+# FIXME(wuyi): do not build zlib cares protobuf twice, find a way to build grpc with them
 ExternalProject_Add(
     extern_grpc
     DEPENDS protobuf zlib
-    URL "http://paddlepaddledeps.bj.bcebos.com/grpc.tar.xz"
+    # NOTE(wuyi):
+    # this package is generated by following steps:
+    # 1. git clone -b v1.8.x https://github.com/grpc/grpc.git
+    # 2. submodule update --init
+    # 3. keep only zlib, cares, protobuf, boringssl under "third_party",
+    #    checkout and clean other dirs under third_party
+    # 4. remove .git, and package the directory.
+    URL "http://paddlepaddledeps.bj.bcebos.com/grpc-v1.8.x.tar.gz"
     PREFIX          ${GRPC_SOURCES_DIR}
     UPDATE_COMMAND  ""
     CONFIGURE_COMMAND ""
@@ -49,7 +57,6 @@
     INSTALL_COMMAND make prefix=${GRPC_INSTALL_DIR} install
 )

-# FIXME(typhoonzero): hack to get static lib path, try a better way like merge them.
 ADD_LIBRARY(grpc++_unsecure STATIC IMPORTED GLOBAL)
 SET_PROPERTY(TARGET grpc++_unsecure PROPERTY IMPORTED_LOCATION
              "${GRPC_INSTALL_DIR}/lib/libgrpc++_unsecure.a")


add support for future (Q4 2020) G4 devices


updating path for unit tests to find the newer version of catch in the api

--- test/min-lib-unittest.cmake
+++ test/min-lib-unittest.cmake
@@ -9,7 +9,7 @@

 include_directories(
 	"${C74_INCLUDES}"
-	"${CMAKE_CURRENT_LIST_DIR}/../../min-api/test/catch/include"
+	"${CMAKE_CURRENT_LIST_DIR}/../../min-api/test"
 #	"${CMAKE_CURRENT_LIST_DIR}/mock"
 )


COMP: Fix typo in SuperBuild.cmake

COMP: Fix typo in SuperBuild.cmake

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -9,7 +9,7 @@
 # Superbuild option(s)
 #-----------------------------------------------------------------------------
 option(USE_SYSTEM_ITK "Build using an externally defined version of ITK" OFF)
-set(ShapePopulationViewer_USE_SYSTE_ITK ${USE_SYSTEM_ITK})
+set(ShapePopulationViewer_USE_SYSTEM_ITK ${USE_SYSTEM_ITK})

 option(USE_SYSTEM_SlicerExecutionModel "Build using an externally defined version of SlicerExecutionModel"  OFF)
 set(ShapePopulationViewer_USE_SYSTEM_SlicerExecutionModel ${USE_SYSTEM_SlicerExecutionModel})


ENH: Use https for git URLs

ENH: Use https for git URLs

Github no longer supports unauthenticated git://


FIX (#6517): VTK Freetype and DCMTK root uid support in superbuild

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -73,7 +73,11 @@
 # -----------------------------------------
 # VTK
 #
-
+IF(WIN32)
+  OPTION(VTK_USE_SYSTEM_FREETYPE OFF)
+ELSE(WIN32)
+  OPTION(VTK_USE_SYSTEM_FREETYPE ON)
+ENDIF(WIN32)
 IF(NOT DEFINED VTK_DIR)
     SET(proj vtk)
     SET(VTK_DEPENDS ${proj})
@@ -88,7 +92,7 @@
         -DVTK_WRAP_JAVA:BOOL=OFF
         -DBUILD_SHARED_LIBS:BOOL=ON
         -DVTK_USE_PARALLEL:BOOL=ON
-        -DVTK_USE_SYSTEM_FREETYPE:BOOL=ON
+        -DVTK_USE_SYSTEM_FREETYPE:BOOL=${VTK_USE_SYSTEM_FREETYPE}
         ${vtk_QT_ARGS}
       )
   SET(VTK_DIR ${ep_build_dir}/${proj})
@@ -99,10 +103,12 @@

   IF(NOT DEFINED DCMTK_DIR)
   SET(proj DCMTK)
-IF(UNIX)
-  SET(DCMTK_CXX_FLAGS "-fPIC")
-ENDIF(UNIX)
-
+  IF(UNIX)
+    SET(DCMTK_CXX_FLAGS "-fPIC")
+  ENDIF(UNIX)
+  IF(DCMTK_DICOM_ROOT_ID)
+    SET(DCMTK_CXX_FLAGS "${DCMTK_CXX_FLAGS} -DSITE_UID_ROOT=\\\"${DCMTK_DICOM_ROOT_ID}\\\"")
+  ENDIF()
   ExternalProject_Add(${proj}
     URL http://mitk.org/download/thirdparty/dcmtk-3.6.0.tar.gz
       CMAKE_GENERATOR ${gen}
@@ -116,7 +122,6 @@

   ENDIF()
 ENDIF()
-

 # -----------------------------------------
 # CTK


fix linux build error

fix linux build error

--- thirdparty/thirdparty.cmake
+++ thirdparty/thirdparty.cmake
@@ -1274,7 +1274,8 @@
     find_library(toupcam
                  NAMES toupcam
                  NO_DEFAULT_PATHS
-                 PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/toupcam/${toupcam_arch})
+                 NO_CMAKE_SYSTEM_PATH
+                 PATHS ${PHD_PROJECT_ROOT_DIR}/cameras/toupcam/linux/${toupcam_arch})
     if(NOT toupcam)
       message(FATAL_ERROR "Cannot find the toupcam drivers")
     endif()


Update warning flags

Update warning flags

Compile flags now support both compilation using Clang and GCC.


Linux: remove -Wno-expansion-to-defined, this is not a GCC option

--- cmake-toolchains/linux.cmake
+++ cmake-toolchains/linux.cmake
@@ -22,12 +22,12 @@
 set(CMAKE_CONFIGURATION_TYPES Debug Release)

 # C++ flags
-set(CMAKE_CXX_FLAGS "-fPIC -std=c++11 -pthread -fno-strict-aliasing -Wno-expansion-to-defined -Wno-multichar -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-missing-field-initializers")
+set(CMAKE_CXX_FLAGS "-fPIC -std=c++11 -pthread -fno-strict-aliasing -Wno-multichar -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-missing-field-initializers")
 set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1 -ggdb")

 # C flags
-set(CMAKE_C_FLAGS "-fPIC -pthread -fno-strict-aliasing -Wno-multichar -Wall -Wextra -Wno-expansion-to-defined -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-missing-field-initializers")
+set(CMAKE_C_FLAGS "-fPIC -pthread -fno-strict-aliasing -Wno-multichar -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-missing-field-initializers")
 set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG "-O0 -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1 -ggdb")


cmake: fix android toolchain with 64-bit ndk

--- cmake/AndroidToolchain.cmake
+++ cmake/AndroidToolchain.cmake
@@ -312,7 +312,7 @@
 # rpath makes low sence for Android
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -516,7 +516,19 @@
  endif()
  set( ANDROID_NDK "${ANDROID_NDK}" CACHE INTERNAL "Path of the Android NDK" FORCE )
  set( BUILD_WITH_ANDROID_NDK True )
- file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE LIMIT_COUNT 1 REGEX r[0-9]+[a-z]? )
+ file( STRINGS "${ANDROID_NDK}/RELEASE.TXT" ANDROID_NDK_RELEASE_TXT LIMIT_COUNT 1 REGEX r[0-9]+[a-z]? )
+
+ if(${ANDROID_NDK_RELEASE_TXT} MATCHES "^r[0-9]+[a-z] \([^ ]+\)$")
+  string( REGEX REPLACE "^(r[0-9]+[a-z]) \(([^ ]+)\)$" "\\1" ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_TXT}" )
+  string( REGEX REPLACE "^(r[0-9]+[a-z]) \(([^ ]+)\)$" "\\2" ANDROID_NDK_RELEASE_EXTRA "${ANDROID_NDK_RELEASE_TXT}" )
+
+  set( ANDROID_NDK_64BIT True)
+  set( ANDROID_NDK_HOST_SYSTEM_NAME "${ANDROID_NDK_HOST_SYSTEM_NAME}_64" )
+
+ else()
+  set( ANDROID_NDK_RELEASE "${ANDROID_NDK_RELEASE_TXT}" )
+ endif()
+
 elseif( ANDROID_STANDALONE_TOOLCHAIN )
  get_filename_component( ANDROID_STANDALONE_TOOLCHAIN "${ANDROID_STANDALONE_TOOLCHAIN}" ABSOLUTE )
  # try to detect change
@@ -1541,9 +1553,9 @@
 #   BUILD_ANDROID : always TRUE
 #   BUILD_WITH_ANDROID_NDK : TRUE if NDK is used
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
-#   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
+#   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86", "linux-x86_64" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d; set only for NDK
+#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e; set only for NDK
 #   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform


put back a file decription

put back a file decription

--- cmake/CheckEnvironment.cmake
+++ cmake/CheckEnvironment.cmake
@@ -10,6 +10,10 @@
 #  PURPOSE.
 #
 #######################################################################
+
+# This file checks that all dependencies are met, and it necessary sets up a few
+# things, like adding the github.com signature to known_hosts.
+# Assume Unix by default

 set(HOME_PATH $ENV{HOME})


RPM ignore also /usr pathes

RPM ignore also /usr pathes

--- cmake/ElektraPackaging.cmake
+++ cmake/ElektraPackaging.cmake
@@ -112,6 +112,12 @@
 	"%ignore /etc/bash_completion.d"
 	"%ignore /etc/bash_completion.d"
 	"%ignore /usr"
+	"%ignore /usr/bin"
+	"%ignore /usr/include"
+	"%ignore /usr/lib"
+	"%ignore /usr/share"
+	"%ignore /usr/share/doc"
+	"%ignore /usr/share/man"
 	)

 include (CPack)


Fix for wrong install prefix

Fix for wrong install prefix

--- cmake/configs/Appveyor.cmake
+++ cmake/configs/Appveyor.cmake
@@ -7,7 +7,7 @@
 # file(TO_CMAKE_PATH "$ENV{APPDATA}" _app_data)
 # set(PYTHON27_PREFIX "${_app_data}/../Local/Continuum/Anaconda2" CACHE PATH "" FORCE)
 set(PYTHON27_PREFIX "C:/Python27-x64" CACHE PATH "" FORCE)
-set(CMAKE_INSTALL_PREFIX "install/super-builder-libraries" CACHE PATH "" FORCE)
+set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install/super-builder-libraries" CACHE PATH "" FORCE)
 # build selected libraries these selected libraries only
 # to fit inside the time limits on appveyor
 if($ENV{BUILD_PART_1} STREQUAL "1")


cucumber: Fixed cucumber-testing.cmake script to better handle the server+client setup required for cucumber tests (stepdefinitions = server, cucumber = client). Previously it relied on setting test costs in descending order, but this was not reliable (cmake alters the costs later on). Now it instead adds only one test, and sets that test to execute cmake in scripting mode (-P) with the cucumber-testing.cmake file which at the top detects this and runs execute_process for the server & client (which runs in paralell).

--- cmake/cucumber-testing.cmake
+++ cmake/cucumber-testing.cmake
@@ -1,11 +1,23 @@
+# If variables are defined, persume we are in script mode ('cmake -P this_file.cmake TEST_TARGET_PATH')
+if(CUCUMBER_PATH AND TEST_TARGET_PATH AND TEST_FEATURE_PATH)
+    execute_process(
+        COMMAND ${TEST_TARGET_PATH}
+        COMMAND ${CUCUMBER_PATH} --strict ${TEST_FEATURE_PATH}
+        OUTPUT_VARIABLE OUT
+        ERROR_VARIABLE ERROR
+        RESULT_VARIABLE RESULT
+    )
+
+    if(RESULT)
+        message(FATAL_ERROR "Return code: ${RESULT}\nError: ${ERROR}\nOutput: ${OUT}")
+    endif()
+
+    return()
+endif()
+
 find_program(CUCUMBER cucumber)

-# Tests are run in descending order (higher cost first)
-# We use this to make sure steprunner is started before cucumber-feature when run in parallel
-# (steprunner blocks & waits for cucumber-feature to send steps to execute)
-if(NOT TEST_COST)
-    set(TEST_COST "100000000")
-endif()
+set(cucumber_testing_path "${CMAKE_CURRENT_LIST_FILE}")

 if(NOT CUCUMBER)
     message("TESTING - Cucumber not found, skipping acceptance tests.")
@@ -53,44 +65,34 @@
     endif()

     # Cucumber is run in 2 steps:
-    #   1: Start step executer (blocking)
-    #   2: Run cucumber which sends step-commands to executer
-    # NOTE: ctest must be run in parallel mode (`ctest --parallel 2`), else it will freeze.
-    add_test(
-        NAME ${FEATURE_NAME}_steprunner
-        COMMAND ${FEATURE_NAME}
-    )
-    decrement_cost_and_set_for_test( TEST ${FEATURE_NAME}_steprunner )
-
-    add_test(
-        NAME ${FEATURE_NAME}
-        COMMAND "${CUCUMBER}" --strict "${arg_FEATURES_ROOT}/${arg_FEATURE}"
+    #   1: Start step executer (blocking) - server
+    #   2: Run cucumber which sends step-commands to executer - client
+    #   This is done by executing cmake in script mode & do execute_process
+    #   with multiple (paralell) commands.
+    #   NOTE: See top of file (invoked by test)
+
+    set(FEATURE_TEST ${FEATURE_NAME}_tests)
+    add_test(
+        NAME ${FEATURE_TEST}
+        COMMAND
+            "${CMAKE_COMMAND}"
+                "-DCUCUMBER_PATH=${CUCUMBER}"
+                "-DTEST_TARGET_PATH=$<TARGET_FILE:${FEATURE_NAME}>"
+                "-DTEST_FEATURE_PATH=${arg_FEATURES_ROOT}/${arg_FEATURE}"
+                -P ${cucumber_testing_path}
         WORKING_DIRECTORY "${arg_FEATURES_ROOT}"
     )
-    decrement_cost_and_set_for_test( TEST ${FEATURE_NAME} )

     # Shared settings
-    set_tests_properties( ${FEATURE_NAME} ${FEATURE_NAME}_steprunner
+    set_tests_properties( ${FEATURE_TEST}
         PROPERTIES
             TIMEOUT 10
-            PARALLEL_LEVEL 2
-            PROCESSORS 1
+            RUN_SERIAL ON
             LABELS "acceptance"
     )
+
+    get_test_property(${FEATURE_TEST} LABELS TAGS)
+
+    message("CUCUMBER - Feature '${FEATURE_NAME}' setup as test '${FEATURE_TEST}'. Tags: ${TAGS}")

 endfunction()
-
-function(decrement_cost_and_set_for_test)
-    set(oneValueArgs
-        TEST
-    )
-    cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-    math(EXPR TEST_COST "${TEST_COST}-1")
-    set(TEST_COST ${TEST_COST} PARENT_SCOPE)
-
-    set_tests_properties( ${arg_TEST}
-        PROPERTIES
-            COST ${TEST_COST}
-    )
-
-endfunction()


Use the correct platform toolchain folder... (#58416)

...when bootstrapping with hosttools.

This would align with how the SDK path is calculated.

Addresses rdar://92298536

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -707,7 +707,7 @@
       if(BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS")
         # Add in the toolchain directory so we can grab compatibility libraries
         get_filename_component(TOOLCHAIN_BIN_DIR ${SWIFT_EXEC_FOR_SWIFT_MODULES} DIRECTORY)
-        get_filename_component(TOOLCHAIN_LIB_DIR "${TOOLCHAIN_BIN_DIR}/../lib/swift/macosx" ABSOLUTE)
+        get_filename_component(TOOLCHAIN_LIB_DIR "${TOOLCHAIN_BIN_DIR}/../lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}" ABSOLUTE)
         target_link_directories(${executable} PUBLIC ${TOOLCHAIN_LIB_DIR})

         # Add the SDK directory for the host platform.


[CMake] Remove bogus dependency on "bin/swiftc".

When we're building the compiler, we already depend on the "swift" target.
When we're /not/ building the compiler, it had better already be there.

Squelches a CMake warning.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -453,7 +453,7 @@
         ${SWIFTFILE_OUTPUT} "${module_file}" "${module_doc_file}"
         ${apinote_files}
       DEPENDS
-        "${swift_compiler_tool}" ${swift_compiler_tool_dep}
+        ${swift_compiler_tool_dep}
         ${source_files} ${SWIFTFILE_DEPENDS}
         ${swift_ide_test_dependency} ${depends_create_apinotes}
       COMMENT "Compiling ${first_output}")


build: prune some unused options for `_add_swift_host_executable_single`

Remove some unused parameters for this function.  This simplification
will make it easier to merge `_add_swift_host_executable_single` into
`add_swift_host_executable`.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -843,8 +843,6 @@
     ARCHITECTURE
     SDK)
   set(multiple_parameter_options
-    COMPILE_FLAGS
-    DEPENDS
     LLVM_LINK_COMPONENTS)
   cmake_parse_arguments(SWIFTEXE_SINGLE
     "${options}"
@@ -892,10 +890,8 @@
       ${SWIFTEXE_SINGLE_EXTERNAL_SOURCES})

   add_dependencies_multiple_targets(
-      TARGETS "${name}"
-      DEPENDS
-        ${LLVM_COMMON_DEPENDS}
-        ${SWIFTEXE_SINGLE_DEPENDS})
+      TARGETS ${name}
+      DEPENDS ${LLVM_COMMON_DEPENDS})
   llvm_update_compile_flags("${name}")

   if(SWIFTEXE_SINGLE_SDK STREQUAL WINDOWS)


allow non-framework R installation

allow non-framework R installation

--- cmake/modules/FindLibR.cmake
+++ cmake/modules/FindLibR.cmake
@@ -21,11 +21,24 @@
 if(APPLE)

    find_library(LIBR_LIBRARIES R)
-   if(LIBR_LIBRARIES)
+
+   if(LIBR_LIBRARIES MATCHES ".*\\.framework")
       set(LIBR_HOME "${LIBR_LIBRARIES}/Resources" CACHE PATH "R home directory")
       set(LIBR_INCLUDE_DIRS "${LIBR_HOME}/include" CACHE PATH "R include directory")
       set(LIBR_DOC_DIR "${LIBR_HOME}/doc" CACHE PATH "R doc directory")
       set(LIBR_EXECUTABLE "${LIBR_HOME}/R" CACHE PATH "R executable")
+   else()
+      get_filename_component(_LIBR_LIBRARIES "${LIBR_LIBRARIES}" REALPATH)
+      get_filename_component(_LIBR_LIBRARIES_DIR "${_LIBR_LIBRARIES}" DIRECTORY)
+      set(LIBR_EXECUTABLE "${_LIBR_LIBRARIES_DIR}/../bin/R")
+      execute_process(
+         COMMAND ${LIBR_EXECUTABLE} "--slave" "--vanilla" "-e" "cat(R.home())"
+                   OUTPUT_VARIABLE LIBR_HOME
+      )
+      set(LIBR_HOME ${LIBR_HOME} CACHE PATH "R home directory")
+      set(LIBR_INCLUDE_DIRS "${LIBR_HOME}/include" CACHE PATH "R include directory")
+      set(LIBR_DOC_DIR "${LIBR_HOME}/doc" CACHE PATH "R doc directory")
+      set(LIBR_LIB_DIR "${LIBR_HOME}/lib" CACHE PATH "R lib directory")
    endif()

 # detection for UNIX & Win32


fixed flags in CMake FindROCM module

fixed flags in CMake FindROCM module

--- cmake/modules/FindROCM.cmake
+++ cmake/modules/FindROCM.cmake
@@ -361,7 +361,7 @@
     # generate flags to use
     set(_ROCM_STD_FLAGS ${HIP_LIB_FLAGS} ${ROCM_HIPCC_FLAGS})
     list(FILTER _ROCM_STD_FLAGS INCLUDE REGEX ^-std=)
-    set(_ROCM_FLAGS)
+    set(_ROCM_FLAGS ${HIP_LIB_FLAGS})
     if(CMAKE_CXX_STANDARD AND NOT _ROCM_STD_FLAGS)
 	list(APPEND _ROCM_FLAGS -std=c++${CMAKE_CXX_STANDARD})
     endif()


Fix typo

Fix typo

--- cmake_modules/FindCGAL.cmake
+++ cmake_modules/FindCGAL.cmake
@@ -10,7 +10,7 @@
 #  CGAL_USE_FILE      - CMake file to use CGAL.
 #

-# Construct consitent error messages for use below.
+# Construct consistent error messages for use below.
 set(CGAL_DIR_DESCRIPTION "directory containing CGALConfig.cmake. This is either the binary directory where CGAL was configured or PREFIX/lib/CGAL for an installation.")
 set(CGAL_DIR_MESSAGE     "CGAL not found.  Set the CGAL_DIR cmake variable or environment variable to the ${CGAL_DIR_DESCRIPTION}")


Update compiler.cmake

Update compiler.cmake

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -209,6 +209,9 @@
                      " -Wno-c++98-compat"
                      " -Wno-shorten-64-to-32"
                      " -Wno-c++98-compat-pedantic"
+                     " -Wno-used-but-marked-unused" # : boost unit tests. should be reinabled and sorted out.
+                     " -Wno-newline-eof" # : end of line newline. should be reinabled and so.
+                     " -Wno-return-std-move-in-c++11" # :
                      )
              string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
              #endif ()


Fixed boost-cpp>1.68 for linux

Fixed boost-cpp>1.68 for linux

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -126,7 +126,10 @@
      add_compile_definitions(TUDAT_BUILD_MSVC)
      add_definitions( "-D_ENABLE_EXTENDED_ALIGNED_STORAGE" )
      message(STATUS "Using MSVC compiler.")
-     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /Ox /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
+     # problem: https://dev.azure.com/tudat-team/feedstock-builds/_build/results?buildId=95&view=logs&j=00f5923e-fdef-5026-5091-0d5a0b3d5a2c&t=3cc4a9ed-60e1-5810-6eb3-5f9cd4a26dba
+     # solution: https://stackoverflow.com/questions/1091662/vc-internal-compiler-error
+#     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /Ox /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
      if (TUDAT_FORCE_DYNAMIC_RUNTIME)
          # This is needed for conda builds, as the prebuilt libraries are MD.
          foreach (flag_var


M: atomic is indeed needed, also a min version for boost (introduction of atomic)

--- cmake_support/FindDeps.cmake
+++ cmake_support/FindDeps.cmake
@@ -1,6 +1,6 @@
 # win32: set BOOST_LIBRARYDIR and BOOST_INCLUDEDIR folders
 set( Boost_USE_STATIC_LIBS ON )
-find_package( Boost COMPONENTS filesystem system thread date_time program_options )
+find_package( Boost 1.51 COMPONENTS filesystem system thread date_time program_options atomic )

 if( NOT Boost_FOUND )
 	message( FATAL_ERROR "Cannot find Boost!" )


arm: cortex-m: add FPU option for v8.M without DSP

With respect to the mapping between the CPU variant
and the FPU we add an entry for Cortex-M v8-M CPU
variants without DSP. This should cover the case
of a Mainline Cortex-M which implements the Floating
Point extension but not the DSP extension.

Signed-off-by: Ioannis Glaropoulos <5921cc8bab7e1d4329f52fd8f6268f9692e3de80@nordicsemi.no>

--- cmake/compiler/gcc/target_arm.cmake
+++ cmake/compiler/gcc/target_arm.cmake
@@ -18,9 +18,10 @@
   set(PRECISION_TOKEN sp-)
 endif()

-set(FPU_FOR_cortex-m4      fpv4-${PRECISION_TOKEN}d16)
-set(FPU_FOR_cortex-m7      fpv5-${PRECISION_TOKEN}d16)
-set(FPU_FOR_cortex-m33     fpv5-${PRECISION_TOKEN}d16)
+set(FPU_FOR_cortex-m4        fpv4-${PRECISION_TOKEN}d16)
+set(FPU_FOR_cortex-m7        fpv5-${PRECISION_TOKEN}d16)
+set(FPU_FOR_cortex-m33       fpv5-${PRECISION_TOKEN}d16)
+set(FPU_FOR_cortex-m33+nodsp fpv5-${PRECISION_TOKEN}d16)

 if(CONFIG_FPU)
   list(APPEND TOOLCHAIN_C_FLAGS   -mfpu=${FPU_FOR_${GCC_M_CPU}})


[cmake] remove -O? from debug cxx flags

[cmake] remove -O? from debug cxx flags

At the moment it is not trivial to configure a debug build with e.g. -O2.
Upon calling make cmake is called and the CMAKE_CXX_FLAGS_DEBUG are
appended to any given CMAKE_CXX_FLAGS, thus overriding any -O? given there.
Since the desired debug flag might vary from compiler to compiler
(-O0, -Og) anyway I propose to remove the -O? entirely from the debug
flags. Please revert or voice opinions!

--- cmake/modules/DuneStuffMacros.cmake
+++ cmake/modules/DuneStuffMacros.cmake
@@ -70,7 +70,7 @@
 SET( CMAKE_CXX_FLAGS "-DDUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS=1 ${CMAKE_CXX_FLAGS}" )

 SET( CMAKE_CXX_FLAGS_DEBUG
-  "-O0 -DDNDEBUG -g3 -ggdb  -Wunused-variable -Winline -fno-strict-aliasing -fPIC -Wall -Wextra -Wc++0x-compat -Wparentheses -pedantic -Wredundant-decls -Wshadow  -Wundef -Wnon-virtual-dtor -ftemplate-backtrace-limit=0" )
+  "-DDNDEBUG -g3 -ggdb  -Wunused-variable -Winline -fno-strict-aliasing -fPIC -Wall -Wextra -Wc++0x-compat -Wparentheses -pedantic -Wredundant-decls -Wshadow  -Wundef -Wnon-virtual-dtor -ftemplate-backtrace-limit=0" )

 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   set( CMAKE_CXX_FLAGS_DEBUG


Deps libdir for openssl on linux

Deps libdir for openssl on linux

--- deps/deps-linux.cmake
+++ deps/deps-linux.cmake
@@ -31,7 +31,7 @@
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ./config
         "--prefix=${DESTDIR}/usr/local"
-        "--libdir=${DESTDIR}/usr/local/lib"
+        "--libdir=lib"
         no-shared
         no-ssl3-method
         no-dynamic-engine


MITK 2013.06.00 version update

MITK 2013.06.00 version update

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -6,8 +6,8 @@

 # MITK_VERSION
 set(MITK_VERSION_MAJOR "2013")
-set(MITK_VERSION_MINOR "03")
-set(MITK_VERSION_PATCH "99")
+set(MITK_VERSION_MINOR "06")
+set(MITK_VERSION_PATCH "00")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")
   set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}")


FindGROMACS.cmake: add more useful error messages

--- CMakeModules/FindGROMACS.cmake
+++ CMakeModules/FindGROMACS.cmake
@@ -23,18 +23,21 @@
 #

 function(_GROMACS_GET_VERSION _OUT_ver _version_hdr)
+  if(NOT EXISTS ${_version_hdr})
+    message(FATAL_ERROR "Header file ${_version_hdr} not found (check value of GROMACS_INCLUDE_DIR)")
+  endif()
   file(STRINGS ${_version_hdr} _contents REGEX "#define GMX_VERSION[ \t]+")
   if(_contents)
     string(REGEX REPLACE ".*#define GMX_VERSION[ \t]+([0-9.]+).*" "\\1" ${_OUT_ver} "${_contents}")
-    if(("${${_OUT_ver}}" STREUQAL "") OR (NOT ${${_OUT_ver}} MATCHES "[0-9]+"))
-        message(FATAL_ERROR "Version parsing failed for GMX_VERSION in ${_version_hdr}!")
+    if(NOT ${${_OUT_ver}})
+      message(FATAL_ERROR "Version parsing failed for GMX_VERSION in ${_version_hdr}, got empty return!")
+    elseif(NOT ${${_OUT_ver}} MATCHES "^[0-9]+$")
+      message(FATAL_ERROR "Version parsing failed for GMX_VERSION in ${_version_hdr}, excepted a number but got ${${_OUT_ver}}!")
     endif()
     set(${_OUT_ver} ${${_OUT_ver}} PARENT_SCOPE)
- elseif(EXISTS ${_version_hdr})
-    message(FATAL_ERROR "No GMX_VERSION in ${_version_hdr}")
  else()
-     message(FATAL_ERROR "No GMX_VERSION line found in include file ${_version_hdr}")
-  endif()
+   message(FATAL_ERROR "No GMX_VERSION line found in include file ${_version_hdr}")
+ endif()
 endfunction()

 find_package(PkgConfig)
@@ -61,7 +64,7 @@

 find_path(GROMACS_INCLUDE_DIR gromacs/version.h HINTS ${PC_GROMACS_D_INCLUDE_DIRS} ${PC_GROMACS_INCLUDE_DIRS})
 if(GROMACS_VERSION)
-elseif(GROMACS_INCLUDE_DIR AND EXISTS ${GROMACS_INCLUDE_DIR}/gromacs/version.h)
+elseif(GROMACS_INCLUDE_DIR)
   _GROMACS_GET_VERSION(GROMACS_VERSION ${GROMACS_INCLUDE_DIR}/gromacs/version.h)
 else()
   set(GROMACS_VERSION 0)


FindGROMACS.cmake: Only set GROMACS_DEFINITIONS if GROMACS_LIBRARY was found

--- CMakeModules/FindGROMACS.cmake
+++ CMakeModules/FindGROMACS.cmake
@@ -41,18 +41,6 @@
 endif()

 pkg_check_modules(PC_GROMACS ${GROMACS_PKG})
-if ("${GROMACS_PKG}" MATCHES "_d$")
-  list(APPEND GMX_DEFS "-DGMX_DOUBLE")
-endif ("${GROMACS_PKG}" MATCHES "_d$")
-if (PC_GROMACS_CFLAGS_OTHER)
-  foreach(DEF ${PC_GROMACS_CFLAGS_OTHER})
-    if (${DEF} MATCHES "^-D")
-      list(APPEND GMX_DEFS ${DEF})
-    endif (${DEF} MATCHES "^-D")
-  endforeach(DEF)
-  list(REMOVE_DUPLICATES GMX_DEFS)
-endif (PC_GROMACS_CFLAGS_OTHER)
-set(GROMACS_DEFINITIONS "${GMX_DEFS}" CACHE STRING "extra GROMACS definitions")

 find_library(GROMACS_LIBRARY NAMES ${GROMACS_LIBRARY_NAME} HINTS ${PC_GROMACS_LIBRARY_DIRS} )
 if (GROMACS_LIBRARY)
@@ -99,6 +87,21 @@
       ( (NOT ${GROMACS_LIBRARY} MATCHES "lib[^/]*_d\\.[^.]*$") AND (    "${GROMACS_PKG}" MATCHES "_d$") ) )
       message(WARNING "You are using ${GROMACS_LIBRARY}, but GROMACS_PKG was ${GROMACS_PKG}. There seems to be a mismatch in precision, single vs double, no ending vs. _d. If this is not the case ignore this warning otherwise enable set GROMACS_PKG correctly using -DGROMACS_PKG_OVERWRITE=lib(gmx|gromacs)(_d).")
   endif()
+
+  #Only set GROMACS_DEFINITIONS if GROMACS_LIBRARY was found
+  if ("${GROMACS_PKG}" MATCHES "_d$")
+    list(APPEND GMX_DEFS "-DGMX_DOUBLE")
+  endif ("${GROMACS_PKG}" MATCHES "_d$")
+  if (PC_GROMACS_CFLAGS_OTHER)
+    foreach(DEF ${PC_GROMACS_CFLAGS_OTHER})
+      if (${DEF} MATCHES "^-D")
+        list(APPEND GMX_DEFS ${DEF})
+      endif (${DEF} MATCHES "^-D")
+    endforeach(DEF)
+    list(REMOVE_DUPLICATES GMX_DEFS)
+  endif (PC_GROMACS_CFLAGS_OTHER)
+  set(GROMACS_DEFINITIONS "${GMX_DEFS}" CACHE STRING "extra GROMACS definitions")
+
 else(GROMACS_LIBRARY)
   set(GMX_VERSION 45)
 endif (GROMACS_LIBRARY)


Set hunter generator to Xcode

Set hunter generator to Xcode

--- iOS.cmake
+++ iOS.cmake
@@ -83,3 +83,6 @@
 if(NOT IOS_SDK_VERSION)
   message(FATAL_ERROR "iOS version not found, tested: [${IOS_SDK_VERSIONS}]")
 endif()
+
+# support for hunter (github.com/ruslo/hunter)
+set(HUNTER_CMAKE_GENERATOR Xcode)


Changing TIMEOUT to be a single value argument

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -125,8 +125,8 @@
   set(testname "web_client_${case}")

   set(_options NOCOVERAGE)
-  set(_args PLUGIN ASSETSTORE WEBSECURITY BASEURL PLUGIN_DIRS)
-  set(_multival_args RESOURCE_LOCKS TIMEOUT ENABLEDPLUGINS)
+  set(_args PLUGIN ASSETSTORE WEBSECURITY BASEURL PLUGIN_DIRS TIMEOUT)
+  set(_multival_args RESOURCE_LOCKS ENABLEDPLUGINS)
   cmake_parse_arguments(fn "${_options}" "${_args}" "${_multival_args}" ${ARGN})

   if(fn_PLUGIN)


Improved stability and error tolerance of FindGit script.

--- CMake/FindGit.cmake
+++ CMake/FindGit.cmake
@@ -2,9 +2,18 @@
 # FindGit
 #

-SET(GIT_FOUND FALSE)
-
-FIND_PROGRAM(GIT_EXECUTABLE git
+SET(git_candidates git eg)
+
+IF(WIN32)
+  LIST(APPEND git_candidates eg.cmd)
+  IF(NOT MSYS)
+    # We don't append git.cmd, since it does not correctly return
+    # exit codes, see http://code.google.com/p/msysgit/issues/detail?id=428
+    LIST(APPEND git_candidates git.cmd)
+  ENDIF()
+ENDIF()
+
+FIND_PROGRAM(GIT_EXECUTABLE ${git_candidates}
   PATHS
     "C:/Program Files/Git/bin"
     "C:/Program Files (x86)/Git/bin"
@@ -12,22 +21,36 @@
 MARK_AS_ADVANCED(GIT_EXECUTABLE)

 IF(GIT_EXECUTABLE)
-  SET(GIT_FOUND TRUE)
+
+  MACRO(GIT_IS_REPO dir result_var)
+    EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} status
+       WORKING_DIRECTORY ${dir}
+       RESULT_VARIABLE GIT_error
+       OUTPUT_QUIET
+       ERROR_QUIET)
+    if(GIT_error EQUAL 0)
+      SET(${result_var} 1)
+    ELSE()
+      SET(${result_var} 0)
+    ENDIF()
+  ENDMACRO()
+
   MACRO(GIT_WC_INFO dir prefix)
     EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} rev-list -n 1 HEAD
        WORKING_DIRECTORY ${dir}
        ERROR_VARIABLE GIT_error
        OUTPUT_VARIABLE ${prefix}_WC_REVISION_HASH
        OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if(NOT ${GIT_error} EQUAL 0)
+    IF(NOT ${GIT_error} EQUAL 0)
       MESSAGE(SEND_ERROR "Command \"${GIT_EXECUTBALE} rev-list -n 1 HEAD\" in directory ${dir} failed with output:\n${GIT_error}")
-    ELSE(NOT ${GIT_error} EQUAL 0)
+    ELSE()
       EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} name-rev ${${prefix}_WC_REVISION_HASH}
          WORKING_DIRECTORY ${dir}
          OUTPUT_VARIABLE ${prefix}_WC_REVISION_NAME
           OUTPUT_STRIP_TRAILING_WHITESPACE)
-    ENDIF(NOT ${GIT_error} EQUAL 0)
+    ENDIF()

+    SET(${prefix}_WC_GITSVN 0)
     # In case, git-svn is used, attempt to extract svn info
     EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} svn info
       WORKING_DIRECTORY ${dir}
@@ -36,10 +59,8 @@
       RESULT_VARIABLE git_svn_info_result
       OUTPUT_STRIP_TRAILING_WHITESPACE)

-    IF(NOT ${git_svn_info_result} EQUAL 0)
-      #MESSAGE(SEND_ERROR "Command \"${GIT_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${git_svn_info_error}")
-    ELSE(NOT ${git_svn_info_result} EQUAL 0)
-
+    IF(${git_svn_info_result} EQUAL 0)
+      SET(${prefix}_WC_GITSVN 1)
       STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
         "\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}")
       STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
@@ -50,9 +71,10 @@
         "\\2" ${prefix}_WC_LAST_CHANGED_REV "${${prefix}_WC_INFO}")
       STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
         "\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}")
+    ENDIF()
+
+  ENDMACRO()
+ENDIF()

-    ENDIF(NOT ${git_svn_info_result} EQUAL 0)
-
-  ENDMACRO(GIT_WC_INFO)
-ENDIF(GIT_EXECUTABLE)
-
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Git DEFAULT_MSG GIT_EXECUTABLE)


ENH: Tcl/Tk 8.5

ENH: Tcl/Tk 8.5

--- CMake/FindTCL.cmake
+++ CMake/FindTCL.cmake
@@ -134,6 +134,7 @@
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/include"
+  ${TCL_FRAMEWORK_INCLUDES}
   "$ENV{ProgramFiles}/Tcl/include"
   "C:/Program Files/Tcl/include"
   "C:/Tcl/include"
@@ -148,11 +149,17 @@
 )

 FIND_PATH(TCL_INCLUDE_PATH tcl.h
-  ${TCL_FRAMEWORK_INCLUDES} ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+  ${TCLTK_POSSIBLE_INCLUDE_PATHS} NO_DEFAULT_PATH
+)
+FIND_PATH(TCL_INCLUDE_PATH tcl.h
+  ${TCLTK_POSSIBLE_INCLUDE_PATHS}
 )

 FIND_PATH(TK_INCLUDE_PATH tk.h
-  ${TK_FRAMEWORK_INCLUDES} ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+  ${TCLTK_POSSIBLE_INCLUDE_PATHS} NO_DEFAULT_PATH
+)
+FIND_PATH(TK_INCLUDE_PATH tk.h
+  ${TCLTK_POSSIBLE_INCLUDE_PATHS}
 )

 # handle the QUIETLY and REQUIRED arguments and set TCL_FOUND to TRUE if


Implemented DLL export for Windows. Added ZORBA_MINIMAL_STORE global define.

--- include/zorba/config.h.cmake
+++ include/zorba/config.h.cmake
@@ -93,17 +93,54 @@
 #cmakedefine ZORBA_NO_XMLSCHEMA
 #cmakedefine ZORBA_NO_BIGNUMBERS

+/* to use minimal store or simplestore*/
+#cmakedefine  ZORBA_MINIMAL_STORE
+
 /* Windows MSVC DLL */
+#cmakedefine ZORBA_WIN_DLL
+
 #define    ZORBA_EXTERN_DECL
-#cmakedefine ZORBA_WIN_DLL
+#define    STORE_EXTERN_DECL
+#define    ZORBAUTILS_EXTERNAL_DECL
+#define    ZORBATYPES_EXTERNAL_DECL
+#define    ZORBAERRORS_EXTERN_DECL
+
 #ifdef ZORBA_WIN_DLL
   #undef    ZORBA_EXTERN_DECL
+  #undef    STORE_EXTERN_DECL
+//  #undef    ZORBAUTILS_EXTERNAL_DECL
+  #undef    ZORBATYPES_EXTERNAL_DECL
+//  #undef    ZORBAERRORS_EXTERN_DECL
 #ifdef ZORBA_INTERNAL
   #define   ZORBA_EXTERN_DECL    __declspec(dllexport)
 #else
   #define   ZORBA_EXTERN_DECL    __declspec(dllimport)
 #endif

+#ifdef STORE_INTERNAL
+  #define   STORE_EXTERN_DECL    __declspec(dllexport)
+#else
+  #define   STORE_EXTERN_DECL    __declspec(dllimport)
+#endif
+
+//#ifdef ZORBAUTILS_INTERNAL
+//  #define   ZORBAUTILS_EXTERNAL_DECL    __declspec(dllexport)
+//#else
+//  #define   ZORBAUTILS_EXTERNAL_DECL    __declspec(dllimport)
+//#endif
+
+#ifdef ZORBATYPES_INTERNAL
+  #define   ZORBATYPES_EXTERNAL_DECL    __declspec(dllexport)
+#else
+  #define   ZORBATYPES_EXTERNAL_DECL    __declspec(dllimport)
+#endif
+
+//#ifdef ZORBAERRORS_INTERNAL
+//  #define   ZORBAERRORS_EXTERN_DECL    __declspec(dllexport)
+//#else
+//  #define   ZORBAERRORS_EXTERN_DECL    __declspec(dllimport)
+//#endif
+
 #endif

 #endif


Fix caffe_add_whole_archive_flag in cmake (#2062)

--- cmake/Utils.cmake
+++ cmake/Utils.cmake
@@ -132,7 +132,7 @@
 ##############################################################################
 # Helper function to add whole_archive flag around a library.
 function(caffe_add_whole_archive_flag lib output_var)
-  if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+  if(APPLE)
     set(${output_var} -Wl,-force_load,$<TARGET_FILE:${lib}> PARENT_SCOPE)
   elseif(MSVC)
     # In MSVC, we will add whole archive in default.


References lp:1193079 - bumped wsrep version to 7.5

--- cmake/wsrep.cmake
+++ cmake/wsrep.cmake
@@ -17,7 +17,7 @@
 # so WSREP_VERSION is produced regardless

 # Set the patch version
-SET(WSREP_PATCH_VERSION "7.3")
+SET(WSREP_PATCH_VERSION "7.5")

 # Obtain patch revision number
 SET(WSREP_PATCH_REVNO $ENV{WSREP_REV})


Fix for `CAPNP_GENERATE_CPP` function output path mismatch Before, when no `CAPNPC_OUTPUT_DIR` was defined, output path was ambiguous (set to `.` for custom command). `SOURCES` and `HEADERS` were statically set to input file name (plus suffix) without concidering where custom command will place generated files. Now if no `CAPNPC_OUTPUT_DIR` is defined, it's set by default to `CMAKE_CURRENT_BINARY_DIR` (this is basically `.`) and prevents any ambiguity.

--- c++/cmake/FindCapnProto.cmake
+++ c++/cmake/FindCapnProto.cmake
@@ -72,12 +72,12 @@
     endforeach()
   endif()

-  if(DEFINED CAPNPC_OUTPUT_DIR)
-    # Prepend a ':' to get the format for the '-o' flag right
-    set(output_dir ":${CAPNPC_OUTPUT_DIR}")
-  else()
-    set(output_dir ":.")
-  endif()
+  if (NOT DEFINED CAPNPC_OUTPUT_DIR)
+    set (CAPNPC_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+  endif()
+
+  # Prepend a ':' to get the format for the '-o' flag right
+  set(output_dir ":${CAPNPC_OUTPUT_DIR}")

   if(NOT DEFINED CAPNPC_SRC_PREFIX)
     set(CAPNPC_SRC_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -91,20 +91,16 @@
     get_filename_component(file_dir "${file_path}" PATH)

     # Figure out where the output files will go
-    if (NOT DEFINED CAPNPC_OUTPUT_DIR)
-      set(output_base "${file_path}")
-    else()
-      # Output files are placed in CAPNPC_OUTPUT_DIR, at a location as if they were
-      # relative to CAPNPC_SRC_PREFIX.
-      string(LENGTH "${CAPNPC_SRC_PREFIX}" prefix_len)
-      string(SUBSTRING "${file_path}" 0 ${prefix_len} output_prefix)
-      if(NOT "${CAPNPC_SRC_PREFIX}" STREQUAL "${output_prefix}")
-        message(SEND_ERROR "Could not determine output path for '${schema_file}' ('${file_path}') with source prefix '${CAPNPC_SRC_PREFIX}' into '${CAPNPC_OUTPUT_DIR}'.")
-      endif()
+    # Output files are placed in CAPNPC_OUTPUT_DIR, at a location as if they were
+    # relative to CAPNPC_SRC_PREFIX.
+    string(LENGTH "${CAPNPC_SRC_PREFIX}" prefix_len)
+    string(SUBSTRING "${file_path}" 0 ${prefix_len} output_prefix)
+    if(NOT "${CAPNPC_SRC_PREFIX}" STREQUAL "${output_prefix}")
+      message(SEND_ERROR "Could not determine output path for '${schema_file}' ('${file_path}') with source prefix '${CAPNPC_SRC_PREFIX}' into '${CAPNPC_OUTPUT_DIR}'.")
+    endif()

-      string(SUBSTRING "${file_path}" ${prefix_len} -1 output_path)
-      set(output_base "${CAPNPC_OUTPUT_DIR}${output_path}")
-    endif()
+    string(SUBSTRING "${file_path}" ${prefix_len} -1 output_path)
+    set(output_base "${CAPNPC_OUTPUT_DIR}${output_path}")

     add_custom_command(
       OUTPUT "${output_base}.c++" "${output_base}.h"


Set correct path for Leap Motion static link library on Windows

--- indra/cmake/LeapMotion.cmake
+++ indra/cmake/LeapMotion.cmake
@@ -15,9 +15,15 @@
   if (DARWIN)
     set(LEAP_MOTION_LIBRARY libLeap.dylib)
   elseif (WINDOWS)
-    set(LEAP_MOTION_LIBRARY
-        debug Leapd.lib
-        optimized Leap.lib)
+    if (ND_BUILD64BIT_ARCH)
+        set(LEAP_MOTION_LIBRARY
+            debug ${LIBS_PREBUILT_DIR}/lib/debug/x64/Leapd.lib
+            optimized ${LIBS_PREBUILT_DIR}/lib/release/x64/Leap.lib)
+    else (ND_BUILD64BIT_ARCH)
+        set(LEAP_MOTION_LIBRARY
+            debug ${LIBS_PREBUILT_DIR}/lib/debug/x86/Leapd.lib
+            optimized ${LIBS_PREBUILT_DIR}/lib/release/x86/Leap.lib)
+    endif (ND_BUILD64BIT_ARCH)
    elseif (LINUX)
      set(LEAP_MOTION_LIBRARY libLeap.so)
    endif()


Remove install prefix for portable installs

--- packages/pack-libzeug.cmake
+++ packages/pack-libzeug.cmake
@@ -150,7 +150,7 @@
     set(CPACK_INSTALL_CMAKE_PROJECTS        "${CMAKE_BINARY_DIR};${project_root};ALL;/")
     set(CPACK_PACKAGE_INSTALL_DIRECTORY     "${package_name}")
     set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY  "${package_name}")
-    if(NOT WIN32)
+    if(NOT WIN32 AND NOT OPTION_PORTABLE_INSTALL)
         set(CPACK_INSTALL_PREFIX            "/usr/")
     endif()


[HDF5] add HDF5_INCLUDE_DIRS to status message

--- SuperBuild/External_HDF5.cmake
+++ SuperBuild/External_HDF5.cmake
@@ -50,7 +50,7 @@
  else()
     if(${USE_SYSTEM_${externalProjName}})
       find_package(${proj} ${${externalProjName}_REQUIRED_VERSION} REQUIRED)
-      message(STATUS "USING the system ${externalProjName}, found HDF5_C_LIBRARY_hdf5=${HDF5_C_LIBRARY_hdf5}")
+      message(STATUS "USING the system ${externalProjName}, found HDF5_INCLUDE_DIRS=${HDF5_INCLUDE_DIRS}, HDF5_C_LIBRARY_hdf5=${HDF5_C_LIBRARY_hdf5},HDF5_LIBRARIES=${HDF5_LIBRARIES}")
   endif()
   ExternalProject_Add_Empty(${proj} "${${proj}_DEPENDENCIES}")
 endif()


fdatasync is not documented on Snow Leopard and is not in unistd.h CMake finds it as it is expored by system libraries, though attempts to use it will result bring a warning. Fix by using CHECK_SYMBOL_EXISTS instead of CHECK_FUNCTION_EXISTS

--- configure.cmake
+++ configure.cmake
@@ -21,6 +21,7 @@
 INCLUDE (CheckFunctionExists)
 INCLUDE (CheckCCompilerFlag)
 INCLUDE (CheckCSourceRuns)
+INCLUDE (CheckSymbolExists)

 # Sometimes it is handy to know if PIC option
@@ -521,7 +522,7 @@
 CHECK_FUNCTION_EXISTS_UNIX (fchmod HAVE_FCHMOD)
 CHECK_FUNCTION_EXISTS_UNIX (fcntl HAVE_FCNTL)
 CHECK_FUNCTION_EXISTS_UNIX (fconvert HAVE_FCONVERT)
-CHECK_FUNCTION_EXISTS_UNIX (fdatasync HAVE_FDATASYNC)
+CHECK_SYMBOL_EXISTS_UNIX(fdatasync "unistd.h" HAVE_FDATASYNC)
 CHECK_FUNCTION_EXISTS_UNIX (fesetround HAVE_FESETROUND)
 CHECK_FUNCTION_EXISTS_UNIX (fpsetmask HAVE_FPSETMASK)
 CHECK_FUNCTION_EXISTS_UNIX (fseeko HAVE_FSEEKO)
@@ -657,7 +658,7 @@
 #
 # Tests for symbols
 #
-INCLUDE (CheckSymbolExists)
+
 CHECK_SYMBOL_EXISTS_UNIX(sys_errlist "stdio.h" HAVE_SYS_ERRLIST)
 CHECK_SYMBOL_EXISTS_UNIX(madvise "sys/mman.h" HAVE_DECL_MADVISE)
 CHECK_SYMBOL_EXISTS_UNIX(tzname "time.h" HAVE_TZNAME)


added missing quotes

added missing quotes

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

--- cmake/Modules/FindFlann.cmake
+++ cmake/Modules/FindFlann.cmake
@@ -28,7 +28,7 @@

   find_library(FLANN_LIBRARY_DEBUG
                NAMES flann_cpp_s-gd flann_cpp-gd flann_cpp_s flann_cpp
-               HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT} $ENV{FLANN_ROOT}"
+               HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
                PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann"
                      "$ENV{PROGRAMFILES}/flann 1.6.9" "$ENV{PROGRAMW6432}/flann 1.6.9"
                PATH_SUFFIXES lib)
@@ -40,7 +40,7 @@

   find_library(FLANN_LIBRARY_DEBUG
                NAMES flann_cpp-gd flann_cpp
-               HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT} $ENV{FLANN_ROOT}"
+               HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
                PATH_SUFFIXES lib)
 endif(WIN32)


Clang assembler with GCC on macOS fix

Clang assembler with GCC on macOS fix

--- cmake/Packages/Packages.cmake
+++ cmake/Packages/Packages.cmake
@@ -353,7 +353,7 @@

     include(FindSSE)

-    GET_SSE_COMPILE_FLAGS(_CXX_FLAGS_EXTRA SSE_DEFINITIONS)
+    GET_SSE_COMPILE_FLAGS(SSE_FLAGS SSE_DEFINITIONS)
     foreach(_DEF ${SSE_DEFINITIONS})
         add_definitions(-D${_DEF})
     endforeach()


Add failback for unsupported scm version formats. (#67)

--- cmake/bde_package_group.cmake
+++ cmake/bde_package_group.cmake
@@ -42,10 +42,19 @@
         internal_read_version_tag(${file2c})
     endif()

-    if (NOT DEFINED _v_MAJOR OR
-        NOT DEFINED _v_MINOR OR
-        NOT DEFINED _v_PATCH)
-        message(FATAL_ERROR "Missing scm version tags for ${groupName}")
+    if (NOT DEFINED _v_MAJOR)
+        set(_v_MAJOR "1")
+        bde_log(VERBOSE "Setting Major version: ${_v_MAJOR}")
+    endif()
+
+    if (NOT DEFINED _v_MINOR)
+        set(_v_MINOR "0")
+        bde_log(VERBOSE "Setting Minor version: ${_v_MINOR}")
+    endif()
+
+    if (NOT DEFINED _v_PATCH)
+        set(_v_PATCH "0")
+        bde_log(VERBOSE "Setting Patch version: ${_v_PATCH}")
     endif()

     set(versionTag "${_v_MAJOR}.${_v_MINOR}.${_v_PATCH}")


Upgrade pybind11 to v2.2.4 to support Python3.7

test=develop

--- cmake/external/pybind11.cmake
+++ cmake/external/pybind11.cmake
@@ -26,7 +26,7 @@
         extern_pybind
         ${EXTERNAL_PROJECT_LOG_ARGS}
         GIT_REPOSITORY  "https://github.com/pybind/pybind11.git"
-        GIT_TAG         "v2.1.1"
+        GIT_TAG         "v2.2.4"
         PREFIX          ${PYBIND_SOURCE_DIR}
         UPDATE_COMMAND  ""
         CONFIGURE_COMMAND ""


Possible fix for curl lib errors

Possible fix for curl lib errors

--- cmake/modules/BuildCURL.cmake
+++ cmake/modules/BuildCURL.cmake
@@ -31,9 +31,10 @@
 set(CURL_INCLUDE_DIRS "${install_dir}/include")

 if(WIN32)
-  set(CURL_LIBRARY "$<$<CONFIG:Release>:${install_dir}/lib/libcurl_imp.lib>$<$<CONFIG:Debug>:${install_dir}/lib/libcurl-d_imp.lib>")
+  set(CURL_LIBRARY_POSTFIX "$<$<CONFIG:Debug>:-d>")
+  set(CURL_LIBRARY "${install_dir}/lib/libcurl${CURL_LIBRARY_POSTFIX}_imp.lib>")
   set(CURL_LIBRARIES "${CURL_LIBRARY}")
-  set(CURL_INSTALL_LIBS "$<$<CONFIG:Release>:${install_dir}/bin/libcurl.dll>$<$<CONFIG:Debug>:${install_dir}/bin/libcurl-d.dll>")
+  set(CURL_INSTALL_LIBS "${install_dir}/bin/libcurl${CURL_LIBRARY_POSTFIX}.dll")
 else()
   set(CURL_LIBRARY "${install_dir}/lib/libcurl.so")
   set(CURL_LIBRARIES "${CURL_LIBRARY}")


CMake: robust version extraction for P4Est

Make the version extraction in P4Est more robust: We should not rely on
the version string to define SUBMINOR and PATCH - this doesn't have to
be the case. So, always set P4EST_VERSION_SUBMINOR and
P4EST_VERSION_PATCH to "0" in FindP4EST.cmake if no valid number could
be extracted.

--- cmake/modules/FindP4EST.cmake
+++ cmake/modules/FindP4EST.cmake
@@ -134,15 +134,20 @@
   STRING(REGEX REPLACE
     "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
     P4EST_VERSION_SUBMINOR "${P4EST_VERSION}")
+  STRING(REGEX REPLACE
+    "^[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1"
+    P4EST_VERSION_PATCH "${P4EST_VERSION}")

-  # Now for the patch number such as in 0.3.4.1. If there
-  # is no patch number, then REGEX REPLACE will set
-  # P4EST_VERSION_PATCH to an empty string. If that
-  # is the case, then set the patch number to zero
-  STRING(REGEX REPLACE
-    "^[0-9]+\\.[0-9]+\\.[0-9]+\\.?(([0-9]+)?).*$" "\\1"
-    P4EST_VERSION_PATCH "${P4EST_VERSION}")
-  IF("${P4EST_VERSION_PATCH}" STREQUAL "")
+  #
+  # We cannot rely on the fact that SUBMINOR or PATCH are defined.
+  # Nevertheless, we need a full version number for our preprocessor macros
+  # to work. Therefore, set those numbers to 0 if necessary.
+  #
+  IF("${P4EST_VERSION_SUBMINOR}" MATCHES "^(|${P4EST_VERSION})$")
+    SET(P4EST_VERSION_SUBMINOR "0")
+  ENDIF()
+
+  IF("${P4EST_VERSION_PATCH}" MATCHES "^(|${P4EST_VERSION})$")
     SET(P4EST_VERSION_PATCH "0")
   ENDIF()
 ENDIF()


Add petsc conf hint for petsc>=3.7

Add petsc conf hint for petsc>=3.7

--- cmake/modules/FindPETSC.cmake
+++ cmake/modules/FindPETSC.cmake
@@ -126,7 +126,7 @@
 DEAL_II_FIND_FILE(PETSC_PETSCVARIABLES
   NAMES petscvariables
   HINTS ${PETSC_DIR}/${PETSC_ARCH} ${PETSC_DIR}
-  PATH_SUFFIXES conf
+  PATH_SUFFIXES conf lib/petsc/conf
   )

 IF(NOT PETSC_PETSCVARIABLES MATCHES "-NOTFOUND")


[Doc] doxy2swig: remove uneeded flags

[Doc] doxy2swig: remove uneeded flags

--- cmake/swig_python_tools.cmake
+++ cmake/swig_python_tools.cmake
@@ -31,11 +31,6 @@
           DEPENDS ${DOXYGEN_OUTPUT}/xml/${_FWE_XML}.xml
           COMMAND ${PYTHON_EXECUTABLE}
 	  ARGS "${CMAKE_BINARY_DIR}/share/doxy2swig.py"
-          "--function-signature"
-          "--type-info"
-          "--constructor-list"
-          "--attribute-list"
-          "--overloaded-functions"
 	  ${DOXYGEN_OUTPUT}/xml/${_FWE_XML}.xml ${outfile_name}
           COMMENT "docstrings generation for ${_FWE} (parsing ${_FWE_XML}.xml)")
 	add_custom_target(doc_${_FWE_XML}.i DEPENDS ${outfile_name})
@@ -87,6 +82,10 @@
   # Add component dependencies to the current submodule deps.
   if(DEFINED SWIG_MODULE_${COMPONENT}_EXTRA_DEPS)
     set(SWIG_MODULE_${_name}_EXTRA_DEPS ${SWIG_MODULE_${COMPONENT}_EXTRA_DEPS})
+  endif()
+
+  if(WITH_DOXY2SWIG)
+    list(APPEND SWIG_MODULE_${_name}_EXTRA_DEPS ${COMPONENTS}_docstrings)
   endif()

   # add as dependencies all the i files
@@ -153,9 +152,6 @@
     swig_link_libraries(${_name} ${PYTHON_LIBRARIES} ${${COMPONENT}_LINK_LIBRARIES} ${COMPONENT})
   endif()

-  # set dep between docstrings and python bindings
-  add_dependencies(${SWIG_MODULE_${_name}_REAL_NAME} ${COMPONENT}_docstrings)
-
   # set dependency of sphinx apidoc to this target
   if(USE_SPHINX)
     add_dependencies(apidoc ${SWIG_MODULE_${_name}_REAL_NAME})


Change the threshold for client test

Change the threshold for client test

--- cmake/travis_continuous.cmake
+++ cmake/travis_continuous.cmake
@@ -15,7 +15,7 @@
   "-DSPARK_TEST_MASTER_URL=spark://localhost:7077"
   "-DPYTHON_COVERAGE_CONFIG=${MINERVA_COVERAGE_CONFIG}"
   "-DCOVERAGE_MINIMUM_PASS=68"
-  "-DJS_COVERAGE_MINIMUM_PASS=22"
+  "-DJS_COVERAGE_MINIMUM_PASS=21"
 )

 ctest_start("Continuous")


Add sodium source files to allow calling sodium_init

--- ext/sodium.cmake
+++ ext/sodium.cmake
@@ -58,36 +58,31 @@
 	# libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c
 	libsodium/src/libsodium/crypto_hash/sha512/hash_sha512_api.c
 	libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c
-	# libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c
-	# libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c
-	# libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/verify_poly1305_donna.c
-	# libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c
-	# libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c
-	# libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c
+	libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c
+	libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c
+	libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c
+	libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c
+	libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c
+	libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.c
+	libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c
+	libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c
+	libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c
+	libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.c
+	libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c
+	libsodium/src/libsodium/crypto_pwhash/crypto_pwhash.c
 	# libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c
 	# libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c
 	# libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c
 	# libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c
 	# libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c
 	# libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c
-	# libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/base_curve25519_donna_c64.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/base_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_0_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_1_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_add_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_copy_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_cswap_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_frombytes_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_invert_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_mul121666_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_mul_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_sq_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_sub_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/fe_tobytes_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/scalarmult_curve25519_ref10.c
-	# libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c
+	libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c
+	libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c
+	libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c
+	libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c
+	libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c
+	libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c
+	libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c
 	# libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c
 	# libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c
 	# libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c
@@ -109,9 +104,10 @@
 	# libsodium/src/libsodium/crypto_stream/aes128ctr/portable/stream_aes128ctr.c
 	# libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c
 	# libsodium/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr_api.c
-	# libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c
-	# libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20_api.c
-	# libsodium/src/libsodium/crypto_stream/crypto_stream.c
+	libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.c
+	libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.c
+	libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c
+	libsodium/src/libsodium/crypto_stream/crypto_stream.c
 	# libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c
 	# libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c
 	# libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c
@@ -124,8 +120,8 @@
 	# libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c
 	# libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c
 	# libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c
-	# libsodium/src/libsodium/crypto_verify/16/ref/verify_16.c
-	# libsodium/src/libsodium/crypto_verify/16/verify_16_api.c
+	libsodium/src/libsodium/crypto_verify/16/ref/verify_16.c
+	libsodium/src/libsodium/crypto_verify/16/verify_16_api.c
 	libsodium/src/libsodium/crypto_verify/32/ref/verify_32.c
 	libsodium/src/libsodium/crypto_verify/32/verify_32_api.c
 	# libsodium/src/libsodium/crypto_verify/64/ref/verify_64.c


Doxygen: Modified the Open HTML command to work on Mac and Unix

--- tools/doxygen/doxygen.cmake
+++ tools/doxygen/doxygen.cmake
@@ -422,9 +422,18 @@

     if(${IVW_DOXYGEN_OPEN_HTML_AFTER_BUILD})
+        if(WIN32)
+            set(OPEN_COMMAND "start")
+        elseif(APPLE)
+            set(OPEN_COMMAND "open")
+        else()
+            set(OPEN_COMMAND "xdg-open")
+        endif()
+
         add_custom_command(TARGET DOXY-Inviwo
             POST_BUILD
-            COMMAND "${output_dir}/inviwo/html/index.html"
+            COMMAND ${OPEN_COMMAND}
+            ARGS "${output_dir}/inviwo/html/index.html"
         )
     endif()

@@ -455,4 +464,4 @@
             add_dependencies("DOXY-ALL" "DOXY-HELP-${${mod}_class}")
         endif()
     endforeach()
- endfunction()+ endfunction()


modules: updated FindMagnumIntegration.cmake.

--- modules/FindMagnumIntegration.cmake
+++ modules/FindMagnumIntegration.cmake
@@ -80,7 +80,7 @@
 set(_MAGNUMINTEGRATION_DEPENDENCIES )
 foreach(_component ${MagnumIntegration_FIND_COMPONENTS})
     if(_component STREQUAL Bullet)
-        set(_MAGNUMINTEGRATION_${_component}_MAGNUM_DEPENDENCIES SceneGraph Shapes GL)
+        set(_MAGNUMINTEGRATION_${_component}_MAGNUM_DEPENDENCIES SceneGraph Shapes Shaders GL)
     endif()
     if(_component STREQUAL Dart)
         set(_MAGNUMINTEGRATION_${_component}_MAGNUM_DEPENDENCIES SceneGraph Primitives MeshTools GL)


BUG: VTKFTGL_SOURCE_DIR, VTKFTGL_BINARY_DIR, VTKFREETYPE_SOURCE_DIR, and VTKFREETYPE_BINARY_DIR are not set during the first CMake configure step.  Produce the paths in a way that works the first time.

--- vtkIncludeDirectories.cmake
+++ vtkIncludeDirectories.cmake
@@ -115,10 +115,10 @@
 # Include directories needed for .cxx files in VTK.  These include
 # directories will NOT be available to user projects.
 SET(VTK_INCLUDE_DIRS_BUILD_TREE_CXX
-  ${VTKFREETYPE_SOURCE_DIR}/include
-  ${VTKFREETYPE_BINARY_DIR}
-  ${VTKFTGL_SOURCE_DIR}/src
-  ${VTKFTGL_BINARY_DIR}
+  ${VTK_SOURCE_DIR}/Utilities/vtkfreetype/include
+  ${VTK_BINARY_DIR}/Utilities/vtkfreetype
+  ${VTK_SOURCE_DIR}/Utilities/ftgl/src
+  ${VTK_BINARY_DIR}/Utilities/ftgl
 )

 IF(VTK_RENDERING_NEED_TK_INTERNAL)


fix detection and dep on glog::glog when building via cmake

Summary:
folly exports a dependency on `glog::glog`.  That causes dependent packages to also depend implicitly on glog::glog with no way to resolve what that means, resulting in errors like this:

```
CMake Error at CMakeLists.txt:106 (add_library):
  Target "wangle" links to target "glog::glog" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?
```

We cannot rely on `glog` having installed its configuration for a simple `find_package(glog CONFIG)`; the version of `glog` provided by some versions of ubuntu doesn't install a `.cmake` file for this.

That means that we need to detect it for ourselves.

This diff enhances the `FindGlog.cmake` script to define a `glog::glog` target so that we can consistently depend upon it throughout the set of related packages.

It is unfortunate that we have duplication of the `FindGlog.cmake` files across these projects; a follow up diff could place these in eg: fbcode_builder and arrange to have shipit to copy them to the right place at shipit time.

Reviewed By: strager

Differential Revision: D13482288

fbshipit-source-id: d19716871edce29019114030e4c82911ac345adb

--- wangle/cmake/FindGlog.cmake
+++ wangle/cmake/FindGlog.cmake
@@ -23,3 +23,9 @@

 set(GLOG_LIBRARIES ${GLOG_LIBRARY})
 set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
+
+if (NOT TARGET glog::glog)
+  add_library(glog::glog UNKNOWN IMPORTED)
+  set_target_properties(glog::glog PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIRS}")
+  set_target_properties(glog::glog PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${GLOG_LIBRARIES}")
+endif()


Set version for CPack.

Set version for CPack.

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -12,8 +12,8 @@

 ### versions
 set(CPACK_PACKAGE_VERSION_MAJOR "0")
-set(CPACK_PACKAGE_VERSION_MINOR "41")
-set(CPACK_PACKAGE_VERSION_PATCH "98")
+set(CPACK_PACKAGE_VERSION_MINOR "42")
+set(CPACK_PACKAGE_VERSION_PATCH "0")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

 set(CPACK_GENERATOR "TGZ")


Raise the error/warning limit.

Raise the error/warning limit.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -11,3 +11,7 @@
 set(CTEST_DROP_SITE "eigen.tuxfamily.org")
 set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Eigen")
 set(CTEST_DROP_SITE_CDASH TRUE)
+
+## A tribute to Dynamic!
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "33331")
+set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "33331")


changed the CTestConfig.cmake to remove errors during cdash submission

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -18,8 +18,9 @@
 ######################################################################

 set(CTEST_PROJECT_NAME "Mediseen-medinria")
-set(NIGHTLY_START_TIME "21:00:00 EST")
-set(DROP_METHOD "http")
-set(DROP_SITE "cdash.inria.fr")
-set(DROP_LOCATION "/CDash/submit.php?project=Mediseen-medinria")
-set(DROP_SITE_CDASH TRUE)
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Mediseen-medinria")
+
+set(CTEST_NIGHTLY_START_TIME "21:00:00 EST")
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "cdash.inria.fr")
+set(CTEST_DROP_SITE_CDASH TRUE)


ffmpeg: update OpenCV FFmpeg wrapper (3.4)

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,8 +1,8 @@
-# Binaries branch name: ffmpeg/master_20180220
-# Binaries were created for OpenCV: 9819ebc0954c2df62943ebbd5936d325e5dc89e1
-ocv_update(FFMPEG_BINARIES_COMMIT "0a0e88972a7ea97708378d0488a65f83e7cc5e69")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "b8120c07962d591e2e9071a1bf566fd0")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "dc9c50e7b05482acc25d6ce0ac61bf1d")
+# Binaries branch name: ffmpeg/3.4_20180608
+# Binaries were created for OpenCV: f5ddbbf65937d8f44e481e4ee1082961821f5c62
+ocv_update(FFMPEG_BINARIES_COMMIT "8041bd6f5ad37045c258904ba3030bb3442e3911")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "fa5a2a4e2f37defcb95bde8ed145c2b3")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "2cc08fc4fef8199fe80e0f126684834f")
 ocv_update(FFMPEG_FILE_HASH_CMAKE "3b90f67f4b429e77d3da36698cef700c")

 function(download_win_ffmpeg script_var)


vtkTestingMacros: Remove unused code

vtkTestingMacros: Remove unused code

Remove unused vtk_tests_python macro.
Remove unused -A "${VTK_LIBRARY_DIR}" argument.
Remove computation of unused local _baselinedname value.

Change-Id: I3f28e28e6f8576380c3e1aa51c0fb66a11e1c5ff

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -130,33 +130,6 @@
 endmacro()

 # -----------------------------------------------------------------------------
-# vtk_tests_python() macro takes a list of python files and makes them into
-# proper python tests.
-macro(vtk_tests_python)
-  if(VTK_PYTHON_EXE)
-    foreach(test ${ARGV})
-      get_filename_component(TName ${test} NAME_WE)
-      if(VTK_DATA_ROOT)
-        string (REPLACE "vtk" "" _baselinedname ${vtk-module})
-        add_test(NAME ${vtk-module}Python-${TName}
-          COMMAND ${VTK_PYTHON_EXE}
-          ${CMAKE_CURRENT_SOURCE_DIR}/${test}
-          -D ${VTK_DATA_ROOT}
-          -B ${VTK_DATA_ROOT}/Baseline/${_baselinedname})
-      else()
-        add_test(NAME ${vtk-module}Python-${TName}
-          COMMAND ${VTK_PYTHON_EXE}
-          ${CMAKE_CURRENT_SOURCE_DIR}/${test}
-          ${${TName}_ARGS})
-      endif()
-    endforeach()
-  else()
-    message(FATAL_ERROR "VTK_PYTHON_EXE not set")
-  endif()
-
-endmacro(vtk_tests_python)
-
-# -----------------------------------------------------------------------------
 # add_test_python() macro takes a python file and an optional base directory where the
 # corresponding test image is found and list of python files and makes them into
 # proper python tests.
@@ -164,7 +137,6 @@
   if(VTK_PYTHON_EXE)
     # Parse Command line args
     get_filename_component(TName ${ARGV0} NAME_WE)
-    string (REPLACE "vtk" "" _baselinedname ${vtk-module})
     # Check if data root and second parameter is present
     set (base_dir "${ARGV1}")
     if(VTK_DATA_ROOT AND base_dir)
@@ -175,8 +147,7 @@
         -D ${VTK_DATA_ROOT}
         -T ${VTK_BINARY_DIR}/Testing/Temporary
         -V Baseline/${ARGV1}/${TName}.png
-        -A "${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py"
-        -A "${VTK_LIBRARY_DIR}")
+        -A "${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py")
     else()
       add_test(NAME ${vtk-module}Python-${TName}
         COMMAND ${VTK_PYTHON_EXE}
@@ -202,7 +173,6 @@
   if(VTK_PYTHON_EXE)
     # Parse Command line args
     get_filename_component(TName ${ARGV0} NAME_WE)
-    string (REPLACE "vtk" "" _baselinedname ${vtk-module})
     # Check if data root and second parameter is present
     set (base_dir "${ARGV1}")
     if(VTK_DATA_ROOT AND base_dir)
@@ -231,7 +201,6 @@
   if(VTK_TCL_EXE)
     # Parse Command line args
     get_filename_component(TName ${ARGV0} NAME_WE)
-    string (REPLACE "vtk" "" _baselinedname ${vtk-module})
     # Check if data root and second parameter is present
     set (base_dir "${ARGV1}")
     if(VTK_DATA_ROOT AND base_dir)


Add a custom target for hierarchy file.

Add a custom target for hierarchy file.

This is needed for compatibility for VTK master from 2018 onwards,
i.e. for the upcoming VTK 9 code base.

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -161,5 +161,8 @@
             ${INPUT_FILES}
     VERBATIM
     )
+  add_custom_target(${module_name}Hierarchy
+    DEPENDS
+      ${OUTPUT_DIR}/${module_name}Hierarchy.stamp.txt)

 endmacro()


Install all cmake files in same directory.

I.e. sync with how CMakeLists.txt does it.

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -245,12 +245,11 @@
 # Create the CMake package files
 include(CMakePackageConfigHelpers)

-if (WIN32)
-   set(OGRE_CMAKE_DIR CMake)
-elseif (UNIX)
-   set(OGRE_CMAKE_DIR lib/OGRE/cmake)
-elseif (APPLE)
-endif ()
+if(WIN32 OR APPLE)
+  set(OGRE_CMAKE_DIR "CMake")
+else()
+  set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
+endif()
 configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${OGRE_BINARY_DIR}/cmake/OGREConfig.cmake
     INSTALL_DESTINATION ${OGRE_CMAKE_DIR}
     PATH_VARS CMAKE_INSTALL_PREFIX)


Support JUST_VALID for Python tests

Support JUST_VALID for Python tests

This skips the rtImage.py trampoline which is unnecessary for some tests
(ParaView).

Change-Id: I167ba77a2784ee3c63727399136f393a21cc25f5

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -321,6 +321,7 @@
     NO_VALID
     NO_OUTPUT
     NO_RT
+    JUST_VALID
     )
   _vtk_test_parse_args("${python_options}" "py" ${ARGN})
   _vtk_test_set_options("${python_options}" "" ${options})
@@ -356,9 +357,11 @@
       if(local_NO_RT)
         set(_B -B "DATA{${baseline_dir}/,REGEX:${name}(_[0-9]+)?.png}")
       else()
-        set(rtImageTest ${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py/rtImageTest.py)
         set(_V -V "DATA{${baseline_dir}/${name}.png,:}")
-        set(_A -A ${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py)
+        if(NOT local_JUST_VALID)
+          set(rtImageTest ${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py/rtImageTest.py)
+          set(_A -A ${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py)
+        endif()
       endif()
     endif()


Remove EXTERNAL_SET_DEPENDENCY machinery.

It didn't make any sense to have that in there. If a subproject
wants to import something that uses Google Test and Google Mock
then it has to guaruntee that it is built before it is built. E.g,

 - superproject
   - gmock(a)
   - subproject (depends on gmock)
     - gmock(b) (imported from a)
     - subsubproject
       - gmock(c) (imported from a)


Add --package and --pkgdir args to rostest invocation, so that it will work with .test files that are configured into the build space.  On a related note, allow absolute paths to test files.

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -77,11 +77,15 @@

   # Check that the file exists, #1621
   set(_file_name _file_name-NOTFOUND)
-  find_file(_file_name ${file}
-            PATHS ${CMAKE_CURRENT_SOURCE_DIR}
-            NO_DEFAULT_PATH)
-  if(NOT _file_name)
-    message(FATAL_ERROR "Can't find pyunit file \"${file}\"")
+  if(IS_ABSOLUTE ${file})
+    set(_file_name ${file})
+  else()
+    find_file(_file_name ${file}
+              PATHS ${CMAKE_CURRENT_SOURCE_DIR}
+              NO_DEFAULT_PATH)
+    if(NOT _file_name)
+      message(FATAL_ERROR "Can't find pyunit file \"${file}\"")
+    endif()
   endif()

   # We look for ROS_TEST_COVERAGE=1
@@ -142,12 +146,15 @@
   endif()

   # Check that the directory exists
-  set(_dir_name _dir_name-NOTFOUND)
-  find_file(_dir_name ${dir}
-            PATHS ${CMAKE_CURRENT_SOURCE_DIR}
-            NO_DEFAULT_PATH)
-  if(NOT _dir_name)
-    message(FATAL_ERROR "Can't find nosetests dir \"${dir}\"")
+  if(IS_ABSOLUTE ${dir})
+    set(_dir_name ${dir})
+  else()
+    find_file(_dir_name ${dir}
+              PATHS ${CMAKE_CURRENT_SOURCE_DIR}
+              NO_DEFAULT_PATH)
+    if(NOT _dir_name)
+      message(FATAL_ERROR "Can't find nosetests dir \"${dir}\"")
+    endif()
   endif()

   # We look for ROS_TEST_COVERAGE=1
@@ -180,14 +187,18 @@

   # Check that the file exists, #1621
   set(_file_name _file_name-NOTFOUND)
-  find_file(_file_name ${file}
-            PATHS ${CMAKE_CURRENT_SOURCE_DIR}
-            NO_DEFAULT_PATH)
-  if(NOT _file_name)
-    message(FATAL_ERROR "Can't find rostest file \"${file}\"")
-  endif()
-
-  append_test_to_cache(catkin-tests "${_chdir_prefix}${rostest_exe} ${_file_name}${_chdir_suffix}")
+  if(IS_ABSOLUTE ${file})
+    set(_file_name ${file})
+  else()
+    find_file(_file_name ${file}
+              PATHS ${CMAKE_CURRENT_SOURCE_DIR}
+              NO_DEFAULT_PATH)
+    if(NOT _file_name)
+      message(FATAL_ERROR "Can't find rostest file \"${file}\"")
+    endif()
+  endif()
+
+  append_test_to_cache(catkin-tests "${_chdir_prefix}${rostest_exe} --pkgdir=${PROJECT_SOURCE_DIR} --package=${PROJECT_NAME} ${_file_name}${_chdir_suffix}")
 endfunction()

 # Function to download data on the tests target


[CI] change ctest empty binary directory process: impact return_code

--- CI/machinery/CTestDriver.cmake
+++ CI/machinery/CTestDriver.cmake
@@ -93,10 +93,14 @@
 endif()

 #######################################################################
-ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}/)
+# this usually fails for some reasons and ctest may returns a fail code.
+# ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}/)
+# cf discussions here:
+# https://gitlab.kitware.com/cmake/cmake/issues/17000

-# !!
-#file(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY})
+if(CTEST_BINARY_DIRECTORY)
+  file(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY})
+endif()

 find_program(CTEST_GIT_COMMAND NAMES git)
 find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
@@ -158,5 +162,8 @@
 if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
   ctest_memcheck()
 endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
+
+# note: if the submission process experiences some slow-down, then we
+# may get a return-code error, even if the configure, build and test
+# phase are successful.
 ctest_submit()
-


fix: Do not use QUIET option of basis_find_package [BASIS]

The find_package call is done by basis_find_package always with the QUIET option. The basis_find_package itself will print summarize the information about the found package.

--- CMake/Basis/ProjectTools.cmake
+++ CMake/Basis/ProjectTools.cmake
@@ -2012,7 +2012,7 @@
   # --------------------------------------------------------------------------
   # optional dependencies
   foreach (P IN LISTS PROJECT_OPTIONAL_DEPENDS)
-    basis_find_package ("${P}" QUIET)
+    basis_find_package ("${P}")
     basis_use_package  ("${P}")
   endforeach ()

@@ -2048,7 +2048,7 @@
     endforeach ()
     # optional application dependencies
     foreach (P IN LISTS PROJECT_OPTIONAL_TOOLS_DEPENDS)
-      basis_find_package ("${P}" QUIET)
+      basis_find_package ("${P}")
       basis_use_package ("${P}")
     endforeach ()
   endif ()
@@ -2085,7 +2085,7 @@
     endforeach ()
     # optional test dependencies
     foreach (P IN LISTS PROJECT_OPTIONAL_TEST_DEPENDS)
-      basis_find_package ("${P}" QUIET)
+      basis_find_package ("${P}")
       basis_use_package ("${P}")
     endforeach ()
   endif ()


FindGROMACS.cmake: added another error

FindGROMACS.cmake: added another error

--- CMakeModules/FindGROMACS.cmake
+++ CMakeModules/FindGROMACS.cmake
@@ -39,6 +39,9 @@
 if(GMX_DOUBLE AND NOT "${GROMACS_PKG}" MATCHES "_d$")
   message(FATAL_ERROR "GMX_DOUBLE was true, but I was asked to find ${GROMACS_PKG} (without _d at the end) - unlogical!")
 endif(GMX_DOUBLE AND NOT "${GROMACS_PKG}" MATCHES "_d$")
+if(NOT GMX_DOUBLE AND "${GROMACS_PKG}" MATCHES "_d$")
+  message(FATAL_ERROR "GMX_DOUBLE was false, but I was asked to find ${GROMACS_PKG} (with _d at the end) - unlogical!")
+endif(NOT GMX_DOUBLE AND "${GROMACS_PKG}" MATCHES "_d$")

 pkg_check_modules(PC_GROMACS ${GROMACS_PKG})
 if (GMX_DOUBLE)


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -9,6 +9,7 @@
 Name[el]=Στιγμιαία μηνύματα
 Name[en_GB]=Instant Messaging
 Name[es]=Mensajería instantánea
+Name[et]=Kiirsuhtlus
 Name[fa]=پیام‌رسانی فوری
 Name[fi]=Pikaviestintä
 Name[fr]=Messagerie instantanée
@@ -50,6 +51,7 @@
 Comment[el]=Έναρξη συνομιλίας με οποιαδήποτε επαφή στιγμιαίων μηνυμάτων ή αλλαγή της κατάστασής σας
 Comment[en_GB]=Start a chat with any of your IM contacts or change your IM status
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
+Comment[et]=Vestluse alustamine mõne oma kiirsuhtluskontaktiga või enda kiirsuhtlusoleku muutmine
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
 Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci
 Comment[gl]=Inicie unha conversa con calquera dos seus contactos ou cambie seu estado na IM


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -50,7 +50,7 @@
 Comment[ast]=Anicia una charra con cualesquier contautu o camuda'l to estáu
 Comment[bs]=Pokrenite ćaskanje s bilo kojim od vaših IM kontakta ili promijenite svoj IM status
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat a la MI
-Comment[ca@valencia]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat a la MI
+Comment[ca@valencia]=Inicia un chat amb qualsevol dels vostres contactes de MI o canvia el vostre estat a la MI
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
 Comment[da]=Start chat med en af dine IM-kontakter eller skift din IM-status
 Comment[de]=Chats mit ihren Kontakten starten oder Ihren IM-Status ändern


--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -6,6 +6,7 @@
 Name[cs]=Instant Messaging
 Name[da]=Instant messaging
 Name[de]=Instant-Messaging
+Name[el]=Στιγμιαία μηνύματα
 Name[es]=Mensajería instantánea
 Name[fi]=Pikaviestintä
 Name[fr]=Messagerie instantanée
@@ -44,6 +45,7 @@
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM
 Comment[da]=Start chat med en af dine IM-kontakter eller skift din IM-status
 Comment[de]=Chats mit ihren Kontakten starten oder Ihren IM-Status ändern
+Comment[el]=Έναρξη συνομιλίας με οποιαδήποτε επαφή στιγμιαίων μηνυμάτων ή αλλαγή της κατάστασής σας
 Comment[es]=Iniciar una conversación con cualquiera de sus contactos de MI o cambiar su estado de MI
 Comment[fi]=Aloita keskustelu muun pikaviestinkäyttäjän kanssa tai vaihda pikaviestintilaasi
 Comment[fr]=Démarre une discussion avec n'importe lequel de vos contacts de messagerie instantanée ou change l'état de celle-ci


COMP: Error during package generation for extension

The package generation needs additional parameters when installed

--- DTI-Reg.cmake
+++ DTI-Reg.cmake
@@ -25,12 +25,25 @@
   ADD_DEFINITIONS( -DSlicer_Extension )
 endif()

+SETIFEMPTY(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
+SETIFEMPTY(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
+SETIFEMPTY(CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)
+SETIFEMPTY(INSTALL_RUNTIME_DESTINATION bin)
+SETIFEMPTY(INSTALL_LIBRARY_DESTINATION lib)
+SETIFEMPTY(INSTALL_ARCHIVE_DESTINATION lib)
+
 SEMMacroBuildCLI(
   NAME ${MODULE_NAME}
   ${STATIC}
   INCLUDE_DIRECTORIES ${Slicer_DIR}#Only defined if DTI-Reg is built as a Slicer extension
   ADDITIONAL_SRCS ${DTI-Reg_SOURCE}
   TARGET_LIBRARIES ${ITK_LIBRARIES} ${BatchMake_LIBRARIES}
+  RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+  LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+  ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+  INSTALL_RUNTIME_DESTINATION ${INSTALL_RUNTIME_DESTINATION}
+  INSTALL_LIBRARY_DESTINATION ${INSTALL_LIBRARY_DESTINATION}
+  INSTALL_ARCHIVE_DESTINATION ${INSTALL_ARCHIVE_DESTINATION}
 )
 export(TARGETS ${MODULE_NAME} FILE ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-exports.cmake)
 if(BUILD_TESTING)


update: cosmetic changes

update: cosmetic changes

--- share/hugh/cmake/FindHUGH.cmake
+++ share/hugh/cmake/FindHUGH.cmake
@@ -52,7 +52,7 @@
 find_path(HUGH_INCLUDE_DIRS
           NAMES "hugh/support.hpp"
           HINTS ${_hugh_HEADER_SEARCH_DIRS}
-          DOC   "The directory where <hugh/support> resides")
+          DOC   "The directory where <hugh/support.hpp> resides")
 list(REMOVE_DUPLICATES HUGH_INCLUDE_DIRS)

 foreach(lib ${HUGH_FIND_COMPONENTS})
@@ -70,10 +70,10 @@
                                   FOUND_VAR     HUGH_FOUND
                                   REQUIRED_VARS HUGH_ROOT_DIR HUGH_INCLUDE_DIRS HUGH_LIBRARIES)

-#if(HUGH_FOUND AND VERBOSE)
+if(HUGH_FOUND AND VERBOSE)
   message(STATUS "HUGH setup:\n"
     "   HUGH_ROOT_DIR     = ${HUGH_ROOT_DIR}\n"
     "   HUGH_INCLUDE_DIRS = ${HUGH_INCLUDE_DIRS}\n"
     "   HUGH_LIBRARIES    = ${HUGH_LIBRARIES}"
     )
-#endif()
+endif()


Add march flag to gcc x86 to enable SSE

Add march flag to gcc x86 to enable SSE

--- flags/c_cxx-x86.cmake
+++ flags/c_cxx-x86.cmake
@@ -10,4 +10,4 @@
 include(polly_add_cache_flag)

 polly_add_cache_flag(CMAKE_CXX_FLAGS "-m32")
-polly_add_cache_flag(CMAKE_C_FLAGS "-m32")
+polly_add_cache_flag(CMAKE_C_FLAGS "-m32 -march=native")


Improve FindJulia to support in-build usage

--- deps/test/FindJulia.cmake
+++ deps/test/FindJulia.cmake
@@ -35,12 +35,20 @@
 ##################

 execute_process(
-    COMMAND ${Julia_EXECUTABLE} -E "joinpath(match(r\"(.*)(bin)\",JULIA_HOME).captures[1],\"include\",\"julia\")"
+    COMMAND ${Julia_EXECUTABLE} -E "julia_include_dir = joinpath(match(r\"(.*)(bin)\",JULIA_HOME).captures[1],\"include\",\"julia\")\n
+        if !isdir(julia_include_dir)  # then we're running directly from build\n
+          julia_base_dir_aux = splitdir(splitdir(JULIA_HOME)[1])[1]  # useful for running-from-build\n
+          julia_include_dir = joinpath(julia_base_dir_aux, \"usr\", \"include\" )\n
+          julia_include_dir *= \";\" * joinpath(julia_base_dir_aux, \"src\", \"support\" )\n
+          julia_include_dir *= \";\" * joinpath(julia_base_dir_aux, \"src\" )\n
+        end\n
+        julia_include_dir"
     OUTPUT_VARIABLE Julia_INCLUDE_DIRS
     RESULT_VARIABLE RETURN_CODE
 )
 if(RETURN_CODE EQUAL 0)
     string(REGEX REPLACE "\"" "" Julia_INCLUDE_DIRS ${Julia_INCLUDE_DIRS})
+    string(REGEX REPLACE "\n" "" Julia_INCLUDE_DIRS ${Julia_INCLUDE_DIRS})
     set(Julia_INCLUDE_DIRS ${Julia_INCLUDE_DIRS}
         CACHE PATH "Location of Julia include files")
 else()
@@ -58,6 +66,7 @@
 )
 if(RETURN_CODE EQUAL 0)
     string(REGEX REPLACE "\"" "" Julia_LIBRARY_DIR ${Julia_LIBRARY_DIR})
+    string(REGEX REPLACE "\n" "" Julia_LIBRARY_DIR ${Julia_LIBRARY_DIR})
     string(STRIP ${Julia_LIBRARY_DIR} Julia_LIBRARY_DIR)
     set(Julia_LIBRARY_DIR ${Julia_LIBRARY_DIR}
         CACHE PATH "Julia library directory")


cmake is case sensitive apparently

cmake is case sensitive apparently

--- share/cmake/findGMP.cmake
+++ share/cmake/findGMP.cmake
@@ -1,3 +1,4 @@
+# FindGMP.cmake
 # Try to find the GMP librairies
 #  GMP_FOUND - system has GMP lib
 #  GMP_INCLUDE_DIR - the GMP include directory


i didnt have multi threaded builds turned on for visual studio. turned on. full rebuild of graphics solution went from 10s to 3s.

--- build/common.cmake
+++ build/common.cmake
@@ -4,6 +4,7 @@
 add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/arch:AVX>)
 add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/fp:fast>)
 add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/fp:except->)
+add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
 add_compile_options($<$<CXX_COMPILER_ID:Clang>:-ffast-math>)
 add_compile_options($<$<CXX_COMPILER_ID:GNU>:-ffast-math>)


Fix file name for CMakeLists.txt

Fix file name for CMakeLists.txt

--- add-sources.cmake
+++ add-sources.cmake
@@ -68,7 +68,7 @@
     ${LOMSE_SRC_DIR}/graphic_model/lomse_shapes_storage.cpp
     ${LOMSE_SRC_DIR}/graphic_model/lomse_sizers.cpp
     ${LOMSE_SRC_DIR}/graphic_model/lomse_time_grid.cpp
-    ${LOMSE_SRC_DIR}/graphic_model/lomse_time_grid_table.cpp
+    ${LOMSE_SRC_DIR}/graphic_model/lomse_timegrid_table.cpp
     ${LOMSE_SRC_DIR}/graphic_model/lomse_visual_effect.cpp

     ${LOMSE_SRC_DIR}/graphic_model/engravers/lomse_accidentals_engraver.cpp


Update to latest Plugin.cmake from cmake-modules

--- cmake/Plugin.cmake
+++ cmake/Plugin.cmake
@@ -9,11 +9,13 @@
   endif()

   if(CMAKE_COMPILER_IS_GNUCXX)
-    target_compile_options(${name} PRIVATE -Wno-attributes)
+    set_property(TARGET ${name} APPEND_STRING PROPERTY
+                 COMPILE_FLAGS " -Wno-attributes")
   endif()

   if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-    target_compile_options(${name} PRIVATE -Wno-ignored-attributes)
+    set_property(TARGET ${name} APPEND_STRING PROPERTY
+                 COMPILE_FLAGS " -Wno-ignored-attributes")
   endif()

   if(WIN32 AND CMAKE_COMPILER_IS_GNUCC)


Some minor cleaning up.

Some minor cleaning up.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -898,7 +898,7 @@
     #       value being wrong (as well as not being able to download the file),
     #       so we handle everything ourselves...

-    IF(NOT EXISTS ${REAL_DIRNAME}/${FILENAME})
+    IF(NOT EXISTS ${REAL_FILENAME})
         MESSAGE("Retrieving '${DIRNAME}/${FILENAME}'...")

         # We retrieve the compressed version of the file


Some minor work for building our tests.

Some minor work for building our tests.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -535,25 +535,11 @@
                 #       but we need a solution that works for all possible
                 #       tests, hence they are included...

-                IF(WIN32)
-                    SET(CORE_SOURCES_MOC)
-                    SET(CORE_SOURCES)
-                ELSE()
-                    SET(CORE_SOURCES_MOC
-                        ../../misc/Core/src/dockwidget.h
-                    )
-
-                    SET(CORE_SOURCES
-                        ../../misc/Core/src/commonwidget.cpp
-                        ../../misc/Core/src/dockwidget.cpp
-                    )
-                ENDIF()
-
                 QT5_WRAP_CPP(TEST_SOURCES_MOC
+                    ../../misc/Core/src/dockwidget.h
+
                     ../../plugin.h
                     ../../pluginmanager.h
-
-                    ${CORE_SOURCES_MOC}

                     ${HEADERS_MOC}
                     ${TEST_HEADER_MOC_FILE}
@@ -561,6 +547,9 @@

                 ADD_EXECUTABLE(${TEST_NAME}
                     ../../../../tests/testsutils.cpp
+
+                    ../../misc/Core/src/commonwidget.cpp
+                    ../../misc/Core/src/dockwidget.cpp

                     ../../fileinterface.cpp
                     ../../guiinterface.cpp
@@ -569,8 +558,6 @@
                     ../../plugininfo.cpp
                     ../../pluginmanager.cpp
                     ../../solverinterface.cpp
-
-                    ${CORE_SOURCES}

                     ${TEST_SOURCE_FILE}
                     ${TEST_SOURCES_MOC}


Disable unused Qt modules

Disable unused Qt modules

--- Superbuild/Projects/qt.cmake
+++ Superbuild/Projects/qt.cmake
@@ -46,10 +46,15 @@
                       -no-dbus
                       -nomake demos
                       -nomake examples
+                      -nomake tests
+                      -nomake tools
+                      -nomake docs
                       -no-multimedia
                       -no-openssl
                       -no-phonon
+                      -no-qt3support
                       -no-xinerama
+                      -no-script
                       -no-scripttools
                       -no-svg
                       -no-declarative-debug
@@ -59,7 +64,7 @@
                       -qt-libtiff
                       -qt-zlib
                       -no-webkit
-                      -xmlpatterns
+                      #-xmlpatterns
                       -I <INSTALL_DIR>/include
                       -L <INSTALL_DIR>/lib
                       ${qt_options}


fix(cmake): Only add mbedtls targets if they do not exist yet.

If open62541 is included multiple times with find_package, the target may be created multiple times and cmake complains.

--- tools/cmake/FindMbedTLS.cmake
+++ tools/cmake/FindMbedTLS.cmake
@@ -19,12 +19,15 @@
     find_library(MBEDCRYPTO_LIBRARY mbedcrypto HINTS ${MBEDTLS_FOLDER_LIBRARY})
 endif()

-add_library(mbedtls::mbedtls UNKNOWN IMPORTED)
-set_property(TARGET mbedtls::mbedtls PROPERTY IMPORTED_LOCATION "${MBEDTLS_LIBRARY}")
-add_library(mbedtls::mbedx509 UNKNOWN IMPORTED)
-set_property(TARGET mbedtls::mbedx509 PROPERTY IMPORTED_LOCATION "${MBEDX509_LIBRARY}")
-add_library(mbedtls::mbedcrypto UNKNOWN IMPORTED)
-set_property(TARGET mbedtls::mbedcrypto PROPERTY IMPORTED_LOCATION "${MBEDCRYPTO_LIBRARY}")
+if (NOT TARGET mbedtls::mbedtls)
+    # Only add library if not yet added. If project referenced multiple times, the target is also created multiple times.
+    add_library(mbedtls::mbedtls UNKNOWN IMPORTED)
+    set_property(TARGET mbedtls::mbedtls PROPERTY IMPORTED_LOCATION "${MBEDTLS_LIBRARY}")
+    add_library(mbedtls::mbedx509 UNKNOWN IMPORTED)
+    set_property(TARGET mbedtls::mbedx509 PROPERTY IMPORTED_LOCATION "${MBEDX509_LIBRARY}")
+    add_library(mbedtls::mbedcrypto UNKNOWN IMPORTED)
+    set_property(TARGET mbedtls::mbedcrypto PROPERTY IMPORTED_LOCATION "${MBEDCRYPTO_LIBRARY}")
+endif()

 set(MBEDTLS_LIBRARIES mbedtls::mbedtls mbedtls::mbedx509 mbedtls::mbedcrypto)


rp2/boards/GARATRONIC_PYBSTICK26_RP2040: Use correct pico-sdk board cfg.

Signed-off-by: Damien George <99e6b749acbfbe2a596df99e91d24d6e1fdbee00@micropython.org>

--- ports/rp2/boards/GARATRONIC_PYBSTICK26_RP2040/mpconfigboard.cmake
+++ ports/rp2/boards/GARATRONIC_PYBSTICK26_RP2040/mpconfigboard.cmake
@@ -1 +1,3 @@
 # cmake file
+
+set(PICO_BOARD pybstick26_rp2040)


Fix checking out qt4 again. Still need to figure out how to use commit SHAs

--- qt4.cmake
+++ qt4.cmake
@@ -18,7 +18,7 @@
 include(freetype2)

 external_git_repo(qt4
-	682ed9df439481e1f8e8651c4aa06f1b455a2080
+	4.8 #682ed9df439481e1f8e8651c4aa06f1b455a2080
 	https://github.com/qtproject/qt)

 message ("Installing ${qt4_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
@@ -41,6 +41,7 @@
     DEPENDS             ${freetype2_NAME} ${zlib_NAME} ${libpng_NAME} ${libjpeg_NAME} ${libtiff_NAME}
     PREFIX              ${BUILDEM_DIR}
 	GIT_REPOSITORY	${qt4_URL}
+	GIT_TAG			4.8
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ${BUILDEM_ENV_STRING} ${PATCH_EXE}
 			# This patch fixes ilastik crashes on OSX due to an ill-shaped ellipse