SK:

SK:

-PERF: rename binary directory

--- src/Testing/Dashboard/elxDashboard_BIGR_linux64_gcc.cmake
+++ src/Testing/Dashboard/elxDashboard_BIGR_linux64_gcc.cmake
@@ -40,6 +40,10 @@
 # Output directory
 set( CTEST_DASHBOARD_ROOT "/cm/shared/apps/elastix/nightly" )

+# Use 'release' instead of 'bin', for consistency with other
+# elastix versions on the cluster2
+set( CTEST_BINARY_DIRECTORY ${CTEST_DASHBOARD_ROOT}/release )
+
 #set(dashboard_do_memcheck 1)
 #set(dashboard_do_coverage 1)


Update install rule for python 3

Update install rule for python 3

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -11,7 +11,7 @@
   DESTINATION "lib"
   USE_SOURCE_PERMISSIONS
   COMPONENT superbuild)
-install(DIRECTORY "${install_location}/include/python3.6"
+install(DIRECTORY "${install_location}/include/python3.6m"
   DESTINATION "include"
   USE_SOURCE_PERMISSIONS
   COMPONENT superbuild


BUG: Propagate compiler choice, compiler flags, OSX architecture to superbuild

Change-Id: If639c7a7ecfff12e1f1da37092f15cb956b656fe

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -27,14 +27,14 @@

 if( DEFINED BUILD_SHARED_LIBS )
   set( shared ${BUILD_SHARED_LIBS} )
-else()
+else( DEFINED BUILD_SHARED_LIBS )
   set( shared ON ) # use for BUILD_SHARED_LIBS on all subsequent projects
-endif()
+endif( DEFINED BUILD_SHARED_LIBS )
 set( testing OFF ) # use for BUILD_TESTING on all subsequent projects
 set( build_type "Debug" )
 if( CMAKE_BUILD_TYPE )
   set( build_type "${CMAKE_BUILD_TYPE}" )
-endif()
+endif( CMAKE_BUILD_TYPE )

 set( TubeTK_DEPENDS "" )

@@ -57,8 +57,20 @@
 endif( GIT_PROTOCOL_HTTP )
 mark_as_advanced( GIT_PROTOCOL )

-##
-## Check if system TubeTK or superbuild TubeTK
+#
+# Use for CMAKE_OSX_* in external projects.
+#
+set( CMAKE_OSX_EXTERNAL_PROJECT_ARGS )
+if( APPLE )
+  list( APPEND CMAKE_OSX_EXTERNAL_PROJECT_ARGS
+    -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
+    -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}
+    -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
+  )
+endif( APPLE )
+
+##
+## Check if system JsonCpp or superbuild JsonCpp
 ##
 if( NOT USE_SYSTEM_JsonCpp )
   ##
@@ -72,10 +84,14 @@
     BINARY_DIR JsonCpp-Build
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
+      -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+      -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+      -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
       -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
       -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
       -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
       -DCMAKE_BUILD_TYPE:STRING=${build_type}
+      ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
       -DBUILD_SHARED_LIBS:BOOL=${shared}
     INSTALL_COMMAND ""
     )
@@ -103,11 +119,12 @@
       CMAKE_ARGS
         -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
         -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+        -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
         -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-        -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
         -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
         -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
         -DCMAKE_BUILD_TYPE:STRING=${build_type}
+        ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
         -DBUILD_SHARED_LIBS:BOOL=${shared}
         -DBUILD_EXAMPLES:BOOL=OFF
         -DBUILD_TESTING:BOOL=OFF
@@ -130,11 +147,12 @@
         CMAKE_ARGS
           -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
           -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+          -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
           -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-          -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
           -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
           -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
           -DCMAKE_BUILD_TYPE:STRING=${build_type}
+          ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
           -DITK_DIR:STRING=${CMAKE_BINARY_DIR}/Insight-Build
           -DBUILD_SHARED_LIBS:BOOL=${shared}
           -DBUILD_TESTING:BOOL=OFF
@@ -152,8 +170,7 @@

       set( SimpleITK_DIR "${base}/SimpleITK-Build" )
       set( TubeTK_SimpleITK_Def "-DSimpleITK_DIR:PATH=${SimpleITK_DIR}" )
-  #     set( TubeTK_DEPENDS ${TubeTK_DEPENDS} "SimpleITK" )
-    endif()
+    endif( TubeTK_USE_SimpleITK )
     set( SimpleITK_DIR "" )
     set( TubeTK_SimpleITK_Def "" )

@@ -167,7 +184,7 @@
   if( TubeTK_USE_VTK )

     ##
-    ## Check if sytem VTK or superbuild VTK
+    ## Check if system VTK or superbuild VTK
     ##
     if( NOT USE_SYSTEM_VTK )

@@ -184,11 +201,14 @@
           BINARY_DIR VTK-Build
           CMAKE_GENERATOR ${gen}
           CMAKE_ARGS
+            -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+            -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+            -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
             -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-            -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
             -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
             -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
             -DCMAKE_BUILD_TYPE:STRING=${build_type}
+            ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
             -DBUILD_SHARED_LIBS:BOOL=${shared}
             -DBUILD_EXAMPLES:BOOL=OFF
             -DBUILD_TESTING:BOOL=OFF
@@ -213,11 +233,14 @@
           BINARY_DIR VTK-Build
           CMAKE_GENERATOR ${gen}
           CMAKE_ARGS
+            -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+            -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+            -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
             -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-            -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
             -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
             -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
             -DCMAKE_BUILD_TYPE:STRING=${build_type}
+            ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
             -DBUILD_SHARED_LIBS:BOOL=${shared}
             -DBUILD_EXAMPLES:BOOL=OFF
             -DBUILD_TESTING:BOOL=OFF
@@ -239,27 +262,29 @@
   # Set dependency list
   if( NOT USE_SYSTEM_ITK )
     # Depends on ITK if ITK was build using superbuild
-    set(SlicerExecutionModel_DEPENDS "Insight")
+    set( SlicerExecutionModel_DEPENDS "Insight")
   else( NOT USE_SYSTEM_ITK )
-    set(SlicerExecutionModel_DEPENDS "" )
+    set( SlicerExecutionModel_DEPENDS "" )
   endif( NOT USE_SYSTEM_ITK )

-  ExternalProject_Add(${proj}
+  ExternalProject_Add( ${proj}
     GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/Slicer/SlicerExecutionModel.git"
     GIT_TAG "origin/master"
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-Build
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
+      -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+      -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+      -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
       -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-      -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
       -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
       -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
       -DCMAKE_BUILD_TYPE:STRING=${build_type}
+      ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
       -DBUILD_SHARED_LIBS:BOOL=${shared}
       -DBUILD_TESTING:BOOL=OFF
       -DITK_DIR:PATH=${ITK_DIR}
-        ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
     INSTALL_COMMAND ""
     DEPENDS
       ${SlicerExecutionModel_DEPENDS}
@@ -292,7 +317,14 @@
           BINARY_DIR CTK-Build
           CMAKE_GENERATOR ${gen}
           CMAKE_ARGS
+            -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+            -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+            -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
+            -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+            -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
+            -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
             -DCMAKE_BUILD_TYPE:STRING=${build_type}
+            ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
             -DBUILD_SHARED_LIBS:BOOL=${shared}
             -DBUILD_TESTING:BOOL=OFF
             -DCTK_USE_GIT_PROTOCOL:BOOL=TRUE
@@ -326,13 +358,13 @@
 endif( NOT TubeTK_BUILD_SLICER_EXTENSION )

 ##
-## A conventient 2D/3D image viewer that can handle anisotropic spacing.
+## A convenient 2D/3D image viewer that can handle anisotropic spacing.
 ##
 set( ImageViewer_DEPENDS )
 if( NOT TubeTK_BUILD_SLICER_EXTENSION )
   if( NOT USE_SYSTEM_ITK )
     set( ImageViewer_DEPENDS Insight )
-  endif()
+  endif( NOT USE_SYSTEM_ITK )
 else( NOT TubeTK_BUILD_SLICER_EXTENSION )
 endif( NOT TubeTK_BUILD_SLICER_EXTENSION )
 set( proj ImageViewer )
@@ -343,8 +375,15 @@
   BINARY_DIR ImageViewer-Build
   CMAKE_GENERATOR ${gen}
   CMAKE_ARGS
-    "-DCMAKE_BUILD_TYPE:STRING=${build_type}"
-    "-DITK_DIR:PATH=${ITK_DIR}"
+    -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+    -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+    -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
+    -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+    -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
+    -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
+    -DCMAKE_BUILD_TYPE:STRING=${build_type}
+    ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
+    -DITK_DIR:PATH=${ITK_DIR}
   INSTALL_COMMAND ""
   DEPENDS
     ${ImageViewer_DEPENDS}
@@ -361,9 +400,16 @@
     GIT_REPOSITORY https://github.com/TubeTK/cmake-libsvm
     GIT_TAG a802a4224a6c3d7458e46887e77d75bf305a105b
     CMAKE_ARGS
+      -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+      -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+      -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
+      -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+      -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
+      -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
       -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/${proj}-Build
       -DCMAKE_BUILD_TYPE:STRING=${build_type}
-      -DBUILD_SHARED_LIBS:BOOL=ON}
+      ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
+      -DBUILD_SHARED_LIBS:BOOL=${shared}
   )
   set( LIBSVM_DIR "${CMAKE_BINARY_DIR}/${proj}-Build" )
 endif( TubeTK_USE_LIBSVM )
@@ -375,11 +421,11 @@
 if( TubeTK_USE_KWSTYLE )
   set( kwstyle_dashboard_submission_arg
     "-DKWSTYLE_DASHBOARD_SUBMISSION:BOOL=${KWSTYLE_DASHBOARD_SUBMISSION}" )
-endif()
+endif( TubeTK_USE_KWSTYLE )

 set( TubeTK_cmake_args )
 if( NOT TubeTK_BUILD_SLICER_EXTENSION )
-  list(APPEND TubeTK_cmake_args
+  list( APPEND TubeTK_cmake_args
     -DITK_DIR:PATH=${ITK_DIR}
     -DVTK_DIR:PATH=${VTK_DIR}
     -DCTK_DIR:PATH=${CTK_DIR}
@@ -397,17 +443,18 @@
   CMAKE_ARGS
     -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
     -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+    -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
+    -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+    -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
+    -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
+    -DCMAKE_BUILD_TYPE:STRING=${build_type}
+    ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
     -DBUILDNAME:STRING=${BUILDNAME}
     -DSITE:STRING=${SITE}
     -DMAKECOMMAND:STRING=${MAKECOMMAND}
-    -DCMAKE_BUILD_TYPE:STRING=${build_type}
     -DBUILD_SHARED_LIBS:BOOL=${shared}
     -DBUILD_TESTING:BOOL=${BUILD_TESTING}
     -DBUILD_DOCUMENTATION:BOOL=${BUILD_DOCUMENTATION}
-    -DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
-    -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-    -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-    -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
     -DTubeTK_USE_SUPERBUILD:BOOL=FALSE
     -DTubeTK_BUILD_SLICER_EXTENSION:BOOL=${TubeTK_BUILD_SLICER_EXTENSION}
     -DTubeTK_USE_KWSTYLE:BOOL=${TubeTK_USE_KWSTYLE}


Reverted FW allocation modifications

Reverted FW allocation modifications

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "352b763bb4c862ceca49ed9a864aa7dd78711a1e")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "1cfa51d59471f57c43cfef2b69205c227c272958")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Remove non-ascii character

Remove non-ascii character

--- scripts/AddCPP11Flags.cmake
+++ scripts/AddCPP11Flags.cmake
@@ -1,7 +1,7 @@
 include(CheckCXXCompilerFlag)

-#On older cmake versions + newer compilers,
-#the given version of CheckCXXCompilerFlags does not quite work.
+# On older cmake versions + newer compilers,
+# the given version of CheckCXXCompilerFlags does not quite work.
 if(CMAKE_VERSION VERSION_LESS 2.8.9)
   macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
      set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")


Recursive cmake step disabled once package is found

Once a package has been found (in the external build dir), the locations of its libraries and
includes should not change. So even if the external project is kept as such, there is not need for a
recursive cmake step.

--- scripts/PackageLookup.cmake
+++ scripts/PackageLookup.cmake
@@ -153,30 +153,38 @@
     if(recursive_FOUND_VAR)
         set(found_var ${recursive_FOUND_VAR})
     endif()
