[CMake] Replace the sanitizer support in runtimes build with multilib

This is a more generic solution; while the sanitizer support can be used
only for sanitizer instrumented builds, the multilib support can be used
to build other variants such as noexcept which is what we would like to use
in Fuchsia.

The name CMake target name uses the target name, same as for the regular
runtimes build and the name of the multilib, concatenated with '+'. The
libraries are installed in a subdirectory named after the multilib.

Differential Revision: https://reviews.llvm.org/D60926

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@358935 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -142,12 +142,22 @@
     set(RUNTIMES_${target}-fuchsia_LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY OFF CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_ABI_VERSION 2 CACHE STRING "")

+    set(RUNTIMES_${target}-fuchsia+asan_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia+asan_LLVM_USE_SANITIZER "Address" CACHE STRING "")
+    set(RUNTIMES_${target}-fuchsia+asan_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia+asan_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
+
+    set(RUNTIMES_${target}-fuchsia+noexcept_LLVM_BUILD_COMPILER_RT OFF CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia+noexcept_LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia+noexcept_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
+
     # Use .build-id link.
     list(APPEND RUNTIME_BUILD_ID_LINK "${target}-fuchsia")
   endforeach()

-  set(LLVM_RUNTIME_SANITIZERS "Address" CACHE STRING "")
-  set(LLVM_RUNTIME_SANITIZER_Address_TARGETS "x86_64-fuchsia;aarch64-fuchsia" CACHE STRING "")
+  set(LLVM_RUNTIME_MULTILIBS "asan;noexcept" CACHE STRING "")
+  set(LLVM_RUNTIME_MULTILIB_asan_TARGETS "x86_64-fuchsia;aarch64-fuchsia" CACHE STRING "")
+  set(LLVM_RUNTIME_MULTILIB_noexcept_TARGETS "x86_64-fuchsia;aarch64-fuchsia" CACHE STRING "")
 endif()

 set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "")


odb-compiler documentaiton for profile

odb-compiler documentaiton for profile

--- cmake/find/Findodb-compiler.cmake
+++ cmake/find/Findodb-compiler.cmake
@@ -51,6 +51,8 @@
 #         prefix
 #       STANDARD                  # --std
 #         c++11
+#       PROFILE                   # --profile
+#         boost
 #       SLOC_LIMIT                # --sloc-limit
 #         99999
 #       ODB_PROLOGUE              # --odb-prologue


[modules] Remove -Rmodule-build because it breaks roottest.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -136,7 +136,7 @@
                              CXX_SUPPORTS_MODULES)
   set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
   if(CXX_SUPPORTS_MODULES)
-    set(ROOT_CXXMODULES_COMMONFLAGS "-fmodules -fmodules-cache-path=${CMAKE_BINARY_DIR}/include/pcms/ -fno-autolink -fdiagnostics-show-note-include-stack -Rmodule-build")
+    set(ROOT_CXXMODULES_COMMONFLAGS "-fmodules -fmodules-cache-path=${CMAKE_BINARY_DIR}/include/pcms/ -fno-autolink -fdiagnostics-show-note-include-stack")
     if (APPLE)
       # FIXME: TGLIncludes and alike depend on glew.h doing special preprocessor
       # trickery to override the contents of system's OpenGL.


[cmake] Simplify header search for ROOT_GENERATE_DICTIONARY:

Enforce that headers *are* found, also by CMake, to ensure proper dependencies.
Add a backdoor for "you will not find the header": list those as GENHEADERS.
Add documentation, esp that headers should be passed to ROOT_GENERATE_DICTIONARY *as included*.
Use the directory (future: lib target) property for include directories.
Use these properties to pull in inc/ and v7/inc within ROOT_STANDARD_LIBRARY_PACKAGE, instead of hard-coded searches in ROOT_GENERATE_DICTIONARY.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -190,12 +190,20 @@
 endmacro()

 #---------------------------------------------------------------------------------------------------
-#---ROOT_GENERATE_DICTIONARY( dictionary headerfiles MODULE module DEPENDENCIES dep1 dep2
+#---ROOT_GENERATE_DICTIONARY( dictionary headerfiles NODEPHEADERS ghdr1 ghdr2 ...
+#                                                    MODULE module DEPENDENCIES dep1 dep2
 #                                                    BUILTINS dep1 dep2
 #                                                    STAGE1 LINKDEF linkdef OPTIONS opt1 opt2 ...)
+#
+# <dictionary> is the dictionary stem; the macro creates (among other files) the dictionary source as
+#   <dictionary>.cxx
+# <headerfiles> are "as included"; set appropriate INCLUDE_DIRECTORIES property on the directory.
+#   The dictionary target depends on these headers. These files must exist.
+# <NODEPHEADERS> same as <headerfiles>. If these files are not found (given the target include path)
+#   no error is emitted. The dictionary does not depend on these headers.
 #---------------------------------------------------------------------------------------------------
 function(ROOT_GENERATE_DICTIONARY dictionary)
-  CMAKE_PARSE_ARGUMENTS(ARG "STAGE1;MULTIDICT;NOINSTALL" "MODULE" "LINKDEF;OPTIONS;DEPENDENCIES;BUILTINS" ${ARGN})
+  CMAKE_PARSE_ARGUMENTS(ARG "STAGE1;MULTIDICT;NOINSTALL" "MODULE;LINKDEF" "NODEPHEADERS;OPTIONS;DEPENDENCIES;BUILTINS" ${ARGN})

   # Check if OPTIONS start with a dash.
   if (ARG_OPTIONS)
@@ -214,69 +222,47 @@

   #---Get the list of include directories------------------
   get_directory_property(incdirs INCLUDE_DIRECTORIES)
-  if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/inc)
-    set(localinclude ${CMAKE_CURRENT_SOURCE_DIR}/inc)
-  else()
-    set(localinclude ${CMAKE_CURRENT_SOURCE_DIR})
-  endif()
+  # rootcling invoked on foo.h should find foo.h in the current source dir,
+  # no matter what.
+  list(APPEND incdirs ${CMAKE_CURRENT_SOURCE_DIR})
+
   #---Get the list of header files-------------------------
+  # CMake needs dependencies from ${CMAKE_CURRENT_SOURCE_DIR} while rootcling wants
+  # header files "as included" (and thus as passed as argument to this CMake function).
   set(headerfiles)
   set(_list_of_header_dependencies)
   foreach(fp ${ARG_UNPARSED_ARGUMENTS})
     if(${fp} MATCHES "[*?]") # Is this header a globbing expression?
-      file(GLOB files inc/${fp} ${fp})
+      file(GLOB files inc/${fp} ${fp}) # Elements of ${fp} have the complete path.
       foreach(f ${files})
         if(NOT f MATCHES LinkDef) # skip LinkDefs from globbing result
-          list(APPEND headerfiles ${f})
+          set(add_inc_as_include On)
+          string(REGEX REPLACE "^${CMAKE_CURRENT_SOURCE_DIR}/inc/" "" f_no_inc ${f})
+          list(APPEND headerfiles ${f_no_inc})
           list(APPEND _list_of_header_dependencies ${f})
         endif()
       endforeach()
     elseif(IS_ABSOLUTE ${fp})
+      string(REGEX REPLACE "^${CMAKE_CURRENT_SOURCE_DIR}/" "" fp_no_csd ${fp})
+      list(APPEND headerfiles ${fp_no_csd})
+      list(APPEND _list_of_header_dependencies ${fp})
+    else()
+      find_file(headerFile ${fp} HINTS ${incdirs} NO_DEFAULT_PATH NO_SYSTEM_ENVIRONMENT_PATH)
+      if(NOT headerFile)
+        message(FATAL_ERROR "Cannot find header ${fp} to generate dictionary ${dictionary} for. Did you forget to set the INCLUDE_DIRECTORIES property for the current directory?")
+      endif()
       list(APPEND headerfiles ${fp})
-      list(APPEND _list_of_header_dependencies ${fp})
-    elseif(CMAKE_PROJECT_NAME STREQUAL ROOT AND
-           EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/inc/${fp})
-      list(APPEND headerfiles ${CMAKE_CURRENT_SOURCE_DIR}/inc/${fp})
-      list(APPEND _list_of_header_dependencies ${CMAKE_CURRENT_SOURCE_DIR}/inc/${fp})
-    elseif(CMAKE_PROJECT_NAME STREQUAL ROOT AND
-           EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc/${fp})
-      list(APPEND headerfiles ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc/${fp})
-      list(APPEND _list_of_header_dependencies ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc/${fp})
-    elseif(CMAKE_PROJECT_NAME STREQUAL ROOT AND
-           EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${fp})
-      list(APPEND headerfiles ${CMAKE_CURRENT_SOURCE_DIR}/${fp})
-      list(APPEND _list_of_header_dependencies ${CMAKE_CURRENT_SOURCE_DIR}/${fp})
-    elseif(NOT CMAKE_PROJECT_NAME STREQUAL ROOT)
-      find_file(headerFile ${fp} HINTS ${localinclude} ${incdirs} NO_DEFAULT_PATH)
-      find_file(headerFile ${fp} NO_SYSTEM_ENVIRONMENT_PATH)
-      if(headerFile)
-        list(APPEND headerfiles ${headerFile})
-        list(APPEND _list_of_header_dependencies ${headerFile})
-      else()
-        list(APPEND headerfiles ${fp})
-      endif()
-      unset(headerFile CACHE)
-    else()
-      list(APPEND headerfiles ${fp})
-    endif()
-  endforeach()
-  string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/inc/" ""  headerfiles "${headerfiles}")
-  string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/v7/inc/" ""  headerfiles "${headerfiles}")
-
-  # Check that each path here is relative so that it no longer points to the build folder.
-  # If we don't do this, then for example the modulemap might contain absolute paths to the
-  # build folder which would break module compilation.
-  if(PROJECT_NAME STREQUAL ROOT)
-    foreach(hf ${headerfiles})
-      string(REPLACE "${PROJECT_SOURCE_DIR}" "" hfrel "${hf}")
-      # Test folders don't follow this pattern and need absolute paths,
-      # so we don't run our sanity check on them.
-      if(NOT "${hfrel}" MATCHES "/test/")
-        if(IS_ABSOLUTE "${hf}")
-          message(SEND_ERROR "Header path '${hf}' ${hfrel} is not relative!")
-        endif()
-      endif()
-    endforeach()
+      list(APPEND _list_of_header_dependencies ${headerFile})
+    endif()
+  endforeach()
+
+  foreach(fp ${ARG_NODEPHEADERS})
+    list(APPEND headerfiles ${fp})
+    # no dependency - think "vector" etc.
+  endforeach()
+
+  if(NOT (headerfiles OR ARG_LINKDEF))
+    message(FATAL_ERROR "No headers nor LinkDef.h supplied / found for dictionary ${dictionary}!")
   endif()

   if(CMAKE_PROJECT_NAME STREQUAL ROOT)
@@ -409,6 +395,7 @@
   endforeach()

   #---build the implicit dependencies arguments
+  # NOTE: only the Makefile generator respects this!
   foreach(_dep ${_linkdef} ${_list_of_header_dependencies})
     list(APPEND _implicitdeps CXX ${_dep})
   endforeach()
