Refactored the module export logic

Refactored the module export logic

We need to export several pieces of information about modules and make
them available to external tools. Separating these out from the
dependency logic in order to make it easier for external tools to use
the macros/functions.

Change-Id: I760f68f099e317c8073ec85a69c2a167fcc9a3a2

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -78,6 +78,8 @@
   endif()
 endmacro()

+# This macro provides module implementation, setting up important variables
+# necessary to build a module. It assumes we are in the directory of the module.
 macro(vtk_module_impl)
   include(module.cmake) # Load module meta-data

@@ -120,7 +122,12 @@
   if(${vtk-module}_THIRD_PARTY)
     vtk_module_warnings_disable(C CXX)
   endif()
-
+endmacro()
+
+# Export just the essential data from a module such as name, include directory.
+macro(vtk_module_export_info)
+  vtk_module_impl()
+  # First gather and configure the high level module information.
   set(_code "")
   foreach(opt ${${vtk-module}_EXPORT_OPTIONS})
     set(_code "${_code}set(${opt} \"${${opt}}\")\n")
@@ -145,15 +152,54 @@
   set(vtk-module-LIBRARY_DIRS "${${vtk-module}_SYSTEM_LIBRARY_DIRS}")
   set(vtk-module-INCLUDE_DIRS "${vtk-module-INCLUDE_DIRS-build}")
   set(vtk-module-EXPORT_CODE "${vtk-module-EXPORT_CODE-build}")
-  configure_file(${_VTKModuleMacros_DIR}/vtkModuleInfo.cmake.in ${VTK_MODULES_DIR}/${vtk-module}.cmake @ONLY)
+  configure_file(${_VTKModuleMacros_DIR}/vtkModuleInfo.cmake.in
+    ${VTK_MODULES_DIR}/${vtk-module}.cmake @ONLY)
   set(vtk-module-INCLUDE_DIRS "${vtk-module-INCLUDE_DIRS-install}")
   set(vtk-module-EXPORT_CODE "${vtk-module-EXPORT_CODE-install}")
-  configure_file(${_VTKModuleMacros_DIR}/vtkModuleInfo.cmake.in CMakeFiles/${vtk-module}.cmake @ONLY)
-  install(FILES
-    ${${vtk-module}_BINARY_DIR}/CMakeFiles/${vtk-module}.cmake
-    DESTINATION ${VTK_INSTALL_PACKAGE_DIR}/Modules
-    )
-endmacro()
+  configure_file(${_VTKModuleMacros_DIR}/vtkModuleInfo.cmake.in
+    CMakeFiles/${vtk-module}.cmake @ONLY)
+  install(FILES ${${vtk-module}_BINARY_DIR}/CMakeFiles/${vtk-module}.cmake
+    DESTINATION ${VTK_INSTALL_PACKAGE_DIR}/Modules)
+endmacro()
+
+# Export data from a module such as name, include directory and class level
+# information useful for wrapping.
+function(vtk_module_export sources)
+  vtk_module_export_info()
+  # Now iterate through the classes in the module to get class level information.
+  foreach(arg ${sources})
+    get_filename_component(src "${arg}" ABSOLUTE)
+
+    string(REGEX REPLACE "\\.(cxx|mm)$" ".h" hdr "${src}")
+    if("${hdr}" MATCHES "\\.h$")
+      if(EXISTS "${hdr}")
+        get_filename_component(_filename "${hdr}" NAME)
+        string(REGEX REPLACE "\\.h$" "" _cls "${_filename}")
+
+        get_source_file_property(_wrap_exclude ${src} WRAP_EXCLUDE)
+        get_source_file_property(_abstract ${src} ABSTRACT)
+        get_source_file_property(_wrap_special ${src} WRAP_SPECIAL)
+
+        if(NOT _wrap_exclude)
+          list(APPEND vtk-module-CLASSES ${_cls})
+        endif()
+
+        if(_abstract)
+          set(vtk-module-ABSTRACT
+            "${vtk-module-ABSTRACT}set(${vtk-module}_CLASS_${_cls}_ABSTRACT 1)\n")
+        endif()
+
+        if(_wrap_special)
+          set(vtk-module-WRAP_SPECIAL
+            "${vtk-module-WRAP_SPECIAL}set(${vtk-module}_CLASS_${_cls}_WRAP_SPECIAL 1)\n")
+        endif()
+      endif()
+    endif()
+  endforeach()
+  # Configure wrapping information for external wrapping of classes.
+  configure_file(${_VTKModuleMacros_DIR}/vtkModuleClasses.cmake.in
+    ${VTK_MODULES_DIR}/${vtk-module}-Classes.cmake @ONLY)
+endfunction()

 macro(vtk_module_test)
   if(NOT vtk_module_test_called)
@@ -281,38 +327,17 @@
     get_filename_component(src "${arg}" ABSOLUTE)

     string(REGEX REPLACE "\\.(cxx|mm)$" ".h" hdr "${src}")
-    if("${hdr}" MATCHES "\\.h$")
-      if(EXISTS "${hdr}")
-        list(APPEND _hdrs "${hdr}")
-
-        get_filename_component(_filename "${hdr}" NAME)
-        string(REGEX REPLACE "\\.h$" "" _cls "${_filename}")
-
-        get_source_file_property(_wrap_exclude ${src} WRAP_EXCLUDE)
-        get_source_file_property(_abstract ${src} ABSTRACT)
-        get_source_file_property(_wrap_special ${src} WRAP_SPECIAL)
-
-        if(NOT _wrap_exclude)
-          list(APPEND vtk-module-CLASSES ${_cls})
-        endif()
-
-        if(_abstract)
-          set(vtk-module-ABSTRACT "${vtk-module-ABSTRACT}set(${vtk-module}_CLASS_${_cls}_ABSTRACT 1)\n")
-        endif()
-
-        if(_wrap_special)
-          set(vtk-module-WRAP_SPECIAL "${vtk-module-WRAP_SPECIAL}set(${vtk-module}_CLASS_${_cls}_WRAP_SPECIAL 1)\n")
-        endif()
-      endif()
-    elseif("${src}" MATCHES "\\.txx$")
+    if("${hdr}" MATCHES "\\.h$" AND EXISTS "${hdr}")
+      list(APPEND _hdrs "${hdr}")
+    elseif("${src}" MATCHES "\\.txx$" AND EXISTS "${src}")
       list(APPEND _hdrs "${src}")
     endif()
   endforeach()
   list(APPEND _hdrs "${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}Module.h")
   list(REMOVE_DUPLICATES _hdrs)

-  # Configure wrapping information for external wrappers
-  configure_file(${_VTKModuleMacros_DIR}/vtkModuleClasses.cmake.in ${VTK_MODULES_DIR}/${vtk-module}-Classes.cmake @ONLY)
+  # Export the module information.
+  vtk_module_export("${ARGN}")

   # The instantiators are off by default, and only work on wrapped modules.
   if(VTK_MAKE_INSTANTIATORS AND NOT VTK_MODULE_${vtk-module}_EXCLUDE_FROM_WRAPPING)
@@ -446,6 +471,10 @@

   set(vtk${_lower}_THIRD_PARTY 1)
   vtk_module_impl()
+
+  # Export the core module information.
+  vtk_module_export_info()
+
   configure_file(vtk_${_lower}.h.in vtk_${_lower}.h)
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/vtk_${_lower}.h
     DESTINATION ${VTK_INSTALL_INCLUDE_DIR})


Recognize old-style p4est directory layout and work with it.

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@27348 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/modules/FindP4EST.cmake
+++ deal.II/cmake/modules/FindP4EST.cmake
@@ -26,8 +26,30 @@
 SET_IF_EMPTY(P4EST_DIR "$ENV{P4EST_DIR}")

 #
-# Search for the sc library, usually bundled with p4est:
+# We used to recommend installing p4est with a custom script that
+# compiled p4est twice, once in debug and once in optimized mode.
+# the installation would then have happened into directories
+# $P4EST_DIR/DEBUG and $P4EST_DIR/FAST. If we can find these
+# two directories, then use the FAST directory rather than trying
+# to figure out how we can build deal.II against the two libraries
+# depending on whether we are in debug or optimized mode.
 #
+IF (P4EST_DIR
+    AND
+    EXISTS ${P4EST_DIR}/DEBUG
+    AND
+    EXISTS ${P4EST_DIR}/FAST)
+  MESSAGE("-- Found old-style p4est directory layout")
+  SET (P4EST_DIR ${P4EST_DIR}/FAST)
+ENDIF()
+
+
+#
+# Search for the sc library, usually bundled with p4est. If no SC_DIR was
+# given, take what we chose for p4est.
+#
+SET_IF_EMPTY(SC_DIR "$ENV{SC_DIR}")
+SET_IF_EMPTY(SC_DIR "${P4EST_DIR}")
 FIND_PACKAGE(SC)

 FIND_PATH(P4EST_INCLUDE_DIR p4est.h


Fix add-sources.cmake

Fix add-sources.cmake

--- add-sources.cmake
+++ add-sources.cmake
@@ -176,8 +176,8 @@
     ${LOMSE_SRC_DIR}/parser/mxl/lomse_mxl_analyser.cpp
     ${LOMSE_SRC_DIR}/parser/mxl/lomse_mxl_compiler.cpp

-    ${LOMSE_SRC_DIR}/parser/mxl/lomse_mnx_analyser.cpp
-    ${LOMSE_SRC_DIR}/parser/mxl/lomse_mnx_compiler.cpp
+    ${LOMSE_SRC_DIR}/parser/mnx/lomse_mnx_analyser.cpp
+    ${LOMSE_SRC_DIR}/parser/mnx/lomse_mnx_compiler.cpp
 )

 set(RENDER_FILES


[cmake] Force local paths in 'WintermuteSourceBuild'.

--- cmake/Modules/Internal/WintermuteSourceBuild.cmake
+++ cmake/Modules/Internal/WintermuteSourceBuild.cmake
@@ -20,6 +20,9 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)

 SET(WINTERMUTE_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake" PARENT_SCOPE)
+SET(WINTERMUTE_SOURCE_INCLUDE_DIRS
+  ${CMAKE_SOURCE_DIR}/src
+  PARENT_SCOPE)
 SET(WINTERMUTE_TEST_INCLUDE_DIRS
   ${CMAKE_SOURCE_DIR}/test/include
   ${CMAKE_SOURCE_DIR}/test


[FIX] Fixing CTD setup in case SeqAn does not come from Subversion.

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

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -188,7 +188,7 @@

 # If possible, get latest change date from SeqAn SVN.
 find_package(Subversion)
-if (Subversion_FOUND)
+if (Subversion_FOUND AND EXISTS ${_SEQAN_SOURCE_DIR}/.svn)
   file (TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}" _SEQAN_SOURCE_DIR)
   Subversion_WC_INFO (${_SEQAN_SOURCE_DIR} SEQAN)
   string(REGEX REPLACE "^([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+).*"


[FIX] Fixing CTD creation on Windows.

[FIX] Fixing CTD creation on Windows.

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

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -97,6 +97,10 @@
                    # Make sure that all binaries that we want to have CTDs for are built.
                    DEPENDS ${SEQAN_CTD_EXECUTABLES})

+# Add directory for CTD files.
+add_custom_target (target_ctd_mkdir
+                   COMMAND ${CMAKE_COMMAND} -E make_directory ${CTD_PATH})
+
 # For each white-listed executable in SEQAN_CTD_EXECUTABLES, get its path and
 # (1) copy it into the temporary payload directory's bin subdirectory, and (2)
 # create a target target_ctd_ctds_${EXECUTABLE} that the CTD creation target
@@ -105,12 +109,13 @@
   # Get platform-dependent executable path.
   set (_BINARY_PATH "${SEQAN_BIN_DIR}/${_BINARY}")
   if (WIN32)
-    set (_BINARY_PATH "${_BINARY_PATH}.exe)")
+    set (_BINARY_PATH "${_BINARY_PATH}.exe")
   endif ()
   add_custom_command (TARGET prepare_ctd_payload_tmp_bin POST_BUILD
-                      COMMAND ${CMAKE_COMMAND} -E copy ${_BINARY_PATH} ${PAYLOAD_TMP_BIN_PATH})
+                      COMMAND ${CMAKE_COMMAND} -E copy "${_BINARY_PATH}" "${PAYLOAD_TMP_BIN_PATH}")
   add_custom_target (target_ctd_ctds_${_BINARY}
-                     COMMAND ${_BINARY_PATH} --write-ctd ${CTD_PATH}/${_BINARY}.ctd)
+                     COMMAND ${_BINARY_PATH} --write-ctd "${CTD_PATH}/${_BINARY}.ctd"
+                     DEPENDS target_ctd_mkdir)
   list (APPEND PREPARE_CTD_CTDS_TARGETS target_ctd_ctds_${_BINARY})
 endforeach ()

@@ -146,14 +151,14 @@
 set (_ZIP_PATH "${PAYLOAD_PATH}")
 add_custom_target (prepare_ctd_payload
                    # rm -rf
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${_ZIP_PATH}
-                   COMMAND ${CMAKE_COMMAND} -E remove_directory ${_ZIP_PATH}
+                   COMMAND ${CMAKE_COMMAND} -E make_directory "${_ZIP_PATH}"
+                   COMMAND ${CMAKE_COMMAND} -E remove_directory "${_ZIP_PATH}"
                    # mkdir
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${_ZIP_PATH}
+                   COMMAND ${CMAKE_COMMAND} -E make_directory "${_ZIP_PATH}"
                    # compress
-                   COMMAND ${Java_JAR_EXECUTABLE} cfvM ${_ZIP_PATH}/${_ZIP_NAME} -C ${PAYLOAD_TMP_PATH} .
+                   COMMAND ${Java_JAR_EXECUTABLE} cfvM "${_ZIP_PATH}/${_ZIP_NAME}" -C "${PAYLOAD_TMP_PATH}" .
                    # remove temporary files
-                   COMMAND ${CMAKE_COMMAND} -E remove_directory ${PAYLOAD_TMP_PATH}
+                   COMMAND ${CMAKE_COMMAND} -E remove_directory "${PAYLOAD_TMP_PATH}"
                    DEPENDS prepare_ctd_payload_tmp_bin)

 # ============================================================================
@@ -166,14 +171,14 @@

 add_custom_target (prepare_ctd_static_files
                    COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}
