[CMake] [Darwin] Don't generate lipo commands if we don't have libraries to put into the fat archive.

Not making sure there are thin libraries results in some difficult to diagnose build failures. This check should make those build failures go away.

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -186,18 +186,22 @@
     "PARENT_TARGET;OUTPUT_DIR;INSTALL_DIR"
     "LIPO_FLAGS;DEPENDS"
     ${ARGN})
-  add_custom_command(OUTPUT ${LIB_OUTPUT_DIR}/lib${name}.a
-    COMMAND ${CMAKE_COMMAND} -E make_directory ${LIB_OUTPUT_DIR}
-    COMMAND lipo -output
-            ${LIB_OUTPUT_DIR}/lib${name}.a
-            -create ${LIB_LIPO_FLAGS}
-    DEPENDS ${LIB_DEPENDS}
-    )
-  add_custom_target(${name}
-    DEPENDS ${LIB_OUTPUT_DIR}/lib${name}.a)
-  add_dependencies(${LIB_PARENT_TARGET} ${name})
-  install(FILES ${LIB_OUTPUT_DIR}/lib${name}.a
-    DESTINATION ${LIB_INSTALL_DIR})
+  if(ARGN_DEPENDS AND ARG_LIPO_FLAGS)
+    add_custom_command(OUTPUT ${LIB_OUTPUT_DIR}/lib${name}.a
+      COMMAND ${CMAKE_COMMAND} -E make_directory ${LIB_OUTPUT_DIR}
+      COMMAND lipo -output
+              ${LIB_OUTPUT_DIR}/lib${name}.a
+              -create ${LIB_LIPO_FLAGS}
+      DEPENDS ${LIB_DEPENDS}
+      )
+    add_custom_target(${name}
+      DEPENDS ${LIB_OUTPUT_DIR}/lib${name}.a)
+    add_dependencies(${LIB_PARENT_TARGET} ${name})
+    install(FILES ${LIB_OUTPUT_DIR}/lib${name}.a
+      DESTINATION ${LIB_INSTALL_DIR})
+  else()
+    message(WARNING "Not generating lipo target for ${name} because no input libraries exist.")
+  endif()
 endfunction()

 # Filter out generic versions of routines that are re-implemented in


Boost.signals removed in 1.69.0

Boost.signals removed in 1.69.0

--- cmake/modules/hunter_get_boost_libs.cmake
+++ cmake/modules/hunter_get_boost_libs.cmake
@@ -75,7 +75,7 @@
   hunter_append_component(${common_args} COMPONENT random          SINCE 1.15.0)
   hunter_append_component(${common_args} COMPONENT regex           SINCE 1.18.0)
   hunter_append_component(${common_args} COMPONENT serialization   SINCE 1.32.0)
-  hunter_append_component(${common_args} COMPONENT signals         SINCE 1.29.0)
+  hunter_append_component(${common_args} COMPONENT signals         SINCE 1.29.0 UNTIL 1.69.0)
   hunter_append_component(${common_args} COMPONENT stacktrace      SINCE 1.65.0)
   hunter_append_component(${common_args} COMPONENT system          SINCE 1.35.0)
   hunter_append_component(${common_args} COMPONENT test            SINCE 1.21.0)


frontend compiler for pather

frontend compiler for pather

--- cmakemodules/Toolchain/BlueGeneP-xl.cmake
+++ cmakemodules/Toolchain/BlueGeneP-xl.cmake
@@ -3,6 +3,8 @@

 # Set search paths to prefer local, admin-installed wrappers for the BG backend compilers
 set(BGP_XL_COMPILER_SEARCH_PATHS /usr/local/bin /usr/bin)
+
+find_program(PATCHER_FRONTEND_COMPILER gcc ${BGP_XL_COMPILER_SEARCH_PATHS})

 # GNU C Compilers
 find_program(CMAKE_C_COMPILER       bgxlc    ${BGP_XL_COMPILER_SEARCH_PATHS} /opt/ibmcmp/vac/bg/9.0/bin)


Copy rules and profiles if they have changed.

Add a dependency on the rule or profile itself so that the
copy rule is always run whenever it changes.

--- VeraPPUtilities.cmake
+++ VeraPPUtilities.cmake
@@ -149,6 +149,7 @@
                             ARGS -E copy_if_different
                                     ${_verapp_import_input_file_path}
                                     ${_verapp_import_output_file_path}
+                            DEPENDS ${_verapp_import_input_file_path}
                             COMMENT
                             "Importing ${WHAT} ${_verapp_import_output_file}")


Use cmake means to enforce C and C++ standards

Change-Id: I8a6742422178a7d2d1c81e413ddf628ea5bfea95
Reviewed-on: http://review.couchbase.org/c/libcouchbase/+/138649
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

--- cmake/Modules/GetLibcouchbaseFlags.cmake
+++ cmake/Modules/GetLibcouchbaseFlags.cmake
@@ -15,18 +15,30 @@
 # Note that global flags will still be modified for debug settings and the
 # like.

+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_C_STANDARD 99)
+
 MACRO(list2args VAR)
     STRING(REPLACE ";" " " _tmp "${${VAR}}")
     SET("${VAR}" "${_tmp}")
 ENDMACRO(list2args)

 LIST(APPEND LCB_GNUC_CPP_WARNINGS
-    -Wall -pedantic -Wshadow -fdiagnostics-show-option -Wformat
-    -Wno-strict-aliasing -Wextra -Winit-self -Wno-missing-field-initializers
-    -Wno-variadic-macros)
+        -Wall
+        -Wextra
+        -pedantic
+        -fdiagnostics-show-option
+        -Wshadow
+        -Wformat
+        -Wno-strict-aliasing
+        -Winit-self
+        -Wno-missing-field-initializers
+        -Wno-variadic-macros)

 IF(CMAKE_C_COMPILER_ID STREQUAL "Clang")
-    LIST(APPEND LCB_GNUC_CPP_WARNINGS -Wno-cast-align -Wno-dollar-in-identifier-extension)
+    LIST(APPEND LCB_GNUC_CPP_WARNINGS
+            -Wno-cast-align
+            -Wno-dollar-in-identifier-extension)
 ENDIF()

 IF(LCB_USE_ASAN)
@@ -50,17 +62,21 @@
 list2args(LCB_GNUC_CPP_WARNINGS)

 LIST(APPEND LCB_GNUC_C_WARNINGS
-    ${LCB_GNUC_CPP_WARNINGS}
-    -std=gnu99
-    -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls
-    -Wmissing-declarations)
+        ${LCB_GNUC_CPP_WARNINGS}
+        -Wundef
+        -Wstrict-prototypes
+        -Wmissing-prototypes
+        -Wredundant-decls
+        -Wmissing-declarations)
 list2args(LCB_GNUC_C_WARNINGS)

 LIST(APPEND LCB_GNUC_CXX_WARNINGS
-    ${LCB_GNUC_CPP_WARNINGS}
-    -std=c++11
-    -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy
-    -Wno-long-long -Wredundant-decls)
+        ${LCB_GNUC_CPP_WARNINGS}
+        -Woverloaded-virtual
+        -Wnon-virtual-dtor
+        -Wctor-dtor-privacy
+        -Wno-long-long
+        -Wredundant-decls)

 list2args(LCB_GNUC_CXX_WARNINGS)

@@ -97,7 +113,7 @@
     ADD_DEFINITIONS(-D_VARIADIC_MAX=10)
     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /TC ${LCB_CL_CPPFLAGS}")
     # We do not support anything below VS 2015
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${LCB_CL_CPPFLAGS}")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LCB_CL_CPPFLAGS}")
     SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${LCB_CL_CPPFLAGS_DEBUG}")
     SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${LCB_CL_CPPFLAGS_DEBUG}")
     SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${LCB_CL_CPPFLAGS_REL}")


CMake: Only use internal boost header (if available) for regression check

Fix a regression where a test for an icc regression in
check_01_cxx_features.cmake incorrectly used a generic <boost/signals2/...>
include. Such an include file doesn't have to be available at this early
point in the configuration run. User internal boost headers (if available)
instead - otherwise just test nothing.

--- cmake/checks/check_01_cxx_features.cmake
+++ cmake/checks/check_01_cxx_features.cmake
@@ -221,30 +221,40 @@
   #
   # - Matthias Maier, 2014
   #
-  CHECK_CXX_SOURCE_COMPILES(
-    "
-    #include <boost/signals2/signal.hpp>
-    using namespace boost::signals2;
-
-    class Order {};
-
-    class Foo
-    {
-     signal<void(Order*)> beforeOrder;
-     void test(Order* o)
-     {
-      beforeOrder(o);
-     }
-    };
-
-    int main()
-    {
-     Order o;
-     Foo foo;
-     return 0;
-    }
-    "
-    DEAL_II_HAVE_CXX11_ICCBOOSTSIGNALSBUG_OK)
+
+  #
+  # Use bundled boost headers for this regression test because external
+  # features (such as boost) are not yet configured at this point. If we
+  # have no bundled directory available, skip the test.
+  #
+  IF(DEAL_II_HAVE_BUNDLED_DIRECTORY)
+    CHECK_CXX_SOURCE_COMPILES(
+      "
+      #include <${BOOST_FOLDER}/include/boost/signals2/signal.hpp>
+      using namespace boost::signals2;
+
+      class Order {};
+
+      class Foo
+      {
+       signal<void(Order*)> beforeOrder;
+       void test(Order* o)
+       {
+        beforeOrder(o);
+       }
+      };
+
+      int main()
+      {
+       Order o;
+       Foo foo;
+       return 0;
+      }
+      "
+      DEAL_II_HAVE_CXX11_ICCBOOSTSIGNALSBUG_OK)
+  ELSE()
+    SET(DEAL_II_HAVE_CXX11_ICCBOOSTSIGNALSBUG_OK TRUE)
+  ENDIF()

   IF( DEAL_II_HAVE_CXX11_ARRAY AND


Support opt-viewer with multi-source benchmarks as well

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -96,6 +96,17 @@
   set(${objfile_out} ${objfiles} PARENT_SCOPE)
 endfunction()

+function(add_opt_view opt_view_main_dir, module_name, opt_view_dir_out)
+  set(opt_view_dir "${opt_view_main_dir}/${module_name}")
+  set(opt_record "${objdir}/${module_name}.opt.yaml")
+  set(opt_viewer "${LLVM_BUILD_MAIN_SRC_DIR}/tools/opt-viewer/opt-viewer.py")
+  add_custom_command(
+    OUTPUT ${opt_view_dir}
+    DEPENDS "${objfile}"
+    COMMAND ${opt_viewer} ${opt_record} "-o" ${opt_view_dir})
+  set(${opt_view_dir_out} ${opt_view_dir} PARENT_SCOPE)
+endfunction()
+
 # Regular whole-module-compilation: only a single object file is
 # generated.
 function (add_swift_multisource_wmo_benchmark_library objfile_out)
@@ -201,14 +212,14 @@
       "-no-link-objc-runtime"
       "-I" "${srcdir}/utils/ObjectiveCTests")

-  set(optview_main_dir)
+  set(opt_view_main_dir)
   if(SWIFT_BENCHMARK_GENERATE_OPT_VIEW AND LLVM_HAVE_OPT_VIEWER_MODULES)
     precondition(SWIFT_BENCHMARK_BUILT_STANDALONE NEGATE
       "Opt-viewer is not supported when running the benchmarks outside the Swift tree")

     if(NOT ${optflag} STREQUAL "Onone" AND "${bench_flags}" MATCHES "-whole-module.*")
       list(APPEND common_options "-save-optimization-record")
-      set(optview_main_dir "${objdir}/opt-view")
+      set(opt_view_main_dir "${objdir}/opt-view")
     endif()
   endif()

@@ -337,14 +348,10 @@
             "${source}")
       endif()

-      if(optview_main_dir)
-        set(opt_record "${objdir}/${module_name}.opt.yaml")
-        set(opt_viewer "${LLVM_BUILD_MAIN_SRC_DIR}/tools/opt-viewer/opt-viewer.py")
-        set(opt_view_dir "${optview_main_dir}/${module_name}")
-        add_custom_command(
-            OUTPUT ${opt_view_dir}
-            DEPENDS "${objfile}"
-            COMMAND ${opt_viewer} ${opt_record} "-o" ${opt_view_dir})
+      if(opt_view_main_dir)
+        set(opt_view_dir)
+        add_opt_view(${opt_view_main_dir}, ${module_name}, opt_view_dir)
+        precondition(opt_view_dir)
         list(APPEND opt_view_dirs ${opt_view_dir})
       endif()
     endif()
@@ -365,6 +372,13 @@
         DEPENDS ${bench_library_objects} ${stdlib_dependencies})
       precondition(objfile_out)
       list(APPEND SWIFT_BENCH_OBJFILES "${objfile_out}")
+
+      if(opt_view_main_dir)
+        set(opt_view_dir)
+        add_opt_view(${opt_view_main_dir}, ${module_name}, opt_view_dir)
+        precondition(opt_view_dir)
+        list(APPEND opt_view_dirs ${opt_view_dir})
+      endif()
     else()
       set(objfiles_out)
       add_swift_multisource_nonwmo_benchmark_library(objfiles_out
@@ -394,6 +408,13 @@
         DEPENDS ${bench_library_objects} ${stdlib_dependencies})
       precondition(objfile_out)
       list(APPEND SWIFT_BENCH_OBJFILES "${objfile_out}")
+
+      if(opt_view_main_dir)
+        set(opt_view_dir)
+        add_opt_view(${opt_view_main_dir}, ${module_name}, opt_view_dir)
+        precondition(opt_view_dir)
+        list(APPEND opt_view_dirs ${opt_view_dir})
+      endif()
     else()
       set(objfiles_out)
       add_swift_multisource_nonwmo_benchmark_library(objfiles_out


[numerics]  rename some tests

[numerics]  rename some tests

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -175,34 +175,31 @@
   FILE(GLOB_RECURSE _DATA_FILES
     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_D}
     data_collection*.c
-    test_*.c)
-
+    test_*.c)
   FOREACH(_F ${_DATA_FILES})
     CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${_D}/${_F} ${CMAKE_CURRENT_BINARY_DIR}/${_D}/${_F} COPYONLY)
   ENDFOREACH(_F ${_DATA_FILES})

   NEW_RELAY_TEST_COLLECTION(TEST_RELAY_COLLECTION_1)

