OCCT dev version porting (6.7.2): attempt #2

--- salome_adm/cmake_files/FindCAS.cmake
+++ salome_adm/cmake_files/FindCAS.cmake
@@ -84,6 +84,9 @@
 FIND_LIBRARY(CAS_PTKernel PTKernel )
 #FIND_LIBRARY(CAS_StdLPlugin StdLPlugin )
 #FIND_LIBRARY(CAS_StdPlugin StdPlugin )
+IF(CAS_VERSION_STR VERSION_LESS "6.7.2")
+FIND_LIBRARY(CAS_TKAdvTools TKAdvTools )
+ENDIF()
 FIND_LIBRARY(CAS_TKBin TKBin )
 FIND_LIBRARY(CAS_TKBinL TKBinL )
 FIND_LIBRARY(CAS_TKBinTObj TKBinTObj )
@@ -166,65 +169,70 @@
 SET(CAS_TKSTL ${CAS_TKSTL_EA})
 SET(CAS_TKCAF ${CAS_TKCAF_EA})

+SET(_libs
+  CAS_FWOSPlugin
+  CAS_PTKernel
+  CAS_TKBin
+  CAS_TKBinL
+  CAS_TKBinTObj
+  CAS_TKBinXCAF
+  CAS_TKBO
+  CAS_TKBool
+  CAS_TKBRep
+  CAS_TKCAF
+  CAS_TKCDF
+  CAS_TKernel
+  CAS_TKFeat
+  CAS_TKFillet
+  CAS_TKG2d
+  CAS_TKG3d
+  CAS_TKGeomAlgo
+  CAS_TKGeomBase
+  CAS_TKHLR
+  CAS_TKIGES
+  CAS_TKLCAF
+  CAS_TKMath
+  CAS_TKMesh
+  CAS_TKMeshVS
+  CAS_TKNIS
+  CAS_TKOffset
+  CAS_TKOpenGl
+  CAS_TKPCAF
+  CAS_TKPLCAF
+  CAS_TKPrim
+  CAS_TKPShape
+  CAS_TKService
+  CAS_TKShapeSchema
+  CAS_TKShHealing
+  CAS_TKStdLSchema
+  CAS_TKStdSchema
+  CAS_TKSTEP
+  CAS_TKSTEP209
+  CAS_TKSTEPAttr
+  CAS_TKSTEPBase
+  CAS_TKSTL
+  CAS_TKTObj
+  CAS_TKTopAlgo
+  CAS_TKV3d
+  CAS_TKVRML
+  CAS_TKXCAF
+  CAS_TKXCAFSchema
+  CAS_TKXDEIGES
+  CAS_TKXDESTEP
+  CAS_TKXMesh
+  CAS_TKXml
+  CAS_TKXmlL
+  CAS_TKXmlTObj
+  CAS_TKXmlXCAF
+  CAS_TKXSBase
+)
+
+IF(CAS_VERSION_STR VERSION_LESS "6.7.2")
+  LIST(APPEND _libs CAS_TKAdvTools)
+ENDIF()
+
 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAS
-      REQUIRED_VARS CAS_INCLUDE_DIRS
-        CAS_FWOSPlugin
-        CAS_PTKernel
-        CAS_TKBin
-        CAS_TKBinL
-        CAS_TKBinTObj
-        CAS_TKBinXCAF
-        CAS_TKBO
-        CAS_TKBool
-        CAS_TKBRep
-        CAS_TKCAF
-        CAS_TKCDF
-        CAS_TKernel
-        CAS_TKFeat
-        CAS_TKFillet
-        CAS_TKG2d
-        CAS_TKG3d
-        CAS_TKGeomAlgo
-        CAS_TKGeomBase
-        CAS_TKHLR
-        CAS_TKIGES
-        CAS_TKLCAF
-        CAS_TKMath
-        CAS_TKMesh
-        CAS_TKMeshVS
-        CAS_TKNIS
-        CAS_TKOffset
-        CAS_TKOpenGl
-        CAS_TKPCAF
-        CAS_TKPLCAF
-        CAS_TKPrim
-        CAS_TKPShape
-        CAS_TKService
-        CAS_TKShapeSchema
-        CAS_TKShHealing
-        CAS_TKStdLSchema
-        CAS_TKStdSchema
-        CAS_TKSTEP
-        CAS_TKSTEP209
-        CAS_TKSTEPAttr
-        CAS_TKSTEPBase
-        CAS_TKSTL
-        CAS_TKTObj
-        CAS_TKTopAlgo
-        CAS_TKV3d
-        CAS_TKVRML
-        CAS_TKXCAF
-        CAS_TKXCAFSchema
-        CAS_TKXDEIGES
-        CAS_TKXDESTEP
-        CAS_TKXMesh
-        CAS_TKXml
-        CAS_TKXmlL
-        CAS_TKXmlTObj
-        CAS_TKXmlXCAF
-        CAS_TKXSBase
-)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAS REQUIRED_VARS CAS_INCLUDE_DIRS ${_libs})

 IF(CAS_FOUND AND NOT CAS_FIND_QUIETLY)
   IF(CAS_VERSION_DEVELOPMENT)


[FIX] Adding fallback for contribs for MinGW builds on 64 bit.

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

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

 	# Debug help.
     #if (NOT DEFINED SEQAN_CONTRIB_BASE)


[FIX] Improved contrib finding on Windows.

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

--- util/cmake/SeqAnContribs.cmake
+++ util/cmake/SeqAnContribs.cmake
@@ -38,29 +38,36 @@
     # The contrib version we look for.
 	set (_SEQAN_CONTRIB_VERSION D20111031)
 	set (_SEQAN_CONTRIB_DIR "seqan-contrib-${_SEQAN_CONTRIB_VERSION}")
+
+	# Determine architecture for the precompiled contribs.
+	if (CMAKE_GENERATOR MATCHES ".*Win64")
+		set (CONTRIB_ARCH "x64")
+	else ()
+		set (CONTRIB_ARCH "x86")
+	endif ()

 	# Try to figure out where the user installed the contrib.  We expect
 	# it to be either in C:\, or one of the Program Files dirs.
 	#
 	# First, look into Program Files on 64 bit.
 	if (DEFINED ENV{ProgramW6432})