-                   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/util/cmake/ctd/COPYRIGHT ${WORKFLOW_PLUGIN_DIR}
-                   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/util/cmake/ctd/DESCRIPTION ${WORKFLOW_PLUGIN_DIR}
-                   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/util/cmake/ctd/LICENSE ${WORKFLOW_PLUGIN_DIR}
-                   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/util/cmake/ctd/mimetypes.xml ${WORKFLOW_PLUGIN_DIR}/descriptors)
+                   COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/COPYRIGHT" "${WORKFLOW_PLUGIN_DIR}"
+                   COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/DESCRIPTION" "${WORKFLOW_PLUGIN_DIR}"
+                   COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/LICENSE" "${WORKFLOW_PLUGIN_DIR}"
+                   COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/util/cmake/ctd/mimetypes.xml" "${CTD_PATH}")

 add_custom_target (prepare_ctd_icons
-                   COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}/icons
-                   COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons ${WORKFLOW_PLUGIN_DIR}/icons)
+                   COMMAND ${CMAKE_COMMAND} -E make_directory "${WORKFLOW_PLUGIN_DIR}/icons"
+                   COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons" "${WORKFLOW_PLUGIN_DIR}/icons")

 # ----------------------------------------------------------------------------
 # Configure plugin.properties.
@@ -186,8 +191,6 @@
   Subversion_WC_INFO (${_SEQAN_SOURCE_DIR} SEQAN)
   string(REGEX REPLACE "^([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+).*"
     "\\1\\2\\3\\4\\5" SEQAN_LAST_CHANGE_DATE "${SEQAN_WC_LAST_CHANGED_DATE}")
-  message (STATUS "SEQAN_LAST_CHANGE_DATE ${SEQAN_LAST_CHANGE_DATE}")
-  message (STATUS "SEQAN_VERSION_STRING ${SEQAN_VERSION_STRING}")
   set (CF_SEQAN_VERSION ${SEQAN_VERSION_STRING}.${SEQAN_LAST_CHANGE_DATE})
 else ()
   set (CF_SEQAN_VERSION "${SEQAN_VERSION_STRING}")
@@ -196,9 +199,9 @@
 # Configure the file.
 add_custom_target (prepare_ctd_properties
                    COMMAND ${CMAKE_COMMAND} -E make_directory ${CTD_PATH}
-                   COMMAND ${CMAKE_COMMAND} -DSEQAN_SOURCE_DIR=${CMAKE_SOURCE_DIR} -DWORKFLOW_PLUGIN_DIR=${WORKFLOW_PLUGIN_DIR}
-                                            -DCF_SEQAN_VERSION=${CF_SEQAN_VERSION}
-                                            -P ${CMAKE_SOURCE_DIR}/util/cmake/ctd/configure_profile_properties.cmake)
+                   COMMAND ${CMAKE_COMMAND} "-DSEQAN_SOURCE_DIR=${CMAKE_SOURCE_DIR}" "-DWORKFLOW_PLUGIN_DIR=${WORKFLOW_PLUGIN_DIR}"
+                                            "-DCF_SEQAN_VERSION=${CF_SEQAN_VERSION}"
+                                            -P "${CMAKE_SOURCE_DIR}/util/cmake/ctd/configure_profile_properties.cmake")

 # ----------------------------------------------------------------------------
 # Create *.ctd files.


CMake: improved XDR detection -> simplify logic and get rid of XDR_ROOT_DIR which should not appear in FindXDR.cmake

--- adm_local/cmake_files/FindXDR.cmake
+++ adm_local/cmake_files/FindXDR.cmake
@@ -18,18 +18,20 @@
 #

 MESSAGE(STATUS "Check for XDR ...")
-SET(XDR_ROOT_DIR $ENV{XDR_ROOT_DIR} CACHE PATH "Path to the XDR.")
-IF(XDR_ROOT_DIR)
-  LIST(APPEND CMAKE_LIBRARY_PATH "${XDR_ROOT_DIR}/lib")
-  LIST(APPEND CMAKE_INCLUDE_PATH "${XDR_ROOT_DIR}/include")
-ENDIF(XDR_ROOT_DIR)

-FIND_LIBRARY(XDR_LIBRARIES xdr)
 FIND_PATH(XDR_INCLUDE_DIRS rpc/xdr.h)
 SET(XDR_DEFINITIONS "-DHAS_XDR")

 IF(WIN32)
-  LIST(APPEND XDR_INCLUDE_DIRS "${XDR_ROOT_DIR}/include/src/msvc")
+  FIND_LIBRARY(XDR_LIBRARIES xdr)                 # To get the .lib file from XDR
+  FIND_PATH(XDR_INCLUDE_DIRS2 src/msvc/stdint.h)  # To get the stdint.h from XDR (needed by types.h)
+  IF(XDR_INCLUDE_DIRS)
+    IF(XDR_INCLUDE_DIRS2)
+      LIST(APPEND XDR_INCLUDE_DIRS "${XDR_INCLUDE_DIRS2}")
+    ELSE()
+      SET(XDR_INCLUDE_DIRS "${XDR_INCLUDE_DIRS2}")  # Make the detection fail
+    ENDIF()
+  ENDIF()
 ENDIF(WIN32)

 INCLUDE(FindPackageHandleStandardArgs)


BUG: Now applying itk_png_mangle_get_uint_31.patch, using git executable.

--- SuperBuild/ExternalITK.cmake
+++ SuperBuild/ExternalITK.cmake
@@ -25,6 +25,7 @@
   GIT_REPOSITORY ${ITK_REPOSITORY}
   GIT_TAG ${ITK_TAG}
   UPDATE_COMMAND ""
+  PATCH_COMMAND "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Patches/itk_png_mangle_get_uint_31.patch"
   SOURCE_DIR ${proj}
   BINARY_DIR ${proj}-build
   CMAKE_ARGS


Trying to get iOS static linking working right and CMake just does not want to be sane.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -48,7 +48,7 @@
   include_directories(${CMAKE_TOOLS}/include) # for dllexport

   if (IOS)
-    set_xcode_property(${target} IPHONEOS_DEPLOYMENT_TARGET "8.0")
+    set_xcode_property(${target} IPHONEOS_DEPLOYMENT_TARGET "8.4")
   else ()
     set_target_properties(${target} PROPERTIES DEFINE_SYMBOL "EXPORTING_DLL")
   endif (IOS)
@@ -277,6 +277,8 @@
   else ()
     if (MSVC)
       set(extension "lib")
+    elseif (IOS)
+      set(extension "a")
     else ()
       set(extension "dll.a")
     endif ()
@@ -317,7 +319,12 @@
   #    set(libname "${libname}.lib")
   #  endif ()

-  target_link_libraries(${CURRENT_TARGET} ${fullpath}/${libname})
+message ("${CURRENT_TARGET} ${fullpath}/${libname}")
+if (IOS)
+  target_link_libraries(${CURRENT_TARGET} "-l${fullpath}/${libname}")
+else()
+  target_link_libraries(${CURRENT_TARGET} "${fullpath}/${libname}")
+endif()

 endmacro()


ERR: Need netlib include path for external vxl.

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -61,10 +61,13 @@
 # Include directories needed for .cxx files in ITK.  These include
 # directories will NOT be available to user projects.
 SET(ITK_INCLUDE_DIRS_BUILD_TREE_CXX)
-IF(NOT ITK_USE_SYSTEM_VXL)
+IF(ITK_USE_SYSTEM_VXL)
+  SET(ITK_INCLUDE_DIRS_BUILD_TREE_CXX ${ITK_INCLUDE_DIRS_BUILD_TREE_CXX}
+    ${VXL_NETLIB_INCLUDE_DIR})
+ELSE(ITK_USE_SYSTEM_VXL)
   SET(ITK_INCLUDE_DIRS_BUILD_TREE_CXX ${ITK_INCLUDE_DIRS_BUILD_TREE_CXX}
     ${ITK_SOURCE_DIR}/Utilities/vxl/v3p/netlib)
-ENDIF(NOT ITK_USE_SYSTEM_VXL)
+ENDIF(ITK_USE_SYSTEM_VXL)

 #-----------------------------------------------------------------------------
 # Include directories from the install tree.


Removed message from UseJava.cmake as it interferes with make edit_cache

git-svn-id: 33ed6c3feaacb64944efc691d1ae8e09b17f2bf9@1528823 13f79535-47bb-0310-9956-ffa450edef68