-
-  NEW_TEST(test_relay_20 relay_test20.c)
-  NEW_TEST(test_step_1 step_test1.c)
-  NEW_TEST(test_step_2 step_test2.c)
-  NEW_TEST(test_step_3 step_test3.c)
-  NEW_TEST(test_step_4 step_test4.c)
-
-  END_TEST()
-
+  NEW_TEST(relay_test_20 relay_test20.c)
+  NEW_TEST(step_test_1 step_test1.c)
+  NEW_TEST(step_test_2 step_test2.c)
+  NEW_TEST(step_test_3 step_test3.c)
+  NEW_TEST(step_test_4 step_test4.c)
+
+  END_TEST()

   BEGIN_TEST(src/MLCP/test)
   IF(HAVE_SYSTIMES_H AND WITH_CXX)
-    NEW_TEST(MLCPtest main_mlcp.cpp)
+    NEW_TEST(MLCP_test_0 main_mlcp.cpp)
   ENDIF(HAVE_SYSTIMES_H AND WITH_CXX)
-  NEW_TEST(ReadWrite_MLCPtest MixedLinearComplementarity_ReadWrite_test.c)
+  NEW_TEST(MLCP_test_read_write MixedLinearComplementarity_ReadWrite_test.c)
   END_TEST()

   BEGIN_TEST(src/MCP/test)
-  NEW_TEST(MCPtest MCP_test.c)
-  NEW_TEST(MCPtest1 MCP_test1.c)
+  NEW_TEST(MCP_test_0 MCP_test.c)
+  NEW_TEST(MCP_test_1 MCP_test1.c)
   END_TEST()

   BEGIN_TEST(src/NCP/test)


Also look in {TBB_ROOT}/lib (and more) for TBB libraries

--- components/ospcommon/cmake/FindTBB.cmake
+++ components/ospcommon/cmake/FindTBB.cmake
@@ -97,10 +97,11 @@
     FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG tbbmalloc_debug PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
   ELSE()
     FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
-    FIND_LIBRARY(TBB_LIBRARY libtbb.so.2 HINTS ${TBB_ROOT}/lib/intel64/gcc4.4)
-    FIND_LIBRARY(TBB_LIBRARY_DEBUG libtbb_debug.so.2 HINTS ${TBB_ROOT}/lib/intel64/gcc4.4)
-    FIND_LIBRARY(TBB_LIBRARY_MALLOC libtbbmalloc.so.2 HINTS ${TBB_ROOT}/lib/intel64/gcc4.4)
-    FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG libtbbmalloc_debug.so.2 HINTS ${TBB_ROOT}/lib/intel64/gcc4.4)
+    SET(TBB_HINTS HINTS ${TBB_ROOT}/lib/intel64/gcc4.4 ${TBB_ROOT}/lib ${TBB_ROOT}/lib64 PATHS /usr/libx86_64-linux-gnu/)
+    FIND_LIBRARY(TBB_LIBRARY libtbb.so.2 ${TBB_HINTS})
+    FIND_LIBRARY(TBB_LIBRARY_DEBUG libtbb_debug.so.2 ${TBB_HINTS})
+    FIND_LIBRARY(TBB_LIBRARY_MALLOC libtbbmalloc.so.2 ${TBB_HINTS})
+    FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG libtbbmalloc_debug.so.2 ${TBB_HINTS})
   ENDIF()
 ENDIF()


cmake: improved Python and boost_python configuration

--- config/FindVIGRANUMPY_DEPENDENCIES.cmake
+++ config/FindVIGRANUMPY_DEPENDENCIES.cmake
@@ -77,9 +77,9 @@
     # boost_python for the wrong Python version
     IF(Boost_FOUND)
         FIND_LIBRARY(Boost_PYTHON_LIBRARY
-                     NAMES boost_python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}
-                           boost_python-mt
-                           boost_python
+                     NAMES boost_python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}   # Linux with multiple Python versions
+                           boost_python-mt                                                 # Mac
+                           boost_python                                                    # default
                      HINTS "${Boost_LIBRARY_DIR}"
                      DOC "boost_python libraries")
     ENDIF()


PKG: update mosaic module revision

PKG: update mosaic module revision

--- Modules/Remote/Mosaic.remote.cmake
+++ Modules/Remote/Mosaic.remote.cmake
@@ -5,5 +5,5 @@
 https://github.com/remicres/otb-mosaic
 "
   GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
-  GIT_TAG 9a8cdd63ed3bba500bb4ea3867abc38bce8be562
+  GIT_TAG f4845baae5f8c5b5ae15387875dd5fa79e81fc96
 )


xc/cmake: update prjxray capacity tiles function comment

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

--- xc/common/cmake/project_ray.cmake
+++ xc/common/cmake/project_ray.cmake
@@ -610,9 +610,8 @@
   #   )
   # ~~~
   #
-  # SITE_TYPES: contains the comma separated list of sites that are going to be used
-  #             as sub tiles for the specified tile. The total number of instances
-  #             of a site type appears as the capacity of the sub tile
+  # SITE_TYPES: contains a list of sites that are used as sub tiles for the specified tile.
+  #             The total number of instances of a site type appears as the capacity of the sub tile

   set(options)
   set(oneValueArgs ARCH TILE)


Use glbinding static libs instead of shared libs

--- CMakeModules/build_glbinding.cmake
+++ CMakeModules/build_glbinding.cmake
@@ -7,11 +7,7 @@
     SET(LIB_POSTFIX "d")
 ENDIF()

-IF(WIN32)
-    SET(glbinding_location ${prefix}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}glbinding${LIB_POSTFIX}${CMAKE_IMPORT_LIBRARY_SUFFIX})
-ELSE(WIN32)
-    SET(glbinding_location ${prefix}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}glbinding${LIB_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
-ENDIF(WIN32)
+SET(glbinding_location ${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}glbinding${LIB_POSTFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})

 IF(CMAKE_VERSION VERSION_LESS 3.2)
     IF(CMAKE_GENERATOR MATCHES "Ninja")
@@ -39,12 +35,12 @@
     -DCMAKE_C_FLAGS:STRING=${CFLAGS}
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
     -DCMAKE_INSTALL_PREFIX:STRING=${prefix}
-    -DBUILD_SHARED_LIBS:BOOL=ON
+    -DBUILD_SHARED_LIBS:BOOL=OFF
     -DOPTION_BUILD_TESTS:BOOL=OFF
     ${byproducts}
     )

-ADD_LIBRARY(glbinding IMPORTED SHARED)
+ADD_LIBRARY(glbinding IMPORTED STATIC)

 SET_TARGET_PROPERTIES(glbinding PROPERTIES IMPORTED_LOCATION ${glbinding_location})


Fix: Add missing files for qt assistant.exe

--- CMakeModules/install/windows.cmake
+++ CMakeModules/install/windows.cmake
@@ -180,6 +180,16 @@
 	${QT_DLL_DIR}/Qt5Network.dll
 	${QT_DLL_DIR}/Qt5Sql.dll
 	${QT_DLL_DIR}/Qt5WebKit.dll
+	${QT_DLL_DIR}/Qt5WebKitWidgets.dll
+	${QT_DLL_DIR}/Qt5WebKitWidgets.dll
+	${QT_DLL_DIR}/Qt5MultimediaWidgets.dll
+	${QT_DLL_DIR}/Qt5Multimedia.dll
+	${QT_DLL_DIR}/Qt5OpenGL.dll
+	${QT_DLL_DIR}/Qt5PrintSupport.dll
+	${QT_DLL_DIR}/Qt5Quick.dll
+	${QT_DLL_DIR}/Qt5Qml.dll
+	${QT_DLL_DIR}/Qt5V8.dll
+	${QT_DLL_DIR}/Qt5Sensors.dll
 	${QT_DLL_DIR}/Qt5CLucene.dll
     DESTINATION bin
     CONFIGURATIONS Release)
@@ -200,6 +210,15 @@
 	${QT_DLL_DIR}/Qt5Networkd.dll
 	${QT_DLL_DIR}/Qt5Sqld.dll
 	${QT_DLL_DIR}/Qt5WebKitd.dll
+	${QT_DLL_DIR}/Qt5WebKitWidgetsd.dll
+	${QT_DLL_DIR}/Qt5MultimediaWidgetsd.dll
+	${QT_DLL_DIR}/Qt5Multimediad.dll
+	${QT_DLL_DIR}/Qt5OpenGLd.dll
+	${QT_DLL_DIR}/Qt5PrintSupportd.dll
+	${QT_DLL_DIR}/Qt5Quickd.dll
+	${QT_DLL_DIR}/Qt5Qmld.dll
+	${QT_DLL_DIR}/Qt5V8d.dll
+	${QT_DLL_DIR}/Qt5Sensorsd.dll
 	${QT_DLL_DIR}/Qt5CLucened.dll
     DESTINATION bin
     CONFIGURATIONS Debug)


set specific paths and parameters for the camiPAsetup build configuration -Thomas

--- CMake/BuildConfigurations/camiPhotoacousticsSetup.cmake
+++ CMake/BuildConfigurations/camiPhotoacousticsSetup.cmake
@@ -4,8 +4,13 @@
 set(MITK_USE_OpenCV ON CACHE BOOL "MITK Use OpenCV Library" FORCE)
 set(MITK_USE_OpenIGTLink ON CACHE BOOL "MITK Use OpenIGTLink Library" FORCE)
 set(MITK_USE_US_DiPhAS_SDK ON CACHE BOOL "Use DiPhAS SDK" FORCE)