-		if (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-x64")
-			set (SEQAN_CONTRIB_BASE "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-x64")
-		endif (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-x64")
+		if (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+			set (SEQAN_CONTRIB_BASE "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		endif (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 	endif (DEFINED ENV{ProgramW6432})
 	# Try out Program Files for 32bit Windows.
 	if (NOT DEFINED SEQAN_CONTRIB_BASE)
-		if (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-x86")
-			set (SEQAN_CONTRIB_BASE "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-x86")
-		endif (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-x86")
+		if (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+			set (SEQAN_CONTRIB_BASE "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		endif (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 	endif (NOT DEFINED SEQAN_CONTRIB_BASE)
 	# Try out on C:/.
 	if (NOT DEFINED SEQAN_CONTRIB_BASE)
-		if (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-x86")
-			set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-x86")
-		elseif (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-x64")
-			set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-x64")
-		endif (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-x86")
+		if (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+			set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		elseif (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+			set (SEQAN_CONTRIB_BASE "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+		endif (IS_DIRECTORY "C:/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
 	endif (NOT DEFINED SEQAN_CONTRIB_BASE)

 	# Debug help.


Update ITK Superbuild version to 5.1.2

Update ITK Superbuild version to 5.1.2

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -53,7 +53,7 @@
 mark_as_advanced(ITK_GIT_REPOSITORY)
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

-set(_DEFAULT_ITK_GIT_TAG "5e598141dbf059c9490b9e438ac424cfac47f172")
+set(_DEFAULT_ITK_GIT_TAG "v5.1.2")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


ENH: Use VTK7.0.0

ENH: Use VTK7.0.0

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -24,7 +24,7 @@
 set(extProjName VTK) #The find_package known name
 set(proj        VTK) #This local name

-set(${extProjName}_REQUIRED_VERSION "6.1")  #If a required version is necessary, then set this, else leave blank
+set(${extProjName}_REQUIRED_VERSION "7.0")  #If a required version is necessary, then set this, else leave blank

 # Set dependency list
 set(${proj}_DEPENDENCIES "")
@@ -161,7 +161,7 @@
     )
   ### --- End Project specific additions

-  set(${proj}_GIT_TAG "v6.1.0")
+  set(${proj}_GIT_TAG "v7.0.0")
   set(${proj}_REPOSITORY ${git_protocol}://vtk.org/VTK.git)

   ExternalProject_Add(${proj}
@@ -197,7 +197,7 @@
     -P ${VTKPatchScript}
     )

-set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/cmake/vtk-6.1)
+set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/cmake/vtk-7.0)

 else()
   if(${USE_SYSTEM_${extProjName}})


testsuite: also log the two filenames in diff in one line for scripting reasons

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

--- deal.II/cmake/macros/macro_add_test.cmake
+++ deal.II/cmake/macros/macro_add_test.cmake
@@ -218,6 +218,7 @@
               && echo "${_test_full}: RUN successful."
               && echo "${_test_full}: DIFF failed. ------ Source: ${_comparison_file}"
               && echo "${_test_full}: DIFF failed. ------ Result: ${_test_directory}/output"
+              && echo "Check ${_comparison_file} ${_test_directory}/output"
               && echo "${_test_full}: DIFF failed. ------ Diff:   ${_test_directory}/failing_diff"
               && echo "${_test_full}: DIFF failed. ------ First 8 lines of numdiff/diff output:"
               && cat ${_test_directory}/failing_diff | head -n 8


Version: Update development date

Version: Update development date

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 3)
-set(CastXML_VERSION_PATCH 20200213)
+set(CastXML_VERSION_PATCH 20200218)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


[cmake] fix config header missing info

[cmake] fix config header missing info

--- config.h.cmake
+++ config.h.cmake
@@ -1,4 +1,5 @@
-
+/* begin dune-stuff */
+// NEVER delete/alter above comment, dune's cmake crap relies on it

 /* We need this for the python bindings (there is no unsigned in python). */
 #define DUNE_STUFF_SSIZE_T long int
@@ -25,3 +26,4 @@
 #define DS_FINAL  ${DS_FINAL}
 #define HAVE_DUNE_FEM_PARAMETER_REPLACE 0
 /* end dune-stuff */
+// NEVER delete/alter above comment, dune's cmake crap relies on it


Remove CMakeVersion.cmake

Remove CMakeVersion.cmake

--- Modules/CMakeVersion.cmake
+++ Modules/CMakeVersion.cmake
@@ -1,29 +0,0 @@
-# - Cmake version detection.
-# This module is mainly for provide an unified environment for CMake 2.4
-# and up. You can use this module even you are normally with higher version
-# such like 2.6.
-#
-IF(NOT DEFINED _CMAKE_VERSION_CMAKE_)
-    SET(_CMAKE_VERSION_CMAKE_ "DEFINED")
-    INCLUDE(ManageMessage)
-    M_MSG(${M_INFO1} "CMAKE_HOST_SYSTEM=${CMAKE_HOST_SYSTEM}")
-    M_MSG(${M_INFO1} "CMAKE_HOST_SYSTEM_NAME=${CMAKE_HOST_SYSTEM_NAME}")
-    M_MSG(${M_INFO1}
-	"CMAKE_HOST_SYSTEM_PROCESSOR=${CMAKE_HOST_SYSTEM_PROCESSOR}")
-    M_MSG(${M_INFO1}
-	"CMAKE_HOST_SYSTEM_VERSION=${CMAKE_HOST_SYSTEM_VERSION}")
-    M_MSG(${M_INFO1} "CMAKE_SYSTEM=${CMAKE_SYSTEM}")
-    M_MSG(${M_INFO1} "CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}")
-    M_MSG(${M_INFO1}
-	"CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")
-    M_MSG(${M_INFO1}
-	"CMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}")
-    M_MSG(${M_INFO2} "CMAKE_MAJOR_VERSION=${CMAKE_MAJOR_VERSION}")
-    M_MSG(${M_INFO2} "CMAKE_MINOR_VERSION=${CMAKE_MINOR_VERSION}")
-    M_MSG(${M_INFO2} "CMAKE_PATCH_VERSION=${CMAKE_PATCH_VERSION}")
-
-    IF(NOT CMAKE_VERSION)
-	SET(CMAKE_VERSION "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}")
-    ENDIF(NOT CMAKE_VERSION)
-ENDIF(NOT DEFINED _CMAKE_VERSION_CMAKE_)
-


More meaningful message if patch executable is not found

--- CMakeExternals/QtMobility.cmake
+++ CMakeExternals/QtMobility.cmake
@@ -15,7 +15,7 @@
     "C:/Program Files (x86)/GnuWin32/bin")
   MARK_AS_ADVANCED(CTK_PATCH_EXECUTABLE)
   IF(NOT CTK_PATCH_EXECUTABLE)
-    MESSAGE(FATAL_ERROR "error: Patch is required to build ${PROJECT_NAME}. Set CTK_PATCH_EXECUTABLE")
+    MESSAGE(FATAL_ERROR "error: Patch is required to build ${proj}. Set CTK_PATCH_EXECUTABLE. If running Windows, you can download it here: http://gnuwin32.sourceforge.net/packages/patch.htm")
   ENDIF()

   # Configure patch script


PROTON-2215: Windows build fails if CMAKE_MODULE_PATH is not empty (#141)

The previously used CMAKE_MODULE_PATH is actually a list of directories,
and therefore should not be used here.

Co-authored-by: Matthieu Longo <4a96d5a20decf7efae2d35f97fb2bcfd6f817ded@murex.com>
Co-authored-by: Jiri Danek <f241cdc33da81a14cdc8ef90657723fbfcffa034@redhat.com>

--- tools/cmake/Modules/WindowsC99CheckDef.cmake
+++ tools/cmake/Modules/WindowsC99CheckDef.cmake
@@ -30,5 +30,6 @@
     TARGET qpid-proton
 	PRE_LINK
     COMMAND ${PYTHON_EXECUTABLE}
-	    ${CMAKE_MODULE_PATH}/WindowsC99SymbolCheck.py $<TARGET_FILE_DIR:qpid-proton>
+            ${CMAKE_CURRENT_LIST_DIR}/WindowsC99SymbolCheck.py
+            $<TARGET_FILE_DIR:qpid-proton>
     COMMENT "Checking for dangerous use of C99-violating functions")


[FIX] Enable /EShc for wintel

[FIX] Enable /EShc for wintel

Z:\seqan-builds-windows\seqan-src\include\seqan/basic/basic_exception.h(357):
warning #583: C++ exception handler found but /EHsc option was not specified
[Z:\seqan-builds-windows\seqan-builds\icc-16\tests\align_parallel\test_align_parallel_interface.vcxproj]
        SEQAN_TRY
        ^

--- util/cmake/seqan-config.cmake
+++ util/cmake/seqan-config.cmake
@@ -246,9 +246,8 @@
 # Visual Studio Setup
 if (COMPILER_MSVC OR COMPILER_WINTEL)
   # Enable intrinics (e.g. _interlockedIncrease)
-  # /EHsc will be set automatically for COMPILER_MSVC and COMPILER_WINTEL, but
   # COMPILER_CLANG (clang/c2 3.7) can not handle the /EHsc and /Oi flag
-  set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} /Oi)
+  set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} /EHsc /Oi)
 endif ()

 # ----------------------------------------------------------------------------


Fall back to system library version of antlr3c if dependencies version is not found

--- build/modules/FindANTLR.cmake
+++ build/modules/FindANTLR.cmake
@@ -83,6 +83,9 @@
         ENDIF()
     ELSE()
         FIND_LIBRARY(ANTLR_LIBRARIES NAMES antlr3c PATHS ${ANTLR_LIBRARY_DIRS} NO_DEFAULT_PATH)
+        IF(NOT ANTLR_LIBRARIES)
+            FIND_LIBRARY(ANTLR_LIBRARIES NAMES antlr3c PATHS ${ANTLR_LIBRARY_DIRS})
+        ENDIF()
     ENDIF()

     IF(ANTLR_LIBRARIES)


slight update

slight update

--- MemCheckTest.cmake
+++ MemCheckTest.cmake
@@ -19,9 +19,9 @@
 function(add_opt_memcheck_test _cond _targetname _testrunner)

   if (NOT ${_cond} OR NOT MEMCHECK_COMMAND)
-    add_test(${_targetname} ${_testrunner})
+    add_test(${_targetname} ${_testrunner} ${ARGV4})
   else ()
-    add_test(${_targetname} ${MEMCHECK_COMMAND} --leak-check=full --error-exitcode=5 ${ARGV2} --quiet ${_testrunner})
+    add_test(${_targetname} ${MEMCHECK_COMMAND} --leak-check=full --error-exitcode=5 ${ARGV4} --quiet ${_testrunner})
   endif()

 endfunction()


Split off 8.6.36

Split off 8.6.36

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 6 )
-set ( HPCC_POINT 35 )
+set ( HPCC_POINT 37 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.12.100

Split off 7.12.100

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 12 )
-set ( HPCC_POINT 99 )
+set ( HPCC_POINT 101 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Graph Control 5.0.0-rc2 Release Candidate 2

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 1 )
+set ( HPCC_SEQUENCE 2 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Version: Prefer Git information provided by 'git archive' exports

Update the approach from commit 60dc8284 (Version: Update version scheme
to distinguish release and dev versions, 2019-04-11, v0.2.0~2) to prefer
`export-subst` information.  This will allow exported source trees to be
imported into unrelated Git repositories while still using the original
upstream CastXML commit information.

--- src/Version.cmake
+++ src/Version.cmake
@@ -12,7 +12,12 @@
   set(CastXML_VERSION "${CastXML_VERSION}-rc${CastXML_VERSION_RC}")
 endif()

-if(EXISTS ${CastXML_SOURCE_DIR}/.git)
+# If this source was exported by 'git archive', use its commit info.
+set(git_info "$Format:%h %s$")
+
+# Otherwise, try to identify the current development source version.
+if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
+    AND EXISTS ${CastXML_SOURCE_DIR}/.git)
   find_package(Git QUIET)
   if(GIT_FOUND)
     macro(_git)
@@ -25,20 +30,17 @@
         )
     endmacro()
   endif()
-endif()

-# Try to identify the current development source version.
-if(COMMAND _git)
-  # Get the commit checked out in this work tree.
-  _git(log -n 1 HEAD "--pretty=format:%h %s" --)
-  set(git_info "${_git_out}")
-else()
-  # Get the commit exported by 'git archive'.
-  set(git_info "$Format:%h %s$")
+  # Try to identify the current development source version.
+  if(COMMAND _git)
+    # Get the commit checked out in this work tree.
+    _git(log -n 1 HEAD "--pretty=format:%h %s" --)
+    set(git_info "${_git_out}")
+  endif()
 endif()

 # Extract commit information if available.
-if(git_info MATCHES "^([0-9a-f]+) (.*)$")
+if(git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* (.*)$")
   set(git_hash "${CMAKE_MATCH_1}")
   set(git_subject "${CMAKE_MATCH_2}")


cleaned up cmake file, reactivated working test

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -23,19 +23,18 @@
    mitkTrackingDeviceTest.cpp
    mitkTrackingToolTest.cpp
    mitkVirtualTrackingDeviceTest.cpp
-
+   mitkNavigationDataPlayerTest.cpp
    mitkTrackingDeviceSourceTest.cpp

    # ------------------ Navigation Tool Management Tests -------------------
    mitkNavigationToolStorageTest.cpp
    mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
-   #mitkNavigationToolTest.cpp
+   mitkNavigationToolTest.cpp
    mitkNavigationToolReaderAndWriterTest.cpp #deactivated, see bug #3461
    # -----------------------------------------------------------------------

    # ------------------ Deavtivated Tests ----------------------------------
-   mitkNavigationDataPlayerTest.cpp  # deactivated, see bug 3073
-   #mitkNavigationDataSourceTest.cpp   # deactivated because of  bug #2323
+
    # -----------------------------------------------------------------------
 )


update

update

--- modules/fmt.cmake
+++ modules/fmt.cmake
@@ -6,7 +6,7 @@
     # C4127: conditional expression is constant
     set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4127")
   else()
-    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-gnu-string-literal-operator-template")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-gnu-string-literal-operator-template -Wno-shadow")
   endif()
   add_library(fmt ${SOURCE_FILES})
   target_include_directories(fmt PUBLIC "fmt/include")


Fix initial install of lua dependencies.

--- build/cmake/core-lua-deps.cmake
+++ build/cmake/core-lua-deps.cmake
@@ -42,29 +42,39 @@
   INSTALL_COMMAND install -D -m 644 <SOURCE_DIR>/shcache.lua ${VENDOR_LUA_DIR}/shcache.lua
 )

+set(
+  LUA_DEPS
+  lua_resty_dns_cache
+  lua_resty_logger_socket
+  lua_resty_shcache
+  luarock_argparse
+  luarock_inspect
+  luarock_libcidr-ffi
+  luarock_lua-cmsgpack
+  luarock_lua-iconv
+  luarock_lua-resty-auto-ssl
+  luarock_lua-resty-http
+  luarock_lua-resty-uuid
+  luarock_luaposix
+  luarock_luasocket
+  luarock_luatz
+  luarock_lustache
+  luarock_lyaml
+  luarock_penlight
+)
+
+# Also depend on the internal stamp files used by ExternalProject_Add, since
+# add_custom_command seems to require files to properly work when updates
+# occur (we can't just specify the ExternalProject_Add target names or
+# updates aren't detected). But we still need to depend on the project names
+# directly for the initial install dependency ordering.
+foreach(LUA_DEP ${LUA_DEPS})
+  list(APPEND LUA_DEPS_DEPENDS ${LUA_DEP})
+  list(APPEND LUA_DEPS_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${LUA_DEP}-complete)
+endforeach()
+
 add_custom_command(
   OUTPUT ${STAMP_DIR}/core-lua-deps
-  # Depend on the internal stamp files used by ExternalProject_Add, since
-  # add_custom_command seems to require files to properly work when updates
-  # occur (we can't just specify the ExternalProject_Add target names or
-  # updates aren't detected).
-  DEPENDS
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_argparse-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_inspect-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_libcidr-ffi-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_lua-cmsgpack-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_lua-iconv-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_lua-resty-auto-ssl-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_lua-resty-http-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_lua-resty-uuid-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_luaposix-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_luasocket-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_luatz-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_lustache-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_lyaml-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/luarock_penlight-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/lua_resty_dns_cache-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/lua_resty_logger_socket-complete
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/lua_resty_shcache-complete
+  DEPENDS ${LUA_DEPS_DEPENDS}
   COMMAND touch ${STAMP_DIR}/core-lua-deps
 )


Debugging arpack again

Debugging arpack again

Former-commit-id: 0ccf64b1d9c974a99ec8dea4e38a8afd4e7e2f01

--- cmake-modules/Fetch_h5pp.cmake
+++ cmake-modules/Fetch_h5pp.cmake
@@ -10,7 +10,7 @@
     list(APPEND H5PP_CMAKE_OPTIONS  -DEigen3_DIR:PATH=${CMAKE_INSTALL_PREFIX}/Eigen3)
     list(APPEND H5PP_CMAKE_OPTIONS  -DEIGEN3_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/Eigen3/include/eigen3)
     list(APPEND H5PP_CMAKE_OPTIONS  -DH5PP_DIRECTORY_HINTS:PATH=${DIRECTORY_HINTS})
-    list(APPEND H5PP_CMAKE_OPTIONS  "-Dh5pp_DIR:PATH=$ENV{CONDA_PREFIX};$ENV{HOME}/anaconda3")
+    list(APPEND H5PP_CMAKE_OPTIONS  "-Dhdf5_DIR:PATH=$ENV{CONDA_PREFIX};$ENV{HOME}/anaconda3")
     build_dependency(h5pp "${H5PP_CMAKE_OPTIONS}")
     find_package(h5pp HINTS ${DIRECTORY_HINTS} PATHS $ENV{H5PP_DIR} ${CMAKE_INSTALL_PREFIX}  PATH_SUFFIXES h5pp)
     if(h5pp_FOUND AND TARGET h5pp::h5pp)


cmake: Disable broken latex doc generation.

--- cmake/Modules/UseDoxygen.cmake
+++ cmake/Modules/UseDoxygen.cmake
@@ -63,27 +63,27 @@
     set(DOXYFILE_PDFLATEX FALSE)
     set(DOXYFILE_DOT FALSE)

-    find_package(LATEX)
-    if(LATEX_COMPILER AND MAKEINDEX_COMPILER)
-        set(DOXYFILE_LATEX TRUE)
-        usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex")
+    #find_package(LATEX)
+    #if(LATEX_COMPILER AND MAKEINDEX_COMPILER)
+    #    set(DOXYFILE_LATEX TRUE)
+    #    usedoxygen_set_default(DOXYFILE_LATEX_DIR "latex")

-        set_property(DIRECTORY APPEND PROPERTY
-                ADDITIONAL_MAKE_CLEAN_FILES
-                "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
+    #    set_property(DIRECTORY APPEND PROPERTY
+    #            ADDITIONAL_MAKE_CLEAN_FILES
+    #            "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")

-        if(PDFLATEX_COMPILER)
-            set(DOXYFILE_PDFLATEX TRUE)
-        endif()
-        if(DOXYGEN_DOT_EXECUTABLE)
-            set(DOXYFILE_DOT TRUE)
-        endif()
+    #    if(PDFLATEX_COMPILER)
+    #        set(DOXYFILE_PDFLATEX TRUE)
+    #    endif()
+    #    if(DOXYGEN_DOT_EXECUTABLE)
+    #        set(DOXYFILE_DOT TRUE)
+    #    endif()

-        add_custom_command(TARGET doxygen
-            POST_BUILD
-            COMMAND ${CMAKE_MAKE_PROGRAM}
-            WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
-    endif()
+    #    add_custom_command(TARGET doxygen
+    #        POST_BUILD
+    #        COMMAND ${CMAKE_MAKE_PROGRAM}
+    #        WORKING_DIRECTORY "${DOXYFILE_OUTPUT_DIR}/${DOXYFILE_LATEX_DIR}")
+    #endif()

     configure_file(${DOXYFILE_IN} ${CMAKE_CURRENT_BINARY_DIR}/doxy.config ESCAPE_QUOTES IMMEDIATE @ONLY)
     if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doxy.trac.in)


update FindOracle.cmake to mloskot's latest

--- cmake/modules/FindOracle.cmake
+++ cmake/modules/FindOracle.cmake
@@ -10,7 +10,7 @@
 #                       but not for general use are
 # ORACLE_VERSION     = version of library which was found, e.g. "1.2.5"
 #
-# Copyright (c) 2009 Mateusz Loskot <mateusz@loskot.net>
+# Copyright (c) 2009-2013 Mateusz Loskot <mateusz@loskot.net>
 #
 # Developed with inspiration from Petr Vanek <petr@scribus.info>
 # who wrote similar macro for TOra - http://torasql.com/
@@ -22,63 +22,58 @@
 #
 ###############################################################################

-if(ORACLE_INCLUDE_DIR AND (ORACLE_LIBRARIES OR ORACLE_LIBRARY))
-  # Already in cache, be silent
-  set(ORACLE_FIND_QUIETLY TRUE)
-endif()
+# If ORACLE_HOME not defined, assume Oracle libraries not available
+if(DEFINED ENV{ORACLE_HOME})

-if(NOT ORACLE_FIND_QUIETLY)
-  message(STATUS "Searching for Oracle ${Oracle_FIND_VERSION}+ OCI client library")
-endif()
+  set(ORACLE_HOME $ENV{ORACLE_HOME})
+  message("ORACLE_HOME=${ORACLE_HOME}")

-if(NOT DEFINED ENV{ORACLE_HOME})
-  message(FATAL_ERROR "Missing environment variable ORACLE_HOME with location of Oracle installation")
-endif()
+  find_path(ORACLE_INCLUDE_DIR
+    NAMES oci.h
+    PATHS
+    ${ORACLE_HOME}/rdbms/public
+    ${ORACLE_HOME}/include
+    ${ORACLE_HOME}/sdk/include  # Oracle SDK
+    ${ORACLE_HOME}/OCI/include) # Oracle XE on Windows

-set(ORACLE_HOME $ENV{ORACLE_HOME})
+  set(ORACLE_OCI_NAMES clntsh libclntsh oci)
+  set(ORACLE_NNZ_NAMES nnz10 libnnz10 nnz11 libnnz11 ociw32)
+  set(ORACLE_OCCI_NAMES libocci occi oraocci10 oraocci11)

-find_path(ORACLE_INCLUDE_DIR
-  oci.h
-  PATHS
-  ${ORACLE_HOME}/rdbms/public
-  ${ORACLE_HOME}/include
-  ${ORACLE_HOME}/sdk/include
-  ${ORACLE_HOME}/OCI/include )
+  set(ORACLE_LIB_DIR
+    ${ORACLE_HOME}/lib
+    ${ORACLE_HOME}/sdk/lib       # Oracle SDK
+    ${ORACLE_HOME}/sdk/lib/msvc
+    ${ORACLE_HOME}/OCI/lib/msvc) # Oracle XE on Windows

-set(ORACLE_OCI_NAMES clntsh libclntsh oci)
-set(ORACLE_NNZ_NAMES nnz10 libnnz10 nnz11 libnnz11 ociw32)
-set(ORACLE_OCCI_NAMES libocci occi oraocci10 oraocci11)
+  find_library(ORACLE_OCI_LIBRARY  NAMES ${ORACLE_OCI_NAMES} PATHS ${ORACLE_LIB_DIR})
+  find_library(ORACLE_OCCI_LIBRARY NAMES ${ORACLE_OCCI_NAMES} PATHS ${ORACLE_LIB_DIR})
+  find_library(ORACLE_NNZ_LIBRARY NAMES ${ORACLE_NNZ_NAMES} PATHS ${ORACLE_LIB_DIR})

-set(ORACLE_LIB_DIR
-  ${ORACLE_HOME}
-  ${ORACLE_HOME}/lib
-  ${ORACLE_HOME}/OCI/lib/MSVC)
+  set(ORACLE_LIBRARY ${ORACLE_OCI_LIBRARY} ${ORACLE_OCCI_LIBRARY} ${ORACLE_NNZ_LIBRARY})

-find_library(ORACLE_OCI_LIBRARY  NAMES ${ORACLE_OCI_NAMES} PATHS ${ORACLE_LIB_DIR})
-if (NOT MSVC)
-find_library(ORACLE_OCCI_LIBRARY NAMES ${ORACLE_OCCI_NAMES} PATHS ${ORACLE_LIB_DIR})
-find_library(ORACLE_NNZ_LIBRARY NAMES ${ORACLE_NNZ_NAMES} PATHS ${ORACLE_LIB_DIR})
-endif(NOT MSVC)
+  if(APPLE)
+    set(ORACLE_OCIEI_NAMES libociei ociei)

-set(ORACLE_LIBRARY ${ORACLE_OCI_LIBRARY} ${ORACLE_OCCI_LIBRARY} ${ORACLE_NNZ_LIBRARY})
+    find_library(ORACLE_OCIEI_LIBRARY
+      NAMES libociei ociei
+      PATHS ${ORACLE_LIB_DIR})

-if(APPLE)
-  set(ORACLE_OCIEI_NAMES libociei ociei)
+    if(ORACLE_OCIEI_LIBRARY)
+      set(ORACLE_LIBRARY ${ORACLE_LIBRARY} ${ORACLE_OCIEI_LIBRARY})
+    else(ORACLE_OCIEI_LIBRARY)
+      message(STATUS
+        "libociei.dylib is not found. It may cause crash if you are building BUNDLE")
+    endif()
+  endif()

-  find_library(ORACLE_OCIEI_LIBRARY
-    NAMES libociei ociei
-    PATHS ${ORACLE_LIB_DIR})
+  set(ORACLE_LIBRARIES ${ORACLE_LIBRARY})

-  if(ORACLE_OCIEI_LIBRARY)
-    set(ORACLE_LIBRARY ${ORACLE_LIBRARY} ${ORACLE_OCIEI_LIBRARY})
-  else(ORACLE_OCIEI_LIBRARY)
-    message(STATUS "libociei.dylib is not found. It may cause crash if you are building BUNDLE")
-  endif()
-endif()
-
-set(ORACLE_LIBRARIES ${ORACLE_LIBRARY})
+endif(DEFINED ENV{ORACLE_HOME})

 # Handle the QUIETLY and REQUIRED arguments and set ORACLE_FOUND to TRUE
 # if all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(ORACLE DEFAULT_MSG ORACLE_LIBRARY ORACLE_INCLUDE_DIR)
+
+mark_as_advanced(ORACLE_INCLUDE_DIR ORACLE_LIBRARY)


Added support for ICC 15

Added support for ICC 15

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -166,6 +166,12 @@
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${BIT_ENVIRONMENT} -Wl,--no-undefined")
   endif()

+  if(ICC_MAJOR EQUAL 15)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873 -wd1292 -wd3373 -wd597 -wd1098 -wd1478")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${BIT_ENVIRONMENT} -Wl,--no-undefined")
+  endif()
+
   set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
   set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")


Fix build on Mac OS (#2731)

Fix build on Mac OS (#2731)

mac os ld doesn't support --while-archive, correct option is -all_load

--- cmake/onnxruntime_server.cmake
+++ cmake/onnxruntime_server.cmake
@@ -92,7 +92,11 @@

 add_library(server_grpc_proto ${grpc_srcs})
 target_include_directories(server_grpc_proto PUBLIC $<TARGET_PROPERTY:protobuf::libprotobuf,INTERFACE_INCLUDE_DIRECTORIES> "${CMAKE_CURRENT_BINARY_DIR}" ${CMAKE_CURRENT_BINARY_DIR}/onnx PRIVATE)
-set(grpc_reflection -Wl,--whole-archive grpc++_reflection -Wl,--no-whole-archive)
+if(APPLE)
+  set(grpc_reflection -Wl,-all_load grpc++_reflection -Wl,-noall_load)
+else()
+  set(grpc_reflection -Wl,--whole-archive grpc++_reflection -Wl,--no-whole-archive)
+endif()
 set(grpc_static_libs grpc++ grpcpp_channelz)
 target_link_libraries(server_grpc_proto ${grpc_static_libs})
 add_dependencies(server_grpc_proto server_proto)


require python 2.7 in order to build the python interface

--- cmake/oskar_dependencies.cmake
+++ cmake/oskar_dependencies.cmake
@@ -45,8 +45,8 @@
 find_package(CFitsio QUIET)  # liboskar_fits
 find_package(Matlab QUIET)   # mex functions
 #find_package(PNG QUIET)     # For writing PNG images.
-find_package(PythonInterp QUIET) # For python interface
-find_package(PythonLibs QUIET)   # For python interface
+find_package(PythonInterp 2.7 QUIET) # For python interface
+find_package(PythonLibs 2.7 QUIET)   # For python interface
 find_package(NumPy QUIET)        # For python interface

 if (PYTHONLIBS_FOUND AND NUMPY_FOUND AND PYTHONINTERP_FOUND AND PYTHON_VERSION_MAJOR EQUAL 2)
@@ -141,12 +141,12 @@
     message("===============================================================================")
 endif()

-#if (NOT PYTHON_FOUND)
-#    message("===============================================================================")
-#    message("-- WARNING: Python not found: "
-#            "Unable to build the OSKAR Python interface.")
-#    message("===============================================================================")
-#endif()
+#if (NOT PYTHON_FOUND)
+#    message("===============================================================================")
+#    message("-- WARNING: Python 2.7 not found: "
+#            "Unable to build the OSKAR Python interface.")
+#    message("===============================================================================")
+#endif()

 # Prints a message saying which libraries are being built.
 message("===============================================================================")
@@ -182,9 +182,9 @@
 if (MATLAB_FOUND AND CUDA_FOUND)
     message("-- INFO:   - OSKAR MATLAB interface functions")
 endif()
-#if (PYTHON_FOUND AND CUDA_FOUND)
-#    message("-- INFO:   - OSKAR Python interface")
-#endif()
+if (PYTHON_FOUND AND CUDA_FOUND)
+    message("-- INFO:   - OSKAR Python interface")
+endif()
 message("===============================================================================")

@@ -198,9 +198,9 @@
 if (MATLAB_FOUND AND CUDA_FOUND)
 message("-- INFO:   - MATLAB interface  ${CMAKE_INSTALL_PREFIX}/${OSKAR_MATLAB_INSTALL_DIR}")
 endif()
-#if (PYTHON_FOUND AND CUDA_FOUND)
-#message("-- INFO:   - Python interface  ${CMAKE_INSTALL_PREFIX}/${OSKAR_PYTHON_INSTALL_DIR}")
-#endif()
+if (PYTHON_FOUND AND CUDA_FOUND)
+message("-- INFO:   - Python interface  ${CMAKE_INSTALL_PREFIX}/${OSKAR_PYTHON_INSTALL_DIR}")
+endif()
 #message("-- NOTE: These paths can be changed using: '-DCMAKE_INSTALL_PREFIX=<path>'")
 message("===============================================================================")


newlines

newlines

--- cmake/setup_write_config.cmake
+++ cmake/setup_write_config.cmake
@@ -49,14 +49,17 @@
   FILE(APPEND ${_log_detailed} "${ARGN}")
   FILE(APPEND ${_log_summary} "${ARGN}")
 ENDMACRO()
+
 MACRO(_detailed)
   # Only write to detailed.log:
   FILE(APPEND ${_log_detailed} "${ARGN}")
 ENDMACRO()
+
 MACRO(_summary)
   # Only write to summary.log:
   FILE(APPEND ${_log_summary} "${ARGN}")
 ENDMACRO()
+
 MACRO(_featurelog)
   # Only write to deal.IIFeatureConfig.cmake:
   FILE(APPEND ${_log_feature} "${ARGN}")


Unit test fix

Unit test fix

A missing macro definition is added to the unit-test cmake file for
LoRaPHY class.

--- UNITTESTS/features/lorawan/loraphy/unittest.cmake
+++ UNITTESTS/features/lorawan/loraphy/unittest.cmake
@@ -37,5 +37,5 @@
 )

-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8 -DMBED_CONF_LORA_DUTY_CYCLE_ON_JOIN=true")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8 -DMBED_CONF_LORA_DUTY_CYCLE_ON_JOIN=true")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8 -DMBED_CONF_LORA_DUTY_CYCLE_ON_JOIN=true -DMBED_CONF_LORA_WAKEUP_TIME=5")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_UPLINK_PREAMBLE_LENGTH=8 -DMBED_CONF_LORA_DUTY_CYCLE_ON_JOIN=true -DMBED_CONF_LORA_WAKEUP_TIME=5")


ENH: Update Cppcheck to solve configuration issue.

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -33,7 +33,7 @@

 # Cppcheck
 set( Cppcheck_URL ${github_protocol}://github.com/KitwareMedical/cppcheck.git )
-set( Cppcheck_HASH_OR_TAG 08e242fc2a4c1105b836668c786592dcbd7b065b )
+set( Cppcheck_HASH_OR_TAG 04abdc98b089aee5d23795f78a9e335ac176e017 )

 # TubeTK Image Viewer
 set( ImageViewer_URL


BUG: Fix the ITK clone URL.

BUG: Fix the ITK clone URL.

This is a follow-up to
KitwareMedical/TubeTK@2b3fe664eee25653dc0c391feae95ff87079d768

The github.com/Slicer/ITK.git repository does not have a copy of the ITK
master branch and the commit is missing.

This causes the build failure:

Error
  CMake Error at Stamp/ITK/ITK-download-Release.cmake:16 (message):
    Command failed: 1

     'C:/Program Files (x86)/CMake/bin/cmake.exe' '-P' '/.../TubeTK-Release/tmp/ITK/ITK-gitclone.cmake'

    See also

      /.../TubeTK-Release/Stamp/ITK/ITK-download-*.log

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -86,7 +86,7 @@
 set( CTK_HASH_OR_TAG caaf2c8cdee08e95bc823ab92865e1e9153dcc04 )

 # Insight Segmentation and Registration Toolkit
-set( ITK_URL ${github_protocol}://github.com/Slicer/ITK.git )
+set( ITK_URL ${github_protocol}://github.com/InsightSoftwareConsortium/ITK.git )
 set( ITK_HASH_OR_TAG 58a7203f9ec431f9fe71ac087d0bd7e02b495634 )

 # Slicer Execution Model


Fix dependencies between Boost dylibs

Fix dependencies between Boost dylibs

--- CMakeExternals/Boost-post_install-APPLE.cmake
+++ CMakeExternals/Boost-post_install-APPLE.cmake
@@ -5,4 +5,9 @@
 foreach(boost_dylib ${boost_dylibs})
   get_filename_component(boost_dylib ${boost_dylib} NAME)
   execute_process(COMMAND install_name_tool -id @rpath/${boost_dylib} ${boost_dylib})
+
+  foreach(other_boost_dylib ${boost_dylibs})
+    get_filename_component(other_boost_dylib ${other_boost_dylib} NAME)
+    execute_process(COMMAND install_name_tool -change ${other_boost_dylib} @rpath/${other_boost_dylib} ${boost_dylib})
+  endforeach()
 endforeach()


Split off 8.2.8

Split off 8.2.8

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 7 )
+set ( HPCC_POINT 9 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.2.60

Split off 8.2.60

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 59 )
+set ( HPCC_POINT 61 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Graph Control 5.4.2-1 Gold

Graph Control 5.4.2-1 Gold

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -6,8 +6,8 @@

 set ( HPCC_MINOR 4 )
 set ( HPCC_POINT 2 )
-set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 2 )
+set ( HPCC_MATURITY "release" )
+set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Split off 7.8.74

Split off 7.8.74

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 73 )
+set ( HPCC_POINT 75 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Graph Control 5.6.0-1 Gold

Graph Control 5.6.0-1 Gold

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_MAJOR 5 )
 set ( HPCC_MINOR 6 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "rc" )
+set ( HPCC_MATURITY "release" )
 set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )


WRG: warning not necessary since OpenJPEG driver still exists in OTB

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -111,8 +111,8 @@
 	else()

 		if (NOT GDAL_HAS_J2K_JG2000 AND NOT GDAL_HAS_J2K_OPJG AND NOT GDAL_HAS_J2K_KAK AND NOT GDAL_HAS_J2K_ECW)
-		message(WARNING "No Jpeg2000 driver found (compatible drivers are : OpenJpeg, Kakadu, ECW).")
-		set(GDAL_QUALIFIES FALSE)
+		message(STATUS "No Jpeg2000 driver found (compatible drivers are : OpenJpeg, Kakadu, ECW).")
+		#set(GDAL_QUALIFIES FALSE)
 		endif()

 		if (NOT GDAL_HAS_JPEG)


fix(flexisip.spec): please, only use epoch when you understand its meaning

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -16,8 +16,6 @@
 Version:       @PROJECT_VERSION@
 Release:       %build_number%{?dist}

-#to be alined with redhat which changed epoc to 1 for an unknown reason
-Epoch:         1
 License:       AGPLv3
 Group:         Applications/Communications
 URL:           http://flexisip.org


Update configure check to emulate AC_HEADER_DIRENT

That way the variables HAVE_SYS_NDIR_H/HAVE_SYS_DIR_H/HAVE_NDIR_H
will set only if HAVE_DIRENT_H have not been set.

See http://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/Particular-Headers.html

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -24,6 +24,14 @@
   endif(${cond})
 endmacro(ADD_COND)

+# Emulate AC_HEADER_DIRENT
+check_include_files(dirent.h HAVE_DIRENT_H)
+if(NOT HAVE_DIRENT_H)
+  check_include_files(sys/ndir.h HAVE_SYS_NDIR_H)
+  check_type_exists(DIR sys/dir.h HAVE_SYS_DIR_H)
+  check_include_files(ndir.h HAVE_NDIR_H)
+endif(NOT HAVE_DIRENT_H)
+
 check_include_files(asm/types.h HAVE_ASM_TYPES_H)
 check_include_files(arpa/inet.h HAVE_ARPA_INET_H)
 check_include_files(bluetooth/bluetooth.h HAVE_BLUETOOTH_BLUETOOTH_H)
@@ -31,7 +39,6 @@
 check_include_files(conio.h HAVE_CONIO_H)
 check_include_files(curses.h HAVE_CURSES_H)
 check_include_files(direct.h HAVE_DIRECT_H)
-check_include_files(dirent.h HAVE_DIRENT_H)
 check_include_files(dlfcn.h HAVE_DLFCN_H)
 check_include_files(errno.h HAVE_ERRNO_H)
 check_include_files(fcntl.h HAVE_FCNTL_H)
@@ -55,7 +62,6 @@

 check_include_files(memory.h HAVE_MEMORY_H)
 check_include_files(ncurses.h HAVE_NCURSES_H)
-check_include_files(ndir.h HAVE_NDIR_H)
 check_include_files(netdb.h HAVE_NETDB_H)
 check_include_files(netinet/in.h HAVE_NETINET_IN_H)
 check_include_files(netpacket/packet.h HAVE_NETPACKET_PACKET_H)
@@ -83,7 +89,6 @@
 check_include_files(sys/mkdev.h HAVE_SYS_MKDEV_H)
 check_include_files(sys/mman.h HAVE_SYS_MMAN_H)
 check_include_files(sys/modem.h HAVE_SYS_MODEM_H)
-check_include_files(sys/ndir.h HAVE_SYS_NDIR_H)
 check_include_files(sys/param.h HAVE_SYS_PARAM_H)
 check_include_files(sys/poll.h HAVE_SYS_POLL_H)
 check_include_files(sys/resource.h HAVE_SYS_RESOURCE_H)
@@ -367,8 +372,6 @@
 check_symbol_exists(wcscoll      "${CFG_HEADERS}" HAVE_WCSCOLL)
 check_symbol_exists(_getpty      "${CFG_HEADERS}" HAVE__GETPTY)

-check_type_exists(DIR sys/dir.h HAVE_SYS_DIR_H)
-
 check_struct_has_member("struct stat" st_mtim.tv_nsec "${CFG_HEADERS}" HAVE_STAT_TV_NSEC)
 check_struct_has_member("struct stat" st_mtimensec "${CFG_HEADERS}"    HAVE_STAT_TV_NSEC2)
 check_struct_has_member("struct stat" st_birthtime "${CFG_HEADERS}"    HAVE_STRUCT_STAT_ST_BIRTHTIME)


pyconfig.h: Add missing test for SETPGRP_HAVE_ARG

--- cmake/ConfigureChecks.cmake
+++ cmake/ConfigureChecks.cmake
@@ -1765,6 +1765,8 @@

 check_c_source_compiles("#include <unistd.h>\n int main() {getpgrp(0);}" GETPGRP_HAVE_ARG)

+check_c_source_compiles("#include <unistd.h>\n int main() {setpgrp(0, 0);}" SETPGRP_HAVE_ARG)
+
 if(IS_PY3)
 # Check for inline
 set(USE_INLINE 0)


cmake: Set the OSX versions for the tarballs correctly

Signed-off-by: Robin Getz <c66e5a86ef9317cf35cecb2ed063996b2100ed4b@analog.com>

--- cmake/DarwinPackaging.cmake
+++ cmake/DarwinPackaging.cmake
@@ -3,4 +3,10 @@
 set(CPACK_SET_DESTDIR ON)
 set(CPACK_GENERATOR TGZ)

+set(CPACK_PACKAGE_VERSION_MAJOR ${LIBIIO_VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${LIBIIO_VERSION_MINOR})
+set(CPACK_PACKAGE_VERSION_PATCH g${LIBIIO_VERSION_GIT})
+set(CPACK_BUNDLE_NAME libiio)
+set(CPACK_PACKAGE_VERSION ${LIBIIO_VERSION})
+
 include(CPack)


Updated FindGaussianLib.cmake script.

Updated FindGaussianLib.cmake script.

--- cmake/FindGaussianLib.cmake
+++ cmake/FindGaussianLib.cmake
@@ -4,8 +4,46 @@

 # === Options ===

+option(GaussLib_REAL_DOUBLE "Use double precision floating-points for real types" OFF)
+option(GaussLib_ASSERT_EXCEPTION "Enable runtime exceptions for assertions" OFF)
+option(GaussLib_ENABLE_SWIZZLE_OPERATOR "Enable swizzle operator for Vector class" OFF)
+option(GaussLib_ENABLE_INVERSE_OPERATOR "Enable inverse matrix operator (A ^ -1)" OFF)
+option(GaussLib_DISABLE_AUTO_INIT "Disable automatic initialization" OFF)
+option(GaussLib_ROW_MAJOR_STORAGE "Use row-major storage (column-major storage otherwise)" OFF)
+option(GaussLib_ROW_VECTORS "Use row-vectors (column-vectors otherwise)" OFF)
 option(GaussLib_ENABLE_SSE "Enable SSE support" OFF)
 option(GaussLib_ENABLE_SSE2 "Enable SSE2 support" OFF)
+
+
+# === Macros ===
+
+if(GaussLib_REAL_DOUBLE)
+	add_definitions(-DGS_REAL_DOUBLE)
+endif()
+
+if(GaussLib_ASSERT_EXCEPTION)
+	add_definitions(-DGS_ASSERT_EXCEPTION)
+endif()
+
+if(GaussLib_ENABLE_SWIZZLE_OPERATOR)
+	add_definitions(-DGS_ENABLE_SWIZZLE_OPERATOR)
+endif()
+
+if(GaussLib_ENABLE_INVERSE_OPERATOR)
+	add_definitions(-DGS_ENABLE_INVERSE_OPERATOR)
+endif()
+
+if(GaussLib_DISABLE_AUTO_INIT)
+	add_definitions(-DGS_DISABLE_AUTO_INIT)
+endif()
+
+if(GaussLib_ROW_MAJOR_STORAGE)
+	add_definitions(-DGS_ROW_MAJOR_STORAGE)
+endif()
+
+if(GaussLib_ROW_VECTORS)
+	add_definitions(-DGS_ROW_VECTORS)
+endif()

 if(GaussLib_ENABLE_SSE)
 	add_definitions(-DGS_ENABLE_SSE)
@@ -14,6 +52,9 @@
 if(GaussLib_ENABLE_SSE2)
 	add_definitions(-DGS_ENABLE_SSE2)
 endif()
+
+
+# === Libraries ===

 if(UNIX AND (GaussLib_ENABLE_SSE OR GaussLib_ENABLE_SSE2))
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1")


Add /usr/lib64 for search path

Add /usr/lib64 for search path

--- cmake/Modules/FindSSH.cmake
+++ cmake/Modules/FindSSH.cmake
@@ -6,7 +6,7 @@

 find_library( LIBSSH_LIBRARY
 		NAMES ssh
-		PATHS /usr/local/lib /usr/pkg/lib /opt/lib /usr/lib /lib
+		PATHS /usr/local/lib /usr/pkg/lib /opt/lib /usr/lib64 /usr/lib /lib
 		NO_DEFAULT_PATH
 )


inttypes.h repair +

inttypes.h repair +

--- cmake/MyPackageRepair.cmake
+++ cmake/MyPackageRepair.cmake
@@ -2,9 +2,6 @@
   #
   # We optionaly create a __fixme__.cmake
   #
-  SET (FIXME_CMAKE_SINGLETON FALSE)
-  SET (HAVE_STDINT_H FALSE)
-  SET (HAVE_INTTYPES_H FALSE)
   IF (NOT FIXME_CMAKE_SINGLETON)
     IF ((NOT HAVE_STDINT_H) OR (NOT HAVE_INTTYPES_H))
       GET_PROPERTY(source_dir GLOBAL PROPERTY MYPACKAGE_SOURCE_DIR)


We now build gtest correctly

We now build gtest correctly

--- cmake/SetupGoogleTest.cmake
+++ cmake/SetupGoogleTest.cmake
@@ -11,18 +11,19 @@
         INSTALL_COMMAND ""
     )
     ExternalProject_Add_Step(googletest enter_dir
-    	COMMAND mv -f ${CMAKE_BINARY_DIR}/tools/googletest/googletest ${CMAKE_BINARY_DIR}/tools/googletest/
-    	COMMENT "--------------------------"
-    	DEPENDERS configure
-    	ALWAYS 1
+    	COMMAND mv -f ${CMAKE_BINARY_DIR}/tools/googletest/googletest ${CMAKE_BINARY_DIR}/tools/temp_move/
+    	COMMAND rm -r ${CMAKE_BINARY_DIR}/tools/googletest
+    	COMMAND mv -f ${CMAKE_BINARY_DIR}/tools/temp_move/ ${CMAKE_BINARY_DIR}/tools/googletest/
+    	COMMENT "Fixing google test directories"
+    	DEPENDEES mkdir update patch download
+    	DEPENDERS configure build install
     )

     ExternalProject_GET_PROPERTY(googletest SOURCE_DIR)
     ExternalProject_GET_PROPERTY(googletest BINARY_DIR)

-    SET(GTEST_INCLUDE_DIR ${SOURCE_DIR}/gtest/include PARENT_SCOPE)
-    SET(GTEST_BINARY_DIR ${BINARY_DIR}/gtest PARENT_SCOPE)
-
+    SET(GTEST_INCLUDE_DIR ${SOURCE_DIR}/include PARENT_SCOPE)
+    SET(GTEST_BINARY_DIR ${BINARY_DIR} PARENT_SCOPE)

 #    SET_DIRECTORY_PROPERTIES(properties EP_PREFIX "${CMAKE_BINARY_DIR}/tools")
 #    ExternalProject_ADD(googlemock
@@ -32,9 +33,19 @@
 #        CMAKE_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" "-DCMAKE_CXX_FLAGS=-fPIC"
 #        INSTALL_COMMAND ""
 #    )
+#    ExternalProject_Add_Step(googlemock enter_dir
+#    	COMMAND mv -f ${CMAKE_BINARY_DIR}/tools/googletest/googletest ${CMAKE_BINARY_DIR}/tools/temp_move/
+#    	COMMAND rm -r ${CMAKE_BINARY_DIR}/tools/googletest
+#    	COMMAND mv -f ${CMAKE_BINARY_DIR}/tools/temp_move/ ${CMAKE_BINARY_DIR}/tools/googletest/
+#    	COMMENT "Fixing google test directories"
+#    	DEPENDEES mkdir update patch download
+#    	DEPENDERS configure build install
+#    )
+#
 #    ExternalProject_GET_PROPERTY(googlemock SOURCE_DIR)
 #    ExternalProject_GET_PROPERTY(googlemock BINARY_DIR)
-
+
 #    SET(GMOCK_INCLUDE_DIR ${SOURCE_DIR}/include PARENT_SCOPE)
 #    SET(GMOCK_BINARY_DIR ${BINARY_DIR} PARENT_SCOPE)
+
 ENDFUNCTION()


cmake: boilerplate: Move app-library to be with its documentation

Move documentation and declaration to be in the same place.

Signed-off-by: Mark Ruvald Pedersen <3c05dc905675c0722f67ee578faf639727313efa@oticon.com>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -9,10 +9,6 @@
 #
 # Omitting it is permitted, but doing so incurs a maintenance cost as
 # the application must manage upstream changes to this file.
-
-# app is a CMake library containing all the application code and is
-# modified by the entry point ${APPLICATION_SOURCE_DIR}/CMakeLists.txt
-# that was specified when cmake was called.

 # CMake version 3.8.2 is the real minimum supported version.
 #
@@ -355,6 +351,9 @@
   endif()
 endif()

+# "app" is a CMake library containing all the application code and is
+# modified by the entry point ${APPLICATION_SOURCE_DIR}/CMakeLists.txt
+# that was specified when cmake was called.
 zephyr_library_named(app)
 set_property(TARGET app PROPERTY ARCHIVE_OUTPUT_DIRECTORY app)


Updated configs/default to add package x264

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -210,6 +210,7 @@
 hunter_config(websocketpp VERSION 0.7.0-p2)
 hunter_config(wxWidgets VERSION 3.0.2)
 hunter_config(x11 VERSION 1.5.0)
+hunter_config(x264 VERSION snapshot-20170420-2245)
 hunter_config(xau VERSION 1.0.7)
 hunter_config(xcb VERSION 1.11.1)
 hunter_config(xcb-proto VERSION 1.11)


Set ExternalProject_Add MKL-DNN to only build the mkl.so without any tests. (#759)

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -38,6 +38,7 @@
                 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                 -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/mkldnn
+            BUILD_COMMAND make mkldnn
             TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/tmp"
             STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/stamp"
             DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/download"
@@ -57,6 +58,7 @@
                 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                 -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/mkldnn
+            BUILD_COMMAND make mkldnn
             TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/tmp"
             STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/stamp"
             DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/download"


Generate pretty names

Generate pretty names

--- lib/OpenCogAtomTypes.cmake
+++ lib/OpenCogAtomTypes.cmake
@@ -117,7 +117,7 @@
         ENDIF (NOT "${TYPE}" STREQUAL "NOTYPE")

         IF (TYPE_NAME STREQUAL "")
-            # set type name using camel casing
+            # Set type name using camel casing
             STRING(REGEX MATCHALL "." CHARS ${TYPE})
             LIST(LENGTH CHARS LIST_LENGTH)
             MATH(EXPR LAST_INDEX "${LIST_LENGTH} - 1")
@@ -140,29 +140,37 @@
             ENDFOREACH(I RANGE ${LIST_LENGTH})
         ENDIF (TYPE_NAME STREQUAL "")

-        MESSAGE(STATUS "Atom type name: ${TYPE_NAME}")
+        STRING(REGEX REPLACE "([a-zA-Z]*)(Link|Node)$" "\\1" SHORT_NAME ${TYPE_NAME})
+        MESSAGE(STATUS "Atom type name: ${TYPE_NAME} ${SHORT_NAME}")

         # Try to guess if the thing is a node or link based on its name
         STRING(REGEX MATCH "NODE$" ISNODE ${TYPE})
         STRING(REGEX MATCH "LINK$" ISLINK ${TYPE})
+
+        # If not named as a node or a link, assume its a link
+        # This is kind of hacky, but I don't know what else to do ...
+        IF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")
+            SET(ISLINK, "LINK")
+        ENDIF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")

         # Print out the scheme definitions
         FILE(APPEND "${SCM_FILE}" "(define-public ${TYPE_NAME}Type (cog-type->int '${TYPE_NAME}))\n")
         IF (ISNODE STREQUAL "NODE")
             FILE(APPEND "${SCM_FILE}" "(define-public (${TYPE_NAME} . x)\n")
             FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-node (append (list ${TYPE_NAME}Type) x)))\n")
+            IF (NOT SHORT_NAME STREQUAL "")
+                FILE(APPEND "${SCM_FILE}" "(define-public (${SHORT_NAME} . x)\n")
+                FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-node (append (list ${TYPE_NAME}Type) x)))\n")
+            ENDIF (NOT SHORT_NAME STREQUAL "")
         ENDIF (ISNODE STREQUAL "NODE")
         IF (ISLINK STREQUAL "LINK")
             FILE(APPEND "${SCM_FILE}" "(define-public (${TYPE_NAME} . x)\n")
             FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-link (append (list ${TYPE_NAME}Type) x)))\n")
