FindMKL.cmake: allow double include

FindMKL.cmake: allow double include

Only create targets if they are not existing already, this happens
when find_package(MKL) is called twice for some reason.

Also supipress a warning from cmake-3.17 about mismatching package
names.

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -203,6 +203,10 @@
   set(multi_args "")

   cmake_parse_arguments(mkl_args "${options}" "${single_args}" "${multi_args}" ${ARGN})
+
+  if(TARGET MKL::${mkl_args_NAME})
+    return()
+  endif()

   add_library(MKL::${mkl_args_NAME}        SHARED IMPORTED)
   add_library(MKL::${mkl_args_NAME}_STATIC STATIC IMPORTED)
@@ -315,11 +319,13 @@
   if(MKL_ThreadingLibrary_LINK_LIBRARY)
     mark_as_advanced(MKL_${mkl_args_NAME}_LINK_LIBRARY)
   endif()
-  add_library(MKL::ThreadingLibrary SHARED IMPORTED)
-  set_target_properties(MKL::ThreadingLibrary
-    PROPERTIES
-      IMPORTED_LOCATION "${MKL_ThreadingLibrary_LINK_LIBRARY}"
-      INTERFACE_LINK_LIBRARIES OpenMP::OpenMP_CXX)
+  if(NOT TARGET MKL::ThreadingLibrary)
+    add_library(MKL::ThreadingLibrary SHARED IMPORTED)
+    set_target_properties(MKL::ThreadingLibrary
+      PROPERTIES
+        IMPORTED_LOCATION "${MKL_ThreadingLibrary_LINK_LIBRARY}"
+        INTERFACE_LINK_LIBRARIES OpenMP::OpenMP_CXX)
+  endif()
 elseif(MKL_THREAD_LAYER STREQUAL "TBB")
   find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_tbb_thread SEARCH_STATIC)
   find_mkl_library(NAME ThreadingLibrary LIBRARY_NAME tbb)
@@ -350,6 +356,11 @@
 set(MKL_RUNTIME_KERNEL_LIBRARIES "${MKL_RUNTIME_KERNEL_LIBRARIES_TMP}" CACHE STRING
     "MKL kernel libraries targeting different CPU architectures")
 mark_as_advanced(MKL_RUNTIME_KERNEL_LIBRARIES)
+
+# Bypass developer warning that the first argument to find_package_handle_standard_args (MKL_...) does not match
+# the name of the calling package (MKL)
+# https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html
+set(FPHSA_NAME_MISMATCHED TRUE)

 find_package_handle_standard_args(MKL_Shared
   FAIL_MESSAGE "Could NOT find MKL: Source the compilervars.sh or mklvars.sh scripts included with your installation of MKL. This script searches for the libraries in MKLROOT, LIBRARY_PATHS(Linux), and LIB(Windows) environment variables"
@@ -372,7 +383,7 @@
   mark_as_advanced(M_LIB)
 endif()

-if(MKL_Shared_FOUND)
+if(MKL_Shared_FOUND AND NOT TARGET MKL::Shared)
   add_library(MKL::Shared SHARED IMPORTED)
   if(MKL_THREAD_LAYER STREQUAL "Sequential")
     set_target_properties(MKL::Shared
@@ -397,7 +408,7 @@
   endif()
 endif()

-if(MKL_Static_FOUND)
+if(MKL_Static_FOUND AND NOT TARGET MKL::Static)
   add_library(MKL::Static STATIC IMPORTED)

   if(UNIX AND NOT APPLE)


solved 3DMetricTools.cmake problem

solved 3DMetricTools.cmake problem

--- 3DMetricTools.cmake
+++ 3DMetricTools.cmake
@@ -1,6 +1,12 @@
 cmake_minimum_required(VERSION 2.8.3)

 project( 3DMetricTools )
+
+unset( USE_SYSTEM_ITK CACHE )
+unset( USE_SYSTEM_SlicerExecutionModel CACHE )
+unset( USE_SYSTEM_VTK CACHE )
+unset( USE_GIT_PROTOCOL_3DMetricTools_SUPERBUILD CACHE )
+unset( FORCE_EXTERNAL_BUILDS CACHE )

 ## A simple macro to set variables ONLY if it has not been set
 ## This is needed when stand-alone packages are combined into
@@ -30,35 +36,42 @@
   endif(NOT ${KEY})
 endmacro(SETIFEMPTY KEY VALUE)
 endif(NOT SETIFEMPTY)
+
 SETIFEMPTY( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
 SETIFEMPTY( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib )
 SETIFEMPTY( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib/static )
-SETIFEMPTY( INSTALL_RUNTIME_DESTINATION 3DMetricTools-package )
-SETIFEMPTY( INSTALL_LIBRARY_DESTINATION ${INSTALL_RUNTIME_DESTINATION}/lib )
 SETIFEMPTY( INSTALL_ARCHIVE_DESTINATION 3DMetricTools-static_lib )

-# find the VTK headers
-find_package( VTK REQUIRED )
-if( ${VTK_MAJOR_VERSION} VERSION_LESS 6 )
-  message( FATAL_ERROR "VTK version 6 or higher needed" )
+if( ${EXTENSION_NAME}_BUILD_SLICER_EXTENSION )
+  find_package(Subversion REQUIRED )
+  find_package(Git REQUIRED )
+  find_package(Slicer REQUIRED)
+  include(${Slicer_USE_FILE})
+  set( Use_VTK_Filter ON CACHE BOOL "Use VTK Filter" FORCE )
+  set( Build_3DMeshMetric OFF CACHE BOOL "Qt GUI" FORCE )
+  set( INSTALL_RUNTIME_DESTINATION ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION} )
+  set( INSTALL_LIBRARY_DESTINATION ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_LIBRARY_DESTINATION} )
+else()
+  # find the VTK headers
+  find_package( VTK REQUIRED )
+  if( ${VTK_MAJOR_VERSION} VERSION_LESS 6 )
+    message( FATAL_ERROR "VTK version 6 or higher needed" )
+  endif()
+  include( ${VTK_USE_FILE} )
+  # find the SlicerExecutionModel headers
+  find_package(SlicerExecutionModel REQUIRED GenerateCLP)
+  include( ${SlicerExecutionModel_USE_FILE} )
+  include(${GenerateCLP_USE_FILE})
+  # set RPATH
+  if( UNIX )
+    if(NOT APPLE)
+      SET( CMAKE_INSTALL_RPATH "$ORIGIN/lib" )
+    endif()
+  endif()
+  SETIFEMPTY( INSTALL_RUNTIME_DESTINATION 3DMetricTools-package )
+  SETIFEMPTY( INSTALL_LIBRARY_DESTINATION ${INSTALL_RUNTIME_DESTINATION}/lib )
 endif()
-include( ${VTK_USE_FILE} )

-# find the SlicerExecutionModel headers
-find_package(SlicerExecutionModel REQUIRED GenerateCLP)
-include( ${SlicerExecutionModel_USE_FILE} )
-include(${GenerateCLP_USE_FILE})
-
-# find the QT4 headers
-find_package( Qt4 REQUIRED )
-include( ${QT_USE_FILE} )
-
-# set RPATH
-if( UNIX )
-  if(NOT APPLE)
-      SET( CMAKE_INSTALL_RPATH "$ORIGIN/lib" )
-  endif()
-endif()

 option( Build_Static "Static libraries and executables only" ON )
 if( Build_Static )
@@ -72,17 +85,33 @@
 option( Use_VTK_Filter "Use VTK Filter" OFF )

 # meshvalmet libraries
-set( MeshValmetLib_SOURCE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Libraries )
-add_subdirectory( Libraries )
+if( Build_3DMeshMetric OR NOT Use_VTK_Filter )
+  # find the QT4 headers
+  find_package( Qt4 REQUIRED )
+  include( ${QT_USE_FILE} )
+  set( MeshValmetLib_SOURCE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Libraries )
+  add_subdirectory( Libraries )
+endif()

-option( Build_3DErrorMetric "CLI" ON )
+option( Build_ModelToModelDistance "CLI" ON )
 option( Build_3DMeshMetric "Qt GUI" ON )
 # build errorMetric
-if( Build_3DErrorMetric )
-  add_subdirectory( 3DErrorMetric )
+if( Build_ModelToModelDistance )
+  add_subdirectory( ModelToModelDistance )
 endif()

 # build meshMetric
 if( Build_3DMeshMetric )
   add_subdirectory( 3DMeshMetric )
 endif()
+
+option( BUILD_TESTING "Build Testing" ON )
+IF(BUILD_TESTING)
+  include(CTest)
+  ADD_SUBDIRECTORY(Testing)
+ENDIF(BUILD_TESTING)
+
+if( ${EXTENSION_NAME}_BUILD_SLICER_EXTENSION )
+  set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR};${EXTENSION_NAME};ALL;/")
+  include(${Slicer_EXTENSION_CPACK})
+endif()