-#set(MITK_USE_OPOTEK_HARDWARE ON CACHE BOOL "Use hardware build-in in OPOTEK Phocus Mobile" FORCE)
-set(MITK_US_DiPhAS_SDK_PATH "C:/Users/dkfz/Source/Repos/UltrasoundResearchPlatform_SDK/UltrasoundResearchPlatformSDK_Cpp/x64/Release" CACHE PATH "DiPhAS SDK Path")
+set(MITK_US_DiPhAS_SDK_PATH "C:/Users/dkfz/Source/Repos/UltrasoundResearchPlatform_SDK/UltrasoundResearchPlatformSDK_Cpp/x64" CACHE PATH "DiPhAS SDK Path")
+
+set(MITK_USE_OPHIR_PYRO_HARDWARE ON CACHE BOOL "Use the Ophir sensor build-in in OPOTEK Phocus Mobile" FORCE)
+set(MITK_OPHIR_API_PATH "C:/OphirCppWrapper" CACHE PATH "Ophir API Path")
+
+set(MITK_USE_OPOTEK_HARDWARE ON CACHE BOOL "Use hardware build-in in OPOTEK Phocus Mobile" FORCE)
+set(MITK_GALIL_API_PATH "C:/OphirCppWrapper" CACHE PATH "Galil API Path")

 # Enable default plugins and the navigation modules
 set(MITK_CONFIG_PLUGINS


[cmake] CMAKE_CXX_STANDARD: default to compiler default, not C++11

If the compiler default is lower than C++11, stick with C++11.
This should fix ROOT-10692.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -106,7 +106,35 @@

 #---C++ standard----------------------------------------------------------------------

-set(CMAKE_CXX_STANDARD 11 CACHE STRING "")
+# We want to set the default value of CMAKE_CXX_STANDARD to the compiler default,
+# so we check the value of __cplusplus.
+# This default value can be overridden by specifying one at the prompt.
+if (MSVC)
+   set(CXX_STANDARD_STRING 2011)
+else()
+   execute_process(COMMAND echo __cplusplus
+                   COMMAND ${CMAKE_CXX_COMPILER} -E -x c++ -
+                   COMMAND tail -n1
+                   OUTPUT_VARIABLE CXX_STANDARD_STRING
+                   OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif()
+# Lexicographically compare the value of __cplusplus (e.g. "201703L" for C++17) to figure out
+# what standard CMAKE_CXX_COMPILER uses by default.
+# The standard values that __cplusplus takes are listed e.g. at
+# https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros
+# but note that compilers might denote partial implementations of new standards (e.g. c++1z)
+# with other non-standard values.
+if (${CXX_STANDARD_STRING} STRGREATER "201703L")
+   set(CXX_STANDARD_STRING 20 CACHE STRING "")
+elseif(${CXX_STANDARD_STRING} STRGREATER "201402L")
+   set(CXX_STANDARD_STRING 17 CACHE STRING "")
+elseif(${CXX_STANDARD_STRING} STRGREATER "201103L")
+   set(CXX_STANDARD_STRING 14 CACHE STRING "")
+else()
+   # We stick to C++11 as a minimum value
+   set(CXX_STANDARD_STRING 11 CACHE STRING "")
+endif()
+set(CMAKE_CXX_STANDARD ${CXX_STANDARD_STRING} CACHE STRING "")
 set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
 set(CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "")


Build system: wxwidgets; Adopt modified version of latest find module

For this commit, the cmake/modules/FindwxWidgets.cmake file was copied from CMake-3.2.1
and modified appropriately in the licensing section and also the
include(FindPackageHandleStandardArgs) command so we can use this file
as part of PLplot.  Also, update this file with the WX_LIB_DIR_PREFIX
portion of Phil's previous patch.  (The other part of his patch is now
no longer relevant since the section he was changing has now been
completely removed from the 3.2.1 version.)

Tested by: Alan W. Irwin <airwin@users.sourceforge.net> on Linux
by running the cmake command and making sure that wxwidgets was found.

--- cmake/modules/FindwxWidgets.cmake
+++ cmake/modules/FindwxWidgets.cmake
@@ -108,15 +108,34 @@
 # Copyright 2004-2009 Kitware, Inc.
 # Copyright 2007-2009 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org>
 #
-# 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.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+#   nor the names of their contributors may be used to endorse or promote
+#   products derived from this software without specific prior written
+#   permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)

 #
 # FIXME: check this and provide a correct sample usage...
@@ -229,13 +248,12 @@
 endif()

 #=====================================================================
+# Determine whether unix or win32 paths should be used
 #=====================================================================
-if(WIN32 AND NOT CYGWIN AND NOT MSYS)
+if(WIN32 AND NOT CYGWIN AND NOT MSYS AND NOT CMAKE_CROSSCOMPILING)
   set(wxWidgets_FIND_STYLE "win32")
 else()
-  if(UNIX OR MSYS)
-    set(wxWidgets_FIND_STYLE "unix")
-  endif()
+  set(wxWidgets_FIND_STYLE "unix")
 endif()

 #=====================================================================
@@ -461,6 +479,8 @@
       D:/
       ENV ProgramFiles
     PATH_SUFFIXES
+      wxWidgets-3.0.2
+      wxWidgets-3.0.1
       wxWidgets-3.0.0
       wxWidgets-2.9.5
       wxWidgets-2.9.4
@@ -503,22 +523,13 @@
     set(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND"
         CACHE PATH "Cleared." FORCE)
   endif()
-  #include(CMakeDetermineCCompiler)
-  #message(STATUS "CMAKE_CROSSCOMPILING = ${CMAKE_CROSSCOMPILING}")
-  #message(STATUS "CMAKE_C_COMPILER = ${CMAKE_C_COMPILER}")
-  #message(STATUS "MSVC_C_ARCHITECTURE_ID = ${MSVC_C_ARCHITECTURE_ID}")
-  #message(STATUS "MSVC_CXX_ARCHITECTURE_ID = ${MSVC_CXX_ARCHITECTURE_ID}")
-  #message(STATUS "CMAKE_CL_64 = ${CMAKE_CL_64}")
-  #message(STATUS "LIB = $ENV{LIB}")
-  #message(STATUS "GENERATOR = ${CMAKE_GENERATOR}")
+
   if(WX_ROOT_DIR)
     # Select one default tree inside the already determined wx tree.
     # Prefer static/shared order usually consistent with build
     # settings.
     if(MINGW)
       set(WX_LIB_DIR_PREFIX gcc)
-    #The following should check for compiling 64 bit with nmake or VS
-    #Check for use of 64 bit NMake Makefile generator or a Visual Studio XX Win64 generator
     elseif(CMAKE_CL_64)
       set(WX_LIB_DIR_PREFIX vc_x64)
     #unfortunately the above doesn't work on my system - can't find why, but workaround below
@@ -581,7 +592,7 @@

     if(WX_LIB_DIR)
       # If building shared libs, define WXUSINGDLL to use dllimport.
-      if(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
+      if(WX_LIB_DIR MATCHES "[dD][lL][lL]")
         set(wxWidgets_DEFINITIONS WXUSINGDLL)
         DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}")
       endif()
@@ -689,7 +700,7 @@
       if(_wx_result EQUAL 0)
         foreach(_opt_name debug static unicode universal)
           string(TOUPPER ${_opt_name} _upper_opt_name)
-          if(_wx_selected_config MATCHES ".*${_opt_name}.*")
+          if(_wx_selected_config MATCHES "${_opt_name}")
             set(wxWidgets_DEFAULT_${_upper_opt_name} ON)
           else()
             set(wxWidgets_DEFAULT_${_upper_opt_name} OFF)


revision 42930 does not work for CMake version
2.8.3 and lower. So, I have protected the code by checking the CMake version
and reverted to the original behavior for old versions.
Attached is the addional patch to be committed.

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@42939 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -49,23 +49,19 @@
 if(CMAKE_PROJECT_NAME STREQUAL ROOT)
   set(rootcint_cmd rootcint_tmp)
   set(rlibmap_cmd rlibmap)
+  if(CMAKE_VERSION VERSION_GREATER 2.8.3)
+    set(ROOTCINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h ROOTCINTTARGET)
+    set(CINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h CINTTARGET)
+  else()
+    set(ROOTCINTDEP rootcint_tmp)
+    set(CINTDEP cint_tmp)
+  endif()
 else()
-  if(TARGET rootcint)
-    get_target_property(_location rootcint LOCATION)
-    get_filename_component(_location ${_location} PATH)
-    get_filename_component(ROOTSYS ${_location} PATH)
-  endif()
-  if(WIN32)
-    set(rootcint_cmd rootcint)
-  else()
-    set(rootcint_cmd rootcint)
-#    set(rootcint_cmd ${ROOTSYS}/bin/setenvwrap.csh ${ld_library_path}=${ROOTSYS}/lib ${ROOTSYS}/bin/rootcint)
-  endif()
+  set(rootcint_cmd rootcint)
   set(rlibmap_cmd rlibmap)
+  set(ROOTCINTDEP)
+  set(CINTDEP)
 endif()
-#---Dictionary dependencies to ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h and rootcint executable
-set(ROOTCINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h ROOTCINTTARGET)
-set(CINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h CINTTARGET)

 set(CMAKE_VERBOSE_MAKEFILES OFF)
 set(CMAKE_INCLUDE_CURRENT_DIR OFF)


Fix the arm64 build issue on some special OS for OpenVino (#5870)

CMAKE_LIBRARY_ARCHITECTURE returns empty from some OS

--- cmake/onnxruntime_providers.cmake
+++ cmake/onnxruntime_providers.cmake
@@ -608,7 +608,7 @@
       else()
         list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64/Release)
       endif()
-    elseif(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64-linux-gnu")
+    elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
       list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/aarch64)
     else()
       list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64)


Folly fix 'try_run' arguments when cross-compiling

--- cmake/projects/folly/hunter.cmake
+++ cmake/projects/folly/hunter.cmake
@@ -38,15 +38,15 @@
   list(
       APPEND
       __hunter_folly_args
-      FOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE=0
+      FOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE=""
       FOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE__TRYRUN_OUTPUT=""
-      FOLLY_HAVE_LINUX_VDSO_EXITCODE=0
+      FOLLY_HAVE_LINUX_VDSO_EXITCODE=""
       FOLLY_HAVE_LINUX_VDSO_EXITCODE__TRYRUN_OUTPUT=""
-      FOLLY_HAVE_WCHAR_SUPPORT_EXITCODE=0
+      FOLLY_HAVE_WCHAR_SUPPORT_EXITCODE=""
       FOLLY_HAVE_WCHAR_SUPPORT_EXITCODE__TRYRUN_OUTPUT=""
-      HAVE_VSNPRINTF_ERRORS_EXITCODE=0
+      HAVE_VSNPRINTF_ERRORS_EXITCODE=""
       HAVE_VSNPRINTF_ERRORS_EXITCODE__TRYRUN_OUTPUT=""
-      FOLLY_HAVE_XSI_STRERROR_R_EXITCODE=0
+      FOLLY_HAVE_XSI_STRERROR_R_EXITCODE=""
       FOLLY_HAVE_XSI_STRERROR_R_EXITCODE__TRYRUN_OUTPUT=""
   )
 endif()


Search for python2/python3 binaries with old CMake

The old CMake logic only looks for a Python binary
called 'python'. This is no good on RHEL8 since it
has no /usr/bin/python but also does not have a new
enough CMake to use the new CMake logic. Update the
old logic to also look for a "python2" or "python3"
binary.

--- cmake_modules/IMPFindPython.cmake
+++ cmake_modules/IMPFindPython.cmake
@@ -1,13 +1,32 @@
 # Like cmake's FindPython but allows the user to override; should also
 # work (to some degree) with older cmake
 function(imp_find_python)
+  set(USE_PYTHON2 off CACHE BOOL
+      "Force use of Python2 (by default Python3 is used if available)")
+
   if (${CMAKE_VERSION} VERSION_LESS "3.14.0")
     message(WARNING "Using old Python detection logic. Recommended to upgrade to cmake 3.14.0 or later")
     if(NOT DEFINED PYTHON_INCLUDE_DIRS)
-      execute_process(COMMAND python -c "import sys; print(sys.executable)"
-                      WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-		      OUTPUT_VARIABLE python_full_path
-                      OUTPUT_STRIP_TRAILING_WHITESPACE)
+      if (USE_PYTHON2)
+        set(_SEARCH_PYTHON_BINARIES python2 python)
+      else()
+        set(_SEARCH_PYTHON_BINARIES python3 python2 python)
+      endif()
+
+      foreach(pybinary ${_SEARCH_PYTHON_BINARIES})
+        execute_process(COMMAND ${pybinary} -c "import sys; print(sys.executable)"
+                        RESULT_VARIABLE retval
+                        WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+                        OUTPUT_VARIABLE python_full_path
+                        OUTPUT_STRIP_TRAILING_WHITESPACE)
+        if(${retval} EQUAL 0)
+          break()
+        endif()
+      endforeach()
+
+      if(NOT ${retval} EQUAL 0)
+        message(FATAL_ERROR "Could not find a suitable Python binary - looked for ${_SEARCH_PYTHON_BINARIES}")
+      endif()
       set(PYTHON_EXECUTABLE ${python_full_path} CACHE INTERNAL "" FORCE)
       set(PYTHON_TEST_EXECUTABLE ${python_full_path} CACHE STRING "")
       execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print('%d.%d.%d' % sys.version_info[:3])"
@@ -50,9 +69,6 @@
     endif()

   else()
-    set(USE_PYTHON2 off CACHE BOOL
-        "Force use of Python2 (by default Python3 is used if available)")
-
     if (NOT USE_PYTHON2)
       find_package(Python3 COMPONENTS Interpreter Development NumPy)
     endif()


COMP: Typo in cppcheck config

COMP: Typo in cppcheck config

--- SuperBuild/External_Cppcheck.cmake
+++ SuperBuild/External_Cppcheck.cmake
@@ -64,7 +64,7 @@
     LOG_INSTALL   0  # Wrap install in script to to ignore log output from dashboards
     ${cmakeversion_external_update} "${cmakeversion_external_update_value}"
     CONFIGURE_COMMAND ""
-    BUILD_COMMAND HAVE_RULES=no CC=${CMAKE_C_COMPILER} CXX=$CMAKE_CXX_COMPILER{} ${CMAKE_MAKE_PROGRAM}
+    BUILD_COMMAND HAVE_RULES=no CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_MAKE_PROGRAM}
     INSTALL_COMMAND HAVE_RULES=no DESTDIR=${CMAKE_BINARY_DIR}/ PREFIX=Utils ${CMAKE_MAKE_PROGRAM} install
     DEPENDS
       ${${proj}_DEPENDENCIES}


Changed CMake to fetch and include GTest and GMock as external project

--- test/External.cmake
+++ test/External.cmake
@@ -51,4 +51,5 @@
 SET(GMOCK_DIR ${source_dir})
 SET(GMOCK_INCLUDE_DIR ${source_dir}/include)
 ExternalProject_Get_Property(googlemock binary_dir)
-SET(GMOCK_LIB_DIR "${binary_dir}")+SET(GMOCK_LIB_DIR "${binary_dir}")
+


Adding support for easybuild modules

Adding support for easybuild modules

Former-commit-id: b9e1baf2f53441859c99d1b2b1e26f6624d3b25f

--- cmake-modules/Fetch_Arpackpp.cmake
+++ cmake-modules/Fetch_Arpackpp.cmake
@@ -35,7 +35,7 @@
             )
     if(ARPACKPP_INCLUDE_DIR)
         get_filename_component(DIRNAME ${ARPACKPP_INCLUDE_DIR} NAME)
-        message(DIRNAME: ${DIRNAME})
+        message(STATUS: ${DIRNAME})
         if("${DIRNAME}" STREQUAL "arpack++")
             get_filename_component(ARPACKPP_INCLUDE_DIR ${ARPACKPP_INCLUDE_DIR} DIRECTORY)
             message(STATUS "Searching for Arpack++ in module - Success: ${ARPACKPP_INCLUDE_DIR}")


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/buffer/hunter.cmake
+++ cmake/projects/buffer/hunter.cmake
@@ -3,6 +3,17 @@
 include(hunter_pick_scheme)

 # List of versions here...
+
+hunter_add_version(
+    PACKAGE_NAME
+    buffer
+    VERSION
+    "0.1.6"
+    URL
+    "https://github.com/designerror/buffer/archive/v0.1.6.tar.gz"
+    SHA1
+    23a33907e5eef0353d3c85c0e083413d5292b35a
+)

 hunter_add_version(
     PACKAGE_NAME


Update ExternalAntlr4Cpp.cmake

Update ExternalAntlr4Cpp.cmake

--- runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake
+++ runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake
@@ -112,7 +112,7 @@
       EXCLUDE_FROM_ALL 1)
 endif()

-# Seperate build step as rarely people want both
+# Separate build step as rarely people want both
 set(ANTLR4_BUILD_DIR ${ANTLR4_ROOT})
 if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14.0")
   # CMake 3.14 builds in above's SOURCE_SUBDIR when BUILD_IN_SOURCE is true


Windows compatibility.

Windows compatibility.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -944,10 +944,7 @@
   FOREACH(_prereq IN LISTS _tmp_prereq)
     IF(${_prereq}_DIR)
       SET(_PREREQ_LIST "${_PREREQ_LIST} ${_prereq}")
-      SET(CURR_DIR ${${_prereq}_DIR})
-      IF(WIN32)
-        STRING(REGEX REPLACE "\\\\" "/" CURR_DIR ${CURR_DIR})
-      ENDIF()
+      FILE(TO_CMAKE_PATH ${${_prereq}_DIR} CURR_DIR)
       SET(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${CURR_DIR}\"")
       SALOME_APPEND_LIST_OF_LIST(_PREREQ_COMPO_LIST Salome${_prereq}_COMPONENTS)
     ENDIF()


hdf5: MinGW may not provide timezone

hdf5: MinGW may not provide timezone

The file H5Omtime.c failed to compile under Mingw because the variable
timezone was not defined. The config check set H5_HAVE_TIMEZONE to 1 for
all Windows platforms. This patch excludes that set for MINGW.

--- config/cmake/ConfigureChecks.cmake
+++ config/cmake/ConfigureChecks.cmake
@@ -178,7 +178,9 @@
   SET (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1)
   SET (H5_HAVE_FUNCTION 1)
   SET (H5_GETTIMEOFDAY_GIVES_TZ 1)