+            IF (NOT SHORT_NAME STREQUAL "")
+                FILE(APPEND "${SCM_FILE}" "(define-public (${SHORT_NAME} . x)\n")
+                FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-link (append (list ${TYPE_NAME}Type) x)))\n")
+            ENDIF (NOT SHORT_NAME STREQUAL "")
         ENDIF (ISLINK STREQUAL "LINK")
-
-        # If not named as a node or a link, assume its a link
-        # This is kind of hacky, but I don't know what else to do ...
-        IF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")
-            FILE(APPEND "${SCM_FILE}" "(define-public (${TYPE_NAME} . x)\n")
-            FILE(APPEND "${SCM_FILE}" "\t(apply cog-new-link (append (list ${TYPE_NAME}Type) x)))\n")
-        ENDIF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")

         # Print out the python definitions
         IF (ISNODE STREQUAL "NODE")
@@ -173,13 +181,6 @@
             FILE(APPEND "${PYTHON_FILE}" "def ${TYPE_NAME}(*args):\n")
             FILE(APPEND "${PYTHON_FILE}" "    return atomspace.add_link(types.${TYPE_NAME}, args)\n")
         ENDIF (ISLINK STREQUAL "LINK")
-
-        # If not named as a node or a link, assume its a link
-        # This is kind of hacky, but I don't know what else to do ...
-        IF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")
-            FILE(APPEND "${PYTHON_FILE}" "def ${TYPE_NAME}(*args):\n")
-            FILE(APPEND "${PYTHON_FILE}" "    return atomspace.add_link(types.${TYPE_NAME}, args)\n")
-        ENDIF (NOT ISNODE STREQUAL "NODE" AND NOT ISLINK STREQUAL "LINK")

         IF (PARENT_TYPES)
             STRING(REGEX REPLACE "[ 	]*,[ 	]*" ";" PARENT_TYPES "${PARENT_TYPES}")


