Bump & fix GPU-SD

Bump & fix GPU-SD

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[ ] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- GPUSD.cmake
+++ GPUSD.cmake
@@ -1,6 +1,6 @@

-#list(APPEND CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/gpu-sd/CMake)
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/gpu-sd/CMake)
 find_package(GPUSD 1.0.1)

 if(EQUALIZER_RELEASE OR (GPUSD_FOUND AND NOT GPUSD_LOCAL))


remove durability lib

remove durability lib

--- opensplice_cmake_module/cmake/Modules/FindOpenSplice.cmake
+++ opensplice_cmake_module/cmake/Modules/FindOpenSplice.cmake
@@ -76,7 +76,6 @@
     "ddsserialization"
     "ddsuser"
     "ddsutil"
-    "durability"
     "spliced"
     # we can't link against both sacpp and isocpp at the same time
     #"dcpsisocpp"


GIT_TAG for deps-macos.cmake is changed to "v3.1.3-patched"

--- deps/deps-macos.cmake
+++ deps/deps-macos.cmake
@@ -89,7 +89,7 @@
 ExternalProject_Add(dep_wxwidgets
     EXCLUDE_FROM_ALL 1
     GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
-    GIT_TAG v3.1.1-patched
+    GIT_TAG v3.1.3-patched
     BUILD_IN_SOURCE 1
 #    PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/wxwidgets-pngprefix.h" src/png/pngprefix.h
     CONFIGURE_COMMAND env "CXXFLAGS=${DEP_WERRORS_SDK}" "CFLAGS=${DEP_WERRORS_SDK}" ./configure


revert nasty changes made by checker.py

revert nasty changes made by checker.py

This commit bypasses the following hook: old_cmake_loop_construct
(because we kept CMakeParseArguments.cmake "as is", it's upstream code)

--- cmake/qibuild/extern/CMakeParseArguments.cmake
+++ cmake/qibuild/extern/CMakeParseArguments.cmake
@@ -84,11 +84,11 @@
   # first set all result variables to empty/FALSE
   foreach(arg_name ${_singleArgNames} ${_multiArgNames})
     set(${prefix}_${arg_name})
-  endforeach()
+  endforeach(arg_name)

   foreach(option ${_optionNames})
     set(${prefix}_${option} FALSE)
-  endforeach()
+  endforeach(option)

   set(${prefix}_UNPARSED_ARGUMENTS)

@@ -106,33 +106,33 @@
         if("${insideValues}" STREQUAL "SINGLE")
           set(${prefix}_${currentArgName} ${currentArg})
           set(insideValues FALSE)
-        elseif()
+        elseif("${insideValues}" STREQUAL "MULTI")
           list(APPEND ${prefix}_${currentArgName} ${currentArg})
         endif()
-      else()
+      else(insideValues)
         list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
-      endif()
+      endif(insideValues)
     else()
       if(NOT ${optionIndex} EQUAL -1)
         set(${prefix}_${currentArg} TRUE)
         set(insideValues FALSE)
-      elseif()
+      elseif(NOT ${singleArgIndex} EQUAL -1)
         set(currentArgName ${currentArg})
         set(${prefix}_${currentArgName})
         set(insideValues "SINGLE")
-      elseif()
+      elseif(NOT ${multiArgIndex} EQUAL -1)
         set(currentArgName ${currentArg})
         set(${prefix}_${currentArgName})
         set(insideValues "MULTI")
       endif()
     endif()

-  endforeach()
+  endforeach(currentArg)

   # propagate the result variables to the caller:
   foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
     set(${prefix}_${arg_name}  ${${prefix}_${arg_name}} PARENT_SCOPE)
-  endforeach()
+  endforeach(arg_name)
   set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)

-endfunction()
+endfunction(CMAKE_PARSE_ARGUMENTS _options _singleArgs _multiArgs)


BUG: refs #0070. Fix dashboard configure errors (git not found)

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -14,10 +14,11 @@
     -DCTK_LIB_DataManagement/MIDASClient/Widgets:BOOL=ON
     -DCTK_LIB_PluginFramework:BOOL=OFF
     -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
+    -DGITCOMMAND:FILEPATH=${GIT_EXECUTABLE}
   DEPENDS
   )

-ExternalProject_Add(MIDASClient-Configure
+ExternalProject_Add(MIDASClient-configure
   DOWNLOAD_COMMAND ""
   CMAKE_GENERATOR "${CMAKE_GENERATOR}"
   CMAKE_ARGS
@@ -35,14 +36,14 @@
     CTK
   )

-ExternalProject_Add(MIDASClient-Build
+ExternalProject_Add(MIDASClient-build
     DOWNLOAD_COMMAND ""
     CMAKE_GENERATOR "${CMAKE_GENERATOR}"
     SOURCE_DIR ${MIDASClient_SOURCE_DIR}
     BINARY_DIR MIDASClient-build
     INSTALL_COMMAND ""
     DEPENDS
-      "MIDASClient-Configure"
+      "MIDASClient-configure"
     )

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


ENH: Remove BRAINS References.

ENH: Remove BRAINS References.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -203,23 +203,6 @@
   ${LOCAL_PROJECT_NAME}_CLI_INSTALL_ARCHIVE_DESTINATION:PATH
   ${LOCAL_PROJECT_NAME}_CLI_INSTALL_RUNTIME_DESTINATION:PATH

-  USE_GTRACT:BOOL
-  USE_BRAINSFit:BOOL
-  USE_BRAINSABC:BOOL
-  USE_BRAINSCut:BOOL
-  USE_BRAINSLandmarkInitializer:BOOL
-  USE_BRAINSMush:BOOL
-  USE_BRAINSROIAuto:BOOL
-  USE_BRAINSResample:BOOL
-  USE_BRAINSConstellationDetector:BOOL
-  USE_BRAINSDemonWarp:BOOL
-  USE_BRAINSMultiModeSegment:BOOL
-  USE_BRAINSInitializedControlPoints:BOOL
-  USE_BRAINSTransformConvert:BOOL
-  USE_ImageCalculator:BOOL
-  USE_BRAINSSnapShotWriter:BOOL
-  USE_DebugImageViewer:BOOL
-  BRAINS_DEBUG_IMAGE_WRITE:BOOL
   INSTALL_RUNTIME_DESTINATION:STRING
   INSTALL_LIBRARY_DESTINATION:STRING
   INSTALL_ARCHIVE_DESTINATION:STRING


[FIX] FindMatlab.cmake doesn't find Matlab 32-bit under Windows 64-bit.

git-svn-id: ed06c97986a68fa016311908f99ed1538fbb9b5d@1626 93be6e1e-6fcc-11de-baec-69240fdc299a

--- CMake/FindMatlab.cmake
+++ CMake/FindMatlab.cmake
@@ -31,6 +31,7 @@
 ENDIF(MATLAB_ROOT AND MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)

 IF(WIN32)
+  # Default paths
   SET(MATLAB_PATHS
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\8.0;MATLABROOT]"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.15;MATLABROOT]"
@@ -50,6 +51,28 @@
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.1;MATLABROOT]"
   )
   FIND_PATH(MATLAB_ROOT "license.txt" ${MATLAB_PATHS} NO_DEFAULT_PATH)
+  # Paths for Matlab 32-bit under Windows 64-bit
+  IF(NOT MATLAB_ROOT)
+    SET(MATLAB_PATHS
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\8.0;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.15;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.14;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.13;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.12;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.11;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.10;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.9;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.8;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.7;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.6;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.5;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.4;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.3;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.2;MATLABROOT]"
+      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.1;MATLABROOT]"
+    )
+    FIND_PATH(MATLAB_ROOT "license.txt" ${MATLAB_PATHS} NO_DEFAULT_PATH)
+  ENDIF(NOT MATLAB_ROOT)
   IF(NOT MATLAB_ROOT)
     SET(MATLAB_PATHS
       "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MathWorks\\MATLAB\\7.0;MATLABROOT]"


[FIX] Trying to wrap BTK for Matlab under Mac when Matlab is not installed displays a wrong extra message and forces the code to be compiled in 32-bit (i386 architectures).

--- CMake/FindMatlab.cmake
+++ CMake/FindMatlab.cmake
@@ -141,7 +141,7 @@
           SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/maci64")
           SET(MATLAB_MEXFILE_EXT mexmaci64)
           SET(FORCE_COMPILE_32BIT_MODE 0)
-        ELSE(EXISTS "${MATLAB_ROOT}/bin/maci64/")
+        ELSEIF(EXISTS "${MATLAB_ROOT}/bin/maci/")
           MESSAGE("You use a Matlab 32-bit version on a 64-bit OS. BTK will be compiled in 32-bit to be useable with your Matlab version.")
           SET(FORCE_COMPILE_32BIT_MODE 1)
         ENDIF(EXISTS "${MATLAB_ROOT}/bin/maci64/")


BUG: Bump ITKv3 version.

BUG: Bump ITKv3 version.

Fix for GCC 4.7 with -O3.  In sync with Slicer.

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -132,8 +132,8 @@
     set( proj Insight )
     ExternalProject_Add( ${proj}
       GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/Kitware/ITK.git"
-      # release-3.20 branch on 2012-11-20.
-      GIT_TAG "b946b56436cce517d03eeb1684fb9e37c3f842a7"
+      # release-3.20 branch on 2012-11-27.
+      GIT_TAG "787200e5250da02069964063548a39d5e46662e2"
       SOURCE_DIR "${CMAKE_BINARY_DIR}/Insight"
       BINARY_DIR Insight-Build
       CMAKE_GENERATOR ${gen}


BUG: Mark module as EXCLUDE_FROM_DEFAULT.

--- itk-module.cmake
+++ itk-module.cmake
@@ -8,6 +8,7 @@
     SplitComponents
   TEST_DEPENDS
     ITKTestKernel
+  EXCLUDE_FROM_DEFAULT
   DESCRIPTION
     "${DOCUMENTATION}"
 )


stop if feature does not work

stop if feature does not work

--- cmake/CheckCXX11Features.cmake
+++ cmake/CheckCXX11Features.cmake
@@ -126,7 +126,7 @@
         if (${RESULT_VAR})
             message(STATUS "Checking C++11 support for ${_LOG_NAME}: works")
         else (${RESULT_VAR})
-            message(STATUS "Checking C++11 support for ${_LOG_NAME}: not supported")
+            message(FATAL_ERROR "Checking C++11 support for ${_LOG_NAME}: not supported")
         endif (${RESULT_VAR})
         set(${RESULT_VAR} ${${RESULT_VAR}} CACHE INTERNAL "C++11 support for ${_LOG_NAME}")
     endif (NOT DEFINED ${RESULT_VAR})


Fix vecLib search order for clients with both the old vecLib framework and the new Accelerate framework

--- cmake/Modules/FindvecLib.cmake
+++ cmake/Modules/FindvecLib.cmake
@@ -14,9 +14,10 @@

 find_path(vecLib_INCLUDE_DIR vecLib.h
           DOC "vecLib include directory"
-          PATHS /System/Library/${__veclib_include_suffix}
-                /System/Library/Frameworks/Accelerate.framework/Versions/Current/${__veclib_include_suffix}
-                /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/)
+          PATHS /System/Library/Frameworks/Accelerate.framework/Versions/Current/${__veclib_include_suffix}
+                /System/Library/${__veclib_include_suffix}
+                /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
+          NO_DEFAULT_PATH)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(vecLib DEFAULT_MSG vecLib_INCLUDE_DIR)


Missing space

Missing space

--- cmake/Modules/PluginTest.cmake
+++ cmake/Modules/PluginTest.cmake
@@ -1,10 +1,10 @@
 # PluginTest - add tests for SA-MP plugins.
-#
+#
 # This module reuires the samp-server-cli script to be present in PATH in
 # order to be able to run the tests. The script can be downloaded here:
-#
+#
 #   https://github.com/Zeex/samp-server-cli
-#
+#
 # Additionally the SAMP_SERVER_ROOT environment variable must be defined and
 # must point to the SA-MP server's root directory.