--- tools/cmake/Modules/UseJava.cmake
+++ tools/cmake/Modules/UseJava.cmake
@@ -189,8 +189,6 @@
 #=============================================================================
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
-
-message("Loading Proton's UseJava module")

 function (__java_copy_file src dest comment)
     add_custom_command(


ENABLE_OPENMP should work in ctest now

ENABLE_OPENMP should work in ctest now

--- test/ctest/test_setup.cmake
+++ test/ctest/test_setup.cmake
@@ -43,7 +43,7 @@
 SITE:STRING=${SITE_NAME}
 CMAKE_BUILD_TYPE:STRING=Debug
 ENABLE_CUDA:BOOL=${ENABLE_CUDA}
-ENABLE_CUDA:BOOL=${ENABLE_OPENMP}
+ENABLE_OPENMP:BOOL=${ENABLE_OPENMP}
 SINGLE_PRECISION:BOOL=${SINGLE_PRECISION}
 ENABLE_STATIC:BOOL=${ENABLE_STATIC}
 ENABLE_TEST_ALL:BOOL="ON"


Correct packaging error on windows

Correct packaging error on windows

--- packaging/windows/WindowsPackaging.cmake
+++ packaging/windows/WindowsPackaging.cmake
@@ -34,7 +34,7 @@

 set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${MSVC_ARCH}")

-set(ICON_PATH "${PROJECT_SOURCE_DIR}/medInria/app/medInria/medInria.ico")
+set(ICON_PATH "${PROJECT_SOURCE_DIR}/medInria/app/medInria/resources/medInria.ico")

 # The icon to install the application.
 set(CPACK_NSIS_MUI_ICON ${ICON_PATH})


Removes arduino.cmake

Removes arduino.cmake

--- src/avr/arduino.cmake
+++ src/avr/arduino.cmake
@@ -1,307 +0,0 @@
-if("${ARDUINO_DIR}" STREQUAL "")
-    if("$ENV{ARDUINO_DIR}" STREQUAL "")
-        message(FATAL_ERROR "Set (environment) variable ARDUINO_DIR to the base directory of your Arduino IDE installation")
-    else()
-        message(STATUS "Found Arduino installation in environment variable ARDUINO_DIR: $ENV{ARDUINO_DIR}")
-        set(ARDUINO_DIR "$ENV{ARDUINO_DIR}")
-    endif()
-endif()
-
-string(REPLACE "\\" "/" ARDUINO_DIR "${ARDUINO_DIR}")
-message(STATUS "Using Arduino installation at ${ARDUINO_DIR}")
-
-
-function(GetArduinoVersion outvar)
-    set(${outvar} "" PARENT_SCOPE)
-
-    string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" TEMP "${ARDUINO_DIR}")
-
-    if(NOT ("${TEMP}" STREQUAL ""))
-        set(${outvar} ${TEMP} PARENT_SCOPE)
-    endif()
-    unset(${TEMP})
-endfunction()
-
-GetArduinoVersion(ARDUINO_VERSION)
-message(STATUS "Arduino version ${ARDUINO_VERSION}")
-
-
-set(AVRPATH "${ARDUINO_DIR}/hardware/tools/avr")
-
-
-# avrdude extra options for Windows
-if(WIN32)
-    set(AVRDUDE_OPTIONS "-C \"${ARDUINO_DIR}\\hardware\\tools\\avr\\etc\\avrdude.conf\"")
-    set(AVRWIN32 1)
-else()
-    set(AVRDUDE_OPTIONS -C "${ARDUINO_DIR}/hardware/tools/avr/etc/avrdude.conf")
-endif()
-
-
-include(${CMAKE_CURRENT_LIST_DIR}/avr.cmake)
-
-function(CustomArduinoTarget)
-    set(options )
-    set(oneValueArgs TARGET MCU F_CPU BAUD)
-    set(multiValueArgs ARDUINO_DEFINES ARDUINO_INCLUDES)
-    cmake_parse_arguments(ARDUINO_CUSTOM_TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
-    #message(STATUS "ARGN ${ARGN}")
-
-    set(ARDUINO_INCLUDES ${ARDUINO_CUSTOM_TARGET_ARDUINO_INCLUDES})
-    set(ARDUINO_INCLUDES
-        ${ARDUINO_INCLUDES}
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino)
-
-    if ("${ARDUINO_VERSION}" STREQUAL "1.6.5")
-        set(ARDUINO_INCLUDES
-            ${ARDUINO_INCLUDES}
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/SoftwareSerial
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/Wire
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/Wire/utility
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/SPI)
-
-
-        set(ARDUINO_SOURCES
-            ${ARDUINO_SOURCES}
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/SoftwareSerial/SoftwareSerial.cpp
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/Wire/Wire.cpp
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/Wire/utility/twi.c
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/SPI/SPI.cpp
-        )
-        if(NOT WIN32)
-            set(ARDUINO_SOURCES
-                ${ARDUINO_SOURCES}
-                ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/HID.cpp)
-        endif()
-    else()
-        set(ARDUINO_INCLUDES
-            ${ARDUINO_INCLUDES}
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/SoftwareSerial/src
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/Wire/src
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/Wire/utility
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/SPI/src)
-
-
-        set(ARDUINO_SOURCES
-            ${ARDUINO_SOURCES}
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/SoftwareSerial/src/SoftwareSerial.cpp
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/Wire/src/Wire.cpp
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/Wire/src/utility/twi.c
-            ${ARDUINO_DIR}/hardware/arduino/avr/libraries/SPI/src/SPI.cpp
-        )
-    endif()
-    set(ARDUINO_SOURCES
-        ${ARDUINO_SOURCES}
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/WString.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/USBCore.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/HardwareSerial0.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/HardwareSerial.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/CDC.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/WMath.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/HardwareSerial2.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/HardwareSerial3.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/new.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/Tone.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/Stream.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/IPAddress.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/Print.cpp
-        #${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/main.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/abi.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/HardwareSerial1.cpp
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/WInterrupts.c
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/hooks.c
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/wiring_shift.c
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/wiring_pulse.c
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/wiring_pulse.S
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/wiring_analog.c
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/wiring.c
-        ${ARDUINO_DIR}/hardware/arduino/avr/cores/arduino/wiring_digital.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX/at45dbx.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX/at45dbx_mem.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/BOARDS/EVK1105/led.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/BOARDS/ARDUINO/led.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/DRIVERS/PM/pm_conf_clocks.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/DRIVERS/PM/pm.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/DRIVERS/PM/power_clocks_lib.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/DRIVERS/USART/usart.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC/flashc.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO/gpio.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/DRIVERS/INTC/intc.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/DRIVERS/SPI/spi.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS/ctrl_access.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/UTILS/DEBUG/print_funcs.c
-        #        ./firmwares/wifishield/wifi_dnld/src/SOFTWARE_FRAMEWORK/UTILS/DEBUG/debug.c
-        #        ./firmwares/wifishield/wifi_dnld/src/printf-stdarg.c
-        #        ./firmwares/wifishield/wifi_dnld/src/nor_flash.c
-        #        ./firmwares/wifishield/wifi_dnld/src/startup.c
-        #        ./firmwares/wifishield/wifi_dnld/src/flash_fw.c
-        #        ./firmwares/wifishield/wifi_dnld/src/clocks.c
-        #        ./firmwares/wifishield/wifiHD/src/ard_tcp.c
-        #        ./firmwares/wifishield/wifiHD/src/ard_spi.c
-        #        ./firmwares/wifishield/wifiHD/src/main.c
-        #        ./firmwares/wifishield/wifiHD/src/util.c
-        #        ./firmwares/wifishield/wifiHD/src/owl_os.c
-        #        ./firmwares/wifishield/wifiHD/src/fw_download_extflash.c
-        #        ./firmwares/wifishield/wifiHD/src/timer.c
-        #        ./firmwares/wifishield/wifiHD/src/avr32_spi.c
-        #        ./firmwares/wifishield/wifiHD/src/console.c
-        #        ./firmwares/wifishield/wifiHD/src/ping.c
-        #        ./firmwares/wifishield/wifiHD/src/lwip_setup.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX/at45dbx.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/COMPONENTS/MEMORY/DATA_FLASH/AT45DBX/at45dbx_mem.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/BOARDS/EVK1105/led.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/BOARDS/ARDUINO/led.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/RTC/rtc.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/PM/pm_conf_clocks.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/PM/pm.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/PM/power_clocks_lib.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/USART/usart.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/TC/tc.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/FLASHC/flashc.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/EBI/SMC/smc.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/GPIO/gpio.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/INTC/intc.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/SPI/spi.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/PDCA/pdca.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/DRIVERS/EIC/eic.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/MEMORY/CTRL_ACCESS/ctrl_access.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/init.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/udp.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/raw.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/ipv4/inet.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/ipv4/autoip.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/ipv4/ip.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/ipv4/igmp.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/ipv4/inet_chksum.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/ipv4/ip_frag.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/ipv4/ip_addr.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/ipv4/icmp.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/tcp.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/tcp_out.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/stats.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/dhcp.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/memp.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/tcp_in.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/netif.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/dns.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/pbuf.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/core/mem.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/netif/loopif.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-1.3.2/src/netif/etharp.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/LWIP/lwip-port-1.3.2/HD/if/netif/wlif.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/SERVICES/DELAY/delay.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/UTILS/DEBUG/print_funcs.c
-        #        ./firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK/UTILS/DEBUG/debug.c
-        #        ./firmwares/wifishield/wifiHD/src/printf-stdarg.c
-        #        ./firmwares/wifishield/wifiHD/src/ard_utils.c
-        #        ./firmwares/wifishield/wifiHD/src/wl_cm.c
-        #        ./firmwares/wifishield/wifiHD/src/board_init.c
-        #        ./firmwares/wifishield/wifiHD/src/cmd_wl.c
-        #        ./firmwares/wifishield/wifiHD/src/nvram.c
-        #        ./firmwares/atmegaxxu2/arduino-usbdfu/Arduino-usbdfu.c
-        #        ./firmwares/atmegaxxu2/arduino-usbdfu/Descriptors.c
-        #        ./firmwares/atmegaxxu2/arduino-usbserial/Arduino-usbserial.c
-        #        ./firmwares/atmegaxxu2/arduino-usbserial/Descriptors.c
-        #        ./bootloaders/atmega/ATmegaBOOT_168.c
-        #        ./bootloaders/bt/ATmegaBOOT_168.c
-        #        ./bootloaders/caterina-LilyPadUSB/Caterina.c
-        #        ./bootloaders/caterina-LilyPadUSB/Descriptors.c
-        #        ./bootloaders/lilypad/src/ATmegaBOOT.c
-        #        ./bootloaders/caterina/Caterina.c
-        #        ./bootloaders/caterina/Descriptors.c
-        #        ./bootloaders/caterina-Arduino_Robot/Caterina.c
-        #        ./bootloaders/caterina-Arduino_Robot/Descriptors.c
-        #        ./bootloaders/stk500v2/stk500boot.c
-        #        ./bootloaders/atmega8/ATmegaBOOT.c
-        #        ./bootloaders/optiboot/optiboot.c
-        )
-    add_library(${ARDUINO_CUSTOM_TARGET_TARGET}-arduino STATIC ${ARDUINO_SOURCES})
-    get_property(CF TARGET ${ARDUINO_CUSTOM_TARGET_TARGET}-arduino PROPERTY COMPILE_FLAGS)
-    set_target_properties(${ARDUINO_CUSTOM_TARGET_TARGET}-arduino PROPERTIES COMPILE_FLAGS "${CF} -w -mmcu=${ARDUINO_CUSTOM_TARGET_MCU} -DF_CPU=${ARDUINO_CUSTOM_TARGET_F_CPU}L -DBAUD==${ARDUINO_CUSTOM_TARGET_BAUD}L") # turn off warnings for Arduino code
-    target_compile_definitions(${ARDUINO_CUSTOM_TARGET_TARGET}-arduino PRIVATE ${ARDUINO_CUSTOM_TARGET_ARDUINO_DEFINES})
-    target_include_directories(${ARDUINO_CUSTOM_TARGET_TARGET}-arduino PRIVATE ${ARDUINO_INCLUDES})
-
-    AvrTarget(TARGET ${ARDUINO_CUSTOM_TARGET_TARGET} MCU ${ARDUINO_CUSTOM_TARGET_MCU} F_CPU ${ARDUINO_CUSTOM_TARGET_F_CPU} BAUD ${ARDUINO_CUSTOM_TARGET_BAUD} ${ARDUINO_CUSTOM_TARGET_UNPARSED_ARGUMENTS})
-    target_link_libraries(${ARDUINO_CUSTOM_TARGET_TARGET}.elf ${ARDUINO_CUSTOM_TARGET_TARGET}-arduino)
-    target_compile_definitions(${ARDUINO_CUSTOM_TARGET_TARGET}.elf PRIVATE ${ARDUINO_CUSTOM_TARGET_ARDUINO_DEFINES})
-    target_include_directories(${ARDUINO_CUSTOM_TARGET_TARGET}.elf PRIVATE ${ARDUINO_INCLUDES})
-
-endfunction()
-
-
-function(ArduinoTarget)
-    set(options )
-    set(oneValueArgs TARGET BOARD)
-    set(multiValueArgs )
-    cmake_parse_arguments(ARDUINO_TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-
-    if("${ARDUINO_TARGET_BOARD}" STREQUAL "")
-        message(FATAL_ERROR "Set the BOARD variable to e.g. 'Arduino Uno'")
-    endif()
-
-    if ("${ARDUINO_TARGET_TARGET}" STREQUAL "")
-        message(FATAL_ERROR "Set TARGET variable")
-    endif()
-
-    string(TOLOWER "${ARDUINO_TARGET_BOARD}" lowerBoard)
-    if("${lowerBoard}" MATCHES "arduino")
-        set(MCU atmega328p)
-        if ("${lowerBoard}" MATCHES "uno")
-            set(ARDUINO_DEFINES -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR)
-            set(ARDUINO_INCLUDES ${ARDUINO_DIR}/hardware/arduino/avr/variants/standard)
-            set(PROGBAUD 115200)
-            set(BAUD 115200)
-            set(F_CPU 16000000)
-        elseif("${lowerBoard}" MATCHES "nano")
-            set(ARDUINO_DEFINES -DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR)
-            set(ARDUINO_INCLUDES ${ARDUINO_DIR}/hardware/arduino/avr/variants/eightanaloginputs)
-            set(PROGBAUD 57600)
-            set(BAUD 57600)
-            set(F_CPU 16000000)
-        else()
-            message(FATAL_ERROR "Unknown Arduino board '${ARDUINO_TARGET_BOARD}'")
-        endif()
-    else()
-        message(FATAL_ERROR "Unknown board '${ARDUINO_TARGET_BOARD}'")
-    endif()
-
-    CustomArduinoTarget(
-        TARGET ${ARDUINO_TARGET_TARGET}
-        ARDUINO_DEFINES ${ARDUINO_DEFINES}
-        ARDUINO_INCLUDES ${ARDUINO_INCLUDES}
-        MCU ${MCU} F_CPU ${F_CPU} BAUD ${BAUD} ${ARDUINO_TARGET_UNPARSED_ARGUMENTS})
-
-    #-U eeprom:w:${targetName}.eep.hex:i
-    set(AVRDUDE_CMDLINE ${AVRPATH}/bin/avrdude ${AVRDUDE_OPTIONS} -v -p ${MCU} -c arduino -b ${PROGBAUD} -U flash:w:${ARDUINO_TARGET_TARGET}.hex:i)
-    set(AVRDUDE_CMDLINE_CMAKE_PORT "${AVRDUDE_CMDLINE} -P ${PORT}")
-    #message(STATUS "${CMAKE_SYSTEM_NAME}")
-    if(AVRWIN32)
-        set(AVRDUDE_CMDLINE_ENV_PORT ${AVRDUDE_CMDLINE} -P "$(PORT)") # NMAKE syntax
-    else()
-        if ("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles")
-            set(AVRDUDE_CMDLINE_ENV_PORT ${AVRDUDE_CMDLINE} -P $$PORT)
-        else()
-            set(AVRDUDE_CMDLINE_ENV_PORT ${AVRDUDE_CMDLINE} -P $PORT)
-        endif()
-    endif()
-    # flash_XXX_to_port, works with any serial port (use env var PORT)
-    add_custom_target(
-        flashx_${ARDUINO_TARGET_TARGET}
-        COMMAND ${AVRDUDE_CMDLINE_ENV_PORT}
-        DEPENDS ${ARDUINO_TARGET_TARGET}.hex ${ARDUINO_TARGET_TARGET}.eep.hex)
-
-    set(FLASH_TARGET_NAME flash_${ARDUINO_TARGET_TARGET})
-    if (NOT "${PORT}" STREQUAL "")
-        message(STATUS "Variable PORT set, adding target ${FLASH_TARGET_NAME} using ${PORT}")
-        add_custom_target(
-            flash_${ARDUINO_TARGET_TARGET}
-            COMMAND ${AVRDUDE_CMDLINE_CMAKE_PORT}
-            #-U eeprom:w:${targetName}.eep.hex:i
-            DEPENDS ${targetName}.hex ${targetName}.eep.hex)
-    else()
-        message(STATUS "Variable PORT not set; target ${FLASH_TARGET_NAME} won't be generated")
-    endif()
-endfunction()
-
-


COMP: Boost should use the right toolset for building the libraries now.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -37,6 +37,17 @@
         else()
           set(_boost_address_model "address-model=32")
         endif()
+        if(MSVC)
+          if(MSVC_VERSION EQUAL 1400)
+            set(_boost_toolset "toolset=msvc-8.0")
+          elseif(MSVC_VERSION EQUAL 1500)
+            set(_boost_toolset "toolset=msvc-9.0")
+          elseif(MSVC_VERSION EQUAL 1600)
+            set(_boost_toolset "toolset=msvc-10.0")
+          elseif(MSVC_VERSION EQUAL 1700)
+            set(_boost_toolset "toolset=msvc-11.0")
+          endif()
+        endif()
       else()
         if(CMAKE_BUILD_TYPE STREQUAL "Debug")
           set(_boost_variant "variant=debug")
@@ -53,7 +64,7 @@
       endif()

       set(_boost_cfg_cmd ${CMAKE_CURRENT_BINARY_DIR}/${proj}-src/bootstrap${_shell_extension})
-      set(_boost_build_cmd ${CMAKE_CURRENT_BINARY_DIR}/${proj}-src/bjam --build-dir=${CMAKE_CURRENT_BINARY_DIR}/${proj}-build --prefix=${CMAKE_CURRENT_BINARY_DIR}/${proj}-install ${_boost_address_model} ${_boost_variant} ${_boost_libs} link=shared,static threading=multi runtime-link=shared -q install)
+      set(_boost_build_cmd ${CMAKE_CURRENT_BINARY_DIR}/${proj}-src/bjam --build-dir=${CMAKE_CURRENT_BINARY_DIR}/${proj}-build --prefix=${CMAKE_CURRENT_BINARY_DIR}/${proj}-install ${_boost_toolset} ${_boost_address_model} ${_boost_variant} ${_boost_libs} link=shared,static threading=multi runtime-link=shared -q install)
     else()
       # If no libraries are specified set the boost root to the boost src directory
       set(BOOST_ROOT "${CMAKE_CURRENT_BINARY_DIR}/${proj}-src")


COMP: turn of SNDFILE to fix include path

Fixex #395

As described in the issue, on some (many?)
systems dcmtk header files could end up
in the same path (e.g. /usr/local/include)
with other packages, in this case
libsndfile's header.

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -95,6 +95,7 @@
       -DDCMTK_WITH_TIFF:BOOL=OFF  # see github issue #25
       -DDCMTK_WITH_XML:BOOL=OFF  # see github issue #25
       -DDCMTK_WITH_ICONV:BOOL=OFF  # see github issue #178
+      -DDCMTK_WITH_SNDFILE:BOOL=OFF # see github issue #395
       -DDCMTK_FORCE_FPIC_ON_UNIX:BOOL=ON
       -DDCMTK_OVERWRITE_WIN32_COMPILER_FLAGS:BOOL=OFF
       -DDCMTK_ENABLE_BUILTIN_DICTIONARY:BOOL=ON


BUG: ITKIO seems to require all DCMTK libs

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -72,7 +72,6 @@
       -DBUILD_APPS:BOOL=OFF
       -DDCMTK_ENABLE_BUILTIN_DICTIONARY:BOOL=ON
       -DDCMTK_ENABLE_PRIVATE_TAGS:BOOL=ON
-      -DCMTK_MODULES:STRING=ofstd;oflog;dcmdata;dcmimgle;dcmimage;dcmsr;dcmiod;dcmfg;dcmseg;dcmjpeg
     DEPENDS
       ${${proj}_DEPENDENCIES}
     )


Windows: Allowed `dynamic_cast` on an object being constructed.

Review: https://reviews.apache.org/r/47671/

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -70,7 +70,7 @@

   # COFF/PE and friends are somewhat limited in the number of sections they
   # allow for an object file. We use this to avoid those problems.
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj -DGOOGLE_GLOG_DLL_DECL= -DCURL_STATICLIB -D_SCL_SECURE_NO_WARNINGS /MP")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj -DGOOGLE_GLOG_DLL_DECL= -DCURL_STATICLIB -D_SCL_SECURE_NO_WARNINGS /vd2 /MP")

   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
   set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")


Update bzip2 to 1.0.8 for linux/osx (#2233)

This update addresses a
[CVE](https://nvd.nist.gov/vuln/detail/CVE-2019-12900)
in the 1.0.6 release of bzip2. Windows requires a prebuilt binary
and will be address in a separate commit.

--- cmake/Modules/FindBzip2_EP.cmake
+++ cmake/Modules/FindBzip2_EP.cmake
@@ -95,8 +95,8 @@
       # alongside TileDB.
       ExternalProject_Add(ep_bzip2
         PREFIX "externals"
-        URL "https://github.com/TileDB-Inc/bzip2/releases/download/1.0.6/bzip2-1.0.6.tar.gz"
-        URL_HASH SHA1=3f89f861209ce81a6bab1fd1998c0ef311712002
+        URL "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz"
+        URL_HASH SHA1=bf7badf7e248e0ecf465d33c2f5aeec774209227
         CONFIGURE_COMMAND ""
         BUILD_IN_SOURCE TRUE
         BUILD_COMMAND ""


fix for a2x dropping xml files in src tree

--- cmake/modules/BuildManpage.cmake
+++ cmake/modules/BuildManpage.cmake
@@ -1,10 +1,13 @@
 macro(a2x_build_manpage _depends_N _mps_N _mpt_N mversion)
     get_filename_component(_mpt_num ${_mpt_N} EXT)
     string(REPLACE "." "" _mpt_num "${_mpt_num}")
+    file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/${_mps_N}
+         DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
+         USE_SOURCE_PERMISSIONS)
     add_custom_command(
         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_mpt_N}
-        COMMAND ${A2X} --asciidoc-opts="-a revnumber=${mversion}" -d manpage -f manpage -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${_mps_N}
-        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_mps_N})
+        COMMAND ${A2X} --asciidoc-opts="-a revnumber=${mversion}" -d manpage -f manpage -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${_mps_N}
+        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_mps_N})
     install(
         FILES ${CMAKE_CURRENT_BINARY_DIR}/${_mpt_N}
         DESTINATION "share/man/man${_mpt_num}"


a fix for including incorrect headers

a fix for including incorrect headers

--- caffe/cmake/Dependencies.cmake
+++ caffe/cmake/Dependencies.cmake
@@ -3,6 +3,10 @@
 set(Caffe_INCLUDE_DIRS "")
 set(Caffe_DEFINITIONS "")
 set(Caffe_COMPILE_OPTIONS "")
+
+# high priority to our protobuf generated header
+include_directories(${PROJECT_BINARY_DIR}/include)
+list(APPEND Caffe_INCLUDE_DIRS PRIVATE ${PROJECT_BINARY_DIR}/include)

 # ---[ Boost
 find_package(Boost 1.54 REQUIRED COMPONENTS system thread filesystem iostreams timer)


Compile clang with `-Wall -Wshadow -Werror`

It was not compiling any of the code with warnings prior to this.

Signed-off-by: Enji Cooper <d6bb01297bdcc8d1a5e14be12c1049fd9e385b00@gmail.com>

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -77,6 +77,10 @@
     # Suppress "unreachable code" warning
     # http://stackoverflow.com/questions/3232669 explains the issue.
     set(cxx_base_flags "${cxx_base_flags} -wd4702")
+  elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    set(cxx_base_flags "-Wall -Wshadow -Werror")
+    set(cxx_exception_flags "-fexceptions")
+    set(cxx_no_exception_flags "-fno-exceptions")
   elseif (CMAKE_COMPILER_IS_GNUCXX)
     set(cxx_base_flags "-Wall -Wshadow -Werror")
     if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)