Changed MatchPoint to a new version with nicer install rules for a clean external projects dir. Fixed T20151

Summary: Signed-off-by: Ralf Floca <r.floca@dkfz-heidelberg.de>

Test Plan: CI

Reviewers: goch, kislinsk

Maniphest Tasks: T20151

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

--- CMakeExternals/MatchPoint.cmake
+++ CMakeExternals/MatchPoint.cmake
@@ -26,8 +26,8 @@
       set(download_step SOURCE_DIR ${MatchPoint_SOURCE_DIR})
     else()
       set(download_step
-          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1481.tar.gz
-          URL_MD5 82b9b1bb3f909f2e00397e285ce8c981
+          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1610.tar.gz
+          URL_MD5 a9508c8d9ab58a20cf8fa45adb972a02
          )
     endif()


Change clBLAS commit tag to af3.3.0

Change clBLAS commit tag to af3.3.0

--- CMakeModules/build_clBLAS.cmake
+++ CMakeModules/build_clBLAS.cmake
@@ -14,7 +14,7 @@
 ExternalProject_Add(
     clBLAS-ext
     GIT_REPOSITORY https://github.com/arrayfire/clBLAS.git
-    GIT_TAG arrayfire-release-test
+    GIT_TAG af3.3.0
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


Prevent MSVC attempting to use the "strip" command when invoked through NMake in Release configuration. Closes #1851.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -1630,7 +1630,9 @@
     endif ()

     # Define a custom command for stripping the main target executable (or shared library for Android) for Release build configuration
-    if (CMAKE_BUILD_TYPE STREQUAL Release AND NOT WEB)  # This condition excludes Xcode and VS as they are multi-config, which is exactly what we want too
+    # Exclude multi-config generators, plus MSVC explicitly since it could also be used through NMake which is not multi-config,
+    # but MSVC does not have a strip command
+    if (CMAKE_BUILD_TYPE STREQUAL Release AND NOT WEB AND NOT MSVC)
         add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${TARGET_NAME}>)
     endif ()
 endmacro ()