-  SET (H5_HAVE_TIMEZONE 1)
+  IF (NOT MINGW)
+    SET (H5_HAVE_TIMEZONE 1)
+  ENDIF (NOT MINGW)
   SET (H5_HAVE_GETTIMEOFDAY 1)
   SET (H5_LONE_COLON 0)
 ENDIF (WINDOWS)


build: mark mbedTLS libraries as imported

This prevents absolute paths for these libraries in open62541Targets.cmake

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

-set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")
+add_library(mbedtls UNKNOWN IMPORTED)
+set_property(TARGET mbedtls PROPERTY IMPORTED_LOCATION "${MBEDTLS_LIBRARY}")
+add_library(mbedx509 UNKNOWN IMPORTED)
+set_property(TARGET mbedx509 PROPERTY IMPORTED_LOCATION "${MBEDX509_LIBRARY}")
+add_library(mbedcrypto UNKNOWN IMPORTED)
+set_property(TARGET mbedcrypto PROPERTY IMPORTED_LOCATION "${MBEDCRYPTO_LIBRARY}")
+
+set(MBEDTLS_LIBRARIES mbedtls mbedx509 mbedcrypto)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(MBEDTLS DEFAULT_MSG


CMake: improve FindHeeksCAD module

CMake: improve FindHeeksCAD module

  * Use a cleaner method to find from multiple paths
  * Add "/usr/local/share/heekscad" to searched paths: HeeksCAD now install its sources there (with default prefix: /usr/local)
  * Add "/usr/share/heekscad" to searched paths: HeeksCAD now install its sources there (with most linux distributions prefix: /usr)

--- cmake/Modules/FindHeeksCAD.cmake
+++ cmake/Modules/FindHeeksCAD.cmake
@@ -9,19 +9,18 @@
 #

 IF(NOT HeeksCAD_FOUND)
-   # Will try to find at standard locations
-   FIND_PATH(HeeksCAD_SRC_DIR src/Geom.h PATH_SUFFIXES heekscad)
+  SET( SEARCH_PATHS
+    "/usr/local/share/heekscad"
+    "/usr/share/heekscad"
+    "${CMAKE_SOURCE_DIR}/heekscad"
+    "${CMAKE_SOURCE_DIR}/.."
+    "${CMAKE_SOURCE_DIR}/../heekscad"
+  )
+
+  FIND_PATH( HeeksCAD_SRC_DIR interface/Geom.cpp PATHS ${SEARCH_PATHS} DOC "Path to HeeksCAD includes" )
+  IF( NOT HeeksCAD_SRC_DIR )
+      MESSAGE( FATAL_ERROR "Cannot find HeeksCAD sources dir." )
+  ENDIF( NOT HeeksCAD_SRC_DIR )
+
+  MESSAGE( STATUS "HeeksCAD_SRC_DIR:     " ${HeeksCAD_SRC_DIR} )
 ENDIF(NOT HeeksCAD_FOUND)
-
-MESSAGE( STATUS "HeeksCAD_SRC_DIR:     " ${HeeksCAD_SRC_DIR} )
-
-IF( HeeksCAD_SRC_DIR STREQUAL HeeksCAD_SRC_DIR-NOTFOUND )
-  # try to find at heekscad/ location then ../
-  FIND_PATH( HeeksCAD_SRC_DIR src/Geom.h PATHS "${CMAKE_SOURCE_DIR}/heekscad" "${CMAKE_SOURCE_DIR}/.." "${CMAKE_SOURCE_DIR}/../heekscad"DOC "Path to HeeksCAD includes" )
-  #FIND_PATH( HeeksCAD_SRC_DIR src/Geom.h PATHS "${CMAKE_SOURCE_DIR}/heekscad" DOC "Path to HeeksCAD includes" )
-  IF( HeeksCAD_SRC_DIR STREQUAL Geom.h-NOTFOUND )
-    MESSAGE( FATAL_ERROR "Cannot find HeeksCAD sources dir." )
-   ENDIF( HeeksCAD_SRC_DIR STREQUAL Geom.h-NOTFOUND )
-ENDIF(HeeksCAD_SRC_DIR STREQUAL HeeksCAD_SRC_DIR-NOTFOUND )
-
-MESSAGE( STATUS "HeeksCAD_SRC_DIR:     " ${HeeksCAD_SRC_DIR} )


Install assimp libs

Install assimp libs

--- cmakemodules/script_assimp.cmake
+++ cmakemodules/script_assimp.cmake
@@ -67,7 +67,14 @@
 			ASSIMP_LIBRARY_SUFFIX
 			)

-		# 3rd attempt: Fatal error if not found:
+		# make sure the library gets installed
+		INSTALL(TARGETS assimp
+			RUNTIME DESTINATION ${MRPT_PREFIX_INSTALL}bin  COMPONENT Libraries
+			LIBRARY DESTINATION ${MRPT_PREFIX_INSTALL}${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries
+			ARCHIVE DESTINATION ${MRPT_PREFIX_INSTALL}${CMAKE_INSTALL_LIBDIR} COMPONENT Libraries  # WAS: lib${LIB_SUFFIX}
+			)
+
+		# 2nd attempt: via cmake
 		SET(ASSIMP_DIR "${EMBEDDED_ASSIMP_DIR}" CACHE PATH "Path to ASSIMP CMake config file" FORCE)
 		FIND_PACKAGE(ASSIMP QUIET)


boards: nrf52840_pca10059: Fix pyOCD configuration

Use the correct pyOCD target type for the NRF52840.
This fixes b92436a13f39df93029e881994ebf5d7b071bc4e.

Tested with: Atmel ICE Debugger

Signed-off-by: Henrik Brix Andersen <a076b11c2cc63ccdc903dbe182e1eecc3cbbc094@brixandersen.dk>

--- boards/arm/nrf52840_pca10059/board.cmake
+++ boards/arm/nrf52840_pca10059/board.cmake
@@ -1,6 +1,6 @@
 board_runner_args(nrfjprog "--nrf-family=NRF52")
 board_runner_args(jlink "--device=nrf52" "--speed=4000")
-board_runner_args(pyocd "--target=nrf52")
+board_runner_args(pyocd "--target=nrf52840")
 include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)


- Testing root path

- Testing root path

--- cmake/Toolchains/all-ios.toolchain.cmake
+++ cmake/Toolchains/all-ios.toolchain.cmake
@@ -214,7 +214,10 @@
 set ( CMAKE_FIND_ROOT_PATH
         ${CMAKE_FIND_ROOT_PATH}
         ${COFFEE_ROOT_DIR}
+	${NATIVE_LIBRARY_DIR}
     )
+
+message ( "ROOT_PATH ${CMAKE_FIND_ROOT_PATH}" )

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


Detect OCCT at new Debian location

Detect OCCT at new Debian location

--- cMake/FindOpenCasCade.cmake
+++ cMake/FindOpenCasCade.cmake
@@ -68,6 +68,7 @@
       endif(CYGWIN OR MINGW)
     else(WIN32)
       FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
+        /usr/include/occt
         /usr/include/opencascade
         /usr/local/include/opencascade
         /opt/opencascade/include


gbs test fix

gbs test fix

--- tests/include.cmake
+++ tests/include.cmake
@@ -37,7 +37,7 @@
     endif()
 endif()

-include_directories("${GAMSPATH}/apifiles/C/api"
+include_directories("${BASEPATH}/C/api"
                     "${CMAKE_CURRENT_SOURCE_DIR}/../../C++/api"
                     "${gtest_SOURCE_DIR}/include")


Update the link from catch2

Update the link from catch2

--- scripts/AddCatchTest.cmake
+++ scripts/AddCatchTest.cmake
@@ -5,7 +5,7 @@
   # setups things so include can be found
   include(PackageLookup)
   set(catch_url
-      https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp)
+      https://raw.githubusercontent.com/catchorg/Catch2/master/single_include/catch2/catch.hpp)
   set(catch_file "${EXTERNAL_ROOT}/include/catch.hpp")
   file(MAKE_DIRECTORY "${EXTERNAL_ROOT}/include")
   file(DOWNLOAD ${catch_url} "${catch_file}")


Target name for cython objects

Target name for cython objects

Mako generated cython targets would end up with absolute path as target name.
Made sure to use only filename without pyx, pxd, py extension. Difficulty comes
from adding names with more than one '.': cmake figures anything past the first
'.' is part of the extension.

--- scripts/PythonModule.cmake
+++ scripts/PythonModule.cmake
@@ -313,6 +313,7 @@
     string(REGEX REPLACE "\\.pyx" "" cy_module "${source}")
     string(REGEX REPLACE "\\.pxd" "" cy_module "${cy_module}")
     string(REGEX REPLACE "\\.py" "" cy_module "${cy_module}")
+    get_filename_component(cy_module "${cy_module}" NAME)
     if("${cy_module}" MATCHES "^${module}")
         set(full_module ${cy_module})
     else()


small adjustments in documentation

small adjustments in documentation

--- src/docbook/index.xml.cmake
+++ src/docbook/index.xml.cmake
@@ -344,10 +344,11 @@
       <title>Building install packages</title>
       <para>This is section is mainly intended for package maintainers</para>

-    <sect5 id="building_install_package_on_windows">
-      <title>Building install package on Windows</title>
-<para>
-To build the fastphylo nullsoft installer package you need to have this installed
+    <sect5 id="building_an_exe_file_for_windows">
+      <title>Building an .exe file for Windows</title>
+<para>
+To build the fastphylo nullsoft installer package ( fastphylo-@PACKAGE_VERSION@-win32.exe )
+you need to have this installed
         <itemizedlist mark="bullet">
           <listitem>
             <para>
@@ -377,6 +378,7 @@
             </para>
           </listitem>
         </itemizedlist>
+on your Windows machine.
       </para>
       <para>


Better message for buzz_make()

Better message for buzz_make()

--- src/utility/UseBuzz.cmake
+++ src/utility/UseBuzz.cmake
@@ -96,12 +96,15 @@
     set(_buzz_make_BUZZ_INCLUDE_PATH "-I" "${_buzz_make_BUZZ_INCLUDE_PATH}")
   endif(NOT _buzz_make_BUZZ_INCLUDE_PATH STREQUAL "")
   # Define compilation command
+  if(_buzz_make_INCLUDES)
+    set(_buzz_make_INCLUDES_msg ", including \"${_buzz_make_INCLUDES}\"")
+  endif(_buzz_make_INCLUDES)
   add_custom_command(
     OUTPUT "${_buzz_make_BYTECODE}" "${_buzz_make_BASM}" "${_buzz_make_DEBUG}"
     COMMAND "BZZPARSE=${BUZZ_PARSER}" "BZZASM=${BUZZ_ASSEMBLER}" "${BUZZ_COMPILER}" ${_buzz_make_BUZZ_INCLUDE_PATH} -b "${_buzz_make_BYTECODE}" -d "${_buzz_make_DEBUG}" -a "${_buzz_make_BASM}" "${CMAKE_CURRENT_SOURCE_DIR}/${_SCRIPT}"
     MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${_SCRIPT}"
     DEPENDS ${_buzz_make_INCLUDES}
-    COMMENT "Compiling Buzz script ${_SCRIPT}, including '${_buzz_make_INCLUDES}'")
+    COMMENT "Compiling Buzz script ${_SCRIPT}${_buzz_make_INCLUDES_msg}")
   # Add target, so compilation is executed
   add_custom_target("${_SCRIPT}" ALL DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${_SCRIPT}" "${_buzz_make_BYTECODE}" "${_buzz_make_DEBUG}" ${_buzz_make_INCLUDES})
 endfunction(buzz_make)


Fixed usage explanation in UseBuzz.cmake.

--- src/utility/UseBuzz.cmake
+++ src/utility/UseBuzz.cmake
@@ -21,7 +21,7 @@
 # specified in these variables:
 #
 # 1. the environment variable BUZZ_INCLUDE_PATH
-# 2. the CMake variable BUZZ_INCLUDE_PATH
+# 2. the CMake variable BUZZ_BZZ_INCLUDE_DIR
 #
 # The Buzz tools are assumed already detected through
 # FindBuzz.cmake. However, you can also manually set following the


add flag again to work under gcc 4.9.2

add flag again to work under gcc 4.9.2

--- toolchains/qt.cmake
+++ toolchains/qt.cmake
@@ -12,6 +12,7 @@
 set(CMAKE_CXX_EXTENSIONS OFF)
 set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)

+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++1y")
 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")


libjansson fix

libjansson fix

--- libjansson.cmake
+++ libjansson.cmake
@@ -12,7 +12,7 @@

 external_git_repo (libjansson
   HEAD
-  git://github.com/akheron/jansson.git
+  https://github.com/akheron/jansson.git
   )

 message ("Installing ${libjansson_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")


CMake: Bugfix, use a separate variable for FIND_PACKAGE, improve search order

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

--- deal.II/cmake/modules/FindTRILINOS.cmake
+++ deal.II/cmake/modules/FindTRILINOS.cmake
@@ -33,17 +33,18 @@
 #
 # Include the trilinos package configuration:
 #
-FIND_PACKAGE(TRILINOS
-  QUIET CONFIG
+FIND_PACKAGE(TRILINOS_CONFIG
+  CONFIG
   NAMES Trilinos TRILINOS
   HINTS
+    ${TRILINOS_DIR}/lib/cmake/Trilinos
     ${TRILINOS_DIR}
   PATH_SUFFIXES
-    lib${LIB_SUFFIX}/cmake/Trilinos
     lib64/cmake/Trilinos
     lib/cmake/Trilinos
+    lib${LIB_SUFFIX}/cmake/Trilinos
+    include/trilinos
     include/Trilinos
-    include/trilinos
   NO_SYSTEM_ENVIRONMENT_PATH
   )

@@ -77,7 +78,7 @@

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(TRILINOS DEFAULT_MSG
   TRILINOS_LIBRARIES # cosmetic: Gives nice output
-  TRILINOS_FOUND
+  TRILINOS_CONFIG_FOUND
   )


trying to add it to the cmake didn't work

--- build/toolchains/raspberrypi.cmake
+++ build/toolchains/raspberrypi.cmake
@@ -1,5 +1,4 @@
 # options
-set(CMAKE_CXX_COMPILER /usr/bin/g++-4.7)
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -fpermissive")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_CXX_FLAGS} -L/opt/vc/lib/ -lGLESv2 -lEGL -lbcm_host -lvchiq_arm -lvcos -lrt")
 set(CXX_FLAGS_DEBUG "-g -O0")