Fix gmock failure Pin to googletest 1.8.1

--- cmake/Templates/GoogleTest.CMakeLists.txt.cmake
+++ cmake/Templates/GoogleTest.CMakeLists.txt.cmake
@@ -24,7 +24,7 @@

 ExternalProject_Add(googletest
     GIT_REPOSITORY    https://github.com/google/googletest.git
-    GIT_TAG           master
+    GIT_TAG           release-1.8.1
     SOURCE_DIR        "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/thirdparty/googletest-src"
     BINARY_DIR        "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/thirdparty/googletest-build"
     INSTALL_DIR       "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/thirdparty/googletest-install"


boost_thread: depends on date_time

boost_thread: depends on date_time

--- cmake/qibuild/modules/boost_thread-config.cmake
+++ cmake/qibuild/modules/boost_thread-config.cmake
@@ -10,4 +10,5 @@
 clean(BOOST_${_suffix})
 fpath(BOOST_${_suffix} boost/config.hpp)
 boost_flib(${_suffix} ${_libname})
+boost_flib(${_suffix} "date_time")
 export_lib(BOOST_${_suffix})


adding /Qinline-max-size- to windows icc flags

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -40,8 +40,8 @@
 ENDIF()

 SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
-SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 ")
-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 ")
+SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 /Qinline-max-size-")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 /Qinline-max-size-")

 SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG")


COMP: link error with Boost on Windows

COMP: link error with Boost on Windows

--- Modules/ThirdParty/Boost/otb-module-init.cmake
+++ Modules/ThirdParty/Boost/otb-module-init.cmake
@@ -31,3 +31,8 @@
     message(STATUS "Found Boost components: unit_test_framework")
   endif()
 endif() #BUILD_TESTING
+
+if(WIN32)
+  # disable autolinking in boost
+	add_definitions( -DBOOST_ALL_NO_LIB )
+endif()


fixed search for arduino path

fixed search for arduino path

--- scripts/Arduino.cmake
+++ scripts/Arduino.cmake
@@ -35,9 +35,11 @@
     /Applications/Arduino.app/Contents/Java
     /Applications/Arduino.app/Contents/Resources/Java
 )
+list(APPEND ARDUINO_ROOT_SEARCH_PATHS ${ARDUINO_ROOT} ${ARDUINO_SDK_PATH})
+unset(ARDUINO_ROOT)
 find_path(ARDUINO_ROOT
     NAMES lib/version.txt
-    PATHS ${ARDUINO_ROOT} ${ARDUINO_SDK_PATH} ${ARDUINO_ROOT_SEARCH_PATHS})
+    PATHS ${ARDUINO_ROOT_SEARCH_PATHS})
 if(NOT ARDUINO_ROOT)
     message(FATAL_ERROR "Could not find Arduino SDK root folder. Set the variable ARDUINO_ROOT in your CMakeList.txt file before including Arduino.cmake")
 endif()


Ensure the web app gets bundled for tests in fresh checkouts.

--- build/cmake/core-web-app.cmake
+++ build/cmake/core-web-app.cmake
@@ -1,5 +1,5 @@
 add_custom_command(
-  OUTPUT ${WORK_DIR}/vendor/bundle
+  OUTPUT ${WORK_DIR}/vendor/bundle ${CMAKE_SOURCE_DIR}/src/api-umbrella/web-app/.bundle/config
   DEPENDS bundler ${CMAKE_SOURCE_DIR}/src/api-umbrella/web-app/Gemfile ${CMAKE_SOURCE_DIR}/src/api-umbrella/web-app/Gemfile.lock
   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/api-umbrella/web-app
   COMMAND env PATH=${STAGE_EMBEDDED_DIR}/bin:$ENV{PATH} bundle install --clean --path=${WORK_DIR}/vendor/bundle


Tell cmake to use gnu tar on solaris

Tell cmake to use gnu tar on solaris

--- build/cmake/macros/TarGz.cmake
+++ build/cmake/macros/TarGz.cmake
@@ -1,8 +1,9 @@
 if (NOT WINDOWS)
-    # BSD has both BSD tar, named "tar", and GNU tar, named "gtar" in ports...
-    if (NOT BSD_UNIX)
+    if (LINUX)
 		set( TAR_COMMAND tar)
     else()
+    	# BSD and Solaris have both BSD tar, named "tar", and GNU tar, named "gtar" in ports...
+
 		# Macos is _like_ bsd, but calls it "gnutuar"
 		FIND_PROGRAM(TAR_COMMAND NAMES "gtar" "gnutar")


Linking with debug or optimized bullet libs

--- build/modules/FindBullet.cmake
+++ build/modules/FindBullet.cmake
@@ -24,8 +24,16 @@
   IF(bullet_ROOT AND EXISTS "${bullet_ROOT}")
     SET(bullet_LIBRARY_DIRS ${bullet_ROOT}/lib)
     SET(bullet_LIBRARIES
-        debug BulletCollision_d.lib BulletDynamics_d.lib BulletMultiThreaded_d.lib BulletSoftBody_d.lib LinearMath_d.lib
-        optimized BulletCollision.lib BulletDynamics.lib BulletMultiThreaded.lib BulletSoftBody.lib LinearMath.lib)
+        debug BulletCollision_d.lib
+        debug BulletDynamics_d.lib
+        debug BulletMultiThreaded_d.lib
+        debug BulletSoftBody_d.lib
+        debug LinearMath_d.lib
+        optimized BulletCollision.lib
+        optimized BulletDynamics.lib
+        optimized BulletMultiThreaded.lib
+        optimized BulletSoftBody.lib
+        optimized LinearMath.lib)
     SET(bullet_LDFLAGS)
     IF(EXISTS ${bullet_ROOT}/include/bullet)
       SET(bullet_INCLUDE_DIRS ${bullet_ROOT}/include/bullet)
@@ -106,4 +114,4 @@
     MESSAGE(FATAL_ERROR "bullet not found")
   ENDIF(bullet_FIND_REQUIRED)
 ENDIF(bullet_FOUND)
-#${TOP_LEVEL}/dependencies/bullet-2.74/src/.libs/libbulletcollision.so ${TOP_LEVEL}/dependencies/bullet-2.74/src/.libs/libbulletdynamics.so ${TOP_LEVEL}/dependencies/bullet-2.74/src/.libs/libbulletmath.so+#${TOP_LEVEL}/dependencies/bullet-2.74/src/.libs/libbulletcollision.so ${TOP_LEVEL}/dependencies/bullet-2.74/src/.libs/libbulletdynamics.so ${TOP_LEVEL}/dependencies/bullet-2.74/src/.libs/libbulletmath.so


Use message from FindBoost.cmake

Use message from FindBoost.cmake

--- modules/boost/boost.cmake
+++ modules/boost/boost.cmake
@@ -82,7 +82,7 @@
     set(BOOST_INCLUDEDIR "")
     set(BOOST_LIBRARYDIR "")
 else(FORCE_CUSTOM_BOOST)
-    find_package(Boost QUIET ${BOOST_MINIMUM_REQUIRED} COMPONENTS "${BOOST_COMPONENTS_REQUIRED}")
+    find_package(Boost ${BOOST_MINIMUM_REQUIRED} COMPONENTS "${BOOST_COMPONENTS_REQUIRED}")
     if(NOT Boost_FOUND)
         set(BUILD_CUSTOM_BOOST TRUE)
     endif(NOT Boost_FOUND)
@@ -119,7 +119,6 @@
         string(REPLACE "unit_test_framework" "test" b2_needed_components "${b2_needed_components}")
         set(select_libraries "--with-libraries=${b2_needed_components}")
         string(REPLACE ";" ", " printout "${BOOST_COMPONENTS_REQUIRED}")
-        message(STATUS "Could NOT find Boost ${BOOST_MINIMUM_REQUIRED}")
         message(STATUS "  Libraries to be built: ${printout}")
         message(STATUS "  Toolset to be used: ${toolset}")
         include(${CMAKE_CURRENT_LIST_DIR}/boost_configure.cmake)
@@ -128,7 +127,6 @@
     else(BOOST_COMPONENTS_REQUIRED)
         # Empty list. Header-only libraries needed
         # Just unpack to known location
-        message(STATUS "Could NOT find Boost ${BOOST_MINIMUM_REQUIRED}")
         message(STATUS "  No libraries required, installing headers")
         include(${CMAKE_CURRENT_LIST_DIR}/boost_headers.cmake)
     endif(BOOST_COMPONENTS_REQUIRED)