Added HDF5 include and library directories in CMake config file.

--- CMake/TBTKConfigTemplate.cmake
+++ CMake/TBTKConfigTemplate.cmake
@@ -68,6 +68,8 @@
 	MESSAGE("[X] HDF5")
 	LIST(APPEND TBTK_LIBRARIES "hdf5")
 	LIST(APPEND TBTK_LIBRARIES "hdf5_cpp")
+	INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS})
+	LINK_DIRECTORIES(${HDF5_LIBRARY_DIRS})
 ELSE(HDF5_FOUND)
 	MESSAGE("[ ] HDF5")
 ENDIF(HDF5_FOUND)


From Cedric Pinson, "I have just adjusted the FindCOLLADA function to let it find library on gnu/linux."

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -30,8 +30,10 @@
     SET(COLLADA_BUILDNAME "mingw")
 ELSEIF(MSVC90)
     SET(COLLADA_BUILDNAME "vc9")
+ELSEIF(MSVC80)
+    SET(COLLADA_BUILDNAME "vc8")
 ELSE(APPLE)
-    SET(COLLADA_BUILDNAME "vc8")
+  SET(COLLADA_BUILDNAME "linux")
 ENDIF(APPLE)


FindGROMACS.cmake: added another error

FindGROMACS.cmake: added another error

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

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