Prevent resource symlink creation when performing resource packaging. Incidentally, the extra symlinks in the Web CI build has caused static site generation error since yesterday. So this should fix that as well.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -1781,30 +1781,32 @@
         add_dependencies (${TARGET_NAME} ${RESOURCE_CHECK_${MD5ALL}})
     endif ()
     # Create symbolic links in the build tree
-    if (ANDROID)
-        file (MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/Android/assets)
-        if (NOT URHO3D_PACKAGING)
+    if (NOT URHO3D_PACKAGING)
+        if (ANDROID)
+            file (MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/Android/assets)
+            if (NOT URHO3D_PACKAGING)
+                foreach (I ${RESOURCE_DIRS})
+                    get_filename_component (NAME ${I} NAME)
+                    if (NOT EXISTS ${CMAKE_SOURCE_DIR}/Android/assets/${NAME})
+                        create_symlink (${I} ${CMAKE_SOURCE_DIR}/Android/assets/${NAME} FALLBACK_TO_COPY)
+                    endif ()
+                endforeach ()
+            endif ()
+            foreach (I AndroidManifest.xml build.xml custom_rules.xml project.properties src res assets jni)
+                if (EXISTS ${CMAKE_SOURCE_DIR}/Android/${I} AND NOT EXISTS ${CMAKE_BINARY_DIR}/${I})    # No-ops when 'Android' is used as build tree
+                    create_symlink (${CMAKE_SOURCE_DIR}/Android/${I} ${CMAKE_BINARY_DIR}/${I} FALLBACK_TO_COPY)
+                endif ()
+            endforeach ()
+        else ()
             foreach (I ${RESOURCE_DIRS})
                 get_filename_component (NAME ${I} NAME)
-                if (NOT EXISTS ${CMAKE_SOURCE_DIR}/Android/assets/${NAME})
-                    create_symlink (${I} ${CMAKE_SOURCE_DIR}/Android/assets/${NAME} FALLBACK_TO_COPY)
+                if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/${NAME} AND EXISTS ${I})
+                    # Ensure the output directory exist before creating the symlinks
+                    file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+                    create_symlink (${I} ${CMAKE_BINARY_DIR}/bin/${NAME} FALLBACK_TO_COPY)
                 endif ()
             endforeach ()
         endif ()
-        foreach (I AndroidManifest.xml build.xml custom_rules.xml project.properties src res assets jni)
-            if (EXISTS ${CMAKE_SOURCE_DIR}/Android/${I} AND NOT EXISTS ${CMAKE_BINARY_DIR}/${I})    # No-ops when 'Android' is used as build tree
-                create_symlink (${CMAKE_SOURCE_DIR}/Android/${I} ${CMAKE_BINARY_DIR}/${I} FALLBACK_TO_COPY)
-            endif ()
-        endforeach ()
-    else ()
-        foreach (I ${RESOURCE_DIRS})
-            get_filename_component (NAME ${I} NAME)
-            if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/${NAME} AND EXISTS ${I})
-                # Ensure the output directory exist before creating the symlinks
-                file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-                create_symlink (${I} ${CMAKE_BINARY_DIR}/bin/${NAME} FALLBACK_TO_COPY)
-            endif ()
-        endforeach ()
     endif ()
     # Workaround CMake/Xcode generator bug where it always appends '/build' path element to SYMROOT attribute and as such the items in Products are always rendered as red in the Xcode as if they are not yet built
     if (NOT DEFINED ENV{TRAVIS})


Tighten the Clang version checking. [skip appveyor] [ci only: Android]

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -730,8 +730,8 @@
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
         endif ()
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.0)
-            # Workaround for Clang 7.0 and above until the Bullet upstream has fixed the Clang 7 diagnostic checks issue (see https://github.com/bulletphysics/bullet3/issues/2114)
+        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0.1 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.0.1)
+            # Workaround for Clang 7.0.1 and above until the Bullet upstream has fixed the Clang 7 diagnostic checks issue (see https://github.com/bulletphysics/bullet3/issues/2114)
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-argument-outside-range")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-argument-outside-range")
         endif ()


Update to FindCollada.cmake to handle Visual Studio 2017 binaries

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -24,24 +24,35 @@

+
+
 IF(APPLE)
     SET(COLLADA_BUILDNAME "mac")
+    SET(COLLADA_BOOST_BUILDNAME "mac")
 ELSEIF(MINGW)
     SET(COLLADA_BUILDNAME "mingw")
+    SET(COLLADA_BOOST_BUILDNAME "mingw")
 ELSEIF(MSVC14)
     SET(COLLADA_BUILDNAME "vc14")
+    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
 ELSEIF(MSVC12)
     SET(COLLADA_BUILDNAME "vc12")
+    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
 ELSEIF(MSVC11)
     SET(COLLADA_BUILDNAME "vc11")
+    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
 ELSEIF(MSVC10)
     SET(COLLADA_BUILDNAME "vc10")
+    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
 ELSEIF(MSVC90)
     SET(COLLADA_BUILDNAME "vc9")
+    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
 ELSEIF(MSVC80)
     SET(COLLADA_BUILDNAME "vc8")
+    string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
 ELSE(APPLE)
   SET(COLLADA_BUILDNAME "linux")
+  SET(COLLADA_BOOST_BUILDNAME "linux")
 ENDIF(APPLE)

@@ -74,7 +85,7 @@
 )

 FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
-    NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 collada-dom2.4-dp collada-dom2.4-dp-vc120-mt
+    NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 collada-dom2.4-dp collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt
     PATHS
     ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
     ${COLLADA_DOM_ROOT}
@@ -98,7 +109,7 @@
 )

 FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
-    NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d  collada-dom2.4-dp-d collada-dom2.4-dp-vc120-mt-d
+    NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d  collada-dom2.4-dp-d collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt-d
     PATHS
     ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
     ${COLLADA_DOM_ROOT}
@@ -261,7 +272,7 @@
     )

     FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
-        NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-${COLLADA_BUILDNAME}0-mt libboost_filesystem-${COLLADA_BUILDNAME}0-mt-1_54 libboost_filesystem-${COLLADA_BUILDNAME}0-mt-1_55 libboost_filesystem-${COLLADA_BUILDNAME}0-mt-1_58 boost_filesystem-${COLLADA_BUILDNAME}0-mt-1_62
+        NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_63
         PATHS
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -269,7 +280,7 @@
     )

     FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
-        NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-${COLLADA_BUILDNAME}0-mt-gd libboost_filesystem-${COLLADA_BUILDNAME}0-mt-gd-1_54 libboost_filesystem-${COLLADA_BUILDNAME}0-mt-gd-1_55 libboost_filesystem-${COLLADA_BUILDNAME}0-mt-gd-1_58 boost_filesystem-${COLLADA_BUILDNAME}0-mt-gd-1_62
+        NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63
         PATHS
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -277,7 +288,7 @@
     )

     FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
-        NAMES libboost_system boost_system boost_system-mt libboost_system-${COLLADA_BUILDNAME}0-mt libboost_system-${COLLADA_BUILDNAME}0-mt-1_54 libboost_system-${COLLADA_BUILDNAME}0-mt-1_55  libboost_system-${COLLADA_BUILDNAME}0-mt-1_58 boost_system-${COLLADA_BUILDNAME}0-mt-1_62
+        NAMES libboost_system boost_system boost_system-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_55  libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_63
         PATHS
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -285,7 +296,7 @@
     )

     FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
-        NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-${COLLADA_BUILDNAME}0-mt-gd libboost_system-${COLLADA_BUILDNAME}0-mt-gd-1_54 libboost_system-${COLLADA_BUILDNAME}0-mt-gd-1_55 libboost_system-${COLLADA_BUILDNAME}0-mt-gd-1_58 boost_system-${COLLADA_BUILDNAME}0-mt-gd-1_62
+        NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63
         PATHS
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw


Update clFFT release tag

Update clFFT release tag