FindVOTCA_TOOLS.cmake: fixed a typo

FindVOTCA_TOOLS.cmake: fixed a typo

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -30,6 +30,9 @@
 if (VOTCA_TOOLS_HAS_SQLITE3)
   #due to include <sqlite3.h> in database.h
   find_package(SQLITE3 REQUIRED)
+  set(VOTCA_TOOLS_INCLUDE_DIRS "${VOTCA_TOOLS_INCLUDE_DIR};${SQLITE3_INCLUDE_DIR}" )
+else(VOTCA_TOOLS_HAS_SQLITE3)
+  set(VOTCA_TOOLS_INCLUDE_DIRS "${VOTCA_TOOLS_INCLUDE_DIR}" )
 endif (VOTCA_TOOLS_HAS_SQLITE3)

@@ -48,7 +51,6 @@
 endif("${VOTCA_TOOLS_LIBRARY}" MATCHES "libvotca_tools[^;]*\\.a")

 set(VOTCA_TOOLS_LIBRARIES "${VOTCA_TOOLS_LIBRARY};${VOTCA_TOOLS_DEP_LIBRARIES}" )
-set(VOTCA_TOOLS_INCLUDE_DIRS "${VOTCA_TOOLS_INCLUDE_DIR}" )

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set VOTCA_TOOLS_FOUND to TRUE


CI: ccache is always empty for now, no need to call it

--- CI/ubuntu-18.04-llvm-shark.cmake
+++ CI/ubuntu-18.04-llvm-shark.cmake
@@ -27,5 +27,4 @@
 CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
 CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
 CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld
-CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
-CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache")
+")


*** empty log message ***

*** empty log message ***

--- CMake/FunctionalityHelpers.cmake
+++ CMake/FunctionalityHelpers.cmake
@@ -32,7 +32,7 @@
 #   ADD_FUNC_CALL: File which contains just the call to the above function

 MACRO(CREATE_QFUNCTIONALITY FUNC_NAME)
- MESSAGE("Before MACRO: ${${KITNAME}FUNCTIONALITY_NAMES}")
+ # MESSAGE("Before MACRO: ${${KITNAME}FUNCTIONALITY_NAMES}")
   IF(NOT FUNC_NAME)
     GET_FILENAME_COMPONENT(FUNC_NAME ${PROJECT_SOURCE_DIR} NAME)
     MESSAGE(STATUS "Warning. No FUNC_NAME set. Setting it to directory name: ${FUNC_NAME}")
@@ -60,7 +60,7 @@
   CONFIGURE_FILE("${REGISTER_QFUNCTIONALITY_CPP_IN}" "${CMAKE_CURRENT_BINARY_DIR}/Register${FUNC_NAME}.cpp" @ONLY)
   IF(${KITNAME}FUNCTIONALITY_NAMES)
     LIST(REMOVE_ITEM ${KITNAME}FUNCTIONALITY_NAMES ${FUNC_NAME})
-    MESSAGE("removing: ${FUNC_NAME}")
+    # MESSAGE("removing: ${FUNC_NAME}")
   ENDIF(${KITNAME}FUNCTIONALITY_NAMES)
   OPTION("BUILD_${FUNC_NAME}" "Build ${FUNC_NAME} functionality")
   IF(BUILD_${FUNC_NAME} OR BUILD_ALL_FUNCTIONALITIES)
@@ -68,9 +68,9 @@
   #   CLEANUP_FUNCTIONALITY_LIST()
     ADD_LIBRARY(${FUNC_NAME} ${FUNC_CPP_LIST} "${CMAKE_CURRENT_BINARY_DIR}/Register${FUNC_NAME}.cpp" )
     TARGET_LINK_LIBRARIES(${FUNC_NAME} ${LIBS_FOR_QFUNCTIONALITY})
-    MESSAGE(status "added ${FUNC_NAME}")
+    # MESSAGE(status "added ${FUNC_NAME}")
   ENDIF(BUILD_${FUNC_NAME} OR BUILD_ALL_FUNCTIONALITIES)
- MESSAGE("after MACRO: ${${KITNAME}FUNCTIONALITY_NAMES}")
+ #MESSAGE("after MACRO: ${${KITNAME}FUNCTIONALITY_NAMES}")
 ENDMACRO(CREATE_QFUNCTIONALITY)

 MACRO(CLEANUP_FUNCTIONALITY_LIST)


Work around CMP0054 warning

Work around CMP0054 warning

Add 'x' prefix and suffix to ensure extra de-referencing of variable
name does not occur.

--- CMake/sitkSITKLegacyNaming.cmake
+++ CMake/sitkSITKLegacyNaming.cmake
@@ -23,7 +23,7 @@
 macro(sitk_legacy_naming new_var_name )

-  if(NOT "${ARGV1}" STREQUAL "")
+  if(NOT "x${ARGV1}x" STREQUAL "xx")
     set( old_var_name ${ARGV1} )
   else()
     string( REGEX REPLACE  "^SimpleITK_" "SITK_" old_var_name "${new_var_name}" )


Sync icc flags with reality.

Sync icc flags with reality.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -136,8 +136,8 @@
   # Linux flags
   IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
     IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
-      SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
-      SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
+      SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -static-libgcc -g -O3 -unroll2 -ip -mp -restrict -no-ftz -no-prefetch")
+      SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -static-libgcc -g -O3 -unroll2 -ip -mp -restrict -no-ftz -no-prefetch")
       SET(WITH_SSL no)
     ENDIF()
   ENDIF()


fix install command for external projects

--- bin/dsn.ext.cmake
+++ bin/dsn.ext.cmake
@@ -3,9 +3,9 @@
 #set(target_url  https://github.com/imzhenyu/googletest.git)
 #set(my_cmake_args "-Dgtest_force_shared_crt=OFF;")
 #if(WIN32)
-#	set(target_binaries gtest.lib gtest_main.lib)
+#    set(target_binaries gtest.lib gtest_main.lib)
 #else()
-#	set(target_binaries libgtest.a libgtest_main.a)
+#    set(target_binaries libgtest.a libgtest_main.a)
 #endif()

 include(ExternalProject)
@@ -14,35 +14,43 @@

 set(target_bin_dir ${PROJECT_BINARY_DIR}/${project_name}-lib)

+if(WIN32)
+    #Set the Build configuration name.
+    if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+      if(BUILD_TYPE)
+        string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
+               CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
+      else()
+        set(CMAKE_INSTALL_CONFIG_NAME "Release")
+      endif()
+      message(STATUS "Build configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
+    endif()
+endif()
+
 set(install_cmd "")
 foreach(file_i ${target_binaries})
-	if(WIN32)
-		set(cp "copy /Y")
-	else()
-		set(cp "cp")
-	endif()
-
-	if(install_cmd STREQUAL "")
-		set(install_cmd "${cp} ${target_bin_dir}/${file_i} ${CMAKE_INSTALL_PREFIX}/lib")
-	else()
-		set(install_cmd "${install_cmd} && ${cp} ${target_bin_dir}/${file_i} ${CMAKE_INSTALL_PREFIX}/lib")
-	endif()
+    if(WIN32)
+        set(cp "copy /Y ${target_bin_dir}/${CMAKE_INSTALL_CONFIG_NAME}/${file_i}")
+    else()
+        set(cp "cp ${target_bin_dir}/${file_i}")
+    endif()
+
+    if(install_cmd STREQUAL "")
+        set(install_cmd "${cp} ${CMAKE_INSTALL_PREFIX}/lib")
+    else()
+        set(install_cmd "${install_cmd} && ${cp} ${CMAKE_INSTALL_PREFIX}/lib")
+    endif()
 endforeach()

 message (INFO " install_cmd = ${install_cmd}")

-if(WIN32)
-	# TODO: get current build config so we get the right path of the target file
-	set(install_cmd "")
-endif()
-
 ExternalProject_Add(${project_name}
-	GIT_REPOSITORY ${target_url}
-	GIT_TAG master
+    GIT_REPOSITORY ${target_url}
+    GIT_TAG master
     CMAKE_ARGS "${CMAKE_ARGS};-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX};${my_cmake_args};"
-	BINARY_DIR "${target_bin_dir}"
-	INSTALL_DIR "${target_bin_dir}"
-	INSTALL_COMMAND "${install_cmd}"
+    BINARY_DIR "${target_bin_dir}"
+    INSTALL_DIR "${target_bin_dir}"
+    INSTALL_COMMAND "${install_cmd}"
 )

 # Specify source dir


Fix small typo in findpkg_framework macro (${fwk} instead of {fwk})

--- CMake/Utils/FindPkgMacros.cmake
+++ CMake/Utils/FindPkgMacros.cmake
@@ -107,7 +107,7 @@
     FOREACH(dir ${${fwk}_FRAMEWORK_PATH})
       SET(fwkpath ${dir}/${fwk}.framework)
       IF(EXISTS ${fwkpath})
-        SET(${fwk}_FRAMEWORK_INCLUDES ${{fwk}_FRAMEWORK_INCLUDES}
+        SET(${fwk}_FRAMEWORK_INCLUDES ${${fwk}_FRAMEWORK_INCLUDES}
           ${fwkpath}/Headers ${fwkpath}/PrivateHeaders)
         if (NOT ${fwk}_LIBRARY_FWK)
           SET(${fwk}_LIBRARY_FWK "-framework ${fwk}" CACHE STRING "${fwk} library")


don't be unnecesarily verbose

don't be unnecesarily verbose

--- CMake/hoomd/HOOMDMPISetup.cmake
+++ CMake/hoomd/HOOMDMPISetup.cmake
@@ -72,7 +72,6 @@
     string(REPLACE "-pthread" "$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<STREQUAL:${HIP_PLATFORM},nvcc>>:-Xcompiler>;-pthread"
       _MPI_CXX_COMPILE_OPTIONS "${MPI_CXX_COMPILE_OPTIONS}")
     set_property(TARGET MPI::MPI_CXX PROPERTY INTERFACE_COMPILE_OPTIONS "${_MPI_CXX_COMPILE_OPTIONS}")
-    message(STATUS "_MPI_CXX_COMPILE_OPTIONS: ${_MPI_CXX_COMPILE_OPTIONS}")
     unset(_MPI_CXX_COMPILE_OPTIONS)
 endif()


CmakeFedoraScript: FIND_FILE_OR_PROGRAM: fixed correct verbose level

--- Modules/CmakeFedoraScript.cmake
+++ Modules/CmakeFedoraScript.cmake
@@ -109,7 +109,7 @@
 	LIST(APPEND _args "ERROR_MSG" "${error_msg}")
     ENDIF()

-    SET(_verboseLevel "${M_WARNING}")
+    SET(_verboseLevel "${M_WARN}")
     IF(DEFINED verbose_level)
 	SET(_verboseLevel "${verbose_level}")
     ENDIF()


cmake: HextEnableWarnings: add warning switch -Wsign-conversion

--- cmake/HextEnableWarnings.cmake
+++ cmake/HextEnableWarnings.cmake
@@ -26,7 +26,7 @@
     "-Wunreachable-code" "-Wunused"
     "-Wunused-function" "-Wunused-label" "-Wunused-parameter" "-Wunused-value"
     "-Wunused-variable" "-Wvariadic-macros" "-Wvolatile-register-var"
-    "-Wwrite-strings" "-Wmissing-noreturn"
+    "-Wwrite-strings" "-Wmissing-noreturn" "-Wsign-conversion"
     # Unused switches:
     # "-Wswitch-enum": Listing every enum brings chaos, especially for GumboTag.
     # "-Wswitch-default": generated ragel code uses switch without default,


CMake: Default build configuration to Debug if it is not specified.

--- cmake/Modules/UrhoCommon.cmake
+++ cmake/Modules/UrhoCommon.cmake
@@ -37,6 +37,14 @@
     else ()
         set (EMCC_WITH_SOURCE_MAPS_FLAG -gsource-map)
     endif ()
+endif ()
+
+# Prevent use of undefined build type, default to Debug. Done here instead of UrhoOptions.cmake so that user projects
+# can take advantage of this behavior as UrhoCommon.cmake will be included earlier, most likely before any targets are
+# defined.
+if (NOT MULTI_CONFIG_PROJECT AND NOT CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Specifies the build type." FORCE)
+    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES})
 endif ()

 # Macro for setting symbolic link on platform that supports it


Updated python module correcting setting of libs

git-svn-id: 39e099a8ed5324aded674b764a67f7a08796d9a7@2746 662fdd30-d327-0410-a531-f549c87e1e9e

--- cmake/TestForPythonEmbed.cmake
+++ cmake/TestForPythonEmbed.cmake
@@ -4,7 +4,7 @@
 #  PYTHON_EMBEDABLE - True if embedable

 find_package(PythonLibs)
-# Some systems require these libs to be explicitly be added for the test
+# Some systems require these libs to be added explicitly
 find_library(DL dl)
 find_library(MATH m)
 find_library(PTHREAD pthread)
@@ -13,10 +13,9 @@
 if(PYTHONLIBS_FOUND)
 	MESSAGE(STATUS "Checking if Python is Embedable")
 	SET(CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDE_PATH})