update

update

--- modules/flatbuffers.cmake
+++ modules/flatbuffers.cmake
@@ -1,4 +1,8 @@
 if(NOT TARGET flatbuffers)
+
+  # Restore origin compile flags
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_ORIGIN}")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_ORIGIN}")

   # Set options
   SET(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "Enable the build of tests and samples." FORCE)
@@ -12,4 +16,8 @@
   set_target_properties(flatc PROPERTIES FOLDER modules/flatbuffers/flatc)
   set_target_properties(flathash PROPERTIES FOLDER modules/flatbuffers/flathash)

+  # Restore custom compile flags
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_CUSTOM}")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_CUSTOM}")
+
 endif()


Allow use of all LAPACK and BLAS vendors

--- lib/smurff-cpp/cmake/scripts/DependenciesConfig.cmake
+++ lib/smurff-cpp/cmake/scripts/DependenciesConfig.cmake
@@ -47,7 +47,6 @@

 macro(configure_blas)
   message ("Dependency check for blas...")
-  set(BLA_VENDOR "Generic")
   find_package( BLAS REQUIRED )
   message(STATUS BLAS: ${BLAS_LIBRARIES} )

@@ -61,7 +60,6 @@

 macro(configure_lapack)
   message ("Dependency check for lapack...")
-  set(BLA_VENDOR "Generic")
   find_package(LAPACK REQUIRED)
   message(STATUS LAPACK: ${LAPACK_LIBRARIES})


Add Stitching MiniApp to installer

Add Stitching MiniApp to installer

Summary: By turning on BUILD_MatchPointCmdApps in the WorkbenchRelease config, the Stitching MiniApp is added to built installers

Test Plan: Build an installer, see if MitkStitchImagesMiniApp.bat now exists next to the usual executables

Reviewers: O1 MITK Reviewer Group I, floca

Reviewed By: O1 MITK Reviewer Group I, floca

Maniphest Tasks: T28297

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

--- CMake/BuildConfigurations/WorkbenchRelease.cmake
+++ CMake/BuildConfigurations/WorkbenchRelease.cmake
@@ -18,6 +18,7 @@

 if(NOT MITK_USE_SUPERBUILD)
   set(BUILD_CoreCmdApps ON CACHE BOOL "" FORCE)
+  set(BUILD_MatchPointCmdApps ON CACHE BOOL "" FORCE)
 endif()

 set(MITK_VTK_DEBUG_LEAKS OFF CACHE BOOL "Enable VTK Debug Leaks" FORCE)


lowercase for PKG-config files

lowercase for PKG-config files

--- cmake/install_cmake_infrastructure.cmake
+++ cmake/install_cmake_infrastructure.cmake
@@ -3,6 +3,8 @@
     "VERSION;INCLUDE_DIRS;LIBRARIES;CFG_EXTRAS;MSG_DIRS;PYTHONPATH"
     ""
     ${ARGN})
+
+  string(TOLOWER ${PACKAGE_NAME} PACKAGE_NAME_LOWER)

   log(2 "install_cmake_infrastructure ${PACKAGE_NAME} at version ${PACKAGE_VERSION} in @CMAKE_INSTALL_PREFIX@")
   set(pfx ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY})
@@ -37,11 +39,11 @@
   # Versions find_packageable from the buildspace
   #
   configure_file(${catkin_EXTRAS_DIR}/pkg-config.cmake.in
-    ${CMAKE_BINARY_DIR}/cmake/${PACKAGE_NAME}-config.cmake
+    ${CMAKE_BINARY_DIR}/cmake/${PACKAGE_NAME_LOWER}-config.cmake
     @ONLY
     )
   configure_file(${catkin_EXTRAS_DIR}/pkg-config-version.cmake.in
-    ${CMAKE_BINARY_DIR}/cmake/${PACKAGE_NAME}-config-version.cmake
+    ${CMAKE_BINARY_DIR}/cmake/${PACKAGE_NAME_LOWER}-config-version.cmake
     @ONLY
     )


TranslateDesktop: Use -a switch in grep commands

As of grep v2.23 some translation files are considered as binary (maybe because of some locale settings)
and then the created .desktop file is malformed. So we force the grep to handle all provided input
files as text.

closes lxde/lxqt#957

--- cmake/modules/LXQtTranslateDesktop.cmake
+++ cmake/modules/LXQtTranslateDesktop.cmake
@@ -71,13 +71,13 @@
         if (_translations)
             list(SORT _translations)
             add_custom_command(OUTPUT ${_outFile}
-                COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
-                COMMAND grep -h ${_pattern} ${_translations} >> ${_outFile}
+                COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
+                COMMAND grep -h -a ${_pattern} ${_translations} >> ${_outFile}
                 COMMENT "Generating ${_fileName}${_fileExt}"
             )
         else()
             add_custom_command(OUTPUT ${_outFile}
-                COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
+                COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
                 COMMENT "Generating ${_fileName}${_fileExt}"
             )
         endif()


ios: Remove 32-bit architectures from 11.x+ targets