Fix Abseil build command (#1350)

Fix Abseil build command (#1350)

@pifon2a I've noticed the `BUILD_COMMAND` is broken. You're setting `ABSL_BUILD_COMMAND`, but using `ABSEIL_BUILD_COMMAND` (effectively empty). Somehow this doesn't confuse newer CMakes, but the one you install on Trusty gets confused and interprets this as a no-op build step. This causes the indigo pipeline in cartographer_ros to fail.

Use the cross-platform build command instead:
https://cmake.org/cmake/help/latest/module/ExternalProject.html#obtaining-project-properties (just above the linked paragraph)

--- cmake/modules/FindAbseil.cmake
+++ cmake/modules/FindAbseil.cmake
@@ -57,19 +57,12 @@
     "${ABSEIL_PROJECT_BUILD_DIR}/absl/utility/${prefix}absl_utility${suffix}"
     )

-   if(CMAKE_GENERATOR MATCHES "Ninja")
-     set (ABSL_BUILD_COMMAND "ninja")
-   else()
-     set (ABSL_BUILD_COMMAND "make")
-   endif()
-
   ExternalProject_Add(${ABSEIL_PROJECT_NAME}
     PREFIX ${ABSEIL_PROJECT_NAME}
     GIT_REPOSITORY   https://github.com/abseil/abseil-cpp.git
     GIT_TAG          44aa275286baf97fc13529aca547a88b180beb08
     INSTALL_COMMAND  ""
-    BUILD_ALWAYS TRUE
-    BUILD_COMMAND ${ABSEIL_BUILD_COMMAND}
+    BUILD_COMMAND    ${CMAKE_COMMAND} --build "${ABSEIL_PROJECT_BUILD_DIR}"
     CMAKE_CACHE_ARGS "-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON;-DBUILD_TESTING:BOOL=OFF;-DCMAKE_BUILD_TYPE:STRING=Release"
     BUILD_BYPRODUCTS "${ABSEIL_LIBRARY_PATH};${ABSEIL_DEPENDENT_LIBRARIES}"
   )


cmake/modules/FindPYTHON.cmake: Print site-package path.

--- cmake/modules/FindPYTHON.cmake
+++ cmake/modules/FindPYTHON.cmake
@@ -65,6 +65,7 @@
       MESSAGE(STATUS "Found Python")
       MESSAGE(STATUS "  > includes:          ${PYTHON_INCLUDE_DIR}")
       MESSAGE(STATUS "  > library path:      ${PYTHON_LIBRARY_DIR}")
+      MESSAGE(STATUS "  > site-packages:     ${PYTHON_SITE_PACKAGES}")
     ENDIF()
 ELSE()
     IF(Python_FIND_REQUIRED)


StaticCompressed plugin: use FATAL_ERROR in FindZopfli.cmake

--- cmake/modules/FindZopfli.cmake
+++ cmake/modules/FindZopfli.cmake
@@ -13,11 +13,11 @@
 SET(ZOPFLI_LIBRARIES ${ZOPFLI_LIBRARY})

 IF(NOT ZOPFLI_INCLUDE_DIRS)
-  MESSAGE(FATAL "Zopfli include dirs cannot be found")
+  MESSAGE(FATAL_ERROR "Zopfli include dirs cannot be found")
 ENDIF(NOT ZOPFLI_INCLUDE_DIRS)

 IF(NOT ZOPFLI_LIBRARIES)
-  MESSAGE(FATAL "Zopfli library cannot be found")
+  MESSAGE(FATAL_ERROR "Zopfli library cannot be found")
 ENDIF(NOT ZOPFLI_LIBRARIES)

 #Functions


[lldb][CMake] Remove hard-coded settings, which are set up by caches now

It has been there only for bridging the transition period until we have caches available.

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -1,33 +1,5 @@
 include(CheckCXXSymbolExists)
 include(CheckTypeSize)
-
-# BEGIN Swift Mods
-# We want this in a cmake cache
-list(APPEND swift_lldb_framework_tools
-  darwin-debug
-  lldb-argdumper
-  lldb-server
-  repl_swift
-)
-
-set(LLVM_EXTERNALIZE_DEBUGINFO OFF CACHE BOOL "" FORCE)
-set(LLVM_TARGETS_TO_BUILD      X86;ARM;AArch64 CACHE STRING "" FORCE)
-
-set(LLDB_VERSION_MAJOR   992 CACHE STRING "" FORCE)
-set(LLDB_VERSION_MINOR   8   CACHE STRING "" FORCE)
-set(LLDB_VERSION_PATCH   1   CACHE STRING "" FORCE)
-set(LLDB_VERSION_SUFFIX  svn CACHE STRING "" FORCE)
-
-if(APPLE)
-  set(LLDB_USE_SYSTEM_DEBUGSERVER ON CACHE BOOL "")
-  set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")
-  set(LLDB_FRAMEWORK_TOOLS ${swift_lldb_framework_tools} CACHE STRING "")
-endif()
-
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-  set(LLDB_ALLOW_STATIC_BINDINGS ON CACHE BOOL "" FORCE)
-endif()
-# END Swift Mods

 set(LLDB_PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
 set(LLDB_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/source")


Attempt to remove warnings in LLVM for icc

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -127,8 +127,8 @@
   endif()

   if(ICC_MAJOR EQUAL 14)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873")
     set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
   endif()


Qt: report broken package for armv7s

Qt: report broken package for armv7s

[skip ci]

--- cmake/projects/Qt/hunter.cmake
+++ cmake/projects/Qt/hunter.cmake
@@ -11,6 +11,7 @@
 include(hunter_cacheable)
 include(hunter_cmake_args)
 include(hunter_configuration_types)
+include(hunter_report_broken_package)

 # Use *.7z version.
 # Qt 5.5 overview:
@@ -85,4 +86,14 @@
   hunter_cmake_args(Qt CMAKE_ARGS BUILD_SHARED_LIBS=ON)
 endif()

+if(IOS)
+  list(FIND IPHONEOS_ARCHS "armv7s" _armv7s_index)
+  if(NOT _armv7s_index EQUAL -1)
+    hunter_report_broken_package(
+        "Some parts of Qt can't be built for armv7s."
+        "For example Qt Multimedia: https://bugreports.qt.io/browse/QTBUG-48805"
+    )
+  endif()
+endif()
+
 include("${CMAKE_CURRENT_LIST_DIR}/qtbase/hunter.cmake")


msvc_runtime.cmake: Do nothing when not running on windows.

Change-Id: I3b6b1068980ef6c0969f04cfed04fe667800386c

--- build/msvc_runtime.cmake
+++ build/msvc_runtime.cmake
@@ -7,16 +7,17 @@
 ##  be found in the AUTHORS file in the root of the source tree.
 cmake_minimum_required(VERSION 2.8)

-# CMake defaults to producing code linked to the DLL MSVC runtime. In webmlive,
-# static is typically desired. Force static code generation unless the user
-# running CMake set MSVC_RUNTIME to dll.
-if(NOT "${MSVC_RUNTIME}" STREQUAL "dll")
-  foreach(flag_var
-          CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
-          CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
-    if(${flag_var} MATCHES "/MD")
-      string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
-    endif(${flag_var} MATCHES "/MD")
-  endforeach(flag_var)
-endif(NOT "${MSVC_RUNTIME}" STREQUAL "dll")
-
+if(WIN32)
+  # CMake defaults to producing code linked to the DLL MSVC runtime. In webmlive
+  # static is typically desired. Force static code generation unless the user
+  # running CMake set MSVC_RUNTIME to dll.
+  if(NOT "${MSVC_RUNTIME}" STREQUAL "dll")
+    foreach(flag_var
+            CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+            CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+      if(${flag_var} MATCHES "/MD")
+        string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+      endif(${flag_var} MATCHES "/MD")
+    endforeach(flag_var)
+  endif(NOT "${MSVC_RUNTIME}" STREQUAL "dll")
+endif(WIN32)


fixing globbing exclude to detect config.cmake files but avoid cpackconfig.cmake files on linux

--- WkDepends.cmake
+++ WkDepends.cmake
@@ -52,7 +52,10 @@
 # WkDepends( dependency_name [QUIET / REQUIRED] )

 macro (WkDepends package_name)
-
+
+	message (STATUS ">>>WkDepends called with ${package_name}")
+
+
 	#
 	# First check if the package is a subdirectory
 	#
@@ -66,8 +69,9 @@

 		ELSE()
 			#binary dependency ( by wkcmake )
-			#TODO : support basic cmake dependency (*Export.txt files ?)
-			file(GLOB files "${package_name}/[!CPack]*Config.cmake")
+			#TODO : support basic cmake dependency (*Export.txt files) ?
+			file(GLOB files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${package_name}/*Config.cmake")
+			list(REMOVE_ITEM files "${package_name}/CPackSourceConfig.cmake" "${package_name}/CPackConfig.cmake")
 			#message (STATUS "${files} FOUND !")
 			foreach(file ${files})
 				#get dependency name


fix path to prebiuld slvoice libraries on mac and linux.

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -124,7 +124,7 @@
     set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources")
     set(SHARED_LIB_STAGING_DIR_RELEASE          "${SHARED_LIB_STAGING_DIR}/Release/Resources")

-    set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/universal-darwin")
+    set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
     set(vivox_files
         SLVoice
         libsndfile.dylib
@@ -159,7 +159,7 @@
     set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO   "${SHARED_LIB_STAGING_DIR}")
     set(SHARED_LIB_STAGING_DIR_RELEASE          "${SHARED_LIB_STAGING_DIR}")

-    set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
+    set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
     set(vivox_files
         libsndfile.so.1
         libortp.so


Revert "testing interpolation"

Revert "testing interpolation"

This reverts commit 91c79f9d3c7041e8906fbccaad991147e779e4e2.

--- modules/fc_optional.cmake
+++ modules/fc_optional.cmake
@@ -28,9 +28,8 @@
 #
 # autocmake.yml configuration::
 #
-#   foo: "hey ho"
 #   docopt:
-#     - "--fc=<FC> %(foo) compiler [default: gfortran]."
+#     - "--fc=<FC> Fortran compiler [default: gfortran]."
 #     - "--extra-fc-flags=<EXTRA_FCFLAGS> Extra Fortran compiler flags [default: '']."
 #     - "--fc-support=<FC_SUPPORT> Toggle Fortran language support (ON/OFF) [default: ON]."
 #   export: "'FC={0}'.format(arguments['--fc'])"


fix: make cmake install directives whitespace friendly

--- src/rezplugins/build_system/cmake_files/InstallFiles.cmake
+++ src/rezplugins/build_system/cmake_files/InstallFiles.cmake
@@ -134,14 +134,14 @@
 	# install files
 	#
 	foreach(f ${INSTF_DEFAULT_ARGS})
-		get_target_filepath(${f} ${rel_dir} ${dest_dir} target_fpath)
-		get_filename_component(target_path ${target_fpath} PATH)
+		get_target_filepath("${f}" "${rel_dir}" "${dest_dir}" target_fpath)
+		get_filename_component(target_path "${target_fpath}" PATH)
         if(REZ_BUILD_TYPE STREQUAL "central" OR NOT INSTF_LOCAL_SYMLINK)
-		    install(FILES ${f} DESTINATION ${target_path} PERMISSIONS ${perms})
+		    install(FILES "${f}" DESTINATION "${target_path}" PERMISSIONS ${perms})
         else()
             install( CODE "message (STATUS  \"Symlink : ${CMAKE_INSTALL_PREFIX}/${target_fpath} -> ${f}\" )" )
-            install( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}/${target_path})" )
-            install( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${f} ${CMAKE_INSTALL_PREFIX}/${target_fpath})" )
+            install( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory \"${CMAKE_INSTALL_PREFIX}/${target_path}\")" )
+            install( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \"${f}\" \"${CMAKE_INSTALL_PREFIX}/${target_fpath}\")" )
         endif(REZ_BUILD_TYPE STREQUAL "central" OR NOT INSTF_LOCAL_SYMLINK)

 	endforeach(f ${INSTF_DEFAULT_ARGS})


Updated FindOpenEXR.cmake (1464)

Updated FindOpenEXR.cmake (1464)

There were a couple of issues with the FindOpenEXR.cmake.

1. The /usr/local paths were behind the /usr paths. I think it makes sense that if you compiled a new version of a library, the dependent code should point to that one.
2. Not having OPENEXR_HOME or ILMBASE_HOME set would cause the GENERIC_LIBRARY_PATHS to point to /lib (/lib64 in my case) before the paths that I expect them to be.

--- src/cmake/modules/FindOpenEXR.cmake
+++ src/cmake/modules/FindOpenEXR.cmake
@@ -15,7 +15,7 @@
 #   OPENEXR_CUSTOM_LIB_SUFFIX - special snowflake library suffix
 #

-# Other standarnd issue macros
+# Other standard issue macros
 include (FindPackageHandleStandardArgs)
 include (SelectLibraryConfigurations)

@@ -35,9 +35,9 @@
     ${OPENEXR_CUSTOM_INCLUDE_DIR}
     ${OPENEXR_HOME}/include
     ${ILMBASE_HOME}/include
+    /usr/local/include
     /usr/include
     /usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
-    /usr/local/include
     /sw/include
     /opt/local/include )

@@ -71,16 +71,29 @@

 # List of likely places to find the libraries -- note priority override of
 # OPENEXR_CUSTOM_LIB_DIR and ${OPENEXR_HOME}/lib.
-set (GENERIC_LIBRARY_PATHS
-    ${OPENEXR_CUSTOM_LIB_DIR}
-    ${OPENEXR_HOME}/lib
-    ${ILMBASE_HOME}/lib
+
+# If there's no OPENEXR_HOME or ILMBASE_HOME, then the path will point to
+# "/lib", which may not always be wanted/expected.
+if (OPENEXR_CUSTOM_LIB_DIR)
+  set (GENERIC_LIBRARY_PATHS ${GENERIC_LIBRARY_PATHS} ${OPENEXR_CUSTOM_LIB_DIR})
+endif()
+
+if (OPENEXR_HOME)
+  set (GENERIC_LIBRARY_PATHS ${GENERIC_LIBRARY_PATHS} ${OPENEXR_HOME})
+endif()
+
+if (ILMBASE_HOME)
+  set (GENERIC_LIBRARY_PATHS ${GENERIC_LIBRARY_PATHS} ${ILMBASE_HOME})
+endif()
+
+set (GENERIC_LIBRARY_PATHS
+    ${GENERIC_LIBRARY_PATHS}
     ${OPENEXR_INCLUDE_PATH}/../lib
     ${ILMBASE_INCLUDE_PATH}/../lib
+    /usr/local/lib
+    /usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
     /usr/lib
     /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
-    /usr/local/lib
-    /usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
     /sw/lib
     /opt/local/lib
     $ENV{PROGRAM_FILES}/OpenEXR/lib/static )
@@ -116,7 +129,6 @@
     # One more time, with no restrictions
     find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY ${FULL_COMPONENT_NAME})
 endforeach ()
-
 #Half usually has no suffix
 find_library (OPENEXR_HALF_LIBRARY ${OPENEXR_CUSTOM_LIB_PREFIX}Half
               PATHS ${GENERIC_LIBRARY_PATHS} NO_DEFAULT_PATH)


CMAKE : correct "Cortex-M7F" link options for ARM

--- tools/cmake/cores/Cortex-M7F.cmake
+++ tools/cmake/cores/Cortex-M7F.cmake
@@ -10,16 +10,10 @@
         "-mcpu=cortex-m7"
     )
 elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
-    list(APPEND c_cxx_compile_options
+    list(APPEND common_options
         "-mcpu=cortex-m7"
         "-mfpu=fpv5-sp-d16"
         "-mfloat-abi=hard"
-    )
-    list(APPEND asm_compile_options
-        "-mcpu=Cortex-M7.fp.sp"
-    )
-    list(APPEND link_options
-        "--cpu=Cortex-M7.fp.sp"
     )
 endif()


Changed the destination path for the setup package

--- cmake/include/pqTestSuite_setup_package.cmake
+++ cmake/include/pqTestSuite_setup_package.cmake
@@ -20,5 +20,5 @@
     FILES
     "${PROJECT_BINARY_DIR}/cmake/pkg/${PROJECT_NAME}Config.cmake"
     "${PROJECT_BINARY_DIR}/cmake/pkg/${PROJECT_NAME}Config-version.cmake"
-    DESTINATION "share/cmake/pkg"
+    DESTINATION "share/cmake/${PROJECT_NAME}"
 )


rm generated file

rm generated file

--- pronto-lcm-ros-translators/devel/share/pronto_translators/cmake/pronto_translatorsConfig.cmake
+++ pronto-lcm-ros-translators/devel/share/pronto_translators/cmake/pronto_translatorsConfig.cmake
@@ -1,191 +0,0 @@
-# generated from catkin/cmake/template/pkgConfig.cmake.in
-
-# append elements to a list and remove existing duplicates from the list
-# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig
-# self contained
-macro(_list_append_deduplicate listname)
-  if(NOT "${ARGN}" STREQUAL "")
-    if(${listname})
-      list(REMOVE_ITEM ${listname} ${ARGN})
-    endif()
-    list(APPEND ${listname} ${ARGN})
-  endif()
-endmacro()
-
-# append elements to a list if they are not already in the list
-# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig
-# self contained
-macro(_list_append_unique listname)
-  foreach(_item ${ARGN})
-    list(FIND ${listname} ${_item} _index)
-    if(_index EQUAL -1)
-      list(APPEND ${listname} ${_item})
-    endif()
-  endforeach()
-endmacro()
-
-# pack a list of libraries with optional build configuration keywords
-# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig
-# self contained
-macro(_pack_libraries_with_build_configuration VAR)
-  set(${VAR} "")
-  set(_argn ${ARGN})
-  list(LENGTH _argn _count)
-  set(_index 0)
-  while(${_index} LESS ${_count})
-    list(GET _argn ${_index} lib)
-    if("${lib}" MATCHES "^debug|optimized|general$")
-      math(EXPR _index "${_index} + 1")
-      if(${_index} EQUAL ${_count})
-        message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
-      endif()
-      list(GET _argn ${_index} library)
-      list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}")
-    else()
-      list(APPEND ${VAR} "${lib}")
-    endif()
-    math(EXPR _index "${_index} + 1")
-  endwhile()
-endmacro()
-
-# unpack a list of libraries with optional build configuration keyword prefixes
-# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig
-# self contained
-macro(_unpack_libraries_with_build_configuration VAR)
-  set(${VAR} "")
-  foreach(lib ${ARGN})
-    string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}")
-    list(APPEND ${VAR} "${lib}")
-  endforeach()
-endmacro()
-
-
-if(pronto_translators_CONFIG_INCLUDED)
-  return()
-endif()
-set(pronto_translators_CONFIG_INCLUDED TRUE)
-
-# set variables for source/devel/install prefixes
-if("TRUE" STREQUAL "TRUE")
-  set(pronto_translators_SOURCE_PREFIX /home/drc/pronto-distro/pronto-lcm-ros-translators/src/pronto_translators)
-  set(pronto_translators_DEVEL_PREFIX /home/drc/pronto-distro/pronto-lcm-ros-translators/devel)
-  set(pronto_translators_INSTALL_PREFIX "")
-  set(pronto_translators_PREFIX ${pronto_translators_DEVEL_PREFIX})
-else()
-  set(pronto_translators_SOURCE_PREFIX "")
-  set(pronto_translators_DEVEL_PREFIX "")
-  set(pronto_translators_INSTALL_PREFIX /home/drc/pronto-distro/pronto-lcm-ros-translators/install)
-  set(pronto_translators_PREFIX ${pronto_translators_INSTALL_PREFIX})
-endif()
-
-# warn when using a deprecated package
-if(NOT "" STREQUAL "")
-  set(_msg "WARNING: package 'pronto_translators' is deprecated")
-  # append custom deprecation text if available
-  if(NOT "" STREQUAL "TRUE")
-    set(_msg "${_msg} ()")
-  endif()
-  message("${_msg}")
-endif()
-
-# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project
-set(pronto_translators_FOUND_CATKIN_PROJECT TRUE)
-
-if(NOT "" STREQUAL "")
-  set(pronto_translators_INCLUDE_DIRS "")
-  set(_include_dirs "")
-  foreach(idir ${_include_dirs})
-    if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir})
-      set(include ${idir})
-    elseif("${idir}" STREQUAL "include")
-      get_filename_component(include "${pronto_translators_DIR}/../../../include" ABSOLUTE)
-      if(NOT IS_DIRECTORY ${include})
-        message(FATAL_ERROR "Project 'pronto_translators' specifies '${idir}' as an include dir, which is not found.  It does not exist in '${include}'.  Ask the maintainer 'drc <drc@todo.todo>' to fix it.")
-      endif()
-    else()
-      message(FATAL_ERROR "Project 'pronto_translators' specifies '${idir}' as an include dir, which is not found.  It does neither exist as an absolute directory nor in '/home/drc/pronto-distro/pronto-lcm-ros-translators/src/pronto_translators/${idir}'.  Ask the maintainer 'drc <drc@todo.todo>' to fix it.")
-    endif()
-    _list_append_unique(pronto_translators_INCLUDE_DIRS ${include})
-  endforeach()
-endif()
-
-set(libraries "")
-foreach(library ${libraries})
-  # keep build configuration keywords, target names and absolute libraries as-is
-  if("${library}" MATCHES "^debug|optimized|general$")
-    list(APPEND pronto_translators_LIBRARIES ${library})
-  elseif(TARGET ${library})
-    list(APPEND pronto_translators_LIBRARIES ${library})
-  elseif(IS_ABSOLUTE ${library})
-    list(APPEND pronto_translators_LIBRARIES ${library})
-  else()
-    set(lib_path "")
-    set(lib "${library}-NOTFOUND")
-    # since the path where the library is found is returned we have to iterate over the paths manually
-    foreach(path /home/drc/pronto-distro/pronto-lcm-ros-translators/devel/lib;/home/drc/pronto-distro/pronto-lcm-ros-translators/devel/lib;/home/drc/catkin_ws/devel/lib;/opt/ros/indigo/lib)
-      find_library(lib ${library}
-        PATHS ${path}
-        NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-      if(lib)
-        set(lib_path ${path})
-        break()
-      endif()
-    endforeach()
-    if(lib)
-      _list_append_unique(pronto_translators_LIBRARY_DIRS ${lib_path})
-      list(APPEND pronto_translators_LIBRARIES ${lib})
-    else()
-      # as a fall back for non-catkin libraries try to search globally
-      find_library(lib ${library})
-      if(NOT lib)
-        message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'.  The library is neither a target nor built/installed properly.  Did you compile project 'pronto_translators'?  Did you find_package() it before the subdirectory containing its code is included?")
-      endif()
-      list(APPEND pronto_translators_LIBRARIES ${lib})
-    endif()
-  endif()
-endforeach()
-
-set(pronto_translators_EXPORTED_TARGETS "")
-# create dummy targets for exported code generation targets to make life of users easier
-foreach(t ${pronto_translators_EXPORTED_TARGETS})
-  if(NOT TARGET ${t})
-    add_custom_target(${t})
-  endif()
-endforeach()
-
-set(depends "")
-foreach(depend ${depends})
-  string(REPLACE " " ";" depend_list ${depend})
-  # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls
-  list(GET depend_list 0 pronto_translators_dep)
-  list(LENGTH depend_list count)
-  if(${count} EQUAL 1)
-    # simple dependencies must only be find_package()-ed once
-    if(NOT ${pronto_translators_dep}_FOUND)
-      find_package(${pronto_translators_dep} REQUIRED)
-    endif()
-  else()
-    # dependencies with components must be find_package()-ed again
-    list(REMOVE_AT depend_list 0)
-    find_package(${pronto_translators_dep} REQUIRED ${depend_list})
-  endif()
-  _list_append_unique(pronto_translators_INCLUDE_DIRS ${${pronto_translators_dep}_INCLUDE_DIRS})
-
-  # merge build configuration keywords with library names to correctly deduplicate
-  _pack_libraries_with_build_configuration(pronto_translators_LIBRARIES ${pronto_translators_LIBRARIES})
-  _pack_libraries_with_build_configuration(_libraries ${${pronto_translators_dep}_LIBRARIES})
-  _list_append_deduplicate(pronto_translators_LIBRARIES ${_libraries})
-  # undo build configuration keyword merging after deduplication
-  _unpack_libraries_with_build_configuration(pronto_translators_LIBRARIES ${pronto_translators_LIBRARIES})
-
-  _list_append_unique(pronto_translators_LIBRARY_DIRS ${${pronto_translators_dep}_LIBRARY_DIRS})
-  list(APPEND pronto_translators_EXPORTED_TARGETS ${${pronto_translators_dep}_EXPORTED_TARGETS})
-endforeach()
-
-set(pkg_cfg_extras "")
-foreach(extra ${pkg_cfg_extras})
-  if(NOT IS_ABSOLUTE ${extra})
-    set(extra ${pronto_translators_DIR}/${extra})
-  endif()
-  include(${extra})
-endforeach()


Handle git program or .git folder absence (#5878)

Assume version is 0.0.0.0 in such cases.

--- CMake/Version.cmake
+++ CMake/Version.cmake
@@ -1,11 +1,28 @@
+set(VERSION_MAJOR 1)
+set(VERSION_MINOR 12)
+set(VERSION_PATCH 0)
+set(VERSION_COMMIT 0)
+
 find_program(GIT git)
-execute_process(
-    COMMAND ${GIT} describe
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    OUTPUT_VARIABLE GIT_DESCRIBE_DIRTY
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-)
-string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_DESCRIBE_DIRTY}")
-string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_DESCRIBE_DIRTY}")
-string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GIT_DESCRIBE_DIRTY}")
-string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+).*" "\\1" VERSION_COMMIT "${GIT_DESCRIBE_DIRTY}")
+if(GIT)
+  execute_process(
+      COMMAND ${GIT} describe
+      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+      OUTPUT_VARIABLE GIT_DESCRIBE_DIRTY
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      RESULT_VARIABLE GIT_DESCRIBE_RESULT
+  )
+
+  if(GIT_DESCRIBE_RESULT EQUAL 0)
+    string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_DESCRIBE_DIRTY}")
+    string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_DESCRIBE_DIRTY}")
+    string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GIT_DESCRIBE_DIRTY}")
+    string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+).*" "\\1" VERSION_COMMIT "${GIT_DESCRIBE_DIRTY}")
+  else()
+    message(WARNING "git describe failed with exit code: ${GIT_DESCRIBE_RESULT}")
+  endif()
+else()
+  message(WARNING "git is not found")
+endif()
+
+message("Proceeding with version: ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_COMMIT}")


Fixed coveralls cmake module to handle windows paths

--- .cmake/Modules/CoverallsGenerateGcov.cmake
+++ .cmake/Modules/CoverallsGenerateGcov.cmake
@@ -166,6 +166,7 @@
 	# #path#to#project#root#subdir#the_file.c.gcov -> /path/to/project/root/subdir/the_file.c
 	string(REGEX REPLACE "\\.gcov$" "" SRC_FILENAME_TMP ${_GCOV_FILENAME_WEXT})
 	string(REGEX REPLACE "\#" "/" SRC_FILENAME_TMP ${SRC_FILENAME_TMP})
+	string(REGEX REPLACE "~" ":" SRC_FILENAME_TMP ${SRC_FILENAME_TMP})
 	set(${_SRC_FILENAME} "${SRC_FILENAME_TMP}")
 endmacro()


fptu-cmake: sync cmake-testing (minor).

fptu-cmake: sync cmake-testing (minor).

--- cmake.fptu/testing.cmake
+++ cmake.fptu/testing.cmake
@@ -129,7 +129,7 @@
       COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --test-action memcheck
       COMMAND ${CAT} "${CMAKE_BINARY_DIR}/Testing/Temporary/MemoryChecker.*.log")
   endif()
-  if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+  if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
     # Windows don't have RPATH feature,
     # therefore we should prepare PATH or copy DLL(s)
     set(UT_NEED_DLLCRUTCH "Crutch for ${CMAKE_SYSTEM_NAME}")
@@ -183,7 +183,7 @@
       string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPERCASE)
       foreach(dep IN LISTS params_LIBRARY GTEST_BOTH_LIBRARIES)
         get_target_property(type ${dep} TYPE)
-        if(${type} STREQUAL "SHARED_LIBRARY")
+        if(type STREQUAL SHARED_LIBRARY)
           # Windows don't have RPATH feature,
           # therefore we should prepare PATH or copy DLL(s)...
           if(CMAKE_CONFIGURATION_TYPES)
@@ -241,14 +241,14 @@
       endif()
       if(params_DLLPATH)
         # Compose DLL's path in the ENVIRONMENT property
-        if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+        if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
           set(params_DLLPATH_ENV "${params_DLLPATH};$ENV{PATH}")
         else()
           set(params_DLLPATH_ENV "${params_DLLPATH}:$ENV{PATH}")
           string(REPLACE ":" ";" params_DLLPATH_ENV "${params_DLLPATH_ENV}")
         endif()
         list(REMOVE_DUPLICATES params_DLLPATH_ENV)
-        if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+        if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
           string(REPLACE ";" "\\;" params_DLLPATH_ENV "${params_DLLPATH_ENV}")
         else()
           string(REPLACE ";" ":" params_DLLPATH_ENV "${params_DLLPATH_ENV}")


Fixing googletest source directory for Debian Buster

--- cmake/FindGTestFix.cmake
+++ cmake/FindGTestFix.cmake
@@ -19,7 +19,7 @@
           OUTPUT_STRIP_TRAILING_WHITESPACE)

       if(LSB_CODENAME MATCHES stretch OR LSB_CODENAME MATCHES buster)
-        set(GTEST_SOURCE_DIR /usr/src/googletest/googletest)
+        set(GTEST_SOURCE_DIR /usr/src/googletest)
       elseif(LSB_CODENAME MATCHES jessie OR LSB_CODENAME MATCHES xenial OR LSB_CODENAME MATCHES bionic OR LSB_CODENAME MATCHES cosmic)
         set(GTEST_SOURCE_DIR /usr/src/gtest)
       endif()


fix FindJemalloc

fix FindJemalloc

--- cmake/FindJemalloc.cmake
+++ cmake/FindJemalloc.cmake
@@ -8,7 +8,7 @@
 if(NOT JEMALLOC_USE_BUNDLED)
   find_package(PkgConfig)
   if (PKG_CONFIG_FOUND)
-    pkg_check_modules(PC_JEMALLOC QUIET JEMALLOC)
+    pkg_check_modules(PC_JEMALLOC QUIET jemalloc)
   endif()
 else()
   set(PC_JEMALLOC_INCLUDEDIR)
@@ -31,9 +31,9 @@
     "${CMAKE_STATIC_LIBRARY_PREFIX}jemalloc${CMAKE_STATIC_LIBRARY_SUFFIX}")
 endif()

-list(APPEND JEMALLOC_NAMES JEMALLOC)
+list(APPEND JEMALLOC_NAMES jemalloc)

-find_library(JEMALLOC_LIBRARY NAMES JEMALLOC
+find_library(JEMALLOC_LIBRARY NAMES ${JEMALLOC_NAMES}
              PATHS ${PC_JEMALLOC_LIBDIR} ${PC_JEMALLOC_LIBRARY_DIRS}
              ${LIMIT_SEARCH})

@@ -43,7 +43,7 @@
 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE
 # if all listed variables are TRUE
-find_package_handle_standard_args(JEMALLOC DEFAULT_MSG
+find_package_handle_standard_args(jemalloc DEFAULT_MSG
                                   JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)

 mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_LIBRARY)


build: gRPC absolute library dir

build: gRPC absolute library dir

Signed-off-by: Lorenzo Fontana <638e8f0171575864326f06d2a5f8e72287427b15@linux.com>

--- cmake/modules/gRPC.cmake
+++ cmake/modules/gRPC.cmake
@@ -69,19 +69,20 @@
   message(STATUS "Found pkg-config executable: ${PKG_CONFIG_EXECUTABLE}")
   set(GRPC_SRC "${PROJECT_BINARY_DIR}/grpc-prefix/src/grpc")
   set(GRPC_INCLUDE "${GRPC_SRC}/include")
-  set(GRPC_LIB "${GRPC_SRC}/libs/opt/libgrpc.a")
-  set(GRPCPP_LIB "${GRPC_SRC}/libs/opt/libgrpc++.a")
+  set(GRPC_LIBS_ABSOLUTE "${GRPC_SRC}/libs/opt")
+  set(GRPC_LIB "${GRPC_LIBS_ABSOLUTE}/libgrpc.a")
+  set(GRPCPP_LIB "${GRPC_LIBS_ABSOLUTE}/libgrpc++.a")
   set(GRPC_CPP_PLUGIN "${GRPC_SRC}/bins/opt/grpc_cpp_plugin")

   # we tell gRPC to compile protobuf for us because when a gRPC package is not available, like on CentOS, it's very
   # likely that protobuf will be very outdated
   set(PROTOBUF_INCLUDE "${GRPC_SRC}/third_party/protobuf/src")
   set(PROTOC "${PROTOBUF_INCLUDE}/protoc")
-  set(PROTOBUF_LIB "${PROTOBUF_INCLUDE}/.libs/libprotobuf.a")
+  set(PROTOBUF_LIB "${GRPC_LIBS_ABSOLUTE}/protobuf/libprotobuf.a")
   # we tell gRPC to compile zlib for us because when a gRPC package is not available, like on CentOS, it's very likely
   # that zlib will be very outdated
   set(ZLIB_INCLUDE "${GRPC_SRC}/third_party/zlib")
-  set(ZLIB_LIB "${ZLIB_INCLUDE}/libz.a")
+  set(ZLIB_LIB "${GRPC_LIBS_ABSOLUTE}/libz.a")

   message(STATUS "Using bundled gRPC in '${GRPC_SRC}'")
   message(


Cleanup pcl_find_sse.

Cleanup pcl_find_sse.

Only look for SSE flags when compiler does not support -march=native.
Don't blindly set -march=native for compilers other than APPLE and MSVC.

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@4725 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_sse.cmake
+++ cmake/pcl_find_sse.cmake
@@ -1,133 +1,143 @@
 ###############################################################################
 # Check for the presence of SSE and figure out the flags to use for it.
 macro(PCL_CHECK_FOR_SSE)
-    include(CheckCXXSourceRuns)
     set(SSE_FLAGS)
-    set(CMAKE_REQUIRED_FLAGS)
-
-    check_cxx_source_runs("
-        #include <mm_malloc.h>
-        int main()
-        {
-          void* mem = _mm_malloc (100, 16);
-          return 0;
-        }"
-        HAVE_MM_MALLOC)
-
-    check_cxx_source_runs("
-        #include <stdlib.h>
-        int main()
-        {
-          void* mem;
-          return posix_memalign (&mem, 16, 100);
-        }"
-        HAVE_POSIX_MEMALIGN)

     if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        set(CMAKE_REQUIRED_FLAGS "-msse4.1")
-    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+        execute_process(COMMAND ${CMAKE_CXX_COMPILER} "-dumpversion"
+                        OUTPUT_VARIABLE GCC_VERSION_STRING)
+        if(GCC_VERSION_STRING VERSION_GREATER 4.2 AND NOT APPLE)
+          SET(SSE_FLAGS "${SSE_FLAGS} -march=native")
+          message(STATUS "Using CPU native flags for SSE optimization: ${SSE_FLAGS}")
+        endif()
+    endif()

-    check_cxx_source_runs("
-        #include <smmintrin.h>
-        int main()
-        {
-          __m128 a, b;
-          float vals[4] = {1, 2, 3, 4};
-          const int mask = 123;
-          a = _mm_loadu_ps(vals);
-          b = a;
-          b = _mm_dp_ps (a, a, mask);
-          _mm_storeu_ps(vals,b);
-          return 0;
-        }"
-        HAVE_SSE4_1_EXTENSIONS)
+    if (NOT SSE_FLAGS)
+      include(CheckCXXSourceRuns)
+      set(CMAKE_REQUIRED_FLAGS)

-    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        set(CMAKE_REQUIRED_FLAGS "-msse3")
-    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+      check_cxx_source_runs("
+          #include <mm_malloc.h>
+          int main()
+          {
+            void* mem = _mm_malloc (100, 16);
+            return 0;
+          }"
+          HAVE_MM_MALLOC)

-    check_cxx_source_runs("
-        #include <pmmintrin.h>
-        int main()
-        {
-            __m128d a, b;
-            double vals[2] = {0};
-            a = _mm_loadu_pd(vals);
-            b = _mm_hadd_pd(a,a);
-            _mm_storeu_pd(vals, b);
-            return 0;
-        }"
-        HAVE_SSE3_EXTENSIONS)
+      check_cxx_source_runs("
+          #include <stdlib.h>
+          int main()
+          {
+            void* mem;
+            return posix_memalign (&mem, 16, 100);
+          }"
+          HAVE_POSIX_MEMALIGN)

-    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        set(CMAKE_REQUIRED_FLAGS "-msse2")
-    elseif(MSVC AND NOT CMAKE_CL_64)
-        set(CMAKE_REQUIRED_FLAGS "/arch:SSE2")
-    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-
-    check_cxx_source_runs("
-        #include <emmintrin.h>
-        int main()
-        {
-            __m128d a, b;
-            double vals[2] = {0};
-            a = _mm_loadu_pd(vals);
-            b = _mm_add_pd(a,a);
-            _mm_storeu_pd(vals,b);
-            return 0;
-        }"
-        HAVE_SSE2_EXTENSIONS)
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          set(CMAKE_REQUIRED_FLAGS "-msse4.1")
+      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)

-    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        set(CMAKE_REQUIRED_FLAGS "-msse")
-    elseif(MSVC AND NOT CMAKE_CL_64)
-        set(CMAKE_REQUIRED_FLAGS "/arch:SSE")
-    endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-
-    check_cxx_source_runs("
-        #include <xmmintrin.h>
-        int main()
-        {
+      check_cxx_source_runs("
+          #include <smmintrin.h>
+          int main()
+          {
             __m128 a, b;
-            float vals[4] = {0};
+            float vals[4] = {1, 2, 3, 4};
+            const int mask = 123;
             a = _mm_loadu_ps(vals);
             b = a;
-            b = _mm_add_ps(a,b);
+            b = _mm_dp_ps (a, a, mask);
             _mm_storeu_ps(vals,b);
             return 0;
-        }"
-        HAVE_SSE_EXTENSIONS)
+          }"
+          HAVE_SSE4_1_EXTENSIONS)

-    set(CMAKE_REQUIRED_FLAGS)
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          set(CMAKE_REQUIRED_FLAGS "-msse3")
+      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)

-    if (NOT APPLE AND NOT MSVC)
-        SET(SSE_FLAGS "${SSE_FLAGS} -march=native")
-    elseif (APPLE)
-        if (HAVE_SSE4_1_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} -msse4.1 -mfpmath=sse")
-            message(STATUS "Found SSE4.1 extensions, using flags: ${SSE_FLAGS}")
-        elseif(HAVE_SSE3_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} -msse3 -mfpmath=sse")
-            message(STATUS "Found SSE3 extensions, using flags: ${SSE_FLAGS}")
-        elseif(HAVE_SSE2_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} -msse2 -mfpmath=sse")
-            message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
-        elseif(HAVE_SSE_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} -msse -mfpmath=sse")
-            message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
-        else (HAVE_SSE4_1_EXTENSIONS)
-            message(STATUS "No SSE extensions found")
-        endif(HAVE_SSE4_1_EXTENSIONS)
-    elseif (MSVC AND NOT CMAKE_CL_64)
-        if(HAVE_SSE2_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
-            message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
-        elseif(HAVE_SSE_EXTENSIONS)
-            SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE")
-            message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
-        endif(HAVE_SSE2_EXTENSIONS)
-    endif (NOT APPLE AND NOT MSVC)
-
+      check_cxx_source_runs("
+          #include <pmmintrin.h>
+          int main()
+          {
+              __m128d a, b;
+              double vals[2] = {0};
+              a = _mm_loadu_pd(vals);
+              b = _mm_hadd_pd(a,a);
+              _mm_storeu_pd(vals, b);
+              return 0;
+          }"
+          HAVE_SSE3_EXTENSIONS)
+
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          set(CMAKE_REQUIRED_FLAGS "-msse2")
+      elseif(MSVC AND NOT CMAKE_CL_64)
+          set(CMAKE_REQUIRED_FLAGS "/arch:SSE2")
+      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+
+      check_cxx_source_runs("
+          #include <emmintrin.h>
+          int main()
+          {
+              __m128d a, b;
+              double vals[2] = {0};
+              a = _mm_loadu_pd(vals);
+              b = _mm_add_pd(a,a);
+              _mm_storeu_pd(vals,b);
+              return 0;
+          }"
+          HAVE_SSE2_EXTENSIONS)
+
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          set(CMAKE_REQUIRED_FLAGS "-msse")
+      elseif(MSVC AND NOT CMAKE_CL_64)
+          set(CMAKE_REQUIRED_FLAGS "/arch:SSE")
+      endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+
+      check_cxx_source_runs("
+          #include <xmmintrin.h>
+          int main()
+          {
+              __m128 a, b;
+              float vals[4] = {0};
+              a = _mm_loadu_ps(vals);
+              b = a;
+              b = _mm_add_ps(a,b);
+              _mm_storeu_ps(vals,b);
+              return 0;
+          }"
+          HAVE_SSE_EXTENSIONS)
+
+      set(CMAKE_REQUIRED_FLAGS)
+
+      if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+          if (HAVE_SSE4_1_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} -msse4.1 -mfpmath=sse")
+              message(STATUS "Found SSE4.1 extensions, using flags: ${SSE_FLAGS}")
+          elseif(HAVE_SSE3_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} -msse3 -mfpmath=sse")
+              message(STATUS "Found SSE3 extensions, using flags: ${SSE_FLAGS}")
+          elseif(HAVE_SSE2_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} -msse2 -mfpmath=sse")
+              message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
+          elseif(HAVE_SSE_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} -msse -mfpmath=sse")
+              message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
+          else (HAVE_SSE4_1_EXTENSIONS)
+              message(STATUS "No SSE extensions found")
+          endif(HAVE_SSE4_1_EXTENSIONS)
+      elseif (MSVC)
+          if(HAVE_SSE2_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
+              message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")
+          elseif(HAVE_SSE_EXTENSIONS)
+              SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE")
+              message(STATUS "Found SSE extensions, using flags: ${SSE_FLAGS}")
+          endif(HAVE_SSE2_EXTENSIONS)
+      endif ()
+
+    endif()
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${SSE_FLAGS}")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${SSE_FLAGS}")


Tiny fixes in cmake files.

Tiny fixes in cmake files.

--- cmake/FindFreeImage.cmake
+++ cmake/FindFreeImage.cmake
@@ -1,13 +1,11 @@
 # Locate Free Image
 # This module defines
 #  FREEIMAGE_FOUND, if false, do not try to link to FreeImage
-#  FREEIMAGE_LIBRARIES
-#  FREEIMAGE_INCLUDE_DIRS
+#  FREEIMAGE_LIBRARIY
+#  FREEIMAGE_INCLUDE_DIR
 #
 # Note that the expected include convention is
-#  #include "FreeImage.h"
-
-find_package(PackageHandleStandardArgs)
+#  #include <FreeImage.h>

 find_path(FREEIMAGE_INCLUDE_DIR FreeImage.h
   HINTS
@@ -36,8 +34,9 @@
   /opt
 )

+find_package(PackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(FreeImage
                                   REQUIRED_VARS FREEIMAGE_LIBRARY FREEIMAGE_INCLUDE_DIR)

-mark_as_advanced(FREEIMAGE_INCLUDE_DIR FREEIMAGE_LIBRARY LUA_MATH_LIBRARY)
+mark_as_advanced(FREEIMAGE_INCLUDE_DIR FREEIMAGE_LIBRARY)


Fixing mistake in elemental_sub.cmake with respect to export CXX_FLAGS.

--- cmake/elemental_sub.cmake
+++ cmake/elemental_sub.cmake
@@ -26,8 +26,8 @@
   ${MPI_C_LIBRARIES} PARENT_SCOPE)

 # C++ compiler info
-set(CMAKE_CXX_FLAGS_
-  ${UPPER_BUILD_TYPE} ${CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE}} PARENT_SCOPE)
+set(CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE}
+  ${CMAKE_CXX_FLAGS_${UPPER_BUILD_TYPE}} PARENT_SCOPE)
 set(MPI_CXX_COMPILER
   ${MPI_CXX_COMPILER} PARENT_SCOPE)
 set(MPI_CXX_INCLUDE_PATH


Disable OCaml by default for this forthcoming release because of the
segfault issue and other mememory management issues that I have
spotted with valgrind.

svn path=/trunk/; revision=11942

--- cmake/modules/ocaml.cmake
+++ cmake/modules/ocaml.cmake
@@ -24,7 +24,7 @@
 if(DEFAULT_NO_BINDINGS)
   option(ENABLE_ocaml "Enable OCaml bindings" OFF)
 else(DEFAULT_NO_BINDINGS)
-  option(ENABLE_ocaml "Enable OCaml bindings" ON)
+  option(ENABLE_ocaml "Enable OCaml bindings" OFF)
 endif(DEFAULT_NO_BINDINGS)

 option(ENABLE_ocaml_static "Enable OCaml bindings for the static build case" OFF)


MAINT-646 Enable /fp:fast in Visual Studio

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -69,6 +69,7 @@
       /Oy-
       /Zc:wchar_t-
       /arch:SSE2
+      /fp:fast
       )

   # Are we using the crummy Visual Studio KDU build workaround?


Fix/logging (#321)

Fix/logging (#321)

* Update conan.cmake

* Update conan.cmake

--- conan.cmake
+++ conan.cmake
@@ -807,7 +807,8 @@
     endif()

     if(NOT CONAN_DETECT_QUIET)
-        message(STATUS "Conan: Version found ${CONAN_VERSION_OUTPUT}")
+        string(STRIP "${CONAN_VERSION_OUTPUT}" _CONAN_VERSION_OUTPUT)
+        message(STATUS "Conan: Version found ${_CONAN_VERSION_OUTPUT}")
     endif()

     if(DEFINED CONAN_VERSION)
@@ -837,7 +838,7 @@
     if(DEFINED CONAN_COMMAND)
         set(CONAN_CMD ${CONAN_COMMAND})
     else()
-        conan_check(REQUIRED)
+        conan_check(REQUIRED DETECT_QUIET)
     endif()
     set(CONAN_VERIFY_SSL_ARG "True")
     if(DEFINED CONAN_VERIFY_SSL)


Add additional compiler options to conan_cmake_detect_unix_libcxx

Without these many options many wrappers (e.g. ccache, winegcc)
or cross-compiling toolchains (e.g. yocto) may not find the intended
underlying tools and sysroot, leading to the command failing,
or (perhaps worse) succeeding, but using defaults instead of the intended
underlying gcc or libstdc++ and thus getting inaccurate results

--- conan.cmake
+++ conan.cmake
@@ -264,9 +264,38 @@
         endif()
     endforeach()

+    # add additional compiler options ala cmRulePlaceholderExpander::ExpandRuleVariable
+    set(EXPAND_CXX_COMPILER ${CMAKE_CXX_COMPILER})
+    if(CMAKE_CXX_COMPILER_ARG1)
+        # CMake splits CXX="foo bar baz" into CMAKE_CXX_COMPILER="foo", CMAKE_CXX_COMPILER_ARG1="bar baz"
+        # without this, ccache, winegcc, or other wrappers might lose all their arguments
+        separate_arguments(SPLIT_CXX_COMPILER_ARG1 NATIVE_COMMAND ${CMAKE_CXX_COMPILER_ARG1})
+        list(APPEND EXPAND_CXX_COMPILER ${SPLIT_CXX_COMPILER_ARG1})
+    endif()
+
+    if(CMAKE_CXX_COMPILE_OPTIONS_TARGET AND CMAKE_CXX_COMPILER_TARGET)
+        # without --target= we may be calling the wrong underlying GCC
+        list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}")
+    endif()
+
+    if(CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN AND CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN)
+        list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}")
+    endif()
+
+    if(CMAKE_CXX_COMPILE_OPTIONS_SYSROOT)
+        # without --sysroot= we may find the wrong #include <string>
+        if(CMAKE_SYSROOT_COMPILE)
+            list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT_COMPILE}")
+        elseif(CMAKE_SYSROOT)
+            list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}")
+        endif()
+    endif()
+
+    separate_arguments(SPLIT_CXX_FLAGS NATIVE_COMMAND ${CMAKE_CXX_FLAGS})
+
     execute_process(
         COMMAND ${CMAKE_COMMAND} -E echo "#include <string>"
-        COMMAND ${CMAKE_CXX_COMPILER} -x c++ ${compile_options} -E -dM -
+        COMMAND ${EXPAND_CXX_COMPILER} ${SPLIT_CXX_FLAGS} -x c++ ${compile_options} -E -dM -
         OUTPUT_VARIABLE string_defines
     )


basic clang

basic clang

--- conan.cmake
+++ conan.cmake
@@ -20,6 +20,12 @@
   if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
     # using GCC
     set(SETTINGS_STR -s compiler=gcc -s compiler.version=4.9 -s compiler.libcxx=libstdc++)
+  elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
+      # using Clang
+      string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
+      list(GET VERSION_LIST 0 MAJOR)
+      list(GET VERSION_LIST 1 MINOR)
+      set(SETTINGS_STR -s compiler=clang -s compiler.version=${MAJOR}.${MINOR} -s compiler.libcxx=libstdc++)
   elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
     set(_VISUAL "Visual Studio")
     # FIXME: Crappy, poor check
@@ -140,4 +146,4 @@
 endmacro()

-          +


Typo

Typo

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@27489 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_umfpack.cmake
+++ deal.II/cmake/configure/configure_umfpack.cmake
@@ -75,7 +75,7 @@
     "Relevant hints for UMFPACK are UMFPACK_DIR, AMD_DIR, SUITESPARSECONFIG_DIR.\n"
     "Alternatively you may choose to compile the bundled libraries\n"
     "by setting DEAL_II_ALLOW_BUNDLED=ON or DEAL_II_FORCE_BUNDLED_UMFPACK=ON.\n"
-    "(BLAS has to be installed for bundled UMFPACK to be available)\n\n"
+    "(BLAS and LAPACK have to be installed for bundled UMFPACK to be available)\n\n"
     )
 ENDMACRO()


libjansson fix

libjansson fix

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

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

 message ("Installing ${libjansson_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
@@ -20,11 +20,9 @@
     PREFIX              ${BUILDEM_DIR}
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
-    CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ./configure
-        --prefix=${BUILDEM_DIR}
-
+    CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${libjansson_SRC_DIR}/configure --prefix=${BUILDEM_DIR} --enable-shared
+    GIT_REPOSITORY      ${libjansson_URL}
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
-    BUILD_IN_SOURCE     1 # Configure script reqiures BUILD_IN_SOURCE
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install
 )


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/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   01)
+SET(KWSYS_DATE_STAMP_DAY   02)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/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   15)
+SET(KWSYS_DATE_STAMP_DAY   16)


Remove including project binary directory in rpplugins

--- src/rpplugins/rpplugins_build.cmake
+++ src/rpplugins/rpplugins_build.cmake
@@ -23,7 +23,7 @@
 )

 target_include_directories(${PROJECT_NAME}
-    PRIVATE "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/src"
+    PRIVATE "${PROJECT_SOURCE_DIR}/include" "${PROJECT_SOURCE_DIR}/src"
 )

 target_link_libraries(${PROJECT_NAME}


Actually fixed it this time.

Actually fixed it this time.

--- src/Findparsical.cmake
+++ src/Findparsical.cmake
@@ -27,5 +27,5 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(
   PARSICAL
-  REQUIRED_VARS CLIBGAME_INCLUDE_DIR CLIBGAME_LIBRARY
+  REQUIRED_VARS PARSICAL_INCLUDE_DIR PARSICAL_LIBRARIES
 )


cmake: Log the project sdkconfig path as part of normal CMake status output

As discussed in footnote to https://github.com/espressif/esp-idf/issues/5251#issuecomment-625563782

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -191,6 +191,8 @@
     idf_build_get_property(build_dir BUILD_DIR)
     set(config_dir ${build_dir}/config)
     file(MAKE_DIRECTORY "${config_dir}")
+
+    message(STATUS "Project sdkconfig file ${sdkconfig}")

     # Generate the config outputs
     set(sdkconfig_cmake ${config_dir}/sdkconfig.cmake)


Discover some compile flags.

Discover some compile flags.

--- cmake/arch.cmake
+++ cmake/arch.cmake
@@ -29,18 +29,19 @@

 if(ARCH STREQUAL X86)
 	set(AFLAGS "-m32")
-	set(WORD 32 CACHE INTEGER "Processor word size")
+	set(WORD 32)
 endif(ARCH STREQUAL X86)
 if(ARCH STREQUAL X64)
 	set(AFLAGS "-m64")
-	set(WORD 64 CACHE INTEGER "Processor word size")
+	set(WORD 64)
 endif(ARCH STREQUAL X64)

 if(NOT WORD)
-	set(WORD 64 CACHE INTEGER "Processor word size")
+	set(WORD 64)
 endif(NOT WORD)
+set(WORD ${WORD} CACHE INTEGER "Processor word size")

 if(NOT ALIGN)
-	set(ALIGN 1 CACHE INTEGER "Boundary to align digit vectors")
+	set(ALIGN 1)
 endif(NOT ALIGN)
 set(ALIGN ${ALIGN} CACHE INTEGER "Boundary to align digit vectors")


Add "exp-" prefixes to experimental valgrind tools

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -283,7 +283,7 @@
       TARGET  dhat-${testname}-${instance}
       COMMAND ${test_environment}
               "${VALGRIND_EXECUTABLE}"
-              --tool=dhat
+              --tool=exp-dhat
               --log-file="${EXECUTABLE_OUTPUT_PATH}/dhat.log.${testname}.${instance}"
               ${test_runner}
               "${EXECUTABLE_OUTPUT_PATH}/test-${testname}"
@@ -299,7 +299,7 @@
       TARGET  sgcheck-${testname}-${instance}
       COMMAND ${test_environment}
               "${VALGRIND_EXECUTABLE}"
-              --tool=sgcheck
+              --tool=exp-ptrcheck
               --log-file="${EXECUTABLE_OUTPUT_PATH}/sgcheck.log.${testname}.${instance}"
               ${test_runner}
               "${EXECUTABLE_OUTPUT_PATH}/test-${testname}"
@@ -315,7 +315,7 @@
       TARGET  bbv-${testname}-${instance}
       COMMAND ${test_environment}
               "${VALGRIND_EXECUTABLE}"
-              --tool=bbv
+              --tool=exp-bbv
               --log-file="${EXECUTABLE_OUTPUT_PATH}/bbv.log.${testname}.${instance}"
               --bb-out-file="${EXECUTABLE_OUTPUT_PATH}/bbv.bb.out.${testname}.${instance}"
               --pc-out-file="${EXECUTABLE_OUTPUT_PATH}/bbv.pc.log.${testname}.${instance}"


frequently changing constants moved to beginning

--- src/PluginConfig.cmake
+++ src/PluginConfig.cmake
@@ -6,20 +6,17 @@
 #\**********************************************************/

 set(PLUGIN_VERSION "0.1.10")
+set(VLC_VERSION "2.1.5")
+set(COPYRIGHT_YEARS "2014")
+
 set(PLUGIN_NAME "WebChimera")
 set(PLUGIN_PREFIX "WebChimera")
 set(PLUGIN_DESCRIPTION "Web Plugin powered by Firebreath/Qt Qml/Vlc")
 set(PRODUCT_NAME "Chimera Web Plugin")
 set(PROJECT_OWNER "Sergey Radionov")
 set(PROJECT_DOMAIN "WebChimera.org")
-set(COPYRIGHT_YEARS "2014")
+
 set(PLUGIN_MIMETYPE "application/x-chimera-plugin")
-
-#if you want embed vlc into FBVLC distribution:
-# 1) place vlc into FBVLC\Win\WiX\vlc-${VLC_VERSION}
-# 2) uncomment following line
-set(VLC_VERSION "2.1.5")
-# 3) run prepXXXX.cmd from FireBreath

 # ActiveX constants:
 set(FBTYPELIB_NAME ${PLUGIN_NAME}Lib)


icmake: minor printing fix

icmake: minor printing fix

--- lib/FindGuile.cmake
+++ lib/FindGuile.cmake
@@ -52,7 +52,7 @@
 	SET(GUILE_VERSION_PATCH 0)

 	IF(NOT EXISTS "${GUILE_INCLUDE_DIR}/libguile/version.h")
-		MESSAGE(FATAL_ERROR "Found libguile.h but not version.h; check your guile installation!")
+		MESSAGE(FATAL_ERROR "Found ${GUILE_INCLUDE_DIR}/libguile.h but not version.h; check your guile installation!")
 	ENDIF(NOT EXISTS "${GUILE_INCLUDE_DIR}/libguile/version.h")

 	# Extract the libguile version from the 'version.h' file


disabled cmake capture again

disabled cmake capture again

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -146,27 +146,18 @@
 IF (EMBREE_TESTING_INTENSITY GREATER 0)
   update_test_models()
 ENDIF()
-ctest_configure(CAPTURE_CMAKE_ERROR capture_configure_error)
-message("test.cmake: ctest_configure error = ${capture_configure_error}")
+ctest_configure()

-ctest_build(RETURN_VALUE retval
-            NUMBER_ERRORS build_errors
-            NUMBER_WARNINGS build_warnings
-	    CAPTURE_CMAKE_ERROR capture_build_error)
+ctest_build(RETURN_VALUE retval)
 message("test.cmake: ctest_build return value = ${retval}")
-message("test.cmake: ctest_build #errors = ${build_errors}")
-message("test.cmake: ctest_build #warnings = ${build_warnings}")
-message("test.cmake: ctest_build error = ${capture_build_error}")

 IF (NOT retval EQUAL 0)
   message(FATAL_ERROR "test.cmake: build failed")
 ENDIF()

 IF (EMBREE_TESTING_INTENSITY GREATER 0 OR EMBREE_TESTING_KLOCWORK)
-  ctest_test(RETURN_VALUE retval
-             CAPTURE_CMAKE_ERROR capture_test_error)
+  ctest_test(RETURN_VALUE retval)
   message("test.cmake: ctest_test return value = ${retval}")
-  message("test.cmake: ctest_test error = ${capture_test_error}")
   IF (NOT retval EQUAL 0)
     message(FATAL_ERROR "test.cmake: some tests failed")
   ENDIF()


COMP: temporarily added vigra and hdf5 to package excludes to unlock dashboard

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -35,6 +35,8 @@
   US_TELEMED_SDK
   videoInput
   WIIMOTE
+  HDF5
+  Vigra
 )

 get_cmake_property(_cache_vars CACHE_VARIABLES)


Took out debug -g from all compiler settings

--- CMakeModules/CompilerSettings.cmake
+++ CMakeModules/CompilerSettings.cmake
@@ -22,7 +22,7 @@
 	SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} /MT")
 ENDIF()

-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

 # Set full rpath http://www.paraview.org/Wiki/CMake_RPATH_handling
 # (good to have and required with ROS)


Prefer FOO_FOUND over Foo_FOUND, as it was previously to fix build

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -173,10 +173,10 @@
 )
 foreach(_dependent ${${UPPER_PROJECT_NAME}_DEPENDENT_LIBRARIES})
   string(TOUPPER ${_dependent} _DEPENDENT)
-  if(${_dependent}_FOUND)
+  if(${_DEPENDENT}_FOUND)
+    set(${_dependent}_name ${_DEPENDENT})
+  elseif(${_dependent}_FOUND)
     set(${_dependent}_name ${_dependent})
-  elseif(${_DEPENDENT}_FOUND)
-    set(${_dependent}_name ${_DEPENDENT})
   endif()
   if(NOT ${_dependent}_name)
     message(FATAL_ERROR "Dependent library ${_dependent} was not properly resolved")


-ENH: update dashboard script for new cluster

--- Testing/Dashboard/pxDashboard_BIGR_linux64_gcc.cmake
+++ Testing/Dashboard/pxDashboard_BIGR_linux64_gcc.cmake
@@ -12,17 +12,17 @@
 # NOTE that Model should directly follow the comma: no space allowed!
 #
 # Setup: linux 64bit
-# gcc 4.1.2 20061115 (prerelease) (SUSE Linux),
-# Release mode, ITK 3.20.0
-# PC: linux cluster at BIGR (SK).
+# gcc 4.4.6 (RedHat Linux),
+# Release mode, ITK 4.1rc01
+# PC: linux cluster2 at BIGR (SK).

 # Client maintainer: s.klein@erasmusmc.nl
 set( CTEST_SITE "BIGR.cluster" )
-set( CTEST_BUILD_NAME "Linux-64bit-gcc4.1.2" )
-#set( CTEST_BUILD_FLAGS "-j2" ) # parallel build for makefiles
+set( CTEST_BUILD_NAME "Linux-64bit-gcc4.4.6" )
+set( CTEST_BUILD_FLAGS "-j3" ) # parallel build for makefiles
 set( CTEST_BUILD_CONFIGURATION Release )
 set( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
-set( CTEST_DASHBOARD_ROOT "/home/sklein/tk/mydash/${CTEST_SCRIPT_NAME}" )
+set( CTEST_DASHBOARD_ROOT "/cm/shared/apps/itktools/nightly" )

 # default: automatically determined
 #set(CTEST_UPDATE_COMMAND /path/to/svn)
@@ -41,7 +41,7 @@

 SET( dashboard_cache "
 // Which ITK to use
-ITK_DIR:PATH=/home/sklein/tk/itk/4.0.0/release
+ITK_DIR:PATH=/cm/shared/apps/itk/4.1rc01/release

 // Some ITKTools settings, defining the configuration
 ITKTOOLS_BUILD_TESTING:BOOL=ON


AD15: module regression test case name change

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -156,7 +156,7 @@
 of_regression_linear("5MW_OC4Semi_Linear"           "openfast;linear;hydrodyn;servodyn")

 # AeroDyn regression tests
-ad_regression("ad_timeseries"                "aerodyn;bem")
+ad_regression("ad_timeseries_shutdown"      "aerodyn;bem")

 # BeamDyn regression tests
 bd_regression("bd_5MW_dynamic"              "beamdyn;dynamic")


implement stripping for client packages

implement stripping for client packages

--- arangosh/install.cmake
+++ arangosh/install.cmake
@@ -2,33 +2,89 @@
 # these are the install targets for the client package.
 # we can't use RUNTIME DESTINATION here.

+set(STRIP_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/strip")
+execute_process(COMMAND mkdir -p ${STRIP_DIR})
+
+set(FILE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGOBENCH}${CMAKE_EXECUTABLE_SUFFIX})
+set(STRIP_FILE ${STRIP_DIR}/${BIN_ARANGOBENCH}${CMAKE_EXECUTABLE_SUFFIX})
+if (NOT MSVC AND CMAKE_STRIP)
+  execute_process(COMMAND "rm" -f ${STRIP_FILE})
+  execute_process(COMMAND "cp" ${FILE} ${STRIP_DIR})
+  execute_process(COMMAND "${CMAKE_STRIP}" ${STRIP_FILE})
+  set(FILE ${STRIP_FILE})
+endif()
 install(
-  PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGOBENCH}${CMAKE_EXECUTABLE_SUFFIX}
+  PROGRAMS ${FILE}
   DESTINATION ${CMAKE_INSTALL_BINDIR})
 install_config(arangobench)

+
+set(FILE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGODUMP}${CMAKE_EXECUTABLE_SUFFIX})
+set(STRIP_FILE ${STRIP_DIR}/${BIN_ARANGODUMP}${CMAKE_EXECUTABLE_SUFFIX})
+if (NOT MSVC AND CMAKE_STRIP)
+  execute_process(COMMAND "rm" -f ${STRIP_FILE})
+  execute_process(COMMAND "cp" ${FILE} ${STRIP_DIR})
+  execute_process(COMMAND "${CMAKE_STRIP}" ${STRIP_FILE})
+  set(FILE ${STRIP_FILE})
+endif()
 install(
-  PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGODUMP}${CMAKE_EXECUTABLE_SUFFIX}
+  PROGRAMS ${FILE}
   DESTINATION ${CMAKE_INSTALL_BINDIR})
 install_config(arangodump)

+
+set(FILE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGOIMP}${CMAKE_EXECUTABLE_SUFFIX})
+set(STRIP_FILE ${STRIP_DIR}/${BIN_ARANGOIMP}${CMAKE_EXECUTABLE_SUFFIX})
+if (NOT MSVC AND CMAKE_STRIP)
+  execute_process(COMMAND "rm" -f ${STRIP_FILE})
+  execute_process(COMMAND "cp" ${FILE} ${STRIP_DIR})
+  execute_process(COMMAND "${CMAKE_STRIP}" ${STRIP_FILE})
+  set(FILE ${STRIP_FILE})
+endif()
 install(
-  PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGOIMP}${CMAKE_EXECUTABLE_SUFFIX}
+  PROGRAMS ${FILE}
   DESTINATION ${CMAKE_INSTALL_BINDIR})
 install_config(arangoimp)