-    _get_sane_name(${recurse_name} SANENAME)
-    set(cmake_arguments -DCMAKE_PROGRAM_PATH:PATH=${EXTERNAL_ROOT}/bin
-                        -DCMAKE_LIBRARY_PATH:PATH=${EXTERNAL_ROOT}/lib
-                        -DCMAKE_INCLUDE_PATH:PATH=${EXTERNAL_ROOT}/include
-                        -DCMAKE_PREFIX_PATH:PATH=${EXTERNAL_ROOT}
-                        -D${SANENAME}_RECURSIVE:BOOL=TRUE
-                        --no-warn-unused-cli)
-    if(NOT recursive_NOCHECK)
-        set(cmake_arguments ${cmake_arguments} -D${SANENAME}_REQUIREDONRECURSE:INTERNAL=TRUE)
+
+    # Only add recurse step if package not found already.
+    # Once the package has been found and configured,
+    # the locations and such should not change, so
+    # there is no need for a recursive cmake step.
+    if(NOT ${${found_var}})
+        _get_sane_name(${recurse_name} SANENAME)
+        set(cmake_arguments -DCMAKE_PROGRAM_PATH:PATH=${EXTERNAL_ROOT}/bin
+                            -DCMAKE_LIBRARY_PATH:PATH=${EXTERNAL_ROOT}/lib
+                            -DCMAKE_INCLUDE_PATH:PATH=${EXTERNAL_ROOT}/include
+                            -DCMAKE_PREFIX_PATH:PATH=${EXTERNAL_ROOT}
+                            -D${SANENAME}_RECURSIVE:BOOL=TRUE
+                            --no-warn-unused-cli)
+        if(NOT recursive_NOCHECK)
+            set(cmake_arguments ${cmake_arguments}
+                -D${SANENAME}_REQUIREDONRECURSE:INTERNAL=TRUE)
+        endif()
+        ExternalProject_Add_Step(
+            ${name} reCMake
+            COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} ${cmake_arguments}
+            WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+            ${recursive_UNPARSED_ARGUMENTS}
+        )
+        if(${${SANENAME}_REQUIREDONRECURSE})
+            if(NOT ${found_var} OR "${${found_var}}" STREQUAL "")
+                unset(${SANENAME}_REQUIREDONRECURSE CACHE)
+                message(FATAL_ERROR "[${name}] Could not be downloaded and installed")
+            endif()
+        endif()
+        # Sets a variable saying we are building this source externally
+        set(${name}_BUILT_AS_EXTERNAL_PROJECT TRUE)
     endif()
-    ExternalProject_Add_Step(
-      ${name} reCMake
-      COMMAND ${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} ${cmake_arguments}
-      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-      ${recursive_UNPARSED_ARGUMENTS}
-    )
-    if(${${SANENAME}_REQUIREDONRECURSE})
-      if(NOT ${found_var} OR "${${found_var}}" STREQUAL "")
-          unset(${SANENAME}_REQUIREDONRECURSE CACHE)
-          message(FATAL_ERROR "[${name}] Could not be downloaded and installed")
-      endif()
-    endif()
-    # Sets a variable saying we are building this source externally
-    set(${name}_BUILT_AS_EXTERNAL_PROJECT TRUE)
 endmacro()

 # Avoids anoying cmake warning, by actually using the variables.


ARROW-12865: [C++][FlightRPC] Link gRPC with RE2

This fixes undefined symbol error if build flight with vendored re2.

Closes #10403 from cyb70289/grpc-re2

Authored-by: Yibo Cai <e732a3f0de35687e82bda0008a72e443d2f69704@arm.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2548,6 +2548,7 @@
       gRPC::upb
       gRPC::address_sorting
       ${ABSL_LIBRARIES}
+      re2::re2
       c-ares::cares
       ZLIB::ZLIB
       Threads::Threads)


modules: updated FindGLFW.cmake.

modules: updated FindGLFW.cmake.

--- modules/FindGLFW.cmake
+++ modules/FindGLFW.cmake
@@ -42,11 +42,9 @@
 #

 # GLFW installs cmake package config files to shared/ folder which handles
-# dependencies in case GLFW is built statically. We're making an INTERFACE
-# target for it, which is supported only since CMake 3.0.
-if(NOT CMAKE_VERSION VERSION_LESS 3.0.0)
-    find_package(glfw3 CONFIG)
-endif()
+# dependencies in case GLFW is built statically. Try to find first, quietly, so
+# it doesn't print loud messages when it's not found, since that's okay.
+find_package(glfw3 CONFIG QUIET)

 if(TARGET glfw)
     if(NOT TARGET GLFW::GLFW)


COMP: Removed double occurences of bundles

--- Modules/Bundles/PluginList.cmake
+++ Modules/Bundles/PluginList.cmake
@@ -30,9 +30,5 @@
   org.mitk.gui.qt.measurement:OFF
   org.mitk.gui.qt.simplemeasurement:OFF
   org.mitk.gui.qt.imagecropper:OFF
-  org.mitk.gui.qt.imagenavigator:ON
-  org.mitk.gui.qt.moviemaker:ON
-  org.mitk.gui.qt.deformableregistration:ON
-  org.mitk.gui.qt.rigidregistration:ON
   org.mitk.gui.qt.pointbasedregistration:ON
   )


XP_CMAKE_REPO_INSYNC option turned ON

XP_CMAKE_REPO_INSYNC option turned ON

* moved from Shared/make/toplevel.cmake

see issue https://github.com/smanders/externpro/issues/180

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1905,6 +1905,9 @@
   set_property(GLOBAL PROPERTY USE_FOLDERS ON) # enables Solution Folders
   xpCommonFlags()
   xpEnableWarnings()