--- platforms/ios-clang/ios.cmake
+++ platforms/ios-clang/ios.cmake
@@ -263,6 +263,21 @@
 set (CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
 set (CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")

+if (NOT IOS_DEPLOYMENT_TARGET VERSION_LESS 11.0)
+    # iOS 11 does not support 32-bit (armv7*).
+    foreach (ARCH ${IOS_ARCH})
+        if (ARCH MATCHES "armv7*")
+            message (STATUS "iOS architecture removed from build: ${ARCH} is not supported by "
+                            "the minimum deployment iOS version ${IOS_DEPLOYMENT_TARGET}."
+            )
+        else()
+            list (APPEND VALID_IOS_ARCH ${ARCH})
+        endif()
+    endforeach()
+
+    set (IOS_ARCH ${VALID_IOS_ARCH})
+endif()
+
 message (STATUS "Building for minimum iOS version: ${IOS_DEPLOYMENT_TARGET} (SDK version: ${IOS_SDK_VERSION})")

 # Note that only Xcode 7+ supports the newer more specific:


cmake: pyside2 config fix

cmake: pyside2 config fix

--- cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake
+++ cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake
@@ -43,11 +43,17 @@
             endif()
         endif()

-        if(NOT SHIBOKEN_INCLUDE_DIR)
+        # pyside2 changed it's cmake files, this is the dance we have
+        # to dance to be compatible with the old (<5.12) and the new versions (>=5.12)
+        if(NOT SHIBOKEN_LIBRARY AND TARGET Shiboken2::libshiboken)
+                get_property(SHIBOKEN_LIBRARY TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION_RELEASE)
+        endif(NOT SHIBOKEN_LIBRARY AND TARGET Shiboken2::libshiboken)
+
+        if(NOT SHIBOKEN_LIBRARY)
             message("====================\n"
                     "shiboken2 not found.\n"
                     "====================\n")
-        endif(NOT SHIBOKEN_INCLUDE_DIR)
+        endif(NOT SHIBOKEN_LIBRARY)

         find_package(PySide2 QUIET)# REQUIRED
         if(NOT PYSIDE_INCLUDE_DIR)


TST: Register S1TilingSupportApplications tests

--- CI/configure_options.cmake
+++ CI/configure_options.cmake
@@ -70,7 +70,7 @@
 set(cmake_configure_option
 "${cmake_configure_option}
 CMAKE_PREFIX_PATH=${XDK_PATH}")
-foreach(remote_module OTBTemporalGapFilling SertitObject otbGRM DiapOTBModule)
+foreach(remote_module OTBTemporalGapFilling SertitObject otbGRM DiapOTBModule S1TilingSupportApplications)
   set(cmake_configure_option
 "${cmake_configure_option}
 Module_${remote_module}:BOOL=ON")


Pass definition as CXX_FLAGS for GTest ExternalProject

This addresses the following CMake warning.
CMake Warning at C:/Program Files
(x86)/CMake/share/cmake-3.6/Modules/ExternalProject.cmake:1131
(message):
  Line 'CMAKE_CXX_FLAGS=-DGTEST_HAS_TR1_TUPLE=0' does not match regex.
  Ignoring.

--- CMake/External_GTest.cmake
+++ CMake/External_GTest.cmake
@@ -42,6 +42,16 @@
   endforeach()
   set( ${args} "${_args}" PARENT_SCOPE)
 endfunction( )
+
+
+if(MSVC_VERSION EQUAL 1700)
+  # Tuples are limited by _VARIADIC_MAX in VS11. The variadic
+  # templates are not deep enough by default. We are not currently
+  # using the GTest features which require tuple, so just disable them
+  # and hope that upstream premanetly addresses the problem, with out
+  # required more CMake core for compiler issues.
+  set(CMAKE_CXX_FLAGS "-DGTEST_HAS_TR1_TUPLE=0 ${CMAKE_CXX_FLAGS}")
+endif()

 list( APPEND ep_common_list
   CMAKE_BUILD_TYPE
@@ -106,14 +116,6 @@
 VariableListToArgs( ep_common_list ep_common_args )

 set(ep_extra_args)
-if(MSVC_VERSION EQUAL 1700)
-  # Tuples are limited by _VARIADIC_MAX in VS11. The variadic
-  # templates are not deep enough by default. We are not currently
-  # using the GTest features which require tuple, so just disable them
-  # and hope that upstream premanetly addresses the problem, with out
-  # required more CMake core for compiler issues.
-  set(ep_extra_args ${ep_extra_args} -DCMAKE_CXX_FLAGS=-DGTEST_HAS_TR1_TUPLE=0 ${CMAKE_CXX_FLAGS})
-endif()

 if(MSVC)
   set(ep_extra_args ${ep_extra_args} -Dgtest_force_shared_crt:BOOL=ON)


Issue #43: Fix typo and comment.

Issue #43: Fix typo and comment.

--- CMake/mpIncludeBoost.cmake
+++ CMake/mpIncludeBoost.cmake
@@ -20,12 +20,13 @@
   #       so Boost is probably found by CMake's own FindBoost.cmake.
   #       which is an example of the 'module' mode.
   set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib)
+  set(BOOST_LIBRARYDIR ${BOOST_ROOT}/lib)
   set(Boost_LIBRARY_DIR_DEBUG ${BOOST_ROOT}/lib)
   set(Boost_LIBRARY_DIR_RELEASE ${BOOST_ROOT}/lib)
   set(BOOST_INCLUDEDIR ${BOOST_ROOT}/include)
   #set(Boost_DEBUG ON)
-  set(Boost_NO_SYSTEM_PATHS ON)  # Notice: How we can turn off System Paths
-  set(Boost_NO_BOOST_CMAKE ON)   # Notice: We can CMake not to assume this is the CMake-ified version of the boost project.
+  set(Boost_NO_SYSTEM_PATHS ON)  # Notice: This enables us to turn off System Paths
+  set(Boost_NO_BOOST_CMAKE ON)   # Notice: We can tell CMake not to assume this is the CMake-ified version of the boost project.
   if(BUILD_SHARED_LIBS)
     set(Boost_USE_STATIC_LIBS OFF)
     set(Boost_USE_STATIC_RUNTIME OFF)


Rework CMake NF_DIRECTORY_EXISTS_NOT_EMPTY

- Going throuhg the directory to find if it's not empty takes a lot of time because it sweeps all files, so simplifying this now to speed up local builds.
***NO_CI***

Signed-off-by: José Simões <1616ff7a83d123f98f8f38fa2524eab406644781@eclo.solutions>

--- CMake/Modules/NF_Utils.cmake
+++ CMake/Modules/NF_Utils.cmake
@@ -3,21 +3,13 @@
 # See LICENSE file in the project root for full license information.
 #

-# check if a diretory exists and is not empty
+# check if a directory exists
+# going throuhg the directory to find if it's not empty takes a lot of time because it sweeps all files
+# simplifying this now to speed up local builds
 macro(NF_DIRECTORY_EXISTS_NOT_EMPTY path pathExists)

     if(EXISTS "${path}")
-
-        file(GLOB RESULT LIST_DIRECTORIES false "${path}")
-        list(LENGTH RESULT RES_LEN)
-        if(RES_LEN EQUAL 0)
-            # DIR is empty
-            set(${pathExists} OFF)
-        else()
-            # DIR exists and it's NOT empty
-            set(${pathExists} ON)
-        endif()
-
+        set(${pathExists} ON)
     else()
         set(${pathExists} OFF)
     endif()


Fixed some file extensions in documentation

Change-Id: I5cf196c7364eb1b88b730ddafca1680178c3160f

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -360,11 +360,11 @@
 #   (output directory), NO_VALID will suppress the -B argument (baseline for
 #   normal image comparisons (NO_RT)) and the -V and -A arguments (for RT-based
 #   image comparisons). Test-specific arguments may be set to _${name}_ARGS. By
-#   default, the test name will be the part of the source file before the '.cxx'.
+#   default, the test name will be the part of the source file before the '.py'.
 #   A custom test name can be specified by giving a name followed by a comma
 #   before the test file name, .e.g.,
 #
-#   CustomTestName,TestSource.cxx
+#   CustomTestName,TestSource.py
 #
 #   The 'vtk_test_prefix' variable may be set to create separate tests from a
 #   single test name (e.g., running with different arguments), but should be
@@ -472,10 +472,10 @@
 #   suppress -T, and NO_RT will suppress the -V and -T arguments
 #   unconditionally and pass -D to the empty string. Test-specific arguments may
 #   be set to _${name}_ARGS. By default, the test name will be the part of the
-#   source file before the '.cxx'. A custom test name can be specified by giving
+#   source file before the '.tcl'. A custom test name can be specified by giving
 #   a name followed by a comma before the test file name, .e.g.,
 #
-#   CustomTestName,TestSource.cxx
+#   CustomTestName,TestSource.tcl
 #
 #   The 'vtk_test_prefix' variable may be set to create separate tests from a
 #   single test name (e.g., running with different arguments), but should be


changed a comment

changed a comment

--- cmake_modules/ZorbaGenerateStoreSpecificExes.cmake
+++ cmake_modules/ZorbaGenerateStoreSpecificExes.cmake
@@ -16,23 +16,20 @@
 # compiled and linked for each registered store). This macro iterates through the CMake variable
 # ZORBA_STORE_NAMES and creates one executable for each store name.
 # Per convention, the source file that contains the main function of the executable must be located in
-# the directory where this macro is executabed and must the following name: 'EXE_NAME.cpp.in'.
-# To enable store dependent code in the source file, the macro sets the cmake variable ZORBA_STORE_NAME.
-# This variable can be used in the source file by adding the replacement @ZORBA_STORE_NAME@. Logically,
-# all other available cmake variables can be used from this source file because the cmake command
-# CONFIGURE_FILE is used to generate the store specific sources.
-# The resulting libraries are named by the following convention: Executables that are linked agains a store lib
-# other than simplestore contain the suffix '_${ZORBA_STORE_NAME}'.
-# If the cmake variable ZORBA_BUILD_STATIC_LIBRARY is set to "ON", the macro produces static libraries and add
-# the additional suffix '_static' to them.
+# the directory where this macro is executabed and must the following name: '${EXE_NAME}.cpp'.
+# If the cmake variable ZORBA_BUILD_STATIC_LIBRARY is set to "ON", the macro produces additinally a
+# static executable.
+#
+# The resulting executable has the name ${EXE_NAME}_${ZORBA_STORE_NAME} or
+# ${EXE_NAME}_${ZORBA_STORE_NAME}_static if the store name is not equal "simplestore". Otherwise,
+# the name is ${EXE_NAME} or ${EXE_NAME}_static.
 #
 # Synatx:
 #
 #   ZORBA_GENERATE_STORE_SPECIFIC_EXES(EXE_NAME DEPEND_SRCS DEPEND_LIBS NEW_NAME)
 #
 #     EXE_NAME - the name of the executable. Per convention, the file that contains the main function
-#                and the CMake replacement @ZORBA_STORE_NAME@ must have the name EXE_NAME.cpp.in and
-#                must be located in the directory where the invocation of this function is located.
+#                and must be located in the directory where the invocation of this function is located.
 #     DEPEND_SRCS - additional source files which will be compiled and linked to the created libraries
 #     DEPEND_LIBS - libraries (exception zorba-store libs) to which the created libraries depend on
 #     NEW_NAME - If this variable is not equal "", the executables will be renamed to NEW_NAME


Add CMake option to build w/o Metal on MacOS

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -217,6 +217,9 @@
 endif()

 # Metal
+if (USE_METAL AND HALLEY_NO_METAL)
+	set(USE_METAL 0)
+endif ()
 if (USE_METAL)
 	add_definitions(-DWITH_METAL)
 endif()


Remove some warnings when compiling as emscripten.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -19,7 +19,9 @@
 	set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
 	set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
 else()
-	set(EXTRA_LIBS pthread)
+	if (NOT EMSCRIPTEN)
+		set(EXTRA_LIBS pthread)
+	endif()
 	set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")

 	if (HALLEY_ENABLE_STATIC_STDLIB)
@@ -164,6 +166,10 @@
 		add_precompiled_header(${name} prec.h FORCEINCLUDE SOURCE_CXX prec.cpp)
 		add_definitions(-D_WIN32_WINNT=0x0600)
 	endif()
+
+	if (EMSCRIPTEN)
+		set_target_properties(${name} PROPERTIES SUFFIX ".bc")
+	endif()
 endfunction(halleyProject)

 function(halleyProjectCodegen name sources headers genDefinitions targetDir)


Remove unused macros.

Remove unused macros.

--- cmake/LibFindMacros.cmake
+++ cmake/LibFindMacros.cmake
@@ -1,111 +0,0 @@
-# Version 1.0 (2013-04-12)
-# Public Domain, originally written by Lasse Kärkkäinen <tronic@zi.fi>
-# Published at http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries
-
-# If you improve the script, please modify the forementioned wiki page because
-# I no longer maintain my scripts (hosted as static files at zi.fi). Feel free
-# to remove this entire header if you use real version control instead.
-
-# Changelog:
-# 2013-04-12  Added version number (1.0) and this header, no other changes
-# 2009-10-08  Originally published
-
-
-# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments
-# used for the current package. For this to work, the first parameter must be the
-# prefix of the current package, then the prefix of the new package etc, which are
-# passed to find_package.
-macro (libfind_package PREFIX)
-  set (LIBFIND_PACKAGE_ARGS ${ARGN})
-  if (${PREFIX}_FIND_QUIETLY)
-    set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET)
-  endif (${PREFIX}_FIND_QUIETLY)
-  if (${PREFIX}_FIND_REQUIRED)
-    set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED)
-  endif (${PREFIX}_FIND_REQUIRED)
-  find_package(${LIBFIND_PACKAGE_ARGS})
-endmacro (libfind_package)
-
-# CMake developers made the UsePkgConfig system deprecated in the same release (2.6)
-# where they added pkg_check_modules. Consequently I need to support both in my scripts
-# to avoid those deprecated warnings. Here's a helper that does just that.
-# Works identically to pkg_check_modules, except that no checks are needed prior to use.
-macro (libfind_pkg_check_modules PREFIX PKGNAME)
-  if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
-    include(UsePkgConfig)
-    pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS)
-  else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
-    find_package(PkgConfig)
-    if (PKG_CONFIG_FOUND)
-      pkg_check_modules(${PREFIX} ${PKGNAME})
-    endif (PKG_CONFIG_FOUND)
-  endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
-endmacro (libfind_pkg_check_modules)
-
-# Do the final processing once the paths have been detected.
-# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain
-# all the variables, each of which contain one include directory.
-# Ditto for ${PREFIX}_PROCESS_LIBS and library files.
-# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES.
-# Also handles errors in case library detection was required, etc.
-macro (libfind_process PREFIX)
-  # Skip processing if already processed during this run
-  if (NOT ${PREFIX}_FOUND)
-    # Start with the assumption that the library was found
-    set (${PREFIX}_FOUND TRUE)
-
-    # Process all includes and set _FOUND to false if any are missing
-    foreach (i ${${PREFIX}_PROCESS_INCLUDES})
-      if (${i})
-        set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}})
-        mark_as_advanced(${i})
-      else (${i})
-        set (${PREFIX}_FOUND FALSE)
-      endif (${i})
-    endforeach (i)
-
-    # Process all libraries and set _FOUND to false if any are missing
-    foreach (i ${${PREFIX}_PROCESS_LIBS})
-      if (${i})
-        set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}})
-        mark_as_advanced(${i})
-      else (${i})
-        set (${PREFIX}_FOUND FALSE)
-      endif (${i})
-    endforeach (i)
-
-    # Print message and/or exit on fatal error
-    if (${PREFIX}_FOUND)
-      if (NOT ${PREFIX}_FIND_QUIETLY)
-        message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}")
-      endif (NOT ${PREFIX}_FIND_QUIETLY)
-    else (${PREFIX}_FOUND)
-      if (${PREFIX}_FIND_REQUIRED)
-        foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS})
-          message("${i}=${${i}}")
-        endforeach (i)
-        message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.")
-      endif (${PREFIX}_FIND_REQUIRED)
-    endif (${PREFIX}_FOUND)
-  endif (NOT ${PREFIX}_FOUND)
-endmacro (libfind_process)
-
-macro(libfind_library PREFIX basename)
-  set(TMP "")
-  if(MSVC80)
-    set(TMP -vc80)
-  endif(MSVC80)
-  if(MSVC90)
-    set(TMP -vc90)
-  endif(MSVC90)
-  set(${PREFIX}_LIBNAMES ${basename}${TMP})
-  if(${ARGC} GREATER 2)
-    set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2})
-    string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES})
-    set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP})
-  endif(${ARGC} GREATER 2)
-  find_library(${PREFIX}_LIBRARY
-    NAMES ${${PREFIX}_LIBNAMES}
-    PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS}
-  )
-endmacro(libfind_library)