[cmake] Support a permissive mode for env cache str variables

Unfortunately, even if we pass always the same CC when calling CMake,
CMake will sometimes transform its path, using an unclear set of rules.
What is evident is that there no guarantee that even if a canonical path to
a compiler passed as CC will be kept as it is. Therefore, the checking done
by the define_env_cache_str_var() macro might fail. One workaround is to
just stop setting the env variable after the first CMake invokation. The
other one, instead, is to set the PERMISSIVE env variable to 1 and skip
the check.

--- other/utils.cmake
+++ other/utils.cmake
@@ -32,15 +32,17 @@

    else()

-      if (NOT "$ENV{${ARGV0}}" STREQUAL "")
-         if (NOT "$ENV{${ARGV0}}" STREQUAL "${${ARGV0}}")
-
-            string(CONCAT msg "Environment variable ${ARGV0}='$ENV{${ARGV0}}' "
-                              "differs from cached value='${${ARGV0}}'. "
-                              "The whole build directory must be ERASED "
-                              "in order to change that.")
-
-            message(FATAL_ERROR "${msg}")
+      if ("$ENV{PERMISSIVE}" STREQUAL "")
+         if (NOT "$ENV{${ARGV0}}" STREQUAL "")
+            if (NOT "$ENV{${ARGV0}}" STREQUAL "${${ARGV0}}")
+
+               string(CONCAT msg "Environment var ${ARGV0}='$ENV{${ARGV0}}' "
+                                 "differs from cached value='${${ARGV0}}'. "
+                                 "The whole build directory must be ERASED "
+                                 "in order to change that.")
+
+               message(FATAL_ERROR "${msg}")
+            endif()
          endif()
       endif()