+  if(NOT DEFINED XP_CMAKE_REPO_INSYNC)
+    set(XP_CMAKE_REPO_INSYNC ON) # cmake error if repo and cmake are not in sync
+  endif()
   if(MSVC)
     xpSetMsvcFlags()
   elseif(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")


fmtFiles and format custom target

fmtFiles and format custom target

* externpro doesn't have access to clang-format at cmake time (since externpro builds clang-format)
* with these changes externpro will at least create the formatfiles.txt file (just no 'format' custom target)
* protection around creation of 'format' custom target (only create if target doesn't exist)
* issue https://github.com/smanders/externpro/issues/258

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1108,21 +1108,26 @@
       endif()
       ####
       # Windows can't handle passing very many files to clang-format
-      if(NOT MSVC AND fmtFiles AND NOT ${CMAKE_PROJECT_NAME} STREQUAL externpro)
+      if(NOT MSVC AND fmtFiles)
         # make paths relative to CMAKE_SOURCE_DIR
         xpListRemoveFromAll(fmtFiles ${CMAKE_SOURCE_DIR} . ${fmtFiles})
         list(LENGTH fmtFiles lenFmtFiles)
-        xpGetPkgVar(clangformat EXE)
-        add_custom_command(OUTPUT format_cmake
-          COMMAND ${CLANGFORMAT_EXE} -style=file -i ${fmtFiles}
-          WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-          COMMENT "Running clang-format on ${lenFmtFiles} files..."
-          )
+        # NOTE: externpro doesn't have usexp-clangformat-config.cmake at cmake time
+        if(NOT CMAKE_PROJECT_NAME STREQUAL externpro)
+          xpGetPkgVar(clangformat EXE)
+          add_custom_command(OUTPUT format_cmake
+            COMMAND ${CLANGFORMAT_EXE} -style=file -i ${fmtFiles}
+            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+            COMMENT "Running clang-format on ${lenFmtFiles} files..."
+            )
+        endif()
         string(REPLACE ";" "\n" fmtFiles "${fmtFiles}")
         file(WRITE ${CMAKE_BINARY_DIR}/formatfiles.txt ${fmtFiles}\n)
-        add_custom_target(format SOURCES ${CMAKE_BINARY_DIR}/formatfiles.txt DEPENDS format_cmake)
         list(APPEND masterSrcList ${CMAKE_BINARY_DIR}/formatfiles.txt)
-        set_property(TARGET format PROPERTY FOLDER CMakeTargets)
+        if(NOT TARGET format)
+          add_custom_target(format SOURCES ${CMAKE_BINARY_DIR}/formatfiles.txt DEPENDS format_cmake)
+          set_property(TARGET format PROPERTY FOLDER CMakeTargets)
+        endif()
       endif()
     endif() # is a .git repo
     option(XP_CSCOPE "always update cscope database" OFF)


[cmake] we try to detect the C++ compiler, so we should execute CMAKE_CXX_COMPILER

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -49,7 +49,7 @@
       set(Vc_COMPILER_IS_GCC false)
       if(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc)$")
          set(Vc_COMPILER_IS_INTEL true)
-         exec_program(${CMAKE_C_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE Vc_ICC_VERSION)
+         exec_program(${CMAKE_CXX_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE Vc_ICC_VERSION)
          message(STATUS "Detected Compiler: Intel ${Vc_ICC_VERSION}")

          # break build with too old clang as early as possible.
@@ -74,13 +74,13 @@
          message(STATUS "Detected Compiler: MSVC ${MSVC_VERSION}")
       elseif(CMAKE_COMPILER_IS_GNUCXX)
          set(Vc_COMPILER_IS_GCC true)
-         exec_program(${CMAKE_C_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE Vc_GCC_VERSION)
+         exec_program(${CMAKE_CXX_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE Vc_GCC_VERSION)
          message(STATUS "Detected Compiler: GCC ${Vc_GCC_VERSION}")

          # some distributions patch their GCC to return nothing or only major and minor version on -dumpversion.
          # In that case we must extract the version number from --version.
          if(NOT Vc_GCC_VERSION OR Vc_GCC_VERSION MATCHES "^[0-9]\\.[0-9]+$")
-            exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE Vc_GCC_VERSION)
+            exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE Vc_GCC_VERSION)
             string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" Vc_GCC_VERSION "${Vc_GCC_VERSION}")
             message(STATUS "GCC Version from --version: ${Vc_GCC_VERSION}")
          endif()
@@ -94,7 +94,7 @@
             execute_process(COMMAND ${_lsb_release} -rs OUTPUT_VARIABLE _distributor_release OUTPUT_STRIP_TRAILING_WHITESPACE)
             string(TOUPPER "${_distributor_id}" _distributor_id)
             if(_distributor_id STREQUAL "UBUNTU")
-               execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE _gcc_version)
+               execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE _gcc_version)
                string(REGEX MATCH "\\(.* ${Vc_GCC_VERSION}-([0-9]+).*\\)" _tmp "${_gcc_version}")
                if(_tmp)
                   set(_patch ${CMAKE_MATCH_1})


SB: change swig configuration

SB: change swig configuration

--- SuperBuild/CMake/External_swig.cmake
+++ SuperBuild/CMake/External_swig.cmake
@@ -22,8 +22,7 @@

 SETUP_SUPERBUILD(SWIG)

-set(PythonInterp_FIND_VERSION 2.7)
-find_package(PythonInterp)
+find_package(PythonInterp 3 REQUIRED)
 if(PYTHONINTERP_FOUND)
   set(SWIG_SB_PYTHON_CONFIG "--with-python=${PYTHON_EXECUTABLE}")
 else()


add new macro for cppcheck targets, warn if include dirs not found

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -16,15 +16,25 @@

 MACRO(INCLUDE_DIR)
 	FOREACH( ARG ${ARGN} )
-		LIST(APPEND MY_CXX_FLAGS "-I${ARG}" )
-		INCLUDE_DIRECTORIES(${ARG})
+		IF(IS_DIRECTORY ${ARG} )
+			LIST(APPEND MY_CXX_FLAGS "-I${ARG}" )
+			LIST(APPEND PLAIN_INCLUDE_DIRS "-I${ARG}" )
+			INCLUDE_DIRECTORIES(${ARG})
+		ELSE(IS_DIRECTORY ${ARG} )
+			MESSAGE( STATUS "Include directory ${ARG} does not exist" )
+		ENDIF(IS_DIRECTORY ${ARG} )
     ENDFOREACH( ARG )
 ENDMACRO(INCLUDE_DIR)

 MACRO(INCLUDE_SYS_DIR)
 	FOREACH( ARG ${ARGN} )
-		LIST(APPEND MY_CXX_FLAGS "-isystem${ARG}")
-        INCLUDE_DIRECTORIES(${ARG})
+		IF(IS_DIRECTORY ${ARG} )
+			LIST(APPEND MY_CXX_FLAGS "-isystem${ARG}")
+			LIST(APPEND PLAIN_INCLUDE_DIRS "-I${ARG}" )
+			INCLUDE_DIRECTORIES(${ARG})
+		ELSE(IS_DIRECTORY ${ARG} )
+			MESSAGE( STATUS "Include directory ${ARG} does not exist" )
+		ENDIF(IS_DIRECTORY ${ARG} )
     ENDFOREACH( ARG )
 ENDMACRO(INCLUDE_SYS_DIR)

@@ -40,6 +50,21 @@
 		add_dependencies( headercheck ${TEST_NAME} )
 	ENDFOREACH( HEADER )
 ENDMACRO( HEADERCHECK )
+
+MACRO( ADD_CPPCHECK )
+	ADD_CUSTOM_TARGET( cppcheck SOURCES ${ARGN} )
+	FOREACH( SOURCEFILE ${ARGN} )
+		GET_FILENAME_COMPONENT( fn ${SOURCEFILE} NAME )
+		SET( TEST_NAME "cppcheck_${fn}")
+		SET( CPPCHECK_FLAGS ${PLAIN_INCLUDE_DIRS} )
+		LIST(APPEND CPPCHECK_FLAGS "--enable=all" "--report-progress" "-f" "-v" )
+		TO_LIST_SPACES( CPPCHECK_FLAGS TEST_NAME_FLAGS )
+		SET(XARGS ${TEST_NAME_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCEFILE} )#&> ${CMAKE_CURRENT_BINARY_DIR}/cppcheck_report_${fn}.txt )
+		ADD_CUSTOM_TARGET(  ${TEST_NAME} cppcheck ${XARGS} )
+		ADD_TEST( ${TEST_NAME} ${CMAKE_CXX_COMPILER} ${XARGS} )
+		add_dependencies( cppcheck ${TEST_NAME} )
+	ENDFOREACH( SOURCEFILE )
+ENDMACRO( ADD_CPPCHECK )

 MACRO( ADD_DUNE_MODULES )
 	FOREACH( MODULE ${ARGN} )


Removed old code comment

Removed old code comment

Signed-off-by: Nick Avramoussis <ce9ae7fb000f2865db247e53b12753caeda92c74@users.noreply.github.com>

--- cmake/FindBlosc.cmake
+++ cmake/FindBlosc.cmake
@@ -238,9 +238,7 @@
     # Blosc may optionally be compiled with external sources for
     # lz4, snappy, zlib and zstd. Add them as interface libs if
     # requested (there doesn't seem to be a way to figure this
-    # out automatically). Note that it's assumed these deps have
-    # been statically built if BLOSC_USE_STATIC_LIBS is ON so that
-    # zstd infers the correct name
+    # out automatically).
     if(BLOSC_USE_EXTERNAL_SOURCES)
       set_target_properties(Blosc::blosc PROPERTIES
         INTERFACE_LINK_DIRECTORIES "${Blosc_LIBRARY_DIRS}"


[cmake] Normalize LLVM_ENABLE_DIA_SDK to fix Windows tests

Attempts to fix Windows build breakage caused by r290818.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -457,6 +457,13 @@
   if(LLVM_ENABLE_DIA_SDK AND NOT HAVE_DIA_SDK)
     message(FATAL_ERROR "DIA SDK not found. If you have both VS 2012 and 2013 installed, you may need to uninstall the former and re-install the latter afterwards.")
   endif()
+
+  # Normalize to 0/1 for lit.site.cfg
+  if(LLVM_ENABLE_DIA_SDK)
+    set(LLVM_ENABLE_DIA_SDK 1)
+  else()
+    set(LLVM_ENABLE_DIA_SDK 0)
+  endif()
 else()
   set(LLVM_ENABLE_DIA_SDK 0)
 endif( MSVC )


Revert "[CMake][libunwind] Use -nodefaultlibs for CMake checks"

This reverts commit r299796.

git-svn-id: 62ef012455b6b8fcec9c41ca270ebf409aae1006@299798 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -2,29 +2,6 @@
 include(CheckCCompilerFlag)
 include(CheckCXXCompilerFlag)
 include(CheckLibraryExists)
-
-check_library_exists(c fopen "" LIBUNWIND_HAS_C_LIB)
-
-# libunwind is built with -nodefaultlibs, so we want all our checks to also
-# use this option, otherwise we may end up with an inconsistency between
-# the flags we think we require during configuration (if the checks are
-# performed without -nodefaultlibs) and the flags that are actually
-# required during compilation (which has the -nodefaultlibs). libc is
-# required for the link to go through. We remove sanitizers from the
-# configuration checks to avoid spurious link errors.
-check_c_compiler_flag(-nodefaultlibs LIBUNWIND_HAS_NODEFAULTLIBS_FLAG)
-if (LIBUNWIND_HAS_NODEFAULTLIBS_FLAG)
-  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nodefaultlibs")
-  if (LIBUNWIND_HAS_C_LIB)
-    list(APPEND CMAKE_REQUIRED_LIBRARIES c)
-  endif ()
-  if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize)
-    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all")
-  endif ()
-  if (CMAKE_C_FLAGS MATCHES -fsanitize-coverage OR CMAKE_CXX_FLAGS MATCHES -fsanitize-coverage)
-    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize-coverage=edge,trace-cmp,indirect-calls,8bit-counters")
-  endif ()
-endif ()

 # Check compiler flags
 check_c_compiler_flag(-funwind-tables         LIBUNWIND_HAS_FUNWIND_TABLES)
@@ -32,6 +9,7 @@
 check_cxx_compiler_flag(-fno-exceptions       LIBUNWIND_HAS_NO_EXCEPTIONS_FLAG)
 check_cxx_compiler_flag(-fno-rtti             LIBUNWIND_HAS_NO_RTTI_FLAG)
 check_cxx_compiler_flag(-fstrict-aliasing     LIBUNWIND_HAS_FSTRICT_ALIASING_FLAG)
+check_cxx_compiler_flag(-nodefaultlibs        LIBUNWIND_HAS_NODEFAULTLIBS_FLAG)
 check_cxx_compiler_flag(-nostdinc++           LIBUNWIND_HAS_NOSTDINCXX_FLAG)
 check_cxx_compiler_flag(-Wall                 LIBUNWIND_HAS_WALL_FLAG)
 check_cxx_compiler_flag(-W                    LIBUNWIND_HAS_W_FLAG)
@@ -66,6 +44,7 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 endif()

+check_library_exists(c fopen "" LIBUNWIND_HAS_C_LIB)
 check_library_exists(dl dladdr "" LIBUNWIND_HAS_DL_LIB)
 check_library_exists(pthread pthread_once "" LIBUNWIND_HAS_PTHREAD_LIB)


Build relocatable code. (#413)

Build relocatable code. (#413)

This is required to reuse code from cartographer_ros in cartographer_rviz. Otherwise linking fails with errors like these:

~~~
/usr/bin/ld: libcartographer_ros.a(msg_conversion.cc.o): relocation R_X86_64_32S against `_ZNSs4_Rep20_S_empty_rep_storageE' can not be use
d when making a shared object; recompile with -fPIC
~~~

While this could be fixed locally in cartographer_ros, it is a reasonable default to compile with `-fPIC` always.

--- cmake/functions.cmake
+++ cmake/functions.cmake
@@ -72,7 +72,7 @@
     set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
         ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
   endif()
-  set(GOOG_CXX_FLAGS "-pthread -std=c++11 ${GOOG_CXX_FLAGS}")
+  set(GOOG_CXX_FLAGS "-pthread -std=c++11 -fPIC ${GOOG_CXX_FLAGS}")

   google_add_flag(GOOG_CXX_FLAGS "-Wall")
   google_add_flag(GOOG_CXX_FLAGS "-Wpedantic")


cmake: allow Cortex-R52 to configure VFP

The Cortex-R52 processor supports single-precision
floating-point instructions and can optionally support
the double-precision floating-point instructions.

Signed-off-by: Manuel Arguelles <02a481319597bfa86d8bffd931356bede27cabe5@nxp.com>

--- cmake/gcc-m-fpu.cmake
+++ cmake/gcc-m-fpu.cmake
@@ -7,7 +7,7 @@

 if("${ARCH}" STREQUAL "arm")
   if(CONFIG_CPU_AARCH32_CORTEX_R)
-    if(CONFIG_CPU_CORTEX_R4 OR CONFIG_CPU_CORTEX_R5) # VFPv3
+    if(CONFIG_CPU_CORTEX_R4 OR CONFIG_CPU_CORTEX_R5 OR CONFIG_CPU_CORTEX_R52) # VFPv3
       if(CONFIG_VFP_FEATURE_DOUBLE_PRECISION)
         set(GCC_M_FPU vfpv3-d16)
       elseif(CONFIG_VFP_FEATURE_SINGLE_PRECISION)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2008)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 11)
+SET(KWSYS_DATE_STAMP_MONTH 12)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


nasm cmake fix

nasm cmake fix

--- tensorflow/contrib/cmake/external/grpc.cmake
+++ tensorflow/contrib/cmake/external/grpc.cmake
@@ -32,7 +32,7 @@
   endif()
 endif()

-if(NOT NASM_COMPILER)
+if(NOT CMAKE_ASM_NASM_COMPILER)
   message(FATAL_ERROR "NASM not found!")
 endif()


- переименование

 - переименование

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@12537 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/win32.install.cmake
+++ rdo/packages/cmake/trunk/win32.install.cmake
@@ -32,56 +32,56 @@
 	${DLL_EGL}
 )

-FIND_FILE(DLL_QT_CORE_R     Qt5Core.dll     PATHS ${QT_LIBRARY_DIR})
-FIND_FILE(DLL_QT_CORE_D     Qt5Cored.dll    PATHS ${QT_LIBRARY_DIR})
-FIND_FILE(DLL_QT_CUI_R      Qt5Gui.dll      PATHS ${QT_LIBRARY_DIR})
-FIND_FILE(DLL_QT_CUI_D      Qt5Guid.dll     PATHS ${QT_LIBRARY_DIR})
-FIND_FILE(DLL_QT_WIDGETS_R  Qt5Widgets.dll  PATHS ${QT_LIBRARY_DIR})
-FIND_FILE(DLL_QT_WIDGETS_D  Qt5Widgetsd.dll PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_R_QT_CORE     Qt5Core.dll     PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_D_QT_CORE     Qt5Cored.dll    PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_R_QT_CUI      Qt5Gui.dll      PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_D_QT_CUI      Qt5Guid.dll     PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_R_QT_WIDGETS  Qt5Widgets.dll  PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_D_QT_WIDGETS  Qt5Widgetsd.dll PATHS ${QT_LIBRARY_DIR})

-FIND_FILE(DLL_PLUGINS_QWINDOWS_R qwindows.dll  PATHS ${QT_PLUGINS_PLATFORMS_DIR})
-FIND_FILE(DLL_PLUGINS_QWINDOWS_D qwindowsd.dll PATHS ${QT_PLUGINS_PLATFORMS_DIR})
-FIND_FILE(DLL_PLUGINS_QMINIMAL_R qminimal.dll  PATHS ${QT_PLUGINS_PLATFORMS_DIR})
-FIND_FILE(DLL_PLUGINS_QMINIMAL_D qminimald.dll PATHS ${QT_PLUGINS_PLATFORMS_DIR})
+FIND_FILE(DLL_R_PLUGINS_QWINDOWS qwindows.dll  PATHS ${QT_PLUGINS_PLATFORMS_DIR})
+FIND_FILE(DLL_D_PLUGINS_QWINDOWS qwindowsd.dll PATHS ${QT_PLUGINS_PLATFORMS_DIR})
+FIND_FILE(DLL_R_PLUGINS_QMINIMAL qminimal.dll  PATHS ${QT_PLUGINS_PLATFORMS_DIR})
+FIND_FILE(DLL_D_PLUGINS_QMINIMAL qminimald.dll PATHS ${QT_PLUGINS_PLATFORMS_DIR})

 IF (MSVC90)
-	FIND_FILE(DLL_MSVCR_D msvcp90d.dll)
-	FIND_FILE(DLL_MSVCP_D msvcr90d.dll)
-	FIND_FILE(DLL_MSVCR_R msvcp90.dll)
-	FIND_FILE(DLL_MSVCP_R msvcr90.dll)
+	FIND_FILE(DLL_R_MSVCP msvcp90.dll)
+	FIND_FILE(DLL_D_MSVCP msvcp90d.dll)
+	FIND_FILE(DLL_R_MSVCR msvcr90.dll)
+	FIND_FILE(DLL_D_MSVCR msvcr90d.dll)
 ELSE()
-	FIND_FILE(DLL_MSVCP_D msvcp100d.dll)
-	FIND_FILE(DLL_MSVCR_D msvcr100d.dll)
-	FIND_FILE(DLL_MSVCP_R msvcp100.dll)
-	FIND_FILE(DLL_MSVCR_R msvcr100.dll)
+	FIND_FILE(DLL_R_MSVCP msvcp100.dll)
+	FIND_FILE(DLL_D_MSVCP msvcp100d.dll)
+	FIND_FILE(DLL_R_MSVCR msvcr100.dll)
+	FIND_FILE(DLL_D_MSVCR msvcr100d.dll)
 ENDIF()

 SET(CONFIG_DLL_D
 	${DLL_D_AND_R}
-	${DLL_QT_CORE_D}
-	${DLL_QT_CUI_D}
-	${DLL_QT_WIDGETS_D}
-	${DLL_MSVCR_D}
-	${DLL_MSVCP_D}
+	${DLL_D_QT_CORE}
+	${DLL_D_QT_CUI}
+	${DLL_D_QT_WIDGETS}
+	${DLL_D_MSVCR}
+	${DLL_D_MSVCP}
 )
 SET(CONFIG_PLUGINS_PLATFORM_D
-	${DLL_PLUGINS_QWINDOWS_D}
-	${DLL_PLUGINS_QMINIMAL_D}
+	${DLL_D_PLUGINS_QWINDOWS}
+	${DLL_D_PLUGINS_QMINIMAL}
 )
 FILE(COPY ${CONFIG_DLL_D}              DESTINATION ${CONFIG_DIRECTORY_DEBUG})
 FILE(COPY ${CONFIG_PLUGINS_PLATFORM_D} DESTINATION ${CONFIG_DIRECTORY_DEBUG}/${QT_PLUGINS_PLATFORMS})

 SET(CONFIG_DLL_R
 	${DLL_D_AND_R}
-	${DLL_QT_CORE_R}
-	${DLL_QT_CUI_R}
-	${DLL_QT_WIDGETS_R}
-	${DLL_MSVCR_R}
-	${DLL_MSVCP_R}
+	${DLL_R_QT_CORE}
+	${DLL_R_QT_CUI}
+	${DLL_R_QT_WIDGETS}
+	${DLL_R_MSVCR}
+	${DLL_R_MSVCP}
 )
 SET(CONFIG_PLUGINS_PLATFORM_R
-	${DLL_PLUGINS_QWINDOWS_R}
-	${DLL_PLUGINS_QMINIMAL_R}
+	${DLL_R_PLUGINS_QWINDOWS}
+	${DLL_R_PLUGINS_QMINIMAL}
 )
 FILE(COPY ${CONFIG_DLL_R}              DESTINATION ${CONFIG_DIRECTORY_RELEASE})
 FILE(COPY ${CONFIG_PLUGINS_PLATFORM_R} DESTINATION ${CONFIG_DIRECTORY_RELEASE}/${QT_PLUGINS_PLATFORMS})


github ci aarch64 config build  cpp-httplib HTTPLIB_REQUIRE_OPENSSL OFF

--- toolchains/aarch64-linux-gnu.toolchain.cmake
+++ toolchains/aarch64-linux-gnu.toolchain.cmake
@@ -16,4 +16,5 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags")
 set(OPENSSL_ROOT_DIR  "${workspaceFolder}/openssl-1.1.1i/install")
 set(OPENSSL_INCLUDE_DIR "${workspaceFolder}/openssl-1.1.1i/install/include")
-set(OPENSSL_CRYPTO_LIBRARY "${workspaceFolder}/openssl-1.1.1i/install/lib")+set(OPENSSL_CRYPTO_LIBRARY "${workspaceFolder}/openssl-1.1.1i/install/lib")
+set(HTTPLIB_REQUIRE_OPENSSL OFF)


Fixed UUID generation.

Fixed UUID generation.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -125,7 +125,8 @@
 endif()
 set(CI_BUILD_NAME "${CC_NAME}-${CC_VERSION}-${CC_ARCH}")

-string(UUID CI_BUILD_UUID NAMESPACE cd1ae0ac-17b9-4018-85da-921f0d3ae8d8 NAME "ci-tools" TYPE SHA1)
+string(RANDOM CI_BUILD_UUID_RANDOM)
+string(UUID CI_BUILD_UUID NAMESPACE cd1ae0ac-17b9-4018-85da-921f0d3ae8d8 NAME ${CI_BUILD_UUID_RANDOM} TYPE SHA1)

 if(UNIX)
     set(CTEST_BINARY_DIRECTORY "$ENV{HOME}/build/${CI_BUILD_UUID}")


Generalize section renaming in objcopy invocation

--- cmake/Modules/CMakeCOGCXXObjcopy.cmake
+++ cmake/Modules/CMakeCOGCXXObjcopy.cmake
@@ -15,23 +15,22 @@
 # File: CMakeCOGCXXObjcopy.cmake
 # Description: Run objcopy on an embedded C++ cog program so that it can be linked into a
 #       larger program.
-
-message( STATUS "CMakeCOGCXXObjcopy.cmake" )
+# Parameters:
+#       - CMAKE_OBJCOPY: The objcopy program to run.
+#       - OBJECT: The object file to run objcopy on.

 # extract the name of the object file
 get_filename_component( OBJECT_NAME ${OBJECT} NAME )

+# extract the name of the object file with the file extension removed
+get_filename_component( OBJECT_NAME_WE ${OBJECT} NAME_WE )
+
 # extract the location of the object file
 get_filename_component( OBJECT_DIR  ${OBJECT} DIRECTORY )

-message( STATUS "CMAKE_OBJCOPY ${CMAKE_OBJCOPY}" )
-message( STATUS "OBJECT        ${OBJECT}" )
-message( STATUS "OBJECT_NAME   ${OBJECT_NAME}" )
-message( STATUS "OBJECT_DIR    ${OBJECT_DIR}" )
-
 # run objcopy
 execute_process(
-    COMMAND ${CMAKE_OBJCOPY} --localize-text --rename-section .text=led_blinker.cog ${OBJECT_NAME}
+    COMMAND ${CMAKE_OBJCOPY} --localize-text --rename-section .text=${OBJECT_NAME_WE}.cog ${OBJECT_NAME}
     WORKING_DIRECTORY ${OBJECT_DIR}
     RESULT_VARIABLE OBJCOPY_RESULT
 )


Higher python versions

Higher python versions

--- cmake/Modules/FindPython/Support.cmake
+++ cmake/Modules/FindPython/Support.cmake
@@ -17,7 +17,7 @@
   message (FATAL_ERROR "FindPython: INTERNAL ERROR")
 endif()
 if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
-  set(_${_PYTHON_PREFIX}_VERSIONS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+  set(_${_PYTHON_PREFIX}_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
 elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
   set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
 else()


Fix ament_get_pytest_cov_version for newer versions of pytest (#315)

Signed-off-by: Christophe Bedard <47f825544f22d0e021ad5059f621c719c67210a3@gmail.com>

--- ament_cmake_pytest/cmake/ament_get_pytest_cov_version.cmake
+++ ament_cmake_pytest/cmake/ament_get_pytest_cov_version.cmake
@@ -35,7 +35,8 @@
     set(ARG_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
   endif()

-  set(cmd "${ARG_PYTHON_EXECUTABLE}" "-m" "pytest" "--version")
+  # Newer versions of pytest require providing '--version' twice to include plugin versions
+  set(cmd "${ARG_PYTHON_EXECUTABLE}" "-m" "pytest" "--version" "--version")
   execute_process(
     COMMAND ${cmd}
     RESULT_VARIABLE res
@@ -44,7 +45,7 @@
   if(res EQUAL 0)
     # check if pytest-cov is in the list of plugins
     # (actual output of the command is in ${error} and not ${output})
-    string(REGEX MATCH "pytest-cov-([0-9]\.[0-9]\.[0-9])" pytest_cov_full_version "${error}")
+    string(REGEX MATCH "pytest-cov-([0-9]+\.[0-9]+\.[0-9]+)" pytest_cov_full_version "${error}")
     if(pytest_cov_full_version)
       set(${var} ${CMAKE_MATCH_1} PARENT_SCOPE)
     else()


[Build] Added full support for SEvMgr, TraDemGen, TravelCCM, AirSched, AvlCal, SimFQT, SimLFS and SimCRS.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -590,6 +590,134 @@

 endmacro (get_stdair)

+# ~~~~~~~~~~ SEvMgr ~~~~~~~~~
+macro (get_sevmgr)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires SEvMgr-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires SEvMgr without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (SEvMgr ${_required_version} REQUIRED
+	HINTS ${WITH_SEVMGR_PREFIX})
+  if (SEvMgr_FOUND)
+    #
+    message (STATUS "Found SEvMgr version: ${SEVMGR_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${SEVMGR_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${SEVMGR_LIBRARIES})
+
+  else (SEvMgr_FOUND)
+    set (ERROR_MSG "The SEvMgr library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_SEVMGR_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<SEvMgr install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (SEvMgr_FOUND)
+
+endmacro (get_sevmgr)
+
+# ~~~~~~~~~~ TraDemGen ~~~~~~~~~
+macro (get_trademgen)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires TraDemGen-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires TraDemGen without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (TraDemGen ${_required_version} REQUIRED
+	HINTS ${WITH_TRADEMGEN_PREFIX})
+  if (TraDemGen_FOUND)
+    #
+    message (STATUS "Found TraDemGen version: ${TRADEMGEN_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${TRADEMGEN_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${TRADEMGEN_LIBRARIES})
+
+  else (TraDemGen_FOUND)
+    set (ERROR_MSG "The TraDemGen library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_TRADEMGEN_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<TraDemGen install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (TraDemGen_FOUND)
+
+endmacro (get_trademgen)
+
+# ~~~~~~~~~~ TravelCCM ~~~~~~~~~
+macro (get_travelccm)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires TravelCCM-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires TravelCCM without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (TravelCCM ${_required_version} REQUIRED
+	HINTS ${WITH_TRAVELCCM_PREFIX})
+  if (TravelCCM_FOUND)
+    #
+    message (STATUS "Found TravelCCM version: ${TRAVELCCM_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${TRAVELCCM_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${TRAVELCCM_LIBRARIES})
+
+  else (TravelCCM_FOUND)
+    set (ERROR_MSG "The TravelCCM library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_TRAVELCCM_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<TravelCCM install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (TravelCCM_FOUND)
+
+endmacro (get_travelccm)
+
+# ~~~~~~~~~~ AirSched ~~~~~~~~~
+macro (get_airsched)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires AirSched-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires AirSched without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (AirSched ${_required_version} REQUIRED
+	HINTS ${WITH_AIRSCHED_PREFIX})
+  if (AirSched_FOUND)
+    #
+    message (STATUS "Found AirSched version: ${AIRSCHED_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${AIRSCHED_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRSCHED_LIBRARIES})
+
+  else (AirSched_FOUND)
+    set (ERROR_MSG "The AirSched library cannot be found. If it is installed")
+    set (ERROR_MSG "${ERROR_MSG} in a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRSCHED_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<AirSched install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (AirSched_FOUND)
+
+endmacro (get_airsched)
+
 # ~~~~~~~~~~ AirRAC ~~~~~~~~~
 macro (get_airrac)
   unset (_required_version)
@@ -654,21 +782,21 @@

 endmacro (get_rmol)

-# ~~~~~~~~~~ Airinv ~~~~~~~~~
+# ~~~~~~~~~~ AirInv ~~~~~~~~~
 macro (get_airinv)
   unset (_required_version)
   if (${ARGC} GREATER 0)
     set (_required_version ${ARGV0})
-    message (STATUS "Requires Airinv-${_required_version}")
+    message (STATUS "Requires AirInv-${_required_version}")
   else (${ARGC} GREATER 0)
-    message (STATUS "Requires Airinv without specifying any version")
+    message (STATUS "Requires AirInv without specifying any version")
   endif (${ARGC} GREATER 0)

-  find_package (Airinv ${_required_version} REQUIRED
+  find_package (AirInv ${_required_version} REQUIRED
 	HINTS ${WITH_AIRINV_PREFIX})
-  if (Airinv_FOUND)
+  if (AirInv_FOUND)
     #
-    message (STATUS "Found Airinv version: ${AIRINV_VERSION}")
+    message (STATUS "Found AirInv version: ${AIRINV_VERSION}")

     # Update the list of include directories for the project
     include_directories (${AIRINV_INCLUDE_DIRS})
@@ -676,15 +804,143 @@
     # Update the list of dependencies for the project
     set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRINV_LIBRARIES})

-  else (Airinv_FOUND)
-    set (ERROR_MSG "The Airinv library cannot be found. If it is installed in")
+  else (AirInv_FOUND)
+    set (ERROR_MSG "The AirInv library cannot be found. If it is installed in")
     set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
     set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRINV_PREFIX=")
-    set (ERROR_MSG "${ERROR_MSG}<Airinv install path> variable.")
+    set (ERROR_MSG "${ERROR_MSG}<AirInv install path> variable.")
     message (FATAL_ERROR "${ERROR_MSG}")
-  endif (Airinv_FOUND)
+  endif (AirInv_FOUND)

 endmacro (get_airinv)
+
+# ~~~~~~~~~~ AvlCal ~~~~~~~~~
+macro (get_avlcal)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires AvlCal-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires AvlCal without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (AvlCal ${_required_version} REQUIRED
+	HINTS ${WITH_AVLCAL_PREFIX})
+  if (AvlCal_FOUND)
+    #
+    message (STATUS "Found AvlCal version: ${AVLCAL_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${AVLCAL_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AVLCAL_LIBRARIES})
+
+  else (AvlCal_FOUND)
+    set (ERROR_MSG "The AvlCal library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AVLCAL_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<AvlCal install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (AvlCal_FOUND)
+
+endmacro (get_avlcal)
+
+# ~~~~~~~~~~ SimFQT ~~~~~~~~~
+macro (get_simfqt)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires SimFQT-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires SimFQT without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (SimFQT ${_required_version} REQUIRED
+	HINTS ${WITH_SIMFQT_PREFIX})
+  if (SimFQT_FOUND)
+    #
+    message (STATUS "Found SimFQT version: ${SIMFQT_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${SIMFQT_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${SIMFQT_LIBRARIES})
+
+  else (SimFQT_FOUND)
+    set (ERROR_MSG "The SimFQT library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_SIMFQT_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<SimFQT install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (SimFQT_FOUND)
+
+endmacro (get_simfqt)
+
+# ~~~~~~~~~~ SimLFS ~~~~~~~~~
+macro (get_simlfs)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires SimLFS-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires SimLFS without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (SimLFS ${_required_version} REQUIRED
+	HINTS ${WITH_SIMLFS_PREFIX})
+  if (SimLFS_FOUND)
+    #
+    message (STATUS "Found SimLFS version: ${SIMLFS_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${SIMLFS_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${SIMLFS_LIBRARIES})
+
+  else (SimLFS_FOUND)
+    set (ERROR_MSG "The SimLFS library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_SIMLFS_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<SimLFS install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (SimLFS_FOUND)
+
+endmacro (get_simlfs)
+
+# ~~~~~~~~~~ SimCRS ~~~~~~~~~
+macro (get_simcrs)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires SimCRS-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires SimCRS without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (SimCRS ${_required_version} REQUIRED
+	HINTS ${WITH_SIMCRS_PREFIX})
+  if (SimCRS_FOUND)
+    #
+    message (STATUS "Found SimCRS version: ${SIMCRS_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${SIMCRS_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${SIMCRS_LIBRARIES})
+
+  else (SimCRS_FOUND)
+    set (ERROR_MSG "The SimCRS library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_SIMCRS_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<SimCRS install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (SimCRS_FOUND)
+
+endmacro (get_simcrs)

 ##############################################
@@ -1667,6 +1923,62 @@
   endif (StdAir_FOUND)
 endmacro (display_stdair)

+# SEvMgr
+macro (display_sevmgr)
+  if (SEvMgr_FOUND)
+    message (STATUS)
+    message (STATUS "* SEvMgr:")
+    message (STATUS "  - SEVMGR_VERSION ............. : ${SEVMGR_VERSION}")
+    message (STATUS "  - SEVMGR_BINARY_DIRS ......... : ${SEVMGR_BINARY_DIRS}")
+    message (STATUS "  - SEVMGR_EXECUTABLES ......... : ${SEVMGR_EXECUTABLES}")
+    message (STATUS "  - SEVMGR_LIBRARY_DIRS ........ : ${SEVMGR_LIBRARY_DIRS}")
+    message (STATUS "  - SEVMGR_LIBRARIES ........... : ${SEVMGR_LIBRARIES}")
+    message (STATUS "  - SEVMGR_INCLUDE_DIRS ........ : ${SEVMGR_INCLUDE_DIRS}")
+  endif (SEvMgr_FOUND)
+endmacro (display_sevmgr)
+
+# TraDemGen
+macro (display_trademgen)
+  if (TraDemGen_FOUND)
+    message (STATUS)
+    message (STATUS "* TraDemGen:")
+    message (STATUS "  - TRADEMGEN_VERSION .......... : ${TRADEMGEN_VERSION}")
+    message (STATUS "  - TRADEMGEN_BINARY_DIRS ...... : ${TRADEMGEN_BINARY_DIRS}")
+    message (STATUS "  - TRADEMGEN_EXECUTABLES ...... : ${TRADEMGEN_EXECUTABLES}")
+    message (STATUS "  - TRADEMGEN_LIBRARY_DIRS ..... : ${TRADEMGEN_LIBRARY_DIRS}")
+    message (STATUS "  - TRADEMGEN_LIBRARIES ........ : ${TRADEMGEN_LIBRARIES}")
+    message (STATUS "  - TRADEMGEN_INCLUDE_DIRS ..... : ${TRADEMGEN_INCLUDE_DIRS}")
+  endif (TraDemGen_FOUND)
+endmacro (display_trademgen)
+
+# TravelCCM
+macro (display_travelccm)
+  if (TravelCCM_FOUND)
+    message (STATUS)
+    message (STATUS "* TravelCCM:")
+    message (STATUS "  - TRAVELCCM_VERSION .......... : ${TRAVELCCM_VERSION}")
+    message (STATUS "  - TRAVELCCM_BINARY_DIRS ...... : ${TRAVELCCM_BINARY_DIRS}")
+    message (STATUS "  - TRAVELCCM_EXECUTABLES ...... : ${TRAVELCCM_EXECUTABLES}")
+    message (STATUS "  - TRAVELCCM_LIBRARY_DIRS ..... : ${TRAVELCCM_LIBRARY_DIRS}")
+    message (STATUS "  - TRAVELCCM_LIBRARIES ........ : ${TRAVELCCM_LIBRARIES}")
+    message (STATUS "  - TRAVELCCM_INCLUDE_DIRS ..... : ${TRAVELCCM_INCLUDE_DIRS}")
+  endif (TravelCCM_FOUND)
+endmacro (display_travelccm)
+
+# AirSched
+macro (display_airsched)
+  if (AirSched_FOUND)
+    message (STATUS)
+    message (STATUS "* AirSched:")
+    message (STATUS "  - AIRSCHED_VERSION ........... : ${AIRSCHED_VERSION}")
+    message (STATUS "  - AIRSCHED_BINARY_DIRS ....... : ${AIRSCHED_BINARY_DIRS}")
+    message (STATUS "  - AIRSCHED_EXECUTABLES ....... : ${AIRSCHED_EXECUTABLES}")
+    message (STATUS "  - AIRSCHED_LIBRARY_DIRS ...... : ${AIRSCHED_LIBRARY_DIRS}")
+    message (STATUS "  - AIRSCHED_LIBRARIES ......... : ${AIRSCHED_LIBRARIES}")
+    message (STATUS "  - AIRSCHED_INCLUDE_DIRS ...... : ${AIRSCHED_INCLUDE_DIRS}")
+  endif (AirSched_FOUND)
+endmacro (display_airsched)
+
 # AirRAC
 macro (display_airrac)
   if (AirRAC_FOUND)
@@ -1695,19 +2007,75 @@
   endif (RMOL_FOUND)
 endmacro (display_rmol)

-# Airinv
+# AirInv
 macro (display_airinv)
-  if (Airinv_FOUND)
+  if (AirInv_FOUND)
     message (STATUS)
-    message (STATUS "* Airinv:")
+    message (STATUS "* AirInv:")
     message (STATUS "  - AIRINV_VERSION ............. : ${AIRINV_VERSION}")
     message (STATUS "  - AIRINV_BINARY_DIRS ......... : ${AIRINV_BINARY_DIRS}")
     message (STATUS "  - AIRINV_EXECUTABLES ......... : ${AIRINV_EXECUTABLES}")
     message (STATUS "  - AIRINV_LIBRARY_DIRS ........ : ${AIRINV_LIBRARY_DIRS}")
     message (STATUS "  - AIRINV_LIBRARIES ........... : ${AIRINV_LIBRARIES}")
     message (STATUS "  - AIRINV_INCLUDE_DIRS ........ : ${AIRINV_INCLUDE_DIRS}")
-  endif (Airinv_FOUND)
+  endif (AirInv_FOUND)
 endmacro (display_airinv)
+
+# AvlCal
+macro (display_avlcal)
+  if (AvlCal_FOUND)
+    message (STATUS)
+    message (STATUS "* AvlCal:")
+    message (STATUS "  - AVLCAL_VERSION ............. : ${AVLCAL_VERSION}")
+    message (STATUS "  - AVLCAL_BINARY_DIRS ......... : ${AVLCAL_BINARY_DIRS}")
+    message (STATUS "  - AVLCAL_EXECUTABLES ......... : ${AVLCAL_EXECUTABLES}")
+    message (STATUS "  - AVLCAL_LIBRARY_DIRS ........ : ${AVLCAL_LIBRARY_DIRS}")
+    message (STATUS "  - AVLCAL_LIBRARIES ........... : ${AVLCAL_LIBRARIES}")
+    message (STATUS "  - AVLCAL_INCLUDE_DIRS ........ : ${AVLCAL_INCLUDE_DIRS}")
+  endif (AvlCal_FOUND)
+endmacro (display_avlcal)
+
+# SimFQT
+macro (display_simfqt)
+  if (SimFQT_FOUND)
+    message (STATUS)
+    message (STATUS "* SimFQT:")
+    message (STATUS "  - SIMFQT_VERSION ............. : ${SIMFQT_VERSION}")
+    message (STATUS "  - SIMFQT_BINARY_DIRS ......... : ${SIMFQT_BINARY_DIRS}")
+    message (STATUS "  - SIMFQT_EXECUTABLES ......... : ${SIMFQT_EXECUTABLES}")
+    message (STATUS "  - SIMFQT_LIBRARY_DIRS ........ : ${SIMFQT_LIBRARY_DIRS}")
+    message (STATUS "  - SIMFQT_LIBRARIES ........... : ${SIMFQT_LIBRARIES}")
+    message (STATUS "  - SIMFQT_INCLUDE_DIRS ........ : ${SIMFQT_INCLUDE_DIRS}")
+  endif (SimFQT_FOUND)
+endmacro (display_simfqt)
+
+# SimLFS
+macro (display_simlfs)
+  if (SimLFS_FOUND)
+    message (STATUS)
+    message (STATUS "* SimLFS:")
+    message (STATUS "  - SIMLFS_VERSION ............. : ${SIMLFS_VERSION}")
+    message (STATUS "  - SIMLFS_BINARY_DIRS ......... : ${SIMLFS_BINARY_DIRS}")
+    message (STATUS "  - SIMLFS_EXECUTABLES ......... : ${SIMLFS_EXECUTABLES}")
+    message (STATUS "  - SIMLFS_LIBRARY_DIRS ........ : ${SIMLFS_LIBRARY_DIRS}")
+    message (STATUS "  - SIMLFS_LIBRARIES ........... : ${SIMLFS_LIBRARIES}")
+    message (STATUS "  - SIMLFS_INCLUDE_DIRS ........ : ${SIMLFS_INCLUDE_DIRS}")
+  endif (SimLFS_FOUND)
+endmacro (display_simlfs)
+
+# SimCRS
+macro (display_simcrs)
+  if (SimCRS_FOUND)
+    message (STATUS)
+    message (STATUS "* SimCRS:")
+    message (STATUS "  - SIMCRS_VERSION ............. : ${SIMCRS_VERSION}")
+    message (STATUS "  - SIMCRS_BINARY_DIRS ......... : ${SIMCRS_BINARY_DIRS}")
+    message (STATUS "  - SIMCRS_EXECUTABLES ......... : ${SIMCRS_EXECUTABLES}")
+    message (STATUS "  - SIMCRS_LIBRARY_DIRS ........ : ${SIMCRS_LIBRARY_DIRS}")
+    message (STATUS "  - SIMCRS_LIBRARIES ........... : ${SIMCRS_LIBRARIES}")
+    message (STATUS "  - SIMCRS_INCLUDE_DIRS ........ : ${SIMCRS_INCLUDE_DIRS}")
+  endif (SimCRS_FOUND)
+endmacro (display_simcrs)

 ##
 macro (display_status_all_modules)
@@ -1793,9 +2161,17 @@
   display_mysql ()
   display_soci ()
   display_stdair ()
+  display_sevmgr ()
+  display_trademgen ()
+  display_travelccm ()
+  display_airsched ()
   display_airrac ()
   display_rmol ()
   display_airinv ()
+  display_avlcal ()
+  display_simfqt ()
+  display_simlfs ()
+  display_simcrs ()
   #
   message (STATUS)
   message (STATUS "Change a value with: cmake -D<Variable>=<Value>" )


Revert "Remove unused (nonexistant?) library"

--- lib/FindAtomSpace.cmake
+++ lib/FindAtomSpace.cmake
@@ -38,6 +38,9 @@
    PATH ${ATOMSPACE_LIBPATH})

 find_library(ATOMSPACE_persist-zmq_LIBRARY persist-zmq
+   PATH ${ATOMSPACE_LIBPATH})
+
+find_library(ATOMSPACE_zmqatoms_LIBRARY zmqatoms
    PATH ${ATOMSPACE_LIBPATH})

 find_library(ATOMSPACE_PythonEval_LIBRARY PythonEval


Fixed in FindXDR.cmake

Fixed in FindXDR.cmake

--- cmake/FindXDR.cmake
+++ cmake/FindXDR.cmake
@@ -53,7 +53,7 @@
 				IF (XDR_INT_LIBRARY_D)
 					CHECK_LIBRARY_EXISTS(${XDR_INT_LIBRARY_D} xdr_int "" XDR_INT_SYMBOL_D_FOUND)
 					IF (XDR_INT_SYMBOL_D_FOUND)
-						BALL_COMBINE_LIBS(XDR_LIBRARIES $(XDR_LIBRARIES) $(XDR_INT_LIBRARY_D))
+						BALL_COMBINE_LIBS(XDR_LIBRARIES ${XDR_LIBRARIES} ${XDR_INT_LIBRARY_D})
 					ENDIF()
 				ENDIF()

@@ -71,7 +71,7 @@

 		## Let's see if we have an implementation for xdr_u_hyper
 		IF (XDR_LIBRARIES)
-			CHECK_LIBRARY_EXISTS(${XDR_LIBRARIES} xdr_u_hyper "" BALL_HAS_XDR_U_HYPER)
+			CHECK_LIBRARY_EXISTS(${XDR_INT_LIBRARY} xdr_u_hyper "" BALL_HAS_XDR_U_HYPER)
 		ELSE()
 			CHECK_FUNCTION_EXISTS(xdr_u_hyper BALL_HAS_XDR_U_HYPER)
 		ENDIF()


Now, zip file targets will be built only when input files are newer.

--- cmake/FindZIP.cmake
+++ cmake/FindZIP.cmake
@@ -23,10 +23,16 @@
         set(output_file_use ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE})
     endif()

-    add_custom_target(${OUTPUT_FILE} ALL
+    add_custom_command(
         DEPENDS ${input_files}
+        OUTPUT ${output_file_use}
         COMMAND ${ZIP_EXECUTABLE} ${output_file_use} ${ARGN}
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    )
+
+    string(REPLACE "/" "___" zip_target ${output_file_use})
+    add_custom_target(ZIP_TARGET_${zip_target} ALL
+        DEPENDS ${output_file_use}
     )
 endfunction()


turn on race detector for all go tests

turn on race detector for all go tests

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -337,7 +337,7 @@
   string(REPLACE "${PADDLE_GO_PATH}" "" CMAKE_CURRENT_SOURCE_REL_DIR ${CMAKE_CURRENT_SOURCE_DIR})
   add_custom_target(${TARGET_NAME} ALL DEPENDS go_vendor ${go_test_DEPS})
   add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
-    COMMAND env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} test
+    COMMAND env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} test -race
     -c -o "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}"
     ".${CMAKE_CURRENT_SOURCE_REL_DIR}"
     WORKING_DIRECTORY "${PADDLE_IN_GOPATH}/go")


Changing copy_if_different to copy

Changing copy_if_different to copy

This prevents a timestamp issue: if a file is edited in such a way that it comes
to be the same as it was, its timestamp will nonetheless indicate it's a newer
file than its copy in the build tree.  On doing a "make", this causes the
copy_if_different action to fire, which will not copy the file (because they are
the same).  You get stuck in a slightly ugly state where make will not
"converge" to the null action, even though it has nothing to do.  Instead,
force-copying the file will keep the timestamps in sync and eliminate the
behavior.

--- cmake/tangelo.cmake
+++ cmake/tangelo.cmake
@@ -4,7 +4,7 @@
 function(copy_file f outfile)
     add_custom_command(
         OUTPUT ${outfile}
-        COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/${f} ${outfile}
+        COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/${f} ${outfile}
         DEPENDS ${f}
         COMMENT "Copying ${f}"
     )


FIX (#1961): workaround for too-long include paths in moc generated files

--- Utilities/openCherry/CMake/MacroCreatePlugin.cmake
+++ Utilities/openCherry/CMake/MacroCreatePlugin.cmake
@@ -71,14 +71,19 @@
     QT4_WRAP_UI(PLUGIN_GENERATED_FILES ${PLUGIN_UI_FILES})
   ENDIF(PLUGIN_UI_FILES)
   IF(PLUGIN_MOC_H_FILES)
-    QT4_WRAP_CPP(PLUGIN_GENERATED_FILES ${PLUGIN_MOC_H_FILES})
+    # this is a workaround for Visual Studio. The relative include paths in the generated
+    # moc files can get very long and can't be resolved by the MSVC compiler. See bug #1961
+    # for details.
+    FOREACH(moc_h_file ${PLUGIN_MOC_H_FILES})
+      QT4_WRAP_CPP(PLUGIN_GENERATED_FILES ${moc_h_file} OPTIONS -f${moc_h_file})
+    ENDFOREACH(moc_h_file)
   ENDIF(PLUGIN_MOC_H_FILES)
   IF(PLUGIN_RES_FILES)
     QT4_ADD_RESOURCES(PLUGIN_GENERATED_FILES ${PLUGIN_RES_FILES})
   ENDIF(PLUGIN_RES_FILES)
-
-
-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR})
+
+
+  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR})
   _MACRO_SETUP_PLUGIN_DEPENDENCIES(_linklibs PLUGIN_NAME ${BUNDLE-SYMBOLICNAME})

   MACRO_ORGANIZE_SOURCES(INPUT ${PLUGIN_CPP_FILES}


[CMake] [darwin] [builtins] Refactoring code to filter builtin lists out into a function. NFC.

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

--- cmake/Modules/CompilerRTDarwinUtils.cmake
+++ cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -184,6 +184,25 @@
   add_dependencies(${LIB_PARENT_TARGET} ${name})
 endfunction()

+# Filter out generic versions of routines that are re-implemented in
+# architecture specific manner.  This prevents multiple definitions of the
+# same symbols, making the symbol selection non-deterministic.
+function(darwin_filter_builtin_sources output_var excluded_list)
+  set(intermediate ${ARGN})
+  foreach (_file ${intermediate})
+    get_filename_component(_name_we ${_file} NAME_WE)
+    list(FIND ${excluded_list} ${_name_we} _found)
+    if(_found GREATER -1)
+      list(REMOVE_ITEM intermediate ${_file})
+    elseif(${_file} MATCHES ".*/.*\\.S")
+      get_filename_component(_name ${_file} NAME)
+      string(REPLACE ".S" ".c" _cname "${_name}")
+      list(REMOVE_ITEM intermediate ${_cname})
+    endif ()
+  endforeach ()
+  set(${output_var} ${intermediate} PARENT_SCOPE)
+endfunction()
+
 # Generates builtin libraries for all operating systems specified in ARGN. Each
 # OS library is constructed by lipo-ing together single-architecture libraries.
 macro(darwin_add_builtin_libraries)
@@ -213,25 +232,13 @@

       darwin_find_excluded_builtins_list(${os} ${arch} ${DARWIN_${os}_BUILTIN_MIN_VER})
-      # Filter out generic versions of routines that are re-implemented in
-      # architecture specific manner.  This prevents multiple definitions of the
-      # same symbols, making the symbol selection non-deterministic.
-      foreach (_file ${${arch}_SOURCES})
-        get_filename_component(_name_we ${_file} NAME_WE)
-        list(FIND ${arch}_${os}_EXCLUDED_BUILTINS ${_name_we} _found)
-        if(_found GREATER -1)
-          list(REMOVE_ITEM ${arch}_SOURCES ${_file})
-        elseif(${_file} MATCHES ${arch}/*)
-          get_filename_component(_name ${_file} NAME)
-          string(REPLACE ".S" ".c" _cname "${_name}")
-          list(REMOVE_ITEM ${arch}_SOURCES ${_cname})
-        endif ()
-      endforeach ()
+
+      darwin_filter_builtin_sources(filtered_sources ${arch}_${os}_EXCLUDED_BUILTINS ${${arch}_SOURCES})

       darwin_add_builtin_library(clang_rt builtins
                               OS ${os}
                               ARCH ${arch}
-                              SOURCES ${${arch}_SOURCES}
+                              SOURCES ${filtered_sources}
                               CFLAGS -arch ${arch}
                               PARENT_TARGET builtins)
     endforeach()


Cellular unittests update

Cellular unittests update

--- connectivity/netsocket/tests/UNITTESTS/netsocket/CellularNonIPSocket/unittest.cmake
+++ connectivity/netsocket/tests/UNITTESTS/netsocket/CellularNonIPSocket/unittest.cmake
@@ -24,6 +24,7 @@
 )

 set(unittest-test-flags
+  -DMBED_CONF_CELLULAR_PRESENT=1
   -DDEVICE_SERIAL=1
   -DDEVICE_INTERRUPTIN=1
   -DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200


fix typo

fix typo

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

--- deal.II/cmake/modules/FindSCALAPACK.cmake
+++ deal.II/cmake/modules/FindSCALAPACK.cmake
@@ -23,7 +23,7 @@
 #   SCALAPACK_LINKER_FLAGS
 #

-SET_IF_EMPTY(SCALAPCK_DIR "$ENV{SCALAPACK_DIR}")
+SET_IF_EMPTY(SCALAPACK_DIR "$ENV{SCALAPACK_DIR}")
 SET_IF_EMPTY(BLACS_DIR "$ENV{BLACS_DIR}")

 INCLUDE(FindPackageHandleStandardArgs)


removed auto-generated file

removed auto-generated file

--- frontends/CsoundAC/cmake_install.cmake
+++ frontends/CsoundAC/cmake_install.cmake
@@ -1,34 +0,0 @@
-# Install script for directory: /home/jpff/Sourceforge/csound/New/csound6/frontends/CsoundAC
-
-# Set the install prefix
-IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-  SET(CMAKE_INSTALL_PREFIX "/usr/local")
-ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-  IF(BUILD_TYPE)
-    STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
-           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
-  ELSE(BUILD_TYPE)
-    SET(CMAKE_INSTALL_CONFIG_NAME "Debug")
-  ENDIF(BUILD_TYPE)
-  MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-
-# Set the component getting installed.
-IF(NOT CMAKE_INSTALL_COMPONENT)
-  IF(COMPONENT)
-    MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
-    SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
-  ELSE(COMPONENT)
-    SET(CMAKE_INSTALL_COMPONENT)
-  ENDIF(COMPONENT)
-ENDIF(NOT CMAKE_INSTALL_COMPONENT)
-
-# Install shared libraries without execute permission?
-IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-  SET(CMAKE_INSTALL_SO_NO_EXE "0")
-ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
-


Add PYTHON_INCLUDE_DIR2 to DRCExternals_DEFAULT_ARGS

--- software/externals/cmake/dd-externals.cmake
+++ software/externals/cmake/dd-externals.cmake
@@ -31,6 +31,7 @@
   -DQT_QMAKE_EXECUTABLE:PATH=${QT_QMAKE_EXECUTABLE}
   -DPYTHON_EXECUTABLE:PATH=${PYTHON_EXECUTABLE}
   -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}
+  -DPYTHON_INCLUDE_DIR2:PATH=${PYTHON_INCLUDE_DIR}
   -DPYTHON_LIBRARY:PATH=${PYTHON_LIBRARY}
   -DEIGEN_INCLUDE_DIR:PATH=${EIGEN3_INCLUDE_DIR}
   -DEIGEN_INCLUDE_DIRS:PATH=${EIGEN3_INCLUDE_DIR}


Fix cmake to find the compiler-rt libs on darwin

Followup for r297553, which left darwin in a broken state
http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan_build/3812

rdar://problem/31011980

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@297703 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/HandleCompilerRT.cmake
+++ cmake/Modules/HandleCompilerRT.cmake
@@ -25,15 +25,27 @@
     message(FATAL_ERROR "LIBCXX_COMPILE_FLAGS must be defined when using this function")
   endif()
   set(dest "" PARENT_SCOPE)
-  set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBCXX_COMPILE_FLAGS}
-      "--rtlib=compiler-rt" "--print-libgcc-file-name")
-  execute_process(
-      COMMAND ${CLANG_COMMAND}
-      RESULT_VARIABLE HAD_ERROR
-      OUTPUT_VARIABLE LIBRARY_FILE
-  )
-  string(STRIP "${LIBRARY_FILE}" LIBRARY_FILE)
-  get_filename_component(LIBRARY_DIR "${LIBRARY_FILE}" DIRECTORY)
+  if (APPLE)
+    set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBCXX_COMPILE_FLAGS}
+        "-print-file-name=lib")
+    execute_process(
+        COMMAND ${CLANG_COMMAND}
+        RESULT_VARIABLE HAD_ERROR
+        OUTPUT_VARIABLE LIBRARY_DIR
+    )
+    string(STRIP "${LIBRARY_DIR}" LIBRARY_DIR)
+    set(LIBRARY_DIR "${LIBRARY_DIR}/darwin")
+  else()
+    set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBCXX_COMPILE_FLAGS}
+        "--rtlib=compiler-rt" "--print-libgcc-file-name")
+    execute_process(
+        COMMAND ${CLANG_COMMAND}
+        RESULT_VARIABLE HAD_ERROR
+        OUTPUT_VARIABLE LIBRARY_FILE
+    )
+    string(STRIP "${LIBRARY_FILE}" LIBRARY_FILE)
+    get_filename_component(LIBRARY_DIR "${LIBRARY_FILE}" DIRECTORY)
+  endif()
   if (NOT HAD_ERROR AND EXISTS "${LIBRARY_DIR}")
     message(STATUS "Found compiler-rt directory: ${LIBRARY_DIR}")
     set(${dest} "${LIBRARY_DIR}" PARENT_SCOPE)


[CMAKE] Avoid dependencies when building native bin during cross build

Summary:
The `NativeExecutable.cmake` module will run CMake from the top level
with all the default options, leading to some dependencies being
required while they is no use for it.
This will remove the need for most host side dependencies when running
the gitian builds with CMake.

Test Plan:
  ninja check
Cross build for any platform.

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D4425

--- cmake/modules/NativeExecutable.cmake
+++ cmake/modules/NativeExecutable.cmake
@@ -15,6 +15,12 @@
 			"${CMAKE_SOURCE_DIR}"
 			"-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}"
 			"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${NATIVE_BINARY_DIR}"
+			# Don't require native third party dependencies we don't need.
+			"-DBUILD_BITCOIN_WALLET=OFF"
+			"-DBUILD_BITCOIN_QT=OFF"
+			"-DBUILD_BITCOIN_ZMQ=OFF"
+			"-DENABLE_QRCODE=OFF"
+			"-DENABLE_UPNP=OFF"
 		WORKING_DIRECTORY ${NATIVE_BUILD_DIR}
 		VERBATIM USES_TERMINAL
 	)


Remove deprecated python option, added an info message

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -387,7 +387,7 @@

 #---Removed options------------------------------------------------------------
 foreach(opt afdsmgrd afs bonjour castor chirp geocad glite globus hdfs ios
-            krb5 ldap qt qtgsi rfio ruby sapdb srp table)
+            krb5 ldap qt qtgsi rfio ruby sapdb srp table python)
   if(${opt})
     message(FATAL_ERROR ">>> Option '${opt}' is no longer supported in ROOT ${ROOT_VERSION}.")
   endif()
@@ -402,8 +402,7 @@

 #---Replaced options--------------------------------------------------------------------------
 if(python)
-  message(DEPRECATION ">>> Please use the equivalent option 'pyroot' instead of 'python'; the latter will be removed in v6.22.")
-  set(pyroot ON CACHE BOOL "" FORCE)
+  message(STATUS ">>> INFO: 'python' option was removed. Instead, please check, that it was enabled a 'pyroot' option (by default it is ON).")
 endif()

 #---Avoid creating dependencies to 'non-standard' header files -------------------------------


FORTRAN ==> Fortran.  This bug fix should make no difference on Linux
where all three C, CXX, and Fortran variables are identical, but
it will make a (slight) difference on platforms where Fortran has
a different set of system locations than the C and C++ compilers.

svn path=/trunk/; revision=12865

--- cmake/modules/plplot_functions.cmake
+++ cmake/modules/plplot_functions.cmake
@@ -205,7 +205,7 @@
     set(directories_to_be_removed
       ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}
       ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}
-      ${CMAKE_FORTRAN_IMPLICIT_LINK_DIRECTORIES}
+      ${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES}
       )

     if(directories_to_be_removed)


cmake: Fix Zephyr SDK download URL

cmake: Fix Zephyr SDK download URL

This commit fixes the outdated Zephyr SDK download URL in the toolchain
verification script.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/modules/verify-toolchain.cmake
+++ cmake/modules/verify-toolchain.cmake
@@ -120,7 +120,7 @@

   message(FATAL_ERROR "${error_msg}
 The Zephyr SDK can be downloaded from:
-https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION}/zephyr-sdk-${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION}-setup.run
+https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION}
 ")

 endif()


Fixed regex-expression in download-boost used to remove all doc, test or example folders (issue with escape character in cmake)

--- src/cmake/boost-download.cmake
+++ src/cmake/boost-download.cmake
@@ -111,9 +111,10 @@
         LIST_DIRECTORIES true
         "*"
     )
+    # Filter away all folder-paths not ending in either "doc", "example" or "test"
     list(FILTER NON_SOURCE_DIRS
         INCLUDE
-        REGEX "^.*\/(doc|example|test)$"
+        REGEX "^.*(\\/|\\\\)(doc|example|test)$"
     )

     foreach(DIR ${NON_SOURCE_DIRS})


github ci aarch64 config build  cpp-httplib HTTPLIB_REQUIRE_OPENSSL OFF 1

--- toolchains/aarch64-linux-gnu.toolchain.cmake
+++ toolchains/aarch64-linux-gnu.toolchain.cmake
@@ -14,7 +14,8 @@
 # cache flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags")
-set(OPENSSL_ROOT_DIR  "${workspaceFolder}/openssl-1.1.1i/install")
-set(OPENSSL_INCLUDE_DIR "${workspaceFolder}/openssl-1.1.1i/install/include")
-set(OPENSSL_CRYPTO_LIBRARY "${workspaceFolder}/openssl-1.1.1i/install/lib")
+
+set(OPENSSL_ROOT_DIR  "../openssl-1.1.1i/install")
+set(OPENSSL_INCLUDE_DIR "../openssl-1.1.1i/install/include")
+set(OPENSSL_CRYPTO_LIBRARY "../openssl-1.1.1i/install/lib")
 set(HTTPLIB_REQUIRE_OPENSSL OFF)


Cleanup discovery module

Cleanup discovery module

--- cmake/Modules/CppUTestBuildTimeDiscoverTests.cmake
+++ cmake/Modules/CppUTestBuildTimeDiscoverTests.cmake
@@ -1,24 +1,17 @@
+set(_DISCOVER_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/../Scripts/CppUTestBuildTimeDiscoverTests.cmake")
+
 # Create target to discover tests
-function (cpputest_buildtime_discover_tests EXECUTABLE)
-  # The path to the discover script depends on execution mode:
-  # - internal (building CppUTest it self).
-  # - imported (installed, imported, and executed by a client of the CppUTest lib)
-  if (PROJECT_NAME STREQUAL "CppUTest") # internal - (path is relative to source dir)
-    SET(DISCOVER_SCRIPT ${PROJECT_SOURCE_DIR}/cmake/Scripts/CppUTestBuildTimeDiscoverTests.cmake)
-  else (PROJECT_NAME STREQUAL "CppUTest") # Installed (path is relative to install directory)
-    SET(DISCOVER_SCRIPT ${CppUTest_DIR}/Scripts/CppUTestBuildTimeDiscoverTests.cmake)
-  endif (PROJECT_NAME STREQUAL "CppUTest")
-
-  add_custom_command (TARGET ${EXECUTABLE}
-    POST_BUILD
+function (cpputest_buildtime_discover_tests tgt)
+  add_custom_command(
+    TARGET ${tgt} POST_BUILD
     COMMAND
       ${CMAKE_COMMAND}
       -D "TESTS_DETAILED:BOOL=${TESTS_DETAILED}"
-      -D "EXECUTABLE=$<TARGET_FILE:${EXECUTABLE}>"
-      -D "EMULATOR=$<TARGET_PROPERTY:${EXECUTABLE},CROSSCOMPILING_EMULATOR>"
-      -P "${DISCOVER_SCRIPT}"
+      -D "EXECUTABLE=$<TARGET_FILE:${tgt}>"
+      -D "EMULATOR=$<TARGET_PROPERTY:${tgt},CROSSCOMPILING_EMULATOR>"
+      -P "${_DISCOVER_SCRIPT}"
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    COMMENT "Discovering Tests in ${tgt}"
     VERBATIM
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    COMMENT "Discovering Tests in ${EXECUTABLE}"
-    VERBATIM)
+  )
 endfunction ()


check cmake version for TARGET_RUNETIME_DLLS generator

--- CMakeModules/AFconfigure_forge_dep.cmake
+++ CMakeModules/AFconfigure_forge_dep.cmake
@@ -51,13 +51,21 @@
     set(FETCHCONTENT_UPDATES_DISCONNECTED ${af_FETCHCONTENT_UPDATES_DISCONNECTED})
     install(FILES
         $<TARGET_FILE:forge>
-        $<TARGET_RUNTIME_DLLS:forge>
         $<$<PLATFORM_ID:Linux>:$<TARGET_SONAME_FILE:forge>>
         $<$<PLATFORM_ID:Darwin>:$<TARGET_SONAME_FILE:forge>>
         $<$<PLATFORM_ID:Linux>:$<TARGET_LINKER_FILE:forge>>
         $<$<PLATFORM_ID:Darwin>:$<TARGET_LINKER_FILE:forge>>
         DESTINATION "${AF_INSTALL_LIB_DIR}"
         COMPONENT common_backend_dependencies)
+
+    if(AF_INSTALL_STANDALONE)
+        cmake_minimum_required(VERSION 3.21)
+        install(FILES
+            $<TARGET_RUNTIME_DLLS:forge>
+            DESTINATION "${AF_INSTALL_LIB_DIR}"
+            COMPONENT common_backend_dependencies)
+    endif(AF_INSTALL_STANDALONE)
+
     set_property(TARGET forge APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
 else(AF_BUILD_FORGE)
     find_package(Forge


FindVOTCA_TOOLS.cmake: fix adding eigen3 includedir

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -43,7 +43,7 @@

 find_library(VOTCA_TOOLS_LIBRARY NAMES votca_tools HINTS ${PC_VOTCA_TOOLS_LIBRARY_DIRS} )

-set(VOTCA_TOOLS_INCLUDE_DIRS "${VOTCA_TOOLS_INCLUDE_DIR};${SQLITE3_INCLUDE_DIR};${EIGEN3_INCLUDE_DIRS};${MKL_INCLUDE_DIRS}" )
+set(VOTCA_TOOLS_INCLUDE_DIRS "${VOTCA_TOOLS_INCLUDE_DIR};${SQLITE3_INCLUDE_DIR};${EIGEN3_INCLUDE_DIR};${MKL_INCLUDE_DIRS}" )
 set(VOTCA_TOOLS_LIBRARIES "${VOTCA_TOOLS_LIBRARY};${MKL_LIBRARIES}" )

 include(FindPackageHandleStandardArgs)


[Build] add variables in cache (untested)

--- Build/CTestDriver.cmake
+++ Build/CTestDriver.cmake
@@ -95,6 +95,17 @@
 endif()
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} ${CTEST_SOURCE_DIRECTORY}")

+
+set( dashboard_cache "
+     BUILD_TESTING:BOOL=ON
+     BUILD_EXAMPLES:BOOL=ON
+     BUILD_SHARED_LIBS:BOOL=ON
+     MEMORYCHECK_COMMAND:FILEPATH=${CTEST_MEMORYCHECK_COMMAND}
+     MEMORYCHECK_COMMAND_OPTIONS:STRING=${CTEST_MEMORYCHECK_COMMAND_OPTIONS}
+     MEMORYCHECK_SUPPRESSIONS_FILE:FILEPATH=${CTEST_MEMORYCHECK_SUPPRESSIONS_FILE}
+     "
+  )
+
 ctest_start("${MODE}")
 if(FROM_REPO)
   ctest_update()


document that one can also use "generic" for TARGET_ARCHITECTURE

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -11,7 +11,7 @@
 endmacro(_my_find)

 macro(OptimizeForArchitecture)
-   set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used.\nSetting the value to \"auto\" will try to optimize for the architecture where cmake is called.\nOther supported values are: \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\".")
+   set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used.\nSetting the value to \"auto\" will try to optimize for the architecture where cmake is called.\nOther supported values are: \"generic\", \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\".")
    set(_force)
    if(NOT _last_target_arch STREQUAL "${TARGET_ARCHITECTURE}")
       message(STATUS "${TARGET_ARCHITECTURE} changed")


ENH: made gdal config tests only available for unix systems

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -9,97 +9,100 @@
  message(FATAL_ERROR "Cannot find GDAL. Set GDAL_INCLUDE_DIR and GDAL_LIBRARY")
 endif()

-message(STATUS "Check if Gdal qualifies for Orfeo ToolBox")
+if(UNIX)
+
+	message(STATUS "Check if Gdal qualifies for Orfeo ToolBox")

-# Prepare bash script
-configure_file(${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest.sh.in ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh @ONLY)
-execute_process(COMMAND chmod u+x ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh)
-execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh)
+	# Prepare bash script
+	configure_file(${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest.sh.in ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh @ONLY)
+	execute_process(COMMAND chmod u+x ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh)
+	execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gdalTest.sh)

-#------------------- TESTS ---------------------
-# Version of GDAL
-try_run(RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest1.cxx ARGS ${TEMP}/testgdal1.txt)
+	#------------------- TESTS ---------------------
+	# Version of GDAL
+	try_run(RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest1.cxx ARGS ${TEMP}/testgdal1.txt)

-# test libtiff/libgeotiff and test if symbols are renamed (only for internal libtiff/libgeotiff)
-try_run(RUN_RESULT_VAR2 COMPILE_RESULT_VAR2 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest2.cxx ARGS ${TEMP}/testgdal2.txt)
+	# test libtiff/libgeotiff and test if symbols are renamed (only for internal libtiff/libgeotiff)
+	try_run(RUN_RESULT_VAR2 COMPILE_RESULT_VAR2 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest2.cxx ARGS ${TEMP}/testgdal2.txt)

-# bigtiff
-try_run(RUN_RESULT_VAR3 COMPILE_RESULT_VAR3 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest3.cxx ARGS ${TEMP}/testgdal3.txt)
+	# bigtiff
+	try_run(RUN_RESULT_VAR3 COMPILE_RESULT_VAR3 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest3.cxx ARGS ${TEMP}/testgdal3.txt)

-# formats
-try_run(GDAL_HAS_HDF COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt hdf)
-try_run(GDAL_HAS_J2K_JG2000 COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt jpeg2000)
-try_run(GDAL_HAS_J2K_OPJG COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt openjpeg)
-try_run(GDAL_HAS_J2K_KAK  COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt jp2kak)
-try_run(GDAL_HAS_J2K_ECW COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt ecw)
+	# formats
+	try_run(GDAL_HAS_HDF COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt hdf)
+	try_run(GDAL_HAS_J2K_JG2000 COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt jpeg2000)
+	try_run(GDAL_HAS_J2K_OPJG COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt openjpeg)
+	try_run(GDAL_HAS_J2K_KAK  COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt jp2kak)
+	try_run(GDAL_HAS_J2K_ECW COMPILE_RESULT_VAR4 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalTest4.cxx ARGS ${TEMP}/testgdal4.txt ecw)

-# Has OGR
-try_compile(GDAL_HAS_OGR ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOGRTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}")
+	# Has OGR
+	try_compile(GDAL_HAS_OGR ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOGRTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}")

-# Can open tiff file
-try_run(GDAL_CAN_OPEN_TIFF COMPILE_RESULT_OPEN ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOpenTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/otb_logo.tif)
+	# Can open tiff file
+	try_run(GDAL_CAN_OPEN_TIFF COMPILE_RESULT_OPEN ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOpenTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/otb_logo.tif)

-# Can open jpeg file
-try_run(GDAL_CAN_OPEN_JPEG COMPILE_RESULT_OPEN ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOpenTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/otb_logo.jpeg)
+	# Can open jpeg file
+	try_run(GDAL_CAN_OPEN_JPEG COMPILE_RESULT_OPEN ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOpenTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/otb_logo.jpeg)

-# Can open jpeg2000 file
-try_run(GDAL_CAN_OPEN_JPEG2000 COMPILE_RESULT_OPEN ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOpenTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/QB_multicomp_small.jpx)
+	# Can open jpeg2000 file
+	try_run(GDAL_CAN_OPEN_JPEG2000 COMPILE_RESULT_OPEN ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOpenTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/QB_multicomp_small.jpx)

-# Can open geotiff file
-#try_run(GDAL_CAN_OPEN_GEOTIFF COMPILE_RESULT_OPEN ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOpenTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/GEOTIFF)
+	# Can open geotiff file
+	#try_run(GDAL_CAN_OPEN_GEOTIFF COMPILE_RESULT_OPEN ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/gdalOpenTest.cxx CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}" ARGS ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/GEOTIFF)

-#------------------- TESTS (END)---------------------
+	#------------------- TESTS (END)---------------------

-# Compilations checking
-if (NOT COMPILE_RESULT_VAR1)
-	message(WARNING "Modules/ThirdParty/GDAL/gdalTest1.cxx did not compile.")
-endif()
-if (NOT COMPILE_RESULT_VAR2)
-	message(WARNING "Modules/ThirdParty/GDAL/gdalTest2.cxx did not compile.")
-endif()
-if (NOT COMPILE_RESULT_VAR3)
-	message(WARNING "Modules/ThirdParty/GDAL/gdalTest3.cxx did not compile.")
-endif()
-if (NOT COMPILE_RESULT_VAR4)
-	message(WARNING "Modules/ThirdParty/GDAL/gdalTest4.cxx did not compile.")
-endif()
-if (NOT COMPILE_RESULT_OPEN)
-	message(WARNING "Modules/ThirdParty/GDAL/gdalOpenTest.cxx did not compile.")
-endif()
+	# Compilations checking
+	if (NOT COMPILE_RESULT_VAR1)
+		message(WARNING "Modules/ThirdParty/GDAL/gdalTest1.cxx did not compile.")
+	endif()
+	if (NOT COMPILE_RESULT_VAR2)
+		message(WARNING "Modules/ThirdParty/GDAL/gdalTest2.cxx did not compile.")
+	endif()
+	if (NOT COMPILE_RESULT_VAR3)
+		message(WARNING "Modules/ThirdParty/GDAL/gdalTest3.cxx did not compile.")
+	endif()
+	if (NOT COMPILE_RESULT_VAR4)
+		message(WARNING "Modules/ThirdParty/GDAL/gdalTest4.cxx did not compile.")
+	endif()
+	if (NOT COMPILE_RESULT_OPEN)
+		message(WARNING "Modules/ThirdParty/GDAL/gdalOpenTest.cxx did not compile.")
+	endif()

-# Warning messages
-if (${RUN_RESULT_VAR1} EQUAL 1)
-	message(WARNING "Version of GDAL must be >= 1.10")
-endif()
-if (${RUN_RESULT_VAR2} EQUAL 1)
-	message(WARNING "Internal versions of libtiff/libgeotiff detected without symbol renaming (when configuring GDAL, if options --with-libtiff or --with-geotiff are set to 'internal', then options --with-rename-internal-libtiff-symbols and --with-rename-internal-libgeotiff-symbols should be set to 'yes').")
-endif()
-if (${RUN_RESULT_VAR3} EQUAL 1)
-	message(WARNING "No BIGTIFF capatilities.")
-endif()
-if (NOT GDAL_HAS_HDF)
-	message(WARNING "No HDF capatilities.")
-endif()
-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).")
-endif()
-if (NOT GDAL_HAS_OGR)
-	message(WARNING "GDAL doesn't expose OGR library symbols.")
-endif()
-if (NOT GDAL_CAN_OPEN_TIFF)
-	message(WARNING "GDAL can't open tiff files.")
-endif()
-if (NOT GDAL_CAN_OPEN_JPEG)
-	message(WARNING "GDAL can't open jpeg files.")
-endif()
-if (NOT GDAL_CAN_OPEN_JPEG2000)
-	message(WARNING "GDAL can't open jpeg files.")
-endif()
-#if (NOT GDAL_CAN_OPEN_GEOTIFF)
-#	message(WARNING "GDAL can't open geotiff files.")
-#endif()
+	# Warning messages
+	if (${RUN_RESULT_VAR1} EQUAL 1)
+		message(WARNING "Version of GDAL must be >= 1.10")
+	endif()
+	if (${RUN_RESULT_VAR2} EQUAL 1)
+		message(WARNING "Internal versions of libtiff/libgeotiff detected without symbol renaming (when configuring GDAL, if options --with-libtiff or --with-geotiff are set to 'internal', then options --with-rename-internal-libtiff-symbols and --with-rename-internal-libgeotiff-symbols should be set to 'yes').")
+	endif()
+	if (${RUN_RESULT_VAR3} EQUAL 1)
+		message(WARNING "No BIGTIFF capatilities.")
+	endif()
+	if (NOT GDAL_HAS_HDF)
+		message(WARNING "No HDF capatilities.")
+	endif()
+	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).")
+	endif()
+	if (NOT GDAL_HAS_OGR)
+		message(WARNING "GDAL doesn't expose OGR library symbols.")
+	endif()
+	if (NOT GDAL_CAN_OPEN_TIFF)
+		message(WARNING "GDAL can't open tiff files.")
+	endif()
+	if (NOT GDAL_CAN_OPEN_JPEG)
+		message(WARNING "GDAL can't open jpeg files.")
+	endif()
+	if (NOT GDAL_CAN_OPEN_JPEG2000)
+		message(WARNING "GDAL can't open jpeg files.")
+	endif()
+	#if (NOT GDAL_CAN_OPEN_GEOTIFF)
+	#	message(WARNING "GDAL can't open geotiff files.")
+	#endif()

+endif() #UNIX


FindOIS.cmake fixes:
- Respect OGRE_DEPENDENCIES_DIR (useful if used outside of OGRE)
- On Win32 define names of the OIS DLLs so they can be copied from wherever they are found

--HG--
branch : v1-7

--- CMake/Packages/FindOIS.cmake
+++ CMake/Packages/FindOIS.cmake
@@ -13,6 +13,7 @@
 #  OIS_FOUND - system has OIS
 #  OIS_INCLUDE_DIRS - the OIS include directories
 #  OIS_LIBRARIES - link these to use OIS
+#  OIS_BINARY_REL / OIS_BINARY_DBG - DLL names (windows only)

 include(FindPkgMacros)
 findpkg_begin(OIS)
@@ -22,9 +23,11 @@
 getenv_path(OGRE_SDK)
 getenv_path(OGRE_HOME)
 getenv_path(OGRE_SOURCE)
+getenv_path(OGRE_DEPENDENCIES_DIR)

 # construct search paths
 set(OIS_PREFIX_PATH ${OIS_HOME} ${ENV_OIS_HOME}
+  ${OGRE_DEPENDENCIES_DIR} ${ENV_OGRE_DEPENDENCIES_DIR}
   ${OGRE_SOURCE}/iPhoneDependencies ${ENV_OGRE_SOURCE}/iPhoneDependencies
   ${OGRE_SOURCE}/Dependencies ${ENV_OGRE_SOURCE}/Dependencies
   ${OGRE_SDK} ${ENV_OGRE_SDK}
@@ -61,6 +64,19 @@
 find_library(OIS_LIBRARY_DBG NAMES ${OIS_LIBRARY_NAMES_DBG} HINTS ${OIS_LIB_SEARCH_PATH} ${OIS_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
 make_library_set(OIS_LIBRARY)

+if (WIN32)
+	set(OIS_BIN_SEARCH_PATH ${OIS_HOME}/dll ${ENV_OIS_HOME}/dll
+		${OGRE_DEPENDENCIES_DIR}/bin ${ENV_OGRE_DEPENDENCIES_DIR}/bin
+		${OGRE_SOURCE}/Dependencies/bin ${ENV_OGRE_SOURCE}/Dependencies/bin
+		${OGRE_SDK}/bin ${ENV_OGRE_SDK}/bin
+		${OGRE_HOME}/bin ${ENV_OGRE_HOME}/bin)
+	find_file(OIS_BINARY_REL NAMES "OIS.dll" HINTS ${OIS_BIN_SEARCH_PATH}
+	  PATH_SUFFIXES "" release relwithdebinfo minsizerel)
+	find_file(OIS_BINARY_DBG NAMES "OIS_d.dll" HINTS ${OIS_BIN_SEARCH_PATH}
+	  PATH_SUFFIXES "" debug )
+endif()
+mark_as_advanced(OIS_BINARY_REL OIS_BINARY_DBG)
+

 findpkg_finish(OIS)


Fix IGNORE_ITEM parameter name

Fix IGNORE_ITEM parameter name

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -195,7 +195,7 @@
     include(BundleUtilities)
     set(BU_CHMOD_BUNDLE_ITEMS ON)

-    fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${_target_location}\" \"\${PLUGINS}\" \"\${DIRS}\" IGNORE_ITEMS Python)
+    fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${_target_location}\" \"\${PLUGINS}\" \"\${DIRS}\" IGNORE_ITEM Python)

     if(APPLE)
       include(FixMacOSInstaller)


Quote Boost paths

Quote Boost paths

--- CMakeModules/FindBoost.cmake
+++ CMakeModules/FindBoost.cmake
@@ -448,8 +448,8 @@

   IF( BOOST_ROOT )
     SET(_boost_INCLUDE_SEARCH_DIRS
-      ${BOOST_ROOT}/include
-      ${BOOST_ROOT}
+      "${BOOST_ROOT}/include"
+      "${BOOST_ROOT}"
       ${_boost_INCLUDE_SEARCH_DIRS})
   ENDIF( BOOST_ROOT )

@@ -675,8 +675,8 @@
   ENDIF( WIN32 )
   IF( BOOST_ROOT )
     SET(_boost_LIBRARIES_SEARCH_DIRS
-      ${BOOST_ROOT}/lib
-      ${BOOST_ROOT}/stage/lib
+      "${BOOST_ROOT}/lib"
+      "${BOOST_ROOT}/stage/lib"
       ${_boost_LIBRARIES_SEARCH_DIRS})
   ENDIF( BOOST_ROOT )