--- CMakeModules/build_clFFT.cmake
+++ CMakeModules/build_clFFT.cmake
@@ -14,7 +14,7 @@
 ExternalProject_Add(
     clFFT-ext
     GIT_REPOSITORY https://github.com/arrayfire/clFFT.git
-    GIT_TAG 1597f0f35a644789c7ad77efe79014236cca2fab
+    GIT_TAG arrayfire-release-test
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


make TNUN_target_remove_compile_options_for_config different than TNUN_target_remove_compile_options

--- build_options.cmake
+++ build_options.cmake
@@ -46,11 +46,21 @@
     set_directory_properties( PROPERTIES COMPILE_OPTIONS "${current_compile_options}" )
 endfunction()

-function( TNUN_target_remove_compile_options target configuration )
+function( TNUN_target_remove_compile_options_for_config target configuration )
     string( TOUPPER ${configuration} configuration )
     get_target_property( current_compile_options ${target} COMPILE_OPTIONS )
     foreach( arg ${ARGN} )
         set( option $<$<CONFIG:${configuration}>:${arg}> )
+        string( REPLACE "${option}" "" current_compile_options "${current_compile_options}" )
+    endforeach()
+    set_target_properties( ${target} PROPERTIES COMPILE_OPTIONS "${current_compile_options}" )
+endfunction()
+
+function( TNUN_target_remove_compile_options target )
+    string( TOUPPER ${configuration} configuration )
+    get_target_property( current_compile_options ${target} COMPILE_OPTIONS )
+    foreach( arg ${ARGN} )
+        set( option ${arg} )
         string( REPLACE "${option}" "" current_compile_options "${current_compile_options}" )
     endforeach()
     set_target_properties( ${target} PROPERTIES COMPILE_OPTIONS "${current_compile_options}" )


Fix CMake for Windows.Device.Gpio (#1812)

***NO_CI***

--- CMake/Modules/FindSystem.Device.Gpio.cmake
+++ CMake/Modules/FindSystem.Device.Gpio.cmake
@@ -33,6 +33,12 @@
     Hardware.cpp
 )

+# TODO remove this IF() clause here when Windows.Devices.Gpio is removed
+if(NOT API_Windows.Devices.Gpio)
+    # need to have this here in case Windows.Devices.Gpio is not included
+    list(APPEND System.Device.Gpio_SRCS cpu_gpio.cpp)
+endif()
+
 foreach(SRC_FILE ${System.Device.Gpio_SRCS})
     set(System.Device.Gpio_SRC_FILE SRC_FILE-NOTFOUND)
     find_file(System.Device.Gpio_SRC_FILE ${SRC_FILE}


#2215 Fix dependencies escaping in generated OpenCVConfig.cmake

--- cmake/OpenCVGenConfig.cmake
+++ cmake/OpenCVGenConfig.cmake
@@ -64,9 +64,14 @@
       string(REGEX REPLACE "${CMAKE_SHARED_LIBRARY_SUFFIX}$" "${OPENCV_LINK_LIBRARY_SUFFIX}" __libname "${__libname}")
     endif()

+    string(REPLACE " " "\\ " __mod_deps "${${__ocv_lib}_MODULE_DEPS_${suffix}}")
+    string(REPLACE " " "\\ " __ext_deps "${${__ocv_lib}_EXTRA_DEPS_${suffix}}")
+    string(REPLACE "\"" "\\\"" __mod_deps "${__mod_deps}")
+    string(REPLACE "\"" "\\\"" __ext_deps "${__ext_deps}")
+
     set(OPENCV_DEPENDENCIES_MAP_${suffix} "${OPENCV_DEPENDENCIES_MAP_${suffix}}set(OpenCV_${__ocv_lib}_LIBNAME_${suffix} \"${__libname}\")\n")
-    set(OPENCV_DEPENDENCIES_MAP_${suffix} "${OPENCV_DEPENDENCIES_MAP_${suffix}}set(OpenCV_${__ocv_lib}_DEPS_${suffix} ${${__ocv_lib}_MODULE_DEPS_${suffix}})\n")
-    set(OPENCV_DEPENDENCIES_MAP_${suffix} "${OPENCV_DEPENDENCIES_MAP_${suffix}}set(OpenCV_${__ocv_lib}_EXTRA_DEPS_${suffix} ${${__ocv_lib}_EXTRA_DEPS_${suffix}})\n")
+    set(OPENCV_DEPENDENCIES_MAP_${suffix} "${OPENCV_DEPENDENCIES_MAP_${suffix}}set(OpenCV_${__ocv_lib}_DEPS_${suffix} ${__mod_deps})\n")
+    set(OPENCV_DEPENDENCIES_MAP_${suffix} "${OPENCV_DEPENDENCIES_MAP_${suffix}}set(OpenCV_${__ocv_lib}_EXTRA_DEPS_${suffix} ${__ext_deps})\n")

     list(APPEND OPENCV_PROCESSED_LIBS ${__ocv_lib})
     list(APPEND OPENCV_LIBS_TO_PROCESS ${${__ocv_lib}_MODULE_DEPS_${suffix}})


Remove uncommented stuff from installer file

--- cmake/OpenMeshPackage.cmake
+++ cmake/OpenMeshPackage.cmake
@@ -55,23 +55,6 @@
   list (APPEND CPACK_SOURCE_IGNORE_FILES "/qmake/")
   list (APPEND CPACK_SOURCE_IGNORE_FILES "\\\\.qmake\\\\.cache")
 endif ()
-
-# filter out all disabled plugins
-# file (
-#   GLOB _plugins_in
-#   RELATIVE "${CMAKE_SOURCE_DIR}"
-#   "${CMAKE_SOURCE_DIR}/Plugin-*"
-# )
-#foreach (_plugin ${_plugins_in})
-#  string (REPLACE "Plugin-" "" _plugin_name ${_plugin})
-#  string (TOUPPER ${_plugin_name} _PLUGIN)
-#  if (NOT EXISTS ${CMAKE_SOURCE_DIR}/${_plugin}/CMakeLists.txt AND DISABLE_QMAKE_BUILD)
-#    list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}")
-#  elseif (DISABLE_PLUGIN_${_PLUGIN})
-#    list (APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR}/${_plugin}")
-#  endif ()
-#endforeach ()
-

 if (WIN32)
   # window NSIS installer
@@ -134,27 +117,6 @@

   set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "CreateShortcut \\\"$SMPROGRAMS\\\\${CPACK_NSIS_DISPLAY_NAME}\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\Doc\\\\html\\\\index.html \\\" "  )

-  # append dll's to installed package
-  #if (EXISTS ${CMAKE_SOURCE_DIR}/WIN)
-	  #file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 debug/*.dll")
-	  #install(FILES ${_files}
-	  #DESTINATION ${ACG_PROJECT_BINDIR}
-	  #CONFIGURATIONS Debug
-	  #)
-    #file (GLOB _files "${CMAKE_SOURCE_DIR}/WIN/DLLs/DLLs 32 release/*.dll")
-    #install (FILES ${_files}
-    #  DESTINATION ${ACG_PROJECT_BINDIR}
-    #  CONFIGURATIONS Release
-    #)
-    #install (FILES "${CMAKE_SOURCE_DIR}/WIN/DLLs/Redistributables/Visual Studio 2008/vcredist_x86.exe"
-    #  DESTINATION ${ACG_PROJECT_BINDIR}
-    #)
-    #set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\vcredist_x86.exe\\\" /q:a'")
-    #endif ()
-    #elseif (APPLE)
-  # apple Drag'n'Drop installer package
-  #set (CPACK_GENERATOR "DragNDrop;TGZ")
-  #set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/OpenFlipper/Icons/OpenFlipper_Icon.icns")
 endif ()

 # has to be last


Oops, don't set the profiling build type by default when unit test are
enabled.

git-svn-id: e31799a7ad59d6ea355ca047c69e0aee8a59fcd3@2784 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e

--- cmake/OpenSyncTesting.cmake
+++ cmake/OpenSyncTesting.cmake
@@ -1,7 +1,6 @@
 ENABLE_TESTING()
 INCLUDE( CTest )

-SET( CMAKE_BUILD_TYPE PROFILING )
 SET( CMAKE_C_FLAGS_PROFILING "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wwrite-strings -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Compiler Flags" )
 SET( CMAKE_SHARED_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags" )
 SET( CMAKE_MODULE_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags" )


Update cvmatio default to 1.0.27-p1

Update cvmatio default to 1.0.27-p1

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -91,7 +91,7 @@
 hunter_config(cereal VERSION 1.1.2-p5)
 hunter_config(clBLAS VERSION 2.10.0-p0)
 hunter_config(convertutf VERSION 1.0.1)
-hunter_config(cvmatio VERSION 1.0.27)
+hunter_config(cvmatio VERSION 1.0.27-p1)
 hunter_config(damageproto VERSION 1.2.1)
 hunter_config(dbus VERSION 1.10.0-hunter-4)
 hunter_config(dest VERSION 0.8.0-p3)


- Fix MKLDNN build type to match Paddle build type

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -56,6 +56,7 @@
     PREFIX              ${MKLDNN_SOURCES_DIR}
     UPDATE_COMMAND      ""
     CMAKE_ARGS          -DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
+    CMAKE_ARGS          -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
     CMAKE_ARGS          -DMKLROOT=${MKLML_ROOT}
     CMAKE_ARGS          -DCMAKE_C_FLAGS=${MKLDNN_CFLAG}
     CMAKE_ARGS          -DCMAKE_CXX_FLAGS=${MKLDNN_CXXFLAG}


Add Path Export

Add Path Export

PATH is a variable project can export to point to a folder of scripts
that are useful to execute at build time by other dependent projects

--- cmake/includes/Export.cmake
+++ cmake/includes/Export.cmake
@@ -28,11 +28,13 @@
 #       other projects
 # PYTHON_INCLUDES: directories containing python files that wish to be exposed
 #       to other projects
+# PATH: directory to any build time scripts that are useful for other projects
+#       to be able to run
 #
 ###############################################################################
 function(export_project)
     set(options )
-    set(oneValueArgs NAME VERSION)
+    set(oneValueArgs NAME VERSION PATH)
     set(multiValueArgs INCLUDES LIBS ARCHIVES BINS RES JARS APKS JAR_PATHS
         JAVA_INCLUDES PYTHON_INCLUDES)
     cmake_parse_arguments(EXP "${options}" "${oneValueArgs}"
@@ -187,6 +189,9 @@
                 "list(APPEND ${EXP_NAME_uc}_PYTHON_INCLUDE_DIRS ${j})\n")
         endforeach()
     endif()
+    if (EXP_PATH)
+        file(APPEND ${export_config} "set(${EXP_NAME_uc}_PATH ${EXP_PATH})\n")
+    endif()

     # write the version file
     include(CMakePackageConfigHelpers)


Transmit cmake_args correctly

Transmit cmake_args correctly

Former-commit-id: fe88673445b73ff0ceffd3762d1dec18b9cba821

--- cmake/SetupDependenciesCMake.cmake
+++ cmake/SetupDependenciesCMake.cmake
@@ -3,19 +3,21 @@
     include(cmake/InstallPackage.cmake)

     # Set CMake build options
-    list(APPEND OpenBLAS_CMAKE_OPTIONS -DTARGET:STRING=${OPENBLAS_MARCH})
-    list(APPEND OpenBLAS_CMAKE_OPTIONS -DUSE_THREAD:BOOL=1)
-    list(APPEND OpenBLAS_CMAKE_OPTIONS -DBUILD_RELAPACK:BOOL=OFF)
+    if(OPENBLAS_MARCH)
+        list(APPEND OpenBLAS_ARGS -DTARGET:STRING=${OPENBLAS_MARCH})
+    endif()
+    list(APPEND OpenBLAS_ARGS -DUSE_THREAD:BOOL=ON)
+    list(APPEND OpenBLAS_ARGS -DBUILD_RELAPACK:BOOL=OFF)

-    list(APPEND h5pp_CMAKE_OPTIONS -DEigen3_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})
-    list(APPEND h5pp_CMAKE_OPTIONS -DH5PP_PACKAGE_MANAGER:STRING=cmake)
-    list(APPEND h5pp_CMAKE_OPTIONS -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE})
+    list(APPEND h5pp_ARGS -DEigen3_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})
+    list(APPEND h5pp_ARGS -DH5PP_PACKAGE_MANAGER:STRING=cmake)
+    list(APPEND h5pp_ARGS -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE})

-    list(APPEND glog_CMAKE_OPTIONS -Dgflags_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})
+    list(APPEND glog_ARGS -Dgflags_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})

-    list(APPEND Ceres_CMAKE_OPTIONS -DEigen3_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})
-    list(APPEND Ceres_CMAKE_OPTIONS -Dgflags_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})
-    list(APPEND Ceres_CMAKE_OPTIONS -Dglog_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})
+    list(APPEND Ceres_ARGS -DEigen3_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})
+    list(APPEND Ceres_ARGS -Dgflags_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})
+    list(APPEND Ceres_ARGS -Dglog_ROOT:PATH=${DMRG_DEPS_INSTALL_DIR})

     if (NOT BUILD_SHARED_LIBS)
         set(GFLAGS_COMPONENTS COMPONENTS)
@@ -39,7 +41,9 @@

     if (NOT MKL_FOUND)
         # If MKL is not on openblas will be used instead. Includes blas, lapack and lapacke
-        install_package(OpenBLAS VERSION 0.3.8 DEPENDS gfortran::gfortran Threads::Threads)
+        install_package(OpenBLAS VERSION 0.3.8
+                CMAKE_ARGS ${OpenBLAS_ARGS}
+                DEPENDS gfortran::gfortran Threads::Threads)
         target_compile_definitions(OpenBLAS::OpenBLAS INTERFACE OPENBLAS_AVAILABLE)
         # Fix for OpenBLAS 0.3.9, which otherwise includes <complex> inside of an extern "C" scope.
         target_compile_definitions(OpenBLAS::OpenBLAS INTERFACE lapack_complex_float=std::complex<float>)
@@ -63,7 +67,7 @@
     # Eigen3 numerical library (needed by ceres and h5pp)
     install_package(Eigen3 VERSION 3.3)
     # h5pp for writing to file binary in format
-    install_package(h5pp VERSION 1.9.0 CMAKE_ARGS ${h5pp_CMAKE_OPTIONS})
+    install_package(h5pp VERSION 1.9.0 CMAKE_ARGS ${h5pp_ARGS})
     # Iterative Eigenvalue solver for a few eigenvalues/eigenvectors using Arnoldi method.
     install_package(arpack-ng VERSION 3.8.0
             TARGET_NAME ARPACK::ARPACK
@@ -79,12 +83,12 @@
     install_package(gflags VERSION 2.2.2 COMPONENTS ${GFLAGS_COMPONENTS} ${GFLAGS_ITEMS})

     # Google logging library needed by ceres-solver
-    install_package(glog VERSION 0.4 CMAKE_ARGS ${glog_CMAKE_OPTIONS} CHECK)
+    install_package(glog VERSION 0.4 CMAKE_ARGS ${glog_ARGS} CHECK)

     # ceres-solver (for L-BFGS routine)
     install_package(Ceres VERSION 2.0
             TARGET_NAME Ceres::ceres
             DEPENDS gflags glog::glog
-            CMAKE_ARGS ${Ceres_CMAKE_OPTIONS}
+            CMAKE_ARGS ${Ceres_ARGS}
             CHECK)
 endif ()


AddLLVM: Mute the prefix "lib" in SHARED on win32.

  - LLVMSupport.dll
  - libLLVMSupport.dll.a

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -276,6 +276,11 @@
   endif()

   if(ARG_SHARED)
+    if(WIN32)
+      set_target_properties(${name} PROPERTIES
+        PREFIX ""
+        )
+    endif()
     if (MSVC)
       set_target_properties(${name}
         PROPERTIES


Make Python version setting actually effective

This needs to be outside the if to actually work. Also, this adjusts the
list of versions to match LLVM.

Patch by: Christian Biesinger

Differential revision: https://reviews.llvm.org/D64578

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@365988 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -87,8 +87,8 @@
   include(CheckAtomic)
   include(LLVMDistributionSupport)

+  set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 2.7)
   if (PYTHON_EXECUTABLE STREQUAL "")
-    set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5)
     include(FindPythonInterp)
     if( NOT PYTHONINTERP_FOUND )
       message(FATAL_ERROR


Update

Update

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

--- cmake/modules/FindIDN.cmake
+++ cmake/modules/FindIDN.cmake
@@ -4,7 +4,7 @@
 #
 #  IDN_FOUND - Test has found IDN dependencies
 #  IDN_INCLUDES - Include needed for IDN
-#  IDN_LIBRARIES - Libraries needed for IDN
+#  IDN_LIBRARY - Libraries needed for IDN
 #  IDN_DEFINITIONS - Compiler swithces required for using IDN
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
@@ -29,20 +29,8 @@
   ${_IDNLinkDir}
   NO_DEFAULT_PATH
 )
-
-if (IDN_INCLUDES AND IDN_LIBRARY)
-   set(IDN_FOUND TRUE)
-endif (IDN_INCLUDES AND IDN_LIBRARY)
-
-if (IDN_FOUND)
-  if (NOT IDN_FIND_QUIETLY)
-    message(STATUS "Found IDN: ${IDN_LIBRARY}")
-  endif (NOT IDN_FIND_QUIETLY)
-else (IDN_FOUND)
-  if (IDN_FIND_REQUIRED)
-    message(FATAL_ERROR "Could NOT find IDN")
-  endif (IDN_FIND_REQUIRED)
-endif (IDN_FOUND)
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(IDN DEFAULT_MSG IDN_INCLUDES AND IDN_LIBRARY )

 MARK_AS_ADVANCED(IDN_INCLUDE_DIR IDN_LIBRARY)


Updated cmake/modules/FindQca.cmake. Added new path to find Qca includes

--- cmake/modules/FindQca.cmake
+++ cmake/modules/FindQca.cmake
@@ -46,6 +46,7 @@
         qt5/Qca-qt5/QtCrypto
         Qca-qt5/QtCrypto
         qt5/QtCrypto
+        qt/Qca-qt5/QtCrypto
     )
 endif()


FindQt5.cmake: look in the correct pkg-config file for QT_CONFIG_FLAGS

Reviewed-by: Alexandr Akulich <ad71d6ef874ccc09e1a69fe0dd6443b72073e71a@gmail.com>

--- cmake/modules/FindQt5.cmake
+++ cmake/modules/FindQt5.cmake
@@ -122,7 +122,7 @@
                  QT_QMAKE_EXECUTABLE_FINDQT QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE)

 # Invokes pkgconfig, cleans up the result and sets variables
-EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable qt_config QtCore
+EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable qt_config Qt5Core
     OUTPUT_VARIABLE _pkgconfig_flags
     RESULT_VARIABLE _pkgconfig_failed)
 STRING(REPLACE " " ";" QT_CONFIG_FLAGS "${_pkgconfig_flags}")


[Hexagon] Remember to add common sources when building TVMRT for Hexagon (#10290)

--- cmake/modules/Hexagon.cmake
+++ cmake/modules/Hexagon.cmake
@@ -67,16 +67,12 @@
   endif()
 endif()

-if(BUILD_FOR_HEXAGON)
-  find_hexagon_sdk_root("${USE_HEXAGON_SDK}" "${USE_HEXAGON_ARCH}")
-  # Add SDK and QuRT includes when building for Hexagon.
-  include_directories(SYSTEM ${HEXAGON_SDK_INCLUDES} ${HEXAGON_QURT_INCLUDES})
-endif()
-
 # This .cmake file is included when building any part of TVM for any
 # architecture. It shouldn't require any Hexagon-specific parameters
 # (like the path to the SDK), unless it's needed.
-# Two flags can enable some Hexagon-related functionality:
+#
+# Aside from building the code for Hexagon, two flags can enable some
+# Hexagon-related functionality:
 # - USE_HEXAGON_DEVICE
 # - USE_HEXAGON_RPC
 #
@@ -92,7 +88,7 @@
 endif()

-if(NOT USE_HEXAGON_DEVICE AND NOT USE_HEXAGON_RPC)
+if(NOT USE_HEXAGON_DEVICE AND NOT USE_HEXAGON_RPC AND NOT BUILD_FOR_HEXAGON)
   # If nothing related to Hexagon is enabled, add phony Hexagon codegen,
   # and some stuff needed by cpptests (this part is a temporary workaround
   # until e2e support for Hexagon is enabled).
@@ -126,6 +122,15 @@
   "${TVMRT_SOURCE_DIR}/hexagon/hexagon_module.cc"
   "${TVMRT_SOURCE_DIR}/hexagon/hexagon/*.cc"
 )