Fix bug that prevented XCode to switch between Release and Debug build type.

--- cmake/PlatformMacOS.cmake
+++ cmake/PlatformMacOS.cmake
@@ -19,8 +19,11 @@
     # type (cf. http://www.cmake.org/pipermail/cmake/2006-December/012288.html)
     # Therefore, we re-define the CMAKE_CONFIGURATION_TYPES here according to the value
     # in CMAKE_BUILD_TYPES.
-    set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
-    message(STATUS ">> Re-defining variable CMAKE_CONFIGURATION_TYPES := ${CMAKE_CONFIGURATION_TYPES}")
+    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+	set(CMAKE_CONFIGURATION_TYPES "Release;Debug")
+    else ()
+        set(CMAKE_CONFIGURATION_TYPES "Debug;Release")
+    endif ()

 endif()


cmake: Fixed so that only includes in targets source-dir are scanned during static analysis (cppcheck). Fixes #3.

--- cmake/code-analysis.cmake
+++ cmake/code-analysis.cmake
@@ -64,7 +64,9 @@
     )

     # -- CLEANUP INCLUDES
-    # Prepend -I (cppcheck include-command)
+    # Remove any includes not in source dir (to avoid irrelevant noise)
+    list(FILTER TARGET_INCLUDES INCLUDE REGEX "${TARGET_SOURCE_DIR}.*")
+    # Prepend -I (cppcheck include-command) to all but first (added in argument below)
     string(REPLACE ";" ";-I" TARGET_INCLUDES "${TARGET_INCLUDES}")
     # Add trailing '/' to all generator expression in case evaluated to empty (eg. '-I/' instead of '-I', since the latter will fail in cppcheck)
     string(REPLACE ":>;" ":>/;" TARGET_INCLUDES "${TARGET_INCLUDES}")


Updated FindOpenCL for Intel Linux OpenCL paths

--- cmake/Modules/FindOpenCL.cmake
+++ cmake/Modules/FindOpenCL.cmake
@@ -34,6 +34,7 @@
 set(OPENCL_PATHS
   /usr/local/cuda
   /opt/cuda
+  /opt/intel/opencl
   /usr
   /usr/local
 )
@@ -52,7 +53,7 @@
 find_library(OPENCL_LIBRARIES
   NAMES OpenCL
   HINTS ${OPENCL_HINTS}
-  PATH_SUFFIXES lib lib64 lib/x86_64 lib/x64 lib/x86 lib/Win32 OpenCL/common/lib/x64
+  PATH_SUFFIXES lib lib64 lib/x86_64 lib/x86_64/sdk lib/x64 lib/x86 lib/Win32 OpenCL/common/lib/x64
   PATHS ${OPENCL_PATHS}
   DOC "OpenCL library"
 )


Update TBB to version 2020.1

Update TBB to version 2020.1

--- cmake/Modules/FindTBB_EP.cmake
+++ cmake/Modules/FindTBB_EP.cmake
@@ -39,7 +39,11 @@
 # will find it. This is a macro so the variables are set in the parent scope.
 #
 macro(build_tbb_ep)
-  set(TBB_SRC_DIR "${TILEDB_EP_BASE}/src/ep_tbb")
+  if (WIN32)
+    set(TBB_SRC_DIR "${TILEDB_EP_BASE}/src/ep_tbb/tbb")
+  else()
+    set(TBB_SRC_DIR "${TILEDB_EP_BASE}/src/ep_tbb")
+  endif()
   set(TBB_BUILD_DIR "${TILEDB_EP_BASE}/src/ep_tbb-build")
   set(TBB_BUILD_PREFIX "")
   set(TBB_BUILD_CMAKE "${TBB_SRC_DIR}/cmake/TBBBuild.cmake")