-	# If on Slackware, uncomment the next line to fix a missing library issue
-	# As of 11/22/2009 this is needed for Slackware 13
-	# SET(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} -ldl -lm -lpthread -lutil)
-	SET(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES} ${DL} ${MATH} ${PTHREAD} ${UTIL})
+	# ensure the libs are included with python
+	SET(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} ${DL} ${MATH} ${PTHREAD} ${UTIL})
+	SET(CMAKE_REQUIRED_LIBRARIES ${PYTHON_LIBRARIES})
 	CHECK_C_SOURCE_COMPILES(
 "#include <Python.h>
 int main(int argc, char *argv[]) {


Remove private FindOpenGL.cmake module to use the one coming from CMake it self. It was failing to find the OpenGL headers in MacOSX 10.9.

--- cmake/modules/FindOpenGL.cmake
+++ cmake/modules/FindOpenGL.cmake
@@ -1,159 +0,0 @@
-# - Try to find OpenGL
-# Once done this will define
-#
-#  OPENGL_FOUND        - system has OpenGL
-#  OPENGL_XMESA_FOUND  - system has XMESA
-#  OPENGL_GLU_FOUND    - system has GLU
-#  OPENGL_INCLUDE_DIR  - the GL include directory
-#  OPENGL_LIBRARIES    - Link these to use OpenGL and GLU
-#
-# If you want to use just GL you can use these values
-#  OPENGL_gl_LIBRARY   - Path to OpenGL Library
-#  OPENGL_glu_LIBRARY  - Path to GLU Library
-#
-# On OSX default to using the framework version of opengl
-# People will have to change the cache values of OPENGL_glu_LIBRARY
-# and OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX
-
-#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-IF (WIN32)
-  IF (CYGWIN)
-
-    FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h )
-
-    FIND_LIBRARY(OPENGL_gl_LIBRARY opengl32 )
-
-    FIND_LIBRARY(OPENGL_glu_LIBRARY glu32 )
-
-  ELSE (CYGWIN)
-
-    IF(BORLAND)
-      SET (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32")
-      SET (OPENGL_glu_LIBRARY import32 CACHE STRING "GLU library for win32")
-    ELSE(BORLAND)
-      SET (OPENGL_gl_LIBRARY opengl32 CACHE STRING "OpenGL library for win32")
-      SET (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32")
-    ENDIF(BORLAND)
-
-  ENDIF (CYGWIN)
-
-ELSE (WIN32)
-
-  IF (APPLE)
-
-    FIND_LIBRARY(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX")
-    FIND_LIBRARY(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX")
-    FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h DOC "Include for OpenGL on OSX")
-
-  ELSE(APPLE)
-    # Handle HP-UX cases where we only want to find OpenGL in either hpux64
-    # or hpux32 depending on if we're doing a 64 bit build.
-    IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
-      SET(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/)
-    ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
-      SET(HPUX_IA_OPENGL_LIB_PATH
-        /opt/graphics/OpenGL/lib/hpux64/
-        /opt/graphics/OpenGL/lib/pa20_64)
-    ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
-
-    # The first line below is to make sure that the proper headers
-    # are used on a Linux machine with the NVidia drivers installed.
-    # They replace Mesa with NVidia's own library but normally do not
-    # install headers and that causes the linking to
-    # fail since the compiler finds the Mesa headers but NVidia's library.
-    # Make sure the NVIDIA directory comes BEFORE the others.
-    #  - Atanas Georgiev <atanas@cs.columbia.edu>
-
-    FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h
-      /usr/share/doc/NVIDIA_GLX-1.0/include
-      /usr/openwin/share/include
-      /opt/graphics/OpenGL/include /usr/X11R6/include
-    )
-
-    FIND_PATH(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
-      /usr/share/doc/NVIDIA_GLX-1.0/include
-      /usr/openwin/share/include
-      /opt/graphics/OpenGL/include /usr/X11R6/include
-    )
-
-    FIND_LIBRARY(OPENGL_gl_LIBRARY
-      NAMES GL MesaGL
-      PATHS /opt/graphics/OpenGL/lib
-            /usr/openwin/lib
-            /usr/shlib /usr/X11R6/lib
-            ${HPUX_IA_OPENGL_LIB_PATH}
-    )
-
-    # On Unix OpenGL most certainly always requires X11.
-    # Feel free to tighten up these conditions if you don't
-    # think this is always true.
-    # It's not true on OSX.
-
-    IF (OPENGL_gl_LIBRARY)
-      IF(NOT X11_FOUND)
-        INCLUDE(FindX11)
-      ENDIF(NOT X11_FOUND)
-      IF (X11_FOUND)
-        IF (NOT APPLE)
-          SET (OPENGL_LIBRARIES ${X11_LIBRARIES})
-        ENDIF (NOT APPLE)
-      ENDIF (X11_FOUND)
-    ENDIF (OPENGL_gl_LIBRARY)
-
-    FIND_LIBRARY(OPENGL_glu_LIBRARY
-      NAMES GLU MesaGLU
-      PATHS ${OPENGL_gl_LIBRARY}
-            /opt/graphics/OpenGL/lib
-            /usr/openwin/lib
-            /usr/shlib /usr/X11R6/lib
-    )
-
-  ENDIF(APPLE)
-ENDIF (WIN32)
-
-SET( OPENGL_FOUND "NO" )
-IF(OPENGL_gl_LIBRARY)
-
-    IF(OPENGL_xmesa_INCLUDE_DIR)
-      SET( OPENGL_XMESA_FOUND "YES" )
-    ELSE(OPENGL_xmesa_INCLUDE_DIR)
-      SET( OPENGL_XMESA_FOUND "NO" )
-    ENDIF(OPENGL_xmesa_INCLUDE_DIR)
-
-    SET( OPENGL_LIBRARIES  ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES})
-    IF(OPENGL_glu_LIBRARY)
-      SET( OPENGL_GLU_FOUND "YES" )
-      SET( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} )
-    ELSE(OPENGL_glu_LIBRARY)
-      SET( OPENGL_GLU_FOUND "NO" )
-    ENDIF(OPENGL_glu_LIBRARY)
-
-    SET( OPENGL_FOUND "YES" )
-
-    # This deprecated setting is for backward compatibility with CMake1.4
-
-    SET (OPENGL_LIBRARY ${OPENGL_LIBRARIES})
-
-ENDIF(OPENGL_gl_LIBRARY)
-
-# This deprecated setting is for backward compatibility with CMake1.4
-SET(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
-
-MARK_AS_ADVANCED(
-  OPENGL_INCLUDE_DIR
-  OPENGL_xmesa_INCLUDE_DIR
-  OPENGL_glu_LIBRARY
-  OPENGL_gl_LIBRARY
-)


Fix NO_CXXMODULE handling logic for dependencies

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -562,11 +562,15 @@
   #---Get the library and module dependencies-----------------
   if(ARG_DEPENDENCIES)
     foreach(dep ${ARG_DEPENDENCIES})
-      set(dependent_pcm ${libprefix}${dep}_rdict.pcm)
-      if (runtime_cxxmodules)
-        set(dependent_pcm ${dep}.pcm)
-      endif()
-      set(newargs ${newargs} -m  ${dependent_pcm})
+      set(dict "G__${dep}")
+      set(dependent_pcm ${libprefix}${dep}_rdict.pcm})
+      if(runtime_cxxmodules)
+        #---Check for NO_CXXMODULE flag in a dependent module---
+        set(dependent_pcm "$<IF:$<BOOL:$<TARGET_PROPERTY:${dict},NO_MODULE>>,,-m ${dep}.pcm>")
+        set(newargs ${newargs} ${dependent_pcm})
+      else()
+        set(newargs ${newargs} -m ${dependent_pcm})
+      endif()
     endforeach()
   endif()

@@ -647,7 +651,7 @@
   # would not happen if we used target_sources() directly with the dictionary source.
   if(TARGET "${ARG_MODULE}" AND NOT "${ARG_MODULE}" STREQUAL "${dictionary}")
     add_library(${dictionary} OBJECT ${dictionary}.cxx)
-    set_target_properties(${dictionary} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
+    set_target_properties(${dictionary} PROPERTIES POSITION_INDEPENDENT_CODE TRUE NO_MODULE ${ARG_NO_CXXMODULE})
     target_sources(${ARG_MODULE} PRIVATE $<TARGET_OBJECTS:${dictionary}>)

     target_compile_options(${dictionary} PRIVATE


Fixed netcdf module on linux

Fixed netcdf module on linux

--- cmake_modules/FindNETCDF.cmake
+++ cmake_modules/FindNETCDF.cmake
@@ -1,15 +1,16 @@
 IF(CMAKE_SYSTEM_NAME MATCHES Linux)
+    MESSAGE(STATUS "looking for libnetcdf and libnetcdf_c++4 here: ${LPATH}")
     FIND_PATH(NETCDF_INCLUDE_DIR netcdf.h PATHS /usr/include /usr/local/include /opt/local/include)
-    FIND_LIBRARY(NETCDF_CPP NAMES netcdf_c++4 PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64)
-    FIND_LIBRARY(NETCDF NAMES netcdf PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64)
+    FIND_LIBRARY(NETCDF NAMES netcdf PATHS ${LPATH})
+    FIND_LIBRARY(NETCDF_CPP NAMES netcdf_c++4 PATHS ${LPATH})
 ELSE(CMAKE_SYSTEM_NAME MATCHES Linux)
     FIND_PATH(NETCDF_INCLUDE_DIR netcdf PATHS /usr/include /usr/local/include /opt/local/include)
+    FIND_LIBRARY(NETCDF NAMES netcdf PATHS /usr/lib /usr/local/lib /opt/local/lib)
     FIND_LIBRARY(NETCDF_CPP NAMES netcdf_c++4 PATHS /usr/lib /usr/local/lib /opt/local/lib)
-    FIND_LIBRARY(NETCDF NAMES netcdf PATHS /usr/lib /usr/local/lib /opt/local/lib)
-ENDIF(CMAKE_SYSTEM_NAME MATCHES Linux)
+ENDIF(CMAKE_SYSTEM_NAME MATCHES Linux)

 IF (NETCDF AND NETCDF_CPP)
-   SET(NETCDF_LIBRARIES ${NETCDF_CPP} ${NETCDF} )
+   SET(NETCDF_LIBRARIES ${NETCDF_CPP} ${NETCDF})
 ELSE (NETCDF AND NETCDF_CPP)
    SET(NETCDF_LIBRARIES "NOTFOUND")
 ENDIF(NETCDF AND NETCDF_CPP)


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -11,6 +11,7 @@

 Name=GStreamer
 Name[bg]=GStreamer
+Name[bs]=Gstreamer
 Name[ca]=GStreamer
 Name[ca@valencia]=GStreamer
 Name[cs]=GStreamer


[cmake] Use last-before-max warning level for MSVC (/W4)

Allows to catch problems earlier.

--- cmake/DaemonFlags.cmake
+++ cmake/DaemonFlags.cmake
@@ -55,7 +55,7 @@
 function(try_flag LIST FLAG)
     string(REGEX REPLACE "[/=-]" "_" TEST ${FLAG})
     if (MSVC) # check_CXX_compiler_flag apparently always fails for MSVC.
-              # MSVC ignores unknown uptions, so just check if it begins with '/'.
+              # MSVC ignores unknown options, so just check if it begins with '/'.
         string(SUBSTRING "${FLAG}" 0 1 FLAG_FIRST_CHAR)
         if ("${FLAG_FIRST_CHAR}" STREQUAL "/")
             set(${TEST} 1)
@@ -120,6 +120,21 @@
     set_c_cxx_flag("/MP")
     set_c_cxx_flag("/fp:fast")
     set_c_cxx_flag("/d2Zi+" RELWITHDEBINFO)
+
+    # At least Ninja doesn't remove the /W3 flag when we add /W4|/Wall one, which
+    # leads to compilation warnings.  Remove /W3 entirely, as /W4|/Wall be used.
+    foreach(flag_var
+        CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
+        CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
+        CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+        CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+      if (${flag_var} MATCHES "/W3")
+        string(REGEX REPLACE "/W3" "" ${flag_var} "${${flag_var}}")
+      endif()
+    endforeach()
+
+    set_c_cxx_flag("/W4")
+
     if (ARCH STREQUAL "x86")
         set_c_cxx_flag("/arch:SSE2")
     endif()


consider also include from install prefix

--- cmake/FindMiniZip.cmake
+++ cmake/FindMiniZip.cmake
@@ -6,22 +6,21 @@
 #  MINIZIP_FOUND       - TRUE if minizip is found

-if (MINIZIP_INCLUDE_DIR)
+if(MINIZIP_INCLUDE_DIR)
   #check cache
   set(MINIZIP_FIND_QUIETLY TRUE)
-endif ()
+endif()

-
-if (NOT MINIZIP_INCLUDE_DIR)
-    find_path(MINIZIP_INCLUDE_DIR NAMES unzip.h zip.h PATH_SUFFIXES minizip)
-endif ()
+if(NOT MINIZIP_INCLUDE_DIR)
+  find_path(MINIZIP_INCLUDE_DIR NAMES minizip/unzip.h minizip/zip.h)
+endif()

 find_library(MINIZIP_LIBRARY NAMES minizip)

-include( FindPackageHandleStandardArgs )
-find_package_handle_standard_args( MINIZIP DEFAULT_MSG MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR )
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MINIZIP DEFAULT_MSG MINIZIP_LIBRARY MINIZIP_INCLUDE_DIR )

-mark_as_advanced( MINIZIP_INCLUDE_DIR MINIZIP_LIBRARY )
+mark_as_advanced(MINIZIP_INCLUDE_DIR MINIZIP_LIBRARY)

 if(MINIZIP_FOUND)
   set(MINIZIP_INCLUDE_DIRS ${MINIZIP_INCLUDE_DIR})


update

update

--- cmake/FindOGLplus.cmake
+++ cmake/FindOGLplus.cmake
@@ -2,7 +2,7 @@

 ####################################################################################################
 #                                                                                #
-# Copyright (C) 2014 University of Hull                                                            #
+# Copyright (C) 2014-2015 University of Hull                                                       #
 #                                                                                #
 ####################################################################################################

@@ -25,7 +25,7 @@

 # non-installed build-only locations will have .hpp/.ipp files in different directories;
 # in case of an installed location, i.e. .hpp/.ipp in the same place, the following
-# 'LIST(REMOVE_DUPLICATES ...)' takes care of dublicate
+# 'LIST(REMOVE_DUPLICATES ...)' takes care of duplicate
 FIND_PATH(OGLplus_HPP_DIR "oglplus/buffer.hpp"
           PATHS ${_oglplus_HEADER_SEARCH_DIRS}
 	  DOC "The directory where oglplus/buffer.hpp resides")
@@ -34,13 +34,15 @@
           PATHS ${_oglplus_HEADER_SEARCH_DIRS}
 	  DOC "The directory where oglplus/buffer.ipp resides")

-SET(OGLplus_INCLUDE_DIRS "${OGLplus_HPP_DIR};${OGLplus_IPP_DIR}")
+SET(OGLplus_INCLUDE_DIRS)
+LIST(APPEND OGLplus_INCLUDE_DIRS "${OGLplus_HPP_DIR}")
+LIST(APPEND OGLplus_INCLUDE_DIRS "${OGLplus_IPP_DIR}")
 LIST(REMOVE_DUPLICATES OGLplus_INCLUDE_DIRS)

 INCLUDE(FindPackageHandleStandardArgs)

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGLplus DEFAULT_MSG OGLplus_INCLUDE_DIRS)

-IF(OGLplus_FOUND AND VERBOSE)
+IF(OGLPLUS_FOUND AND VERBOSE)
   MESSAGE(STATUS "OGLplus_INCLUDE_DIRS = ${OGLplus_INCLUDE_DIRS}")
 ENDIF()


FindUmfPack: add AMD and COLAMD libraries only if they are found

--- cmake/FindUmfpack.cmake
+++ cmake/FindUmfpack.cmake
@@ -28,8 +28,8 @@
     find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
     if (AMD_LIBRARY)
       set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${AMD_LIBRARY})