+
+
+if(BUILD_FOR_HEXAGON)
+  find_hexagon_sdk_root("${USE_HEXAGON_SDK}" "${USE_HEXAGON_ARCH}")
+  # Add SDK and QuRT includes when building for Hexagon.
+  include_directories(SYSTEM ${HEXAGON_SDK_INCLUDES} ${HEXAGON_QURT_INCLUDES})
+
+  list(APPEND RUNTIME_HEXAGON_SRCS ${RUNTIME_HEXAGON_COMMON_SRCS})
+endif()

 if(USE_HEXAGON_DEVICE)


Implemented FindSDSL

Implemented FindSDSL

--- cmakemodules/FindSDSL.cmake
+++ cmakemodules/FindSDSL.cmake
@@ -1 +1,38 @@
-# TODO
+
+# - Try to find SDSL
+#
+# The following variables are optionally searched for defaults
+#  SDSL_ROOT_DIR:            Base directory where all GLOG components are found
+#
+# The following are set after configuration is done:
+#  SDSL_FOUND
+#  SDSL_INCLUDE_DIRS
+#  SDSL_LIBRARIES
+
+include(FindPackageHandleStandardArgs)
+
+set(SDSL_ROOT_DIR "" CACHE PATH "Folder contains sdsl-lite")
+
+find_path(SDSL_INCLUDE_DIR sdsl/config.hpp
+    PATHS ${SDSL_ROOT_DIR})
+
+find_library(SDSL_LIBRARY sdsl
+    PATHS ${SDSL_ROOT_DIR})
+
+find_package_handle_standard_args(Sdsl DEFAULT_MSG
+    SDSL_INCLUDE_DIR SDSL_LIBRARY)
+
+find_library(DIVSUFSORT_LIBRARY divsufsort)
+
+find_package_handle_standard_args(Divsufsort DEFAULT_MSG
+    DIVSUFSORT_LIBRARY)
+
+find_library(DIVSUFSORT64_LIBRARY divsufsort64)
+
+find_package_handle_standard_args(Divsufsort64 DEFAULT_MSG
+    DIVSUFSORT64_LIBRARY)
+
+if(SDSL_FOUND AND DIVSUFSORT_FOUND AND DIVSUFSORT64_FOUND)
+    set(SDSL_INCLUDE_DIRS ${SDSL_INCLUDE_DIR})
+    set(SDSL_LIBRARIES ${SDSL_LIBRARY} ${DIVSUFSORT_LIBRARY} ${DIVSUFSORT64_LIBRARY})
+endif()


actually submit, as Nightly

actually submit, as Nightly

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.8)

-SET(CTEST_DO_SUBMIT OFF)
-SET(CTEST_TEST_TYPE Experimental)
+SET(CTEST_DO_SUBMIT ON)
+SET(CTEST_TEST_TYPE Nightly)

 set(CTEST_NIGHTLY_START_TIME "19:00:00 EST")
 set(CTEST_SITE "jenga.scorec.rpi.edu" )


[CMake] Allow LLVM to be embedded and built in a subfolder as part of another project.

Patch by Bertrand Bellenot!

Reviewed by Chris Bieneman and me.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -410,12 +410,12 @@
   set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)

   # We don't have an ASM parser for all architectures yet.
-  if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt)
+  if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt)
     set(LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser)
   endif ()

   # We don't have an disassembler for all architectures yet.
-  if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt)
+  if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt)
     set(LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler)
   endif ()
 endif ()
@@ -526,7 +526,7 @@
   if(GO_EXECUTABLE STREQUAL "GO_EXECUTABLE-NOTFOUND")
     message(STATUS "Go bindings disabled.")
   else()
-    execute_process(COMMAND ${GO_EXECUTABLE} run ${CMAKE_SOURCE_DIR}/bindings/go/conftest.go
+    execute_process(COMMAND ${GO_EXECUTABLE} run ${PROJECT_SOURCE_DIR}/bindings/go/conftest.go
                     RESULT_VARIABLE GO_CONFTEST)
     if(GO_CONFTEST STREQUAL "0")
       set(LLVM_BINDINGS "${LLVM_BINDINGS} go")


cleanup cmake

cleanup cmake

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -73,9 +73,9 @@
                 endif()
                 if(COMPILER_SUPPORTS_SANITIZE_UNDEFINED)
                         set(CMAKE_CXX_FLAGS     "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
-                        if(COMPILER_SUPPORTS_SANITIZE_VPTR)
+                endif()
+                if(COMPILER_SUPPORTS_SANITIZE_VPTR)
                         set(CMAKE_CXX_FLAGS     "${CMAKE_CXX_FLAGS} -fno-sanitize=vptr")
-                        endif()
                 endif()
                 if(COMPILER_SUPPORTS_SANITIZE_LEAK)
                         set(CMAKE_CXX_FLAGS     "${CMAKE_CXX_FLAGS} -fsanitize=leak")


New 64-bit check from #86

New 64-bit check from #86

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

--- cmake/pcl_utils.cmake
+++ cmake/pcl_utils.cmake
@@ -141,11 +141,11 @@
 # Sets LINUX if the operating system is Linux.
 macro(GET_OS_INFO)
     string(REGEX MATCH "Linux" OS_IS_LINUX ${CMAKE_SYSTEM_NAME})
-    if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
+    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
         set(OS_IS_64BIT TRUE)
-    else(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
+    else(CMAKE_SIZEOF_VOID_P EQUAL 8)
         set(OS_IS_64BIT FALSE)
-    endif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
+    endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
 endmacro(GET_OS_INFO)


Add checks for liblttng-ust-dev at build time

--- src/pal/src/configure.cmake
+++ src/pal/src/configure.cmake
@@ -27,6 +27,7 @@
 check_include_files(sys/lwp.h HAVE_SYS_LWP_H)
 check_include_files(libunwind.h HAVE_LIBUNWIND_H)
 check_include_files(runetype.h HAVE_RUNETYPE_H)
+check_include_files(lttng/tracepoint.h HAVE_LTTNG_TRACEPOINT_H)

 check_function_exists(kqueue HAVE_KQUEUE)
 check_function_exists(getpwuid_r HAVE_GETPWUID_R)
@@ -900,6 +901,11 @@
     unset(HAVE_LIBUNWIND_H CACHE)
     message(FATAL_ERROR "Cannot find libunwind. Try installing libunwind8 and libunwind8-dev (or the appropriate packages for your platform)")
   endif()
+  if(NOT HAVE_LTTNG_TRACEPOINT_H)
+    unset(HAVE_LTTNG_TRACEPOINT_H CACHE)
+    message(FATAL_ERROR "Cannot find liblttng-ust-dev. Try installing liblttng-ust-dev  (or the appropriate packages for your platform)")
+  endif()
+
   set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0)
   set(PAL_PTRACE "ptrace((cmd), (pid), (void*)(addr), (data))")
   set(PAL_PT_ATTACH PTRACE_ATTACH)


CMake:Java: update

CMake:Java: update

--- cmake/java.cmake
+++ cmake/java.cmake
@@ -36,7 +36,7 @@
     OUTPUT ${PROTO_JAVA}
     COMMAND protobuf::protoc
     "--proto_path=${PROJECT_SOURCE_DIR}"
-    "--java_out=${PROJECT_BINARY_DIR}/java/com/google/"
+    "--java_out=${PROJECT_BINARY_DIR}/java/com/google/${PROTO_DIR}"
     ${PROTO_FILE}
     DEPENDS ${PROTO_FILE} protobuf::protoc
     COMMENT "Generate Java protocol buffer for ${PROTO_FILE}"
@@ -60,14 +60,18 @@
 endif()
 list(APPEND CMAKE_SWIG_FLAGS ${FLAGS} "-I${PROJECT_SOURCE_DIR}")

-foreach(SUBPROJECT constraint_solver linear_solver sat graph algorithms data)
+# Swig wrap all libraries
+set(OR_TOOLS_JAVA com.google.ortools)
+foreach(SUBPROJECT IN ITEMS algorithms graph linear_solver constraint_solver sat data)
   #add_subdirectory(ortools/${SUBPROJECT}/java)
 endforeach()

+####################
+##  Java package  ##
+####################
 file(GENERATE
   OUTPUT java/pom.xml
   INPUT ortools/java/pom.xml.in)
-

 # Main Target
 add_custom_target(java_package ALL


CI: update to NDK r18b

CI: update to NDK r18b

--- ci-build.cmake
+++ ci-build.cmake
@@ -70,8 +70,8 @@
     set(CMAKE_BUILD_TYPE RelWithDebInfo)
     set(CROSS
         -DANDROID_PLATFORM=android-16
-        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r17
-        -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r17/build/cmake/android.toolchain.cmake
+        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r18b
+        -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r18b/build/cmake/android.toolchain.cmake
         -DANDROID_ARM_NEON=TRUE
         -DANDROID_ABI=arm64-v8a)

@@ -95,10 +95,10 @@
     if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r17)
         message(STATUS "Downloading Android NDK")
         file(DOWNLOAD
-            http://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip
-            ./android-ndk-r17-linux-x86_64.zip)
+            https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip
+            ./android-ndk-r18b-linux-x86_64.zip)
         message(STATUS "Extracting Android NDK")
-        execute_process(COMMAND unzip android-ndk-r17-linux-x86_64.zip OUTPUT_QUIET)
+        execute_process(COMMAND unzip android-ndk-r18b-linux-x86_64.zip OUTPUT_QUIET)
     endif()
 endif()


Make CAF targets visibile to superprojects

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -124,20 +124,20 @@
                  CAF_INCLUDE_DIRS)

 if (CAF_core_FOUND AND NOT TARGET caf::core)
-  add_library(caf::core UNKNOWN IMPORTED)
+  add_library(caf::core UNKNOWN IMPORTED GLOBAL)
   set_target_properties(caf::core PROPERTIES
     IMPORTED_LOCATION "${CAF_LIBRARY_CORE}"
     INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_CORE}")
 endif ()
 if (CAF_io_FOUND AND NOT TARGET caf::io)
-  add_library(caf::io UNKNOWN IMPORTED)
+  add_library(caf::io UNKNOWN IMPORTED GLOBAL)
   set_target_properties(caf::io PROPERTIES
     IMPORTED_LOCATION "${CAF_LIBRARY_IO}"
     INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_IO}"
     INTERFACE_LINK_LIBRARIES "caf::core")
 endif ()
 if (CAF_openssl_FOUND AND NOT TARGET caf::openssl)
-  add_library(caf::openssl UNKNOWN IMPORTED)
+  add_library(caf::openssl UNKNOWN IMPORTED GLOBAL)
   set_target_properties(caf::openssl PROPERTIES
     IMPORTED_LOCATION "${CAF_LIBRARY_OPENSSL}"
     INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_OPENSSL}"
@@ -151,14 +151,14 @@
   endif ()
 endif ()
 if (CAF_opencl_FOUND AND NOT TARGET caf::opencl)
-  add_library(caf::opencl UNKNOWN IMPORTED)
+  add_library(caf::opencl UNKNOWN IMPORTED GLOBAL)
   set_target_properties(caf::opencl PROPERTIES
     IMPORTED_LOCATION "${CAF_LIBRARY_OPENCL}"
     INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_OPENCL}"
     INTERFACE_LINK_LIBRARIES "caf::core")
 endif ()
 if (CAF_test_FOUND AND NOT TARGET caf::test)
-  add_library(caf::test INTERFACE IMPORTED)
+  add_library(caf::test INTERFACE IMPORTED GLOBAL)
   set_target_properties(caf::test PROPERTIES
     INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_TEST}"
     INTERFACE_LINK_LIBRARIES "caf::core")


Add missing include() to FindMyo.cmake

Add missing include() to FindMyo.cmake

--- cmake/FindMyo.cmake
+++ cmake/FindMyo.cmake
@@ -6,4 +6,5 @@
 set(Myo_INCLUDE_DIRS ${Myo_INCLUDE_DIR})
 set(Myo_LIBRARIES ${Myo_LIBRARY})

+include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Myo DEFAULT_MSG Myo_INCLUDE_DIR Myo_LIBRARY)


Fix detection of SIP library

Fix detection of SIP library

The python version was determined only when the FindSIP.py script did not
succeed. This lead to a failure when detecting the sip libraries.

--- cmake/FindSIP.cmake
+++ cmake/FindSIP.cmake
@@ -53,6 +53,12 @@
   # Already in cache, be silent
   SET(SIP_FOUND TRUE)
 ELSE(SIP_VERSION)
+	# determine the version of python we use
+	EXECUTE_PROCESS ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_version; print get_python_version()"
+		OUTPUT_VARIABLE PYTHON_VERSION
+		OUTPUT_STRIP_TRAILING_WHITESPACE
+	)
+
 	IF(USE_FIND_SIP_PY)
 		FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH})

@@ -75,12 +81,6 @@
 ENDIF(SIP_VERSION)

 IF(NOT SIP_VERSION)
-	# determine the version of python we use
-	EXECUTE_PROCESS ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_version; print get_python_version()"
-		OUTPUT_VARIABLE PYTHON_VERSION
-		OUTPUT_STRIP_TRAILING_WHITESPACE
-	)
-
   # (a) Try to find the sip headers:

   # Use the path to the python installation as a hint for finding sip
@@ -142,7 +142,7 @@
 	)

   # Use the path to the python installation as a hint for finding sip
-  GET_FILENAME_COMPONENT(SIP_POSSIBLE_LIB_DIRS "${PYTHON_LIBRARIES}"  ABSOLUTE)
+  GET_FILENAME_COMPONENT(SIP_POSSIBLE_LIB_DIRS "${PYTHON_LIBRARIES}"  PATH)
 	LIST(APPEND SIP_POSSIBLE_LIB_DIRS "/usr/lib/pyshared/python${PYTHON_VERSION}")

 	SET(OLD_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}" CACHE INTERNAL "")