@@ -228,8 +232,8 @@
       # On Windows we download pre-built binaries.
       ExternalProject_Add(ep_tbb
         PREFIX "externals"
-        URL "https://github.com/01org/tbb/releases/download/2018_U3/tbb2018_20180312oss_win.zip"
-        URL_HASH SHA1=7f0b4b227679637f7a4065b0377d55d12fac983b
+        URL "https://github.com/intel/tbb/releases/download/v2020.1/tbb-2020.1-win.zip"
+        URL_HASH SHA1=fdcdba2026f4c11f1cb3cbc36ff45d828219e580
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""
         UPDATE_COMMAND ""
@@ -243,8 +247,8 @@
     else()
       ExternalProject_Add(ep_tbb
         PREFIX "externals"
-        URL "https://github.com/01org/tbb/archive/2018_U3.zip"
-        URL_HASH SHA1=c17ae26f2be1dd7ca9586f795d07a226ceca2dc2
+        URL "https://github.com/intel/tbb/archive/v2020.1.tar.gz"
+        URL_HASH SHA1=493a1faf80a7ab320448eec0fbfaedf40e9574ee
         CONFIGURE_COMMAND ""
         BUILD_COMMAND ""
         UPDATE_COMMAND ""


added Maksim's fix as well; they both handle correctly more cases than each of them individually

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -75,10 +75,10 @@

     if(NOT ANDROID AND NOT IOS)
       ocv_check_environment_variables(${library_env} ${include_dir_env})
-      if(${library})
+      if(${library_env})
           set(PYTHON_LIBRARY "${${library_env}}")
       endif()
-      if(${include_dir})
+      if(${include_dir_env})
           set(PYTHON_INCLUDE_DIR "${${include_dir_env}}")
       endif()


[CMake] Disable individual modules setting for now

The idea here was to pass a set of options that is relevant for LLDB to all involved projects (LLVM, Clang, Swift). However, it requires a working caches mechanism and so far I struggled to wire this up in build-script.
Most of the other settings are fine when applied locally to LLDB, but modules should not be force enabled here individually.

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -9,7 +9,7 @@
   repl_swift
 )

-set(LLVM_ENABLE_MODULES        ON CACHE BOOL "" FORCE)
+#set(LLVM_ENABLE_MODULES        ON CACHE BOOL "" FORCE)
 set(LLVM_EXTERNALIZE_DEBUGINFO OFF CACHE BOOL "" FORCE)
 set(LLVM_TARGETS_TO_BUILD      X86;ARM;AArch64 CACHE STRING "" FORCE)


Forgot to remove a comment

Forgot to remove a comment

--- build/toolchains/iOS.cmake
+++ build/toolchains/iOS.cmake
@@ -58,7 +58,6 @@

 # link and build functions
 function(link_libraries)
-    #target_link_libraries(${EXECUTABLE_NAME} ${CMAKE_SOURCE_DIR}/ios/precompiled/libtess2/libtess2.a)
     target_link_libraries(${EXECUTABLE_NAME} core)
     target_link_libraries(${EXECUTABLE_NAME} ${ZLIB_LIBRARIES})


r9218/sofa : fix EXTERNAL_HAVE_GLEW flag in SofaOpenglVisual.cmake

Former-commit-id: d44141daa85ea1b7b08b35d3050e1070795ae95f

--- modules/sofa/component/SofaOpenglVisual.cmake
+++ modules/sofa/component/SofaOpenglVisual.cmake
@@ -36,7 +36,7 @@

     )

-if(SOFA_HAVE_GLEW)
+if(EXTERNAL_HAVE_GLEW)
 	list(APPEND HEADER_FILES "visualmodel/OglAttribute.h")
 	list(APPEND HEADER_FILES "visualmodel/OglAttribute.inl")
 	list(APPEND HEADER_FILES "visualmodel/OglShader.h")


remove unused variable

remove unused variable

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -120,19 +120,14 @@
   # CMAKE_SYSTEM_PROCESSOR is set by the toolchain, so must happen strictly after project()
   if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
     set(standard_BUILD_ARCHITECTURES "aarch64" PARENT_SCOPE)
-    set(standard_BUILD_64 ON PARENT_SCOPE)
   elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm")
     set(standard_BUILD_ARCHITECTURES "arm" PARENT_SCOPE)
-    set(standard_BUILD_64 OFF PARENT_SCOPE)
   elseif(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64;i386")
     set(standard_BUILD_ARCHITECTURES x64 x86 PARENT_SCOPE)
-    set(standard_BUILD_64 ON PARENT_SCOPE)
   elseif(CMAKE_SIZEOF_VOID_P STREQUAL 4)
     set(standard_BUILD_ARCHITECTURES "x86" PARENT_SCOPE)
-    set(standard_BUILD_64 OFF PARENT_SCOPE)
   else()
     set(standard_BUILD_ARCHITECTURES "x64" PARENT_SCOPE)
-    set(standard_BUILD_64 ON PARENT_SCOPE)
   endif()
   message(STATUS "Using architecture: ${standard_BUILD_ARCHITECTURES}")


update install rule for windows symlinks

--- Packaging/install_rule.cmake
+++ Packaging/install_rule.cmake
@@ -35,8 +35,8 @@
       continue()
     elseif("${sfile_ABS_LOWER}" MATCHES "\\.lnk$")
       #we don't install symlink on windows. issue a warning
-      message(WARNING "${sfile_ABS} is a symbolic link and this will be excluded from package")
-      continue()
+      set(install_type "symlink")
+      set(install_dir)
     elseif("${sfile_ABS_LOWER}" MATCHES "(\\.a)$")
       set(install_type FILES)
       set(install_dir lib)
@@ -54,22 +54,28 @@
 	set(install_type)
 	set(install_dir)
 	#message("sfile_ABS=${sfile_ABS}")
+	#this is whole other story
 	detect_using_file_command(${sfile_ABS} install_type install_dir)
       endif(UNIX)
     endif()
-
-    if(NOT install_type OR NOT install_type)
-      message(FATAL_ERROR "install_type OR install_dir is empty\ninstall_type=${install_dir}\ninstall_dir=${install_dir}")
+
+    if(install_type STREQUAL "symlink")
+      #we don't install symlink on windows. issue a warning
+      message(WARNING "${sfile_ABS} is a symbolic link and this will be excluded from package")
       return()
     endif()

-    if ( NOT install_type STREQUAL "symlink")
-       install(${install_type} "${sfile}"
-     	DESTINATION
-     	"${PKG_STAGE_DIR}/${install_dir}"
-     	)
+    if(NOT install_type OR NOT install_type)
+      message(FATAL_ERROR "sfile_ABS=${sfile_ABS}.\ninstall_type=${install_dir}\ninstall_dir=${install_dir}")
+      return()
+    endif()
+
+    install(${install_type} "${sfile}"
+      DESTINATION
+      "${PKG_STAGE_DIR}/${install_dir}"
+      )

-     endif()
+
   endforeach()
 endfunction()


[cmake] fix CXX11 test: on osx CMAKE_CXX_COMPILER_ID is "AppleClang"

--- src/cmake/CXX11.cmake
+++ src/cmake/CXX11.cmake
@@ -1,6 +1,8 @@
 if (NOT CMAKE_CXX_COMPILER_LOADED)
   message(FATAL_ERROR "CheckCXX11Features modules only works if language CXX is enabled")
 endif ()
+
+# note: CMAKE_CXX_COMPILER_ID could be "Clang" or "AppleClang"

 # Determines whether or not the compiler supports C++11
 macro(check_for_cxx11_compiler _VAR)
@@ -8,7 +10,7 @@
   set(${_VAR})
   if((MSVC AND (MSVC_VERSION GREATER 1700)) OR	# MSVC 1800: VS 12
      (CMAKE_COMPILER_IS_GNUCXX AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.6) OR
-     (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.1))
+     (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 3.1))
     set(${_VAR} 1)
     message(STATUS "Checking for C++11 compiler - available")
   else()
@@ -18,7 +20,7 @@

 # Sets the appropriate flag to enable C++11 support
 macro(enable_cxx11)
-  if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
+  if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
     include(CheckCXXCompilerFlag)
     check_cxx_compiler_flag(--std=c++11 SUPPORTS_STD_CXX11)
     check_cxx_compiler_flag(--std=c++0x SUPPORTS_STD_CXX01)


[FIX] Fixing contribs fallback.

[FIX] Fixing contribs fallback.

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