-    else (AMD_LIBRARY)
-      set(UMFPACK_LIBRARIES FALSE)
+    #else (AMD_LIBRARY)
+    #  set(UMFPACK_LIBRARIES FALSE)
     endif (AMD_LIBRARY)

   endif(UMFPACK_LIBRARIES)
@@ -39,8 +39,8 @@
     find_library(COLAMD_LIBRARY colamd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
     if (COLAMD_LIBRARY)
       set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${COLAMD_LIBRARY})
-    else (COLAMD_LIBRARY)
-      set(UMFPACK_LIBRARIES FALSE)
+    #else (COLAMD_LIBRARY)
+    #  set(UMFPACK_LIBRARIES FALSE)
     endif (COLAMD_LIBRARY)

   endif(UMFPACK_LIBRARIES)


Findcppunit: work around cppunit naming on windows

The libcppunit shared libraries are named 'cppunit_dll' and 'cppunitd_dll' on windows so we conditionally add the _dll suffix when we are using MSVC and vcpkg
This also means that a cmake target needs to be used instead of directly adding the library name to the target_link_libraries() call for the tests.

--- cmake/Findcppunit.cmake
+++ cmake/Findcppunit.cmake
@@ -29,15 +29,23 @@
 	PATH
 	"Directory to search")

+set(CPPUNIT_LIB_NAME_RELEASE cppunit)
+set(CPPUNIT_LIB_NAME_DEBUG cppunitd)
+if (MSVC AND VCPKG_TARGET_TRIPLET AND NOT VCPKG_TARGET_TRIPLET MATCHES ".*-static")
+	set(CPPUNIT_LIB_NAME_RELEASE ${CPPUNIT_LIB_NAME_RELEASE}_dll)
+	set(CPPUNIT_LIB_NAME_DEBUG ${CPPUNIT_LIB_NAME_DEBUG}_dll)
+	set(CPPUNIT_SHARED TRUE)
+endif()
+
 find_library(CPPUNIT_LIBRARY_RELEASE
 	NAMES
-	cppunit
+	${CPPUNIT_LIB_NAME_RELEASE}
 	HINTS
 	"${CPPUNIT_ROOT_DIR}")

 find_library(CPPUNIT_LIBRARY_DEBUG
 	NAMES
-	cppunitd
+	${CPPUNIT_LIB_NAME_DEBUG}
 	HINTS
 	"${CPPUNIT_ROOT_DIR}")

@@ -65,11 +73,17 @@
 	CPPUNIT_INCLUDE_DIR)

 if(CPPUNIT_FOUND)
-	set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} ${CMAKE_DL_LIBS})
-	set(CPPUNIT_INCLUDE_DIRS "${CPPUNIT_INCLUDE_DIR}")
+	set(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY})
+	set(CPPUNIT_INCLUDE_DIRS ${CPPUNIT_INCLUDE_DIR})
 	mark_as_advanced(CPPUNIT_ROOT_DIR)
 endif()

 mark_as_advanced(CPPUNIT_INCLUDE_DIR
+	CPPUNIT_LIB_NAME_RELEASE
+	CPPUNIT_LIB_NAME_DEBUG
 	CPPUNIT_LIBRARY_RELEASE
 	CPPUNIT_LIBRARY_DEBUG)
+
+add_library(cppunit IMPORTED INTERFACE GLOBAL)
+target_link_libraries(cppunit INTERFACE ${CPPUNIT_LIBRARIES} ${CMAKE_DL_LIBS})
+include_directories(${CPPUNIT_INCLUDE_DIRS})


Fix IrccdSystem.cmake

Fix IrccdSystem.cmake

--- cmake/IrccdSystem.cmake
+++ cmake/IrccdSystem.cmake
@@ -54,9 +54,9 @@
 	endif ()

 	if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5")
-		message("-Wall -Wextra -std=c++1y  ${CMAKE_CXX_FLAGS}")
+		set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++1y ${CMAKE_CXX_FLAGS}")
 	else ()
-		message("-Wall -Wextra -std=c++14  ${CMAKE_CXX_FLAGS}")
+		set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++14 ${CMAKE_CXX_FLAGS}")
 	endif ()
 else ()
 	if (WIN32)


fix: ocv_target_link_libraries could not handle the keyword rightly #20430

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -1488,8 +1488,8 @@
       if(NOT LINK_PENDING STREQUAL "")
         __ocv_push_target_link_libraries(${LINK_MODE} ${LINK_PENDING})
         set(LINK_PENDING "")
-        set(LINK_MODE "${dep}")
-      endif()
+      endif()
+      set(LINK_MODE "${dep}")
     else()
       if(BUILD_opencv_world)
         if(OPENCV_MODULE_${dep}_IS_PART_OF_WORLD)


[clang] Conversion warning + promote clang-only warnings to errors

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -11,6 +11,11 @@

   # Clang/GCC
   set(REL_OPTS "-pipe -fvisibility=hidden -fvisibility-inlines-hidden -ffast-math -funroll-loops")
+
+  # Clang only
+  if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion -Werror=conversion -Wno-sign-conversion -Werror=nonportable-include-path -Werror=pessimizing-move -Werror=infinite-recursion")
+  endif()

   # GCC only
   if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")


Fix builds script

Fix builds script

--- cmake/third_party.cmake
+++ cmake/third_party.cmake
@@ -193,9 +193,9 @@
     foreach (lib ${MIF_THIRD_PARTY_LIBS})
         mif_add_third_party_paths(${lib})
     endforeach (lib)
-    mif_add_third_party_paths(${boost})
-    mif_add_third_party_paths(${libpq})
-    mif_add_third_party_paths(${sqlite})
+    mif_add_third_party_paths(boost)
+    mif_add_third_party_paths(libpq)
+    mif_add_third_party_paths(sqlite)
 endif()

 foreach (lib ${MIF_THIRD_PARTY_LIBS})


Add option to add test without ispc version

--- common/cmake/test.cmake
+++ common/cmake/test.cmake
@@ -67,6 +67,20 @@
                        --sde ${EMBREE_TESTING_SDE}
                        --execute ${MY_PROJECT_BINARY_DIR}/${executable}_ispc ${args})
     ENDIF()
+  ENDIF()
+ENDMACRO()
+
+MACRO (ADD_EMBREE_TEST_WITHOUT_ISPC name)
+  IF (BUILD_TESTING)
+    ADD_TEST(NAME ${name}
+             WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
+             COMMAND python ${PROJECT_SOURCE_DIR}/scripts/invoke_test.py
+                     --name ${name}
+                     --reference ${name}
+                     --modeldir ${EMBREE_MODEL_DIR}
+                     --model default
+                     --sde ${EMBREE_TESTING_SDE}
+                     --execute ${MY_PROJECT_BINARY_DIR}/${name})
   ENDIF()
 ENDMACRO()


Also exclude "*.a" files as they are ~106 MB

The .a files that are currently being installed are
from ffmpeg, and they are about 106 MB. We probably do
not need to install these...

Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>

--- projects/win32/tomviz.bundle.cmake
+++ projects/win32/tomviz.bundle.cmake
@@ -29,7 +29,8 @@
         DESTINATION "lib"
         USE_SOURCE_PERMISSIONS
         COMPONENT ${AppName}
-        PATTERN "*.lib" EXCLUDE)
+        PATTERN "*.lib" EXCLUDE
+        PATTERN "*.a" EXCLUDE)

 # install system runtimes.
 set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "bin")


Fixed some annotation tests.

Fixed some annotation tests.

It seems that is is mainly the old style charts that rely on the
FreeTypeTextMapper.

Change-Id: If7368a450f214b1f74a3a472c797f112af9f27fa

--- Rendering/Annotation/module.cmake
+++ Rendering/Annotation/module.cmake
@@ -5,7 +5,7 @@
     vtkRenderingFreeType
     vtkImagingColor
   TEST_DEPENDS
-    vtkRenderingOpenGL
+    vtkRenderingFreeTypeOpenGL
     vtkTestingRendering
     vtkInteractionStyle
     vtkRenderingLOD


ctest: Use ccache on dashboard builds

ctest: Use ccache on dashboard builds

This will hopefully reduce the load on my buildservers

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- test.cmake
+++ test.cmake
@@ -278,7 +278,7 @@
    set(CMAKE_MAKE_PROGRAM "make")
 endif()

-set(configure_options "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS};-DCMAKE_BUILD_TYPE=${build_type};-DBUILD_EXAMPLES=TRUE;-DTEST_OPERATOR_FAILURES=TRUE")
+set(configure_options "-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS};-DCMAKE_BUILD_TYPE=${build_type};-DBUILD_EXAMPLES=TRUE;-DTEST_OPERATOR_FAILURES=TRUE;-DUSE_CCACHE=ON")
 if(target_architecture)
    set(configure_options "${configure_options};-DTARGET_ARCHITECTURE=${target_architecture}")
 endif()


Added entry to files.cmake

Added entry to files.cmake

--- Modules/SegmentationUI/files.cmake
+++ Modules/SegmentationUI/files.cmake
@@ -3,6 +3,7 @@
 Qmitk/QmitkBinaryThresholdToolGUI.cpp
 Qmitk/QmitkBinaryThresholdULToolGUI.cpp
 Qmitk/QmitkCalculateGrayValueStatisticsToolGUI.cpp
+Qmitk/QmitkConfirmSegmentationDialog.cpp
 Qmitk/QmitkCopyToClipBoardDialog.cpp
 Qmitk/QmitkDrawPaintbrushToolGUI.cpp
 Qmitk/QmitkErasePaintbrushToolGUI.cpp
@@ -29,6 +30,7 @@
 Qmitk/QmitkBinaryThresholdToolGUI.h
 Qmitk/QmitkBinaryThresholdULToolGUI.h
 Qmitk/QmitkCalculateGrayValueStatisticsToolGUI.h
+Qmitk/QmitkConfirmSegmentationDialog.h
 Qmitk/QmitkCopyToClipBoardDialog.h
 Qmitk/QmitkDrawPaintbrushToolGUI.h
 Qmitk/QmitkErasePaintbrushToolGUI.h
@@ -52,5 +54,6 @@

 set(UI_FILES
 Qmitk/QmitkAdaptiveRegionGrowingToolGUIControls.ui
+Qmitk/QmitkConfirmSegmentationDialog.ui
 Qmitk/QmitkOtsuToolWidgetControls.ui
 )