Installation support added (fixes #11).

Installation support added (fixes #11).

--- cmake/Install.cmake
+++ cmake/Install.cmake
@@ -1,4 +1,4 @@

 install(TARGETS ScopeGuard EXPORT ScopeGuard-config DESTINATION include)
+install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/" DESTINATION include)
 install(EXPORT ScopeGuard-config DESTINATION share/scopeguard/cmake)
-


Adding an option and printing it's output merged into one macro.

--- cmake/Options.cmake
+++ cmake/Options.cmake
@@ -6,23 +6,16 @@
 endif()

-macro(_print_option _option _name)
+macro(_print_option _option _name _value _docstring)
+    option(${_option} "${_docstring}" ${${_value}})
     message(STATUS "${_name} : ${${_option}}")
 endmacro()

-option(UNIT_TESTS "Build Unit Tests" ON)
-option(COVERAGE "Enable Coverage" OFF)
-option(BUILD_TOOLS "Build the tools" ON)
-option(BUILD_SCHEMA_TESTS "Build the Schema Tests" OFF)
-option(BUILD_DEMOS "Build the Demos" OFF)
-option(BUILD_SHARED_LIBS "Build Shared Library" OFF)
+_print_option(UNIT_TESTS "Unit Tests" ON "Build Unit Tests")
+_print_option(COVERAGE "Coverage" OFF "Enable Coverage")
+_print_option(BUILD_TOOLS "Build Tools" ON "Build the tools")
+_print_option(BUILD_SCHEMA_TESTS "Build Schema Tests" OFF "Build the Schema Tests")
+_print_option(BUILD_DEMOS "Build Demos" OFF "Build the Demos")
+_print_option(BUILD_SHARED_LIBS "Build shared library" OFF "Build Shared Library")

-
-_print_option(UNIT_TESTS "Unit Tests")
-_print_option(COVERAGE "Coverage")
-_print_option(BUILD_TOOLS "Build Tools")
-_print_option(BUILD_SCHEMA_TESTS "Build Schema Tests")
-_print_option(BUILD_DEMOS "Build Demos")
-_print_option(BUILD_SHARED_LIBS "Build shared library")
-


add reference

add reference

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -22,8 +22,12 @@
 # -------------------------------------------
 # cc_library	 nv_library	  go_library
 # cc_binary  	 nv_binary	  go_binary
-# cc_test	     nv_test	  go_test
+# cc_test        nv_test	  go_test
 # -------------------------------------------
+#
+# cmake_parse_arguments can help us to achieve this goal.
+# https://cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html
+

 # cc_binary parses tensor.cc and figures out that target also depend on tensor.h.
 # cc_binary(tensor


Fiddling around with FindCuda.cmake

Fiddling around with FindCuda.cmake

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@1065 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/cuda/FindCuda.cmake
+++ src/CMake/cuda/FindCuda.cmake
@@ -309,20 +309,13 @@
 	STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}/" "" stripped_file ${file})

     # Add a custom target to generate a cpp file (CUDA 2.0 needs .cc files and CUDA 1.1 needs .c files)
-	if (${CUDA_VERSION} GREATER 1999)
-	    SET(generated_file  "${CMAKE_BINARY_DIR}/src/cuda/${stripped_file}_${cuda_target}_generated.cc")
-	else(${CUDA_VERSION} GREATER 1999)
-	    SET(generated_file  "${CMAKE_BINARY_DIR}/src/cuda/${stripped_file}_${cuda_target}_generated.c")
-	endif(${CUDA_VERSION} GREATER 1999)
+	SET(generated_file  "${CMAKE_BINARY_DIR}/src/cuda/${stripped_file}_${cuda_target}_generated.cpp")

     SET(generated_target "${stripped_file}_target")

     FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/src/cuda)

     SET(source_file ${file})
-
-    # Note that -cuda generates a .c file not a c++ file.
-    SET_SOURCE_FILES_PROPERTIES(${source_file} PROPERTIES CPLUSPLUS ON)

     # MESSAGE("${CUDA_NVCC} ${source_file} ${CUDA_NVCC_FLAGS} ${nvcc_flags} -cuda -o ${generated_file} ${CUDA_NVCC_INCLUDE_ARGS}")


Fixed absolute path in FPGA Makefile

Fixed absolute path in FPGA Makefile

--- tests/fpga/Makefile.cmake
+++ tests/fpga/Makefile.cmake
@@ -147,7 +147,7 @@
 vivado:
 	@echo 'Executing HIPAcc Compiler for Vivado HLS:'
 	$(COMPILER) $(TEST_CASE)/main.cpp $(MYFLAGS) $(COMPILER_INC) -emit-vivado $(HIPACC_OPTS) -o main.cc
-	export CPLUS_INCLUDE_PATH=$(CPLUS_INCLUDE_PATH):/scratch-local/usr/include; \
+	export CPLUS_INCLUDE_PATH=$(CPLUS_INCLUDE_PATH):$(HIPACC_DIR)/include; \
 	  vivado_hls -f script.tcl

 clean:


DOC: Document that ITK_WRAPPING is equivalent to ITK_WRAP_PYTHON

--- Wrapping/WrappingOptions.cmake
+++ Wrapping/WrappingOptions.cmake
@@ -6,7 +6,8 @@
   if(NOT ITK_DYNAMIC_LOADING)
     message(FATAL_ERROR "Wrapping requires ITK_DYNAMIC_LOADING to be ON")
   endif()
-  # ITK_WRAPPING is an internal variable
+  # ITK_WRAPPING is an internal variable that is always the same value as ITK_WRAP_PYTHON
+  # since python is the only valid wrapped language
   set(ITK_WRAPPING ON CACHE INTERNAL "Build external languages support" FORCE)
 else()
   set(ITK_WRAPPING OFF CACHE INTERNAL "Build external languages support" FORCE)


cmake: add missing _FILE_OFFSET_BITS value

--- config.h.cmake
+++ config.h.cmake
@@ -57,7 +57,7 @@
 #cmakedefine USE_SELECT

 /* compiler specific build options */
-#cmakedefine _FILE_OFFSET_BITS
+#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
 #cmakedefine _GNU_SOURCE
 #cmakedefine _ISOC99_SOURCE
 #cmakedefine _LARGE_FILES


remove looking for dll

remove looking for dll

--- cmake/FindMKL.cmake
+++ cmake/FindMKL.cmake
@@ -55,10 +55,6 @@
         PATHS ${MKL_LIB_PATH} ENV LIBRARY_PATH NO_DEFAULT_PATH)
     FIND_LIBRARY(MKL_LINK_LIBRARIES mkl_rt)

-    FIND_LIBRARY(MKL_LINK_LIBRARIES mkl_rt_dll
-        PATHS ${MKL_LIB_PATH} ENV LIB NO_DEFAULT_PATH)
-    FIND_LIBRARY(MKL_LINK_LIBRARIES mkl_rt_dll)
-
     FIND_LIBRARY(MKL_BLAS95_LINK_LIBRARIES mkl_blas95
         PATHS ${MKL_LIB_PATH} ENV LIBRARY_PATH NO_DEFAULT_PATH)
     FIND_LIBRARY(MKL_BLAS95_LINK_LIBRARIES mkl_blas95)


Fix install of TPP

Fix install of TPP

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -51,7 +51,7 @@
  ${PROJECT_SOURCE_DIR}/third-party-programs-Embree.txt
  ${PROJECT_SOURCE_DIR}/third-party-programs-OpenVKL.txt
  ${PROJECT_SOURCE_DIR}/third-party-programs-OIDN.txt
- ${PROJECT_SOURCE_DIR}/third-party-programs-DNNL.txt
+ ${PROJECT_SOURCE_DIR}/third-party-programs-oneDNN.txt
  ${PROJECT_SOURCE_DIR}/CHANGELOG.md
  ${PROJECT_SOURCE_DIR}/README.md
  DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT lib)


removed comments

removed comments

--- CMake/mitkMacroInstallPython.cmake
+++ CMake/mitkMacroInstallPython.cmake
@@ -1,35 +1,5 @@

 macro(MITK_INSTALL_PYTHON _python_libs _python_dirs)
-  #  if(UNIX)
-  #    # install ITK python wrapping
-  #    file(GLOB _libs "${ITK_DIR}/lib/_ITK*" )
-  #    file(GLOB _py_files "${ITK_DIR}/lib/*.py" )
-  #    file(GLOB _py_generators "${ITK_DIR}/Wrapping/Generators/Python/*.py")
-  #
-  #    install(FILES ${_libs} DESTINATION bin/Python/itk)
-  #    install(FILES ${_py_files} DESTINATION bin/bin/Python/itk)
-  #    install(FILES ${_py_generators} DESTINATION bin/Python/itk)
-  #    install(DIRECTORY "${ITK_DIR}/Wrapping/Generators/Python/Configuration"
-  #          DESTINATION bin/Python/itk
-  #          USE_SOURCE_PERMISSIONS
-  #          COMPONENT Runtime)
-  #    install(DIRECTORY "${ITK_DIR}/Wrapping/Generators/Python/itkExtras"
-  #          DESTINATION bin/Python/itk
-  #          USE_SOURCE_PERMISSIONS
-  #          COMPONENT Runtime)
-  #
-  #    foreach(lib ${_libs})
-  #      get_filename_component(_libname "${lib}" NAME)
-  #      list(APPEND _python_libs "Python/itk/${_libname}")
-  #
-  #      if(UNIX AND NOT APPLE)
-  #        install(CODE "file(RPATH_REMOVE
-  #                           FILE \"\${CMAKE_INSTALL_PREFIX}/bin/Python/itk/${_libname}\")")
-  #      endif()
-  #    endforeach()
-  #
-  #    list(APPEND _python_dirs "${ITK_DIR}/lib")
-  #  endif()
   if(UNIX)
     set(PYTHON_LIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
   else(WIN32)


Configure custom TBB builds via TBB_INSTALL_DIR

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -185,15 +185,14 @@
 #       containing the headers.
 find_path(TBB_INCLUDE_DIR
     tbb/task_scheduler_init.h
-    PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
+    HINTS ${TBB_INC_SEARCH_DIR} ENV CPATH
 )
 mark_as_advanced(TBB_INCLUDE_DIR)
-

 #-- Look for libraries
 # GvdB: $ENV{TBB_ARCH_PLATFORM} is set by the build script tbbvars[.bat|.sh|.csh]
 if (NOT $ENV{TBB_ARCH_PLATFORM} STREQUAL "")
-    set (_TBB_LIBRARY_DIR
+    set (_TBB_LIBRARY_DIR
          ${_TBB_INSTALL_DIR}/lib/$ENV{TBB_ARCH_PLATFORM}
          ${_TBB_INSTALL_DIR}/$ENV{TBB_ARCH_PLATFORM}/lib
         )
@@ -213,6 +212,11 @@
 # GvdB: Mac OS X distribution places libraries directly in lib directory.
 list(APPEND _TBB_LIBRARY_DIR ${_TBB_INSTALL_DIR}/lib)

+if(EXISTS ${_TBB_INSTALL_DIR}/build)
+  file(GLOB _TBB_BUILD_DIR_RELEASE ${_TBB_INSTALL_DIR}/build/*_release)
+  file(GLOB _TBB_BUILD_DIR_DEBUG ${_TBB_INSTALL_DIR}/build/*_debug)
+endif()
+
 # Jiri: No reason not to check the default paths. From recent versions,
 #       tbbvars has started exporting the LIBRARY_PATH and LD_LIBRARY_PATH
 #       variables, which now point to the directories of the lib files.
@@ -222,10 +226,8 @@
 #       and LD_LIBRARY_PATH environment variables is now even more important
 #       that tbbvars doesn't export TBB_ARCH_PLATFORM and it facilitates
 #       the use of TBB built from sources.
-find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}
-        PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
+find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_BUILD_DIR_RELEASE} ${_TBB_LIBRARY_DIR})
+find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_BUILD_DIR_RELEASE} ${_TBB_LIBRARY_DIR})

 #Extract path from TBB_LIBRARY name
 get_filename_component(TBB_LIBRARY_DIR ${TBB_LIBRARY} PATH)
@@ -236,9 +238,9 @@

 #-- Look for debug libraries
 # Jiri: Changed the same way as for the release libraries.
-find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
+find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_BUILD_DIR_DEBUG} ${_TBB_LIBRARY_DIR}
         PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}
+find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_BUILD_DIR_DEBUG} ${_TBB_LIBRARY_DIR}
         PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)

 # Jiri: Self-built TBB stores the debug libraries in a separate directory.


use update submodule

use update submodule

--- cmake/Findlcc.cmake
+++ cmake/Findlcc.cmake
@@ -65,12 +65,12 @@
 		    option(GIT_SUBMODULE "Check submodules during build" ON)
 		    if(GIT_SUBMODULE)
 		        message(STATUS "Submodule update")
-#		        execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
-#		                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-#		                        RESULT_VARIABLE GIT_SUBMOD_RESULT)
-#		        if(NOT GIT_SUBMOD_RESULT EQUAL "0")
-#		            set(failure_messge  "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
-#		        endif()
+		        execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
+		                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+		                        RESULT_VARIABLE GIT_SUBMOD_RESULT)
+		        if(NOT GIT_SUBMOD_RESULT EQUAL "0")
+		            set(failure_messge  "git submodule update --init failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
+		        endif()
 		    endif()
 		endif()
 		if(NOT EXISTS "${PROJECT_SOURCE_DIR}/extern/license-generator/CMakeLists.txt")


Missed closing bracket in travis script

Missed closing bracket in travis script

--- Testing/script/travis_script.cmake
+++ Testing/script/travis_script.cmake
@@ -82,7 +82,7 @@
   endif()
   if(${MERCURY_MEMORYCHECK_TYPE} MATCHES "ThreadSanitizer")
     set(MERCURY_MEMCHECK_FLAGS "-O1 -fsanitize=thread -fno-omit-frame-pointer")
-  endif
+  endif()

   # needed by mercury_common.cmake
   set(dashboard_do_memcheck TRUE)