--- util/cmake/SeqAnContribs.cmake
+++ util/cmake/SeqAnContribs.cmake
@@ -69,8 +69,8 @@
 			set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 		endif (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 	endif (NOT DEFINED SEQAN_CONTRIB_BASE)
-    # Try to fall back to x86 on C:\ (MinGW is only available as 32 bit).
-    set (CONTRIB_ARCH "x86")
+    # Try to fall back to x64 on C:\ (MinGW is only available as 32 bit).
+    set (CONTRIB_ARCH "x64")
     if (NOT DEFINED SEQAN_CONTRIB_BASE)
         if (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
             set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")


Warning bug in GCC 4.9

Warning bug in GCC 4.9

--- cmake/AddGnuCompiler.cmake
+++ cmake/AddGnuCompiler.cmake
@@ -30,6 +30,8 @@
 if (NOT CMAKE_CXX_COMPILER_ID MATCHES GNU)
     return()
 endif ()
+
+message(STATUS "${CMAKE_CXX_COMPILER_VERSION}")

 set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++11)

@@ -223,5 +225,11 @@
     )
 endif()

+if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.9)
+    set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}
+        -Wno-missing-field-initializers
+    )
+endif()
+
 string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 string(REPLACE ";" " " CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")


Add debug info to linking

Add debug info to linking

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -167,6 +167,7 @@
         # For debugging with lldb
         $<$<CONFIG:Debug>:
             -g
+            -v
         >

     )


List available test names

List available test names

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -851,6 +851,8 @@
     echo -e "\t\tSet the test targets. Supported targets: $($PHYSISC --list-targets)."
     echo -e "\t-s, --source <source-names>"
     echo -e "\t\tSet the test source files."
+	echo -e "\t--list"
+    echo -e "\t\tList available test source files."
     echo -e "\t--translate"
     echo -e "\t\tTest only translation and its dependent tasks."
     echo -e "\t--compile"
@@ -883,6 +885,30 @@
 	echo -e "\t\tClear output files."
 }

+function get_priority()
+{
+	local test=$1
+	local test_priority=$(grep PRIORITY $test | awk '{print $3}')
+	echo $test_priority
+}
+
+function get_description()
+{
+	local test=$1
+	DESC=$(grep -o '\WTEST: .*$' $test | sed 's/\WTEST: \(.*\)$/\1/')
+	echo $DESC
+}
+
+function list_tests()
+{
+	echo "Available test cases"
+	for t in $1; do
+		local p=$(get_priority $t)
+		echo -e "\t$(basename $t) #$p ($(get_description $t))"
+	done
+}
+
+
 function filter_test_case_by_priority()
 {
 	local priority=$1
@@ -944,7 +970,7 @@

     TESTS=$(get_test_cases)

-    TEMP=$(getopt -o ht:s:m:q --long help,clear,targets:,source:,translate,compile,execute,mpirun,machinefile:,proc-dim:,physis-nlp:,quit,with-valgrind:,priority:,trace,config:,email: -- "$@")
+    TEMP=$(getopt -o ht:s:m:q --long help,clear,targets:,source:,translate,compile,execute,mpirun,machinefile:,proc-dim:,physis-nlp:,quit,with-valgrind:,priority:,trace,config:,email:,list, -- "$@")

     if [ $? != 0 ]; then
 		print_error "Invalid options: $@"
@@ -1024,6 +1050,10 @@
 				clear_output
 				exit 0
 				shift
+				;;
+			--list)
+				list_tests "$TESTS"
+				exit 0
 				;;
 			--)
 				shift


fix download mklml error

fix download mklml error

--- cmake/external/mklml.cmake
+++ cmake/external/mklml.cmake
@@ -54,7 +54,8 @@
     ${EXTERNAL_PROJECT_LOG_ARGS}
     PREFIX                ${MKLML_SOURCE_DIR}
     DOWNLOAD_DIR          ${MKLML_DOWNLOAD_DIR}
-    DOWNLOAD_COMMAND      wget --no-check-certificate -qO- ${MKLML_URL} | tar xz -C ${MKLML_DOWNLOAD_DIR}
+    DOWNLOAD_COMMAND      wget --no-check-certificate ${MKLML_URL} -c -O ${MKLML_VER}.tgz
+                          && tar zxf ${MKLML_DOWNLOAD_DIR}/${MKLML_VER}.tgz
     DOWNLOAD_NO_PROGRESS  1
     UPDATE_COMMAND        ""
     CMAKE_ARGS            -DCMAKE_INSTALL_PREFIX=${MKLML_INSTALL_ROOT}


Try again..

Try again..

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -175,7 +175,6 @@
   ${ARGN}
   )
   GET_TARGET_PROPERTY(target_type ${target} TYPE)
-  GET_TARGET_PROPERTY(target_permissions ${target} PERMISSIONS)
   IF(ARG_RENAME)
     SET(RENAME_PARAM RENAME ${ARG_RENAME}${CMAKE_${target_type}_SUFFIX})
   ELSE()
@@ -183,6 +182,11 @@
   ENDIF()
   IF(NOT ARG_DESTINATION)
     MESSAGE(FATAL_ERROR "Need DESTINATION parameter for INSTALL_DEBUG_TARGET")
+  ENDIF()
+  IF(target_type MATCHES "EXECUTABLE")
+    SET(INSTALL_TYPE TARGETS)
+  ELSE()
+    SET(INSTALL_TYPE FILES)
   ENDIF()
   GET_TARGET_PROPERTY(target_location ${target} LOCATION)
   IF(CMAKE_GENERATOR MATCHES "Makefiles")
@@ -191,10 +195,9 @@
    STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug"  debug_target_location "${target_location}" )
   ENDIF()