Update ITK to fixed HDF5 release

Update ITK to fixed HDF5 release

--- SuperBuild/External_ITKv5.cmake
+++ SuperBuild/External_ITKv5.cmake
@@ -148,7 +148,7 @@

   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git)
-  set(${proj}_GIT_TAG d4294f8b8afed4656d724672d1ada6da2f059d13 ) ##
+  set(${proj}_GIT_TAG 732e53944f3fda761df83a11546f568237811915 ) ##
   set(ITK_VERSION_ID ITK-5.0) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID

   ExternalProject_Add(${proj}


Fix Macports generation

Fix Macports generation

--- MacPorts.cmake
+++ MacPorts.cmake
@@ -19,16 +19,16 @@
   set(CPACK_MACPORTS_VERSION ${VERSION})
 endif()
 if(NOT MACPORTS_DIR)
-  set(MACPORTS_DIR $"{GIT_ORIGIN_org}Ports")
+  set(MACPORTS_DIR "${GIT_ORIGIN_org}Ports")
 endif()

 # format dependencies list into port:name string
 foreach(CPACK_MACPORTS_DEPEND ${CPACK_MACPORTS_DEPENDS})
   if(${CPACK_MACPORTS_DEPEND} MATCHES "port:")
-    set(CPACK_MACPORTS_TEMP "${CPACK_MACPORTS_TEMP} ${CPACK_MACPORTS_DEPEND}")
+    set(CPACK_MACPORTS_TEMP "${CPACK_MACPORTS_TEMP} ${CPACK_MACPORTS_DEPEND}")
   else()
     set(CPACK_MACPORTS_TEMP
-      "${CPACK_MACPORTS_TEMP} port:${CPACK_MACPORTS_DEPEND}")
+      "${CPACK_MACPORTS_TEMP} port:${CPACK_MACPORTS_DEPEND}")
   endif()
 endforeach()
 set(CPACK_MACPORTS_DEPENDS "${CPACK_MACPORTS_TEMP}")


add definition to release flags, not debug flags

--- cmake/compilers/Clang.CXX.cmake
+++ cmake/compilers/Clang.CXX.cmake
@@ -1,8 +1,8 @@
 if(NOT DEFINED ENV{CXXFLAGS})
     if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-        set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
+        set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -D__extern_always_inline=inline")
         # -D__extern_always_inline=inline added for Travis
-        set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -D__extern_always_inline=inline")
+        set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
     endif()
 endif()


Update cmake library dependencies.

Update cmake library dependencies.

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

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -48,7 +48,7 @@
 set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCAsmPrinter LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMTarget LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMTransformUtils)
 set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMSupport )


modication to manage private plugins packaging for linux

--- cmake/packaging/Packaging.cmake
+++ cmake/packaging/Packaging.cmake
@@ -80,6 +80,11 @@
     endif()
 endforeach()

+foreach(dir ${PRIVATE_PLUGINS_DIRS})
+        set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${dir};${dir};ALL;${dir}")
+endforeach()
+
+
 if (APPLE)
 	set(CPACK_BINARY_TGZ ON)
 	set(CPACK_BINARY_STGZ OFF)


COMP: Make FindDCMTK more verbose

COMP: Make FindDCMTK more verbose

It will display the following text:

-- Trying to find DCMTK expecting DCMTKConfig.cmake
-- Trying to find DCMTK expecting DCMTKConfig.cmake - failed
-- Trying to find DCMTK relying on FindDCMTK.cmake
-- Trying to find DCMTK relying on FindDCMTK.cmake - ok

Adapted from commontk/CTK@2ac36d10ec

Change-Id: Ia04e091ad47ee00e238c7c910ee750b4efb89484

--- Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
+++ Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
@@ -38,12 +38,18 @@

 #
 # First, try to use NO_MODULE
+message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake")
 find_package(DCMTK QUIET NO_MODULE)
 if(DCMTK_FOUND
     AND NOT "x" STREQUAL "x${DCMTK_LIBRARIES}"
     AND NOT "x" STREQUAL "x${DCMTK_INCLUDE_DIRS}")
+  message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - ok")
   return()
-endif()
+else()
+  message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - failed")
+endif()
+
+message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake")

 # Restore the value reset by the previous call to 'find_package(DCMTK QUIET NO_MODULE)'
 set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH "The directory containing a CMake configuration file for DCMTK." FORCE)
@@ -222,3 +228,5 @@
 find_package_handle_standard_args(DCMTK
   REQUIRED_VARS ${DCMTK_INCLUDE_DIR_NAMES} DCMTK_LIBRARIES
   FAIL_MESSAGE "Please set DCMTK_DIR and re-run configure")
+
+message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")


fix typo

fix typo

--- cmake/Modules/FindScidb.cmake
+++ cmake/Modules/FindScidb.cmake
@@ -33,7 +33,7 @@
   DOC "Path to include directory for array/Array.h in Scidb source tree")

 find_path(SCIDB_SRC_DIR array/Metadata.cpp
-  HINTS $SCIDB_ROOT_DIR
+  HINTS ${SCIDB_ROOT_DIR}
   PATH_SUFFIXES src)

 find_package_handle_standard_args(SCIDB DEFAULT_MSG


Set Protobuf_FOUND to TRUE (#3840)

Set Protobuf_FOUND to TRUE (#3840)

This matches the behavior in FindProtobuf.cmake, https://github.com/Kitware/CMake/blob/master/Modules/FindProtobuf.cmake#L624-L626 (https://cmake.org/cmake/help/latest/module/FindPackageHandleStandardArgs.html#command:find_package_handle_standard_args)

--- cmake/external_protobuf.cmake
+++ cmake/external_protobuf.cmake
@@ -121,5 +121,5 @@
     add_dependencies(protobuf::protoc ext_protobuf)
 endif()

-set(Protobuf_FOUND)
-set(PROTOBUF_FOUND)
+set(Protobuf_FOUND TRUE)
+set(PROTOBUF_FOUND TRUE)


GMock: declare dependency on GTest

GMock: declare dependency on GTest

--- cmake/modules/FindGMock.cmake
+++ cmake/modules/FindGMock.cmake
@@ -316,6 +316,8 @@
                     "${GMOCK_LIBRARY}"
                     "${GMOCK_MAIN_LIBRARY}"
             )
+
+            add_dependencies(gmock gtest)

             add_dependencies(GTest::GTest gtest)
             add_dependencies(GTest::Main gtest)


[CMake] [WinMsvc] Look for includes and libs in ${MSVC_BASE}/atlmfc

This is necessary if building with the DIA SDK enabled.

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

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

--- cmake/platforms/WinMsvc.cmake
+++ cmake/platforms/WinMsvc.cmake
@@ -190,7 +190,9 @@
 endif()

 set(MSVC_INCLUDE "${MSVC_BASE}/include")
+set(ATLMFC_INCLUDE "${MSVC_BASE}/atlmfc/include")
 set(MSVC_LIB "${MSVC_BASE}/lib")
+set(ATLMFC_LIB "${MSVC_BASE}/atlmfc/lib")
 set(WINSDK_INCLUDE "${WINSDK_BASE}/Include/${WINSDK_VER}")
 set(WINSDK_LIB "${WINSDK_BASE}/Lib/${WINSDK_VER}")

@@ -246,6 +248,7 @@
     -D_CRT_SECURE_NO_WARNINGS
     --target=${TRIPLE_ARCH}-windows-msvc
     -fms-compatibility-version=19.11
+    -imsvc "${ATLMFC_INCLUDE}"
     -imsvc "${MSVC_INCLUDE}"
     -imsvc "${WINSDK_INCLUDE}/ucrt"
     -imsvc "${WINSDK_INCLUDE}/shared"
@@ -282,6 +285,7 @@
     # Prevent CMake from attempting to invoke mt.exe. It only recognizes the slashed form and not the dashed form.
     /manifest:no

+    -libpath:"${ATLMFC_LIB}/${WINSDK_ARCH}"
     -libpath:"${MSVC_LIB}/${WINSDK_ARCH}"
     -libpath:"${WINSDK_LIB}/ucrt/${WINSDK_ARCH}"
     -libpath:"${WINSDK_LIB}/um/${WINSDK_ARCH}")


removed msvc buildinfo hack. needs building twice on windows to work now.

--- cmake/scripts/buildinfo.cmake
+++ cmake/scripts/buildinfo.cmake
@@ -47,11 +47,6 @@
 set(TMPFILE "${ETH_DST_DIR}/BuildInfo.h.tmp")
 set(OUTFILE "${ETH_DST_DIR}/BuildInfo.h")

-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-	set(OUTFILE "${ETH_DST_DIR}/BuildInfo.h")
-endif()
-
-message("ETH_FATDB: ${ETH_FATDB}")
 configure_file("${INFILE}" "${TMPFILE}")

 include("${ETH_SOURCE_DIR}/cmake/EthUtils.cmake")


avoid duplicate exported include dirs for a package

--- ament_cmake_export_include_directories/cmake/ament_export_include_directories.cmake
+++ ament_cmake_export_include_directories/cmake/ament_export_include_directories.cmake
@@ -26,14 +26,14 @@
         # prefix relative paths with CMAKE_INSTALL_PREFIX
         # while avoiding to embed any absolute path
         set(_arg "\${${PROJECT_NAME}_DIR}/../../../${_arg}")
-        list(APPEND _AMENT_EXPORT_RELATIVE_INCLUDE_DIRECTORIES "${_arg}")
+        list_append_unique(_AMENT_EXPORT_RELATIVE_INCLUDE_DIRECTORIES "${_arg}")
       else()
         if(NOT IS_DIRECTORY "${_arg}")
           message(WARNING
             "ament_export_include_directories() package '${PROJECT_NAME}' "
             "exports the include directory '${_arg}' which doesn't exist")
         endif()
-        list(APPEND _AMENT_EXPORT_ABSOLUTE_INCLUDE_DIRECTORIES "${_arg}")
+        list_append_unique(_AMENT_EXPORT_ABSOLUTE_INCLUDE_DIRECTORIES "${_arg}")
       endif()
     endforeach()
   endif()


fbcode_builder: support installing thrift generated header files

Summary:
Update add_thrift_cpp2_library() to add a PUBLIC_HEADER property to the
generated library target, so that the generated headers can be installed using
an `install()` call.  Also add a `HEADER_INSTALL_DIR` property which indicates
the directory they should be installed into.  A `INCLUDE_DIR` argument was
added to customize the include installation path, should anyone care to do so.

This also removes code that was previously incorrectly installing the
generated headers into the source tree.

Reviewed By: wez

Differential Revision: D16853404

fbshipit-source-id: 6f640b2bd347c99804e074fca0209dda37c8a9cf

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -4,10 +4,26 @@

 include(FBCMakeParseArgs)

+# Generate a C++ library from a thrift file
+#
+# Parameters:
+# - SERVICES <svc1> [<svc2> ...]
+#   The names of the services defined in the thrift file.
+# - DEPENDS <dep1> [<dep2> ...]
+#   A list of other thrift C++ libraries that this library depends on.
+# - OPTIONS <opt1> [<opt2> ...]
+#   A list of options to pass to the thrift compiler.
+# - INCLUDE_DIR <path>
+#   The sub-directory where generated headers will be installed.
+#   Defaults to "include" if not specified.  The caller must still call
+#   install() to install the thrift library if desired.
 function(add_thrift_cpp2_library LIB_NAME THRIFT_FILE)
   # Parse the arguments
+  set(one_value_args INCLUDE_DIR)
   set(multi_value_args SERVICES DEPENDS OPTIONS)
-  fb_cmake_parse_args(ARG "" "" "${multi_value_args}" "${ARGN}")
+  fb_cmake_parse_args(
+    ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
+  )

   get_filename_component(base ${THRIFT_FILE} NAME_WE)
   get_filename_component(
@@ -23,6 +39,9 @@
     "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
   )
   get_filename_component(include_prefix ${include_prefix} DIRECTORY)
+  if(NOT DEFINED ARG_INCLUDE_DIR)
+    set(ARG_INCLUDE_DIR "include")
+  endif()

   if (NOT "${include_prefix}" STREQUAL "")
     list(APPEND ARG_OPTIONS "include_prefix=${include_prefix}")
@@ -110,19 +129,11 @@
     ${generated_sources}
   )