+
+set(FILE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGORESTORE}${CMAKE_EXECUTABLE_SUFFIX})
+set(STRIP_FILE ${STRIP_DIR}/${BIN_ARANGORESTORE}${CMAKE_EXECUTABLE_SUFFIX})
+if (NOT MSVC AND CMAKE_STRIP)
+  execute_process(COMMAND "rm" -f ${STRIP_FILE})
+  execute_process(COMMAND "cp" ${FILE} ${STRIP_DIR})
+  execute_process(COMMAND "${CMAKE_STRIP}" ${STRIP_FILE})
+  set(FILE ${STRIP_FILE})
+endif()
 install(
-  PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGORESTORE}${CMAKE_EXECUTABLE_SUFFIX}
+  PROGRAMS ${FILE}
   DESTINATION ${CMAKE_INSTALL_BINDIR})
 install_config(arangorestore)

+
+set(FILE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGOSH}${CMAKE_EXECUTABLE_SUFFIX})
+set(STRIP_FILE ${STRIP_DIR}/${BIN_ARANGOSH}${CMAKE_EXECUTABLE_SUFFIX})
+if (NOT MSVC AND CMAKE_STRIP)
+  execute_process(COMMAND "rm" -f ${STRIP_FILE})
+  execute_process(COMMAND "cp" ${FILE} ${STRIP_DIR})
+  execute_process(COMMAND "${CMAKE_STRIP}" ${STRIP_FILE})
+  set(FILE ${STRIP_FILE})
+endif()
 install(
-  PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGOSH}${CMAKE_EXECUTABLE_SUFFIX}
+  PROGRAMS ${FILE}
   DESTINATION ${CMAKE_INSTALL_BINDIR})
 install_config(arangosh)

