cmake(dotnet): try to fix build on windows

--- cmake/dotnet.cmake
+++ cmake/dotnet.cmake
@@ -132,6 +132,17 @@
   WORKING_DIRECTORY dotnet
   )

+if(WIN32)
+add_custom_command(
+  OUTPUT dotnet/${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.targets
+  COMMAND ${CMAKE_COMMAND} -E make_directory ${OR_TOOLS_DOTNET_NATIVE}
+  COMMAND ${CMAKE_COMMAND} -E copy
+    ${PROJECT_SOURCE_DIR}/ortools/dotnet/${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.targets
+    ${OR_TOOLS_DOTNET_NATIVE}/${OR_TOOLS_DOTNET_NATIVE}.targets
+  WORKING_DIRECTORY dotnet
+  )
+endif()
+
 add_custom_target(dotnet_native ALL
   DEPENDS
     dotnet/or-tools.snk


Updating ITK with some bug fixes

Updating ITK with some bug fixes

Change-Id: I220c71445691d5fc620379a869692d5e9c7d7304

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -26,7 +26,8 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the
-set(ITK_TAG_COMMAND GIT_TAG v4.4.2
+# update a couple patches passed v4.2.2
+set(ITK_TAG_COMMAND GIT_TAG de5a85d85f896c57fbdd99e5ac13ad592f25b553
  )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )


Update superbuild ITK version to 4.12 release candidate 1

SimpleITK is currently building fine against 4.11 and 4.12 rc with
out changes.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -45,7 +45,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG v4.11.1) # v4.11.1 tag
+set(ITK_TAG_COMMAND GIT_TAG v4.12rc01) # v4.12 Release Candidate

 if( ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


Allow setting arch to conan_cmake_settings

--- conan.cmake
+++ conan.cmake
@@ -69,6 +69,7 @@

     message(STATUS "Conan ** WARNING** : This detection of settings from cmake is experimental and incomplete. "
                     "Please check 'conan.cmake' and contribute")
+    set(arch "${ARGN}")

     if(CONAN_CMAKE_MULTI)
         set(_SETTINGS -g cmake_multi)
@@ -107,6 +108,10 @@
         set(USING_CXX 0)
     else ()
         message(FATAL_ERROR "Conan: Neither C or C++ was detected as a language for the project. Unabled to detect compiler version.")
+    endif()
+
+    if(arch)
+        set(_SETTINGS ${_SETTINGS} -s arch=${arch})
     endif()

     if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU)
@@ -164,15 +169,17 @@
             set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=${_VISUAL_VERSION})
         endif()

-        if (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "64")
-            set(_SETTINGS ${_SETTINGS} -s arch=x86_64)
-        elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "^ARM")
-            message(STATUS "Conan: Using default ARM architecture from MSVC")
-            set(_SETTINGS ${_SETTINGS} -s arch=armv6)
-        elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "86")
-            set(_SETTINGS ${_SETTINGS} -s arch=x86)
-        else ()
-            message(FATAL_ERROR "Conan: Unknown MSVC architecture [${MSVC_${LANGUAGE}_ARCHITECTURE_ID}]")
+        if(NOT arch)
+            if (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "64")
+                set(_SETTINGS ${_SETTINGS} -s arch=x86_64)
+            elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "^ARM")
+                message(STATUS "Conan: Using default ARM architecture from MSVC")
+                set(_SETTINGS ${_SETTINGS} -s arch=armv6)
+            elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "86")
+                set(_SETTINGS ${_SETTINGS} -s arch=x86)
+            else ()
+                message(FATAL_ERROR "Conan: Unknown MSVC architecture [${MSVC_${LANGUAGE}_ARCHITECTURE_ID}]")
+            endif()
         endif()

         conan_cmake_detect_vs_runtime(_vs_runtime)
@@ -239,7 +246,7 @@

 macro(parse_arguments)
   set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS)
-  set(oneValueArgs CONANFILE DEBUG_PROFILE RELEASE_PROFILE PROFILE)
+  set(oneValueArgs CONANFILE DEBUG_PROFILE RELEASE_PROFILE PROFILE ARCH)
   set(multiValueArgs REQUIRES OPTIONS IMPORTS BUILD CONAN_COMMAND)
   cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
 endmacro()
@@ -369,12 +376,12 @@
         conan_cmake_setup_conanfile(${ARGV})
         if(CONAN_CMAKE_MULTI)
             foreach(CMAKE_BUILD_TYPE "Release" "Debug")
-                conan_cmake_settings(settings)
+                conan_cmake_settings(settings ${ARGUMENTS_ARCH})
                 conan_cmake_install(SETTINGS ${settings} ${ARGV})
             endforeach()
             set(CMAKE_BUILD_TYPE)
         else()
-            conan_cmake_settings(settings)
+            conan_cmake_settings(settings ${ARGUMENTS_ARCH})
             conan_cmake_install(SETTINGS ${settings} ${ARGV})
         endif()
     endif()


fixed conan_check VERSION cmake regex backslash escape issue, #246

--- conan.cmake
+++ conan.cmake
@@ -537,7 +537,7 @@
     message(STATUS "Conan: Version found ${CONAN_VERSION_OUTPUT}")

     if(DEFINED CONAN_VERSION)