-  install(
-    FILES ${generated_headers}
-    DESTINATION $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/gen-cpp2
-  )
-
   target_include_directories(
     "${LIB_NAME}"
-    PRIVATE
-      ${CMAKE_SOURCE_DIR}
-      ${CMAKE_BINARY_DIR}
     PUBLIC
-      ${FOLLY_INCLUDE_DIR}
-      ${FBTHRIFT_INCLUDE_DIR}
+      "$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>"
+      "$<INSTALL_INTERFACE:${ARG_INCLUDE_DIR}>"
   )
   target_link_libraries(
     "${LIB_NAME}"
@@ -132,14 +143,27 @@
       Folly::folly
   )

+  # Add ${generated_headers} to the PUBLIC_HEADER property for ${LIB_NAME}
+  #
+  # This allows callers to install it using
+  # "install(TARGETS ${LIB_NAME} PUBLIC_HEADER)"
+  # However, note that CMake's PUBLIC_HEADER behavior is rather inflexible,
+  # and does have any way to preserve header directory structure.  Callers
+  # must be careful to use the correct PUBLIC_HEADER DESTINATION parameter
+  # when doing this, to put the files the correct directory themselves.
+  # We define a HEADER_INSTALL_DIR property with the include directory prefix,
+  # so typically callers should specify the PUBLIC_HEADER DESTINATION as
+  # "$<TARGET_PROPERTY:${LIB_NAME},HEADER_INSTALL_DIR>"
+  set_property(
+    TARGET "${LIB_NAME}"
+    PROPERTY PUBLIC_HEADER ${generated_headers}
+  )
+
   set_target_properties(
     "${LIB_NAME}"
     PROPERTIES
       EXPORT_PROPERTIES "THRIFT_INCLUDE_DIRECTORY"
       THRIFT_INCLUDE_DIRECTORY "${CMAKE_SOURCE_DIR}"
+      HEADER_INSTALL_DIR "${ARG_INCLUDE_DIR}/${include_prefix}/gen-cpp2"
   )
-
-  get_property(thrift_include_directory
-    TARGET "${LIB_NAME}"
-    PROPERTY THRIFT_INCLUDE_DIRECTORY)
 endfunction()


use ThriftCppLibrary.cmake from fbcode_builder

Summary:
Update fboss to use `ThriftCppLibrary.cmake` directly from fbcode_builder
rather than maintaining its own copy of this file.

Reviewed By: chadaustin

Differential Revision: D17005421

fbshipit-source-id: a64df426118df6088b47f09410dad7b8b7e79a43

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -1,6 +1,4 @@
 # Copyright (c) Facebook, Inc. and its affiliates.
-# NOTE: If you change this file, fbcode/fboss/github/ThriftCppLibrary.cmake also
-# needs to be changed.  TODO: this should be handled via shipit.

 include(FBCMakeParseArgs)


enable openmp again

enable openmp again

--- cmake/Dependencies_core.cmake
+++ cmake/Dependencies_core.cmake
@@ -81,7 +81,7 @@
     message(STATUS ${OMP_LIB})
     SET(LIBS ${LIBS} ${OMP_LIB})
 else()
-    #find_package(OpenMP)
+    find_package(OpenMP)
     if(OPENMP_FOUND)
         # This line doesn't work with nvcc + gcc8.3. Just uncomment it.
         if(SAIGA_CXX_GNU)


build: drop -Winline

build: drop -Winline

--- cmake/ExtraWarningFlags.cmake
+++ cmake/ExtraWarningFlags.cmake
@@ -21,7 +21,6 @@
   -Wformat-security
   -Wignored-qualifiers
   -Winit-self
-  -Winline
   -Winvalid-pch
   -Wlogical-op
   -Wmissing-declarations


Force linking glog to unwind. Not doing so fails on conan builds due to a suspected bug: https://github.com/conan-io/conan-center-index/issues/8568

--- cmake/SetupDependencies.cmake
+++ cmake/SetupDependencies.cmake
@@ -32,6 +32,9 @@
         Ceres::ceres
         BLAS::BLAS
         )
+if(TARGET libunwind::unwind) # This is the library name from conan
+    add_library(unwind::unwind ALIAS libunwind::unwind)
+endif()
 if(TARGET unwind::unwind)
     target_compile_definitions(deps INTERFACE DMRG_HAS_UNWIND=1)
     target_link_libraries(deps INTERFACE unwind::unwind)


SWIG: bump up our requirements.

SWIG: bump up our requirements.

Needed for commit 9c5ddf54.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -51,7 +51,7 @@

 find_package(Doxygen)
 find_package(Sphinx)
-find_package(SWIG 3.0.3)
+find_package(SWIG 4.0)

 set(_ORIGINAL_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})


cmake/modules/FindNUMPY.cmake: Use `print` with parentheses.

--- cmake/modules/FindNUMPY.cmake
+++ cmake/modules/FindNUMPY.cmake
@@ -4,7 +4,7 @@
 IF(PYTHONINTERP_FOUND)
     IF(NOT PYTHON_NUMPY_INCLUDE_DIR)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c
-                            "import numpy; print numpy.get_include()"
+                            "import numpy; print(numpy.get_include())"
                             RESULT_VARIABLE PYTHON_NUMPY_NOT_FOUND
                             OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR
                             OUTPUT_STRIP_TRAILING_WHITESPACE)


Skip arrow_jemalloc

Skip arrow_jemalloc

--- cmake_scripts/FindArrow.cmake
+++ cmake_scripts/FindArrow.cmake
@@ -56,6 +56,8 @@
         /usr/local/lib/*/dist-packages/pyarrow/include)
     endif()
     get_filename_component(ARROW_SEARCH_LIB_PATH ${ARROW_INCLUDE_DIR} DIRECTORY)
+    set(ARROW_SEARCH_HEADER_PATHS ${ARROW_INCLUDE_DIR})
+    message(STATUS "Found candidate Arrow location: ${ARROW_SEARCH_LIB_PATH}")
   endif()
 else()
   set(ARROW_SEARCH_HEADER_PATHS
@@ -77,12 +79,8 @@
   PATHS
   ${ARROW_SEARCH_LIB_PATH}
   NO_DEFAULT_PATH)
+message("Found ${ARROW_LIB_PATH} in ${ARROW_SEARCH_LIB_PATH}")
 get_filename_component(ARROW_LIBS ${ARROW_LIB_PATH} DIRECTORY)
-
-find_library(ARROW_JEMALLOC_LIB_PATH NAMES arrow_jemalloc
-  PATHS
-  ${ARROW_SEARCH_LIB_PATH}
-  NO_DEFAULT_PATH)

 find_library(ARROW_PYTHON_LIB_PATH NAMES arrow_python
   PATHS
@@ -100,10 +98,8 @@
   else()
     set(ARROW_STATIC_LIB ${ARROW_PYTHON_LIB_PATH}/libarrow.a)
     set(ARROW_PYTHON_STATIC_LIB ${ARROW_PYTHON_LIB_PATH}/libarrow_python.a)
-    set(ARROW_JEMALLOC_STATIC_LIB ${ARROW_PYTHON_LIB_PATH}/libarrow_jemalloc.a)

     set(ARROW_SHARED_LIB ${ARROW_LIBS}/libarrow${CMAKE_SHARED_LIBRARY_SUFFIX})
-    set(ARROW_JEMALLOC_SHARED_LIB ${ARROW_LIBS}/libarrow_jemalloc${CMAKE_SHARED_LIBRARY_SUFFIX})
     set(ARROW_PYTHON_SHARED_LIB ${ARROW_LIBS}/libarrow_python${CMAKE_SHARED_LIBRARY_SUFFIX})
   endif()
 endif()