+
+set(FILE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGOVPACK}${CMAKE_EXECUTABLE_SUFFIX})
+set(STRIP_FILE ${STRIP_DIR}/${BIN_ARANGOVPACK}${CMAKE_EXECUTABLE_SUFFIX})
+if (NOT MSVC AND CMAKE_STRIP)
+  execute_process(COMMAND "rm" -f ${STRIP_FILE})
+  execute_process(COMMAND "cp" ${FILE} ${STRIP_DIR})
+  execute_process(COMMAND "${CMAKE_STRIP}" ${STRIP_FILE})
+  set(FILE ${STRIP_FILE})
+endif()
 install(
-  PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_X}/${BIN_ARANGOVPACK}${CMAKE_EXECUTABLE_SUFFIX}
+  PROGRAMS ${FILE}
   DESTINATION ${CMAKE_INSTALL_BINDIR})

 install_command_alias(${BIN_ARANGOSH}


COMP: revert accidental commit (revision #18146)

--- Modules/MitkExt/Testing/files.cmake
+++ Modules/MitkExt/Testing/files.cmake
@@ -1,18 +1,18 @@
 SET(MODULE_TESTS
-  itkGraphCutSegmentationFilterTest.cpp
-  itkImageToTreeFilterTest.cpp
-  itkThreadPoolTest.cpp
+  # itkGraphCutSegmentationFilterTest.cpp
+  # itkImageToTreeFilterTest.cpp
+  # itkThreadPoolTest.cpp
   mitkAutoCropImageFilterTest.cpp
-  mitkClosedSplineTest.cpp
+  # mitkClosedSplineTest.cpp
   mitkContourMapper2DTest.cpp
   mitkContourTest.cpp
   # mitkDataTreeFilterTest.cpp
   # mitkDataTreeTest.cpp
   mitkDemonsRegistrationTest.cpp
   mitkExternalToolsTest.cpp
-  mitkGeometryTest.cpp
+  # mitkGeometryTest.cpp
   mitkHistogramMatchingTest.cpp
-  mitkLabeledImageToSurfaceFilterTest.cpp
+  # mitkLabeledImageToSurfaceFilterTest.cpp
   mitkMeshTest.cpp
   mitkOrganTypePropertyTest.cpp
   mitkPipelineSmartPointerCorrectnessTest.cpp


Makes to work with Awesomiun 1.7 in Linux Ubuntu 13.10

--- modules/FindAwesomium.cmake
+++ modules/FindAwesomium.cmake
@@ -8,6 +8,7 @@
 	~/Library/Frameworks
 	/Library/Frameworks
 	/usr/local/
+	/usr/include/
 	/usr/
 	/sw          # Fink
 	/opt/local/  # DarwinPorts
@@ -15,7 +16,7 @@
 	/opt/)

 find_library(AWESOMIUM_LIBRARY
-	NAMES awesomium
+	NAMES awesomium awesomium-1-7
 	PATH_SUFFIXES lib64 lib build/lib
 	PATHS
 	${AWESOMIUM_ROOT}
@@ -23,6 +24,7 @@
 	~/Library/Frameworks
 	/Library/Frameworks
 	/usr/local/
+	/usr/lib/
 	/usr/
 	/sw          # Fink
 	/opt/local/  # DarwinPorts


cosmetics

cosmetics

--- modules/cblas.cmake
+++ modules/cblas.cmake
@@ -1,6 +1,6 @@
 #.rst:
 #
-# Detect and link to CBLAS. Work in progress.
+# Detect and link to CBLAS.
 #
 # Variables used::
 #
@@ -16,13 +16,12 @@
 #
 #   docopt: --cblas Detect and link to CBLAS [default: False].
 #   define: '-DENABLE_CBLAS=%s' % arguments['--cblas']
-#   fetch: https://raw.githubusercontent.com/scisoft/autocmake/master/modules/detect/detect_libraries.cmake
-#          https://raw.githubusercontent.com/scisoft/autocmake/master/modules/detect/detect_include_files.cmake
+#   fetch: https://github.com/scisoft/autocmake/raw/master/modules/detect/detect_libraries.cmake
+#          https://github.com/scisoft/autocmake/raw/master/modules/detect/detect_include_files.cmake

 option(ENABLE_CBLAS "Detect and link to CBLAS" OFF)

 if(ENABLE_CBLAS)
-
     include(detect_libraries)
     include(detect_include_files)


Fix for cmake-conan issue #225 - Compile error on configuration on MacOS The sysroot option is not set when using `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++`, needs to be added explicitly.

--- conan.cmake
+++ conan.cmake
@@ -264,9 +264,13 @@
         endif()
     endforeach()

+    if(APPLE)
+        set(xcode_sysroot_option "--sysroot=${CMAKE_OSX_SYSROOT}")
+    endif()
+
     execute_process(
         COMMAND ${CMAKE_COMMAND} -E echo "#include <string>"
-        COMMAND ${CMAKE_CXX_COMPILER} -x c++ ${compile_options} -E -dM -
+        COMMAND ${CMAKE_CXX_COMPILER} -x c++ ${xcode_sysroot_option} ${compile_options} -E -dM -
         OUTPUT_VARIABLE string_defines
     )


common/test: running fields test in serial

--- phSolver/common/test/testing.cmake
+++ phSolver/common/test/testing.cmake
@@ -12,7 +12,7 @@
 if(PHASTA_CHEF_ENABLED)
   common_parallel_test(writeReadZeroSz 2 ${CASES}/incompressible
     ${PHASTA_BINARY_DIR}/bin/phIOwriteReadZeroSz  1)
-  common_parallel_test(writeFields 2 ${CASES}/incompressible
+  common_parallel_test(writeFields 1 ${CASES}/incompressible
     ${PHASTA_BINARY_DIR}/bin/phIOwriteFields  1)
 endif()
 common_parallel_test(readIlwork 4


[ioninja] release 3.4.8

[ioninja] release 3.4.8

--- version.cmake
+++ version.cmake
@@ -1,6 +1,6 @@
 set (VERSION_MAJOR     1)
 set (VERSION_MINOR     5)
-set (VERSION_REVISION  7)
+set (VERSION_REVISION  8)
 set (VERSION_TAG)

 set (VERSION_FILE_SUFFIX "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")


cmake: using MD5_INFILE variable instead of ZephyrPackagePath.txt

Running `west zephyr-export` creates an entry in the CMake User package
registry.

During this process, a temporary file `current_path.txt` is created.

This commit ensure the file is removed when no longer needed.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- share/zephyr-package/cmake/zephyr_export.cmake
+++ share/zephyr-package/cmake/zephyr_export.cmake
@@ -34,4 +34,4 @@
   message("~/.cmake/packages/Zephyr\n")
 endif()

-file(REMOVE ${CMAKE_CURRENT_LIST_DIR}/ZephyrPackagePath.txt)
+file(REMOVE ${CMAKE_CURRENT_LIST_DIR}/${MD5_INFILE})


Fix regular dashboard removing version from project name set in CTestConfig

This commit fixes a regression introduced by on 2015-07-09 by merge
commit b15e865 (Merge branch 'ci-support-v2.7.8') integration ebd0ecf (Read
version from python source).

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,4 +1,4 @@
-set(CTEST_PROJECT_NAME "Python27")
+set(CTEST_PROJECT_NAME "Python")
 set(CTEST_NIGHTLY_START_TIME "3:00:00 UTC")

 set(CTEST_DROP_METHOD "http")


Use correct project name in CTestConfig.cmake

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,4 +1,4 @@
-set(CTEST_PROJECT_NAME "MITK")
+set(CTEST_PROJECT_NAME "MITK-superbuild")
 set(CTEST_NIGHTLY_START_TIME "23:00:00 EDT")

 set(CTEST_DROP_METHOD "http")


avoid useless nested ifs

avoid useless nested ifs

--- gtest.cmake
+++ gtest.cmake
@@ -20,10 +20,8 @@
   endforeach()

   set(build_byproducts)
-  if(${CMAKE_VERSION} VERSION_LESS 3.2)
-    if(CMAKE_GENERATOR MATCHES "Ninja")
-      message(WARNING "Building GTest with Ninja has known issues with CMake older than 3.2")
-    endif()
+  if(${CMAKE_VERSION} VERSION_LESS 3.2 AND CMAKE_GENERATOR MATCHES "Ninja")
+    message(WARNING "Building GTest with Ninja has known issues with CMake older than 3.2")
   else()
     set(build_byproducts BUILD_BYPRODUCTS ${byproducts})
   endif()


desable debug info in MSVC when using RelWithDebInfo

--- project/cmake/CompilerOption.cmake
+++ project/cmake/CompilerOption.cmake
@@ -188,7 +188,7 @@
         endif()
         list(APPEND CMAKE_CXX_FLAGS_DEBUG /Od /${CMAKE_MSVC_RUNTIME}d)
         list(APPEND CMAKE_CXX_FLAGS_RELEASE /O2 /${CMAKE_MSVC_RUNTIME} /D NDEBUG)
-        list(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO /O2 /${CMAKE_MSVC_RUNTIME}d)
+        list(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO /O2 /${CMAKE_MSVC_RUNTIME} /D NDEBUG)
         list(APPEND CMAKE_CXX_FLAGS_MINSIZEREL /Ox /${CMAKE_MSVC_RUNTIME} /D NDEBUG)
     endif()


remove "s" from "includes"

remove "s" from "includes"

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

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -48,7 +48,7 @@
     foreach (prefix ${path_prefixes})

         set (includes ${includes}
-            ${prefix}/includes)
+            ${prefix}/include)

         set (libraries ${libraries}
             ${prefix}/lib


Revert to folder specific compilation

Revert to folder specific compilation

--- test/module_test.cmake
+++ test/module_test.cmake
@@ -1,10 +1,15 @@
 # Base test definition
 # Perform code transformation and compare the output with a reference

+set (CPU_DIR __cpu__)
+set (GPU_DIR __gpu__)
+
 # Define input and output file name
-set (ORIGINAL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/original_code.f90)
-set (OUTPUT_FILE_CPU ${CMAKE_CURRENT_SOURCE_DIR}/transformed_code_cpu.f90)
-set (OUTPUT_FILE_GPU ${CMAKE_CURRENT_SOURCE_DIR}/transformed_code_gpu.f90)
+set (ORIGINAL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mo_column.f90)
+set (OUTPUT_FILE_CPU ${CMAKE_CURRENT_SOURCE_DIR}/${CPU_DIR}/transformed_code_cpu.f90)
+set (OUTPUT_FILE_GPU ${CMAKE_CURRENT_SOURCE_DIR}/${GPU_DIR}/transformed_code_gpu.f90)
+set (MAIN_CPU ${CMAKE_CURRENT_SOURCE_DIR}/${CPU_DIR}/main.f90)
+set (MAIN_GPU ${CMAKE_CURRENT_SOURCE_DIR}/${GPU_DIR}/main.f90)
 set (REFERENCE_FILE_CPU ${CMAKE_CURRENT_SOURCE_DIR}/reference_cpu.f90)
 set (REFERENCE_FILE_GPU ${CMAKE_CURRENT_SOURCE_DIR}/reference_gpu.f90)

@@ -24,6 +29,14 @@

 if (NOT EXISTS ${XMOD_DIR})
   file(MAKE_DIRECTORY ${XMOD_DIR})
+endif()
+
+if (NOT EXISTS ${CPU_DIR})
+  file(MAKE_DIRECTORY ${CPU_DIR})
+endif()
+
+if (NOT EXISTS ${GPU_DIR})
+  file(MAKE_DIRECTORY ${GPU_DIR})
 endif()

 # Create intermediate representation in XcodeML Fortran format
@@ -49,6 +62,17 @@
   COMMENT "Translating CLAW directive with ${CLAWFC} for GPU target"
 )

+add_custom_command(
+  OUTPUT  ${MAIN_CPU}
+  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.f90 ${MAIN_CPU}
+  COMMENT "Copy main.f90 to ${MAIN_CPU}"
+)
+add_custom_command(
+  OUTPUT  ${MAIN_GPU}
+  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.f90 ${MAIN_GPU}
+  COMMENT "Copy main.f90 to ${MAIN_GPU}"
+)
+
 # Target for the transformation
 add_custom_target(
   transform-${TEST_NAME}
@@ -69,9 +93,11 @@
 set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${CLAW_TEST_FFP_FLAGS}")

 # Build the original code and the transformed code
-add_executable (${EXECUTABLE_ORIGINAL} EXCLUDE_FROM_ALL "${ORIGINAL_FILE}")
-add_executable (${EXECUTABLE_TRANSFORMED_CPU} EXCLUDE_FROM_ALL "${OUTPUT_FILE_CPU}")
-add_executable (${EXECUTABLE_TRANSFORMED_GPU} EXCLUDE_FROM_ALL "${OUTPUT_FILE_GPU}")
+add_executable (${EXECUTABLE_ORIGINAL} EXCLUDE_FROM_ALL "${ORIGINAL_FILE}" "main.f90")
+add_executable (${EXECUTABLE_TRANSFORMED_CPU} EXCLUDE_FROM_ALL "${OUTPUT_FILE_CPU}" "${CMAKE_CURRENT_SOURCE_DIR}/${CPU_DIR}/main.f90")
+target_compile_definitions(${EXECUTABLE_TRANSFORMED_CPU} PRIVATE -D_CLAW)
+add_executable (${EXECUTABLE_TRANSFORMED_GPU} EXCLUDE_FROM_ALL "${OUTPUT_FILE_GPU}" "${CMAKE_CURRENT_SOURCE_DIR}/${GPU_DIR}/main.f90")
+target_compile_definitions(${EXECUTABLE_TRANSFORMED_GPU} PRIVATE -D_CLAW)

 # Set target specific compilation options
 if(OPENACC_ENABLE)


ADD openthreads to ossim dependency and update cmake flags

--- CMake/External_ossim.cmake
+++ CMake/External_ossim.cmake
@@ -80,12 +80,13 @@
     BUILD_COMMAND ""
     INSTALL_COMMAND "")

-  set(extra_flags  -D__STDC_CONSTANT_MACROS)
+  set(OSSIM_CXX_FLAGS  -D__STDC_CONSTANT_MACROS)
   if(MSVC)
     #checkout cmakeModules
     set(${proj}_DEPENDENCIES ossim_cmakemodules)
+     list(APPEND ${proj}_DEPENDENCIES OPENTHREAD)
     #cmake flags for exception handling in c++
-    #set(extra_flags /EHsc)
+    set(OSSIM_CXX_FLAGS /EHsc)
     #clear all dependent library settings except GEOTIFF as we link with gdal_i.
     #This is because of gisinternals built with internal geotiff
     set(OSSIM_SB_TIFF_CONFIG)
@@ -106,6 +107,7 @@
       -DOSSIM_VERSION:STRING=1.8.18-1
       -DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX}
       -DCMAKE_BUILD_TYPE:STRING=Release
+      -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
       ${OSSIM_SB_TIFF_CONFIG}
       ${OSSIM_SB_GEOTIFF_CONFIG}
       ${OSSIM_SB_GEOS_CONFIG}


SuperBuild: add -system-freetype for QT5 configure step

--- SuperBuild/CMake/External_qt5.cmake
+++ SuperBuild/CMake/External_qt5.cmake
@@ -95,7 +95,7 @@
   -skip qtwinextras  \
   -skip qtx11extras  \
   -skip qtxmlpatterns \
-  -system-libpng -system-libjpeg -system-zlib")
+  -system-libpng -system-libjpeg -system-zlib -system-freetype")
 # "-prefix ${QT4_INSTALL_PREFIX_NATIVE} -L ${QT4_LIB_PREFIX_NATIVE} \
 # -I ${QT4_INCLUDE_PREFIX_NATIVE} -I ${QT4_INCLUDE_FREETYPE_NATIVE} \
 # -opensource -confirm-license -release -shared -nomake demos \


Fix cmake warning for if/else/endif args

--- cmake/common/CommonAPICodeGenCommonConfig.cmake
+++ cmake/common/CommonAPICodeGenCommonConfig.cmake
@@ -43,14 +43,14 @@
         if(IS_ABSOLUTE ${include_path})
             set(FULL_INCLUDE_PATH ${include_path})
         # ... otherwise construct one based on the relative path
-        else(IS_ABSOLUTE)
+        else()
             set(FULL_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/${FRANCA_IDLS_LOCATION}/${include_path})
             # COMMONAPI_INTEGRATION_SYSROOT should be set by e.g. a yocto recipe to point out the
             # location of the build
             if(DEFINED COMMONAPI_INTEGRATION_SYSROOT)
                 set(FULL_INCLUDE_PATH ${COMMONAPI_INTEGRATION_SYSROOT}/${FULL_INCLUDE_PATH})
             endif(DEFINED COMMONAPI_INTEGRATION_SYSROOT)
-        endif(IS_ABSOLUTE)
+        endif()
         file(GLOB FIDL_FILES_HERE ${FULL_INCLUDE_PATH}/*.fidl)
         set(FIDL_FILES "${FIDL_FILES};${FIDL_FILES_HERE}")
     endforeach(include_path)


Remove sugar_target_add_linker_flags [skip ci]

--- cmake/utility/sugar_target_add_linker_flags.cmake
+++ cmake/utility/sugar_target_add_linker_flags.cmake
@@ -1,27 +0,0 @@
-# Copyright (c) 2013, Ruslan Baratov
-# All rights reserved.
-
-include(sugar_add_this_to_sourcelist)
-sugar_add_this_to_sourcelist()
-
-include(sugar_improper_number_of_arguments)
-include(sugar_test_target_exists)
-
-function(sugar_target_add_linker_flags target)
-  sugar_improper_number_of_arguments(${ARGC} 0)
-  sugar_improper_number_of_arguments(${ARGC} 1)
-
-  sugar_test_target_exists(${target})
-
-  set(flags ${ARGV})
-  list(REMOVE_AT flags 0) # remove 'target' variable
-
-  set_property(
-      TARGET
-      ${target}
-      APPEND_STRING
-      PROPERTY
-      LINK_FLAGS
-      " ${flags}"
-  )
-endfunction()


Use q64 with xlc to fix runtime execution of binaries on BG/Q

--- Common.cmake
+++ Common.cmake
@@ -109,6 +109,9 @@
   endif()
 elseif(CMAKE_COMPILER_IS_INTEL)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-unknown-pragmas")
+elseif(CMAKE_COMPILER_IS_XLCXX)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -q64")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -q64")
 endif()

 if(MSVC)


pch changes

pch changes

--- build/build.cmake
+++ build/build.cmake
@@ -50,19 +50,16 @@
 )

 settingsCR(core)
-
+createPCH(core)
+
 target_include_directories(core PUBLIC "${root}/inc")
 target_link_libraries(core PUBLIC
   doctest
   fmt
   function2
+  glm
+  robinmap
   spdlog
-)
-
-target_precompile_headers(core PRIVATE
-    <3rdParty/fmt.h>
-    <3rdParty/function2.h>
-    <3rdParty/spdlog.h>
 )

 ###############################################
@@ -82,6 +79,7 @@
 )

 settingsCR(core_tests)
+createPCH(core_tests)

 target_link_libraries(core_tests
 	doctest


Name cmake plugins the same way as automake ones

--- extras/buildsystem/cmake/include/vlc_module_funcs.cmake
+++ extras/buildsystem/cmake/include/vlc_module_funcs.cmake
@@ -2,17 +2,17 @@

 MACRO(vlc_add_module module_name)
     if(ENABLE_VLC_MODULE_${module_name})
-        add_library( vlc_${module_name} MODULE ${ARGN} )
-       # On win32 we need to have all the symbol resolved at link time
+        add_library( ${module_name}_plugin MODULE ${ARGN} )
+        # On win32 we need to have all the symbol resolved at link time
         if(WIN32)
             set(VLC_${module_name}_LINK_LIBRARIES "VLC_${module_name}_LINK_LIBRARIES libvlc")
         endif(WIN32)
-        set_target_properties( vlc_${module_name} PROPERTIES COMPILE_FLAGS
+        set_target_properties( ${module_name}_plugin PROPERTIES COMPILE_FLAGS
                 "-D__PLUGIN__ -DMODULE_NAME=${module_name} -DMODULE_NAME_IS_${module_name} -I${CMAKE_CURRENT_SOURCE_DIR} ${VLC_${module_name}_COMPILE_FLAG}" )
         if (VLC_${module_name}_LINK_LIBRARIES)
-            target_link_libraries( vlc_${module_name} ${VLC_${module_name}_LINK_LIBRARIES})
+            target_link_libraries( ${module_name}_plugin ${VLC_${module_name}_LINK_LIBRARIES})
         endif (VLC_${module_name}_LINK_LIBRARIES)
-        install_targets(/modules vlc_${module_name})
+        install_targets(/modules ${module_name}_plugin)
     endif(ENABLE_VLC_MODULE_${module_name})
 ENDMACRO(vlc_add_module)

@@ -31,11 +31,11 @@
 ENDMACRO(vlc_disable_modules)

 MACRO(vlc_set_module_properties module_name)
-    set_target_properties(vlc_${module_name} ${ARGN})
+    set_target_properties(${module_name}_plugin ${ARGN})
 ENDMACRO(vlc_set_module_properties)

 MACRO(vlc_set_module_properties module_name)
-    set_target_properties(vlc_${module_name} ${ARGN})
+    set_target_properties(${module_name}_plugin ${ARGN})
 ENDMACRO(vlc_set_module_properties)

 MACRO(vlc_module_add_link_libraries module_name)


增加工具给IMPORTED TARGET打依赖patch

增加工具给IMPORTED TARGET打依赖patch

--- project/cmake/modules/ProjectBuildTools.cmake
+++ project/cmake/modules/ProjectBuildTools.cmake
@@ -363,3 +363,84 @@
         unset(PROTO_SRC_OPTIONS)
     endif ()
 endfunction()
+
+function(project_build_tools_patch_remove_imported_link_interface_libraries TARGET_NAME)
+    get_target_property(OLD_LINK_LIBRARIES ${TARGET_NAME} INTERFACE_LINK_LIBRARIES)
+    set(PROPERTY_NAME "")
+    if (OLD_LINK_LIBRARIES)
+        set(PROPERTY_NAME "INTERFACE_LINK_LIBRARIES")
+    endif ()
+    if (NOT PROPERTY_NAME)
+        get_target_property(OLD_LINK_LIBRARIES ${TARGET_NAME} IMPORTED_LINK_INTERFACE_LIBRARIES)
+        if (OLD_LINK_LIBRARIES)
+            set(PROPERTY_NAME "IMPORTED_LINK_INTERFACE_LIBRARIES")
+        endif ()
+    endif ()
+    if (NOT PROPERTY_NAME)
+        get_target_property(OLD_IMPORTED_CONFIGURATIONS ${TARGET_NAME} IMPORTED_CONFIGURATIONS)
+        get_target_property(OLD_LINK_LIBRARIES ${TARGET_NAME} "IMPORTED_LINK_INTERFACE_LIBRARIES_${OLD_IMPORTED_CONFIGURATIONS}")
+        if (OLD_LINK_LIBRARIES)
+            set(PROPERTY_NAME "IMPORTED_LINK_INTERFACE_LIBRARIES_${OLD_IMPORTED_CONFIGURATIONS}")
+        endif ()
+    endif ()
+    if (PROPERTY_NAME)
+        unset(PATCH_INNER_LIBS)
+        set(PATCH_INNER_ACTIVE FALSE)
+        foreach(DEP_PATH IN LISTS OLD_LINK_LIBRARIES)
+            set(MATCH_ANY_RULES FALSE)
+            foreach(MATCH_RULE ${ARGN})
+                if(DEP_PATH MATCHES ${MATCH_RULE})
+                    set(MATCH_ANY_RULES TRUE)
+                    set(PATCH_INNER_ACTIVE TRUE)
+                    break()
+                endif()
+            endforeach()
+
+            if (NOT MATCH_ANY_RULES)
+                list(APPEND PATCH_INNER_LIBS ${DEP_PATH})
+            endif ()
+        endforeach()
+
+        if (PATCH_INNER_ACTIVE)
+            set_target_properties(${TARGET_NAME} PROPERTIES ${PROPERTY_NAME} "${PATCH_INNER_LIBS}")
+            message(STATUS "Patch Remove: ${PROPERTY_NAME} of ${TARGET_NAME} from ${OLD_LINK_LIBRARIES} to ${PATCH_INNER_LIBS}")
+        endif ()
+    endif ()
+endfunction()
+
+function(project_build_tools_patch_add_imported_link_interface_libraries TARGET_NAME)
+    get_target_property(OLD_LINK_LIBRARIES ${TARGET_NAME} INTERFACE_LINK_LIBRARIES)
+    set(PROPERTY_NAME "")
+    if (OLD_LINK_LIBRARIES)
+        set(PROPERTY_NAME "INTERFACE_LINK_LIBRARIES")
+    endif ()
+    if (NOT PROPERTY_NAME)
+        get_target_property(OLD_LINK_LIBRARIES ${TARGET_NAME} IMPORTED_LINK_INTERFACE_LIBRARIES)
+        if (OLD_LINK_LIBRARIES)
+            set(PROPERTY_NAME "IMPORTED_LINK_INTERFACE_LIBRARIES")
+        endif ()
+    endif ()
+    if (NOT PROPERTY_NAME)
+        get_target_property(OLD_IMPORTED_CONFIGURATIONS ${TARGET_NAME} IMPORTED_CONFIGURATIONS)
+        get_target_property(OLD_LINK_LIBRARIES ${TARGET_NAME} "IMPORTED_LINK_INTERFACE_LIBRARIES_${OLD_IMPORTED_CONFIGURATIONS}")
+        if (OLD_LINK_LIBRARIES)
+            set(PROPERTY_NAME "IMPORTED_LINK_INTERFACE_LIBRARIES_${OLD_IMPORTED_CONFIGURATIONS}")
+        endif ()
+    endif ()
+    if (NOT PROPERTY_NAME)
+        set(PROPERTY_NAME "INTERFACE_LINK_LIBRARIES")
+    endif ()
+
+    if (OLD_LINK_LIBRARIES)
+        set(PATCH_INNER_LIBS ${OLD_LINK_LIBRARIES})
+        list(APPEND PATCH_INNER_LIBS ${ARGN})
+    else ()
+        set(PATCH_INNER_LIBS ${ARGN})
+    endif ()
+    list(REMOVE_DUPLICATES PATCH_INNER_LIBS)
+
+    if (NOT OLD_LINK_LIBRARIES EQUAL PATCH_INNER_LIBS)
+        set_target_properties(${TARGET_NAME} PROPERTIES ${PROPERTY_NAME} "${PATCH_INNER_LIBS}")
+        message(STATUS "Patch Add: ${PROPERTY_NAME} of ${TARGET_NAME} from ${OLD_LINK_LIBRARIES} to ${PATCH_INNER_LIBS}")
+    endif ()
+endfunction()


cmake-modules:
 * FindThirdPartyMatlab.cmake : minor update in the message status when a matlab 64 bits is installed on windows (uncompatibility issue).

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3270 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyMatlab.cmake
+++ trunk/cmake-modules/FindThirdPartyMatlab.cmake
@@ -55,7 +55,7 @@
 	IF(Matlab_LIB_FOUND)
 		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyMatlab)
 	ELSE(Matlab_LIB_FOUND)
-		MESSAGE(STATUS "  FAILED to find Matlab Libs, the plugins won't be built.")
+		MESSAGE(STATUS "  FAILED to find Matlab Libs, the plugins won't be built. Please ensure you have a valid MATLAB installation (32 bits only).")
 	ENDIF(Matlab_LIB_FOUND)
 ELSE(Matlab_FOUND)
 	MESSAGE(STATUS "  FAILED to find Matlab...")


[FIX] FindLEMON now also evaluate environment variable LEMON_ROOT_DIR.

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

--- extras/apps/breakpoint_calculator/FindLEMON.cmake
+++ extras/apps/breakpoint_calculator/FindLEMON.cmake
@@ -6,12 +6,14 @@
 FIND_PATH(LEMON_INCLUDE_DIR
   lemon/core.h
   HINTS ${LEMON_ROOT_DIR}/include
+        $ENV{LEMON_ROOT_DIR}/include
         "C:/Program Files/LEMON/include"

 )
 FIND_LIBRARY(LEMON_LIBRARY
   NAMES lemon emon
   HINTS ${LEMON_ROOT_DIR}/lib
+        $ENV{LEMON_ROOT_DIR}/lib
         "C:/Program Files/LEMON/lib"

 )


cmake: DT: Introduce 'DT_' symbols into the CMake namespace

CMake parses the Kconfig output for 'CONFIG_*' symbols and adds them
to the CMake namespace.

It does the same for DT, but has only been including 'CONFIG_' symbols
and been ignoring the 'DT_' symbols.

For DeviceTree to be useful, it's information needs to be accessible
from CMake, just like Kconfig is.

To this end we also introduce the 'DT_' symbols into the CMake
namespace.

This resolves #11109

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/dts.cmake
+++ cmake/dts.cmake
@@ -194,6 +194,7 @@
   endif()

   import_kconfig(CONFIG_ ${GENERATED_DTS_BOARD_CONF})
+  import_kconfig(DT_     ${GENERATED_DTS_BOARD_CONF})

 else()
   file(WRITE ${GENERATED_DTS_BOARD_H} "/* WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY! */")


Update RPi toolchain to require GCC 4.9

Update RPi toolchain to require GCC 4.9

--- toolchains/raspberrypi.cmake
+++ toolchains/raspberrypi.cmake
@@ -10,8 +10,8 @@
 execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)

 if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
-	if(NOT (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8))
-		message(FATAL_ERROR "Please install g++ version 4.8 or greater")
+	if(NOT (GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9))
+		message(FATAL_ERROR "Please install g++ version 4.9 or greater")
 	else()
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 	endif()


Configure raspberry pi build to use c++14

--- toolchains/raspberrypi.cmake
+++ toolchains/raspberrypi.cmake
@@ -13,10 +13,10 @@
 	if(NOT (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8))
 		message(FATAL_ERROR "Please install g++ version 4.8 or greater")
 	else()
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
 	endif()
 else()
-	message(FATAL_ERROR "Please install a C++11 compatible compiler")
+	message(FATAL_ERROR "Please install a C++14 compatible compiler")
 endif()

 # add sources and include headers


Remove -std=c++11 from cxx flags passed to capnproto build since it defines its own already.

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -37,10 +37,10 @@
   # Build Cap'n Proto from source.
   if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(CAPNP_DEFINITIONS "-DCAPNP_LITE=1")
-    set(CAPNP_CXX_FLAGS "-std=c++11 -m${BITNESS}")
+    set(CAPNP_CXX_FLAGS "-m${BITNESS}")
   else()
     set(CAPNP_DEFINITIONS "-DCAPNP_LITE=0")
-    set(CAPNP_CXX_FLAGS "-fPIC -std=c++11 -m${BITNESS}")
+    set(CAPNP_CXX_FLAGS "-fPIC -m${BITNESS}")
   endif()
   ExternalProject_Add(
     CapnProto


Remove lines that cause failure when capnp is used from system location.

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -30,8 +30,6 @@
   find_library(LIB_CAPNPC ${STATIC_PRE}capnpc${STATIC_SUF})
   set(CAPNP_LIBRARIES ${LIB_CAPNPC} ${LIB_CAPNP} ${LIB_KJ})
   set(CAPNP_LIBRARIES_LITE ${LIB_CAPNP} ${LIB_KJ})
-  set(CAPNP_EXECUTABLE ${BIN_PRE}/capnp${CMAKE_EXECUTABLE_SUFFIX})
-  set(CAPNPC_CXX_EXECUTABLE ${BIN_PRE}/capnpc-c++${CMAKE_EXECUTABLE_SUFFIX})
 endif ()

 if (NOT CAPNP_FOUND)


FindCyclus.cmake now uses 'cyclus --install-path' if cyclus bin is in PATH

--- cmake/FindCyclus.cmake
+++ cmake/FindCyclus.cmake
@@ -16,7 +16,14 @@
     MESSAGE(STATUS "\t\tThe environment variable CYCLUS_ROOT_DIR: $ENV{CYCLUS_ROOT_DIR}")
   ENDIF(NOT DEFINED CYCLUS_ROOT_DIR)
 ELSE(DEFINED ENV{CYCLUS_ROOT_DIR})
-  SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
+  FIND_PROGRAM(CYCLUS_BIN cyclus)
+  IF(CYCLUS_BIN)
+    EXECUTE_PROCESS(COMMAND cyclus --install-path
+                    OUTPUT_VARIABLE CYCLUS_ROOT_DIR
+                    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  ELSE(CYCLUS_BIN)
+    SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
+  ENDIF(CYCLUS_BIN)
 ENDIF(DEFINED ENV{CYCLUS_ROOT_DIR})

 # Let the user know if we're using a hint


Fix CMake error (missing quotes, thx to Gerhard)

--- cmake/SuperBuild.cmake
+++ cmake/SuperBuild.cmake
@@ -182,7 +182,7 @@
    )

-install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/netgen)")
+install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build . --target install --config ${CMAKE_BUILD_TYPE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/netgen)")

 add_custom_target(test_netgen
   ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/netgen


cmake: allow binary directory to be specified

Extend the add_subdirectory_ifdef extension to allow specifying
the binary directory.

Signed-off-by: Rafał Kuźnia <2e7ab041a15fd1b2ee150a94889a37d823e289e8@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -1311,9 +1311,9 @@
 # ifdef functions are added on an as-need basis. See
 # https://cmake.org/cmake/help/latest/manual/cmake-commands.7.html for
 # a list of available functions.
-function(add_subdirectory_ifdef feature_toggle dir)
+function(add_subdirectory_ifdef feature_toggle source_dir)
   if(${${feature_toggle}})
-    add_subdirectory(${dir})
+    add_subdirectory(${source_dir} ${ARGN})
   endif()
 endfunction()