Remove double def for openblas

Remove double def for openblas

--- cmake/BlasLapackUtils.cmake
+++ cmake/BlasLapackUtils.cmake
@@ -84,7 +84,6 @@
     set(LAPACK_EXTRA_LIBS lapacke)
     set(LAPACK_SUFFIX)
     set(LAPACK_PREFIX "LAPACKE_")
-    set(HAS_OpenBLAS 1 CACHE BOOL "Blas/Lapack come from OpenBlas ")
   elseif(BLAS_LIBRARIES MATCHES "Accelerate" OR BLA_VENDOR MATCHES "Apple")
     set(BLAS_NAME "Accelerate")
     set(BLAS_HEADER cblas.h)


CMake: Fix add_lit_target for the case where a test suite has zero target dependencies.

This can happen with a standalone project containing a test suite with no
internal dependencies.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -736,17 +736,19 @@
   foreach(param ${ARG_PARAMS})
     list(APPEND LIT_COMMAND --param ${param})
   endforeach()
-  if( ARG_DEPENDS )
+  if (ARG_DEFAULT_ARGS)
     add_custom_target(${target}
       COMMAND ${LIT_COMMAND} ${ARG_DEFAULT_ARGS}
       COMMENT "${comment}"
       ${cmake_3_2_USES_TERMINAL}
       )
-    add_dependencies(${target} ${ARG_DEPENDS})
   else()
     add_custom_target(${target}
       COMMAND ${CMAKE_COMMAND} -E echo "${target} does nothing, no tools built.")
     message(STATUS "${target} does nothing.")
+  endif()
+  if (ARG_DEPENDS)
+    add_dependencies(${target} ${ARG_DEPENDS})
   endif()

   # Tests should be excluded from "Build Solution".


properly find libidn on win32

properly find libidn on win32

svn path=/trunk/KDE/kdenetwork/cmake/modules/FindIDN.cmake; revision=707718

--- cmake/modules/FindIDN.cmake
+++ cmake/modules/FindIDN.cmake
@@ -10,25 +10,29 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 IF (NOT WIN32)
-INCLUDE(UsePkgConfig)
+  INCLUDE(UsePkgConfig)

-PKGCONFIG(libidn _IDNIncDir _IDNLinkDir _IDNLinkFlags _IDNCflags)
+  PKGCONFIG(libidn _IDNIncDir _IDNLinkDir _IDNLinkFlags _IDNCflags)
+
+  FIND_PATH(IDN_INCLUDE_DIR idna.h
+    PATHS
+    ${_IDNIncDir}
+    NO_DEFAULT_PATH
+  )
+
+  set(IDN_DEFINITIONS ${_IDNCflags})
+
+  FIND_LIBRARY(IDN_LIBRARY NAMES idn
+    PATHS
+    ${_IDNLinkDir}
+    NO_DEFAULT_PATH
+  )
+ELSE (NOT WIN32)
+  FIND_PATH(IDN_INCLUDE_DIR idna.h)
+  FIND_LIBRARY(IDN_LIBRARY NAMES idn idn-11 libidn-11)
 ENDIF (NOT WIN32)
-
-FIND_PATH(IDN_INCLUDE_DIR idna.h
-  PATHS
-  ${_IDNIncDir}
-  NO_DEFAULT_PATH
-)
-
-set(IDN_DEFINITIONS ${_IDNCflags})
 set(IDN_INCLUDES ${IDN_INCLUDE_DIR} )

-FIND_LIBRARY(IDN_LIBRARY NAMES idn
-  PATHS
-  ${_IDNLinkDir}
-  NO_DEFAULT_PATH
-)
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(IDN DEFAULT_MSG IDN_INCLUDES IDN_LIBRARY )


Qt5 load modules patch.

Qt5 load modules patch.

* load modules in a separate macro before doit hook.

Separation of concerns:
* load modules, generate resources and ui-header before doit
* create target after doit hook

Change-Id: I51e4ae4aec4b3e8df4d9a969b04482db7f3eca1b

--- cmake/plugins/Qt5/Qt5.cmake
+++ cmake/plugins/Qt5/Qt5.cmake
@@ -19,7 +19,9 @@
 #--------------------------------------------------------------------------

 SET(CONFIG_USE_QT5	  0	 CACHE BOOL	   "enable the support of QT5")
-
+SET(GLOBAL_ACME_QT5_MODULES "" CACHE  INTERNAL "QT5 modules of current module")
+SET(GLOBAL_ACME_QT5_UIFILES "" CACHE  INTERNAL "QT5 uifiles of current module")
+SET(GLOBAL_ACME_QT5_RESFILES "" CACHE  INTERNAL "QT5 resfiles of current module")

 #--------------------------------------------------------------------------
 # Plugin External Tools
@@ -27,13 +29,13 @@

 MESSAGE(VERBOSE "...requires installation of QT5")
 IF(CONFIG_USE_QT5)
-
-	set(CMAKE_INCLUDE_CURRENT_DIR ON)
-	SET(CMAKE_AUTOMOC ON)
-
-	IF(NOT QT5_FOUND)
-		INCLUDE(${ACME_PATH}/tools/FindQT5.cmake)
-	ENDIF()
+
+    SET(CMAKE_INCLUDE_CURRENT_DIR ON)
+    SET(CMAKE_AUTOMOC ON)
+
+    IF(NOT QT5_FOUND)
+        INCLUDE(${ACME_PATH}/tools/FindQT5.cmake)
+    ENDIF()
 ENDIF()

@@ -42,8 +44,10 @@
 #--------------------------------------------------------------------------

 IF(CONFIG_USE_QT5)
-	ADD_PLUGIN_AFTER_DOIT_HOOK(INTERNAL_CREATE_QT5_TARGET)
-        ADD_PLUGIN_BEFORE_DOIT_HOOK(INTERNAL_QT5_RESOURCES)
+    ADD_PLUGIN_BEFORE_DOIT_HOOK(INTERNAL_QT5_MODULES)
+    ADD_PLUGIN_BEFORE_DOIT_HOOK(INTERNAL_QT5_RESOURCES)
+    ADD_PLUGIN_BEFORE_DOIT_HOOK(INTERNAL_QT5_UIFILES)
+    ADD_PLUGIN_AFTER_DOIT_HOOK(INTERNAL_CREATE_QT5_TARGET)
 ENDIF()

@@ -53,60 +57,70 @@

 FUNCTION(ACME_QT5_USE_MODULES module)
-	SET(GLOBAL_ACME_QT5_MODULES ${module} ${ARGN} CACHE  INTERNAL "QT5 modules of current module")
+    SET(GLOBAL_ACME_QT5_MODULES ${module} ${ARGN} CACHE  INTERNAL "QT5 modules of current module")
 ENDFUNCTION()

 FUNCTION(ACME_QT5_WRAP_UI uifile)
-	SET(GLOBAL_ACME_QT5_UIFILES ${uifile} ${ARGN} CACHE  INTERNAL "QT5 uifiles of current module")
+    SET(GLOBAL_ACME_QT5_UIFILES ${uifile} ${ARGN} CACHE  INTERNAL "QT5 uifiles of current module")
+ENDFUNCTION()
+
+FUNCTION(ACME_QT5_ADD_RESOURCE_FILE resfile)
+    SET(GLOBAL_ACME_QT5_RESFILES ${resfile} ${ARGN} CACHE  INTERNAL "QT5 resfiles of current module")
 ENDFUNCTION()

-FUNCTION(ACME_QT5_ADD_RESOURCE_FILE resfile)
-        SET(GLOBAL_ACME_QT5_RESFILES ${resfile} ${ARGN} CACHE  INTERNAL "QT5 resfiles of current module")
-ENDFUNCTION()
+MACRO(INTERNAL_QT5_MODULES)

-MACRO(INTERNAL_QT5_RESOURCES)
-        STRING(TOUPPER ${CURRENT_MODULE_NAME} CURRENT_UPPER_MODULE_NAME)
-        FOREACH(ACME_QT_RESFILE ${GLOBAL_ACME_QT5_RESFILES})
-                SET(QT5_RESFILE "${CMAKE_CURRENT_SOURCE_DIR}/${CURRENT_MODULE_NAME}/${ACME_QT_RESFILE}.qrc")
-                IF(EXISTS ${QT5_RESFILE})
-                        qt5_add_resources(ACME_QT_RESFILE_TO_LINK ${QT5_RESFILE})
-                        SET(${CURRENT_UPPER_MODULE_NAME}_MODULE_SOURCE_FILES ${${CURRENT_UPPER_MODULE_NAME}_MODULE_SOURCE_FILES} ${QT5_RESFILE} ${ACME_QT_RESFILE_TO_LINK} CACHE INTERNAL "")
-                ENDIF()
+    IF(NOT "${GLOBAL_ACME_QT5_MODULES}" STREQUAL "")
+        FOREACH(ACME_QT_MODULE ${GLOBAL_ACME_QT5_MODULES})
+            find_package(Qt5${ACME_QT_MODULE} REQUIRED)
         ENDFOREACH()
-        SET(GLOBAL_ACME_QT5_RESFILES "" CACHE  INTERNAL "QT5 resfiles of current module")
-ENDMACRO()
-
-# Must be a macro
-MACRO(INTERNAL_CREATE_QT5_TARGET)
-	IF(NOT "${GLOBAL_ACME_QT5_MODULES}" STREQUAL "")
-
-		SET(CMAKE_MODULE_PATH_BACKUP "${CMAKE_MODULE_PATH}")
-		SET(CMAKE_MODULE_PATH "")
-
-		FOREACH(ACME_QT_MODULE ${GLOBAL_ACME_QT5_MODULES})
-			find_package(Qt5${ACME_QT_MODULE} REQUIRED)
-		ENDFOREACH()
-
-		qt5_use_modules(${CURRENT_MODULE_NAME} ${GLOBAL_ACME_QT5_MODULES})
-
-		SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH_BACKUP}")
-
-		FOREACH(ACME_QT_UIFILE ${GLOBAL_ACME_QT5_UIFILES})
-			SET(QT5_UIFILE "${CMAKE_CURRENT_SOURCE_DIR}/${CURRENT_MODULE_NAME}/${ACME_QT_UIFILE}.ui")
-			IF(EXISTS ${QT5_UIFILE})
-				qt5_wrap_ui(ui_${ACME_QT_UIFILE}.h "${QT5_UIFILE}")
-			ENDIF()
-		ENDFOREACH()
-
-	ENDIF()
-	SET(GLOBAL_ACME_QT5_MODULES "" CACHE  INTERNAL "QT5 modules of current module")
-	SET(GLOBAL_ACME_QT5_UIFILES "" CACHE  INTERNAL "QT5 uifiles of current module")
+    ENDIF()

 ENDMACRO()

+MACRO(INTERNAL_QT5_RESOURCES)
+
+    IF(NOT "${GLOBAL_ACME_QT5_MODULES}" STREQUAL "")
+        STRING(TOUPPER ${CURRENT_MODULE_NAME} CURRENT_UPPER_MODULE_NAME)
+        FOREACH(ACME_QT_RESFILE ${GLOBAL_ACME_QT5_RESFILES})
+            SET(QT5_RESFILE "${CMAKE_CURRENT_SOURCE_DIR}/${CURRENT_MODULE_NAME}/${ACME_QT_RESFILE}.qrc")
+            IF(EXISTS ${QT5_RESFILE})
+                qt5_add_resources(ACME_QT_RESFILE_TO_LINK ${QT5_RESFILE})
+                SET(${CURRENT_UPPER_MODULE_NAME}_MODULE_SOURCE_FILES ${${CURRENT_UPPER_MODULE_NAME}_MODULE_SOURCE_FILES} ${QT5_RESFILE} ${ACME_QT_RESFILE_TO_LINK} CACHE INTERNAL "")
+            ENDIF()
+        ENDFOREACH()
+    ENDIF()
+
+ENDMACRO()

+MACRO(INTERNAL_QT5_UIFILES)
+
+    IF(NOT "${GLOBAL_ACME_QT5_MODULES}" STREQUAL "")
+        FOREACH(ACME_QT_UIFILE ${GLOBAL_ACME_QT5_UIFILES})
+            SET(QT5_UIFILE "${CMAKE_CURRENT_SOURCE_DIR}/${CURRENT_MODULE_NAME}/${ACME_QT_UIFILE}.ui")
+            IF(EXISTS ${QT5_UIFILE})
+                qt5_wrap_ui(GENERATED_QT5_UIFILENAME "${QT5_UIFILE}")
+                SET(${CURRENT_UPPER_MODULE_NAME}_MODULE_SOURCE_FILES ${${CURRENT_UPPER_MODULE_NAME}_MODULE_SOURCE_FILES} ${QT5_UIFILE} ${GENERATED_QT5_UIFILENAME} CACHE INTERNAL "")
+            ENDIF()
+        ENDFOREACH()
+    ENDIF()
+
+ENDMACRO()

+# Must be a macro
+MACRO(INTERNAL_CREATE_QT5_TARGET)
+
+    IF(NOT "${GLOBAL_ACME_QT5_MODULES}" STREQUAL "")
+        SET(CMAKE_MODULE_PATH_BACKUP "${CMAKE_MODULE_PATH}")
+        SET(CMAKE_MODULE_PATH "")
+
+        qt5_use_modules(${CURRENT_MODULE_NAME} ${GLOBAL_ACME_QT5_MODULES})
+
+        SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH_BACKUP}")
+    ENDIF()
+
+ENDMACRO()


Fixed FindVTK

Fixed FindVTK