-  INSTALL(FILES ${debug_target_location}
+  INSTALL(${INSTALL_TYPE} ${debug_target_location}
     DESTINATION ${ARG_DESTINATION}
     ${RENAME_PARAM}
-    PERMISSIONS ${target_permissions}
     CONFIGURATIONS Release RelWithDebInfo
     OPTIONAL)


Bump version

Bump version

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -20,7 +20,7 @@

 SET(OSPRAY_VERSION_MAJOR 1)
 SET(OSPRAY_VERSION_MINOR 7)
-SET(OSPRAY_VERSION_PATCH 0)
+SET(OSPRAY_VERSION_PATCH 1)
 SET(OSPRAY_SOVERSION 0)
 SET(OSPRAY_VERSION_GITHASH 0)
 SET(OSPRAY_VERSION_NOTE "")


Build gbc without optimization inside Travis

We've been seeing timeouts building gbc on the Travis infrastructure.
Building without optimizations reduces the build time significantly and
shouldn't affect build or test results.

Closes https://github.com/Microsoft/bond/issues/176, "ghc 7.8.4 OS X
Travis CI builds are failing"

Closes https://github.com/Microsoft/bond/pull/195, "Build gbc without
optimization inside Travis"

--- compiler/cabal_build.cmake
+++ compiler/cabal_build.cmake
@@ -42,8 +42,17 @@
     message (FATAL_ERROR)
 endif()

+set (buildGhcOptions "-O2")
+
+if ($ENV{TRAVIS})
+    # We've been seeing timeouts building gbc on the Travis infrastructure.
+    # Building without optimizations reduces the build time significantly
+    # and shouldn't affect build or test results.
+    set (buildGhcOptions "-O0")
+endif()
+
 execute_process (
-    COMMAND ${Haskell_CABAL_EXECUTABLE} build ${target} --with-ghc=${Haskell_GHC_EXECUTABLE} --ghc-option=-O2 --jobs --builddir=${build_dir}
+    COMMAND ${Haskell_CABAL_EXECUTABLE} build ${target} --with-ghc=${Haskell_GHC_EXECUTABLE} --ghc-option=${buildGhcOptions} --jobs --builddir=${build_dir}
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     RESULT_VARIABLE error)


Add shared compile option to propagate to external libraries (#1217)

--- toolchains/iOS.framework.cmake
+++ toolchains/iOS.framework.cmake
@@ -27,8 +27,9 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mios-simulator-version-min=6.0")
     set(ARCH "i386 x86_64")
 else()
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
     set(ARCH "armv7 armv7s arm64")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode")
+    add_compile_options("-fembed-bitcode")
 endif()

 set(FRAMEWORKS CoreGraphics CoreFoundation QuartzCore UIKit OpenGLES Security CFNetwork GLKit)
@@ -92,7 +93,25 @@
 set_xcode_property(${FRAMEWORK_NAME} CODE_SIGN_ENTITLEMENTS "")
 set_xcode_property(${FRAMEWORK_NAME} CODE_SIGNING_ALLOWED "NO")

-set_xcode_property(${FRAMEWORK_NAME} ENABLE_BITCODE "YES")
+if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
+    set_xcode_property(${FRAMEWORK_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS NO)
+    set_xcode_property(${FRAMEWORK_NAME} DEPLOYMENT_POSTPROCESSING YES)
+    set_xcode_property(${FRAMEWORK_NAME} COPY_PHASE_STRIP NO)
+    set_xcode_property(${FRAMEWORK_NAME} STRIP_INSTALLED_PRODUCT YES)
+    set_xcode_property(${FRAMEWORK_NAME} STRIP_STYLE non-global)
+    set_xcode_property(${FRAMEWORK_NAME} SEPARATE_STRIP YES)
+    set_xcode_property(${FRAMEWORK_NAME} DEAD_CODE_STRIPPING YES)
+else()
+    set_xcode_property(${FRAMEWORK_NAME} GCC_GENERATE_DEBUGGING_SYMBOLS YES)
+endif()
+
+if(${IOS_PLATFORM} STREQUAL "SIMULATOR")
+    # properties for simulator architectures
+else()
+    set_xcode_property(${FRAMEWORK_NAME} ENABLE_BITCODE "YES")
+    set_xcode_property(${FRAMEWORK_NAME} BITCODE_GENERATION_MODE bitcode)
+endif()
+
 set_xcode_property(${FRAMEWORK_NAME} SUPPORTED_PLATFORMS "iphonesimulator iphoneos")
 set_xcode_property(${FRAMEWORK_NAME} ONLY_ACTIVE_ARCH "NO")
 set_xcode_property(${FRAMEWORK_NAME} VALID_ARCHS "${ARCH}")


cmake: only generate sdkconfig on top level project

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -121,7 +121,6 @@
         --kconfig ${ROOT_KCONFIG}
         --config ${SDKCONFIG}
         ${defaults_arg}
-        --create-config-if-missing
         --env "COMPONENT_KCONFIGS=${kconfigs}"
         --env "COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}"
         --env "IDF_CMAKE=y")
@@ -154,12 +153,24 @@
     # makes sdkconfig.h and skdconfig.cmake
     #
     # This happens during the cmake run not during the build
-    execute_process(COMMAND ${confgen_basecommand}
-        --output header ${SDKCONFIG_HEADER}
-        --output cmake ${SDKCONFIG_CMAKE}
-        --output json ${SDKCONFIG_JSON}
-        --output json_menus ${KCONFIG_JSON_MENUS}
-        RESULT_VARIABLE config_result)
+    if(NOT BOOTLOADER_BUILD)
+        execute_process(
+            COMMAND ${confgen_basecommand}
+            --output header ${SDKCONFIG_HEADER}
+            --output cmake ${SDKCONFIG_CMAKE}
+            --output json ${SDKCONFIG_JSON}
+            --output json_menus ${KCONFIG_JSON_MENUS}
+            --output config ${SDKCONFIG} # only generate config at the top-level project
+            RESULT_VARIABLE config_result)
+    else()
+        execute_process(
+            COMMAND ${confgen_basecommand}
+            --output header ${SDKCONFIG_HEADER}
+            --output cmake ${SDKCONFIG_CMAKE}
+            --output json ${SDKCONFIG_JSON}
+            --output json_menus ${KCONFIG_JSON_MENUS}
+            RESULT_VARIABLE config_result)
+    endif()
     if(config_result)
         message(FATAL_ERROR "Failed to run confgen.py (${confgen_basecommand}). Error ${config_result}")
     endif()


git-svn-id: svn://scm.gforge.inria.fr/svn/openvibe@1224 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- cmake-modules/FindThirdPartyDotSceneLoader.cmake
+++ cmake-modules/FindThirdPartyDotSceneLoader.cmake
@@ -29,7 +29,7 @@
 ENDIF(WIN32)

 IF(UNIX)
-	FIND_PATH(PATH_DotSceneLoader include/DotScene/dotSceneInterface.h PATHS $ENV{OpenViBE_dependencies})
+	FIND_PATH(PATH_DotSceneLoader include/DotScene/dotSceneInterface.h PATHS $ENV{OMK_HOME} $ENV{OMK_BIN})
 	IF(PATH_DotSceneLoader)
 		SET(DotSceneLoader_FOUND TRUE)
 		SET(DotSceneLoader_INCLUDE_DIRS ${PATH_DotSceneLoader}/include/DotScene)


Improve lookup of installed Visual Studio

--- contrib/cmake/vcpkg_extra_triplets/x64-windows-mega.cmake
+++ contrib/cmake/vcpkg_extra_triplets/x64-windows-mega.cmake
@@ -1,4 +1,12 @@
-set(VCPKG_VISUAL_STUDIO_PATH "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional")
+if(EXISTS "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional")
+    set(VCPKG_VISUAL_STUDIO_PATH "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional")
+elseif(EXISTS "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community")
+    message(AUTHOR_WARNING "Microsoft Visual Studio 2017 Community will be used. Professional would be more appropriate.")
+    set(VCPKG_VISUAL_STUDIO_PATH "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community")
+else()
+    message(FATAL_ERROR "Microsoft Visual Studio 2017 could not be found")
+endif()
+
 set(VCPKG_PLATFORM_TOOLSET v141)

 set(VCPKG_TARGET_ARCHITECTURE x64)


32-bit color tests now pass

32-bit color tests now pass

--- tests/test-properties.cmake
+++ tests/test-properties.cmake
@@ -5,6 +5,4 @@
 set_tests_properties(
         FileTest.SetFInfo_CrDat
         FileTest.SetFLock
-        QuickDraw.BasicQDColor32
-        QuickDraw.GrayPattern32
     APPEND PROPERTIES LABELS xfail)


fix cmake warning

fix cmake warning

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@31406 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
+++ deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
@@ -59,7 +59,7 @@
     "EXECUTE_PROCESS(COMMAND ${TARGET_RUN}\n"
     "  RESULT_VARIABLE _return_value\n"
     "  )\n"
-    "IF(NOT \"\${_return_value}\" STREQUAL "0")\n"
+    "IF(NOT \"\${_return_value}\" STREQUAL \"0\")\n"
     "  MESSAGE(SEND_ERROR \"\nProgram terminated with exit code: \${_return_value}\")\n"
     "ENDIF()\n"
     )


[FIX] Fixing bug in CTD preparation.

[FIX] Fixing bug in CTD preparation.

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

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -99,6 +99,7 @@

 # Add directory for CTD files.
 add_custom_target (target_ctd_mkdir
+                   COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}
                    COMMAND ${CMAKE_COMMAND} -E make_directory ${CTD_PATH})

 # For each white-listed executable in SEQAN_CTD_EXECUTABLES, get its path and


no dbg symbols atm for mingw

no dbg symbols atm for mingw

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -280,7 +280,8 @@
 					${OLXROOTDIR}/libs/libzip
 					${OLXROOTDIR}/libs/lua
 					${OLXROOTDIR}/libs/boost_process)
-		ADD_DEFINITIONS(-g2) # limit debug info somewhat, or it will produce huge .EXE
+		# as long as we dont have breakpad, this doesnt make sense
+		#ADD_DEFINITIONS(-g2) # limit debug info somewhat, or it will produce huge .EXE
 	ELSE(MINGW_CROSS_COMPILE)
 		ADD_DEFINITIONS("-pthread")
 	ENDIF(MINGW_CROSS_COMPILE)


Minor editing of our cmake/common.cmake file.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -47,15 +47,11 @@
     # Required packages

     IF(APPLE)
-        # Note #1: the Qt SDK doesn't, by default, make the Qt binaries
-        #          available to the user, hence we must update the user's PATH.
-        #          However, this doesn't work on Mac OS X with Qt Creator, so
-        #          we must hard-code qmake's path so that CMake can find it
-        #          from within Qt Creator...
-        # Note #2: ideally, we would use EXECUTE_PROCESS to retrieve the result
-        #          of 'which qmake', but that CMake command doesn't work from
-        #          within Qt Creator, so we really have no choice but to hard-
-        #          code qmake's path...
+        # Note: the Qt SDK doesn't, by default, make the Qt binaries available
+        #       to the user, hence we must update the user's PATH. However, this
+        #       doesn't work on Mac OS X when using Qt Creator, so we must
+        #       hard-code qmake's path so that CMake can find Qt from within
+        #       Qt Creator...

         SET(QT_QMAKE_EXECUTABLE /Developer/QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake)
     ENDIF()


Minor improvement to our common CMake file.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -271,6 +271,7 @@
     #       However, this is not common practice on Windows, so...

     IF(WIN32)
+        SET(CMAKE_IMPORT_LIBRARY_PREFIX)
         SET(CMAKE_SHARED_LIBRARY_PREFIX)
     ENDIF()