@@ -427,6 +414,7 @@

   #---roottest compability
   add_custom_target(${dictname} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
+
   if(NOT ARG_NOINSTALL AND NOT CMAKE_ROOTTEST_DICT AND DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
     set_property(GLOBAL APPEND PROPERTY ROOT_DICTIONARY_TARGETS ${dictname})
     set_property(GLOBAL APPEND PROPERTY ROOT_DICTIONARY_FILES ${CMAKE_CURRENT_BINARY_DIR}/${dictionary}.cxx)
@@ -891,6 +879,7 @@
 #                                 [NO_INSTALL_HEADERS]         : don't install headers for this package
 #                                 [STAGE1]                     : use rootcling_stage1 for generating
 #                                 HEADERS header1 header2      : if not specified, globbing for *.h is used)
+#                                 NODEPHEADERS header1 header2 : like HEADERS, but no dependency is generated
 #                                 [NO_HEADERS]                 : don't glob to fill HEADERS variable
 #                                 SOURCES source1 source2      : if not specified, globbing for *.cxx is used)
 #                                 [NO_SOURCES]                 : don't glob to fill SOURCES variable
@@ -908,15 +897,15 @@
 function(ROOT_STANDARD_LIBRARY_PACKAGE libname)
   set(options NO_INSTALL_HEADERS STAGE1 NO_HEADERS NO_SOURCES OBJECT_LIBRARY NO_MODULE)
   set(oneValueArgs)
-  set(multiValueArgs DEPENDENCIES HEADERS SOURCES BUILTINS LIBRARIES DICTIONARY_OPTIONS LINKDEF INSTALL_OPTIONS)
+  set(multiValueArgs DEPENDENCIES HEADERS NODEPHEADERS SOURCES BUILTINS LIBRARIES DICTIONARY_OPTIONS LINKDEF INSTALL_OPTIONS)
   CMAKE_PARSE_ARGUMENTS(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

   # Check if we have any unparsed arguments
   if(ARG_UNPARSED_ARGUMENTS)
     message(AUTHOR_WARNING "Unparsed arguments for ROOT_STANDARD_LIBRARY_PACKAGE: ${ARG_UNPARSED_ARGUMENTS}")
   endif()
-  # Check that the user doesn't parse NO_HEADERS to disable globbing and HEADERS at the same time.
-  if (ARG_HEADERS AND ARG_NO_HEADERS)
+  # Check that the user doesn't pass NO_HEADERS (to disable globbing) and HEADERS at the same time.
+  if ((ARG_HEADERS OR ARG_NODEPHEADERS) AND ARG_NO_HEADERS)
     message(AUTHOR_WARNING "HEADERS and NO_HEADERS arguments are mutually exclusive.")
   endif()
   if (ARG_SOURCES AND ARG_NO_SOURCES)
@@ -925,7 +914,7 @@

   # Set default values
   # If HEADERS/SOURCES are not parsed, we glob for those files.
-  if (NOT ARG_HEADERS AND NOT ARG_NO_HEADERS)
+  if (NOT (ARG_HEADERS OR ARG_NO_HEADERS OR ARG_NODEPHEADERS))
     set(ARG_HEADERS "*.h")
   endif()
   if (NOT ARG_SOURCES AND NOT ARG_NO_SOURCES)
@@ -951,10 +940,18 @@
     set(ROOT_LIBRARY_TARGETS "${ROOT_LIBRARY_TARGETS};${libname}" CACHE STRING "List of ROOT targets generated from ROOT_STANDARD_LIBRARY_PACKAGE()" FORCE)
   endif()

+  if (PROJECT_NAME STREQUAL ROOT)
+    include_directories(BEFORE "inc")
+    if(IS_DIRECTORY "v7/inc")
+      include_directories(BEFORE "v7/inc")
+    endif()
+  endif()
+
   ROOT_GENERATE_DICTIONARY(G__${libname} ${ARG_HEADERS}
                           ${MODULE_GEN_ARG}
                           ${STAGE1_FLAG}
                           LINKDEF ${ARG_LINKDEF}
+                          NODEPHEADERS ${ARG_NODEPHEADERS}
                           OPTIONS ${ARG_DICTIONARY_OPTIONS}
                           DEPENDENCIES ${ARG_DEPENDENCIES}
                           BUILTINS ${ARG_BUILTINS}
@@ -974,6 +971,11 @@
                         BUILTINS ${ARG_BUILTINS}
                        )
   endif(ARG_OBJECT_LIBRARY)
+
+  # Dictionary might include things from the current src dir, e.g. tests. Alas
+  # there is no way to set the include directory for a source file (except for
+  # the generic COMPILE_FLAGS), so this needs to be glued to the target.
+  target_include_directories(${libname} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

   # Install headers if we have any headers and if the user didn't explicitly
   # disabled this.


+ Add macro to test and get OCC version

+ Add macro to test and get OCC version

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -1,3 +1,5 @@
+include (CheckCXXSourceRuns)
+
 # ================================================================================
 # == Macros, mostly for special targets ==========================================

@@ -251,3 +253,61 @@
         set_target_properties(${ProjectName} PROPERTIES SUFFIX ".pyd")
     endif(WIN32)
 ENDMACRO(SET_PYTHON_PREFIX_SUFFIX)
+
+MACRO(CHECK_MINIMUM_OCC_VERSION_HEX MinVersionHex)
+    set(CMAKE_REQUIRED_INCLUDES ${OCC_INCLUDE_DIR})
+    unset(OCC_MIN_VERSION CACHE)
+    set(OCC_CHECK_VERSION 0x060600)
+    CHECK_CXX_SOURCE_RUNS("
+        #include <Standard_Version.hxx>
+        int main ()
+        {
+            return OCC_VERSION_HEX >= ${MinVersionHex} ? 0 : -1;
+        }
+        "
+        OCC_MIN_VERSION)
+ENDMACRO(CHECK_MINIMUM_OCC_VERSION_HEX)
+
+MACRO(GET_OCC_VERSION_HEX)
+    # clear them to run the tests for each configure step
+    unset(OCC_MAJOR CACHE)
+    unset(OCC_MAJOR_COMPILED CACHE)
+    unset(OCC_MAJOR_EXITCODE CACHE)
+    unset(OCC_MINOR CACHE)
+    unset(OCC_MINOR_COMPILED CACHE)
+    unset(OCC_MINOR_EXITCODE CACHE)
+    unset(OCC_MICRO CACHE)
+    unset(OCC_MICRO_COMPILED CACHE)
+    unset(OCC_MICRO_EXITCODE CACHE)
+
+    set(CMAKE_REQUIRED_INCLUDES ${OCC_INCLUDE_DIR})
+    CHECK_CXX_SOURCE_RUNS("
+        #include <Standard_Version.hxx>
+        int main ()
+        {
+            return OCC_VERSION_MAJOR;
+        }
+        "
+        OCC_MAJOR)
+    CHECK_CXX_SOURCE_RUNS("
+        #include <Standard_Version.hxx>
+        int main ()
+        {
+            return OCC_VERSION_MINOR;
+        }
+        "
+        OCC_MINOR)
+    CHECK_CXX_SOURCE_RUNS("
+        #include <Standard_Version.hxx>
+        int main ()
+        {
+            return OCC_VERSION_MAINTENANCE;
+        }
+        "
+        OCC_MICRO)
+
+    unset(OCC_VERSION_HEX CACHE)
+    if (OCC_MAJOR_COMPILED AND OCC_MINOR_COMPILED AND OCC_MICRO_COMPILED)
+        set (OCC_VERSION_HEX "0x0${OCC_MAJOR_EXITCODE}0${OCC_MINOR_EXITCODE}0${OCC_MICRO_EXITCODE}")
+    endif()
+ENDMACRO(GET_OCC_VERSION_HEX)


Make debug builds on Unix use -g3 not -g, which enables cpp macro debugging

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -416,6 +416,8 @@
 	  set( CMAKE_BUILD_TYPE Debug )
 	else()
       add_definitions(-D_FORTIFY_SOURCE=2)
+	  set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g3 -DNDEBUG")
+	  set (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g3 -DNDEBUG")
 	  set( CMAKE_BUILD_TYPE RelWithDebInfo ) # = -O2 -g (package may strip the info)
 	endif()


CMake: fix path due to move of cmake folder

--- build/cmake/ConfigureChecks.cmake
+++ build/cmake/ConfigureChecks.cmake
@@ -70,6 +70,6 @@
 set(VERSION ${thrift_VERSION})

 # generate a config.h file
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/thrift/config.h")
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/thrift/config.h")
 # HACK: Some files include thrift/config.h and some config.h so we include both. This should be cleaned up.
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/thrift" "${CMAKE_CURRENT_BINARY_DIR}")


fpta-cmake: alter MSVC options (require MS Visual Studio >= 2015).

--- cmake.fpta/compiler.cmake
+++ cmake.fpta/compiler.cmake
@@ -395,21 +395,15 @@
   endif()

   if(MSVC)
-    if(NOT MSVC_VERSION LESS 1900)
-      add_compile_flags("C;CXX" "/utf-8")
-    endif()
-    if(MSVC_VERSION EQUAL 1910)
-      # LY: avoid /Wall for Visual Studio 2017, otherwise due a bug we could lost the control
-      #     and get a lot of junk warnings from compiler's and SDK headers.
-      add_compile_flags("C;CXX" "/W4")
-    else()
-      add_compile_flags("C;CXX" "/Wall")
-    endif()
-  elseif(CC_HAS_WALL)
-    add_compile_flags("C;CXX" "-Wall")
-  endif()
-  if(CC_HAS_WEXTRA)
-    add_compile_flags("C;CXX" "-Wextra")
+    add_compile_flags("C;CXX" "/W4")
+    add_compile_flags("C;CXX" "/utf-8")
+  else()
+    if(CC_HAS_WALL)
+      add_compile_flags("C;CXX" "-Wall")
+    endif()
+    if(CC_HAS_WEXTRA)
+      add_compile_flags("C;CXX" "-Wextra")
+    endif()
   endif()

   if(CMAKE_COMPILER_IS_GNUCXX
@@ -427,10 +421,8 @@
   # Release builds should not cause extra trouble.
   if(CC_HAS_WERROR AND (CI OR CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE STREQUAL "Debug"))
     if(MSVC)
-      if(NOT MSVC_VERSION LESS 1910)
-        add_compile_flags("C;CXX" "/WX")
-      endif()
-    elseif(HAVE_STD_C11 AND HAVE_STD_CXX11)
+      add_compile_flags("C;CXX" "/WX")
+    else()
       add_compile_flags("C;CXX" "-Werror")
     endif()
   endif()


check if DataMan and Table compile with PGI

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -166,8 +166,7 @@
 endif()

 # DataMan
-# DataMan currently breaks the PGI compiler
-if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") AND NOT MSVC)
+if(NOT MSVC)
     if(ZeroMQ_FOUND)
         if(ADIOS2_USE_DataMan STREQUAL AUTO)
             set(ADIOS2_HAVE_DataMan TRUE)
@@ -178,7 +177,6 @@
 endif()

 # SSC
-# SSC currently breaks the PGI compiler
 if(NOT MSVC)
     if(ADIOS2_HAVE_MPI)
         if(ADIOS2_USE_SSC STREQUAL AUTO)
@@ -190,7 +188,7 @@
 endif()

 # Table
-if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") AND NOT MSVC)
+if(NOT MSVC)
     if(ZeroMQ_FOUND)
         if(ADIOS2_USE_Table STREQUAL AUTO)
             set(ADIOS2_HAVE_Table TRUE)


Attempt to fix quotes problem in cuda compiler options

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -14,7 +14,7 @@
   if (CMAKE_COMPILER_IS_GNUCC)
     set (CUDA_PROPAGATE_HOST_FLAGS OFF)
     if (CMAKE_C_FLAGS)
-      set (CUDA_NVCC_FLAGS "--compiler-options \"${CMAKE_C_FLAGS}\"")
+        set (CUDA_NVCC_FLAGS --compiler-options "${CMAKE_C_FLAGS}")
     endif ()
   endif ()


cmake: fix incorrect detection of protobuf-c library

--- cmake/FindProtobufC.cmake
+++ cmake/FindProtobufC.cmake
@@ -83,7 +83,7 @@
 endfunction()

 find_library(PROTOBUFC_LIBRARY
-							NAMES "libprotobuf-c.so"
+							NAMES "protobuf-c"
 							PATHS "/usr" "/usr/local" "/opt" ENV PROTOBUFC_ROOTDIR
 							PATH_SUFFIXES "lib")
 mark_as_advanced(PROTOBUFC_LIBRARY)


Added option to disable fastlink in cmake for halley projects

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -1,4 +1,6 @@
 cmake_minimum_required (VERSION 3.16)
+
+SET(FASTLINK true CACHE BOOL "Enables /DEBUG:FASTLINK else /DEBUG:FULL")

 function(string_starts_with str prefix var)
   string(LENGTH "${str}" str_length)
@@ -69,7 +71,11 @@
 		set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF")
 		set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")

-		set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG:FASTLINK")
+		if (FASTLINK)
+			set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG:FASTLINK")
+		else()
+			set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG:FULL")
+		endif()
 	endif()
 	set(CMAKE_CXX_STANDARD 17)


Updated XLink with some race fixes and other improvements

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4.2-develop"
-    URL "https://github.com/luxonis/XLink/archive/6210f8da430b8dec0257cda93110c57657ce2d15.tar.gz"
-    SHA1 "58885ff0609ed5291039e512361bf7161b69910e"
+    URL "https://github.com/luxonis/XLink/archive/51c2a44573bf52ccdd8cc5121d67a62b1dbd331d.tar.gz"
+    SHA1 "896b5ee6f50a97455c7b73c8974c4911a976562f"
 )

 hunter_config(


version for master branch release

version for master branch release

--- cmake/build-version.cmake
+++ cmake/build-version.cmake
@@ -19,7 +19,7 @@
   endif( )
   if( POLICY CMP0048 )
     cmake_policy( SET CMP0048 NEW )
-    project( ${PV_NAME} VERSION 0.5.2.0 LANGUAGES ${PV_LANGUAGES} )
+    project( ${PV_NAME} VERSION 0.4.3.0 LANGUAGES ${PV_LANGUAGES} )

   else( )
     project( ${PV_NAME} ${PV_LANGUAGES} )
@@ -29,11 +29,11 @@
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_MINOR )
-      set( ${PV_NAME}_VERSION_MINOR 5 )
+      set( ${PV_NAME}_VERSION_MINOR 4 )
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_PATCH )
-      set( ${PV_NAME}_VERSION_PATCH 2 )
+      set( ${PV_NAME}_VERSION_PATCH 3 )
     endif( )

     if( NOT DEFINED ${PV_NAME}_VERSION_TWEAK )


fix inference_lib.cmake (#40765)

fix inference_lib.cmake (#40765)

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -259,6 +259,12 @@
         SRCS  ${PADDLE_SOURCE_DIR}/paddle/utils/any.h
         DSTS  ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/utils/)
 copy(inference_lib_dist
+        SRCS  ${PADDLE_SOURCE_DIR}/paddle/utils/optional.h
+        DSTS  ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/utils/)
+        copy(inference_lib_dist
+        SRCS  ${PADDLE_SOURCE_DIR}/paddle/utils/none.h
+        DSTS  ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/utils/)
+copy(inference_lib_dist
         SRCS  ${PADDLE_SOURCE_DIR}/paddle/extension.h
         DSTS  ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/include/experimental/)


Remove extraneous .h files from AddPBJTarget so pbj isn't run over all the protocol files on each build.

--- build/modules/AddPBJTarget.cmake
+++ build/modules/AddPBJTarget.cmake
@@ -106,7 +106,6 @@
     SET(PBJ_PROTO_FILES ${PBJ_PROTO_FILES} ${PBJ_PROTO_FILE})
     SET(PBJ_PBJ_FILES ${PBJ_PBJ_FILES} ${PBJ_PBJ_FILE})
     SET(PBJ_PBJHPP_FILE ${PBJ_OUTPUTDIR}/${PBJ_PLUGINNAME_UNDERSCORE}${PBJ_PBJ_ONLY_FILE}.pbj.hpp)
-    SET(PBJ_PBJH_FILE ${PBJ_OUTPUTDIR}/${PBJ_PLUGINNAME_UNDERSCORE}${PBJ_PBJ_ONLY_FILE}.pbj.h)
     SET(PBJ_PBJN_FILE ${PBJ_OUTPUTDIR}/${PBJ_PLUGINNAME_UNDERSCORE}${PBJ_PBJ_ONLY_FILE}.pbj.cpp)
     SET(PBJ_PBJFPP_FILE ${PBJ_OUTPUTDIR}/${PBJ_PLUGINNAME_UNDERSCORE}${PBJ_PBJ_ONLY_FILE}.pbj.fwd.hpp)

@@ -119,10 +118,9 @@
       SET(PBJ_CPP_FILES ${PBJ_CPP_FILES} ${PBJ_CPP_FILE})
       SET(PBJ_H_FILES ${PBJ_H_FILES} ${PBJ_H_FILE})
       SET(PBJ_PBJHPP_FILES ${PBJ_PBJHPP_FILES} ${PBJ_PBJHPP_FILE})
-      SET(PBJ_PBJH_FILES ${PBJ_PBJH_FILES} ${PBJ_PBJH_FILE})
       SET(PBJ_PBJN_FILES ${PBJ_PBJN_FILES} ${PBJ_PBJN_FILE})
       SET(PBJ_PBJFPP_FILES ${PBJ_PBJFPP_FILES} ${PBJ_PBJFPP_FILE})
-      SET(PBJ_OUTPUTS ${PBJ_H_FILE} ${PBJ_CPP_FILE} ${PBJ_PBJHPP_FILE} ${PBJ_PBJH_FILE} ${PBJ_PBJN_FILE} ${PBJ_PBJFPP_FILE})
+      SET(PBJ_OUTPUTS ${PBJ_H_FILE} ${PBJ_CPP_FILE} ${PBJ_PBJHPP_FILE} ${PBJ_PBJN_FILE} ${PBJ_PBJFPP_FILE})
       SET(PBJ_ALL_OUTPUTS ${PBJ_ALL_OUTPUTS} ${PBJ_OUTPUTS})
       ADD_CUSTOM_COMMAND(OUTPUT ${PBJ_H_FILE} ${PBJ_CPP_FILE} ${PBJ_PBJN_FILE} ${PBJ_PBJFPP_FILE}
                          COMMAND ${PROTOCOLBUFFERS_COMPILER} -I${PBJ_OUTPUTDIR} ${PBJ_OPTIONS} ${PBJ_PROTO_FILE}
@@ -181,18 +179,18 @@
        SET(CS_COMMAND  --cs=${PBJ_PBJCS_FILE})
     ENDIF()
     SET(INTERNAL_GENERATED_CPP_FILES ${INTERNAL_GENERATED_CPP_FILES} ${PBJ_CPP_FILE} ${PBJ_PBJN_FILE})
-
+
     IF(PBJ_EXPORTMACRO)
-      ADD_CUSTOM_COMMAND(OUTPUT ${PBJ_PBJH_FILE} ${PBJ_PBJHPP_FILE} ${PBJ_PROTO_FILE} ${PBJ_PBJCS_FILE} ${PBJ_PBJFPP_FILE}
+      ADD_CUSTOM_COMMAND(OUTPUT ${PBJ_PBJHPP_FILE} ${PBJ_PROTO_FILE} ${PBJ_PBJCS_FILE} ${PBJ_PBJFPP_FILE}
                        COMMAND ${PBJ_RUNABLE} ${PBJ_PBJ_FILE} ${PBJ_PROTO_FILE}  --hpp=${PBJ_PBJHPP_FILE} --cpp=${PBJ_PBJN_FILE} --fpp=${PBJ_PBJFPP_FILE} --export_macro=${PBJ_EXPORTMACRO} ${CS_COMMAND} ${PBJ_NAMESPACE} ${PBJ_PREFIX}
                        DEPENDS ${PBJ_PBJ_FILE} ${PBJ_DEPENDS} ${PBJ_BINARY}
-                       COMMENT "Building ${PBJ_PBJ_FILE} -> ${PBJ_PBJHPP_FILE} ${PBJ_PROTO_FILE} ${PBJ_PBJCS_FILE} ${PBJ_PBJH_FILE} ${PBJ_PBJN_FILE} ${PBJ_PBJFPP_FILE}")
+                       COMMENT "Building ${PBJ_PBJ_FILE} -> ${PBJ_PBJHPP_FILE} ${PBJ_PROTO_FILE} ${PBJ_PBJCS_FILE} ${PBJ_PBJN_FILE} ${PBJ_PBJFPP_FILE}")
     ELSE()
-      ADD_CUSTOM_COMMAND(OUTPUT ${PBJ_PBJH_FILE} ${PBJ_PBJHPP_FILE} ${PBJ_PROTO_FILE} ${PBJ_PBJCS_FILE} ${PBJ_PBJFPP_FILE}
+      ADD_CUSTOM_COMMAND(OUTPUT ${PBJ_PBJHPP_FILE} ${PBJ_PROTO_FILE} ${PBJ_PBJCS_FILE} ${PBJ_PBJFPP_FILE}
                        COMMAND ${PBJ_RUNABLE} ${PBJ_PBJ_FILE} ${PBJ_PROTO_FILE}  --hpp=${PBJ_PBJHPP_FILE} --cpp=${PBJ_PBJN_FILE} --fpp=${PBJ_PBJFPP_FILE}  ${CS_COMMAND} ${PBJ_NAMESPACE} ${PBJ_PREFIX}
                        DEPENDS ${PBJ_PBJ_FILE} ${PBJ_DEPENDS} ${PBJ_BINARY}
-                       COMMENT "Building ${PBJ_PBJ_FILE} -> ${PBJ_PBJHPP_FILE} ${PBJ_PROTO_FILE} ${PBJ_PBJCS_FILE} ${PBJ_PBJH_FILE} ${PBJ_PBJN_FILE} ${PBJ_PBJFPP_FILE}")
-
+                       COMMENT "Building ${PBJ_PBJ_FILE} -> ${PBJ_PBJHPP_FILE} ${PBJ_PROTO_FILE} ${PBJ_PBJCS_FILE} ${PBJ_PBJN_FILE} ${PBJ_PBJFPP_FILE}")
+
     ENDIF()

   ENDFOREACH()


AddCompilerRT.cmake: Try to unbreak since r173617.

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -113,7 +113,7 @@
 #                      LINK_FLAGS <link flags>)
 macro(add_compiler_rt_test test_suite test_name)
   parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN})
-  get_unittest_directory(OUTPUT_DIR)
+  set(OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
   file(MAKE_DIRECTORY ${OUTPUT_DIR})
   set(output_bin "${OUTPUT_DIR}/${test_name}")
   add_custom_command(


Always pass -fcolor-diagnostics to clang.

Otherwise everyone using ninja to build is lacking colors.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -33,10 +33,12 @@
   string(REGEX REPLACE "^.*[ ]version[ ][0-9]+\\.([0-9]+).*" "\\1" CLANG_MINOR "${_clang_version_info}")
   message(STATUS "Found Clang. Major version ${CLANG_MAJOR}, minor version ${CLANG_MINOR}")
   set(COMPILER_VERSION clang${CLANG_MAJOR}${CLANG_MINOR})
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
   if(ccache)
     # https://bugzilla.samba.org/show_bug.cgi?id=8118 and color.
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments")
   endif()
 else()
   set(CLANG_MAJOR 0)


ENH: CI: Replaced CTEST_BUILD_NAME query by macro.

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -18,6 +18,8 @@
 # limitations under the License.
 #

+include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
+
 # This script is a prototype for the future CI, it may evolve rapidly in a near future
 get_filename_component(OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)
 set (ENV{LANG} "C") # Only ascii output
@@ -36,23 +38,7 @@
 endif()

 # Find the build name and CI profile
-set(ci_profile wip)
-set(ci_mr_source "$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}")
-set(ci_mr_target "$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
-set(ci_mr_iid "$ENV{CI_MERGE_REQUEST_IID}")
-set(ci_ref_name "$ENV{CI_COMMIT_REF_NAME}")
-set (CTEST_BUILD_NAME ${ci_short_sha})
-if(ci_mr_source AND ci_mr_target AND ci_mr_iid)
-  set (CTEST_BUILD_NAME "${ci_mr_source} (MR ${ci_mr_iid})")
-  set(ci_profile mr)
-elseif(ci_ref_name)
-  set (CTEST_BUILD_NAME "${ci_ref_name}")
-  if("${ci_ref_name}" STREQUAL "develop")
-    set(ci_profile develop)
-  elseif("${ci_ref_name}" MATCHES "^release-[0-9]+\\.[0-9]+\$")
-    set(ci_profile release)
-  endif()
-endif()
+set_dash_build_name()

 # set pipelines to enable documentation
 set(ci_cookbook_profiles mr develop release)


added to monitor list

added to monitor list

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -34,6 +34,6 @@
 # Continuous email delivery variables
 SET (CONTINUOUS_FROM "lorensen@crd.ge.com")
 SET (SMTP_MAILHOST "public.kitware.com")
-SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com")
+SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com ken.martin@kitware.com")
 SET (CONTINUOUS_BASE_URL "http://www.vtk.org/Testing")


fix: Correct library naming, prefer pkg-config, and clean up

--- cmake/modules/FindKerberos.cmake
+++ cmake/modules/FindKerberos.cmake
@@ -1,53 +1,81 @@
 include(FindPackageHandleStandardArgs)

-set(_KERBEROS_ROOT_PATHS "${PROJECT_SOURCE_DIR}/lib/kerberos/")
-set(_KERBEROS_ROOT_HINTS ${KERBEROS_ROOT_DIR} $ENV{KERBEROS_ROOT_DIR})
+# Utilize pkg-config if available to check for modules
+find_package(PkgConfig QUIET)
+if(PKG_CONFIG_FOUND)
+  pkg_check_modules(GSSAPI QUIET krb5-gssapi)
+  pkg_check_modules(KERBEROS QUIET krb5)
+endif()
+
+# Use pkg-config or attempt to manually locate
+if(GSSAPI_FOUND AND KERBEROS_FOUND)
+  set(GSSAPI_INCLUDE_DIR ${GSSAPI_INCLUDEDIR})
+  mark_as_advanced(GSSAPI_INCLUDEDIR GSSAPI_INCLUDE_DIR GSSAPI_LIBRARIES)
+  set(KERBEROS_INCLUDE_DIR ${KERBEROS_INCLUDEDIR})
+  mark_as_advanced(KERBEROS_INCLUDEDIR KERBEROS_INCLUDE_DIR KERBEROS_LIBRARIES)
+else()
+  # Setup the hints and patch for the Kerberos SDK location
+  set(_KERBEROS_ROOT_PATHS "${PROJECT_SOURCE_DIR}/lib/kerberos/")
+  set(_KERBEROS_ROOT_HINTS ${KERBEROS_ROOT_DIR} $ENV{KERBEROS_ROOT_DIR})
+  if(WIN32)
+    if(CMAKE_CL_64)
+      set(_KERBEROS_SDK_PROGRAMFILES "$ENV{PROGRAMW6432}")
+    else()
+      set(_PF86 "PROGRAMFILES(X86)")
+      set(_KERBEROS_SDK_PROGRAMFILES "$ENV{${_PF86}}")
+    endif()
+    set(_KERBEROS_SDK "MIT/Kerberos")
+    set(_KERBEROS_ROOT_PATHS "${_KERBEROS_ROOT_PATHS}"
+        "${_KERBEROS_SDK_PROGRAMFILES}/${_KERBEROS_SDK}")
+  endif()
+  set(_KERBEROS_ROOT_HINTS_AND_PATHS HINTS
+      HINTS ${_KERBEROS_ROOT_PATHS}
+      PATHS ${_KERBEROS_ROOT_HINTS})
+
+  # Locate GSSAPI
+  find_path(GSSAPI_INCLUDE_DIR
+            NAMES gssapi/gssapi.h
+            HINTS ${_KERBEROS_INCLUDEDIR} ${_KERBEROS_ROOT_HINTS_AND_PATHS}
+            PATH_SUFFIXES include)
+  find_library(GSSAPI_LIBRARIES
+               NAMES gssapi_krb5 gssapi32 gssapi64
+               HINTS ${_KERBEROS_LIBDIR} ${_KERBEROS_ROOT_HINTS_AND_PATHS}
+               PATH_SUFFIXES lib lib/i386 lib/amd64)
+  mark_as_advanced(GSSAPI_INCLUDE_DIR GSSAPI_LIBRARIES)
+
+  # Locate Kerberos
+  find_path(KERBEROS_INCLUDE_DIR
+            NAMES krb5.h
+            HINTS ${_KERBEROS_INCLUDEDIR} ${_KERBEROS_ROOT_HINTS_AND_PATHS}
+            PATH_SUFFIXES include)
+  find_library(KERBEROS_LIBRARIES
+              NAMES krb5 libkrb5 krb5_32 krb5_64
+              HINTS ${_KERBEROS_LIBDIR} ${_KERBEROS_ROOT_HINTS_AND_PATHS}
+              PATH_SUFFIXES lib lib/i386 lib/amd64)
+  mark_as_advanced(KERBEROS_INCLUDE_DIR KERBEROS_LIBRARIES)
+endif()
+
+# Set the fail message appropriately for OS
 if(NOT WIN32)
-  set(_KERBEROS_ROOT_PATHS "${_KERBEROS_ROOT_PATHS}" "/usr/" "/usr/local/")
+    set(_GSSAPI_LIBRARY "gssapi_krb5")
+    set(_KERBEROS_LIBRARY "krb5")
 else()
   if(CMAKE_CL_64)
-    set(_KERBEROS_SDK_PROGRAMFILES "$ENV{PROGRAMW6432}")
+    set(_GSSAPI_LIBRARY "gssapi64")
+    set(_KERBEROS_LIBRARY "krb5_64")
   else()
-    set(_PF86 "PROGRAMFILES(X86)")
-    set(_KERBEROS_SDK_PROGRAMFILES "$ENV{${_PF86}}")
+    set(_GSSAPI_LIBRARY "gssapi32")
+    set(_KERBEROS_LIBRARY "krb5_32")
   endif()
-  set(_KERBEROS_SDK "MIT/Kerberos")
-  set(_KERBEROS_ROOT_PATHS "${_KERBEROS_ROOT_PATHS}" "${_KERBEROS_SDK_PROGRAMFILES}/${_KERBEROS_SDK}")
 endif()
-set(_KERBEROS_ROOT_HINTS_AND_PATHS HINTS
-  HINTS ${_KERBEROS_ROOT_PATHS}
-  PATHS ${_KERBEROS_ROOT_HINTS})
+set(KERBERBOS_FAIL_MESSAGE "Could NOT find ${_GSSAPI_LIBRARY} and/or ${_KERBEROS_LIBRARY}, try to set the path to the Kerberos root folder in the system variable KERBEROS_ROOT_DIR")

-find_path(GSSAPI_INCLUDE_DIR
-    NAMES gssapi/gssapi.h
-    HINTS ${_KERBEROS_INCLUDEDIR} ${_KERBEROS_ROOT_HINTS_AND_PATHS}
-    PATH_SUFFIXES include)
-
-find_path(KERBEROS_INCLUDE_DIR
-  NAMES krb5.h
-  HINTS ${_KERBEROS_INCLUDEDIR} ${_KERBEROS_ROOT_HINTS_AND_PATHS}
-  PATH_SUFFIXES include)
-
-find_library(KERBEROS_LIBRARY
-  NAMES krb5 libkrb5 krb5_32 krb5_64
-  HINTS ${_KERBEROS_LIBDIR} ${_KERBEROS_ROOT_HINTS_AND_PATHS}
-  PATH_SUFFIXES lib lib/i386 lib/amd64)
-
-mark_as_advanced(GSSAPI_INCLUDE_DIR KERBEROS_LIBRARIES KERBEROS_INCLUDE_DIR)
-
-if(WIN32)
-  find_library(GSSAPI_LIBRARY
-    NAMES gssapi32 gssapi64
-    HINTS ${_KERBEROS_LIBDIR} ${_KERBEROS_ROOT_HINTS_AND_PATHS}
-    PATH_SUFFIXES lib lib/i386 lib/amd64)
-
-  mark_as_advanced(GSSAPI_LIBRARY)
-  set(KERBEROS_LIBRARIES ${GSSAPI_LIBRARY} ${KERBEROS_LIBRARY})
-endif()
-
+# Determine if Kerberos was fully located (GSSAPI dependent)
+set(KERBEROS_INCLUDE_DIR ${KERBEROS_INCLUDE_DIR} ${GSSAPI_INCLUDE_DIR})
+set(KERBEROS_LIBRARIES ${KERBEROS_LIBRARIES} ${GSSAPI_LIBRARIES})
 find_package_handle_standard_args(Kerberos
   REQUIRED_VARS
     KERBEROS_LIBRARIES
     KERBEROS_INCLUDE_DIR
   FAIL_MESSAGE
-    "Could NOT find krb5, try to set the path to the krb5 root folder in the system variable KERBEROS_ROOT_DIR")
+    ${KERBERBOS_FAIL_MESSAGE})


Update to HEXL v1.2.1

Update to HEXL v1.2.1

--- third-party/intel-hexl/intel-hexl.cmake
+++ third-party/intel-hexl/intel-hexl.cmake
@@ -7,7 +7,7 @@
 message(STATUS "INTEL_HEXL_PREBUILT ${INTEL_HEXL_PREBUILT}")

 if (INTEL_HEXL_PREBUILT)  # Skip download from gitlab
-  find_package(HEXL 1.2.0
+  find_package(HEXL 1.2.1
         HINTS ${INTEL_HEXL_HINT_DIR}
         REQUIRED)
   if (NOT TARGET HEXL::hexl)
@@ -31,7 +31,7 @@
     # Download and install Intel HEXL ...
     # ------------------------------------------------------------------------------
     set(INTEL_HEXL_GIT_REPO_URL https://github.com/intel/hexl)
-    set(INTEL_HEXL_GIT_LABEL 1.2.0)
+    set(INTEL_HEXL_GIT_LABEL 1.2.1)

     set(INTEL_HEXL_DEBUG OFF) # Set to ON/OFF to toggle debugging
     set(INTEL_HEXL_SHARED_LIB ${BUILD_SHARED}) # Set to ON/OFF to toggle shared library build
@@ -66,10 +66,10 @@
       add_library(HEXL::hexl SHARED IMPORTED)
       if (INTEL_HEXL_DEBUG)
         set_property(TARGET HEXL::hexl PROPERTY
-          IMPORTED_LOCATION ${CMAKE_INSTALL_PREFIX}/lib/libhexl_debug.so)
+          IMPORTED_LOCATION ${CMAKE_INSTALL_PREFIX}/lib/libhexl_debug${CMAKE_SHARED_LIBRARY_SUFFIX})
       else()
         set_property(TARGET HEXL::hexl PROPERTY
-          IMPORTED_LOCATION ${CMAKE_INSTALL_PREFIX}/lib/libhexl.so)
+          IMPORTED_LOCATION ${CMAKE_INSTALL_PREFIX}/lib/libhexl${CMAKE_SHARED_LIBRARY_SUFFIX})
       endif()
     else()
       add_library(HEXL::hexl STATIC IMPORTED)


Add a option for compile Boost only if compile StatNonParamTestPDM

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -86,10 +86,14 @@
 # spharm-pdm dependency list
 #------------------------------------------------------------------------------

+set(dependent_BOOST )
+if(COMPILE_StatNonParamTestPDM)
+   set(dependent_BOOST Boost)
+endif()
 set(ITK_VERSION_MAJOR 4)
 set(ITK_EXTERNAL_NAME ITKv${ITK_VERSION_MAJOR})
 set(${LOCAL_PROJECT_NAME}_DEPENDENCIES
-  CLAPACK Boost
+  CLAPACK ${dependent_BOOST}
   ${ITK_EXTERNAL_NAME} VTK SlicerExecutionModel
   BatchMake
 )


Removed debug message

Removed debug message

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -299,7 +299,6 @@

 set(proj MITK-Configure)

-message("SUPERBUILD_CMAKE: ${QT_QMAKE_EXECUTABLE}")
 ExternalProject_Add(${proj}
   LIST_SEPARATOR ^^
   DOWNLOAD_COMMAND ""


cmake: allow multiple provider

cmake: allow multiple provider

fixes that the exclusion -CRYPTO works again
it failed because crypto has now two providers

--- cmake/Modules/LibAddPlugin.cmake
+++ cmake/Modules/LibAddPlugin.cmake
@@ -141,6 +141,7 @@

 	STRING (REGEX MATCH "- +infos/provides *= *([a-zA-Z0-9 ]*)" PROVIDES "${contents}")
 	STRING (REGEX REPLACE "- +infos/provides *= *([a-zA-Z0-9 ]*)" "\\1" PROVIDES "${PROVIDES}")
+	STRING (REGEX REPLACE " " ";" PROVIDES "${PROVIDES}")
 	list (APPEND CATEGORIES "ALL" "${PROVIDES}")
 	STRING (TOUPPER "${CATEGORIES}" CATEGORIES)
 	#message (STATUS "CATEGORIES ${CATEGORIES}")


paddle2onnx update to 0.9.9 (#43774)

paddle2onnx update to 0.9.9 (#43774)

--- cmake/external/paddle2onnx.cmake
+++ cmake/external/paddle2onnx.cmake
@@ -24,7 +24,7 @@
 include(ExternalProject)

 set(PADDLE2ONNX_PROJECT "extern_paddle2onnx")
-set(PADDLE2ONNX_VERSION "0.9.8")
+set(PADDLE2ONNX_VERSION "0.9.9")
 set(PADDLE2ONNX_PREFIX_DIR ${THIRD_PARTY_PATH}/paddle2onnx)
 set(PADDLE2ONNX_SOURCE_DIR
     ${THIRD_PARTY_PATH}/paddle2onnx/src/${PADDLE2ONNX_PROJECT})


ENH: updating remote module PolarTransform

--- Modules/Remote/PolarTransform.remote.cmake
+++ Modules/Remote/PolarTransform.remote.cmake
@@ -11,5 +11,5 @@
   http://insight-journal.org/browse/publication/130
   "
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPolarTransform.git
-  GIT_TAG cf1b0a6b98e61e8ab7a504969eb534d1d6df319c
+  GIT_TAG d9846fb13348ca7864c438a086b8d7c9cd34be27
   )


make sure that regex does not match cmake

--- cmake/EigenConfigureTesting.cmake
+++ cmake/EigenConfigureTesting.cmake
@@ -26,7 +26,7 @@
 # try to grab the default flags
 string(REGEX MATCH "MakeCommand:.*-- (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
 if(NOT CMAKE_MATCH_1)
-string(REGEX MATCH "MakeCommand:.*make (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
+string(REGEX MATCH "MakeCommand:.*[^c]make (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
 endif()
 string(REGEX REPLACE "MakeCommand:.*DefaultCTestConfigurationType" "MakeCommand: ${CMAKE_COMMAND} --build . --target buildtests --config \"\${CTEST_CONFIGURATION_TYPE}\" -- ${CMAKE_MATCH_1} ${EIGEN_TEST_BUILD_FLAGS}\nDefaultCTestConfigurationType"
        EIGEN_DART_CONFIG_FILE2 ${EIGEN_DART_CONFIG_FILE})


Force build with -O2 instead of -O3 on 32-bit linux

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -1,4 +1,4 @@
-if(MINGW)
+if(MINGW OR (X86 AND UNIX AND NOT APPLE))
   # mingw compiler is known to produce unstable SSE code with -O3 hence we are trying to use -O2 instead
   if(CMAKE_COMPILER_IS_GNUCXX)
     foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG)


[cxxmodules] Add dependencies to C++ modules generated by rootcling

Previously the modules were only a environment variable, so we never
had any CMake code that added the correct dependencies here. Now we
do have runtime_cxxmodules, and we can actually properly add a
dependency here.
Without this patch a deleted C++ module file actually will never be regenerated.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -340,6 +340,10 @@
       set(newargs -s ${library_output_dir}/${library_name})
       set(pcm_name ${library_output_dir}/${libprefix}${ARG_MODULE}_rdict.pcm)
       set(rootmap_name ${library_output_dir}/${libprefix}${ARG_MODULE}.rootmap)
+      if(runtime_cxxmodules)
+        set(cpp_module ${ARG_MODULE})
+        set(cpp_module_file ${cpp_module}.pcm)
+      endif()
     endif()
   else()
     set(library_name ${libprefix}${deduced_arg_module}${libsuffix})
@@ -395,7 +399,7 @@
   endforeach()

   #---call rootcint------------------------------------------
-  add_custom_command(OUTPUT ${dictionary}.cxx ${pcm_name} ${rootmap_name}
+  add_custom_command(OUTPUT ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file}
                      COMMAND ${command} -v2 -f  ${dictionary}.cxx ${newargs} ${excludepathsargs} ${rootmapargs}
                                         ${ARG_OPTIONS} ${definitions} ${includedirs} ${headerfiles} ${_linkdef}
                      IMPLICIT_DEPENDS ${_implicitdeps}
@@ -403,7 +407,7 @@
   get_filename_component(dictname ${dictionary} NAME)

   #---roottest compability
-  add_custom_target(${dictname} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name})
+  add_custom_target(${dictname} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
   if(NOT ARG_NOINSTALL AND NOT CMAKE_ROOTTEST_DICT AND DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
     set_property(GLOBAL APPEND PROPERTY ROOT_DICTIONARY_TARGETS ${dictname})
     set_property(GLOBAL APPEND PROPERTY ROOT_DICTIONARY_FILES ${CMAKE_CURRENT_BINARY_DIR}/${dictionary}.cxx)
@@ -431,8 +435,8 @@
   # files which for some reason (temporarily?) cannot be put in the PCH. Eg.
   # all rest of the first dict is in the PCH but this file is not and it
   # cannot be present in the original dictionary.
-  if(ARG_MODULE AND NOT ARG_MULTIDICT)
-    ROOT_CXXMODULES_APPEND_TO_MODULEMAP("${ARG_MODULE}" "${headerfiles}")
+  if(cpp_module)
+    ROOT_CXXMODULES_APPEND_TO_MODULEMAP("${cpp_module}" "${headerfiles}")
   endif()
 endfunction()


Update paraview to 5.0 tag

Update paraview to 5.0 tag

--- versions.cmake
+++ versions.cmake
@@ -76,7 +76,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "64808f36b65b3f6dba1186148f3782dc7d5dee29")
+  set(_paraview_revision "v5.0.0")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


added dynamic lookup for unresolved symbols when building shared libs on mac

--- Component.cmake
+++ Component.cmake
@@ -241,6 +241,7 @@
   target_compile_options( cool.ng-dev PUBLIC -g -std=c++11 -fPIC )

   if (OSX)
+    set_target_properties( cool.ng-dyn-dev PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
     target_compile_options( cool.ng-dyn-dev PUBLIC -fbracket-depth=10000 )
     target_compile_definitions( cool.ng-dyn-dev PUBLIC OSX_TARGET OS_OBJECT_USE_OBJC=0 )
     target_compile_options( cool.ng-dev PUBLIC -fbracket-depth=10000 )


rclpy gets the default rmw_implementation through rmw_implementation_cmake now (#123)

--- rmw_implementation_cmake/cmake/get_default_rmw_implementation.cmake
+++ rmw_implementation_cmake/cmake/get_default_rmw_implementation.cmake
@@ -33,8 +33,6 @@
     "$ENV{RMW_IMPLEMENTATION}" STREQUAL ""
   )
     # prefer FastRTPS, otherwise first in alphabetical order
-    # the same logic is implemented in
-    # rclpy.impl.rmw_implementation_tools.import_rmw_implementation()
     list(FIND _middleware_implementations "rmw_fastrtps_cpp" _index)
     if(NOT _index EQUAL -1)
       list(GET _middleware_implementations ${_index} _middleware_implementation)


docu: for find_util util

docu: for find_util util

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -190,7 +190,31 @@
 	endif (NOT SWIG_FOUND)
 endmacro(find_swig)

-
+#
+# find an util to pass to add_custom_command later
+#
+# Parameters:
+#
+# 1. util        [in] : the utility fo search for. Must be added using
+#                       add_executable first.
+# 2. EXE_SYM_LOC [out]: a name for a variable where the program to be executed
+#                       is written to.
+#                       Note: you must pass this value to COMMAND of add_custom_command
+# 3. EXE_SYM_ARG [out]: a name for a variable where the argument to be executed
+#                       is written to.
+#                       Note: you must pass this value to ARGS in add_custom_command
+#
+# Example Usage:
+# add_executable (exportsymbols ...)
+# include(LibAddMacros)
+# find_util(exportsymbols EXE_SYM_LOC EXE_SYM_ARG)
+#
+# add_custom_command (
+#		DEPENDS exportsymbols
+#		COMMAND ${EXE_SYM_LOC}
+#		ARGS ${EXE_SYM_ARG} ... other arguments
+#		)
+#
 function(find_util util output_loc output_arg)
 	if (CMAKE_CROSSCOMPILING)
 		if (WIN32)


Fix typo in iDynTreeDependenices.cmake

Fix typo in iDynTreeDependenices.cmake

--- cmake/iDynTreeDependencies.cmake
+++ cmake/iDynTreeDependencies.cmake
@@ -76,7 +76,7 @@

 find_package(ICUB QUIET)
 option(IDYNTREE_USES_ICUB_MAIN "Build the part of iDynTree that depends on package ICUB" ${ICUB_FOUND})
-if (IDYNTREE_USES_ICUB)
+if (IDYNTREE_USES_ICUB_MAIN)
   find_package(ICUB REQUIRED)
 endif ()


Include missing module

Include missing module

[skip ci]

--- cmake/projects/LLVM/hunter.cmake
+++ cmake/projects/LLVM/hunter.cmake
@@ -9,6 +9,7 @@

 include(hunter_add_version)
 include(hunter_cmake_args)
+include(hunter_configuration_types)
 include(hunter_download)
 include(hunter_pick_scheme)


Use the static runtime for non-UWP Windows builds.

--- CMake/CompilerFlags.cmake
+++ CMake/CompilerFlags.cmake
@@ -50,6 +50,18 @@
     add_compile_options(
         /MP # Enable multi-processor compilation
     )
+    if(NOT WINDOWS_STORE)
+        # Statically link the run-time library
+        # https://docs.microsoft.com/bg-bg/cpp/build/reference/md-mt-ld-use-run-time-library
+        # https://cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F
+        foreach(flag_var
+            CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+            CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+            if(${flag_var} MATCHES "/MD")
+                string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+            endif()
+        endforeach()
+    endif()
 endif()

 if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")


Fix RPM install conflict (#6003)

Fix RPM install conflict (#6003)

--- CMake/PackageRedhat.cmake
+++ CMake/PackageRedhat.cmake
@@ -31,4 +31,14 @@
     set(CPACK_RPM_PACKAGE_NAME "flatbuffers")
     set(CPACK_PACKAGE_FILE_NAME
         "${CPACK_RPM_PACKAGE_NAME}_${CPACK_RPM_PACKAGE_VERSION}_${CPACK_RPM_PACKAGE_ARCHITECTURE}")
+    if(NOT DEFINED ${CPACK_PACKAGING_INSTALL_PREFIX})
+       # Default packaging install prefix on RedHat systems is /usr.
+       # This is the assumed value when this variable is not defined.
+       # There is currently a conflict with
+       # /usr/${CMAKE_INSTALL_LIBDIR}/cmake which is installed by default
+       # by other packages on RedHat (most notably cmake-filesystem). Ensure
+       # that on these systems, flatbuffers does not package this path.
+       # This patch is required for cmake pre-3.17.
+       list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/${CMAKE_INSTALL_LIBDIR}/cmake")
+   endif()
 endif(UNIX)


generate more complicated brute force search paths

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1279 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -44,32 +44,22 @@
     #    set (normal_path_prefixes ${normal_path_prefixes} ${p})
     #endforeach ()

-    # add prefix paths
-    foreach (prefix ${path_prefixes})
-
-        set (includes ${includes}
-            ${prefix}/include)
-
-        set (libraries ${libraries}
-            ${prefix}/lib
-            ${prefix}/bin
-            ${prefix}/dll)
-
-    endforeach ()
+    set (path_names ${path_names} ".")

     # add prefix+name paths
     foreach (prefix ${path_prefixes})
         foreach (pkgname ${path_names})
-
-            set (includes ${includes}
-                ${prefix}/${pkgname}/include
-                ${prefix}/include/${pkgname})
-
-            set (libraries ${libraries}
-                ${prefix}/${pkgname}/lib ${prefix}/lib/${pkgname}
-                ${prefix}/${pkgname}/bin ${prefix}/bin/${pkgname}
-                ${prefix}/${pkgname}/dll ${prefix}/dll/${pkgname})
-
+            foreach (subpkgname ${path_names})
+
+                set (includes ${includes}
+                    ${prefix}/${pkgname}/include/${subpkgname})
+
+                set (libraries ${libraries}
+                    ${prefix}/${pkgname}/lib/${subpkgname}
+                    ${prefix}/${pkgname}/bin/${subpkgname}
+                    ${prefix}/${pkgname}/dll/${subpkgname})
+
+            endforeach ()
         endforeach ()
     endforeach ()

@@ -124,8 +114,9 @@
     set (found_ FALSE)

     foreach (name_ ${PKG_NAMES})
-
+
         string (TOUPPER ${name_} name_upper_)
+
         # find_package can't handle packages in all caps.
         # cmake is a macro language, which means it defines global variables,
         # which it tries to namespace by choosing all caps variable names,
@@ -190,6 +181,9 @@

         # generate a combination of possible search paths
         sagase_generate_paths (include_paths library_paths NAMES ${PKG_NAMES} PREFIXES ${PKG_PREFIXES})
+
+        # all C and C++ headers
+        set (HEADER_POSTFIXES ".h" ".hpp" ".hh" ".hxx")

         # follow platform library naming
         if (MSVC)
@@ -204,23 +198,19 @@

         # try using "COMPONENTS" as possible file names (without prefix or extension)
         foreach (component_ ${PKG_COMPONENTS})
-            # get C header path
-            find_path (${PREFIX}_${component_}_INCLUDE_DIR ${component_}.h ${include_paths})

-            if (${PREFIX}_${component_}_INCLUDE_DIR)
-                set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_${component_}_INCLUDE_DIR})
-            endif ()
-
-			# get C++ header path
-            find_path (${PREFIX}_${component_}_INCLUDE_DIR ${component_}.hpp ${include_paths})
-
-            if (${PREFIX}_${component_}_INCLUDE_DIR)
-                set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_${component_}_INCLUDE_DIR})
-            endif ()
+            # get header path
+            foreach (header_extension_ ${HEADER_POSTFIXES})
+                find_path (${PREFIX}_${component_}_INCLUDE_DIR ${component_}${header_extension_} ${include_paths})
+
+                if (${PREFIX}_${component_}_INCLUDE_DIR)
+                    set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_${component_}_INCLUDE_DIR})
+                endif ()
+            endforeach ()

             # get library path
-            foreach (extension_ ${LIB_POSTFIXES})
-                find_path (${PREFIX}_${component_}_LIBRARY_DIR ${LIB_PREFIX}${component_}${extension_} ${library_paths})
+            foreach (lib_extension_ ${LIB_POSTFIXES})
+                find_path (${PREFIX}_${component_}_LIBRARY_DIR ${LIB_PREFIX}${component_}${lib_extension_} ${library_paths})

                 if (${PREFIX}_${component_}_LIBRARY_DIR)
                     set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${component_})
@@ -232,7 +222,7 @@

     # stop process if nothing is found through any means
     if (NOT found_ AND NOT ${PREFIX}_INCLUDE_DIRS AND NOT ${PREFIX}_LIBRARY_DIRS AND NOT ${PREFIX}_LIBRARIES)
-		message (FATAL_ERROR "!! sagase: unable to configure " ${PREFIX})
+        message (FATAL_ERROR "!! sagase: unable to configure " ${PREFIX})
     endif ()

     # remove duplicate entires from return variables


Remove unnecessary FindQtPropertyBrowser.cmake

--- Utilities/CMake/FindQtPropertyBrowser.cmake
+++ Utilities/CMake/FindQtPropertyBrowser.cmake
@@ -1,60 +0,0 @@
-###########################################################################
-#
-#  Library:   CTK
-#
-#  Copyright (c) Kitware Inc.
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#      http://www.commontk.org/LICENSE
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-#
-###########################################################################
-
-# - Find a QtPropertyBrowser installation or build tree.
-# The following variables are set if QtPropertyBrowser is found.  If QtPropertyBrowser is not
-# found, QtPropertyBrowser_FOUND is set to false.
-#  QtPropertyBrowser_FOUND         - Set to true when QtPropertyBrowser is found.
-#  QtPropertyBrowser_USE_FILE      - CMake file to use QtPropertyBrowser.
-#  QtPropertyBrowser_INCLUDE_DIRS  - Include directories for QtPropertyBrowser
-#  QtPropertyBrowser_LIBRARY_DIRS  - Link directories for QtPropertyBrowser libraries
-#
-# The following cache entries must be set by the user to locate QtPropertyBrowser:
-#  QtPropertyBrowser_DIR  - The directory containing QtPropertyBrowserConfig.cmake.
-#                           This is either the root of the build tree,
-#                           or the lib/QtPropertyBrowser directory.  This is the
-#                           only cache entry.
-#
-
-# Assume not found.
-SET(QtPropertyBrowser_FOUND 0)
-
-# Construct consitent error messages for use below.
-SET(QtPropertyBrowser_DIR_MESSAGE "QtPropertyBrowser not found.  Set the QtPropertyBrowser_DIR cmake cache entry to the directory containing QtPropertyBrowserConfig.cmake.  This is either the root of the build tree, or PREFIX/lib/QtPropertyBrowser for an installation.")
-
-# Use the Config mode of the find_package() command to find QtPropertyBrowserConfig.
-# If this succeeds (possibly because QtPropertyBrowser_DIR is already set), the
-# command will have already loaded QtPropertyBrowserConfig.cmake and set QtPropertyBrowser_FOUND.
-IF(NOT QtPropertyBrowser_FOUND)
-  FIND_PACKAGE(QtPropertyBrowser QUIET NO_MODULE)
-ENDIF()
-
-#-----------------------------------------------------------------------------
-IF(NOT QtPropertyBrowser_FOUND)
-  # QtPropertyBrowser not found, explain to the user how to specify its location.
-  IF(QtPropertyBrowser_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR ${QtPropertyBrowser_DIR_MESSAGE})
-  ELSE(QtPropertyBrowser_FIND_REQUIRED)
-    IF(NOT QtPropertyBrowser_FIND_QUIETLY)
-      MESSAGE(STATUS ${QtPropertyBrowser_DIR_MESSAGE})
-    ENDIF(NOT QtPropertyBrowser_FIND_QUIETLY)
-  ENDIF(QtPropertyBrowser_FIND_REQUIRED)
-ENDIF()
-


New version: 0.4.17

New version: 0.4.17

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "4")
-SET(HAWKEY_PATCH "16")
+SET(HAWKEY_PATCH "17")


[windows] fix installation of dlls

[windows] fix installation of dlls

--- cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
+++ cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake
@@ -87,7 +87,9 @@

 install(
   TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix}
-  DESTINATION "lib"
+  ARCHIVE DESTINATION lib
+  LIBRARY DESTINATION lib
+  RUNTIME DESTINATION bin
 )

 ament_export_libraries(${rosidl_generate_interfaces_TARGET}${_target_suffix})


Corrected search patch in Tudat Core CMake module.

git-svn-id: 99aa2048cf63c94f97d904899d0fb24168b99718@482 ac7aa084-b6da-11df-bf42-7fac39f0224f

--- Tudat/External/CMake/FindTudatCore.cmake
+++ Tudat/External/CMake/FindTudatCore.cmake
@@ -88,7 +88,7 @@
       ${PROJECT_SOURCE_DIR}/External
       ${PROJECT_SOURCE_DIR}/../../../tudatCore/trunk
       ${PROJECT_SOURCE_DIR}/../../tudatCore/trunk
-      ${PROJECT_SOURCE_DIR}/../tudatCore/
+      ${PROJECT_SOURCE_DIR}/../../tudatCore/
       ${CMAKE_INSTALL_PREFIX}/include
       PATH_SUFFIXES TudatCore
     )


Setting target architecture for openblas

Former-commit-id: 01ebb06b24bfbf75fc6a24236e1d8dee7fb63222

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -42,13 +42,16 @@
             list(APPEND FOUND_TARGETS mkl::mkl)
         endif()
     else()
-        cmake_host_system_information(RESULT _host_name   QUERY HOSTNAME)
-        if(${_host_name} MATCHES "travis|TRAVIS|Travis|fv-")
-            message(STATUS "Setting dynamic arch for openblas")
-            list(APPEND DMRG_CONAN_OPTIONS
-                    OPTIONS openblas:dynamic_arch=False
-                    OPTIONS openblas:arch=HASWELL)
-        endif()
+        list(APPEND DMRG_CONAN_OPTIONS
+                OPTIONS openblas:dynamic_arch=False
+                OPTIONS openblas:arch=${OPENBLAS_MARCH})
+#        cmake_host_system_information(RESULT _host_name   QUERY HOSTNAME)
+#        if(${_host_name} MATCHES "travis|TRAVIS|Travis|fv-")
+#            message(STATUS "Setting dynamic arch=False for openblas")
+#            list(APPEND DMRG_CONAN_OPTIONS
+#                    OPTIONS openblas:dynamic_arch=False
+#                    OPTIONS openblas:arch=HASWELL)
+#        endif()
         find_package(Fortran REQUIRED)
         list(APPEND FOUND_TARGETS gfortran::gfortran)
     endif()


Put command-line apps into Modules/Executables folder

--- CMake/mitkFunctionCreateCommandLineApp.cmake
+++ CMake/mitkFunctionCreateCommandLineApp.cmake
@@ -52,7 +52,6 @@
   CPP_FILES ${CMDAPP_CPP_FILES}
   ${_CMDAPP_OPTIONS}
   )
-  set_property(TARGET ${EXECUTABLE_TARGET} PROPERTY FOLDER "${MITK_ROOT_FOLDER}/Modules/CommandLineApps")
   MITK_INSTALL_TARGETS(EXECUTABLES ${EXECUTABLE_TARGET} )

   if(EXECUTABLE_IS_ENABLED)


COMP: Do not use target_include_directories with CMake 2.8.11.2.

Do not use target_include_directories with CMake 2.8.11.2.

As a follow up to vxl/vxl@d7d6314fb9846b923a5e90e8f7f65b3ab28bfc8e
target_include_directories does not work with relative paths in 2.8.11.2 also.

This is a backport of vxl/vxl@6002a03671872

Change-Id: I13c688c75215fd66e5053af2872b5a93457fa444

--- Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_utils.cmake
+++ Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_utils.cmake
@@ -113,7 +113,7 @@
       ## Identify the relative path for installing the header files and txx files
       string(REPLACE ${VXL_ROOT_SOURCE_DIR} "${VXL_INSTALL_INCLUDE_DIR}" relative_install_path ${CMAKE_CURRENT_SOURCE_DIR})
       ## Added in 2.8.11 http://stackoverflow.com/questions/19460707/how-to-set-include-directories-from-a-cmakelists-txt-file
-      if(${CMAKE_VERSION} VERSION_GREATER 2.8.11)
+      if(${CMAKE_VERSION} VERSION_GREATER 2.8.11.2)
         target_include_directories(${lib_name}
           PUBLIC
             $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
@@ -126,7 +126,7 @@
         set(relative_install_path "${relative_install_path}/${header_install_dir}")
       endif()
       ## Added in 2.8.11 http://stackoverflow.com/questions/19460707/how-to-set-include-directories-from-a-cmakelists-txt-file
-      if(${CMAKE_VERSION} VERSION_GREATER 2.8.11)
+      if(${CMAKE_VERSION} VERSION_GREATER 2.8.11.2)
         target_include_directories(${lib_name}
           PUBLIC
             $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>


Fixed libcurl dependency on openssl for iOS

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -560,7 +560,7 @@
 add_framework_dependencies(mw_photo_browser AssetsLibrary MapKit MessageUI)
 add_library_dependencies(openssl third_party.gmp)
 add_library_dependencies(libcurl third_party.zlib)
-if (NOT APPLE)
+if (NOT APPLE OR IS_IOS)
   add_library_dependencies(libcurl third_party.openssl)
 endif ()
 add_library_dependencies(curl-asio third_party.boost_system third_party.libcurl)


DirectX may be a dependency or not. It depends on the Irrlicht library. So do not fail in case DirectX is not present.

--- CMake/Dependencies/DependencyDirectX9.cmake
+++ CMake/Dependencies/DependencyDirectX9.cmake
@@ -39,7 +39,7 @@
 			)

 		else ()
-			MESSAGE(SEND_ERROR "DirectX environment missing")
+			MESSAGE(STATUS "DirectX environment missing")

 		endif ()


CMake: Enabled compiler warnings.

CMake: Enabled compiler warnings.

We had previously been using the default sets of warnings, but now we
use the same warnings as on Autotools. This meant disabling two common
possible-loss-of-data warnings on Windows that are not part of the
GNU/Clang default warnings.

This also replaces the use of `string(APPEND CMAKE_CXX_FLAGS)` with
the canonical command `add_compile_options`. Although generally the
use of `target_compile_options` is preferred, it would currently
result in a lot more churn, and the build already supports setting
these flags globally.

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

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -217,21 +217,46 @@
   endif ()
 endif ()

+# GLOBAL WARNINGS.
+##################
+if (CMAKE_CXX_COMPILER_ID MATCHES GNU
+    OR CMAKE_CXX_COMPILER_ID MATCHES Clang) # Also matches AppleClang.
+  # TODO(andschwa): Add `-Wextra`, `-Wpedantic`, `-Wconversion`.
+  add_compile_options(
+    -Wall
+    -Wsign-compare)
+elseif (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
+  # TODO(andschwa): Switch to `/W4` and re-enable possible-loss-of-data warnings.
+  #
+  # The last two warnings are disabled (well, put into `/W4`) because
+  # there is no easy equivalent to enable them for GCC/Clang without
+  # also fixing all the warnings from `-Wconversion`.
+  add_compile_options(
+    # Like `-Wall`; `/W4` is more like `-Wall -Wextra`.
+    /W3
+    # Disable permissiveness.
+    /permissive-
+    # C4244 is a possible loss of data warning for integer conversions.
+    /w44244
+    # C4267 is a possible loss of data warning when converting from `size_t`.
+    /w44267)
+endif ()
+

 # POSIX CONFIGURATION.
 ######################
 if (NOT WIN32)
   # Warn about use of format functions that can produce security issues.
-  string(APPEND CMAKE_CXX_FLAGS " -Wformat-security")
+  add_compile_options(-Wformat-security)

   # Protect many of the functions with stack guards. The exact flag
   # depends on compiler support.
   CHECK_CXX_COMPILER_FLAG(-fstack-protector-strong STRONG_STACK_PROTECTORS)
   CHECK_CXX_COMPILER_FLAG(-fstack-protector STACK_PROTECTORS)
   if (STRONG_STACK_PROTECTORS)
-    string(APPEND CMAKE_CXX_FLAGS " -fstack-protector-strong")
+    add_compile_options(-fstack-protector-strong)
   elseif (STACK_PROTECTORS)
-    string(APPEND CMAKE_CXX_FLAGS " -fstack-protector")
+    add_compile_options(-fstack-protector)
   else ()
     message(
       WARNING
@@ -259,7 +284,7 @@
   set(CMAKE_REQUIRED_FLAGS "-ffunction-sections -fdata-sections -Wl,--gc-sections")
   CHECK_CXX_COMPILER_FLAG("" GC_FUNCTION_SECTIONS)
   if (GC_FUNCTION_SECTIONS)
-    string(APPEND CMAKE_CXX_FLAGS " -ffunction-sections -fdata-sections")
+    add_compile_options(-ffunction-sections -fdata-sections)
     string(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,--gc-sections")
     string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--gc-sections")
   else ()
@@ -282,14 +307,11 @@
 if (WIN32)
   # COFF/PE and friends are somewhat limited in the number of sections they
   # allow for an object file. We use this to avoid those problems.
-  string(APPEND CMAKE_CXX_FLAGS " /bigobj /vd2")
-
-  # Disable permissiveness.
-  string(APPEND CMAKE_CXX_FLAGS " /permissive-")
+  add_compile_options(/bigobj /vd2)

   # Fix Warning C4530: C++ exception handler used, but unwind semantics are not
   # enabled.
-  string(APPEND CMAKE_CXX_FLAGS " /EHsc")
+  add_compile_options(/EHsc)

   # Build against the multi-threaded version of the C runtime library (CRT).
   if (BUILD_SHARED_LIBS)
@@ -310,13 +332,15 @@
     set(OPENSSL_MSVC_STATIC_RT TRUE)
   endif ()

+  # Enable multi-threaded compilation for `cl.exe`.
+  add_compile_options(/MP)
+
+  # Force use of Unicode C and C++ Windows APIs.
+  add_definitions(-DUNICODE -D_UNICODE)
+
   # NOTE: We APPEND ${CRT} rather than REPLACE so it gets picked up by
   # dependencies.
   foreach (lang C CXX)
-    # Enable multi-threaded and UNICODE compilation.
-    # NOTE: We do not add CRT here because dependencies will use it incorrectly.
-    string(APPEND CMAKE_${lang}_FLAGS " /MP -DUNICODE -D_UNICODE")
-
     # Debug library for debug configuration, release otherwise.

     # Handle single-configuration generators such as Ninja.


[ROOT-10370] Update buitin version of CFITSIO

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -764,7 +764,7 @@
 #---Check for fitsio-------------------------------------------------------------------
 if(fitsio OR builtin_cfitsio)
   if(builtin_cfitsio)
-    set(cfitsio_version 3.280)
+    set(cfitsio_version 3.450)
     string(REPLACE "." "" cfitsio_version_no_dots ${cfitsio_version})
     message(STATUS "Downloading and building CFITSIO version ${cfitsio_version}")
     set(CFITSIO_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}cfitsio${CMAKE_STATIC_LIBRARY_SUFFIX})
@@ -793,7 +793,7 @@
         CFITSIO
         # ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio${cfitsio_version_no_dots}.tar.gz
         URL ${lcgpackages}/cfitsio${cfitsio_version_no_dots}.tar.gz
-        URL_HASH SHA256=de8ce3f14c2f940fadf365fcc4a4f66553dd9045ee27da249f6e2c53e95362b3
+        URL_HASH SHA256=bf6012dbe668ecb22c399c4b7b2814557ee282c74a7d5dc704eb17c30d9fb92e
         INSTALL_DIR ${CMAKE_BINARY_DIR}
         CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR>
         LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1


Revert "Do not enable builtin_lzma if fail-on-missing=ON"

This reverts commit ef620859c1a09db1fbfe60e0732227c94056238c.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -173,17 +173,12 @@
 #---Check for LZMA-------------------------------------------------------------------
 if(NOT builtin_lzma)
   message(STATUS "Looking for LZMA")
-  if(fail-on-missing)
-    find_package(LZMA REQUIRED)
-  else()
-    find_package(LZMA)
-    if(NOT LZMA_FOUND)
-      message(STATUS "LZMA not found. Switching on builtin_lzma option")
-      set(builtin_lzma ON CACHE BOOL "" FORCE)
-    endif()
-  endif()
-endif()
-
+  find_package(LZMA)
+  if(NOT LZMA_FOUND)
+    message(STATUS "LZMA not found. Switching on builtin_lzma option")
+    set(builtin_lzma ON CACHE BOOL "" FORCE)
+  endif()
+endif()
 if(builtin_lzma)
   set(lzma_version 5.2.1)
   set(LZMA_TARGET LZMA)


Fix build with external libpng

Fix build with external libpng

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -354,6 +354,9 @@
   find_Package(PNG)
   if(PNG_FOUND)
     set(ASEXTRA_LIBRARIES ${ASEXTRA_LIBRARIES} ${PNG_LIBRARIES})
+    # Some missing variables needed for external PNG build
+    set(PNG_LIBRARY_RELEASE ${PNG_LIBRARY})
+    # apparently there will be two set of includes here (needs to be selected only last that was passed: PNG_INCLUDE_DIR)
     list(GET PNG_INCLUDE_DIRS 0 PNG_INCLUDE_DIR)
   endif()
   find_Package(JPEG)
@@ -404,7 +407,7 @@
       set(_jpeginclude --with-builtin-jpeg)
     endif()
     if(PNG_FOUND)
-      set(_pnginclude  --with-png-includes=${PNG_PNG_INCLUDE_DIR})
+      set(_pnginclude  --with-png-includes=${PNG_INCLUDE_DIR})
     else()
        set(_pnginclude  --with-builtin-png)
     endif()


added two more INSTALL commands for other macros that search for DLL's

--- cmake_modules/Windows/ProxyFindModule.cmake
+++ cmake_modules/Windows/ProxyFindModule.cmake
@@ -318,10 +318,14 @@
       LIST (APPEND paths "${NATIVE_PATH}")
       MESSAGE (STATUS "Added dll to ZORBA_REQUIRED_DLLS cache variable: ${TMP_DLL_VAR}")

-      IF (NOT ${PROJECT_NAME} STREQUAL "zorba")
+      IF (${PROJECT_NAME} STREQUAL "zorba")
+        # for zorba core requirements, install this DLL
+        INSTALL (PROGRAMS ${TMP_DLL_VAR} DESTINATION bin)
+      ELSE (${PROJECT_NAME} STREQUAL "zorba")
+        # for zorba non-core requirements, install this DLL only if the component is spcified
         STRING (REPLACE "-" "_"  component_name ${PROJECT_NAME})
         INSTALL (PROGRAMS ${TMP_DLL_VAR} DESTINATION bin COMPONENT ${component_name})
-      ENDIF (NOT ${PROJECT_NAME} STREQUAL "zorba")
+      ENDIF (${PROJECT_NAME} STREQUAL "zorba")

     ELSE (TMP_DLL_VAR)
       MESSAGE (WARNING "${NAME} was not found in: ${LIBRARY_LOCATION}. Zorba will not run properly unless you have it in the path.")
@@ -386,6 +390,7 @@
     FILE(TO_NATIVE_PATH ${PATH} NATIVE_PATH)
     LIST (APPEND paths "${NATIVE_PATH}")
     MESSAGE (STATUS "Added dll to ZORBA_REQUIRED_DLLS cache variable: ${TMP_DLL_VAR}")
+    INSTALL (PROGRAMS "${TMP_DLL_VAR}" DESTINATION bin)
   ELSE (TMP_DLL_VAR)
     MESSAGE (STATUS "Did not find ${DLL_NAME}")
     MESSAGE (WARNING "You will not be able to run zorba unless you have ${DLL_NAME} in your path.")
@@ -425,6 +430,7 @@
   FILE(TO_NATIVE_PATH ${DLL_PATH} NATIVE_PATH)
   LIST (APPEND paths "${NATIVE_PATH}")
   MESSAGE (STATUS "Added dll to ZORBA_REQUIRED_DLLS cache variable: ${DLL_PATH}/${DLL_NAME}")
+  INSTALL (PROGRAMS "${DLL_PATH}/${DLL_NAME}" DESTINATION bin)

   # set the current DLLs and their paths in a variable
   SET (ZORBA_REQUIRED_DLLS "${dlls}"


zlib: omit installing library

zlib: omit installing library

--- cmake/zlib.cmake
+++ cmake/zlib.cmake
@@ -1,4 +1,6 @@
 set(ZLIB_ROOT_DIR ${CMAKE_SOURCE_DIR}/third_party/zlib)
+
+set(SKIP_INSTALL_ALL "true")

 include_directories("${ZLIB_ROOT_DIR}")
 add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib)


Use Clang's linker flag for checking undefined symbols

--- rosidl_generator_java/cmake/rosidl_generator_java_generate_interfaces.cmake
+++ rosidl_generator_java/cmake/rosidl_generator_java_generate_interfaces.cmake
@@ -30,7 +30,11 @@

 if(NOT WIN32)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra")
-  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+  elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
+  endif()
 endif()

 set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.6" "-target" "1.6")


ctest: Clean up CTEST_NOTES_FILES

ctest: Clean up CTEST_NOTES_FILES

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

--- test.cmake
+++ test.cmake
@@ -233,7 +233,10 @@

 Set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE TRUE)

-set(CTEST_NOTES_FILES "${CTEST_SOURCE_DIRECTORY}/.git/HEAD" "${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/${git_branch}")
+list(APPEND CTEST_NOTES_FILES
+   "${CTEST_SOURCE_DIRECTORY}/.git/HEAD"
+   "${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/${git_branch}"
+   )

 include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
 ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
@@ -302,6 +305,7 @@
             )
          ctest_submit(PARTS Notes Configure)
       endif()
+      unset(CTEST_NOTES_FILES) # less clutter in ctest -V output
       if(res EQUAL 0)
          foreach(label other Scalar SSE AVX AVX2 MIC)
             set_property(GLOBAL PROPERTY Label ${label})


ctest: also skip patch level versions of old clang

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

--- test.cmake
+++ test.cmake
@@ -285,7 +285,7 @@

 if("${COMPILER_VERSION}" MATCHES "(GCC|Open64).*4\\.[01234567]\\."
       OR "${COMPILER_VERSION}" MATCHES "GCC 4.8.0"
-      OR "${COMPILER_VERSION}" MATCHES "clang 3\\.[0123]$")
+      OR "${COMPILER_VERSION}" MATCHES "clang 3\\.[0123](\\.[0-9])?$")
    message(FATAL_ERROR "Compiler too old for C++11 (${COMPILER_VERSION})")
 endif()


COMP: Wrong path

COMP: Wrong path

--- utilities/SimpleRTK/SuperBuild/External_PCRE.cmake
+++ utilities/SimpleRTK/SuperBuild/External_PCRE.cmake
@@ -30,7 +30,7 @@
   set(pcre_install_dir ${CMAKE_CURRENT_BINARY_DIR}/PCRE)

   configure_file(
-    pcre_configure_step.cmake.in
+    ${CMAKE_CURRENT_SOURCE_DIR}/pcre_configure_step.cmake.in
     ${CMAKE_CURRENT_BINARY_DIR}/pcre_configure_step.cmake
     @ONLY)


fixed: relative -> absolute path for HUGH_INSTALL_PREFIX variants

--- share/hugh/cmake/FindHUGH.cmake
+++ share/hugh/cmake/FindHUGH.cmake
@@ -34,9 +34,17 @@
 #                         variable.

 if(DEFINED ENV{HUGH_INSTALL_PREFIX})
-  set(HUGH_ROOT_DIR $ENV{HUGH_INSTALL_PREFIX})
+  get_filename_component(dir $ENV{HUGH_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${CMAKE_BINARY_DIR})
+  set(HUGH_ROOT_DIR ${dir})
 elseif(HUGH_INSTALL_PREFIX)
-  set(HUGH_ROOT_DIR ${HUGH_INSTALL_PREFIX})
+  get_filename_component(dir ${HUGH_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${CMAKE_BINARY_DIR})
+  set(HUGH_ROOT_DIR ${dir})
+endif()
+
+if(FALSE AND VERBOSE)
+  message(STATUS "ENV{HUGH_INSTALL_PREFIX} = $ENV{HUGH_INSTALL_PREFIX}")
+  message(STATUS "HUGH_INSTALL_PREFIX      = ${HUGH_INSTALL_PREFIX}")
+  message(STATUS "HUGH_ROOT_DIR            = ${HUGH_ROOT_DIR}")
 endif()

 set(_hugh_HEADER_SEARCH_DIRS


Tiny typo corrected.

Tiny typo corrected.

Output log messages when finding Python Interpreter were being muted.

--- modules/FindCoherentPython.cmake
+++ modules/FindCoherentPython.cmake
@@ -21,7 +21,7 @@
 endif()

 # Finds python interpreter first
-find_package(PythonInterp ${version} ${exact} ${required} ${qietly})
+find_package(PythonInterp ${version} ${exact} ${required} ${quietly})
 if(NOT PYTHONINTERP_FOUND)
     return()
 endif()


Fix typo that set the wrong definition for static libs (#2442)

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -451,7 +451,7 @@
 #
 option (BUILD_SHARED_LIBS "Build shared libraries (set to OFF to build static libs)" ON)
 if (NOT BUILD_SHARED_LIBS)
-    add_definitions (-D${PROJECT_NAME}_STATIC_DEFINE=1)
+    add_definitions (-D${PROJ_NAME}_STATIC_DEFINE=1)
 endif ()


Add libdir, includedir, and drvdir definitions.
Change over to "@ONLY" form.

svn path=/trunk/; revision=6791

--- pkgcfg/plplot-template.pc.cmake
+++ pkgcfg/plplot-template.pc.cmake
@@ -1,6 +1,10 @@
-Name: PLplot ${PC_SHORT_NAME}
-Description: Scientific plotting library (${PC_LONG_NAME}, ${PC_PRECISION} precision)
-Requires: ${PC_REQUIRES}
-Version: ${VERSION}
-Libs: ${PC_LINK_FLAGS}
-Cflags: ${PC_COMPILE_FLAGS}
+libdir=@LIB_DIR@
+includedir=@INCLUDE_DIR@
+drvdir=@LIB_DIR@/plplot@VERSION@/drivers@LIB_TAG@
+
+Name: PLplot @PC_SHORT_NAME@
+Description: Scientific plotting library (@PC_LONG_NAME@@PC_PRECISION@ precision)
+Requires: @PC_REQUIRES@
+Version: @VERSION@
+Libs: -L${libdir} @PC_LINK_FLAGS@
+Cflags: -I${includedir} @PC_COMPILE_FLAGS@


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

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

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -25,6 +25,7 @@
 Name[eu]=GStreamer
 Name[fa]=GStreamer
 Name[fi]=GStreamer
+Name[fr]=GStreamer
 Name[ga]=GStreamer
 Name[gl]=GStreamer
 Name[hsb]=GStreamer
@@ -81,6 +82,7 @@
 Comment[eu]=Phonon-en GStreamer bizkarraldekoa
 Comment[fa]=پسانه‌ی جی‌استریمر برای فنون (Phonon GStreamer backend)
 Comment[fi]=Phonon GStreamer -taustajärjestelmä
+Comment[fr]=Moteur GStreamer pour Phonon
 Comment[ga]=Inneall GStreamer le haghaidh Phonon
 Comment[gl]=Infraestrutura de GStreamer para Phonon
 Comment[hsb]=Phonon GStreamer backend


Fixed FFTW build

Fixed FFTW build

--- CMake/vmmlib.cmake
+++ CMake/vmmlib.cmake
@@ -3,7 +3,7 @@
 set(VMMLIB_PACKAGE_VERSION 1.7.0)
 set(VMMLIB_REPO_URL https://github.com/VMML/vmmlib.git)
 #set(VMMLIB_REPO_TAG 1.4)
-set(VMMLIB_DEPENDS OPTIONAL OpenMP LAPACK CBLAS)
+set(VMMLIB_DEPENDS OPTIONAL OpenMP LAPACK CBLAS FFTW)
 set(VMMLIB_FORCE_BUILD ${CI_BUILD})

 if(CI_BUILD_COMMIT)


verbose option deleted

verbose option deleted

--- src/chrono_fsi/cmake/FindCuda.cmake
+++ src/chrono_fsi/cmake/FindCuda.cmake
@@ -38,7 +38,7 @@
 		set(CUDA_CUSTOM_COMPILER "" CACHE STRING "Custom C++ Compiler for CUDA If Needed")

 		# Shows register usage, etc
-		set(CUDA_VERBOSE_PTX TRUE CACHE BOOL "Show Verbose Kernel Info During Compilation")
+		set(CUDA_VERBOSE_PTX FALSE CACHE BOOL "Show Verbose Kernel Info During Compilation")

 		# Let's get going...


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/KWSys/vtksys/kwsysDateStamp.cmake
+++ Utilities/KWSys/vtksys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


Separated finding and including of libraries

--- CMake/FindDCMTK.cmake
+++ CMake/FindDCMTK.cmake
@@ -46,6 +46,7 @@
   mark_as_advanced(DCMTK_DIR)
 endif()

+# Find all libraries, store debug and release separately
 foreach(lib
     dcmdata
     dcmimage
@@ -64,7 +65,7 @@
     ofstd)

   # Find Release libraries
-  find_library(DCMTK_${lib}_LIBRARY
+  find_library(DCMTK_${lib}_LIBRARY_RELEASE
     ${lib}
     PATHS
     ${DCMTK_DIR}/${lib}/libsrc
@@ -75,15 +76,7 @@
     ${DCMTK_DIR}/dcmjpeg/lib${lib}/Release
     NO_DEFAULT_PATH
     )
-
-  mark_as_advanced(DCMTK_${lib}_LIBRARY)

-  #message("** DCMTKs ${lib} found at ${DCMTK_${lib}_LIBRARY}")
-
-  if(DCMTK_${lib}_LIBRARY)
-    list(APPEND DCMTK_LIBRARIES_RELEASE optimized ${DCMTK_${lib}_LIBRARY})
-  endif()
-
   # Find Debug libraries
   find_library(DCMTK_${lib}_LIBRARY_DEBUG
     ${lib}
@@ -97,16 +90,39 @@
     NO_DEFAULT_PATH
     )

+  mark_as_advanced(DCMTK_${lib}_LIBRARY_RELEASE)
   mark_as_advanced(DCMTK_${lib}_LIBRARY_DEBUG)
-
-  if(DCMTK_${lib}_LIBRARY_DEBUG)
-    list(APPEND DCMTK_LIBRARIES_DEBUG debug ${DCMTK_${lib}_LIBRARY_DEBUG})
-  endif()

 endforeach()

-#depending on build type set debug or release
-list(APPEND DCMTK_LIBRARIES ${DCMTK_LIBRARIES_RELEASE} ${DCMTK_LIBRARIES_DEBUG} )
+# Add libraries to variable according to build type
+# this is done as a separate loop for transparencies sake
+foreach(lib
+    dcmdata
+    dcmimage
+    dcmimgle
+    dcmjpeg
+    dcmnet
+    dcmpstat
+    dcmqrdb
+    dcmsign
+    dcmsr
+    dcmtls
+    ijg12
+    ijg16
+    ijg8
+    oflog
+    ofstd)
+
+  if(DCMTK_${lib}_LIBRARY_RELEASE)
+    list(APPEND DCMTK_LIBRARIES optimized ${DCMTK_${lib}_LIBRARY_RELEASE})
+  endif()
+
+  if(DCMTK_${lib}_LIBRARY_DEBUG)
+    list(APPEND DCMTK_LIBRARIES debug ${DCMTK_${lib}_LIBRARY_DEBUG})
+  endif()
+
+endforeach()

 set(DCMTK_config_TEST_HEADER osconfig.h)
 set(DCMTK_dcmdata_TEST_HEADER dctypes.h)


quote compilation tool paths incase they include spaces

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -75,15 +75,15 @@
 # Set the compiler to ARM-GCC
 include(CMakeForceCompiler)

-cmake_force_c_compiler(${ARM_NONE_EABI_GCC} GNU)
-cmake_force_cxx_compiler(${ARM_NONE_EABI_GPP} GNU)
+cmake_force_c_compiler("${ARM_NONE_EABI_GCC}" GNU)
+cmake_force_cxx_compiler("${ARM_NONE_EABI_GPP}" GNU)

 # post-process elf files into .bin files:
 function(yotta_apply_target_rules target_type target_name)
     if(${target_type} STREQUAL "EXECUTABLE")
         add_custom_command(TARGET ${target_name}
             POST_BUILD
-            COMMAND ${ARM_NONE_EABI_OBJCOPY} -O binary ${target_name} ${target_name}.bin
+            COMMAND "${ARM_NONE_EABI_OBJCOPY}" -O binary ${target_name} ${target_name}.bin
             COMMENT "converting to .bin"
             VERBATIM
         )


cmake: Remove superflous function and header checks.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -47,7 +47,6 @@

 # HEADER FILES
 check_include_file(assert.h HAVE_ASSERT_H)
-check_include_file(dlfcn.h HAVE_DLFCN_H)
 check_include_file(inttypes.h HAVE_INTTYPES_H)
 check_include_file(malloc.h HAVE_MALLOC_H)
 check_include_file(memory.h HAVE_MEMORY_H)
@@ -66,9 +65,6 @@

 # FUNCTIONS
-
-check_function_exists(strncpy HAVE_STRNCPY)
-
 check_function_exists(calloc HAVE_CALLOC)
 check_function_exists(exit HAVE_EXIT)
 check_function_exists(fprintf HAVE_FPRINTF)
@@ -83,7 +79,6 @@
 check_function_exists(strsignal HAVE_STRSIGNAL)
 check_function_exists(sprintf HAVE_SNPRINTF)
 check_function_exists(strcmp HAVE_STRCMP)
-check_function_exists(strcpy HAVE_STRCPY)
 check_function_exists(vsnprintf HAVE_VSNPRINTF)

 if (WIN32)


Rebuild python version string to account for bempp/bempp#161

PYTHON_VERSION_STRING may contain garbage beyond the X.Y.Z version string. So
X.Y.Z is rebuilt from PYTHON_VERSION_MAJOR and friends.

- Closes bempp/bempp#161

--- modules/FindCoherentPython.cmake
+++ modules/FindCoherentPython.cmake
@@ -87,7 +87,10 @@
     paths_from_distutils_sysconfig()
 endif()

-find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT ${required} ${quiet})
+set(version_string "${PYTHON_VERSION_MAJOR}")
+set(version_string "${version_string}.${PYTHON_VERSION_MINOR}")
+set(version_string "${version_string}.${PYTHON_VERSION_PATCH}")
+find_package(PythonLibs ${version_string} EXACT ${required} ${quiet})
 if(NOT PYTHON_INCLUDE_DIRS)
     message(FATAL_ERROR "Could not find python include directory")
 endif()


Check for empty architectures before setting -arch flag.

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -410,9 +410,11 @@
 		if (NOT _architectures)
 			get_target_property(_architectures ${_target} OSX_ARCHITECTURES)
 		endif()
-		foreach (_arch ${_architectures})
-			list (APPEND _compileFlags "-arch" "${_arch}")
-		endforeach()
+		if (_architectures)
+			foreach (_arch ${_architectures})
+				list (APPEND _compileFlags "-arch" "${_arch}")
+			endforeach()
+		endif (_architectures)
 		if (CMAKE_OSX_SYSROOT)
 			if (CMAKE_${_language}_SYSROOT_FLAG)
 				list (APPEND _compileFlags "${CMAKE_${_language}_SYSROOT_FLAG}" "${CMAKE_OSX_SYSROOT}")


Cloned libpng to UniStuttgart for better availability;

added missing dependency for libpng

--- CMakeExternals.cmake
+++ CMakeExternals.cmake
@@ -98,9 +98,10 @@
     endif()
     ExternalProject_Get_Property(zlib_ext INSTALL_DIR)
     add_external_project(libpng_ext
-      GIT_REPOSITORY https://git.code.sf.net/p/libpng/code
+      GIT_REPOSITORY https://github.com/UniStuttgart-VISUS/libpng.git
       GIT_TAG "v1.6.34"
       DEPENDS zlib_ext
+      BUILD_BYPRODUCTS "<INSTALL_DIR>/${LIBPNG_DEBUG}" "<INSTALL_DIR>/${LIBPNG_RELEASE}"
       CMAKE_ARGS
         -DPNG_SHARED=OFF
         -DPNG_TESTS=OFF


Add whitespace in dependencies file. [ci skip].

--- Dependencies.cmake
+++ Dependencies.cmake
@@ -13,6 +13,7 @@
   if(NOT BUILD_DEPENDENCIES)
     find_package(CATCH)
   endif(NOT BUILD_DEPENDENCIES)
+
   if(NOT CATCH_FOUND)
     message(STATUS "Catch will be downloaded when ${CMAKE_PROJECT_NAME} is built")
     ExternalProject_Add(catch-lib


Have to fall back to manually update the download URL :-(

--- checkGetSuiteSparse.cmake
+++ checkGetSuiteSparse.cmake
@@ -61,8 +61,8 @@
 endif()

 if(SUITESPARSE_DL_LAST)
-
-	set(SUITESPARSE_URL "http://www.cise.ufl.edu/research/sparse/SuiteSparse/current/SuiteSparse.tar.gz")
+	# JL says: It seems the "current" symlink in the server is no longer available... we'll have to update this manually :-(
+	set(SUITESPARSE_URL "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.1.tar.gz")
 	set(SUITESPARSE_ZIP "${CMAKE_SOURCE_DIR}/SuiteSparse.tar.gz")
 	if(SUITESPARSE_URL AND SUITESPARSE_ZIP)

@@ -82,4 +82,4 @@
 		execute_process(COMMAND "${CMAKE_COMMAND}" -E remove "${SUITESPARSE_ZIP}")
 	endif()

-endif()+endif()


sip.cmake: Updated to 4.15.4

sip.cmake: Updated to 4.15.4

--- sip.cmake
+++ sip.cmake
@@ -14,10 +14,10 @@
 include (python)

 external_source (sip
-    4.14.1
-    sip-4.14.1.tar.gz
-    10f35f018ac105be78853952078bdf63
-    http://hivelocity.dl.sourceforge.net/project/pyqt/sip/sip-4.14.1)
+    4.15.4
+    sip-4.15.4.tar.gz
+    1d5c9e92bc7fca5ac11e088a4cf6c83d
+    http://hivelocity.dl.sourceforge.net/project/pyqt/sip/sip-4.15.4)

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


Allow setting of default cache url prefix so local caches can be specified

--- ExternalSource.cmake
+++ ExternalSource.cmake
@@ -5,12 +5,14 @@
 # and the 6th optional parameter is "FORCE", only this external download URL
 # will be used and the default FlyEM cache will be ignored.
 #
-# The output ${ABBREV}_URL is dependent on the variable USE_PROJECT_DOWNLOAD,
-# which contains a list of project abbreviations that should use original
-# project download links instead of our cached FlyEM downloads.
+# Uses the following CMake variables:
 #
-# Sets the following variables:
-#    DEFAULT_DOWNLOAD_SITE  URL of cache for required software tarballs
+#    USE_PROJECT_DOWNLOAD   A list of project abbreviations that should use
+#                               original project links instead of our cached
+#                               FlyEM downloads.
+#
+# Sets the following variable if not already set:
+#    DEFAULT_CACHE_URL      URL of cache for required software tarballs

 # The macro external_source(ABBREV) modifies/sets the following variables:
 #    APP_DEPENDENCIES       A list of all targets included (i.e., necessary)
@@ -28,7 +30,7 @@
 endif ()

 # URL of cache for required software tarballs
-set (DEFAULT_DOWNLOAD_SITE http://janelia-flyem.github.com/downloads)
+set (DEFAULT_CACHE_URL "http://janelia-flyem.github.com/downloads" CACHE TYPE STRING)

 # Define macro to set a number of variables per external project source
 macro (external_source ABBREV SRC_VERSION FILENAME MD5)
@@ -49,12 +51,12 @@
     set (${ABBREV}_RELEASE  ${SRC_VERSION})
     set (${ABBREV}_SRC_DIR  ${FLYEM_BUILD_DIR}/src/${${ABBREV}_NAME})

+    set (use_default TRUE)
     if (${ARGC} GREATER 4)
         set (PREFIX_URL ${ARGV4})
     endif ()

-    set (use_default TRUE)
-    if (${ARGC} EQUAL 6)
+    if (${ARGC} GREATER 5)
         if (${ARGV5} STREQUAL "FORCE")
             set (use_default FALSE)
         else ()
@@ -71,7 +73,7 @@
     endif (USE_PROJECT_DOWNLOAD AND PREFIX_URL)

     if (${use_default})
-        set (${ABBREV}_URL  ${DEFAULT_DOWNLOAD_SITE}/${FILENAME})
+        set (${ABBREV}_URL  ${DEFAULT_CACHE_URL}/${FILENAME})
     else ()
         set (${ABBREV}_URL  ${PREFIX_URL}/${FILENAME})
     endif ()


Set INSTALL_BUNDLE_FILES to ON for Mac builds.

Fixes https://github.com/OpenChemistry/avogadrolibs/issues/308

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

--- cmake/AvogadroCPack.cmake
+++ cmake/AvogadroCPack.cmake
@@ -30,6 +30,9 @@
 # Should we add extra install rules to make a self-contained bundle, this is
 # usually only required when attempting to create self-contained installers.
 option(INSTALL_BUNDLE_FILES "Add install rules to bundle files" OFF)
+if(APPLE)
+  set(INSTALL_BUNDLE_FILES ON)
+endif
 if(INSTALL_BUNDLE_FILES)
   # First the AvogadroLibs files that are not detected.
   find_package(AvogadroLibs REQUIRED NO_MODULE)


Remove warnings

Remove warnings

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -17,6 +17,7 @@
   # the flag -ftest-coverage causes nvcc to barf, so exclude that one
   if (CMAKE_COMPILER_IS_GNUCC)
     string (REPLACE "-ftest-coverage" "" TMP "${CMAKE_CXX_FLAGS}")
+    string (REPLACE "-ftemplate-depth-50" "" TMP "${TMP}")
     string (REPLACE " " "," TMP "${TMP}")
     set (CUDA_CXX_FLAGS ${CUDA_CXX_FLAGS} ${TMP})
   endif ()


Add version support in the libfabric find module

--- cmake/FindLIBFABRIC.cmake
+++ cmake/FindLIBFABRIC.cmake
@@ -28,7 +28,14 @@
 find_package(PkgConfig)
 if(PKG_CONFIG_FOUND)
   set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
-  pkg_check_modules(LIBFABRIC IMPORTED_TARGET libfabric)
+  if(LIBFABRIC_FIND_VERSION)
+    if(LIBFABRIC_VERSION_EXACT)
+      set(_pkg_ver_arg "=${LIBFABRIC_FIND_VERSION}")
+    else()
+      set(_pkg_ver_arg ">=${LIBFABRIC_FIND_VERSION}")
+    endif()
+  endif()
+  pkg_check_modules(LIBFABRIC IMPORTED_TARGET "libfabric${_pkg_ver_arg}")
 endif()

 if(_CMAKE_PREFIX_PATH)


Don't add _d suffix to UWP apps

Don't add _d suffix to UWP apps

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -292,7 +292,9 @@
 		target_link_libraries(${name} ${HALLEY_PROJECT_LIBS})
 	endif ()

-	set_target_properties(${name} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
+	if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore")
+		set_target_properties(${name} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
+	endif ()
 endfunction(halleyProject)

 function(halleyProjectCodegen name sources headers genDefinitions targetDir)


fix snap package filename guessing

fix snap package filename guessing

--- cmake/packages/snap.cmake
+++ cmake/packages/snap.cmake
@@ -7,6 +7,7 @@
 if(SNAPCRAFT_FOUND)
   set(SNAPCRAFT_TEMPLATE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Installation/Ubuntu")
   set(SNAPCRAFT_SOURCE_DIR "${CMAKE_BINARY_DIR}/_CPack_Packages/SNAP")
+  set(CPACK_SNAP_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}.snap")

   message(STATUS "Creating snap package")

@@ -34,13 +35,13 @@
   add_custom_target(snap
     COMMENT "create snap-package"
     COMMAND ${SNAP_EXE} snap
-    COMMAND ${CMAKE_COMMAND} -E copy ${CPACK_PACKAGE_FILE_NAME}.snap ${PROJECT_BINARY_DIR}
+    COMMAND ${CMAKE_COMMAND} -E copy ${SNAPCRAFT_SOURCE_DIR}/${CPACK_SNAP_PACKAGE_FILE_NAME} ${PROJECT_BINARY_DIR}
     DEPENDS TGZ_package
     WORKING_DIRECTORY ${SNAPCRAFT_SOURCE_DIR}
   )

   add_custom_target(copy_snap_packages
-    COMMAND ${CMAKE_COMMAND} -E copy ${CPACK_PACKAGE_FILE_NAME}.snap ${PACKAGE_TARGET_DIR})
+    COMMAND ${CMAKE_COMMAND} -E copy ${CPACK_SNAP_PACKAGE_FILE_NAME} ${PACKAGE_TARGET_DIR})

   list(APPEND COPY_PACKAGES_LIST copy_snap_packages)


Add VERIFY_SSL arg to conan_add_remote

Add VERIFY_SSL arg to conan_add_remote

--- conan.cmake
+++ conan.cmake
@@ -549,24 +549,28 @@

 function(conan_add_remote)
     # Adds a remote
-    # Arguments URL and NAME are required, INDEX and COMMAND are optional
+    # Arguments URL and NAME are required, INDEX, COMMAND and VERIFY_SSL are optional
     # Example usage:
     #    conan_add_remote(NAME bincrafters INDEX 1
-    #       URL https://api.bintray.com/conan/bincrafters/public-conan)
-    set(oneValueArgs URL NAME INDEX COMMAND)
+    #       URL https://api.bintray.com/conan/bincrafters/public-conan
+    #       VERIFY_SSL True)
+    set(oneValueArgs URL NAME INDEX COMMAND VERIFY_SSL)
     cmake_parse_arguments(CONAN "" "${oneValueArgs}" "" ${ARGN})

     if(DEFINED CONAN_INDEX)
         set(CONAN_INDEX_ARG "-i ${CONAN_INDEX}")
     endif()
-    if(CONAN_COMMAND)
-       set(CONAN_CMD ${CONAN_COMMAND})
+    if(DEFINED CONAN_COMMAND)
+        set(CONAN_CMD ${CONAN_COMMAND})
     else()
         conan_check(REQUIRED)
     endif()
-    message(STATUS "Conan: Adding ${CONAN_NAME} remote repository (${CONAN_URL})")
-    execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_URL}
-      ${CONAN_INDEX_ARG} -f)
+    set(CONAN_VERIFY_SSL_ARG "True")
+    if(DEFINED CONAN_VERIFY_SSL)
+        set(CONAN_VERIFY_SSL_ARG ${CONAN_VERIFY_SSL})
+    endif()
+    message(STATUS "Conan: Adding ${CONAN_NAME} remote repository (${CONAN_URL}) verify ssl (${CONAN_VERIFY_SSL_ARG})")
+    execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_INDEX_ARG} -f ${CONAN_URL} ${CONAN_VERIFY_SSL_ARG})
 endfunction()

 macro(conan_config_install)


Fix location of conanbuildinfo.cmake (#88) (#136)

In case ARGUMENTS_INSTALL_FOLDER is set, the location of conanbuildinfo.cmake is loaded from it.
See https://github.com/conan-io/cmake-conan/issues/88

--- conan.cmake
+++ conan.cmake
@@ -444,14 +444,16 @@
     else()
       set(_CONANBUILDINFO conanbuildinfo.cmake)
     endif()
+    if(ARGUMENTS_INSTALL_FOLDER)
+        set(_CONANBUILDINFOFOLDER ${ARGUMENTS_INSTALL_FOLDER})
+    else()
+        set(_CONANBUILDINFOFOLDER ${CMAKE_CURRENT_BINARY_DIR})
+    endif()
     # Checks for the existence of conanbuildinfo.cmake, and loads it
     # important that it is macro, so variables defined at parent scope
-    if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${_CONANBUILDINFO}")
+    if(EXISTS "${_CONANBUILDINFOFOLDER}/${_CONANBUILDINFO}")
       message(STATUS "Conan: Loading ${_CONANBUILDINFO}")
-      include(${CMAKE_CURRENT_BINARY_DIR}/${_CONANBUILDINFO})
-    elseif(EXISTS ${ARGUMENTS_INSTALL_FOLDER}/${_CONANBUILDINFO})
-      message(STATUS "Conan: Loading ${_CONANBUILDINFO}")
-      include(${ARGUMENTS_INSTALL_FOLDER}/${_CONANBUILDINFO})
+      include(${_CONANBUILDINFOFOLDER}/${_CONANBUILDINFO})
     else()
       message(FATAL_ERROR "${_CONANBUILDINFO} doesn't exist in ${CMAKE_CURRENT_BINARY_DIR}")
     endif()