--- cmake_modules/FindVTK.cmake
+++ cmake_modules/FindVTK.cmake
@@ -77,7 +77,7 @@
   find_path(VTK_LIB_DIR
     NAMES UseVTK.cmake
     PATH_SUFFIXES vtk-5.6 vtk-5.10 vtk
-    HINTS $ENV{VTK_LIB_DIR} $ENV{HOME}/LPS/prerequisites/vtk $ENV{USERPROFILE}/LPS/prerequisites/vtk/lib
+    HINTS $ENV{VTK_LIB_DIR} $ENV{HOME}/LPS/prerequisites/vtk/lib $ENV{USERPROFILE}/LPS/prerequisites/vtk/lib

     PATHS

@@ -104,7 +104,7 @@
 get_filename_component(__TMP_DIR "${VTK_LIB_DIR}" PATH)
 get_filename_component(__TMP_DIR "${__TMP_DIR}" PATH)
 set(VTK_BIN_DIR "${__TMP_DIR}/bin" CACHE PATH "VTK Runtime libraries location.")
-
+message(STATUS "${VTK_BIN_DIR}")
 #-----------------------------------------------------------------------------
 if(VTK_FOUND)
   # set USE_VTK_FILE for backward-compatability.


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


--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -10,6 +10,7 @@
 InitialPreference=10

 Name=VLC
+Name[bg]=VLC
 Name[bs]=VLC
 Name[ca]=VLC
 Name[ca@valencia]=VLC
@@ -41,6 +42,7 @@
 Name[zh_TW]=VLC

 Comment=Phonon VLC backend
+Comment[bg]=Ядро VLC за Phonon
 Comment[bs]=VLC kao pozadina za Phonon
 Comment[ca]=Dorsal del VLC pel Phonon
 Comment[ca@valencia]=Dorsal del VLC pel Phonon


Fix setting of architecture for MinGW builds

The architecture has been correctly determined earlier in this
file. No need to do it again.

--- cmake/OpenCVDetectCXXCompiler.cmake
+++ cmake/OpenCVDetectCXXCompiler.cmake
@@ -144,11 +144,7 @@
 elseif(MINGW)
   set(OpenCV_RUNTIME mingw)

-  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
-                  OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
-                  OUTPUT_STRIP_TRAILING_WHITESPACE)
-  if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "mingw64")
-    set(MINGW64 1)
+  if(MINGW64)
     set(OpenCV_ARCH x64)
   else()
     set(OpenCV_ARCH x86)


Updating dependency googlemock to version 1.7.0

Due to some warnings caused on the newest gcc version the version of
googlemock is updated from version 1.6.0 to version 1.7.0

Change-Id: I0ef6f297b4e47eb98440a1891399cbe08718f089

--- cmake/acme/plugins/GoogleMock.cmake
+++ cmake/acme/plugins/GoogleMock.cmake
@@ -18,7 +18,8 @@
 	UNSET(BUILD_GoogleMock CACHE)
 ELSE()
 	IF("${CONFIG_GTEST_URL}" STREQUAL "")
-		SET(CONFIG_GTEST_URL "http://googlemock.googlecode.com/files/gmock-1.6.0.zip")
+		SET(CONFIG_GTEST_URL "http://googlemock.googlecode.com/files/gmock-1.7.0.zip")
+		SET(CONFIG_GTEST_URL_MD5_CHECKSUM "073b984d8798ea1594f5e44d85b20d66")
 	ENDIF()

 	SET(NEEDED_LIBRARIES "Thread")
@@ -30,7 +31,7 @@
 						LIBDIRS "src/GoogleMock-build" "src/GoogleMock-build/gtest"
 						INCLUDE_DIRS "src/GoogleMock/include" "src/GoogleMock/gtest/include"
 						URL "${CONFIG_GTEST_URL}"
-						CHECKSUM "f547f47321ca88d3965ca2efdcc2a3c1"
+						CHECKSUM "${CONFIG_GTEST_URL_MD5_CHECKSUM}"
 						CMAKE_ARGUMENTS "gtest_force_shared_crt:Bool=1"
 						REQUIRED_PACKAGES "${NEEDED_LIBRARIES}"
 						)


[cmake] cleanup obsolete finds

[cmake] cleanup obsolete finds

--- cmake/modules/DuneStuffMacros.cmake
+++ cmake/modules/DuneStuffMacros.cmake
@@ -121,14 +121,6 @@
   set(HAVE_EIGEN 0)
 endif(EIGEN3_FOUND)

-pkg_check_modules(LIBAMA libama)
-if(LIBAMA_FOUND)
-        include_directories(${LIBAMA_INCLUDE_DIRS})
-        find_library(LIBAMA_LIBRARY NAMES ama
-                HINTS ${LIBAMA_LIBDIR} ${LIBAMA_LIBRARY_DIRS})
-        list(APPEND DUNE_DEFAULT_LIBS ${LIBAMA_LIBRARY})
-endif(LIBAMA_FOUND)
-
 include(FindLIKWID)
 find_package(LIKWID)
 if(LIKWID_FOUND)
@@ -137,29 +129,19 @@
 endif(LIKWID_FOUND)
 set(ENABLE_PERFMON 0 CACHE STRING "enable likwid performance monitoring API usage")

-
-# include(FindFASP)
-
-if(ENABLE_MPI)
+if(ENABLE_MPI AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   find_package(MPI REQUIRED)
   if(MPI_FOUND)
-    if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-      message(STATUS "Enabling mpi features, mac style!")
-      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS} -pthread -DMPIPP_H -DENABLE_MPI=1" )
-      include_directories(${MPI_CXX_INCLUDE_PATH})
-      SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_CXX_LINK_FLAGS} -pthread")
-      LIST( APPEND PARALIBS ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
-    else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-      message(STATUS "Enabling mpi features")
-      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS} -pthread -DMPIPP_H -DENABLE_MPI=1" )
-      include_directories(${MPI_CXX_INCLUDE_PATH})
-      SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_CXX_LINK_FLAGS} -pthread -lopen-rte -lopen-pal -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl")
-      LIST( APPEND PARALIBS ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY} parmetis metis)
-    endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+    message(STATUS "Enabling mpi features, mac style!")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS} -pthread -DMPIPP_H -DENABLE_MPI=1" )
+    include_directories(${MPI_CXX_INCLUDE_PATH})
+    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_CXX_LINK_FLAGS} -pthread")
+    LIST( APPEND PARALIBS ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
   else(MPI_FOUND)
     message(FATAL "mpi requested but not found")
   endif(MPI_FOUND)
-endif(ENABLE_MPI)
+endif(ENABLE_MPI AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+
 include(FindTBB)
 find_package(TBB)
 if(TBB_FOUND)


Check PROJECT_BINARY_DIR is not empty

Check PROJECT_BINARY_DIR is not empty

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -62,6 +62,13 @@
   hunter_status_print("${h_root_name}: ${${h_root_name}} (ver.: ${ver})")

   # creating temporary working directory where download project will reside
+  if(NOT PROJECT_BINARY_DIR)
+    message(
+        FATAL_ERROR
+        "PROJECT_BINARY_DIR is empty. "
+        "Move file **after** first 'project' command"
+    )
+  endif()
   set(h_work_dir "${PROJECT_BINARY_DIR}/_HUNTER_temp_download_project")
   file(REMOVE_RECURSE "${h_work_dir}")


xxf86vm: Generate CMake config

xxf86vm: Generate CMake config

[skip ci]

--- cmake/projects/xxf86vm/hunter.cmake
+++ cmake/projects/xxf86vm/hunter.cmake
@@ -34,8 +34,9 @@
 )
 hunter_cmake_args(
     xxf86vm
-    CMAKE_ARGS         # do not use double quotes on CMAKE_ARGS
-      DEPENDS_ON_PACKAGES=${xxf86vm_dependencies}
+    CMAKE_ARGS
+    DEPENDS_ON_PACKAGES=${xxf86vm_dependencies}
+    PKGCONFIG_EXPORT_TARGETS=xxf86vm
 )
 hunter_cacheable(xxf86vm)
 hunter_download(


Add compile options for clang 3.5 and 3.6

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -60,13 +60,13 @@

 set(DEFAULT_COMPILE_OPTIONS)

-if (PLATFORM_LINUX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+if (PLATFORM_LINUX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # GCC 4.9 and 5.1
     set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
         -Wall
         -Wextra
         -Wunused
         -Wpedantic
-
+
         -Wctor-dtor-privacy
         -Wdelete-non-virtual-dtor
         -Wnarrowing
@@ -110,12 +110,12 @@
         -Winline
         -Wlong-long
         -Wvector-operation-performance
-
+
         -Wno-pragmas
         -Wno-attributes
     )

-    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0)
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0) # GCC 5.1
         set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
             -Wsuggest-attribute
             -Wsuggest-final-types
@@ -127,6 +127,57 @@
             -Wlogical-not-parentheses
         )
     endif()
+endif ()
+
+if (PLATFORM_LINUX AND PLATFORM_LINUX AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # Clang 3.5 and 3.6
+    set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
+        -Wall
+        -Wextra
+        -Wunused
+        -Wpedantic
+
+        -Wctor-dtor-privacy
+        -Wdelete-non-virtual-dtor
+        -Wnarrowing
+        -Wnon-virtual-dtor
+        -Wreorder
+        -Weffc++
+        -Woverloaded-virtual
+        -Wformat
+        -Wignored-qualifiers
+        -Wmain
+        -Wmissing-braces
+        -Wparentheses
+        -Wsequence-point
+        -Wreturn-type
+        -Wreturn-stack-address
+        -Wswitch
+        -Wswitch-default
+        -Wuninitialized
+        -Wfloat-equal
+        -Wshadow
+        -Wpointer-arith
+        -Wtype-limits
+        -Wcast-align
+        -Wconversion
+        -Wint-to-void-pointer-cast
+        -Wempty-body
+        -Wsign-compare
+        -Wsign-conversion
+        -Wfloat-conversion
+        -Wsizeof-pointer-memaccess
+        -Waddress
+        -Wmissing-declarations
+        -Wmissing-field-initializers
+        -Wpadded
+        -Wredundant-decls
+        -Winline
+        -Wlong-long
+        -Wlogical-not-parentheses
+
+        -Wno-pragmas
+        -Wno-attributes
+    )
 endif ()


Fix target properites

Fix target properites

--- cmake/External_gtest.cmake
+++ cmake/External_gtest.cmake
@@ -80,7 +80,8 @@
   add_library("${CMAKE_SHARED_LIBRARY_PREFIX}gtest" IMPORTED SHARED GLOBAL)
   add_dependencies("${CMAKE_SHARED_LIBRARY_PREFIX}gtest" gtest)
 else()
-  set_target_properties("${CMAKE_SHARED_LIBRARY_PREFIX}gtest" IMPORTED SHARED GLOBAL)
+  set_target_properties("${CMAKE_SHARED_LIBRARY_PREFIX}gtest"
+    PROPERTIES IMPORTED SHARED GLOBAL)
 endif()
 add_library(${CMAKE_SHARED_LIBRARY_PREFIX}gtest_main IMPORTED SHARED GLOBAL)
 add_dependencies(${CMAKE_SHARED_LIBRARY_PREFIX}gtest_main gtest)


raise fatal error if package is required

--- cmake/FindGoogleTest.cmake
+++ cmake/FindGoogleTest.cmake
@@ -30,7 +30,7 @@
       message(STATUS "Found Google Test Framework: ${GTEST_LIBRARY}")
    endif ()
 else ()
-    if (GTEST_FIND_REQUIRED)
+   if (NOT GTEST_FIND_QUIETLY)
       message(FATAL_ERROR "Could NOT find Google Test Framework")
     else ()
       message(STATUS "Could NOT find Google Test Framework")


Revert "update mklml.cmake to 2019.0.5 (#24022)" (#24147)

This reverts commit 652e804b411afa4669f1f2c8446cc18e57b07a98.
test=develop

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


Clean build

Clean build

--- cmake/modules/FindUV.cmake
+++ cmake/modules/FindUV.cmake
@@ -8,8 +8,6 @@
 if (NOT UV_DIR)
     message(FATAL_ERROR "libuv not found!")
 endif()
-
-message(STATUS "CMAKE_C_COMPILER => ${CMAKE_C_COMPILER}")

 set(UV_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/vendor/libuv")
 include(ExternalProject)
@@ -23,7 +21,7 @@
     LIST_SEPARATOR " "
     BUILD_IN_SOURCE 1

-    CONFIGURE_COMMAND ${UV_DIR}/autogen.sh COMMAND ${UV_DIR}/configure --prefix=${UV_INSTALL_DIR} --enable-static --disable-shared CFLAGS=-fPIC CC=${CMAKE_C_COMPILER}
+    CONFIGURE_COMMAND ${UV_DIR}/autogen.sh COMMAND make clean COMMAND ${UV_DIR}/configure --prefix=${UV_INSTALL_DIR} --enable-static --disable-shared CFLAGS=-fPIC CC=${CMAKE_C_COMPILER}
     BUILD_COMMAND make --trace
     INSTALL_COMMAND make install


added boost 1.48 and 1.49 to the mix

added boost 1.48 and 1.49 to the mix

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -8,7 +8,7 @@
 if(${CMAKE_VERSION} VERSION_LESS 2.8.5)
   SET(Boost_ADDITIONAL_VERSIONS "1.43" "1.43.0" "1.44" "1.44.0" "1.45" "1.45.0" "1.46.1" "1.46.0" "1.46" "1.47" "1.47.0")
 else(${CMAKE_VERSION} VERSION_LESS 2.8.5)
-  SET(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0")
+  SET(Boost_ADDITIONAL_VERSIONS "1.47" "1.47.0" "1.48" "1.48.0" "1.49" "1.49.0")
 endif(${CMAKE_VERSION} VERSION_LESS 2.8.5)

 # Disable the config mode of find_package(Boost)


This makes it so that if we are under someone else, we just build the library.

--- cmake/simdjson-flags.cmake
+++ cmake/simdjson-flags.cmake
@@ -1,4 +1,21 @@
-option(SIMDJSON_JUST_LIBRARY "Build just the library, omit tests, tools and benchmarks" OFF)
+
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+  message (STATUS "The simdjson repository appears to be standalone.")
+  option(SIMDJSON_JUST_LIBRARY "Build just the library, omit tests, tools and benchmarks" OFF)
+  message (STATUS "By default, we attempt to build everything.")
+else()
+  message (STATUS "The simdjson repository appears to be used as a subdirectory.")
+  option(SIMDJSON_JUST_LIBRARY "Build just the library, omit tests, tools and benchmarks" ON)
+  message (STATUS "By default, we just build the library.")
+endif()
+
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
+  set(SIMDJSON_IS_UNDER_GIT ON CACHE BOOL  "Whether cmake is under git control")
+  message( STATUS "The simdjson repository appears to be under git." )
+else()
+  set(SIMDJSON_IS_UNDER_GIT OFF CACHE BOOL  "Whether cmake is under git control")
+  message( STATUS "The simdjson repository does not appear to be under git." )
+endif()

 #
 # Flags used by exes and by the simdjson library (project-wide flags)


Add include for CMakeParseArguments in order to be compatible with older cmake

--- cmake_toolchain/vita.cmake
+++ cmake_toolchain/vita.cmake
@@ -10,6 +10,8 @@
 ##   - VITA_LIBS_GEN_FLAGS
 ##   - VITA_MKSFOEX_FLAGS
 ##   - VITA_PACK_VPK_FLAGS
+
+include(CMakeParseArguments)

 ##################################################
 ## MACRO: vita_create_self