-        string(REGEX MATCH ".*Conan version ([0-9]+\.[0-9]+\.[0-9]+)" FOO
+        string(REGEX MATCH ".*Conan version ([0-9]+\\.[0-9]+\\.[0-9]+)" FOO
             "${CONAN_VERSION_OUTPUT}")
         if(${CMAKE_MATCH_1} VERSION_LESS ${CONAN_VERSION})
             message(FATAL_ERROR "Conan outdated. Installed: ${CMAKE_MATCH_1}, \


Split off 7.6.48

Split off 7.6.48

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

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


Split off 7.10.14

Split off 7.10.14

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

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


Split off 8.4.62

Split off 8.4.62

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

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


Adding label to gtests

Adding label to gtests

--- AddGTest.cmake
+++ AddGTest.cmake
@@ -68,4 +68,5 @@

   add_test(cxx_${name} ${EXECUTABLE_OUTPUT_PATH}/test_${name}
               --gtest_output=xml:${CMAKE_BINARY_DIR}/test-results/test_${name}.xml)
+  set_tests_properties(cxx_${name} PROPERTIES LABELS "gtest")
 endmacro()


Fix cmake/FindAVX.cmake

Fix cmake/FindAVX.cmake

--- cmake/FindAVX.cmake
+++ cmake/FindAVX.cmake
@@ -59,7 +59,7 @@
     ENDIF()
 ENDIF()

-IF(${FIND_AVX_10} OR ${FIND_AVX_20})
+IF("${FIND_AVX_10}" OR "${FIND_AVX_20}")
     SET(AVX_FOUND TRUE)
     MESSAGE(STATUS "Find CPU supports ${AVX_FLAGS}.")
-ENDIF()+ENDIF()


Fix qt_transform_sources (it was broken and ignoring some files), and enhance it with source groupings for better IDE usage as well.

--- cmake/QtUtils.cmake
+++ cmake/QtUtils.cmake
@@ -1,32 +1,56 @@
 function(qt_transform_sources output_var sources)
     # include output directory for the *_ui.h files
     include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+    # We use this variable to toggle moc processing on and off
+    set(QtUtils_DO_MOC ON)

     # If using Qt, runs rcc, uic, moc and lrelease and populates final_sources
     # with the list of actual source files to compile - if not using
     # Qt we'll simply get all files not ending with .qrc, .ui, .h or .ts
     foreach(file ${sources})
-        if(QT4_FOUND AND ${file} MATCHES "^(.*).qrc$")
-            qt4_add_resources(outfile ${file}) # rcc
-            get_filename_component(outfile_name "${outfile}" NAME)
-            message("Generating ${outfile_name}")
-        elseif(QT4_FOUND AND ${file} MATCHES "^(.*).ui$")
-            qt4_wrap_ui(outfile ${file}) # uic
-            get_filename_component(outfile_name "${outfile}" NAME)
-            message("Generating ${outfile_name}")
-        elseif(QT4_FOUND AND ${file} MATCHES "^(.*).ts$")
-            qt4_add_translation(outfile ${file})
-            get_filename_component(outfile_name "${outfile}" NAME)
-            message("Generating ${outfile_name}")
-        elseif(QT4_FOUND AND ${file} MATCHES "^(.*).h$")
-            qt4_wrap_cpp(outfile ${file}) # moc
-            get_filename_component(outfile_name "${outfile}" NAME)
-            message("Generating ${outfile_name}")
+        if("${file}" STREQUAL "<")
+            set(QtUtils_DO_MOC OFF)
+        elseif("${file}" STREQUAL ">")
+            set(QtUtils_DO_MOC ON)
         else()
-            set(outfile "${file}")
+            list(APPEND final_sources "${file}")
         endif()

-        list(APPEND final_sources "${outfile}")
+        if("${file}" MATCHES "(.*)\\.(rc|manifest|plist|desktop)$")
+            source_group("Resources" FILES "${file}")
+        elseif("${file}" MATCHES "(.*)\\.(icns|ico)$")
+            source_group("Resources\\Icons" FILES "${file}")
+        elseif("${file}" MATCHES "(.*)\\.(png|jpg|jpeg|gif|tif|tiff|svg)$")
+            source_group("Resources\\Images" FILES "${file}")
+        elseif("${file}" MATCHES "(.*)\\.(txt|rtf|pdf)$" AND NOT "${file}" STREQUAL "CMakeLists.txt")
+            source_group("Resources\\Other" FILES "${file}")
+        elseif(QT4_FOUND AND "${file}" MATCHES "(.*)\\.qrc$")
+            qt4_add_resources(outfile "${file}")
+            source_group("Qt Resources" FILES "${file}")
+        elseif(QT4_FOUND AND "${file}" MATCHES "(.*)\\.ui$")
+            qt4_wrap_ui(outfile "${file}")
+            source_group("Qt Forms" FILES "${file}")
+        elseif(QT4_FOUND AND "${file}" MATCHES "(.*)\\.ts$")
+            qt4_add_translation(outfile "${file}")
+            source_group("Qt Translations" FILES "${file}")
+        elseif(QT4_FOUND AND "${file}" MATCHES "(.*)\\.h$" AND QtUtils_DO_MOC)
+            qt4_wrap_cpp(outfile "${file}")
+        endif()
+
+        # If we generated anything this round...
+        if(outfile)
+            list(APPEND final_sources "${outfile}")
+
+            # Don't quote outfile because it's a list containing
+            # the same filename twice (odd, I know...)
+            source_group("Generated Files" FILES ${outfile})
+
+            if(QtUtils_VERBOSE)
+                get_filename_component(outfile_name "${outfile}" NAME)
+                message("Generated ${outfile_name}")
+            endif()
+        endif()
     endforeach()

     # Sets the final_sources var to the parent scope so we can


FindTBB: fix up typo'd logic

FindTBB: fix up typo'd logic

Change-Id: Ieb2678947ab3773968091cf3714a4d76b41d3793

--- CMake/FindTBB.cmake
+++ CMake/FindTBB.cmake
@@ -92,12 +92,12 @@
         #       that user's setting of variables should be ignored.
         if(NOT TBB_COMPILER)
             set(_TBB_COMPILER "cc4.0.1_os10.4.9")
-        elseif (NOT TBB_COMPILER)
+        else ()
             set(_TBB_COMPILER ${TBB_COMPILER})
         endif()
         if(NOT TBB_ARCHITECTURE)
             set(_TBB_ARCHITECTURE "ia32")
-        elseif(NOT TBB_ARCHITECTURE)
+        else()
             set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
         endif()
     else ()


fixed cmake error, because of missing remove of variant_test.h

--- src/unit_tests/unit_tests.cmake
+++ src/unit_tests/unit_tests.cmake
@@ -31,7 +31,6 @@
                  test_method_reflection.h
                  test_property_reflection.h
                  test_type.h
-                 variant/test_variant.h
                  version.rc.in
                  )


Make it a function.

Make it a function.

	* build-aux/cmake/modules/Tools.cmake (xml_escape): Here.

--- build-aux/cmake/modules/Tools.cmake
+++ build-aux/cmake/modules/Tools.cmake
@@ -205,12 +205,13 @@
     configure_file(${in} ${out} ${${in}_OPTIONS})
   endfunction(configure_file_with_native_paths)

-  macro(xml_escape in)
+  # Escape XML code in _in_. Store the result in _in_.
+  function(xml_escape in)
     set(variable ${${in}})
     string(REPLACE "<" "<" variable "${variable}")
     string(REPLACE ">" ">" variable "${variable}")
     string(REPLACE "\"" """ variable "${variable}")
-    set(${in} "${variable}")
-  end(xml_escape)
+    set(${in} "${variable}" PARENT_SCOPE)
+  endfunction(xml_escape)

 endif(NOT TOOLS_CMAKE_GUARD)


Correct tbb detection procedure

Correct tbb detection procedure

--- adm_local/cmake_files/FindTBB.cmake
+++ adm_local/cmake_files/FindTBB.cmake
@@ -39,7 +39,7 @@
   LIST(APPEND CMAKE_PREFIX_PATH "${TBB_ROOT_DIR}")
 ENDIF(TBB_ROOT_DIR)

-FIND_PATH(TBB_INCLUDE_DIRS tbb.h PATH_SUFFIXES "include/tbb")
+FIND_PATH(TBB_INCLUDE_DIRS tbb/tbb.h PATH_SUFFIXES include)

 SET(TBBKERNEL cc4.1.0_libc2.4_kernel2.6.16.21)

@@ -58,4 +58,4 @@
 )

 INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB REQUIRED_VARS TBB_INCLUDE_DIRS TBB_LIBRARY_tbb TBB_LIBRATY_tbbmalloc)+FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB REQUIRED_VARS TBB_INCLUDE_DIRS TBB_LIBRARY_tbb TBB_LIBRATY_tbbmalloc)


Investigating bug on cluster

Investigating bug on cluster

Former-commit-id: 960228944f10cb879dc9c1faa36d67690d29873f

--- cmake-modules/Fetch_Arpack-ng.cmake
+++ cmake-modules/Fetch_Arpack-ng.cmake
@@ -83,6 +83,8 @@
     set(ARPACK_INCLUDE_DIRS ${INSTALL_DIR}/include)
     add_library(arpack INTERFACE)
     add_dependencies(arpack external_ARPACK)
+    message(STATUS "ARPACK_LIBRARIES   :  ${ARPACK_LIBRARIES}")
+    message(STATUS "ARPACK_INCLUDE_DIRS:  ${ARPACK_INCLUDE_DIRS}")
     target_link_libraries(arpack INTERFACE ${ARPACK_LIBRARIES})
     target_link_libraries(arpack INTERFACE blas lapack gfortran)
     target_include_directories(arpack INTERFACE ${ARPACK_INCLUDE_DIRS})


Fixed ordering of opencv libs

Fixed ordering of opencv libs

--- cmake/CMakeModules/FindOpenCV.cmake
+++ cmake/CMakeModules/FindOpenCV.cmake
@@ -50,14 +50,15 @@
 FIND_OPENCV_LIBRARY(OPENCV_VIDEO_LIBRARY opencv_video)

 set(OPENCV_LIBRARIES ${OPENCV_OBJDETECT_LIBRARY}
-        ${OPENCV_CORE_LIBRARY}
+        ${OPENCV_VIDEO_LIBRARY}
+        ${OPENCV_PHOTO_LIBRARY}
+        ${OPENCV_ML_LIBRARY}
+        ${OPENCV_IMGPROC_LIBRARY}
+        ${OPENCV_FLANN_LIBRARY}
         ${OPENCV_FEATURES2D_LIBRARY}
         ${OPENCV_XFEATURES2D_LIBRARY}
-        ${OPENCV_FLANN_LIBRARY}
-        ${OPENCV_IMGPROC_LIBRARY}
-        ${OPENCV_ML_LIBRARY}
-        ${OPENCV_PHOTO_LIBRARY}
-        ${OPENCV_VIDEO_LIBRARY})
+        ${OPENCV_CORE_LIBRARY}
+        )

 set(OPENCV_FOUND "NO")
 if ( OPENCV_INCLUDE_DIR AND


[cmake] include eigen as system header

[cmake] include eigen as system header

--- cmake/modules/DuneStuffMacros.cmake
+++ cmake/modules/DuneStuffMacros.cmake
@@ -92,7 +92,7 @@

 pkg_check_modules(EIGEN eigen3)
 if(EIGEN_FOUND)
-  include_directories(${EIGEN_INCLUDE_DIRS})
+  include_sys_dir(${EIGEN_INCLUDE_DIRS})
 endif(EIGEN_FOUND)

 # include(FindFASP)
@@ -142,4 +142,4 @@
     else()
         message(WARNING "not adding analyze target because clang-check is missing")
     endif(EXISTS ${ANALYZER})
-endmacro(add_analyze)+endmacro(add_analyze)


update so archive name matches version name in libtommath

--- cmake/projects/tommath/hunter.cmake
+++ cmake/projects/tommath/hunter.cmake
@@ -15,9 +15,9 @@
     VERSION
     "1.0-p1"
     URL
-    "https://github.com/hunter-packages/libtommath/archive/v1.0-hunter.tar.gz"
+    "https://github.com/hunter-packages/libtommath/archive/v1.0-p1.tar.gz"
     SHA1
-    c8d8f850ce0d76ba9b1eb295f4842cc94a566d1c
+    e110b66e1900b0b7a4300d155fb233c729fb208f
 )

 # Pick a download scheme


Adde version support in the FindICU Windows proxy cmake module.

--- cmake_modules/Windows/FindICU.cmake
+++ cmake_modules/Windows/FindICU.cmake
@@ -31,7 +31,38 @@

 FIND_PACKAGE_WIN32 (ICU icu)

+
+#Find ICU version
+FIND_FILE (
+  ICU_INFO_EXE
+  icuinfo.exe
+  PATHS "${CMAKE_PREFIX_PATH}"
+  PATH_SUFFIXES "bin"
+  NO_DEFAULT_PATH
+)
+
+EXECUTE_PROCESS (COMMAND "${ICU_INFO_EXE}" OUTPUT_VARIABLE INFO)
+STRING (REGEX REPLACE "\n" ";" LINES ${INFO})
+FOREACH (LINE ${LINES})
+  IF (LINE MATCHES "Runtime-Version: ")
+    STRING (REPLACE "Runtime-Version: " "" VERSION ${LINE})
+  ENDIF (LINE MATCHES "Runtime-Version: ")
+ENDFOREACH (LINE)
+
+STRING (REPLACE "." ";" PARTS ${VERSION})
+
+LIST (GET PARTS 0 MAJOR_VERSION)
+LIST (GET PARTS 1 MINOR_VERSION)
+SET (DLL_VERSION "${MAJOR_VERSION}${MINOR_VERSION}")
+
+SET (DLL_NAMES
+  "icudt${DLL_VERSION}.dll"
+  "icuin${DLL_VERSION}.dll"
+  "icuuc${DLL_VERSION}.dll"
+)
+
+
 # Find the needed DLL's
 IF (ICU_FOUND)
-  FIND_PACKAGE_DLLS_WIN32 ("icudt44.dll;icuin44.dll;icuuc44.dll")
+  FIND_PACKAGE_DLLS_WIN32 ("${DLL_NAMES}")
 ENDIF (ICU_FOUND)


Fix cpu architecture detection.

Fix cpu architecture detection.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -1,5 +1,6 @@
 if(UNIX)
     # 3.1: Required by CTEST_COVERAGE_EXTRA_FLAGS and CTEST_UPDATE_VERSION_ONLY
+    # 3.7: Required by GREATER_EQUAL
     # 3.8: Required by fixed CTEST_MEMORYCHECK_SANITIZER_OPTIONS
     cmake_minimum_required(VERSION 3.8)
 else()
@@ -24,7 +25,6 @@
             set(CC_NAME "icc")
             exec_program($ENV{CC} ARGS -dumpversion OUTPUT_VARIABLE CC_VERSION)
             exec_program($ENV{CC} ARGS -dumpmachine OUTPUT_VARIABLE CC_ARCH)
-            string(STRIP "-pc-linux-gnu" CC_ARCH)
         elseif(CC STREQUAL "tcc")
             set(CC_NAME "tcc")
             exec_program($ENV{CC} ARGS -v OUTPUT_VARIABLE CC_VERSION)
@@ -38,8 +38,6 @@
                 string(SUBSTRING "${CC_VERSION}" 0 3 CC_VERSION)
             endif()
             exec_program($ENV{CC} ARGS -dumpmachine OUTPUT_VARIABLE CC_ARCH)
-            string(STRIP "-w64-mingw32.static" CC_ARCH)
-            string(STRIP "-w64-mingw32" CC_ARCH)
             #Warmup wine or test timings are going to be wrong
             exec_program(wine ARGS version OUTPUT_VARIABLE WINE_VERSION)
         elseif(CC STREQUAL "emcc")
@@ -58,7 +56,6 @@
                     string(SUBSTRING "${CC_VERSION}" 0 3 CC_VERSION)
                 endif()
                 exec_program($ENV{CC} ARGS -dumpmachine OUTPUT_VARIABLE CC_ARCH)
-                string(STRIP "-unknown-linux-gnu" CC_ARCH)
             endif()
             string(SUBSTRING "$ENV{CC}" 0 5 CC)
             if(CC STREQUAL "clang")
@@ -72,7 +69,6 @@
                     string(REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CC_VERSION ${CC_VERSION})
                 endif()
                 exec_program($ENV{CC} ARGS -dumpmachine OUTPUT_VARIABLE CC_ARCH)
-                string(STRIP "-unknown-linux-gnu" CC_ARCH)
             endif()
         endif()
     else()
@@ -80,11 +76,15 @@
         exec_program(${CC_NAME} ARGS -dumpversion OUTPUT_VARIABLE CC_VERSION)
         string(SUBSTRING "${CC_VERSION}" 0 3 CC_VERSION)
         exec_program($ENV{CC_NAME} ARGS -dumpmachine OUTPUT_VARIABLE CC_ARCH)
-        string(STRIP "-unknown-linux-gnu" CC_ARCH)
-    endif()
-    if(${CC_ARCH} STREQUAL "x86_64" OR ${CC_ARCH} STREQUAL "amd64")
+    endif()
+    string(FIND CC_ARCH "x86_64" CC_ARCH_X86_64)
+    string(FIND CC_ARCH "amd64" CC_ARCH_AMD64)
+    string(FIND CC_ARCH "i586" CC_ARCH_I586)
+    string(FIND CC_ARCH "i686" CC_ARCH_I686)
+    string(FIND CC_ARCH "i786" CC_ARCH_I786)
+    if(CC_ARCH_AMD64 GREATER_EQUAL 0 OR CC_ARCH_AMD64 GREATER_EQUAL 0)
         set(CC_ARCH "x86_64")
-    elseif(${CC_ARCH} STREQUAL "i386" OR ${CC_ARCH} STREQUAL "i486" OR ${CC_ARCH} STREQUAL "i586" OR ${CC_ARCH} STREQUAL "i686" OR ${CC_ARCH} STREQUAL "i786")
+    elseif(CC_ARCH_I586 GREATER_EQUAL 0 OR CC_ARCH_I686 GREATER_EQUAL 0 OR CC_ARCH_I786 GREATER_EQUAL 0)
         set(CC_ARCH "x86")
     endif()
 else()


automatically setting to release config

automatically setting to release config

--- CMake/BuildConfigurations/DiffusionRelease.cmake
+++ CMake/BuildConfigurations/DiffusionRelease.cmake
@@ -30,8 +30,10 @@
 set(MITK_DOXYGEN_GENERATE_QCH_FILES ON CACHE BOOL "Use doxygen to generate Qt compressed help files for MITK docs" FORCE)
 set(BLUEBERRY_USE_QT_HELP ON CACHE BOOL "Enable support for integrating bundle documentation into Qt Help" FORCE)

-# Disable console window
+# Enable console window
 set(MITK_SHOW_CONSOLE_WINDOW ON CACHE BOOL "Use this to enable or disable the console window when starting MITK GUI Applications" FORCE)
+
+set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)

 # Activate required plugins
 # should be identical to the list in /Applications/Diffusion/CMakeLists.txt


fix hardcoded variable name

fix hardcoded variable name

--- FindICU.cmake
+++ FindICU.cmake
@@ -216,14 +216,14 @@
             ${ICU_PRIVATE_VAR_NS}_LIB_RELEASE_${${ICU_PRIVATE_VAR_NS}_COMPONENT}
             NAMES ${${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES}
             HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT}
-            PATH_SUFFIXES ${_ICU_LIB_SUFFIXES}
+            PATH_SUFFIXES ${${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES}
             DOC "Release libraries for ICU"
         )
         find_library(
             ${ICU_PRIVATE_VAR_NS}_LIB_DEBUG_${${ICU_PRIVATE_VAR_NS}_COMPONENT}
             NAMES ${${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES}
             HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT}
-            PATH_SUFFIXES ${_ICU_LIB_SUFFIXES}
+            PATH_SUFFIXES ${${ICU_PRIVATE_VAR_NS}_LIB_SUFFIXES}
             DOC "Debug libraries for ICU"
         )


Bump version for -bindings changes

Bump version for -bindings changes

--- VERSION.cmake
+++ VERSION.cmake
@@ -46,6 +46,6 @@

 SET(LIBSATSOLVER_MAJOR "0")
 SET(LIBSATSOLVER_MINOR "16")
-SET(LIBSATSOLVER_PATCH "2")
+SET(LIBSATSOLVER_PATCH "3")

 # last released 0.16.0


fptu: pull erthink devel-upstream.

fptu: pull erthink devel-upstream.

Merge commit '06d9464bb7bb9b4e7ba4bf63fef6063e2fed4ac6' into devel

--- fast_positive/details/erthink/cmake/compiler.cmake
+++ fast_positive/details/erthink/cmake/compiler.cmake
@@ -172,19 +172,6 @@
   # GCC started to warn for unused result starting from 4.2, and
   # this is when it introduced -Wno-unused-result
   # GCC can also be built on top of llvm runtime (on mac).
-  check_compiler_flag("-Wno-unused-const-variable" CC_HAS_WNO_UNUSED_CONST_VARIABLE)
-  check_compiler_flag("-Wno-unused-result" CC_HAS_WNO_UNUSED_RESULT)
-  check_compiler_flag("-Wno-unused-value" CC_HAS_WNO_UNUSED_VALUE)
-  check_compiler_flag("-Wno-unused-function" CC_HAS_WNO_UNUSED_FUNCTION)
-  check_compiler_flag("-fno-strict-aliasing" CC_HAS_FNO_STRICT_ALIASING)
-  check_compiler_flag("-Wno-comment" CC_HAS_WNO_COMMENT)
-  check_compiler_flag("-Wno-parentheses" CC_HAS_WNO_PARENTHESES)
-  check_compiler_flag("-Wno-parentheses-equality" CC_HAS_WNO_PARENTHESES_EQUALITY)
-  check_compiler_flag("-Wno-undefined-inline" CC_HAS_WNO_UNDEFINED_INLINE)
-  check_compiler_flag("-Wno-dangling-else" CC_HAS_WNO_DANGLING_ELSE)
-  check_compiler_flag("-Wno-tautological-compare" CC_HAS_WNO_TAUTOLOGICAL_COMPARE)
-  check_compiler_flag("-Wno-misleading-indentation" CC_HAS_WNO_MISLEADING_INDENTATION)
-
   check_compiler_flag("-Wno-unknown-pragmas" CC_HAS_WNO_UNKNOWN_PRAGMAS)
   check_compiler_flag("-Wextra" CC_HAS_WEXTRA)
   check_compiler_flag("-Werror" CC_HAS_WERROR)
@@ -193,7 +180,6 @@
   check_compiler_flag("-funwind-tables" CC_HAS_FUNWIND_TABLES)
   check_compiler_flag("-fno-omit-frame-pointer" CC_HAS_FNO_OMIT_FRAME_POINTER)
   check_compiler_flag("-fno-common" CC_HAS_FNO_COMMON)
-  check_compiler_flag("-Wno-strict-aliasing" CC_HAS_WNO_STRICT_ALIASING)
   check_compiler_flag("-ggdb" CC_HAS_GGDB)
   check_compiler_flag("-fvisibility=hidden" CC_HAS_VISIBILITY)
   check_compiler_flag("-march=native" CC_HAS_ARCH_NATIVE)


Move CheckAtomic cmake module out of the shared cmake dir

Summary: Remove the shared CheckAtomic cmake module out of the shared dir and back to the projects that need it.

Reviewed By: lukaspiatkowski

Differential Revision: D19553656

fbshipit-source-id: 5e89b5b9448ef6d6c57ef904a652e9f9a1d5dbb3

--- build/fbcode_builder/CMake/CheckAtomic.cmake
+++ build/fbcode_builder/CMake/CheckAtomic.cmake
@@ -1,93 +0,0 @@
-# University of Illinois/NCSA
-# Open Source License
-#
-# Copyright (c) 2003-2017 University of Illinois at Urbana-Champaign.
-# All rights reserved.
-#
-# Developed by:
-#
-#     LLVM Team
-#
-#     University of Illinois at Urbana-Champaign
-#
-#     http://llvm.org
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy of
-# this software and associated documentation files (the "Software"), to deal with
-# the Software without restriction, including without limitation the rights to
-# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is furnished to do
-# so, subject to the following conditions:
-#
-#     * Redistributions of source code must retain the above copyright notice,
-#       this list of conditions and the following disclaimers.
-#
-#     * Redistributions in binary form must reproduce the above copyright notice,
-#       this list of conditions and the following disclaimers in the
-#       documentation and/or other materials provided with the distribution.
-#
-#     * Neither the names of the LLVM Team, University of Illinois at
-#       Urbana-Champaign, nor the names of its contributors may be used to
-#       endorse or promote products derived from this Software without specific
-#       prior written permission.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
-# SOFTWARE.
-
-include(CheckCXXSourceCompiles)
-
-# Sometimes linking against libatomic is required for atomic ops, if
-# the platform doesn't support lock-free atomics.
-
-function(check_working_cxx_atomics varname)
-  set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-  get_directory_property(compile_options COMPILE_OPTIONS)
-  set(CMAKE_REQUIRED_FLAGS ${compile_options})
-  CHECK_CXX_SOURCE_COMPILES("
-#include <atomic>
-int main() {
-  struct Test { int val; };
-  std::atomic<Test> s;
-  s.is_lock_free();
-}" ${varname})
-  set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-endfunction(check_working_cxx_atomics)
-
-
-if(NOT DEFINED PROXYGEN_COMPILER_IS_GCC_COMPATIBLE)
-  if(CMAKE_COMPILER_IS_GNUCXX)
-    set(PROXYGEN_COMPILER_IS_GCC_COMPATIBLE ON)
-  elseif(MSVC)
-    set(PROXYGEN_COMPILER_IS_GCC_COMPATIBLE OFF)
-  elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-    set(PROXYGEN_COMPILER_IS_GCC_COMPATIBLE ON)
-  elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel")
-    set(PROXYGEN_COMPILER_IS_GCC_COMPATIBLE ON)
-  endif()
-endif()
-
-# This isn't necessary on MSVC, so avoid command-line switch annoyance
-# by only running on GCC-like hosts.
-if(PROXYGEN_COMPILER_IS_GCC_COMPATIBLE)
-  # First check if atomics work without the library.
-  check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
-  # If not, check if the library exists, and atomics work with it.
-  if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
-    check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
-    if(HAVE_LIBATOMIC)
-      list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
-      check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
-      if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
-	message(FATAL_ERROR "Host compiler must support std::atomic!")
-      endif()
-      list(APPEND CMAKE_CXX_STANDARD_LIBRARIES -latomic)
-    else()
-      message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
-    endif()
-  endif()
-endif()


fixed: order of finding boost + variable setup; minimize verbosity

--- share/hugh/cmake/CMakeAddons_SetupVariables.cmake
+++ share/hugh/cmake/CMakeAddons_SetupVariables.cmake
@@ -10,7 +10,7 @@
 set(BOOST_MINIMUM_VERSION 1.55.0)

 if(CMAKE_HOST_WIN32)
-  foreach(version 1.60.0 1.59.0 1.57.0 1.55.0)
+  foreach(version 1.62.0 1.60.0 1.59.0 1.57.0 1.55.0)
     set(BOOST_ROOT C:/Tools/boost/${version})
     if(EXISTS "${BOOST_ROOT}" AND IS_DIRECTORY "${BOOST_ROOT}")
       break()
@@ -32,9 +32,6 @@
   set(Boost_DEBUG               FALSE)
   set(Boost_USE_STATIC_LIBS     ON)
   set(Boost_USE_MULTITHREAD     ON)
-
-  add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
-  # add_definitions(-DBOOST_ALL_DYN_LINK)

   find_package(Boost ${BOOST_MINIMUM_VERSION})
   if(Boost_FOUND)
@@ -45,9 +42,13 @@
       set(CMAKE_EXE_LINKER_FLAGS    "${CMAKE_EXE_LINKER_FLAGS} /LIBPATH:${Boost_LIBRARY_DIRS}")
     endif()
   endif()
+
+  add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
 elseif(CMAKE_HOST_UNIX)
   set(Boost_DEBUG           FALSE)
   set(Boost_USE_MULTITHREAD ON)
+
+  find_package(Boost ${BOOST_MINIMUM_VERSION})

   add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
   add_definitions(-DBOOST_ALL_DYN_LINK)
@@ -55,9 +56,9 @@

 # [https://stackoverflow.com/questions/22476267]
 # [https://svn.boost.org/trac/boost/ticket/9610]
-cma_print_variable(CMAKE_CXX_COMPILER_ID)
-cma_print_variable(CMAKE_CXX_COMPILER_VERSION)
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.3)
+#cma_print_variable(CMAKE_CXX_COMPILER_ID)
+#cma_print_variable(CMAKE_CXX_COMPILER_VERSION)
+if ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.3)
   find_package(Boost ${BOOST_MINIMUM_VERSION} QUIET)

   cma_print_variable(Boost_VERSION)


hm it seems cmake does not understand CYGWIN (=> UNIX)

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -1,7 +1,7 @@

 ####################################################################
 #
-# Usage:
+# Usage:
 #  - create a new folder, let's call it cdash
 #  - in that folder, do:
 #    ctest -S path/to/eigen2/test/testsuite.cmake[,option1=value1[,option2=value2]]
@@ -51,25 +51,25 @@
   # pick first
   string(REGEX MATCH "([^,]*)(,.*)?" DUMMY ${ARGLIST})
   SET(TOP ${CMAKE_MATCH_1})
-
+
   # remove first
   string(REGEX MATCHALL "[^,]*,(.*)" DUMMY ${ARGLIST})
   SET(ARGLIST ${CMAKE_MATCH_1})
-
+
   # decompose as a pair key=value
   string(REGEX MATCH "([^=]*)(=.*)?" DUMMY ${TOP})
   SET(KEY ${CMAKE_MATCH_1})
-
+
   string(REGEX MATCH "[^=]*=(.*)" DUMMY ${TOP})
   SET(VALUE ${CMAKE_MATCH_1})
-
+
   # set the variable to the specified value
   if(VALUE)
     SET(${KEY} ${VALUE})
   else(VALUE)
     SET(${KEY} ON)
   endif(VALUE)
-
+
 endwhile(${ARGLIST} MATCHES ".+.*")

 ####################################################################
@@ -158,7 +158,7 @@

 # this is the initial cache to use for the binary tree, be careful to escape
 # any quotes inside of this string if you use it
-if(WIN32 AND NOT CYGWIN)
+if(WIN32 AND NOT UNIX)
   #message(SEND_ERROR "win32")
   set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
   SET (CTEST_INITIAL_CACHE "
@@ -168,12 +168,12 @@
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-else(WIN32 AND NOT CYGWIN)
+else(WIN32 AND NOT UNIX)
   SET (CTEST_INITIAL_CACHE "
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-endif(WIN32 AND NOT CYGWIN)
+endif(WIN32 AND NOT UNIX)

 # set any extra environment variables to use during the execution of the script here:


Windows: Set Unicode compilation flags.

Windows: Set Unicode compilation flags.

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

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -248,9 +248,9 @@
   # NOTE: We APPEND ${CRT} rather than REPLACE so it gets picked up by
   # dependencies.
   foreach (lang C CXX)
-    # Enable multi-threaded compilation.
+    # Enable multi-threaded and UNICODE compilation.
     # NOTE: We do not add CRT here because dependencies will use it incorrectly.
-    string(APPEND CMAKE_${lang}_FLAGS " /MP")
+    string(APPEND CMAKE_${lang}_FLAGS " /MP -DUNICODE -D_UNICODE")

     # Debug library for debug configuration.
     string(APPEND CMAKE_${lang}_FLAGS_DEBUG "${CRT}d")


[dep] Bump file-windows SHA to to fix build error on macOS arm64 (#3280)

--- cmake/Modules/FindMagic_EP.cmake
+++ cmake/Modules/FindMagic_EP.cmake
@@ -90,15 +90,15 @@
     ExternalProject_Add(ep_magic
       PREFIX "externals"
       GIT_REPOSITORY "https://github.com/TileDB-Inc/file-windows.git"
-      GIT_TAG "37762ed878a741ff717b03d0f68d7742968e91a6"
+      GIT_TAG "5a53ee05e3ee71424953196171d994969b916c51"
       GIT_SUBMODULES_RECURSE TRUE
       UPDATE_COMMAND ""
       CMAKE_ARGS
         -DCMAKE_INSTALL_PREFIX=${TILEDB_EP_INSTALL_PREFIX}
         -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
         "-DCMAKE_C_FLAGS=${CFLAGS_DEF}"
-        -DDISABLE_MGC_CREATE=ON
         -Dlibmagic_STATIC_LIB=ON
+        -DBUILD_HOST_TOOLS_MACOS_UNIVERSAL=ON
       LOG_DOWNLOAD TRUE
       LOG_CONFIGURE TRUE
       LOG_BUILD TRUE


add_sources function

add_sources function

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -20,6 +20,31 @@
 	file (GLOB SRC_HDR_FILES ${PROJECT_SOURCE_DIR}/src/include/*.h)
 	list (APPEND HDR_FILES ${SRC_HDR_FILES})
 endmacro (add_headers)
+
+
+#- Add sources for a target
+#
+#  ADD_SOURCES(<target> <source1> [<source2> ...])
+#
+function(add_sources target)
+	# define the <target>_SRCS properties if necessary
+	get_property (prop_defined GLOBAL PROPERTY ${target}_SRCS DEFINED)
+	if (NOT prop_defined)
+	define_property (GLOBAL PROPERTY ${target}_SRCS
+		BRIEF_DOCS "Sources for the ${target} target"
+		FULL_DOCS "List of source files for the ${target} target")
+	endif (NOT prop_defined)
+	# create list of sources (absolute paths)
+	set(SRCS)
+	foreach(src IN LISTS ARGN)
+	if(NOT IS_ABSOLUTE "${src}")
+		get_filename_component(src "${src}" ABSOLUTE)
+	endif(NOT IS_ABSOLUTE "${src}")
+	list(APPEND SRCS "${src}")
+	endforeach()
+	# append to global property
+	set_property(GLOBAL APPEND PROPERTY "${target}_SRCS" "${SRCS}")
+endfunction(add_sources)

 #- Wrapper of add_library to allow for static modules


[CMake] Fix thread-local.cmake - fails because of -Werror

--- cmake/Modules/thread-local.cmake
+++ cmake/Modules/thread-local.cmake
@@ -4,6 +4,7 @@
 static thread_local int tls;
 int main(void)
 {
+  (void)tls;
   return 0;
 }" HAVE_CXX_THREAD_LOCAL)
 if(HAVE_CXX_THREAD_LOCAL)
@@ -14,6 +15,7 @@
 static __thread int tls;
 int main(void)
 {
+  (void)tls;
   return 0;
 }" HAVE_GCC_THREAD_LOCAL)
 if(HAVE_GCC_THREAD_LOCAL)


Fix QtCore linking on OSX

Fix QtCore linking on OSX

--- cmake/Qt5Core_HunterPlugin.cmake
+++ cmake/Qt5Core_HunterPlugin.cmake
@@ -31,6 +31,8 @@
       "${_qt_install_prefix}/lib/libqtpcre.a"
       "${_qt_install_prefix}/lib/libqtpcre_debug.a"
   )
+
+  _qt_cmake_extra_helpers_add_interface(Qt5::Core "z") # TODO: link Hunter version
 elseif(UNIX)
   # Linux


cmake nuttx create target for nuttx copy

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -261,6 +261,7 @@
 		COMMAND ${TOUCH} nuttx_copy_${CONFIG}.stamp
 		DEPENDS ${DEPENDS} ${nuttx_patches} ${nuttx_all_files}
 		COMMENT "Copying NuttX for ${CONFIG} with ${config_nuttx_config}")
+	add_custom_target(nuttx_copy_${CONFIG} DEPENDS nuttx_copy_${CONFIG}.stamp)

 	# patch
 	add_custom_target(nuttx_patch_${CONFIG})
@@ -273,7 +274,7 @@
 		add_custom_command(OUTPUT ${patch_stamp}
 			COMMAND ${PATCH} -d ${nuttx_src} -s -p1 -N < ${patch}
 			COMMAND ${TOUCH} ${patch_stamp}
-			DEPENDS ${DEPENDS} nuttx_copy_${CONFIG}.stamp ${patch}
+			DEPENDS ${DEPENDS} nuttx_copy_${CONFIG} ${patch}
 			COMMENT "Applying ${patch}")

 		add_custom_target(${patch_name} DEPENDS ${patch_stamp})


ZLIB: added zlib.pc to PACKAGE_UNRELOCATABLE_TEXT_FILES so that glib and other autotools packages depending on zlib build correctly.

--- cmake/projects/ZLIB/hunter.cmake
+++ cmake/projects/ZLIB/hunter.cmake
@@ -54,4 +54,9 @@

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(ZLIB)
-hunter_download(PACKAGE_NAME ZLIB)
+hunter_download(PACKAGE_NAME ZLIB
+    PACKAGE_INTERNAL_DEPS_ID "1"
+    PACKAGE_UNRELOCATABLE_TEXT_FILES
+    "share/pkgconfig/zlib.pc"
+)
+


Find Gobject-Introspection: Reformat CMake code

--- cmake/Modules/FindGObjectIntrospection.cmake
+++ cmake/Modules/FindGObjectIntrospection.cmake
@@ -1,3 +1,4 @@
+# ~~~
 # - try to find gobject-introspection
 #
 # Once done this will define
@@ -15,49 +16,46 @@
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# ~~~

-macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname)
-  execute_process(
-    COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${_varname} gobject-introspection-1.0
-    OUTPUT_VARIABLE _result
-    RESULT_VARIABLE _null
-  )
+macro (_GIR_GET_PKGCONFIG_VAR _outvar _varname)
+	execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${_varname} gobject-introspection-1.0
+			 OUTPUT_VARIABLE _result
+			 RESULT_VARIABLE _null)

-  if (_null)
-  else()
-    string(REGEX REPLACE "[\r\n]" " " _result "${_result}")
-    string(REGEX REPLACE " +$" ""  _result "${_result}")
-    separate_arguments(_result)
-    set(${_outvar} ${_result} CACHE INTERNAL "")
-  endif()
-endmacro(_GIR_GET_PKGCONFIG_VAR)
+	if (_null)
+	else ()
+		string (REGEX REPLACE "[\r\n]" " " _result "${_result}")
+		string (REGEX REPLACE " +$" "" _result "${_result}")
+		separate_arguments (_result)
+		set (${_outvar} ${_result} CACHE INTERNAL "")
+	endif ()
+endmacro (_GIR_GET_PKGCONFIG_VAR)

-find_package(PkgConfig)
+find_package (PkgConfig)
 if (PKG_CONFIG_FOUND)
-  if (GObjectIntrospection_FIND_VERSION_COUNT GREATER 0)
-    set(_gir_version_cmp ">=${GObjectIntrospection_FIND_VERSION}")
-  endif()
-  pkg_check_modules(_pc_gir gobject-introspection-1.0${_gir_version_cmp})
-  if (_pc_gir_FOUND)
-    set(INTROSPECTION_FOUND TRUE)
-    _gir_get_pkgconfig_var(INTROSPECTION_SCANNER    "g_ir_scanner")
-    _gir_get_pkgconfig_var(INTROSPECTION_COMPILER   "g_ir_compiler")
-    _gir_get_pkgconfig_var(INTROSPECTION_GENERATE   "g_ir_generate")
-    _gir_get_pkgconfig_var(INTROSPECTION_GIRDIR     "girdir")
-    _gir_get_pkgconfig_var(INTROSPECTION_TYPELIBDIR "typelibdir")
-    set(INTROSPECTION_CFLAGS  "${_pc_gir_CFLAGS}")
-    set(INTROSPECTION_LIBS    "${_pc_gir_LIBS}")
-    set(INTROSPECTION_VERSION "${_pc_gir_VERSION}")
-  endif()
-endif()
+	if (GObjectIntrospection_FIND_VERSION_COUNT GREATER 0)
+		set (_gir_version_cmp ">=${GObjectIntrospection_FIND_VERSION}")
+	endif ()
+	pkg_check_modules (_pc_gir gobject-introspection-1.0${_gir_version_cmp})
+	if (_pc_gir_FOUND)
+		set (INTROSPECTION_FOUND TRUE)
+		_gir_get_pkgconfig_var (INTROSPECTION_SCANNER "g_ir_scanner")
+		_gir_get_pkgconfig_var (INTROSPECTION_COMPILER "g_ir_compiler")
+		_gir_get_pkgconfig_var (INTROSPECTION_GENERATE "g_ir_generate")
+		_gir_get_pkgconfig_var (INTROSPECTION_GIRDIR "girdir")
+		_gir_get_pkgconfig_var (INTROSPECTION_TYPELIBDIR "typelibdir")
+		set (INTROSPECTION_CFLAGS "${_pc_gir_CFLAGS}")
+		set (INTROSPECTION_LIBS "${_pc_gir_LIBS}")
+		set (INTROSPECTION_VERSION "${_pc_gir_VERSION}")
+	endif ()
+endif ()

-mark_as_advanced(
-  INTROSPECTION_SCANNER
-  INTROSPECTION_COMPILER
-  INTROSPECTION_GENERATE
-  INTROSPECTION_GIRDIR
-  INTROSPECTION_TYPELIBDIR
-  INTROSPECTION_CFLAGS
-  INTROSPECTION_LIBS
-  INTROSPECTION_VERSION
-)
+mark_as_advanced (INTROSPECTION_SCANNER
+		  INTROSPECTION_COMPILER
+		  INTROSPECTION_GENERATE
+		  INTROSPECTION_GIRDIR
+		  INTROSPECTION_TYPELIBDIR
+		  INTROSPECTION_CFLAGS
+		  INTROSPECTION_LIBS
+		  INTROSPECTION_VERSION)


fix(flexisip.spec): export *.so.* for plugin

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -194,6 +194,7 @@
 %files jwe-auth-plugin
 %defattr(-,root,root,-)
 %{_libdir}/flexisip/plugins/libjweauth.so
+%{_libdir}/flexisip/plugins/libjweauth.so.*
 %endif

 %changelog


Install python packages into a standard location.

--- bindings/python/InstallConfig.cmake
+++ bindings/python/InstallConfig.cmake
@@ -5,21 +5,23 @@
 #        FILES_MATCHING PATTERN ${ZINC_SHARED_OBJECT_GLOB}
 #)

+set(_PYTHON_DESTINATION_PREFIX lib/python${PYTHONLIBS_MAJOR_VERSION}.${PYTHONLIBS_MINOR_VERSION})
+
 install(TARGETS ${SWIG_MODULE_TARGETS}
-    DESTINATION python/$<CONFIG>/opencmiss/zinc
+    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>/opencmiss/zinc
     COMPONENT PythonBindings
 )
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/setup.py
-    DESTINATION python/$<CONFIG>
+    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>
     COMPONENT PythonBindings
 )
 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/opencmiss
-    DESTINATION python/$<CONFIG>
+    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>
     COMPONENT PythonBindings
     FILES_MATCHING PATTERN "*.py"
 )
 install(FILES "${BASE_PYTHON_PACKAGE_DIR}/README.txt"
-    DESTINATION python/$<CONFIG>
+    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>
     COMPONENT PythonBindings
 )


print MATH_LIB_SEARCH_ORDER; fixes #195

print MATH_LIB_SEARCH_ORDER; fixes #195

--- modules/math_libs.cmake
+++ modules/math_libs.cmake
@@ -516,3 +516,9 @@
         set(MATH_LIBS ${MATH_LIBS} -ldl)
     endif()
 endif()
+
+if(MATH_LIB_SEARCH_ORDER)
+    # this print is here to avoid warning about MATH_LIB_SEARCH_ORDER which
+    # might be set but never used
+    message(STATUS "MATH_LIB_SEARCH_ORDER set to ${MATH_LIB_SEARCH_ORDER}")
+endif()


build: disable spam warnings on linux

build: disable spam warnings on linux

--- build/Utils.cmake
+++ build/Utils.cmake
@@ -497,10 +497,12 @@
 		add_extra_compiler_option(-Wno-narrowing)
 		add_extra_compiler_option(-Wno-attributes)
 		add_extra_compiler_option(-Wno-enum-compare)
+		add_extra_compiler_option(-Wno-misleading-indentation)
 		add_extra_compiler_option(-Wno-missing-field-initializers)
 		add_extra_compiler_option(-Wno-unused-parameter)
 		add_extra_compiler_option(-Wno-delete-incomplete)
 		add_extra_compiler_option(-Wno-unnamed-type-template-args)
+		add_extra_compiler_option(-Wno-int-in-bool-context)
 	  endif()
 	  add_extra_compiler_option(-fdiagnostics-show-option)
 	  add_extra_compiler_option(-ftemplate-backtrace-limit=0)


remove trailing whitespace

remove trailing whitespace

--- ament_cmake_nose/cmake/ament_add_nose_test.cmake
+++ ament_cmake_nose/cmake/ament_add_nose_test.cmake
@@ -24,7 +24,7 @@
 #   should be invoked on
 # :type path: string
 # :param PYTHON_EXECUTABLE: absolute path to the executable used to run the test,
-#   default to the CMake variable with the same name returned by FindPythonInterp
+#   default to the CMake variable with the same name returned by FindPythonInterp
 # :type PYTHON_EXECUTABLE: string
 # :param TIMEOUT: the test timeout in seconds,
 #   default defined by ``ament_add_test()``


corrected comment

corrected comment

--- version_config.cmake
+++ version_config.cmake
@@ -149,7 +149,7 @@
   set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd)
   set(DEFAULT_siemens_to_ismrmrd_TAG ba4773f9cf4bba5f3ccd19930e3548d8273fee01)

-  ## petmr-rd-tools
+  ## pet-rd-tools
   set(DEFAULT_pet_rd_tools_URL https://github.com/UCL/pet-rd-tools )
   set(DEFAULT_pet_rd_tools_TAG b88281f79e8c4a3781ebda7663f1ce7f5cab6e68)


[LOG] removed dispensable log entry

[LOG] removed dispensable log entry

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

--- seqan/util/cmake/FindSeqAn.cmake
+++ seqan/util/cmake/FindSeqAn.cmake
@@ -233,7 +233,6 @@
     # Forwards Generation.
     # ---------------------------------------------------------------------------
     if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
-	message(STATUS "HALLO")
         file (GLOB BASE_CONTENTS RELATIVE ${PATH}/seqan ${PATH}/seqan/[A-z]*)
         foreach (ENTRY ${BASE_CONTENTS})
             if (IS_DIRECTORY ${PATH}/seqan/${ENTRY})


Fix cmake warning about mismatched if/endif comment (#11176)

--- clrfeatures.cmake
+++ clrfeatures.cmake
@@ -19,5 +19,5 @@
 if(NOT DEFINED FEATURE_DBGIPC)
   if(CLR_CMAKE_PLATFORM_UNIX AND (NOT CLR_CMAKE_PLATFORM_ANDROID))
     set(FEATURE_DBGIPC 1)
-  endif(CLR_CMAKE_PLATFORM_UNIX)
+  endif()
 endif(NOT DEFINED FEATURE_DBGIPC)


Group optional configurations in av1/av1.cmake.

Change-Id: I0dd17ec7ea59cecf8298831d0e46e971f744c2c7

--- av1/av1.cmake
+++ av1/av1.cmake
@@ -85,13 +85,6 @@
     "${AOM_ROOT}/av1/decoder/dthread.c"
     "${AOM_ROOT}/av1/decoder/dthread.h")

-if (CONFIG_INSPECTION)
-  set(AOM_AV1_DECODER_SOURCES
-      ${AOM_AV1_DECODER_SOURCES}
-      "${AOM_ROOT}/av1/decoder/inspection.c"
-      "${AOM_ROOT}/av1/decoder/inspection.h")
-endif ()
-
 set(AOM_AV1_ENCODER_SOURCES
     "${AOM_ROOT}/av1/av1_cx_iface.c"
     "${AOM_ROOT}/av1/encoder/aq_complexity.c"
@@ -157,13 +150,6 @@
     "${AOM_ROOT}/av1/encoder/variance_tree.c"
     "${AOM_ROOT}/av1/encoder/variance_tree.h")

-if (CONFIG_PALETTE)
-  set(AOM_AV1_ENCODER_SOURCES
-      ${AOM_AV1_ENCODER_SOURCES}
-      "${AOM_ROOT}/av1/encoder/palette.c"
-      "${AOM_ROOT}/av1/encoder/palette.h")
-endif ()
-
 set(AOM_AV1_COMMON_SSE2_INTRIN
     # Requires CONFIG_GLOBAL_MOTION or CONFIG_WARPED_MOTION
     #"${AOM_ROOT}/av1/common/x86/warp_plane_sse2.c"
@@ -173,16 +159,8 @@
     "${AOM_ROOT}/av1/common/x86/av1_convolve_ssse3.c")

 set(AOM_AV1_COMMON_SSE4_1_INTRIN
-    # Requires CONFIG_CDEF
-    #"${AOM_ROOT}/av1/common/x86/od_dering_sse4.c"
     "${AOM_ROOT}/av1/common/x86/av1_fwd_txfm1d_sse4.c"
     "${AOM_ROOT}/av1/common/x86/av1_fwd_txfm2d_sse4.c")
-
-if (CONFIG_FILTER_INTRA)
-  set(AOM_AV1_COMMON_SSE4_1_INTRIN
-      ${AOM_AV1_COMMON_SSE4_1_INTRIN}
-      "${AOM_ROOT}/av1/common/x86/filterintra_sse4.c")
-endif ()

 set(AOM_AV1_COMMON_AVX2_INTRIN
     "${AOM_ROOT}/av1/common/x86/hybrid_inv_txfm_avx2.c")
@@ -212,6 +190,22 @@
       ${AOM_AV1_COMMON_SOURCES}
       "${AOM_ROOT}/av1/common/accounting.c"
       "${AOM_ROOT}/av1/common/accounting.h")
+endif ()
+
+if (CONFIG_AOM_HIGHBITDEPTH)
+  set(AOM_AV1_COMMON_SSE4_1_INTRIN
+      ${AOM_AV1_COMMON_SSE4_1_INTRIN}
+      "${AOM_ROOT}/av1/common/x86/av1_highbd_convolve_sse4.c"
+      "${AOM_ROOT}/av1/common/x86/highbd_inv_txfm_sse4.c")
+
+  set(AOM_AV1_COMMON_AVX2_INTRIN
+      ${AOM_AV1_COMMON_AVX2_INTRIN}
+      "${AOM_ROOT}/av1/common/x86/highbd_inv_txfm_avx2.c")
+
+  set(AOM_AV1_ENCODER_SSE4_1_INTRIN
+      ${AOM_AV1_ENCODER_SSE4_1_INTRIN}
+      "${AOM_ROOT}/av1/encoder/x86/av1_highbd_quantize_sse4.c"
+      "${AOM_ROOT}/av1/encoder/x86/highbd_fwd_txfm_sse4.c")
 endif ()

 if (CONFIG_CDEF)
@@ -269,26 +263,32 @@
       "${AOM_ROOT}/av1/encoder/x86/wedge_utils_sse2.c")
 endif ()

+if (CONFIG_FILTER_INTRA)
+  set(AOM_AV1_COMMON_SSE4_1_INTRIN
+      ${AOM_AV1_COMMON_SSE4_1_INTRIN}
+      "${AOM_ROOT}/av1/common/x86/filterintra_sse4.c")
+endif ()
+
+if (CONFIG_INSPECTION)
+  set(AOM_AV1_DECODER_SOURCES
+      ${AOM_AV1_DECODER_SOURCES}
+      "${AOM_ROOT}/av1/decoder/inspection.c"
+      "${AOM_ROOT}/av1/decoder/inspection.h")
+endif ()
+
 if (CONFIG_INTERNAL_STATS)
   set(AOM_AV1_ENCODER_SOURCES
       ${AOM_AV1_ENCODER_SOURCES}
       "${AOM_ROOT}/av1/encoder/blockiness.c")
 endif ()

-if (CONFIG_AOM_HIGHBITDEPTH)
-  set(AOM_AV1_COMMON_SSE4_1_INTRIN
-      ${AOM_AV1_COMMON_SSE4_1_INTRIN}
-      "${AOM_ROOT}/av1/common/x86/av1_highbd_convolve_sse4.c"
-      "${AOM_ROOT}/av1/common/x86/highbd_inv_txfm_sse4.c")
-
-  set(AOM_AV1_COMMON_AVX2_INTRIN
-      ${AOM_AV1_COMMON_AVX2_INTRIN}
-      "${AOM_ROOT}/av1/common/x86/highbd_inv_txfm_avx2.c")
-
-  set(AOM_AV1_ENCODER_SSE4_1_INTRIN
-      ${AOM_AV1_ENCODER_SSE4_1_INTRIN}
-      "${AOM_ROOT}/av1/encoder/x86/av1_highbd_quantize_sse4.c"
-      "${AOM_ROOT}/av1/encoder/x86/highbd_fwd_txfm_sse4.c")
+if (CONFIG_PALETTE)
+  set(AOM_AV1_ENCODER_SOURCES
+      ${AOM_AV1_ENCODER_SOURCES}
+      "${AOM_ROOT}/av1/encoder/palette.c"
+      "${AOM_ROOT}/av1/encoder/palette.h")
+endif ()
+
 endif ()

 # Setup AV1 common/decoder/encoder targets. The libaom target must exist before


added jpeg library for mac build

added jpeg library for mac build

--- cmake/ModuleWholeSlideImaging.cmake
+++ cmake/ModuleWholeSlideImaging.cmake
@@ -12,8 +12,9 @@
         # Get OpenSlide and TIFF from OS
         find_package(OpenSlide REQUIRED)
         find_package(TIFF REQUIRED)
+        find_package(JPEG REQUIRED)

-        list(APPEND LIBRARIES ${OPENSLIDE_LIBRARIES} ${TIFF_LIBRARIES})
+        list(APPEND LIBRARIES ${OPENSLIDE_LIBRARIES} ${TIFF_LIBRARIES} ${JPEG_LIBRARIES})
         list(APPEND FAST_INCLUDE_DIRS ${OPENSLIDE_INCLUDE_DIRS} ${TIFF_INCLUDE_DIRS})
         message(STATUS "TIFF FOUND: ${TIFF_LIBRARY} ${TIFF_LIBRARIES} ${TIFF_INCLUDE_DIRS}")
     else()


[lldb][CMake] Fix one more detail in r368066

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

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

--- cmake/caches/Apple-lldb-Xcode.cmake
+++ cmake/caches/Apple-lldb-Xcode.cmake
@@ -1,6 +1,6 @@
 include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)

-set(CMAKE_GENERATOR Xcode)
+set(CMAKE_GENERATOR Xcode CACHE STRING "")
 set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "")
 set(CMAKE_XCODE_GENERATE_SCHEME ON CACHE BOOL "")


Fixing Bug in CheckSanitizers.cmake

Fixing Bug in CheckSanitizers.cmake

--- cmake/modules/CheckSanitizers.cmake
+++ cmake/modules/CheckSanitizers.cmake
@@ -35,16 +35,21 @@
 option (UBSAN "Enable UndefinedBehaviorSanitizer (aka UBSAN)" OFF)

+include(CheckCXXCompilerFlag)
+
+
 # Check for Address Sanitizer.
 if (ASAN)
 	if (TSAN OR MSAN)
 		message (FATAL_ERROR "ASAN is not compatible with TSAN or MSAN")
 	endif ()

+	set (CMAKE_REQUIRED_FLAGS_CACHE ${CMAKE_REQUIRED_FLAGS})
 	set (ASAN_FLAGS  "-fsanitize=address -fno-omit-frame-pointer")
 	set (CMAKE_REQUIRED_FLAGS "${ASAN_FLAGS}")
+	CHECK_CXX_COMPILER_FLAG("${ASAN_FLAGS}" COMPILER_SUPPORTS_ASAN)
+	set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_CACHE})

-	CHECK_CXX_COMPILER_FLAG("${ASAN_FLAGS}" COMPILER_SUPPORTS_ASAN)
 	if (COMPILER_SUPPORTS_ASAN)
 		message (STATUS "${READABLE_CXX_COMPILER} supports AddressSanitizer")
 		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ASAN_FLAGS}")
@@ -60,10 +65,12 @@
 		message (FATAL_ERROR "TSAN is not compatible with MSAN")
 	endif ()

+	set (CMAKE_REQUIRED_FLAGS_CACHE ${CMAKE_REQUIRED_FLAGS})
 	set (TSAN_FLAGS  "-fsanitize=thread -fPIE -pie")
 	set (CMAKE_REQUIRED_FLAGS "${TSAN_FLAGS}")
+	CHECK_CXX_COMPILER_FLAG("${TSAN_FLAGS}" COMPILER_SUPPORTS_TSAN)
+	set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_CACHE})

-	CHECK_CXX_COMPILER_FLAG("${TSAN_FLAGS}" COMPILER_SUPPORTS_TSAN)
 	if (COMPILER_SUPPORTS_TSAN)
 		message (STATUS "${READABLE_CXX_COMPILER} supports ThreadSanitizer")
 		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TSAN_FLAGS}")
@@ -75,10 +82,12 @@

 # Check for Memory Sanitizer.
 if (MSAN)
+	set (CMAKE_REQUIRED_FLAGS_CACHE ${CMAKE_REQUIRED_FLAGS})
 	set (MSAN_FLAGS  "-fsanitize=memory -fsanitize-memory-track-origins -fPIE -pie -fno-omit-frame-pointer")
 	set (CMAKE_REQUIRED_FLAGS "${MSAN_FLAGS}")
+	CHECK_CXX_COMPILER_FLAG("${MSAN_FLAGS}" COMPILER_SUPPORTS_MSAN)
+	set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_CACHE})

-	CHECK_CXX_COMPILER_FLAG("${MSAN_FLAGS}" COMPILER_SUPPORTS_MSAN)
 	if (COMPILER_SUPPORTS_MSAN)
 		message (STATUS "${READABLE_CXX_COMPILER} supports MemorySanitizer")
 		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSAN_FLAGS}")
@@ -90,10 +99,12 @@

 # Check for Undefined Behavior Sanitizer.
 if (UBSAN)
+	set (CMAKE_REQUIRED_FLAGS_CACHE ${CMAKE_REQUIRED_FLAGS})
 	set (UBSAN_FLAGS  "-fsanitize=undefined -fno-omit-frame-pointer")
 	set (CMAKE_REQUIRED_FLAGS "${UBSAN_FLAGS}")
+	CHECK_CXX_COMPILER_FLAG("${UBSAN_FLAGS}" COMPILER_SUPPORTS_UBSAN)
+	set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_CACHE})

-	CHECK_CXX_COMPILER_FLAG("${UBSAN_FLAGS}" COMPILER_SUPPORTS_UBSAN)
 	if (COMPILER_SUPPORTS_UBSAN)
 		message (STATUS "${READABLE_CXX_COMPILER} supports UndefinedBehaviorSanitizer")
 		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${UBSAN_FLAGS}")


libiconv: update to 1.15

libiconv: update to 1.15

They’ve even fixed the option parsing bug I’ve reported years ago!

--- packages/libiconv.cmake
+++ packages/libiconv.cmake
@@ -1,7 +1,7 @@
 ExternalProject_Add(libiconv
     DEPENDS gcc
-    URL "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz"
-    URL_MD5 e34509b1623cec449dfeb73d7ce9c6c6
+    URL "http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz"
+    URL_HASH SHA256=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
     CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure
         --host=${TARGET_ARCH}
         --prefix=${MINGW_INSTALL_PREFIX}


Fix akmalloc.cmake for Windows configuring of rc.h

--- akmalloc.cmake
+++ akmalloc.cmake
@@ -8,8 +8,11 @@

 set(xprt include/akmalloc)

+# create the configured rc file
+get_filename_component(rc_dirpath ${xprt}/rc.h.template DIRECTORY)
+get_filename_component(rc_absdirpath ${rc_dirpath} ABSOLUTE)
 configure_file(${xprt}/rc.h.template
-               ${CMAKE_CURRENT_SOURCE_DIR}/${xprt}/rc.h
+               ${rc_absdirpath}/rc.h
                @ONLY
                )


A few tweaks necessary to get qt to be found properly

--- ntoarm.cmake
+++ ntoarm.cmake
@@ -5,8 +5,10 @@
 SET(CMAKE_C_COMPILER   $ENV{QNX_HOST}/usr/bin/ntoarmv7-gcc)
 SET(CMAKE_CXX_COMPILER $ENV{QNX_HOST}/usr/bin/ntoarmv7-g++)

+
 # where is the target environment
-# SET(CMAKE_FIND_ROOT_PATH  ${QNX_TARGET} ${QNX_TARGET}/armle-v7)
+SET(CMAKE_FIND_ROOT_PATH $ENV{QNX_HOST} $ENV{QTDIR} $ENV{QNX_TARGET} $ENV{QNX_TARGET}/armle-v7)
+
 SET(CMAKE_STATIC_LIBRARY_PREFIX "")
 SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
 SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
@@ -15,7 +17,7 @@
 SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")

 # search for programs in the build host directories
-SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
 # for libraries and headers in the target directories
-SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)


Enfoce override spcification.

Enfoce override spcification.

--- build_settings.cmake
+++ build_settings.cmake
@@ -17,7 +17,7 @@
 set(AUTORUN_UNIT_TESTS FALSE CACHE BOOL "If TRUE, tests will be run immediately after linking the test executable")

 # Warnings
-set(WARN_OPTS "-Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")
+set(WARN_OPTS "-Wsuggest-override -Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")

 # C and C++ compiler flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel ${EXTRA_C_FLAGS}")


Quick fix

Quick fix


ARROW-72: Search for alternative parquet-cpp header

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #30 from xhochy/arrow-72 and squashes the following commits:

5b6b328 [Uwe L. Korn] ARROW-72: Search for alternative parquet-cpp header

--- cpp/cmake_modules/FindParquet.cmake
+++ cpp/cmake_modules/FindParquet.cmake
@@ -29,14 +29,14 @@

 # Try the parameterized roots, if they exist
 if ( _parquet_roots )
-    find_path( PARQUET_INCLUDE_DIR NAMES parquet/parquet.h
+    find_path( PARQUET_INCLUDE_DIR NAMES parquet/api/reader.h
         PATHS ${_parquet_roots} NO_DEFAULT_PATH
         PATH_SUFFIXES "include" )
     find_library( PARQUET_LIBRARIES NAMES parquet
         PATHS ${_parquet_roots} NO_DEFAULT_PATH
         PATH_SUFFIXES "lib" )
 else ()
-    find_path( PARQUET_INCLUDE_DIR NAMES parquet/parquet.h )
+    find_path( PARQUET_INCLUDE_DIR NAMES parquet/api/reader.h )
     find_library( PARQUET_LIBRARIES NAMES parquet )
 endif ()


removed unneeded comments.

removed unneeded comments.

--- cmake/ConfigureCompiler.cmake
+++ cmake/ConfigureCompiler.cmake
@@ -217,10 +217,6 @@
     endif()
     set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -O0 -g"
                         CACHE STRING "Flags used by the compiler during debug builds." FORCE)
-    # FIX: SET SOURCE FILE PROPERTIES ON AFFECTED FILES INSTEAD OF THIS
-    #      (1) Try and figure out problem and fix code
-    #      (2) SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS -O1)
-    #      Clang 3.3 and lower produces wrong answer for mutilsimpsontestsuite hangs for -O2 or -O3
     set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -DEIGEN_NO_DEBUG -O3"
                         CACHE STRING "Flags used by the compiler during release builds." FORCE)
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DDEBUG -O3 -g"


Go back to requiring only the 1.40.0 version of Boost (having 1.46.1 was accidental, and not necessary)

--- cmake/ConfigurePackages.cmake
+++ cmake/ConfigurePackages.cmake
@@ -41,7 +41,7 @@
 set(Boost_ADDITIONAL_VERSIONS "1.39.0" "1.40.0" "1.41.0" "1.42.0" "1.43.0" "1.44.0" "1.46.1")
 set(Boost_USE_STATIC_LIBS TRUE)

-find_package(Boost 1.46.1 COMPONENTS thread regex)
+find_package(Boost 1.40.0 COMPONENTS thread regex)

 if (Boost_FOUND)
    include_directories(${Boost_INCLUDE_DIRS})


updated cmake module to generate osirose database

--- cmake/OsIROSECMakeTools.cmake
+++ cmake/OsIROSECMakeTools.cmake
@@ -179,8 +179,8 @@
     ADD_CUSTOM_COMMAND(
       OUTPUT "${H_FILE}"
       COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTPATH}
-      COMMAND ${SQLPP_INCLUDE_DIR}/../scripts/ddl2cpp
-      ARGS ${MATCH_PATH} "${OUTPATH}/${ARG_NAME}" ${ARG_NAME}
+      COMMAND "/usr/bin/env"
+      ARGS python ${SQLPP_INCLUDE_DIR}/../scripts/ddl2cpp ${MATCH_PATH} "${OUTPATH}/${ARG_NAME}" ${ARG_NAME}
       DEPENDS ${ABS_FILE}
       COMMENT "Running C++ sqlpp11 ddl12cpp compiler on ${MATCH_PATH} with root ${SQLROOT}, generating: ${H_FILE}"
       VERBATIM)


Fixed comment

Fixed comment

--- cmake/toolchains/o3d303.cmake
+++ cmake/toolchains/o3d303.cmake
@@ -1,5 +1,5 @@
 #
-# Toolchain for cross-building libpallet for the O3D303 camera.
+# Toolchain for cross-building libo3d3xx for the O3D303 camera.
 #
 # NOTE: For this file to work, you must first:
 # source /opt/poky/1.8.1/environment-setup-armv7ahf-vfp-neon-poky-linux-gnueabi


Updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -124,8 +124,13 @@
 # CMake module dir
 find_path(_CORRADE_MODULE_DIR
     NAMES UseCorrade.cmake CorradeLibSuffix.cmake
+    PATH_SUFFIXES share/cmake/Corrade)
+
+# If not found, try system module dir
+find_path(_CORRADE_MODULE_DIR
+    NAMES UseCorrade.cmake CorradeLibSuffix.cmake
     PATHS ${CMAKE_ROOT}/Modules
-    PATH_SUFFIXES share/cmake/Corrade)
+    NO_CMAKE_FIND_ROOT_PATH)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Corrade DEFAULT_MSG


fix: Find VTK 9 using old component names

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -59,7 +59,7 @@
     MIRTK{Common,Numerics,Image,PointSet,IO}
     Boost-1.48 # {math_c99} used, but headers only
     Eigen3
-    VTK-9|8|7|6{vtkCommonCore,vtkCommonDataModel,vtkFiltersCore,vtkFiltersHybrid,vtkFiltersModeling,vtkImagingCore,vtkIOXML}
+    VTK{vtkCommonCore,vtkCommonDataModel,vtkFiltersCore,vtkFiltersHybrid,vtkFiltersModeling,vtkImagingCore,vtkIOXML}
     #<dependency>
   OPTIONAL_DEPENDS
     TBB{tbb}


tcam: Add arvu3v string to module description

--- CMakeOptions.cmake
+++ CMakeOptions.cmake
@@ -69,6 +69,11 @@

   if (TCAM_BUILD_ARAVIS)
     add_module("aravis")
+
+    if (TCAM_ARAVIS_USB_VISION)
+      add_module("arvu3v")
+    endif (TCAM_ARAVIS_USB_VISION)
+
   endif (TCAM_BUILD_ARAVIS)

   if (TCAM_BUILD_V4L2)


BUG fix issue 1656 related to eratic behavior of cmake configuration

--- Modules/Wrappers/SWIG/otb-module-init.cmake
+++ Modules/Wrappers/SWIG/otb-module-init.cmake
@@ -50,13 +50,16 @@
 endif()

 macro(swap_cache_variable var1 var2)
-  set(_backup ${${var1}})
-  get_property(_var1_type CACHE ${var1} PROPERTY TYPE)
-  get_property(_var1_help CACHE ${var1} PROPERTY HELPSTRING)
-  get_property(_var2_type CACHE ${var2} PROPERTY TYPE)
-  get_property(_var2_help CACHE ${var2} PROPERTY HELPSTRING)
-  set(${var1} ${${var2}} CACHE ${_var1_type} "${_var1_help}" FORCE)
-  set(${var2} ${_backup} CACHE ${_var2_type} "${_var2_help}" FORCE)
+  # Only swap variable if var1 exists in the cmake cache
+  if (${var1})
+    set(_backup ${${var1}})
+    get_property(_var1_type CACHE ${var1} PROPERTY TYPE)
+    get_property(_var1_help CACHE ${var1} PROPERTY HELPSTRING)
+    get_property(_var2_type CACHE ${var2} PROPERTY TYPE)
+    get_property(_var2_help CACHE ${var2} PROPERTY HELPSTRING)
+    set(${var1} ${${var2}} CACHE ${_var1_type} "${_var1_help}" FORCE)
+    set(${var2} ${_backup} CACHE ${_var2_type} "${_var2_help}" FORCE)
+  endif()
 endmacro()

 macro(swap_variable var1 var2)


system: remove the quotation marks

system: remove the quotation marks

--- cmake/ChenUtil.cmake
+++ cmake/ChenUtil.cmake
@@ -35,17 +35,17 @@
     if(APPLE)
         execute_process(
                 COMMAND bash -c "system_profiler SPSoftwareDataType | perl -0 -pe 's/^.*System Version: ([^\n]+).*$/\\1/s'"
-                OUTPUT_VARIABLE version
+                OUTPUT_VARIABLE system
                 OUTPUT_STRIP_TRAILING_WHITESPACE
         )
-        add_definitions(-DCHEN_BUILD_SYSTEM="${version}")
+        add_definitions(-DCHEN_BUILD_SYSTEM="${system}")
     elseif(UNIX AND lsb_release)
         execute_process(
-                COMMAND lsb_release -d -s
-                OUTPUT_VARIABLE version
+                COMMAND bash -c "lsb_release -d -s | perl -0 -pe 's/^\"(.*)\"$/\\1/s'"
+                OUTPUT_VARIABLE system
                 OUTPUT_STRIP_TRAILING_WHITESPACE
         )
-        add_definitions(-DCHEN_BUILD_SYSTEM="${version}")
+        add_definitions(-DCHEN_BUILD_SYSTEM="${system}")
     else()
         add_definitions(-DCHEN_BUILD_SYSTEM="${CMAKE_SYSTEM}")
     endif()


Don't include Ed25519 in AMCL.

Don't include Ed25519 in AMCL.

We aren't going to use the VALIDATE function from the ECDH utils, like
we thought (copied the relevant code and rolled our own, instead).

--- cmake/FindAMCL.cmake
+++ cmake/FindAMCL.cmake
@@ -20,9 +20,8 @@
 set(AMCL_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../amcl/version3/c/)
 set(AMCL_HEADER_DIR ${CMAKE_CURRENT_BINARY_DIR}/amcl/amcl/)

-# Set config options to build BN254 pairing-friendly curve
-# (and Ed25519, to satisfy the linker when we use some ECDH-related functions)
-set(AMCL_CONFIG_OPTIONS "1\\n17\\n0\\n")
+# Set config options to build BN254 pairing-friendly curve, only
+set(AMCL_CONFIG_OPTIONS "17\\n0\\n")
 if (NOT TARGET AMCL)
         ExternalProject_Add(AMCL
                 PREFIX ${AMCL_PREFIX}


modify daos cmake file to make it find daos library more easily

--- cmake/FindDAOS.cmake
+++ cmake/FindDAOS.cmake
@@ -25,17 +25,15 @@
 #                           variable, it will override any setting specified
 #                           as an environment variable.

-if(CMAKE_VERSION VERSION_LESS 3.12)
-  if((NOT DAOS_ROOT) AND (NOT (ENV{DAOS_ROOT} STREQUAL "")))
-    set(DAOS_ROOT "$ENV{DAOS_ROOT}")
-  endif()
-  if(DAOS_ROOT)
-    set(DAOS_INCLUDE_OPTS HINTS ${DAOS_ROOT}/include NO_DEFAULT_PATHS)
-    set(DAOS_LIBRARY_OPTS
-      HINTS ${DAOS_ROOT}/lib ${DAOS_ROOT}/lib64
-      NO_DEFAULT_PATHS
+if((NOT DAOS_ROOT) AND (NOT (ENV{DAOS_ROOT} STREQUAL "")))
+  set(DAOS_ROOT "$ENV{DAOS_ROOT}")
+endif()
+if(DAOS_ROOT)
+  set(DAOS_INCLUDE_OPTS HINTS ${DAOS_ROOT}/include NO_DEFAULT_PATHS)
+  set(DAOS_LIBRARY_OPTS
+    HINTS ${DAOS_ROOT}/lib ${DAOS_ROOT}/lib64
+    NO_DEFAULT_PATHS
     )
-  endif()
 endif()


glibconfig.h cmake fix.

glibconfig.h cmake fix.

--- cmake/FindGTK2.cmake
+++ cmake/FindGTK2.cmake
@@ -113,6 +113,7 @@
 #   _OUT_micro = Micro version number
 #   _gtkversion_hdr = Header file to parse
 #=============================================================
+
 function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr)
     file(READ ${_gtkversion_hdr} _contents)
     if(_contents)
@@ -170,6 +171,7 @@
         pango-1.0
         pangomm-1.4
         sigc++-2.0
+        lib/glib-2.0    # WTF is glibconfig.h doing there?
     )

     set(_suffixes)
@@ -423,7 +425,7 @@
 foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
     if(_GTK2_component STREQUAL "gtk")
         _GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h)
-#        _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h)
+        _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h)
         _GTK2_FIND_LIBRARY    (GTK2_GLIB_LIBRARY glib false true)

         _GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h)
@@ -532,7 +534,7 @@
 #            GTK2_GTK_INCLUDE_DIR

             GTK2_GLIB_INCLUDE_DIR
-#            GTK2_GLIBCONFIG_INCLUDE_DIR
+            GTK2_GLIBCONFIG_INCLUDE_DIR
             GTK2_GLIB_LIBRARY

 #            GTK2_GDK_INCLUDE_DIR


Linux Gomp repair

Linux Gomp repair

--- cmake/FindGomp.cmake
+++ cmake/FindGomp.cmake
@@ -7,6 +7,7 @@
 else(APPLE)
   # set(Gomp_LIBRARIES "/usr/lib/gcc/x86_64-linux-gnu/4.7/libgomp.so")
   set(Gomp_LIBRARIES "gomp" )
+  message( STATUS "Linux: using OMP library gomp" )
 endif(APPLE)


Make addition of C++ standard flags more canonical.

--- cmake/SetFlags.cmake
+++ cmake/SetFlags.cmake
@@ -15,7 +15,7 @@
 		set(F_WARN "${F_WARN} -Wdisabled-optimization -Werror")
 		set(F_WARN "${F_WARN} -Wstrict-overflow=5")

-		set(F_DBG "${F_WARN} -std=c++1y -g -O0 -fno-omit-frame-pointer")
+		set(F_DBG "${F_WARN} -g -O0 -fno-omit-frame-pointer")
 		set(F_DBG "${F_DBG} -fstack-protector-strong")

 		if(USE_ASAN)
@@ -28,7 +28,7 @@
 			set(F_DBG "${F_DBG} -fsanitize=thread")
 		endif()

-		set(F_REL "${F_WARN} -std=c++1y -O2 -fomit-frame-pointer")
+		set(F_REL "${F_WARN} -O2 -fomit-frame-pointer")
 		set(F_REL "${F_REL} -fstack-protector-strong")
 	elseif(CMAKE_CXX_COMPILER_ID MATCHES Clang)
 		set(F_WARN "-pedantic -Weverything -Werror")
@@ -46,7 +46,7 @@
 		set(F_WARN "${F_WARN} -Wno-unused-macros")
 		set(F_WARN "${F_WARN} -Wno-extended-offsetof")

-		set(F_DBG "${F_WARN} -std=c++1y -g -O0 -fno-omit-frame-pointer")
+		set(F_DBG "${F_WARN} -g -O0 -fno-omit-frame-pointer")
 		set(F_DBG "${F_DBG} -fstack-protector-strong")

 		if(USE_ASAN)
@@ -59,7 +59,7 @@
 			set(F_DBG "${F_DBG} -fsanitize=thread")
 		endif()

-		set(F_REL "${F_WARN} -std=c++1y -O2 -fomit-frame-pointer")
+		set(F_REL "${F_WARN} -O2 -fomit-frame-pointer")
 		set(F_REL "${F_REL} -fstack-protector-strong")
 	elseif(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
 		set(F_DBG "/W4 /WX /FIcmu/MSVCWarnings.hpp")
@@ -72,6 +72,9 @@
 		set(F_REL "")
 	endif()

+	set(CMAKE_CXX_STANDARD 14 PARENT_SCOPE)
+	set(CMAKE_CXX_EXTENSIONS OFF PARENT_SCOPE)
+
 	set(CMAKE_CXX_FLAGS_RELEASE "${F_REL}" PARENT_SCOPE)
 	set(CMAKE_CXX_FLAGS_DEBUG "${F_DBG}" PARENT_SCOPE)
 endfunction()


added compile definition for mac target to export plugin symbols

--- cmake/findCUTI.cmake
+++ cmake/findCUTI.cmake
@@ -113,7 +113,8 @@
 		)
 		cuti_xctest_add_bundle(${target} ${testee} ${CUTI_SOURCE} ${ARGN} ${CUTI_INCLUDE})
 	ELSE()
-		add_library(${target} SHARED ${ARGN} ${CUTI_INCLUDE})
+    add_library(${target} SHARED ${ARGN} ${CUTI_INCLUDE})
+    target_compile_definitions(${target} PUBLIC "-DCPPUNIT_PLUGIN_EXPORT=__attribute__ ((visibility (\"default\")))" )
 	ENDIF(USE_CUTI_INTEGRATION AND APPLE)

 	target_link_libraries(${target} PRIVATE debug ${CUTI_LIBRARIES_DEBUG} ${testee})


Appveyor:

Appveyor:

- Update glew to version 2.1.0 on Windows
- Done some cleanup on the glew get file on Windows

--- cmake/get-glew.cmake
+++ cmake/get-glew.cmake
@@ -6,19 +6,18 @@

 include(ExternalProject)

-set(GLEW_VERSION "2.0.0")
+set(GLEW_VERSION "2.1.0")

 # For Windows it's faster to download the pre-compiled development binaries.
 if (WIN32)
-
-  if(MSVC) # download pre-compiled dev package for Visual C++ 32/64-bit

     ExternalProject_Add(
       glew
       PREFIX              ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
-      URL                 https://github.com/nigels-com/glew/releases/download/glew-${GLEW_VERSION}/glew-${GLEW_VERSION}-win32.zip
-      URL_MD5             7a11b325d21b610c8ded673719740619
+      #URL                 https://github.com/nigels-com/glew/releases/download/glew-${GLEW_VERSION}/glew-${GLEW_VERSION}-win32.zip Download link is broken
+      URL                 http://downloads.sourceforge.net/project/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}/glew-${GLEW_VERSION}-win32.zip
+      URL_MD5             32a72e6b43367db8dbea6010cd095355
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""
       INSTALL_COMMAND
@@ -27,14 +26,6 @@
         COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/glew/include/GL          ${DEPENDENCY_INSTALL_DIR}/include/GL
     )

-  endif(MSVC)
-
-  if(MINGW) # download pre-compiled dev package for MinGW 32/64-bit
-
-    # TODO
-
-  endif(MINGW)
-
 else() # build from source

   # TODO


Link with libc++ when compiling with Clang

--- toolchains/linux.cmake
+++ toolchains/linux.cmake
@@ -1,5 +1,5 @@
 # options
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -stdlib=libc++")
 set(CXX_FLAGS_DEBUG "-g -O0")
 set(EXECUTABLE_NAME "tangram")


Reverse the lib order so things are linked to properly

--- tools/cmake/ANHLibrary.cmake
+++ tools/cmake/ANHLibrary.cmake
@@ -150,15 +150,16 @@
             )
         endif()

+        IF(_project_deps_list_length GREATER 0)
+            list(REVERSE ANHLIB_DEPENDS)
+            ADD_DEPENDENCIES(${name}_test ${ANHLIB_DEPENDS})
+        ENDIF()
+
         TARGET_LINK_LIBRARIES(${name}_test
             ${ANHLIB_DEPENDS}
             ${GTEST_BOTH_LIBRARIES}
             ${GMOCK_LIBRARIES})
         add_dependencies(${name}_test DEPS)
-
-        IF(_project_deps_list_length GREATER 0)
-            ADD_DEPENDENCIES(${name}_test ${ANHLIB_DEPENDS})
-        ENDIF()

         IF(_debug_list_length GREATER 0)
             FOREACH(debug_library ${ANHLIB_DEBUG_LIBRARIES})


cmake: Default TCAM_INTERNAL_ARAVIS to ON

--- CMakeOptions.cmake
+++ CMakeOptions.cmake
@@ -25,7 +25,7 @@
 option(BUILD_TESTS    "Build tests."                         OFF)

-option(TCAM_INTERNAL_ARAVIS "Use internal aravis dependency instead of system libraries" OFF)
+option(TCAM_INTERNAL_ARAVIS "Use internal aravis dependency instead of system libraries" ON)
 option(TCAM_ARAVIS_USB_VISION "Use aravis usb vision backend. Disables v4l2." OFF)
 option(TCAM_DOWNLOAD_MESON "Download version of meson for compilation purposes" OFF)


Add ability to specify FFTW3 by hand

Add ability to specify FFTW3 by hand

--- modules/FindFFTW3.cmake
+++ modules/FindFFTW3.cmake
@@ -10,6 +10,10 @@
 #  FFTW3_LONGDOUBLE_FOUND - Set if FFTW3 exists in double precision format.

 if(NOT FFTW3_FOUND)
+  if(FFTW3_INCLUDE_DIR AND FFTW3_LIBRARIES)
+    set(FFTW3_FOUND)
+    return()
+  endif()

   if(fftw3_FIND_COMPONENTS)
       set(FFTW3_FIND_COMPONENTS ${fftw3_FIND_COMPONENTS})


update comment on custom command

update comment on custom command

--- tools/cmake/mbed_set_post_build.cmake
+++ tools/cmake/mbed_set_post_build.cmake
@@ -97,8 +97,7 @@
             COMMAND
                 ${CMAKE_COMMAND} -E rename "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map" "${CMAKE_CURRENT_BINARY_DIR}/${target}${CMAKE_EXECUTABLE_SUFFIX}.map.old"
             COMMENT
-                "executable:"
-            VERBATIM
+                "rename mapfile .map to .map.old for memap.py ram/rom diff statistics"
         )
     endif()


Add preproc definition for the main.f90 build

--- test/module_test.cmake
+++ test/module_test.cmake
@@ -67,7 +67,9 @@
 # Build the original code and the transformed code
 add_executable (${EXECUTABLE_ORIGINAL} EXCLUDE_FROM_ALL ${ORIGINAL_FILE} main.f90)
 add_executable (${EXECUTABLE_TRANSFORMED_CPU} EXCLUDE_FROM_ALL ${OUTPUT_FILE_CPU} main.f90)
+target_compile_definitions(${EXECUTABLE_TRANSFORMED_CPU} PRIVATE -D_CLAW)
 add_executable (${EXECUTABLE_TRANSFORMED_GPU} EXCLUDE_FROM_ALL ${OUTPUT_FILE_GPU} main.f90)
+target_compile_definitions(${EXECUTABLE_TRANSFORMED_GPU} PRIVATE -D_CLAW)

 if(NOT IGNORE_TEST)
   # Compare reference transformed code and output of the transformation


Added a indirection to the test build system to ensure that test executable do not get deleted if a test failed.

--- test/test_driver.cmake
+++ test/test_driver.cmake
@@ -9,6 +9,8 @@
     COMMENT "All tests were successful!" VERBATIM
 )

+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/stamps)
+
 # will compile and run ${test_target}.cpp
 # and add all further arguments as dependencies
 macro(run_test test_target)
@@ -17,23 +19,44 @@
     set(multiValueArgs DEPS BIN_DEPS)
     cmake_parse_arguments(TEST_TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

-    add_executable(${test_target}
+    # The test executable itself
+    add_executable(${test_target}_testrunner
         EXCLUDE_FROM_ALL
         test_driver.cpp
         ${test_target}.cpp
     )
-    target_link_libraries(${test_target}
+    target_link_libraries(${test_target}_testrunner
         gtest
         glog
         ${TEST_TARGET_DEPS}
     )
+
+    # Runs the test and generates a stamp file on success.
     add_custom_command(
-        TARGET ${test_target}
-        POST_BUILD
-        COMMAND ${test_target} #cmake 2.6 required
-        WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
-        COMMENT "Running ${test_target} ..." VERBATIM
+        OUTPUT
+            stamps/${test_target}_testrunner.stamp
+        DEPENDS
+            ${test_target}_testrunner
+        COMMAND
+            ${test_target}_testrunner
+        COMMAND
+            cmake -E touch ${CMAKE_CURRENT_BINARY_DIR}/stamps/${test_target}_testrunner.stamp
+        WORKING_DIRECTORY
+            "${CMAKE_BINARY_DIR}"
+        COMMENT
+            "Running test ${test_target} ..."
+        VERBATIM
     )
+
+    # The test target. Depends on the stamp file to ensure the
+    # test is only run if the source changed
+    add_custom_target(
+        ${test_target}
+        DEPENDS
+            stamps/${test_target}_testrunner.stamp
+    )
+
+    # Hook into check target
     add_custom_command(
         TARGET check
         PRE_BUILD


Flagging an error if CUDA 2.2 or older is used.

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

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -8,7 +8,12 @@
     # If CUDA is enabled, set it up
     if (ENABLE_CUDA)
         # the package is needed
-        find_package(CUDA REQUIRED)
+        find_package(CUDA REQUIRED REQUIRED)
+
+        if (${CUDA_VERSION} VERSION_LESS 2.3)
+            message(SEND_ERROR "CUDA 2.2 and older are not supported")
+        endif (${CUDA_VERSION} VERSION_LESS 2.3)
+
         include_directories(${CUDA_INCLUDE_DIRS})

         # hide some variables users don't need to see


fix: Reset also internal _?<Pkg> variables and unset uncached variables [BASIS]

--- CMake/Basis/CommonTools.cmake
+++ CMake/Basis/CommonTools.cmake
@@ -510,7 +510,7 @@
         basis_update_value (DEPENDS_${PKG}_DIR "${_BFP_PREFIX}")
       endif ()
       # --------------------------------------------------------------------
-      # reset <PKG>[_-]* cache entries when DEPENDS_<PKG>_DIR has changed
+      # reset _?<PKG>[_-]* cache entries when DEPENDS_<PKG>_DIR has changed
       if (_DEPENDS_${PKG}_DIR AND DEPENDS_${PKG}_DIR)
         if (NOT "^${_DEPENDS_${PKG}_DIR}$" STREQUAL "^${DEPENDS_${PKG}_DIR}$")
           set (${PKG}_FOUND FALSE) # need to start a new search
@@ -520,11 +520,10 @@
             if (_BFP_VAR MATCHES "^${PKG_RE}[_-]")
               basis_is_cached (_BFP_CACHED ${_BFP_VAR})
               if (_BFP_CACHED)
-                get_property (_BFP_TYPE CACHE ${_BFP_VAR} PROPERTY TYPE)
-                if (NOT "^${_BFP_TYPE}$" STREQUAL "^INTERNAL$")
-                  set_property (CACHE ${_BFP_VAR} PROPERTY VALUE "${_BFP_VAR}-NOTFOUND")
-                  set_property (CACHE ${_BFP_VAR} PROPERTY TYPE  INTERNAL)
-                endif ()
+                set_property (CACHE ${_BFP_VAR} PROPERTY VALUE "${_BFP_VAR}-NOTFOUND")
+                set_property (CACHE ${_BFP_VAR} PROPERTY TYPE  INTERNAL)
+              else ()
+                unset (${_BFP_VAR})
               endif ()
             endif ()
           endforeach ()


COMP: Update ResampleDTI version for windows compilation (fix MODULE_IMPORT)

--- CMake/FindExternalTools.cmake
+++ CMake/FindExternalTools.cmake
@@ -474,7 +474,7 @@
 # ===== ResampleDTIlogEuclidean =====================================================
 set( SourceCodeArgs
   GIT_REPOSITORY "${git_protocol}://github.com/NIRALUser/ResampleDTIlogEuclidean.git"
-  GIT_TAG "0742e96d312469d8dbb33d40900064f22fb01a06" # 01/31/2013 fix comp with ITK4.4 + stat lib windows linkage error # "e78a9ea00d73a11cc52b3c457e32f1302a3403d4" # 12/20/2012
+  GIT_TAG "84e691a0600128dbe1e9d41a80336e7083e73fa7" # 02/04/2013 fix comp with ITK4.4 + stat lib windows linkage error # "e78a9ea00d73a11cc52b3c457e32f1302a3403d4" # 12/20/2012
 #  URL "http://www.insight-journal.org/download/sourcecode/742/11/SourceCode11_ResampleDTIInsightJournal2.tar.gz"
 # http://github.com/midas-journal/midas-journal-742/tree/master/ResampleDTIInsightJournal
   )


ENH: Add install rules for External Module Python package

When building Python packages with scikit-build, only install required Python
module package files.

The build scripts in the ITKPythonPackage repository will set
WRAP_ITK_INSTALL_COMPONENT_IDENTIFIER to PythonWheel. We only install these
components, then return in the cmake_install.cmake script.

scikit-build sets CMAKE_INSTALL_PREFIX to the wheel directory.

Change-Id: I5b7dddbf70db46547a45b351497aed7f9ab11869

--- CMake/ITKModuleExternal.cmake
+++ CMake/ITKModuleExternal.cmake
@@ -13,6 +13,19 @@

 # To hide dependent variables
 include( CMakeDependentOption )
+
+# Install rules when creating a Python package with scikit-build
+if(SKBUILD)
+  set(PY_SITE_PACKAGES_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH "The install prefix for python package contents")
+  install(CODE "
+    unset(CMAKE_INSTALL_COMPONENT)
+    set(COMPONENT \"PythonWheelRuntimeLibraries\")
+    set(CMAKE_INSTALL_DO_STRIP 1)
+    include\(\"${PROJECT_BINARY_DIR}/cmake_install.cmake\")
+    unset(CMAKE_INSTALL_COMPONENT)
+    return()
+")
+endif()

 # Setup build locations.
 if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)


Warnings as errors on visual studio

Warnings as errors on visual studio

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -77,7 +77,7 @@
 	#  But this works, and gets put in the proper place in the project.]
 	set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_ITERATOR_DEBUG_LEVEL=2")
 	# Enable parallel builds:
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /WX")
 	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")  # is this needed?
 	set(CMAKE_DEBUG_POSTFIX "d")


Allow commandline Cpack generator setting arguments to override default so we are not forced to always build debs on rpm based systems or vise versa

Former-commit-id: a5d1c1cc022203a11cab159abff1cf43beb8f288

--- src/gop/cmake/LStoreCommon.cmake
+++ src/gop/cmake/LStoreCommon.cmake
@@ -123,8 +123,12 @@
 # Below is used for building packages
 set(CPACK_PACKAGE_NAME "accre-${LSTORE_PROJECT_NAME}")
 set(CPACK_PACKAGE_VERSION "${LSTORE_PROJECT_VERSION}")
-set(CPACK_GENERATOR "RPM;DEB")
-set(CPACK_SOURCE_GENERATOR "RPM;DEB")
+if(NOT DEFINED CPACK_GENERATOR)
+    set(CPACK_GENERATOR "RPM;DEB")
+endif(NOT DEFINED CPACK_GENERATOR)
+if(NOT DEFINED CPACK_SOURCE_GENERATOR)
+    set(CPACK_SOURCE_GENERATOR "RPM;DEB")
+endif(NOT DEFINED CPACK_SOURCE_GENERATOR)
 set(CPACK_PACKAGE_RELEASE ${LSTORE_PROJECT_REVISION})
 set(CPACK_PACKAGE_CONTACT "Andrew Melo or Alan Tackett")
 set(CPACK_PACKAGE_VENDOR "Advanced Computing Center for Research and Education, Vanderbilt University")


Revert "binding.gyp.cmake: Fix npm builds by stopping dependency on json-c"

This reverts commit 50213f97bc11b351ad28a01b010746c0436d66c3. This sets
JSONPLAT during compilation and doesn't disable it during cmake's configure
process which is done by jenkins. This means that mraa_init_platform_json never
gets define since it's under an #ifndef

--- src/javascript/binding.gyp.cmake
+++ src/javascript/binding.gyp.cmake
@@ -33,7 +33,6 @@
         'SWIGJAVASCRIPT',
         'FIRMATA=ON',
         'ONEWIRE=ON',
-        'JSONPLAT=OFF',
         'BUILDING_NODE_EXTENSION=1',
         'SWIG_V8_VERSION=0x0<(v8_version)',
         'V8_VERSION=0x0<(v8_version)'


(CMAKE) Remove uneeded lm4f120xl.cmake file.

--- backends/ti/lm4f120xl/cmake/lm4f120xl.cmake
+++ backends/ti/lm4f120xl/cmake/lm4f120xl.cmake
@@ -1,31 +0,0 @@
-set (LM4F120_ROOT_DIR		"${CMAKE_CURRENT_LIST_DIR}/../")
-set (TIX_ROOT_DIR		"${CMAKE_CURRENT_LIST_DIR}/../../generic_code/")
-
-# hal files for lm4f120
-set (HAL_IMPLEMENTED_LED 			) # no available led
-set (HAL_IMPLEMENTED_CLOCK			${BASE_HAL_DIR}/ClockInterface.hpp)
-set (HAL_IMPLEMENTED_UART			${TIX_ROOT_DIR}/hal/hal_tix_uart.hpp)
-set (HAL_IMPLEMENTED_GPIO			${TIX_ROOT_DIR}/hal/hal_tix_gpio.hpp)
-set (HAL_IMPLEMENTED_SPI			${TIX_ROOT_DIR}/hal/hal_tix_spi.hpp)
-set (HAL_IMPLEMENTED_I2C			${TIX_ROOT_DIR}/hal/hal_tix_i2c.hpp)
-
-
-#configure TI lib to use LM4F120H5QR
-add_definitions(-DPART_LM4F120H5QR)
-
-# maybe put this in extra cmake
-include(${TIX_ROOT_DIR}/cmake/tix.cmake)
-
-set (GDBINIT_CONTENT
-"target remote localhost:3333
-monitor reset init
-")
-
-set (OPENOCDCFG_CONTENT
-"source [find board/ek-lm4f120xl.cfg]
-")
-
-
-file (WRITE ${CMAKE_BINARY_DIR}/.gdbinit ${GDBINIT_CONTENT})
-file (WRITE ${CMAKE_BINARY_DIR}/openocd.cfg ${OPENOCDCFG_CONTENT})
-


SuperBuild: shark: allow extra user option to link with pthread

--- SuperBuild/CMake/External_shark.cmake
+++ SuperBuild/CMake/External_shark.cmake
@@ -9,6 +9,14 @@

 ADD_SUPERBUILD_CMAKE_VAR(SHARK Boost_INCLUDE_DIR)
 ADD_SUPERBUILD_CMAKE_VAR(SHARK BOOST_LIBRARYDIR)
+
+#shark master branch has a fix to avoid explicit link with libs
+#but tag 3.3 which we use still need a fix.
+if(UNIX)
+  set(SHARK_SB_CONFIG_USER "" CACHE STRING "Extra options to be passed to shark cmake configure cache")
+  mark_as_advanced(SHARK_SB_CONFIG_USER)
+  list(APPEND SHARK_SB_CONFIG "${SHARK_SB_CONFIG_USER}")
+endif()

 ExternalProject_Add(SHARK
   PREFIX SHARK


Change so that different flavours of VTK might be chosen by the user.

--- Examples/Build/vtkMy/vtkMy.cmake
+++ Examples/Build/vtkMy/vtkMy.cmake
@@ -7,7 +7,7 @@
 IF (USE_VTK_FILE)
   INCLUDE (${USE_VTK_FILE})
 ELSE (USE_VTK_FILE)
-  MESSAGE("Error. Unable to find VTK, please edit your CMakeCache.txt file to specify the correct location of your VTK build.")
+  MESSAGE("Warning. This project is supposed to work with VTK, which might be found on your system as different flavours: installed VTK, or (multiple) built VTK. Please, make sure that the VTK_INSTALL_PATH or VTK_BINARY_PATH setting reflect which VTK you are planning to use, then set one of the USE_INSTALLED_VTK or USE_BUILT_VTK to ON.")
   SET (VTKMY_CAN_BUILD 0)
 ENDIF (USE_VTK_FILE)

@@ -32,9 +32,13 @@
 # Defaults to the same VTK setting.
 #

-OPTION(BUILD_SHARED_LIBS
-       "Build with shared libraries."
-       ${VTK_BUILD_SHARED_LIBS})
+IF (VTKMY_CAN_BUILD)
+
+  OPTION(BUILD_SHARED_LIBS
+         "Build with shared libraries."
+         ${VTK_BUILD_SHARED_LIBS})
+
+ENDIF (VTKMY_CAN_BUILD)

 #
 # Wrap Tcl, Java, Python


If DirectX SDK is not searched for or not found, DIRECT3D_LIBRARIES is not defined. Use hardcoded library names in that case. Closes #504.

--- Source/CMake/Modules/Urho3D-CMake-common.cmake
+++ Source/CMake/Modules/Urho3D-CMake-common.cmake
@@ -712,7 +712,7 @@
                 list (APPEND ABSOLUTE_PATH_LIBS ${DIRECT3D_LIBRARIES})
             else ()
                 # If SDK not found, assume the libraries are found from default directories
-                list (APPEND LINK_LIBS_ONLY ${DIRECT3D_LIBRARIES})
+                list (APPEND LINK_LIBS_ONLY d3d9 d3dcompiler)
             endif ()
         endif ()