fix: Add MSVC /bigobj option and use CMake BASIS GenerateExportHeader module

--- CMake/Modules/mirtkAddLibrary.cmake
+++ CMake/Modules/mirtkAddLibrary.cmake
@@ -24,6 +24,7 @@
 # ------------------------------------------------------------------------------
 ## Add MIRTK module library
 function(mirtk_add_library)
+  # Parse arguments
   if (NOT PROJECT_NAME)
     message(FATAL_ERROR "mirtk_add_library called outside project scope!")
   endif ()
@@ -67,8 +68,10 @@
   if (TARGET_AUTO_REGISTER AND BUILD_SHARED_LIBS)
     target_compile_definitions(${target_uid} PRIVATE MIRTK_AUTO_REGISTER)
   endif ()
-  # Generate export header file and set WINDOWS_EXPORT_ALL_SYMBOLS target property
-  include(GenerateExportHeader)
+  # VTK 7.0.0 adds its CMake modules directory to CMAKE_MODULE_PATH
+  # and this directory contains a GenerateExportHeader.cmake module
+  include("${BASIS_MODULE_PATH}/GenerateExportHeader.cmake")
+  # Generate MIRTK<Module>Export.h file
   generate_export_header(${target_uid}
     PREFIX_NAME              "MIRTK_"
     BASE_NAME                "${PROJECT_NAME}"
@@ -78,64 +81,60 @@
     NO_DEPRECATED_MACRO_NAME "${PROJECT_NAME}_NO_DEPRECATED"
     STATIC_DEFINE            "${PROJECT_NAME}_STATIC_DEFINE"
     EXPORT_FILE_NAME         "${BINARY_INCLUDE_DIR}/mirtk${PROJECT_NAME}Export.h"
-    DEFINE_NO_DEPRECATED
   )
-  if (WIN32 AND BUILD_SHARED_LIBS)
-    if (CMAKE_VERSION VERSION_LESS 3.4)
-      message(FATAL_ERROR "Build of DLLs on Windows (BUILD_SHARED_LIBS=ON) requires CMake version 3.4 or greater!")
+  if (BUILD_SHARED_LIBS)
+    if (WIN32)
+      if (CMAKE_VERSION VERSION_LESS 3.4)
+        message(FATAL_ERROR "Build of DLLs on Windows (BUILD_SHARED_LIBS=ON) requires CMake version 3.4 or greater!")
+      endif ()
+      set_target_properties(${target_uid} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
     endif ()
-    set_target_properties(${target_uid} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
+    if (MSVC)
+      target_compile_options(${target_uid} PRIVATE /bigobj)
+    endif ()
+  else ()
+    target_compile_definitions(${target_uid} PRIVATE MIRTK_${PROJECT_NAME}_STATIC_DEFINE)
   endif ()
   # Add link dependencies and record all directories containing
   # external/imported library files for [DY]LD_LIBRARY_PATH
   # setting in "mirtk" command execution script
-  if (NOT COMMAND mirtk_get_target_name)
-    include("${MIRTK_MODULE_PATH}/mirtkGetTargetName.cmake")
-  endif ()
-  set(keyword)
-  foreach (dep IN LISTS TARGET_DEPENDS)
-    if (dep MATCHES "^(debug|optimized|general)$")
-      set(keyword ${dep})
-    else ()
-      mirtk_get_target_name(dep_name ${dep})
-      if (TARGET ${dep_name})
-        get_property(type TARGET ${dep_name} PROPERTY TYPE)
-        if (type MATCHES LIBRARY)
-          target_link_libraries(${target_name} ${keyword} ${dep_name})
-          get_property(is_imported TARGET ${dep_name} PROPERTY IMPORTED)
-          if (is_imported)
-            basis_get_target_location(dep_path ${dep_name} PATH)
-            if (dep_path)
-              set_property(GLOBAL APPEND PROPERTY MIRTK_LIBRARY_PATH ${dep_path})
+  if (TARGET_DEPENDS)
+    if (NOT COMMAND mirtk_get_target_name)
+      include("${MIRTK_MODULE_PATH}/mirtkGetTargetName.cmake")
+    endif ()
+    set(keyword)
+    foreach (dep IN LISTS TARGET_DEPENDS)
+      if (dep MATCHES "^(debug|optimized|general)$")
+        set(keyword ${dep})
+      else ()
+        mirtk_get_target_name(dep_name ${dep})
+        if (TARGET ${dep_name})
+          get_property(type TARGET ${dep_name} PROPERTY TYPE)
+          if (type MATCHES LIBRARY)
+            target_link_libraries(${target_name} ${keyword} ${dep_name})
+            get_property(is_imported TARGET ${dep_name} PROPERTY IMPORTED)
+            if (is_imported)
+              basis_get_target_location(dep_path ${dep_name} PATH)
+              if (dep_path)
+                set_property(GLOBAL APPEND PROPERTY MIRTK_LIBRARY_PATH ${dep_path})
+              endif ()
             endif ()
+          else ()
+            add_dependencies(${target_name} ${dep_name})
           endif ()
         else ()
-          add_dependencies(${target_name} ${dep_name})
+          target_link_libraries(${target_name} ${keyword} ${dep_name})
+          if (IS_ABSOLUTE "${dep_name}")
+            get_filename_component(dep_path "${dep_name}" PATH)
+            set_property(GLOBAL APPEND PROPERTY MIRTK_LIBRARY_PATH ${dep_path})
+          endif ()
         endif ()
-      else ()
-        target_link_libraries(${target_name} ${keyword} ${dep_name})
-        if (IS_ABSOLUTE "${dep_name}")
-          get_filename_component(dep_path "${dep_name}" PATH)
-          set_property(GLOBAL APPEND PROPERTY MIRTK_LIBRARY_PATH ${dep_path})
-        endif ()
+        set(keyword)
       endif ()
-      set(keyword)
-    endif ()
-  endforeach ()
-  # Remove duplicates from MIRTK_LIBRARY_PATH
-  get_property(ldpath GLOBAL PROPERTY MIRTK_LIBRARY_PATH)
-  list(REMOVE_DUPLICATES ldpath)
-  set_property(GLOBAL PROPERTY MIRTK_LIBRARY_PATH "${ldpath}")
-  include(GenerateExportHeader)
-  generate_export_header(${target_uid}
-    PREFIX_NAME              "MIRTK_"
-    BASE_NAME                "${PROJECT_NAME}"
-    EXPORT_MACRO_NAME        "${PROJECT_NAME}_EXPORT"
-    NO_EXPORT_MACRO_NAME     "${PROJECT_NAME}_NO_EXPORT"
-    DEPRECATED_MACRO_NAME    "${PROJECT_NAME}_DEPRECATED"
-    NO_DEPRECATED_MACRO_NAME "${PROJECT_NAME}_NO_DEPRECATED"
-    STATIC_DEFINE            "${PROJECT_NAME}_STATIC_DEFINE"
-    EXPORT_FILE_NAME         "${BINARY_INCLUDE_DIR}/mirtk${PROJECT_NAME}Export.h"
-    DEFINE_NO_DEPRECATED
-  )
+    endforeach ()
+    # Remove duplicates from MIRTK_LIBRARY_PATH
+    get_property(ldpath GLOBAL PROPERTY MIRTK_LIBRARY_PATH)
+    list(REMOVE_DUPLICATES ldpath)
+    set_property(GLOBAL PROPERTY MIRTK_LIBRARY_PATH "${ldpath}")
+  endif ()
 endfunction()


- optimization cmake

 - optimization cmake

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

--- rdo/packages/cmake/trunk/add_boost_test.cmake
+++ rdo/packages/cmake/trunk/add_boost_test.cmake
@@ -10,7 +10,6 @@
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
 INCLUDE_DIRECTORIES(${RDO_BASE_DIRECTORY})

-FIND_PACKAGE(Boost COMPONENTS unit_test_framework REQUIRED)
 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})

 ADD_EXECUTABLE(${ARGV0} ${ARGN})


sdl use target if exists

sdl use target if exists

--- cmake/Dependencies_core.cmake
+++ cmake/Dependencies_core.cmake
@@ -57,12 +57,12 @@

 #set(CMAKE_FIND_DEBUG_MODE TRUE)
 # SDL2
-find_package(SDL2 REQUIRED)
-
-PackageHelper(SDL2 ${SDL2_FOUND} "${SDL2_INCLUDE_DIR}" "${SDL2_LIBRARY}")
-
-#PackageHelperTarget(SDL2::SDL2 SDL2_FOUND)
-#PackageHelperTarget(SDL2::SDL2main SDL2_FOUND)
+if(TARGET SDL2)
+  PackageHelperTarget(SDL2 SDL2_FOUND)
+else()
+  find_package(SDL2 REQUIRED)
+  PackageHelper(SDL2 ${SDL2_FOUND} "${SDL2_INCLUDE_DIR}" "${SDL2_LIBRARY}")
+endif()

 if (SDL2_FOUND)
   SET(SAIGA_USE_SDL 1)


Fix bootstrapper build directory removal

--- cmake/bootstrap/windows.cmake
+++ cmake/bootstrap/windows.cmake
@@ -47,7 +47,7 @@
   file(MAKE_DIRECTORY ${BUILD_DIR})
   if(_arg_DIR AND EXISTS ${BUILD_DIR}/${_arg_DIR})
     message(STATUS "Removing: ${_arg_DIR}")
-    file(REMOVE_RECURSE ${_arg_DIR})
+    file(REMOVE_RECURSE ${BUILD_DIR}/${_arg_DIR})
   endif()
   message(STATUS "Extracting: ${_name}")
   execute_process(COMMAND ${CMAKE_COMMAND} -E tar xz ${CACHE_DIR}/${_name} WORKING_DIRECTORY ${BUILD_DIR})
@@ -61,7 +61,7 @@
   file(MAKE_DIRECTORY ${BUILD_DIR})
   if(_arg_DIR AND EXISTS ${BUILD_DIR}/${_arg_DIR})
     message(STATUS "Removing: ${_arg_DIR}")
-    file(REMOVE_RECURSE ${_arg_DIR})
+    file(REMOVE_RECURSE ${BUILD_DIR}/${_arg_DIR})
   endif()
   execute_process(COMMAND ${GIT_EXECUTABLE} clone ${_url} WORKING_DIRECTORY ${BUILD_DIR})
 endfunction()


[cmake] indent

[cmake] indent

--- cmake/modules/DuneUtils.cmake
+++ cmake/modules/DuneUtils.cmake
@@ -119,9 +119,9 @@
 	file( GLOB test_sources "${CMAKE_CURRENT_SOURCE_DIR}/*.cc" )
 	foreach( source ${test_sources} )
 		get_filename_component(testname ${source} NAME_WE)
-                add_executable( test_${testname} ${source} ${COMMON_HEADER} )
-		add_test( test_${testname} ${CMAKE_CURRENT_BINARY_DIR}/test_${testname} )
-                target_link_libraries( test_${testname} ${ARGN} ${COMMON_LIBS} ${GRID_LIBS} gtest_dune_stuff )
+    add_executable( test_${testname} ${source} ${COMMON_HEADER} )
+    target_link_libraries( test_${testname} ${ARGN} ${COMMON_LIBS} ${GRID_LIBS} gtest_dune_stuff )
+    add_test( test_${testname} ${CMAKE_CURRENT_BINARY_DIR}/test_${testname} )
 		list(APPEND testnames test_${testname} )
 	endforeach( source )
 endmacro(BEGIN_TESTCASES)
@@ -130,12 +130,12 @@
     add_directory_test_target(_test_target)
     add_dependencies(${_test_target} ${testnames})
     foreach( test ${testnames} )
-    add_dune_mpi_flags(${test})
-    add_dune_alugrid_flags(${test})
-    if(COMMAND add_dune_tbb_flags)
+      add_dune_mpi_flags(${test})
+      add_dune_alugrid_flags(${test})
+      if(COMMAND add_dune_tbb_flags)
         add_dune_tbb_flags(${test})
-    endif()
-    endforeach( test ${testnames} )
+      endif()
+     endforeach( test ${testnames} )
 	add_custom_target(test_binaries DEPENDS ${testnames})
 	add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --timeout ${DUNE_TEST_TIMEOUT}
                   DEPENDS test_binaries)


add tarball package target in any case

add tarball package target in any case

--- cmake/packages/packages.cmake
+++ cmake/packages/packages.cmake
@@ -65,6 +65,9 @@
   set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}")
   include(packages/nsis)
   include(packages/tar)
+else ()
+  set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}")
+  include(packages/tar)
 endif ()


[FIX] Adjusting colornvcc path from misc to util.

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -398,7 +398,7 @@
                         ${ARGN})
   if (SEQAN_HAS_CUDA)
     # Wrap nvcc to make cudafe output gcc-like.
-    find_program (COLOR_NVCC colornvcc PATHS ${CMAKE_SOURCE_DIR}/misc NO_DEFAULT_PATH)
+    find_program (COLOR_NVCC colornvcc PATHS ${CMAKE_SOURCE_DIR}/util NO_DEFAULT_PATH)
     set (CUDA_NVCC_EXECUTABLE ${COLOR_NVCC})

     # Build CUDA targets from the given architecture upwards.


PROTON-2154: fixup

PROTON-2154: fixup

--- c/versions.cmake
+++ c/versions.cmake
@@ -9,6 +9,6 @@
 set(PN_LIB_PROACTOR_VERSION "${PN_LIB_PROACTOR_MAJOR_VERSION}.${PN_LIB_PROACTOR_MINOR_VERSION}.${PN_LIB_PROACTOR_PATCH_VERSION}")

 set(PN_LIB_LEGACY_MAJOR_VERSION 11)
-set(PN_LIB_LEGACY_MINOR_VERSION 10
+set(PN_LIB_LEGACY_MINOR_VERSION 10)
 set(PN_LIB_LEGACY_PATCH_VERSION 0)
 set(PN_LIB_LEGACY_VERSION "${PN_LIB_LEGACY_MAJOR_VERSION}.${PN_LIB_LEGACY_MINOR_VERSION}.${PN_LIB_LEGACY_PATCH_VERSION}")


disable the webkit stuff

disable the webkit stuff

--- superbuild/Projects/vtk.cmake
+++ superbuild/Projects/vtk.cmake
@@ -12,6 +12,9 @@
 add_external_project(vtk
   CMAKE_ARGS
     -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-    -DVTK_Group_Qt:bool=ON
+    -DModule_vtkGUISupportQt:bool=ON
+    -DModule_vtkGUISupportQtOpenGL:bool=ON
+    -DModule_vtkRenderingQt:bool=ON
+    -DModule_vtkViewsQt:bool=ON
   ${suppress_build_out}
 )


Point to Paraview sources version 5.1.2

Point to Paraview sources version 5.1.2

--- Superbuild/versions.cmake
+++ Superbuild/versions.cmake
@@ -36,10 +36,10 @@
   GIT_REPOSITORY git://github.com/commontk/PythonQt.git
   GIT_TAG patched-3)

-set(PARAVIEW_VERSION 4.4)
+set(PARAVIEW_VERSION 5.1)
 add_revision(paraview
   GIT_REPOSITORY git@gitlab.kitware.com:bjacquet/paraview.git
-  GIT_TAG c4f38ffe17d2f95f4a634a7ad6ffbcf996ebb54f)
+  GIT_TAG origin/veloview)

 add_revision(veloview
     SOURCE_DIR ${CMAKE_SOURCE_DIR}/..


Fixed Google Drive download urls

Fixed Google Drive download urls

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -1188,7 +1188,7 @@
   PREFIX ${EXTRAE_PREFIX}
   DOWNLOAD_DIR ${EXTRAE_PREFIX}/download
   DOWNLOAD_COMMAND
-      wget -O extrae-2.5.0.tar.bz2 https://docs.google.com/uc?authuser=0&id=0BySPYa0lPpaYUjQwcWcxV1JVZEk&export=download&revid=0BySPYa0lPpaYdTlISFRhVW02RFd5TWcyL00yZWRZbWdlZzFNPQ &&
+      wget -O extrae-2.5.0.tar.bz2 https://docs.google.com/uc?id=0BySPYa0lPpaYUjQwcWcxV1JVZEk&export=download &&
       gpg --verify ${THIRD_PARTY_SOURCE_DIR}/extrae-2.5.0.tar.bz2.sig
           extrae-2.5.0.tar.bz2 &&
       cd <SOURCE_DIR> &&
@@ -1232,7 +1232,7 @@
   PREFIX ${FREETYPE_PREFIX}
   DOWNLOAD_DIR ${FREETYPE_PREFIX}/download
   DOWNLOAD_COMMAND
-      wget -O freetype-2.5.3.tar.bz2 https://docs.google.com/uc?authuser=0&id=0BySPYa0lPpaYNldReHU4dUMwWk0&export=download&revid=0BySPYa0lPpaYd0UxeGdMN0NZOHlGd0c0ZGozSWZ0bDNaMzl3PQ &&
+      wget -O freetype-2.5.3.tar.bz2 https://docs.google.com/uc?id=0BySPYa0lPpaYNldReHU4dUMwWk0&export=download &&
       gpg --verify ${THIRD_PARTY_SOURCE_DIR}/freetype-2.5.3.tar.bz2.sig
           freetype-2.5.3.tar.bz2 &&
       cd <SOURCE_DIR> &&


fix link gtest in nv_test

fix link gtest in nv_test

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -144,10 +144,8 @@
     set(multiValueArgs SRCS DEPS)
     cmake_parse_arguments(nv_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
     cuda_add_executable(${TARGET_NAME} ${nv_test_SRCS})
-    if(nv_test_DEPS)
-      target_link_libraries(${TARGET_NAME} ${nv_test_DEPS} gtest gtest_main)
-      add_dependencies(${TARGET_NAME} ${nv_test_DEPS} gtest gtest_main)
-    endif()
+    target_link_libraries(${TARGET_NAME} ${nv_test_DEPS} gtest gtest_main)
+    add_dependencies(${TARGET_NAME} ${nv_test_DEPS} gtest gtest_main)
     add_test(${TARGET_NAME} ${TARGET_NAME})
   endif()
 endfunction(nv_test)


Fix for test results checking

Fix for test results checking

--- cmake/runTest.cmake
+++ cmake/runTest.cmake
@@ -41,19 +41,19 @@
   message( FATAL_ERROR "Failed: Test program ${TEST_COMMAND} ${TEST_ARGSLIST} exited != 0. \n${TEST_ERROR}")
 endif (TEST_RESULT)

+if (TEST_TRIM_LINES)
+  message("TEST_TRIM_LINES SET TO ${TEST_TRIM_LINES} \nexecuting head -n -${TEST_TRIM_LINES} ${TEST_OUTPUT}")
+  execute_process(
+    COMMAND head -n -${TEST_TRIM_LINES} "${CMAKE_CURRENT_BINARY_DIR}/${TEST_OUTPUT}"
+    OUTPUT_VARIABLE TRIM_RESULT
+  )
+  file(WRITE ${TEST_OUTPUT}.trimmed "${TRIM_RESULT}")
+  set (TEST_OUTPUT ${TEST_OUTPUT}.trimmed)
+endif (TEST_TRIM_LINES)
+
 # now compare the output with the reference, use diff command if possible, since we can
 # use -w to ignore whitespace/line ending differences across platforms
 if (TEST_DIFF_EXECUTABLE)
-  if (TEST_TRIM_LINES)
-    message("TEST_TRIM_LINES SET TO ${TEST_TRIM_LINES} \nexecuting head -n -${TEST_TRIM_LINES} ${TEST_OUTPUT}")
-    execute_process(
-      COMMAND head -n -${TEST_TRIM_LINES} "${CMAKE_CURRENT_BINARY_DIR}/${TEST_OUTPUT}"
-      OUTPUT_VARIABLE TRIM_RESULT
-    )
-    file(WRITE ${TEST_OUTPUT}.trimmed "${TRIM_RESULT}")
-    set (TEST_OUTPUT ${TEST_OUTPUT}.trimmed)
-  endif (TEST_TRIM_LINES)
-
   # we need to un-escape spaces in the file names of executables like diff
   STRING(REPLACE "\\ " " " TEST_DIFF_EXECUTABLE "${TEST_DIFF_EXECUTABLE}")
   message("executing ${TEST_DIFF_EXECUTABLE} -w -q ${CMAKE_CURRENT_BINARY_DIR}/${TEST_OUTPUT} ${TEST_BASELINE}")


mpv: enable vulkan and shaderc

mpv: enable vulkan and shaderc

--- packages/mpv.cmake
+++ packages/mpv.cmake
@@ -19,7 +19,9 @@
         luajit
         mujs
         rubberband
+        shaderc
         uchardet
+        vulkan
         winpthreads
     GIT_REPOSITORY git://github.com/mpv-player/mpv.git
     UPDATE_COMMAND ""
@@ -43,6 +45,8 @@
         --enable-dvdread
         --enable-dvdnav
         --enable-uchardet
+        --enable-vulkan
+        --enable-shaderc
         --enable-rubberband
         --enable-lcms2
         --prefix=${MINGW_INSTALL_PREFIX}


Update the flags for C++11

Update the flags for C++11

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -1,13 +1,26 @@
 include(CheckCXXCompilerFlag)
-CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
-CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)

-if(COMPILER_SUPPORTS_CXX11)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-elseif(COMPILER_SUPPORTS_CXX0X)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-else()
-    message(SEND_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+# C++11 support in some compilers. The other compilers are supported with the
+# set(CMAKE_CXX_STANDARD 11) command in the top-level CMakeLists.txt
+set(cxx11_flag_needed OFF)
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
+    set(cxx11_flag_needed ON)
+elseif(${CMAKE_COMPILER_IS_GNUCC} AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 5.0)
+    set(cxx11_flag_needed ON)
+endif()
+
+if(${cxx11_flag_needed})
+    CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+    CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+    if(COMPILER_SUPPORTS_CXX11)
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+    elseif(COMPILER_SUPPORTS_CXXOX)
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+    else()
+        message(SEND_ERROR
+            "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support.
+            Please use a different C++ compiler.")
+    endif()
 endif()

 macro(set_debug_flag_if_possible _flag_)


Add check for c++11 support

Add check for c++11 support

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -1,3 +1,20 @@
+if (UNIX)
+  include(CheckCXXCompilerFlag)
+  check_cxx_compiler_flag("-std=c++11" tomviz_have_cxx11)
+
+  if (NOT tomviz_have_cxx11)
+    message(FATAL_ERROR "Your compiler does not support C++11.  Try again with a newer compiler")
+  endif()
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pedantic -Wshadow -Wextra")
+elseif (WIN32)
+  if (MSVC AND MSVC12)
+    set(CMAKE_CXX_FLAGS_STD_CPP)
+  else()
+    # ParaView doesn't support MSVC 2015 yet
+    message(FATAL_ERROR "Only the MSVC 2013 compiler is supported on windows.")
+  endif()
+endif()
+
 if(CMAKE_COMPILER_IS_GNUCXX)

   include(CheckCXXCompilerFlag)
@@ -11,12 +28,6 @@
   if(HAVE_GCC_ERROR_RETURN_TYPE)
     set(CMAKE_CXX_FLAGS_ERROR "-Werror=return-type")
   endif()
-  check_cxx_compiler_flag("-std=c++03" HAVE_GCC_STD_CPP_03)
-  if(HAVE_GCC_STD_CPP_03)
-    set(CMAKE_CXX_FLAGS_STD_CPP "-std=c++03 -pedantic -Wshadow -Wextra")
-  else()
-    set(CMAKE_CXX_FLAGS_STD_CPP "-ansi")
-  endif()

   # If we are compiling on Linux then set some extra linker flags too
   if(CMAKE_SYSTEM_NAME MATCHES Linux)
@@ -28,7 +39,7 @@
       "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_EXE_LINKER_FLAGS}")
   endif()

-  set(CMAKE_CXX_FLAGS_WARN "${CMAKE_CXX_FLAGS_WARN} ${CMAKE_CXX_FLAGS_STD_CPP}")
+  set(CMAKE_CXX_FLAGS_WARN "${CMAKE_CXX_FLAGS_WARN}")
   # Set up the debug CXX_FLAGS for extra warnings
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
     "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_WARN}")


Guard against empty Python_SITEARCH values

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -18,14 +18,16 @@
     set(lenMax ${len1})
   endif()
   set(idxNoPfx 0)
-  foreach(len RANGE 1 ${lenMax})
-    string(SUBSTRING "${in0}" 1 ${len} sub0)
-    string(SUBSTRING "${in1}" 1 ${len} sub1)
-    set(idxNoPfx ${len})
-    if(NOT (sub0 STREQUAL sub1))
-      break()
-    endif()
-  endforeach()
+  if(lenMax GREATER 0)
+    foreach(len RANGE 1 ${lenMax})
+      string(SUBSTRING "${in0}" 1 ${len} sub0)
+      string(SUBSTRING "${in1}" 1 ${len} sub1)
+      set(idxNoPfx ${len})
+      if(NOT (sub0 STREQUAL sub1))
+        break()
+      endif()
+    endforeach()
+  endif()
   string(SUBSTRING "${in0}" ${idxNoPfx} ${len0} outTmp)
   set(${outVar} "${outTmp}" PARENT_SCOPE)
 endfunction()


fix emacs saving typo

fix emacs saving typo

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -1,4 +1,4 @@
-=set(OPENCV_CMAKE_ARGS
+set(OPENCV_CMAKE_ARGS

   BUILD_opencv_imgcodecs=ON
   BUILD_opencv_imgproc=ON


Updated OpenCVFindMKL.cmake

Updated OpenCVFindMKL.cmake

Current version of search for MLKROOT environment variable is wrong and should be corrected to (DEFINED ENV{MKLROOT})

--- cmake/OpenCVFindMKL.cmake
+++ cmake/OpenCVFindMKL.cmake
@@ -48,7 +48,7 @@
 #check current MKL_ROOT_DIR
 if(NOT MKL_ROOT_DIR OR NOT EXISTS ${MKL_ROOT_DIR}/include/mkl.h)
     set(mkl_root_paths ${MKL_ROOT_DIR})
-    if(DEFINED $ENV{MKLROOT})
+    if(DEFINED ENV{MKLROOT})
         list(APPEND mkl_root_paths $ENV{MKLROOT})
     endif()
     if(WIN32)


Removed HAVE_CONFIG_H

Removed HAVE_CONFIG_H

Signed-off-by: Gopal, Puunithaaraj <10308ab826b56f8bbce1ec0c10bd609cace363da@intel.com>

--- cmake/ProjectConfig.cmake
+++ cmake/ProjectConfig.cmake
@@ -13,8 +13,6 @@

 FindMediaSDK()
 FindBaseLibs(BASE_LIBRARIES)
-
-add_definitions(-DHAVE_CONFIG_H)

 if(WITH_MSS_2016)
   add_definitions(-DWITH_MSS_2016)


propagate Lua include dir when compile-checking Luabind, fixes #1196

--- cmake/check_luabind.cmake
+++ cmake/check_luabind.cmake
@@ -11,10 +11,12 @@
   find_package(LuaJIT 5.2)
 endif()
 if(LUA52_FOUND)
+  set (CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIR};${LUABIND_INCLUDE_DIR};${LUA_INCLUDE_DIR}")
+  set (CMAKE_REQUIRED_LIBRARIES "${LUABIND_LIBRARY};${LUA_LIBRARY}")
   CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND_WORKS)
 endif()

-if( LUABIND_WORKS )
+if(LUABIND_WORKS)
   message(STATUS "Luabind/Lua5.2 combination working with ${LUA_LIBRARY}")
 else()
   message(STATUS "Luabind/Lua5.2 not feasible, falling back to Lua 5.1.")
@@ -30,7 +32,7 @@

   CHECK_CXX_SOURCE_COMPILES("${LUABIND_CHECK_SRC}" LUABIND51_WORKS)

-  if( LUABIND51_WORKS )
+  if(LUABIND51_WORKS)
     message(STATUS "Luabind works with Lua 5.1 at ${LUA_LIBRARY}")
   else()
     message(FATAL_ERROR	"Luabind does not work with Lua 5.1 at ${LUA_LIBRARY}, no working Luabind found")


Both OCTAVE_HAS_CAIRO and OCTAVE_HAS_GTK are made configurable by the
user with the default ON.

svn path=/trunk/; revision=13084

--- cmake/modules/ocaml.cmake
+++ cmake/modules/ocaml.cmake
@@ -2,7 +2,7 @@
 #
 # Copyright (C) 2008 Andrew Ross
 # Copyright (C) 2009 Hezekiah M. Carty
-# Copyright (C) 2009 Alan W. Irwin
+# Copyright (C) 2009-2014 Alan W. Irwin
 #
 # This file is part of PLplot.
 #
@@ -195,21 +195,21 @@
   # Test for the availability of Cairo and Gtk+ bindings
   if(OCAMLFIND)
     if(PLD_extcairo)
-      set(text_cairo "module C = Cairo")
-      file(WRITE ${CMAKE_BINARY_DIR}/test_cairo.ml ${text_cairo})
-      execute_process(
-        COMMAND ${OCAMLFIND} c -package cairo -linkpkg test_cairo.ml -o test_cairo
-        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-        RESULT_VARIABLE OCAML_HAS_CAIRO
-	OUTPUT_QUIET
-	ERROR_QUIET
-        )
-      # zero return code indicates no errors.  Thus, OCAML_HAS_CAIRO must have
-      # truth inverted.
+      option(OCAML_HAS_CAIRO "OCaml has the cairo package" ON)
       if(OCAML_HAS_CAIRO)
-	set(OCAML_HAS_CAIRO OFF)
-      else(OCAML_HAS_CAIRO)
-	set(OCAML_HAS_CAIRO ON)
+	set(text_cairo "module C = Cairo")
+	file(WRITE ${CMAKE_BINARY_DIR}/test_cairo.ml ${text_cairo})
+	execute_process(
+          COMMAND ${OCAMLFIND} c -package cairo -linkpkg test_cairo.ml -o test_cairo
+          WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+          RESULT_VARIABLE OCAML_HAS_CAIRO_RC
+	  OUTPUT_QUIET
+	  ERROR_QUIET
+          )
+	# non-zero return code indicates errors.
+	if(OCAML_HAS_CAIRO_RC)
+	  set(OCAML_HAS_CAIRO OFF CACHE BOOL "OCaml has the cairo package" FORCE)
+	endif(OCAML_HAS_CAIRO_RC)
       endif(OCAML_HAS_CAIRO)

       if(OCAML_HAS_CAIRO)
@@ -226,36 +226,43 @@
 	  else(linkflags)
             message(STATUS "WARNING:"
             "pkg-config could not find cairo module.  Disabling Plcairo module")
-	  set(OCAML_HAS_CAIRO OFF)
+	  set(OCAML_HAS_CAIRO OFF CACHE BOOL "OCaml has the cairo package" FORCE)
 	  endif(linkflags)
 	else(PKG_CONFIG_EXECUTABLE)
           message(STATUS "WARNING:"
             "pkg-config not found.  Disabling Plcairo module")
-	  set(OCAML_HAS_CAIRO OFF)
+	  set(OCAML_HAS_CAIRO OFF CACHE BOOL "OCaml has the cairo package" FORCE)
 	endif(PKG_CONFIG_EXECUTABLE)
       else(OCAML_HAS_CAIRO)
         message(STATUS "WARNING:"
           "Cairo OCaml library not found.  Disabling Plcairo module")
       endif(OCAML_HAS_CAIRO)

-      set(text_gtk
-  "module G = Gtk
+      if(OCAML_HAS_CAIRO)
+	option(OCAML_HAS_GTK "OCaml has the cairo.lablgtk2 package" ON)
+      else(OCAML_HAS_CAIRO)
+        message(STATUS "WARNING:"
+          "Cairo OCaml library not found.  Disabling lablgtk2 support")
+	  set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo.lablgtk2 package" FORCE)
+      endif(OCAML_HAS_CAIRO)
+
+      if(OCAML_HAS_GTK)
+	set(text_gtk
+	  "module G = Gtk
   module C = Cairo_lablgtk"
-        )
-      file (WRITE ${CMAKE_BINARY_DIR}/test_gtk.ml ${text_gtk})
-      execute_process(
-        COMMAND ${OCAMLFIND} c -package cairo.lablgtk2 -linkpkg test_gtk.ml -o test_gtk
-        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-        RESULT_VARIABLE OCAML_HAS_GTK
-	OUTPUT_QUIET
-	ERROR_QUIET
-        )
-      # zero return code indicates no errors.  Thus, OCAML_HAS_CAIRO must have
-      # truth inverted.
-      if(OCAML_HAS_GTK)
-	set(OCAML_HAS_GTK OFF)
-      else(OCAML_HAS_GTK)
-	set(OCAML_HAS_GTK ON)
+          )
+	file (WRITE ${CMAKE_BINARY_DIR}/test_gtk.ml ${text_gtk})
+	execute_process(
+          COMMAND ${OCAMLFIND} c -package cairo.lablgtk2 -linkpkg test_gtk.ml -o test_gtk
+          WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+          RESULT_VARIABLE OCAML_HAS_GTK_RC
+	  OUTPUT_QUIET
+	  ERROR_QUIET
+          )
+	# non-zero return code indicates errors.
+	if(OCAML_HAS_GTK_RC)
+	  set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo.lablgtk2 package" FORCE)
+	endif(OCAML_HAS_GTK_RC)
       endif(OCAML_HAS_GTK)

       if(OCAML_HAS_GTK)
@@ -266,11 +273,13 @@
     endif (PLD_extcairo)
   else(OCAMLFIND)
     message(STATUS "WARNING:"
-      "ocamlfind not available.  Disabling Plcairo module and lablgtk support")
-    set(OCAML_HAS_CAIRO OFF)
-    set(OCAML_HAS_GTK OFF)
+      "ocamlfind not available.  Disabling Plcairo module and lablgtk2 support")
+    set(OCAML_HAS_CAIRO OFF CACHE BOOL "OCaml has the cairo package" FORCE)
+    set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo.lablgtk2 package" FORCE)
   endif(OCAMLFIND)
 else(ENABLE_ocaml)
-  set(OCAML_HAS_CAIRO OFF)
-  set(OCAML_HAS_GTK OFF)
-endif(ENABLE_ocaml)
+  message(STATUS "WARNING:"
+    "ENABLE_ocaml is OFF so disabling Plcairo module and lablgtk2 support")
+  set(OCAML_HAS_CAIRO OFF CACHE BOOL "OCaml has the cairo package" FORCE)
+  set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo.lablgtk2 package" FORCE)
+endif(ENABLE_ocaml)


Updating iOS.cmake to work with the latest Xcode and iOS 8 SDK.

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

--- cmake/platforms/iOS.cmake
+++ cmake/platforms/iOS.cmake
@@ -18,8 +18,17 @@
  MESSAGE(FATAL_ERROR "SDKROOT env var must be set: " $ENV{SDKROOT})
 ENDIF()

+IF(EXISTS $ENV{SDKROOT})
+  SET(SDKROOT $ENV{SDKROOT})
+ELSE()
+  execute_process(COMMAND xcodebuild -version -sdk $ENV{SDKROOT} Path
+   OUTPUT_VARIABLE SDKROOT
+   ERROR_QUIET
+   OUTPUT_STRIP_TRAILING_WHITESPACE)
+ENDIF()
+
 IF(NOT CMAKE_C_COMPILER)
-  execute_process(COMMAND xcrun -sdk iphoneos -find clang
+  execute_process(COMMAND xcrun -sdk $ENV{SDKROOT} -find clang
    OUTPUT_VARIABLE CMAKE_C_COMPILER
    ERROR_QUIET
    OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -27,21 +36,30 @@
 ENDIF()

 IF(NOT CMAKE_CXX_COMPILER)
-  execute_process(COMMAND xcrun -sdk iphoneos -find clang++
+  execute_process(COMMAND xcrun -sdk $ENV{SDKROOT} -find clang++
    OUTPUT_VARIABLE CMAKE_CXX_COMPILER
    ERROR_QUIET
    OUTPUT_STRIP_TRAILING_WHITESPACE)
   message(STATUS "Using c compiler ${CMAKE_CXX_COMPILER}")
 ENDIF()

+IF(NOT CMAKE_AR)
+  execute_process(COMMAND xcrun -sdk $ENV{SDKROOT} -find ar
+   OUTPUT_VARIABLE CMAKE_AR_val
+   ERROR_QUIET
+   OUTPUT_STRIP_TRAILING_WHITESPACE)
+  SET(CMAKE_AR ${CMAKE_AR_val} CACHE FILEPATH "Archiver")
+  message(STATUS "Using ar ${CMAKE_AR}")
+ENDIF()
+
 IF (NOT DEFINED IOS_MIN_TARGET)
-execute_process(COMMAND xcodebuild -sdk iphoneos -version SDKVersion
+execute_process(COMMAND xcodebuild -sdk $ENV{SDKROOT} -version SDKVersion
    OUTPUT_VARIABLE IOS_MIN_TARGET
    ERROR_QUIET
    OUTPUT_STRIP_TRAILING_WHITESPACE)
 ENDIF()

-SET(IOS_COMMON_FLAGS "-isysroot $ENV{SDKROOT} -mios-version-min=${IOS_MIN_TARGET}")
+SET(IOS_COMMON_FLAGS "-mios-version-min=${IOS_MIN_TARGET}")
 SET(CMAKE_C_FLAGS "${IOS_COMMON_FLAGS}" CACHE STRING "toolchain_cflags" FORCE)
 SET(CMAKE_CXX_FLAGS "${IOS_COMMON_FLAGS}" CACHE STRING "toolchain_cxxflags" FORCE)
 SET(CMAKE_LINK_FLAGS "${IOS_COMMON_FLAGS}" CACHE STRING "toolchain_linkflags" FORCE)


Use conan_check instead of assuming conan for calls to conan info

--- conan.cmake
+++ conan.cmake
@@ -348,10 +348,9 @@
         endif()
     endforeach()
     if(ARGUMENTS_CONAN_COMMAND)
-       set(conan_command ${ARGUMENTS_CONAN_COMMAND})
-    else()
-      set(conan_command conan)
-    endif()
+       set(CONAN_CMD ${ARGUMENTS_CONAN_COMMAND})
+    endif()
+    conan_check()
     set(CONAN_OPTIONS "")
     if(ARGUMENTS_CONANFILE)
       set(CONANFILE ${CMAKE_CURRENT_SOURCE_DIR}/${ARGUMENTS_CONANFILE})
@@ -541,6 +540,8 @@
     # Example usage:
     #    conan_add_remote(NAME bincrafters INDEX 1
     #       URL https://api.bintray.com/conan/bincrafters/public-conan)
+    conan_check()
+
     set(oneValueArgs URL NAME INDEX)
     cmake_parse_arguments(CONAN "" "${oneValueArgs}" "" ${ARGN})


Print to terminal additional info when running dashboard script

--- CMake/VisomicsDashboardScript.TEMPLATE.cmake
+++ CMake/VisomicsDashboardScript.TEMPLATE.cmake
@@ -160,10 +160,17 @@
 #
 # Display build info
 #
-message("site name: ${CTEST_SITE}")
-message("build name: ${CTEST_BUILD_NAME}")
-message("script mode: ${SCRIPT_MODE}")
-message("coverage: ${WITH_COVERAGE}, memcheck: ${WITH_MEMCHECK}")
+message("CTEST_SITE ................: ${CTEST_SITE}")
+message("CTEST_BUILD_NAME ..........: ${CTEST_BUILD_NAME}")
+message("SCRIPT_MODE ...............: ${SCRIPT_MODE}")
+message("GIT_TAG ...................: ${GIT_TAG}")
+message("CTEST_BUILD_CONFIGURATION .: ${CTEST_BUILD_CONFIGURATION}")
+message("WITH_KWSTYLE ..............: ${WITH_KWSTYLE}")
+message("WITH_COVERAGE: ............: ${WITH_COVERAGE}")
+message("WITH_MEMCHECK .............: ${WITH_MEMCHECK}")
+message("WITH_PACKAGES .............: ${WITH_PACKAGES}")
+message("WITH_DOCUMENTATION ........: ${WITH_DOCUMENTATION}")
+message("DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY: ${DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY}")

 #
 # Convenient macro allowing to download a file


Changed FindOpenCASCADE.cmake to support also newer Versions of OCCT

--- contrib/FindOpenCASCADE.cmake
+++ contrib/FindOpenCASCADE.cmake
@@ -13,6 +13,23 @@

 # ${OpenCASCADE_FOUND} is cached, so once OCC is found this block shouldn't have to run again
 IF( NOT OpenCASCADE_FOUND )
+    # 32 bit or 64 bit?
+    IF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+      IF( _firsttime STREQUAL TRUE )
+        MESSAGE( STATUS "This is a 32-bit system." )
+      ENDIF( _firsttime STREQUAL TRUE )
+	  set(BITS 32)
+    ELSE( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+      IF( _firsttime STREQUAL TRUE )
+        MESSAGE( STATUS "This is a 64-bit system. Adding appropriate compiler flags for OCC." )
+      ENDIF( _firsttime STREQUAL TRUE )
+      ADD_DEFINITIONS( -D_OCC64 )
+      IF (UNIX)
+        ADD_DEFINITIONS( -m64 )
+      ENDIF (UNIX)
+	  set(BITS 64)
+    ENDIF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+
   IF(UNIX)
     set( _incsearchpath /usr/include/opencascade /opt/occ/inc $ENV{CASROOT}/inc $ENV{CASROOT}/include/oce)
     if (APPLE)
@@ -27,8 +44,9 @@
       set( _incsearchpath $ENV{CASROOT}\\inc C:\\OpenCASCADE6.3.0\\ros\\inc )
       set( _testlibname TKernel.lib )
 	  set( _testdllname TKernel.dll )
-      set( _libsearchpath $ENV{CASROOT}\\win32\\lib C:\\OpenCASCADE6.3.0\\ros\\win32\\lib )
-	  set( _dllsearchpath $ENV{CASROOT}\\win32\\bin  C:\\OpenCASCADE6.3.0\\ros\\win32\\bin )
+      set( _libsearchpath $ENV{CASROOT}\\win32\\lib $ENV{CASROOT}\\win${BITS}\\vc9\\lib $ENV{CASROOT}\\win${BITS}\\vc10\\lib C:\\OpenCASCADE6.3.0\\ros\\win32\\lib )
+	  set( _dllsearchpath $ENV{CASROOT}\\win32\\bin $ENV{CASROOT}\\win${BITS}\\vc9\\bin $ENV{CASROOT}\\win${BITS}\\vc10\\bin C:\\OpenCASCADE6.3.0\\ros\\win32\\bin )
+	  message(STATUS "Bitnessss: ${_libsearchpath}")
     ELSE(WIN32)
       message( FATAL_ERROR "Unknown system! Exiting." )
     ENDIF (WIN32)
@@ -52,7 +70,7 @@

   # check dll path
   if(WIN32)
-    FIND_PATH( OpenCASCADE_DLL_DIRECTORY ${_testdllname} PATH ${_dllsearchpath} DOC "Path to OCC dlls" )
+    FIND_PATH( OpenCASCADE_DLL_DIRECTORY ${_testdllname} PATH ${_dllsearchpath} DOC "Path to OCC dlls" NO_SYSTEM_ENVIRONMENT_PATH)
 	IF( OpenCASCADE_DLL_DIRECTORY STREQUAL OpenCASCADE_DLL_DIRECTORY-NOTFOUND )
 	  SET( OpenCASCADE_FOUND FALSE CACHE BOOL FORCE )
       MESSAGE( FATAL_ERROR "Cannot find OCC DLL dir. Install opencascade or set CASROOT to the correct directory." )
@@ -110,21 +128,6 @@
 	  ADD_DEFINITIONS( -DWNT )
 	endif(WIN32)

-    # 32 bit or 64 bit?
-    IF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
-      IF( _firsttime STREQUAL TRUE )
-        MESSAGE( STATUS "This is a 32-bit system." )
-      ENDIF( _firsttime STREQUAL TRUE )
-    ELSE( CMAKE_SIZEOF_VOID_P EQUAL 4 )
-      IF( _firsttime STREQUAL TRUE )
-        MESSAGE( STATUS "This is a 64-bit system. Adding appropriate compiler flags for OCC." )
-      ENDIF( _firsttime STREQUAL TRUE )
-      ADD_DEFINITIONS( -D_OCC64 )
-      IF (UNIX)
-        ADD_DEFINITIONS( -m64 )
-      ENDIF (UNIX)
-    ENDIF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
-
     ADD_DEFINITIONS( -DHAVE_IOSTREAM -DHAVE_FSTREAM -DHAVE_LIMITS_H -DHAVE_IOMANIP )
   ELSE( DEFINED OpenCASCADE_FIND_COMPONENTS )
     MESSAGE( AUTHOR_WARNING "Developer must specify required libraries to link against in the cmake file, i.e. find_package( OpenCASCADE REQUIRED COMPONENTS TKernel TKBRep) . Otherwise no libs will be added - linking against ALL OCC libraries is slow!")


[added] message for CheckFortranFlag like CheckCXX and CheckC

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -245,6 +245,7 @@
 #-------------------------------------------------------------------------------
 MACRO( BOTG_CheckFortranFlag flag result)
    SET(save_defs "${CMAKE_REQUIRED_DEFINITIONS}")
+   MESSAGE(STATUS "Performing Test ${flag}")
    SET(CMAKE_REQUIRED_DEFINITIONS "${flag}")
    BOTG_TryCompileFortran("
      program main
@@ -259,6 +260,11 @@
      FAIL_REGEX "[Ww]arning: [Oo]ption"                     # SunPro
      FAIL_REGEX "command option .* is not recognized"       # XL
      )
+   IF( result )
+     MESSAGE(STATUS "Performing Test ${flag} - Success")
+   ELSE()
+     MESSAGE(STATUS "Performing Test ${flag} - Fail")
+   ENDIF()
    SET (CMAKE_REQUIRED_DEFINITIONS "${save_defs}")
 ENDMACRO()
 #-------------------------------------------------------------------------------


Update Suil.cmake

Update Suil.cmake

--- cmake/Suil.cmake
+++ cmake/Suil.cmake
@@ -9,8 +9,7 @@
 endif()

 # Allow attributes on sources
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wattributes")
-set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -Wattributes")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")

 if (NOT SUIL_BASE_PATH)
     set(SUIL_BASE_PATH /usr)


Fixed CUDA warning

Fixed CUDA warning

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -35,9 +35,11 @@

 set (CUDA_FOUND ${CUDA_FOUND} CACHE BOOL "Did we find cuda?")

-IF(CUDA_FOUND AND ${CUDA_VERSION} LESS 3.2)
-  MESSAGE("CUDA version ${CUDA_VERSION} found, too old for RTK")
-  SET(CUDA_FOUND FALSE)
+IF(CUDA_FOUND)
+  IF(${CUDA_VERSION} LESS 3.2)
+    MESSAGE("CUDA version ${CUDA_VERSION} found, too old for RTK")
+    SET(CUDA_FOUND FALSE)
+  ENDIF()
 ENDIF()

 if (CUDA_FOUND)


Squashed '3rdparty/github/cmake-utils/' changes from c86b9bea..4be0e8da

4be0e8da CPack failsafe installation

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 4be0e8da719abf26ffdeb0c15721ccfd192ff4d5

--- cmake/MyPackagePack.cmake
+++ cmake/MyPackagePack.cmake
@@ -34,6 +34,47 @@
     #
     SET (CPACK_ARCHIVE_COMPONENT_INSTALL ON)
     #
+    # We want to recuperate some cmake variables to do a temporary install
+    # and the only way with via the CPackProperties.cmake file.
+    # This file must contain only CPack compatible commands -;
+    #
+    # Any variable starting with CPACK_ is exported to cpack...
+    #
+    SET (CPACK_PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR})
+    SET (CPACK_PROJECT_CONFIG_FILE "${PROJECT_SOURCE_DIR}/CPackCustomProjectConfig.cmake")
+    SET (CPACK_CMAKE_MAKE_PROGRAM ${CMAKE_MAKE_PROGRAM})
+    SET (CPACK_TEMP_BASENAME "CpackTempDestdir")
+    SET (CPACK_TEMP_DIRNAME ${PROJECT_SOURCE_DIR})
+    SET (CPACK_TEMP_FULLPATH "${CPACK_TEMP_DIRNAME}/${CPACK_TEMP_BASENAME}")
+    #
+    # Generate CPACK_PROJECT_CONFIG_FILE
+    #
+    IF (EXISTS ${CPACK_PROJECT_CONFIG_FILE})
+      MESSAGE (STATUS "Removing ${CPACK_PROJECT_CONFIG_FILE}")
+      FILE (REMOVE ${CPACK_PROJECT_CONFIG_FILE})
+    ENDIF ()
+    MESSAGE (STATUS "Generating ${CPACK_PROJECT_CONFIG_FILE}")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "MESSAGE (STATUS \"Removing \${CPACK_TEMP_FULLPATH}\")\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "FILE (REMOVE_RECURSE \${CPACK_TEMP_FULLPATH})\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "MESSAGE (STATUS \"Installing to \${CPACK_TEMP_FULLPATH}\")\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "EXECUTE_PROCESS (COMMAND \${CPACK_CMAKE_MAKE_PROGRAM} install DESTDIR=\${CPACK_TEMP_BASENAME} WORKING_DIRECTORY \${CPACK_TEMP_DIRNAME})\n")
+    #
+    # Rework internal variables to avoid zombies
+    #
+    GET_CMAKE_PROPERTY(COMPONENTS _components)
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "SET (_component_ok_list)\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "FOREACH (_component IN LISTS CPACK_COMPONENTS_ALL)\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "  SET (_install_manifest__path \"\${CPACK_PROJECT_SOURCE_DIR}/install_manifest_\${_component}.txt\")\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "  IF (EXISTS \${_install_manifest__path})\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "    FILE( READ \${_install_manifest__path} _content HEX)\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "    STRING (LENGTH \"\${_content}\" _content_length)\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "    IF (\${_content_length} GREATER 0)\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "      LIST (APPEND _component_ok_list \${_component})\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "    ENDIF ()\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "  ENDIF ()\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "ENDFOREACH ()\n")
+    FILE (APPEND ${CPACK_PROJECT_CONFIG_FILE} "SET (CPACK_COMPONENTS_ALL \"\${_component_ok_list}\")\n")
+    #
     # Include CPack - from now on we will have access to CPACK own macros
     #
     INCLUDE (CPack)
@@ -191,6 +232,6 @@
       COMMENT "Packaging ${PROJECT_NAME}"
 	  DEPENDS man
       VERBATIM
-    )
+      )
   ENDIF ()
 ENDMACRO()


dont remove file needed by codecov script

--- cmake/SetupCoverage.cmake
+++ cmake/SetupCoverage.cmake
@@ -104,7 +104,7 @@
     list(APPEND _coverage_args COMMAND ${GENHTML_EXECUTABLE}
          -q --output-directory ${_output_name} ${_output_name}.info  ${_branch_coverage})
     list(APPEND _coverage_args COMMAND ${CMAKE_COMMAND}
-         -E remove ${_output_name}.info ${_output_name}.all.info)
+         -E remove ${_output_name}.all.info)

     add_custom_target(${_target_name} ${_coverage_args}
                       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}


Set the ZINC_ARCHITECTURE correctly when cross compiling on windows.  https://tracker.physiomeproject.org/show_bug.cgi?id=3726

git-svn-id: b9baf8c2d14a71b3ba9c27a102eb6e792fc13348@11047 3c1deb5b-d424-0410-962d-aba41a686d42

--- cmake/ZincPackaging.cmake
+++ cmake/ZincPackaging.cmake
@@ -10,70 +10,73 @@

 SET(ZINC_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
 IF(WIN32)
-	STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ZINC_ARCHITECTURE)
+    IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+        SET(ZINC_ARCHITECTURE x86)
+    ELSE()
+        SET(ZINC_ARCHITECTURE amd64)
 ENDIF()

 FUNCTION( GET_ZINC_SYSTEM_NAME RETURN_SYSTEM_NAME )
-	IF( WIN32 )
-		SET( SYSTEM_NAME "Windows" )
-	ELSEIF( APPLE )
-		EXECUTE_PROCESS(COMMAND sw_vers -productName RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_NAME )
-		STRING( STRIP ${PRODUCT_NAME} PRODUCT_NAME )
-		EXECUTE_PROCESS(COMMAND sw_vers -productVersion RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_VERSION )
-		STRING( STRIP ${PRODUCT_VERSION} PRODUCT_VERSION )
-		STRING( REPLACE " " "-" SYSTEM_NAME "${PRODUCT_NAME} ${PRODUCT_VERSION}" )
-	ELSEIF( UNIX )
-		SET( SYSTEM_NAME "Linux" )
-		EXECUTE_PROCESS(COMMAND cat /etc/issue RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE COMMAND_OUTPUT ERROR_VARIABLE ERROR_OUTPUT)
-		IF( COMMAND_RESULT EQUAL 0 )
-			STRING( REGEX MATCH "^[^\\]*" COMMAND_OUTPUT ${COMMAND_OUTPUT} )
-			STRING( STRIP ${COMMAND_OUTPUT} COMMAND_OUTPUT )
-			STRING( REPLACE " " "-" SYSTEM_NAME ${COMMAND_OUTPUT} )
-		ENDIF()
-	ELSE()
-		MESSAGE( FATAL_ERROR "Don't yet know this system." )
-	ENDIF()
+    IF( WIN32 )
+        SET( SYSTEM_NAME "Windows" )
+    ELSEIF( APPLE )
+        EXECUTE_PROCESS(COMMAND sw_vers -productName RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_NAME )
+        STRING( STRIP ${PRODUCT_NAME} PRODUCT_NAME )
+        EXECUTE_PROCESS(COMMAND sw_vers -productVersion RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE PRODUCT_VERSION )
+        STRING( STRIP ${PRODUCT_VERSION} PRODUCT_VERSION )
+        STRING( REPLACE " " "-" SYSTEM_NAME "${PRODUCT_NAME} ${PRODUCT_VERSION}" )
+    ELSEIF( UNIX )
+        SET( SYSTEM_NAME "Linux" )
+        EXECUTE_PROCESS(COMMAND cat /etc/issue RESULT_VARIABLE COMMAND_RESULT OUTPUT_VARIABLE COMMAND_OUTPUT ERROR_VARIABLE ERROR_OUTPUT)
+        IF( COMMAND_RESULT EQUAL 0 )
+            STRING( REGEX MATCH "^[^\\]*" COMMAND_OUTPUT ${COMMAND_OUTPUT} )
+            STRING( STRIP ${COMMAND_OUTPUT} COMMAND_OUTPUT )
+            STRING( REPLACE " " "-" SYSTEM_NAME ${COMMAND_OUTPUT} )
+        ENDIF()
+    ELSE()
+        MESSAGE( FATAL_ERROR "Don't yet know this system." )
+    ENDIF()

-	SET( ${RETURN_SYSTEM_NAME} ${SYSTEM_NAME} PARENT_SCOPE)
+    SET( ${RETURN_SYSTEM_NAME} ${SYSTEM_NAME} PARENT_SCOPE)
 ENDFUNCTION()

 GET_ZINC_SYSTEM_NAME( ZINC_SYSTEM )

 IF( WIN32 )
-	IF ( ${CMAKE_VERSION} VERSION_LESS "2.8.11" )
-		MESSAGE( STATUS "The CMAKE_SYSTEM_PROCESSOR will not give the correct value for 64 bit systems." )
-	ENDIF()
-	SET( CPACK_GENERATOR "ZIP;NSIS" )
-	SET( CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}" )
-	SET( CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}" )
-	IF( CMAKE_CL_64 )
-		SET( CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64" )
-		SET( CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (${ZINC_ARCHITECTURE})" )
-		SET( CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (${ZINC_ARCHITECTURE})" )
-	ENDIF()
-	SET( CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/windows\\\\nsis_banner.bmp" )
-	SET( CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/icons\\\\cmiss_torso.ico" )
-	SET( CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/icons\\\\cmiss_torso.ico" )
-	SET( CPACK_NSIS_MODIFY_PATH "ON" )
+    IF ( ${CMAKE_VERSION} VERSION_LESS "2.8.11" )
+        MESSAGE( STATUS "The CMAKE_SYSTEM_PROCESSOR will not give the correct value for 64 bit systems." )
+    ENDIF()
+    SET( CPACK_GENERATOR "ZIP;NSIS" )
+    SET( CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}" )
+    SET( CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}" )
+    IF( CMAKE_CL_64 )
+        SET( CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64" )
+        SET( CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (${ZINC_ARCHITECTURE})" )
+        SET( CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (${ZINC_ARCHITECTURE})" )
+    ENDIF()
+    SET( CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/windows\\\\nsis_banner.bmp" )
+    SET( CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/icons\\\\cmiss_torso.ico" )
+    SET( CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/distrib/icons\\\\cmiss_torso.ico" )
+    SET( CPACK_NSIS_MODIFY_PATH "ON" )
 ELSEIF( APPLE )
-	# Preserve the CMAKE_INSTALL_PREFIX for the project and work with absolute install
-	SET(CPACK_SET_DESTDIR ON)
+    # Preserve the CMAKE_INSTALL_PREFIX for the project and work with absolute install
+    SET(CPACK_SET_DESTDIR ON)

-	SET( CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/distrib/osx/welcome.txt" )
-	LIST( LENGTH LENGTH_ARCHS CMAKE_OSX_ARCHITECTURES )
+    SET( CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/distrib/osx/welcome.txt" )
+    LIST( LENGTH LENGTH_ARCHS CMAKE_OSX_ARCHITECTURES )

-	SET( ZINC_ARCHITECTURE "universal" )
-	SET( CPACK_GENERATOR  "TGZ" "PackageMaker" )
+    SET( ZINC_ARCHITECTURE "universal" )
+    SET( CPACK_GENERATOR  "TGZ" "PackageMaker" )
 ELSEIF( UNIX )
-	# Preserve the CMAKE_INSTALL_PREFIX for the project and work with absolute install
-	SET(CPACK_SET_DESTDIR ON)
+    # Preserve the CMAKE_INSTALL_PREFIX for the project and work with absolute install
+    SET(CPACK_SET_DESTDIR ON)

-	SET( CPACK_GENERATOR "TGZ" )
-	STRING( FIND ${ZINC_SYSTEM} "Ubuntu" INDEX )
-	IF( INDEX EQUAL 0 )
-		SET( CPACK_DEBIAN_PACKAGE_MAINTAINER "Hugh Sorby" ) #required
-		LIST( APPEND CPACK_GENERATOR "DEB" )
-	ENDIF()
+    SET( CPACK_GENERATOR "TGZ" )
+    STRING( FIND ${ZINC_SYSTEM} "Ubuntu" INDEX )
+    IF( INDEX EQUAL 0 )
+        SET( CPACK_DEBIAN_PACKAGE_MAINTAINER "Hugh Sorby" ) #required
+        LIST( APPEND CPACK_GENERATOR "DEB" )
+    ENDIF()
 ENDIF()

 SET( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt" )


Adjust minor version back to odd

Adjust minor version back to odd

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

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

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

     if( NOT DEFINED ${PV_NAME}_VERSION_PATCH )


Build JSON bundle with -fPIC

Build JSON bundle with -fPIC

--- cmake/external/JSON.cmake
+++ cmake/external/JSON.cmake
@@ -5,7 +5,7 @@
 	DOWNLOAD_DIR ${THIRD_PARTY_DIR}/JSON
 	URL http://s3.amazonaws.com/json-c_releases/releases/json-c-0.11-nodoc.tar.gz
 	URL_MD5 4ac9dae7cc2975dba7bc04b4c0b98953
-	CONFIGURE_COMMAND rm <SOURCE_DIR>/config.status && <SOURCE_DIR>/configure --includedir=${THIRD_PARTY_DIR}/include/json --libdir=${THIRD_PARTY_DIR}/libs/json --disable-shared
+	CONFIGURE_COMMAND rm <SOURCE_DIR>/config.status && <SOURCE_DIR>/configure --includedir=${THIRD_PARTY_DIR}/include/json --libdir=${THIRD_PARTY_DIR}/libs/json --disable-shared --with-pic
 	)

 SET(JSON_INCLUDE_DIRS ${THIRD_PARTY_DIR}/include/json/json-c)


[MLIR] Update MLIR and LLVM commit ids (#3427)

--- cmake/external_mlir.cmake
+++ cmake/external_mlir.cmake
@@ -20,8 +20,8 @@
 set(MLIR_REPO_URL https://github.com/tensorflow/mlir.git)

 # Change these commit IDs to move to latest stable versions
-set(MLIR_LLVM_COMMIT_ID a2a6f85)
-set(MLIR_COMMIT_ID 26c683c)
+set(MLIR_LLVM_COMMIT_ID 3caf9af)
+set(MLIR_COMMIT_ID c636f12)
 set(MLIR_PROJECT_ROOT ${CMAKE_CURRENT_BINARY_DIR}/mlir_project)
 set(MLIR_LLVM_ROOT ${MLIR_PROJECT_ROOT}/llvm-projects)
 set(MLIR_SOURCE_DIR ${MLIR_LLVM_ROOT}/llvm/projects/mlir)


little cleanups

little cleanups

--- cmake/rosbuild_lite.cmake
+++ cmake/rosbuild_lite.cmake
@@ -236,20 +236,23 @@

 macro(find_pcl_package)
-message(STATUS "+ Looking for PCL ")
-rosbuild_lite_init()
+
 if (ROS_ELECTRIC_FOUND)
-  set(PCL_LIBRARIES )
+  rosbuild_lite_init()
+  unset(PCL_LIBRARIES)
   find_ros_package(std_msgs)
   find_ros_package(pcl)
   set(PCL_FOUND TRUE)
   set(PCL_LIBRARIES ${pcl_LIBRARIES})
   set(PCL_INCLUDE_DIRS ${pcl_INCLUDE_DIRS})
 else()
-  find_package(PCL QUIET)
-  if (PCL_FOUND)
-    message(STATUS "+ Found PCL Version ${PCL_VERSION} with config from ${PCL_CONFIG}. ")
-    add_definitions(-DPCL_VERSION_GE_151=1 -DPCL_VERSION_GE_140=1)
+  if (NOT PCL_FOUND)
+    message(STATUS "+ Looking for PCL ")
+    find_package(PCL QUIET)
+    if (PCL_FOUND)
+      message(STATUS "+ Found PCL Version ${PCL_VERSION} with config from ${PCL_CONFIG}. ")
+      add_definitions(-DPCL_VERSION_GE_151=1 -DPCL_VERSION_GE_140=1)
+    endif()
   endif()
 endif()
 endmacro()


Cmake krb5 module: do not add "${KRB5_PREFIX}/include" if KRB5_PREFIX is not defined or directory does not exit.

--- cmake/Modules/FindKrb5.cmake
+++ cmake/Modules/FindKrb5.cmake
@@ -74,7 +74,9 @@
   ENDIF("${KRB5_C_CONFIG_RESULT}" MATCHES "^0$")
 ENDIF(KRB5_FOUND)

-SET(KRB5_INCLUDE_DIRS "${KRB5_PREFIX}/include" ${KRB5_INCLUDE_DIRS})
+IF (KRB5_PREFIX AND EXISTS "${KRB5_PREFIX}/include")
+  SET(KRB5_INCLUDE_DIRS "${KRB5_PREFIX}/include" ${KRB5_INCLUDE_DIRS})
+ENDIF (KRB5_PREFIX AND EXISTS "${KRB5_PREFIX}/include")

 # Lookup the libraries needed for the components requested.
 IF(KRB5_FOUND)


cmake: add support for serial target

cmake: add support for serial target

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -534,11 +534,22 @@
            setup_arduino_upload(${INPUT_BOARD} ${INPUT_NAME} ${INPUT_PORT} "${INPUT_PROGRAMMER}" "${INPUT_AFLAGS}")
        endif()
     endif()
-
+
     if(INPUT_SERIAL)
         setup_serial_target(${INPUT_NAME} "${INPUT_SERIAL}" "${INPUT_PORT}")
-    endif()
-
+    else()
+       if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
+           set(INPUT_SERIAL "screen")
+       elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
+           set(INPUT_SERIAL "screen")
+       else()
+           message(FATAL_ERROR "${CMAKE_HOST_SYSTEM_NAME} not supported yet." )
+       endif()
+
+       if(INPUT_SERIAL)
+           setup_serial_target(${INPUT_NAME} "${INPUT_SERIAL}" "${INPUT_PORT}")
+       endif()
+    endif()
 endfunction()

 #=============================================================================#
@@ -1455,14 +1466,20 @@
 #
 #         TARGET_NAME - Target name
 #         CMD         - Serial terminal command
+#         SERIAL_PORT - Serial port
 #
 # Creates a target (${TARGET_NAME}-serial) for launching the serial termnial.
 #
 #=============================================================================#
 function(setup_serial_target TARGET_NAME CMD SERIAL_PORT)
-    string(CONFIGURE "${CMD}" FULL_CMD @ONLY)
+    file(GLOB TERMINALS "/usr/bin/gnome-terminal" "/usr/bin/konsole" "/usr/bin/xterm")
+    list(GET TERMINALS 0 TERMINAL)
+
+    set(ARGUMENTS "-e" "'${CMD} ${SERIAL_PORT}'")
+    separate_arguments(ARGUMENTS)
+
     add_custom_target(${TARGET_NAME}-serial
-                      COMMAND ${FULL_CMD})
+                      COMMAND ${TERMINAL} ${ARGUMENTS})
 endfunction()


[cmake] Only add lipo targets for Darwin

Swift's CMake build system creates "fat" binaries for Swift libraries,
so long as the host machine used to compile the libraries is a macOS
machine. However, when a non-Darwin target, such as Android, is being
compiled on a macOS host, this doesn't work. Instead, only add lipo
targets if the *target* is Darwin.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -357,12 +357,15 @@
 #
 # Usage:
 #   _add_swift_lipo_target(
+#     sdk                 # The name of the SDK the target was created for.
+#                         # Examples include "OSX", "IOS", "ANDROID", etc.
 #     target              # The name of the target to create
 #     output              # The file to be created by this target
 #     source_targets...   # The source targets whose outputs will be
 #                         # lipo'd into the output.
 #   )
-function(_add_swift_lipo_target target output)
+function(_add_swift_lipo_target sdk target output)
+  precondition(sdk MESSAGE "sdk is required")
   precondition(target MESSAGE "target is required")
   precondition(output MESSAGE "output is required")

@@ -381,7 +384,8 @@
     endif()
   endforeach()

-  if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+  is_darwin_based_sdk("${sdk}" IS_DARWIN)
+  if(IS_DARWIN)
     # Use lipo to create the final binary.
     add_custom_command_target(unused_var
         COMMAND "${LIPO}" "-create" "-output" "${output}" ${source_binaries}
@@ -1456,6 +1460,7 @@
         endif()

         _add_swift_lipo_target(
+            ${sdk}
             ${lipo_target}${unsigned}
             "${UNIVERSAL_LIBRARY_NAME}${unsigned}"
             ${THIN_INPUT_TARGETS})
@@ -1518,6 +1523,7 @@
           set(UNIVERSAL_LIBRARY_NAME
               "${SWIFTSTATICLIB_DIR}/${SWIFT_SDK_${sdk}_LIB_SUBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${name}${CMAKE_STATIC_LIBRARY_SUFFIX}")
           _add_swift_lipo_target(
+              ${sdk}
               ${lipo_target_static}
               "${UNIVERSAL_LIBRARY_NAME}"
               ${THIN_INPUT_TARGETS_STATIC})


build: remove `DEPENDS` from `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -678,7 +678,6 @@
 #     [STATIC]
 #     [SDK sdk]
 #     [ARCHITECTURE architecture]
-#     [DEPENDS dep1 ...]
 #     [FRAMEWORK_DEPENDS dep1 ...]
 #     [FRAMEWORK_DEPENDS_WEAK dep1 ...]
 #     [LLVM_LINK_COMPONENTS comp1 ...]
@@ -705,9 +704,6 @@
 #
 # ARCHITECTURE
 #   Architecture to build for.
-#
-# DEPENDS
-#   Targets that this library depends on.
 #
 # FRAMEWORK_DEPENDS
 #   System frameworks this library depends on.
@@ -746,7 +742,6 @@
         DARWIN_INSTALL_NAME_DIR
         SDK)
   set(SWIFTLIB_SINGLE_multiple_parameter_options
-        DEPENDS
         FILE_DEPENDS
         FRAMEWORK_DEPENDS
         FRAMEWORK_DEPENDS_WEAK
@@ -853,7 +848,6 @@
       SWIFTLIB_SINGLE_EXTERNAL_SOURCES ${name}
       DEPENDS
         ${gyb_dependency_targets}
-        ${SWIFTLIB_SINGLE_DEPENDS}
         ${SWIFTLIB_SINGLE_FILE_DEPENDS}
       SDK ${SWIFTLIB_SINGLE_SDK}
       ARCHITECTURE ${SWIFTLIB_SINGLE_ARCHITECTURE}
@@ -996,7 +990,6 @@
   add_dependencies_multiple_targets(
       TARGETS "${target}"
       DEPENDS
-        ${SWIFTLIB_SINGLE_DEPENDS}
         ${gyb_dependency_targets}
         "${swift_object_dependency_target}"
         "${swift_module_dependency_target}"


[build-script] NFC: Update a comment regarding LLD for Apple platforms

PR #14306 fixed the problem in https://bugs.swift.org/browse/SR-6878 but
included a comment about mysterious behavior on macOS. I did some
investigation and found that Clang assumes that Darwin platforms use
a different name for LLD. My impression is that LLD is not yet ready for
prime time on Darwin, so leaving it disabled for Apple platforms seems
like the right thing for now. This just updates the comments to explain
what will need to change whenever someone wants to reenable it.

rdar://problem/37053028

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -430,8 +430,8 @@
   endif()

   if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
+    # FIXME: On Apple platforms, find_program needs to look for "ld64.lld"
     find_program(LDLLD_PATH "ld.lld")
-    # Strangely, macOS finds lld and then can't find it when using -fuse-ld=
     if((SWIFT_ENABLE_LLD_LINKER AND LDLLD_PATH AND NOT APPLE) OR
        ("${LFLAGS_SDK}" STREQUAL "WINDOWS" AND
         NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WINDOWS"))


Move generated Android toolchains to build directory

--- cmake/platform/android.cmake
+++ cmake/platform/android.cmake
@@ -132,13 +132,15 @@
             message(FATAL_ERROR "NDK versions less than 10 currently not supported")
         endif()

-        set(STANDALONE_TOOLCHAIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/toolchains/android/${ANDROID_ABI}-${ANDROID_TOOLCHAIN_NAME}-${ANDROID_NATIVE_API_LEVEL}-${ANDROID_STL}-${NDK_RELEASE_NUMBER}")
+        set(TOOLCHAIN_ROOT "${CMAKE_CURRENT_BINARY_DIR}/toolchains/android")
+
+        if( NOT EXISTS ${TOOLCHAIN_ROOT})
+            file(MAKE_DIRECTORY ${TOOLCHAIN_ROOT})
+        endif()
+
+        set(STANDALONE_TOOLCHAIN_DIR "${TOOLCHAIN_ROOT}/${ANDROID_ABI}-${ANDROID_TOOLCHAIN_NAME}-${ANDROID_NATIVE_API_LEVEL}-${ANDROID_STL}-${NDK_RELEASE_NUMBER}")
         if( NOT EXISTS ${STANDALONE_TOOLCHAIN_DIR} )
             message(STATUS "Could not find an appropriate standalone toolchain.  Generating one into ${STANDALONE_TOOLCHAIN_DIR}")
-
-            if(CMAKE_HOST_WIN32)
-
-            endif()

             set(__MAKE_TOOLCHAIN_OPTIONS "--stl=${STANDALONE_TOOLCHAIN_STL} --install-dir=${STANDALONE_TOOLCHAIN_DIR}")


Fix of CMake script remove_cxx_flags

Fix of CMake script remove_cxx_flags

--- cmake/remove_cxx_flags.cmake
+++ cmake/remove_cxx_flags.cmake
@@ -17,5 +17,5 @@
         string(CONCAT RESULT ${RESULT} ${FLAG})
     endforeach(FLAG)

-    set(CMAKE_CXX_FLAGS ${RESULT})
+    set(CMAKE_CXX_FLAGS ${RESULT} PARENT_SCOPE)
 endfunction(remove_cxx_flags)


At some point, I got a bit carried away when cleaning up our common.cmake file. This resulted in the tests not working anymore on Mac OS X. Now, it works again...

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -719,6 +719,23 @@
                       COMMAND ${CMAKE_COMMAND} -E copy ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME}
                                                        ${CMAKE_BINARY_DIR}/${PLUGIN_FILENAME})

+    # A few Mac OS X specific things
+
+    IF(APPLE)
+        # Make sure that the copy of our plugin in our main build directory
+        # refers to the system version of the Qt libraries on which it depends
+        # Note: indeed, right now, it refers to our embedded version of the Qt
+        #       libraries while, if we want the tests to work, it should refer
+        #       to the system version of the Qt libraries, so...
+
+        FOREACH(QT_DEPENDENCY ${QT_DEPENDENCIES})
+            ADD_CUSTOM_TARGET(${MAIN_PROJECT_NAME}_${PLUGIN_NAME}_UPDATE_MAC_OS_X_QT_REFERENCE ALL
+                               COMMAND install_name_tool -change @executable_path/../Frameworks/${QT_DEPENDENCY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_DEPENDENCY}
+                                                                 ${QT_LIBRARY_DIR}/${QT_DEPENDENCY}.framework/Versions/${QT_VERSION_MAJOR}/${QT_DEPENDENCY}
+                                                                 ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${PLUGIN_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+        ENDFOREACH()
+    ENDIF()
+
     # Package the plugin itself

     INSTALL(FILES ${PLUGIN_BINARY_DIR}/${PLUGIN_FILENAME} DESTINATION plugins/${MAIN_PROJECT_NAME})


Travis-CI: trying to understand why the tests don't pass on OS X while they do locally.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -999,7 +999,7 @@
         SET(DEPENDENCY_FILENAME ${DEPENDENCY}.framework/Versions/${QT_VERSION_MAJOR}/${DEPENDENCY})

 ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND echo "~~~~~~~~~")
+                   COMMAND echo "~~~[${DEPENDENCY}]~~~")
 ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
                    COMMAND otool -L ${FULL_FILENAME})


improve our FindSimGrid.cmake

improve our FindSimGrid.cmake

--- tools/cmake/FindSimGrid.cmake
+++ tools/cmake/FindSimGrid.cmake
@@ -1,11 +1,21 @@
-# Try to find the SimGrid library.
+# Cmake macro to search for the SimGrid library.
+
+# Copyright (c) 2016. The SimGrid Team (version 20161210).
 #
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the license (GNU LGPL) which comes with this package.
+
 # The user can hint a path using the SimGrid_PATH option.
 #
 # Once done, the following will be defined:
 #
-#  SimGrid_INCLUDE_DIRS - the SimGrid include directories
-#  SimGrid_LIBRARIES - link these to use SimGrid
+#  SimGrid_INCLUDE_DIR - the SimGrid include directories
+#  SimGrid_LIBRARY - link your simulator against it to use SimGrid
+#
+# Afterward, you should probably do the following:
+#
+#  include_directories("${SimGrid_INCLUDE_DIR}" SYSTEM)
+#  target_link_libraries(your-simulator ${SimGrid_LIBRARY})
 #
 # This could be improved in many ways (patches welcome):
 #  - Not finding SimGrid is fatal. But who would want to
@@ -46,3 +56,5 @@

 message("-- SimGrid found in ${SimGrid_PATH} (version ${SimGrid_VERSION})")
+
+


less warnings until i can guard third party better

--- build/max_warnings.cmake
+++ build/max_warnings.cmake
@@ -1,2 +1,2 @@
-add_compile_options(/W4)
+add_compile_options(/W3)
 add_compile_options(/WX)


cmake: If we don't have gssapi libs, disable it.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -201,6 +201,10 @@
   set(DEBUG_CALLTRACE 1)
 endif (WITH_DEBUG_CALLTRACE)

+if (WITH_GSSAPI AND NOT GSSAPI_LIBS)
+    set(WITH_GSSAPI 0)
+endif (WITH_GSSAPI AND NOT GSSAPI_LIBS)
+
 # ENDIAN
 if (NOT WIN32)
     test_big_endian(WORDS_BIGENDIAN)


Fix the FindOptiTrack.cmake

Fix the FindOptiTrack.cmake

Because the name pass to find_package_handle_standard_args was all caps,
it wasn't correctly giving an error when the package wasn't found. This
just renames it so it has the correct capitalization, and now gives an
error if the includes, root direcotory, or libraries are not found (and
the package is required).

--- CMake/FindOptiTrack.cmake
+++ CMake/FindOptiTrack.cmake
@@ -106,7 +106,7 @@
 endif()

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(OPTITRACK
+find_package_handle_standard_args(OptiTrack
 	DEFAULT_MSG OPTITRACK_ROOT_DIR OPTITRACK_INCLUDE_DIR
 	OPTITRACK_LIBRARY)


el async in linux only

el async in linux only

--- CMake/global_config.cmake
+++ CMake/global_config.cmake
@@ -23,7 +23,12 @@

     add_definitions(-DELPP_THREAD_SAFE)
     add_definitions(-DELPP_NO_DEFAULT_LOG_FILE)
-    add_definitions(-DELPP_EXPERIMENTAL_ASYNC)
+
+    #Performance improvement with Ubuntu 18/20
+    if(UNIX AND (NOT ANDROID_NDK_TOOLCHAIN_INCLUDED))
+       message(INFO "Asynchronous ELPP invoked - experimental")
+       add_definitions(-DELPP_EXPERIMENTAL_ASYNC)
+    endif()

     if (BUILD_GLSL_EXTENSIONS)
         set(LRS_GL_TARGET realsense2-gl)


Fixed wrong include

Fixed wrong include

--- CMake/BuildConfigurations/WorkbenchRelease.cmake
+++ CMake/BuildConfigurations/WorkbenchRelease.cmake
@@ -1,4 +1,4 @@
-include(${CMAKE_CURRENT_LIST_DIR}/mitkBuildConfigurationDefault.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/Default.cmake)

 set(MITK_VTK_DEBUG_LEAKS OFF CACHE BOOL "Enable VTK Debug Leaks" FORCE)


Fixed to correctly link.

Fixed to correctly link.

--- copasi/common.cmake
+++ copasi/common.cmake
@@ -30,16 +30,12 @@
 set(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${CROSSGUID_LIBRARY})

-if(ENABLE_COPASI_SEDML)
-  set(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${LIBSEDML_LIBRARY})
-  if (LIBNUML_LIBRARY)
+set(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${LIBSEDML_LIBRARY})
+if (LIBNUML_LIBRARY)
   set(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${LIBNUML_LIBRARY})
-  endif()
 endif()

-if(ENABLE_COMBINE_ARCHIVE)
-  set(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${COMBINE_LIBRARY})
-endif()
+set(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${COMBINE_LIBRARY})

 if (APPLE)
   FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)


BUG: superbuild: wrong syntax

BUG: superbuild: wrong syntax

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -138,8 +138,8 @@
     ${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib:$ENV{${LDLIBVAR}}
     ${CMAKE_COMMAND})
   list(APPEND OTB_SB_CONFIG
-    -DCMAKE_C_FLAGS:STRING="-I${CMAKE_INSTALL_PREFIX}/include"
-    -DCMAKE_CXX_FLAGS:STRING="-I${CMAKE_INSTALL_PREFIX}/include")
+    -DCMAKE_C_FLAGS:STRING=-I${CMAKE_INSTALL_PREFIX}/include
+    -DCMAKE_CXX_FLAGS:STRING=-I${CMAKE_INSTALL_PREFIX}/include)
 else()
   set(OTB_SB_CMAKE_COMMAND ${SB_CMAKE_COMMAND})
 endif()


ENH: CI: Fixed ctest_update() source dir when preparing XDK from SuperBuild.

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -77,7 +77,7 @@

 ctest_start (Experimental TRACK CI_Prepare)

-ctest_update()
+ctest_update( SOURCE "${OTB_SOURCE_DIR}" )

 set(CTEST_BUILD_FLAGS "-j16")


vtkModuleMacros: Fix regression in header installation

Fix logic added by commit fe6e1bf3 (vtkModuleMacros: allow skipping
header installation, 2015-10-08) to install unless the variable is set
to tell us not to install.

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -751,7 +751,7 @@
   vtk_module_export("${ARGN}")

   # Figure out which headers to install.
-  if(NOT VTK_INSTALL_NO_DEVELOPMENT AND VTK_INSTALL_NO_HEADERS AND _hdrs)
+  if(NOT VTK_INSTALL_NO_DEVELOPMENT AND NOT VTK_INSTALL_NO_HEADERS AND _hdrs)
     install(FILES ${_hdrs}
       DESTINATION ${VTK_INSTALL_INCLUDE_DIR}
       COMPONENT Development


Allow the pythonpath to be adjusted for the client test module.

We added the ability to specify the client test module in PR #1254.  In
that PR, we started passing whatever the PYTHONPATH environment variable
was to the test.  Although this allows *one* test to override the path,
it fails when there are two such tests in different directories.  This
allows an additional parameter (TEST_PYTHONPATH) to be added to aid in
overriding the PYTHONPATH.  In this way, two tests that require
different paths can be run in the same build.

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -112,6 +112,8 @@
   # BASEURL (url): The base url to load for the test.
   # TEST_MODULE (python module path): Run this module rather than the default
   #     "tests.web_client_test"
+  # TEST_PYTHON_PATH: If specified, add this as the first element of the python
+  #     path when running the test module.
   # SETUP_MODULES: colon-separated list of python scripts to import at test setup time
   #     for side effects such as mocking, adding API routes, etc.
   # SETUP_DATABASE: An absolute path to a database initialization spec
@@ -124,8 +126,8 @@
   set(testname "web_client_${case}")

   set(_options NOCOVERAGE)
-  set(_args PLUGIN ASSETSTORE WEBSECURITY BASEURL PLUGIN_DIR TIMEOUT TEST_MODULE REQUIRED_FILES
-            SETUP_MODULES ENVIRONMENT EXTERNAL_DATA SETUP_DATABASE)
+  set(_args PLUGIN ASSETSTORE WEBSECURITY BASEURL PLUGIN_DIR TIMEOUT TEST_MODULE TEST_PYTHONPATH
+            REQUIRED_FILES SETUP_MODULES ENVIRONMENT EXTERNAL_DATA SETUP_DATABASE)
   set(_multival_args RESOURCE_LOCKS ENABLEDPLUGINS)
   cmake_parse_arguments(fn "${_options}" "${_args}" "${_multival_args}" ${ARGN})

@@ -162,6 +164,12 @@
     set(test_module ${fn_TEST_MODULE})
   else()
     set(test_module "tests.web_client_test")
+  endif()
+
+  if(fn_TEST_PYTHONPATH)
+    set(pythonpath "${fn_TEST_PYTHONPATH}:$ENV{PYTHONPATH}")
+  else()
+    set(pythonpath "$ENV{PYTHONPATH}")
   endif()

   if(fn_EXTERNAL_DATA)
@@ -194,7 +202,7 @@
   string(REPLACE ";" " " plugins "${plugins}")

   set_property(TEST ${testname} PROPERTY ENVIRONMENT
-    "PYTHONPATH=$ENV{PYTHONPATH}"
+    "PYTHONPATH=${pythonpath}"
     "SPEC_FILE=${specFile}"
     "ASSETSTORE_TYPE=${assetstoreType}"
     "WEB_SECURITY=${webSecurity}"


Fix typo

Fix typo

--- src/unit_VEHICLE/cmake/FindChronoEngine.cmake
+++ src/unit_VEHICLE/cmake/FindChronoEngine.cmake
@@ -279,7 +279,7 @@
           PATHS ${CH_LIBDIR_DEBUG}
           )

-        SET(HRONOENGINE_LIBRARY_PYPARSER "")
+        SET(CHRONOENGINE_LIBRARY_PYPARSER "")
         IF(CHRONOENGINE_LIBRARY_PYPARSER_RELEASE)
           SET(CHRONOENGINE_LIBRARY_PYPARSER
             ${CHRONOENGINE_LIBRARY_PYPARSER}


Fix install on Windows w/ static libraries

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -83,7 +83,7 @@
       LIBRARY DESTINATION ${LIBRARY_DIR} COMPONENT lib)
   endforeach()

-  if(MSVC)
+  if(MSVC AND ${${NAME}_LIBRARY_TYPE} STREQUAL "SHARED")
     install(FILES ${CMAKE_BINARY_DIR}/bin/Debug/${Name}.pdb
       DESTINATION bin COMPONENT lib CONFIGURATIONS Debug)
     install(FILES ${CMAKE_BINARY_DIR}/bin/RelWithDebInfo/${Name}.pdb


BUG: missing libpng target for Linux

BUG: missing libpng target for Linux

--- CMake/External_libpng.cmake
+++ CMake/External_libpng.cmake
@@ -2,7 +2,7 @@

 set(proj PNG)

-set(DEFAULT_USE_SYSTEM_PNG  OFF)
+set(DEFAULT_USE_SYSTEM_PNG  ON)

 option(USE_SYSTEM_PNG "  Use a system build of libtiff." ${DEFAULT_USE_SYSTEM_TIFF})
 mark_as_advanced(USE_SYSTEM_PNG)
@@ -18,16 +18,18 @@
     set(PNG_SB_ZLIB_CONFIG)
   else()
     if(MSVC)
-        set(PNG_SB_ZLIB_CONFIG
-            -DZLIB_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/include
-            -DZLIB_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/zlib.lib)
-        list(APPEND ${proj}_DEPENDENCIES ZLIB)
+      set(PNG_SB_ZLIB_CONFIG
+        -DZLIB_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/include
+        -DZLIB_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/zlib.lib)
+    else(UNIX)
+      set(PNG_SB_ZLIB_CONFIG
+        -DZLIB_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/include
+        -DZLIB_LIBRARY:FILEPATH=${CMAKE_INSTALL_PREFIX}/lib/libz.so)
     endif()
+    list(APPEND ${proj}_DEPENDENCIES ZLIB)
   endif()

-  if(MSVC)
-
-     ExternalProject_Add(${proj}
+    ExternalProject_Add(${proj}
       PREFIX ${proj}
       URL "http://sourceforge.net/projects/libpng/files/libpng16/1.6.16/lpng1616.zip/download"
       URL_MD5 c90c9587c9a5c735327fb3f6900f6b03
@@ -35,16 +37,11 @@
       INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
       DEPENDS ${${proj}_DEPENDENCIES}
       CMAKE_CACHE_ARGS
-            -DCMAKE_BUILD_TYPE:STRING=Release
-            -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-            ${PNG_SB_ZLIB_CONFIG}
+        -DCMAKE_BUILD_TYPE:STRING=Release
+        -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
+        ${PNG_SB_ZLIB_CONFIG}
       CMAKE_COMMAND ${SB_CMAKE_COMMAND}
     )

-  else(UNIX)
-    #TODO
-
-  endif()
-
   message(STATUS "  Using libpng SuperBuild version")
 endif()


Fix includes for mbedTLS build (#2266)

Fix includes for mbedTLS build (#2266)

***NO_CI***

--- CMake/binutils.common.cmake
+++ CMake/binutils.common.cmake
@@ -566,9 +566,7 @@
             ${CMAKE_SOURCE_DIR}/src/PAL/COM/sockets/ssl/mbedTLS
             ${CMAKE_SOURCE_DIR}/src/DeviceInterfaces/Networking.Sntp
             ${CMAKE_SOURCE_DIR}/targets/${RTOS}/_include
-            ${CMAKE_SOURCE_DIR}/targets/${RTOS}/${TARGET_BOARD}/nanoCLR
-            ${CMAKE_BINARY_DIR}/targets/${RTOS}/${TARGET_BOARD}
-            ${CMAKE_BINARY_DIR}/targets/${RTOS}/${TARGET_BOARD}/nanoCLR
+            ${TARGET_BASE_LOCATION}/nanoCLR
             ${TARGET_BASE_LOCATION}
         )


add architectures

add architectures

--- contrib/cmake/vcpkg_extra_triplets/x64-osx-mega.cmake
+++ contrib/cmake/vcpkg_extra_triplets/x64-osx-mega.cmake
@@ -2,6 +2,7 @@
 set(VCPKG_CRT_LINKAGE dynamic)

 set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
+set(VCPKG_OSX_ARCHITECTURES x86_64)
 set(VCPKG_OSX_DEPLOYMENT_TARGET 10.9)

 if(PORT MATCHES "curl" OR


Fix bug 542: fix detection of compiler version on systems without the head command.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -322,13 +322,21 @@
     endif()
   else()
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
-    # supporting a "--version" flag
-    execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
-                    COMMAND head -n 1
-                    OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+    # supporting a "--version" flag

-    ei_get_compilerver_from_cxx_version_string(${eigen_cxx_compiler_version_string} CNAME CVER)
+    # check whether the head command exists
+    find_program(HEAD_EXE head NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_CMAKE_SYSTEM_PATH)
+    if(HEAD_EXE)
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+                      COMMAND head -n 1
+                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+    else()
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+                      OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+      string(REGEX REPLACE "[\n\r].*"  ""  eigen_cxx_compiler_version_string  ${eigen_cxx_compiler_version_string})
+    endif()

+    ei_get_compilerver_from_cxx_version_string("${eigen_cxx_compiler_version_string}" CNAME CVER)
     set(${VAR} "${CNAME}-${CVER}")
   endif()
 endmacro(ei_get_compilerver)


added cygwin specific stuff

added cygwin specific stuff

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -96,7 +96,11 @@
   endif(${ARGC} GREATER 2)

   if(WIN32)
-    add_test(${testname} "${targetname}")
+    if(CYGWIN)
+      add_test(${testname} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname}")
+    else(CYGWIN)
+      add_test(${testname} "${targetname}")
+    endif(CYGWIN)
   else(WIN32)
     add_test(${testname} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname}")
   endif(WIN32)


Remove select_library_configurations() from FindHarfBuzz

--- cmake/FindHarfBuzz.cmake
+++ cmake/FindHarfBuzz.cmake
@@ -58,8 +58,6 @@
     PATH_SUFFIXES
       lib
   )
-  include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
-  select_library_configurations(HARFBUZZ)
 else()
   # on Windows, ensure paths are in canonical format (forward slahes):
   file(TO_CMAKE_PATH "${HARFBUZZ_LIBRARY}" HARFBUZZ_LIBRARY)


Delete FindLibevent.cmake

Delete FindLibevent.cmake

--- cmake/FindLibevent.cmake
+++ cmake/FindLibevent.cmake
@@ -1,6 +0,0 @@
-find_path(LIBEVENT_INCLUDE_DIR event.h ${PROJECT_SOURCE_DIR}/third_party/libevent/include)
-find_library(LIBEVENT_LIBRARY_DIR NAMES event ${PROJECT_SOURCE_DIR}/third_party/libevent/lib)
-
-if(LIBEVENT_INCLUDE_DIR AND LIBEVENT_LIBRARY_DIR)
-  set(LIBEVENT_FOUND TRUE)
-endif(LIBEVENT_INCLUDE_DIR AND LIBEVENT_LIBRARY_DIR)


[skip ci] Small tweak to the verbosity of the build system.

--- cmake/FindQuadmath.cmake
+++ cmake/FindQuadmath.cmake
@@ -56,10 +56,6 @@
     endif()
 endif()

-if(Quadmath_USE_DIRECTLY)
-    message(STATUS "libquadmath will be included and linked directly.")
-endif()
-
 find_package_handle_standard_args(Quadmath DEFAULT_MSG Quadmath_LIBRARY Quadmath_INCLUDE_DIR)

 mark_as_advanced(Quadmath_INCLUDE_DIR Quadmath_LIBRARY)
@@ -68,6 +64,7 @@
 if(Quadmath_FOUND AND NOT TARGET Quadmath::quadmath)
     message(STATUS "Creating the 'Quadmath::quadmath' imported target.")
     if(Quadmath_USE_DIRECTLY)
+        message(STATUS "libquadmath will be included and linked directly.")
         # If we are using it directly, we must define an interface library,
         # as we do not have the full path to the shared library.
         add_library(Quadmath::quadmath INTERFACE IMPORTED)


[CMake] fix mapnik_option

[CMake] fix mapnik_option

--- cmake/MapnikOption.cmake
+++ cmake/MapnikOption.cmake
@@ -1,4 +1,4 @@
 macro(mapnik_option option_name option_description option_default_value)
     option(${option_name} "${option_description}" ${option_default_value})
-    add_feature_info(${option_name} ${${option_name}} "${option_description}")
+    add_feature_info(${option_name} ${option_name} "${option_description}")
 endmacro()


Minor fix.

Minor fix.

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -199,7 +199,6 @@
         list(APPEND functions "    #endif:")
     endforeach()

-    list(APPEND functions "}")
     set(headers ${headers})
     set(functions ${functions})
     join(";" "\n" MODULE_HEADERS ${headers})


SH-467 FIX fix of VWR-20809/SNOW-504 lost in merge

re-applying the fix originally committed as c5ddd1e361ae.
This allows standalone builds to not depend on stage_third_party_libs
but was lost in a merge as referenced in jira. Re-reviewed the code
in the patch and it is a valid fix.

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -295,7 +295,7 @@
     ${vivox_src_dir}
     "${SHARED_LIB_STAGING_DIR_DEBUG}"
     out_targets
-   ${vivox_files}
+    ${vivox_files}
     )
 set(third_party_targets ${third_party_targets} ${out_targets})

@@ -376,7 +376,9 @@
 endif (NOT EXISTS ${internal_llkdu_path})

-add_custom_target(stage_third_party_libs ALL
-  DEPENDS
-    ${third_party_targets}
-  )
+if(NOT STANDALONE)
+  add_custom_target(
+      stage_third_party_libs ALL
+      DEPENDS ${third_party_targets}
+      )
+endif(NOT STANDALONE)


More path fixups in staging

More path fixups in staging

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -223,7 +223,7 @@
        )

     if (FMODEX)
-      #set(debug_files ${debug_files} libfmodexL.dylib)
+      set(debug_files ${debug_files} libfmodexL.dylib)
       set(release_files ${release_files} libfmodex.dylib)
     endif (FMODEX)

@@ -291,7 +291,7 @@
     endif (USE_TCMALLOC)

     if (FMODEX)
-      set(release_file ${release_files} "libfmodex-4.44.so")
+      set(release_file ${release_files} "libfmodex.so")
     endif (FMODEX)

 else(WINDOWS)


fpta-cmake: check git result codes.

fpta-cmake: check git result codes.

--- cmake.fpta/utils.cmake
+++ cmake.fpta/utils.cmake
@@ -49,27 +49,47 @@
     execute_process(COMMAND ${GIT} describe --tags --long --dirty=-dirty
       OUTPUT_VARIABLE ${name}_GIT_DESCRIBE
       OUTPUT_STRIP_TRAILING_WHITESPACE
-      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      RESULT_VARIABLE rc)
+    if(rc)
+      message(FATAL_ERROR "Please install latest version of git ('describe --tags --long --dirty' failed)")
+    endif()

     execute_process(COMMAND ${GIT} show --no-patch --format=%cI HEAD
       OUTPUT_VARIABLE ${name}_GIT_TIMESTAMP
       OUTPUT_STRIP_TRAILING_WHITESPACE
-      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      RESULT_VARIABLE rc)
+    if(rc)
+      message(FATAL_ERROR "Please install latest version of git ('show --no-patch --format=%cI HEAD' failed)")
+    endif()

     execute_process(COMMAND ${GIT} show --no-patch --format=%T HEAD
       OUTPUT_VARIABLE ${name}_GIT_TREE
       OUTPUT_STRIP_TRAILING_WHITESPACE
-      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      RESULT_VARIABLE rc)
+    if(rc)
+      message(FATAL_ERROR "Please install latest version of git ('show --no-patch --format=%T HEAD' failed)")
+    endif()

     execute_process(COMMAND ${GIT} show --no-patch --format=%H HEAD
       OUTPUT_VARIABLE ${name}_GIT_COMMIT
       OUTPUT_STRIP_TRAILING_WHITESPACE
-      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      RESULT_VARIABLE rc)
+    if(rc)
+      message(FATAL_ERROR "Please install latest version of git ('show --no-patch --format=%H HEAD' failed)")
+    endif()

     execute_process(COMMAND ${GIT} rev-list --count --no-merges HEAD
       OUTPUT_VARIABLE ${name}_GIT_REVISION
       OUTPUT_STRIP_TRAILING_WHITESPACE
-      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      RESULT_VARIABLE rc)
+    if(rc)
+      message(FATAL_ERROR "Please install latest version of git ('rev-list --count --no-merges HEAD' failed)")
+    endif()

     string(REGEX MATCH "^(v)?([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)?" git_version_valid "${${name}_GIT_DESCRIBE}")
     if(git_version_valid)


Revert "cmake: fix linking against libs in custom prefix"

This reverts commit b3dba5700df94cda126a9b7e19896ee8c8557295.

--- cmake/DPF-plugin.cmake
+++ cmake/DPF-plugin.cmake
@@ -188,7 +188,6 @@
     OUTPUT_NAME "${NAME}")

   target_include_directories("${NAME}-jack" PRIVATE ${JACK_INCLUDE_DIRS})
-  target_link_directories("${NAME}-jack" PRIVATE ${JACK_LIBRARY_DIRS})
   target_link_libraries("${NAME}-jack" PRIVATE ${JACK_LIBRARIES})
   link_directories(${JACK_LIBRARY_DIRS})
 endfunction()
@@ -243,7 +242,6 @@
       OUTPUT_NAME "${NAME}_ui")

     target_include_directories("${NAME}-dssi-ui" PRIVATE ${LIBLO_INCLUDE_DIRS})
-    target_link_directories("${NAME}-dssi-ui" PRIVATE ${LIBLO_LIBRARY_DIRS})
     target_link_libraries("${NAME}-dssi-ui" PRIVATE ${LIBLO_LIBRARIES})
     link_directories(${LIBLO_LIBRARY_DIRS})
   endif()
@@ -349,7 +347,6 @@
   target_compile_definitions(dgl-cairo-definitions INTERFACE "DGL_CAIRO" "HAVE_CAIRO")

   target_include_directories(dgl-cairo PUBLIC ${CAIRO_INCLUDE_DIRS})
-  target_link_directories(dgl-cairo PRIVATE ${CAIRO_LIBRARY_DIRS})
   target_link_libraries(dgl-cairo PRIVATE dgl-cairo-definitions ${CAIRO_LIBRARIES})
   link_directories(${CAIRO_LIBRARY_DIRS})
 endfunction()


FindEigen3.cmake : search for package only if EIGEN3_INCLUDE_DIR is not already defined

--- cmake/FindEigen3.cmake
+++ cmake/FindEigen3.cmake
@@ -35,11 +35,6 @@
   set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
 endif(NOT Eigen3_FIND_VERSION)

-# search first if an Eigen3Config.cmake is available in the system,
-# if successful this would set EIGEN3_INCLUDE_DIR and the rest of
-# the script will work as usual
-find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)
-
 macro(_eigen3_check_version)
   file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)

@@ -71,16 +66,23 @@
   set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})

 else (EIGEN3_INCLUDE_DIR)
+
+  # search first if an Eigen3Config.cmake is available in the system,
+  # if successful this would set EIGEN3_INCLUDE_DIR and the rest of
+  # the script will work as usual
+  find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)

-  find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
-      HINTS
-      ENV EIGEN3_ROOT
-      ENV EIGEN3_ROOT_DIR
-      PATHS
-      ${CMAKE_INSTALL_PREFIX}/include
-      ${KDE4_INCLUDE_DIR}
-      PATH_SUFFIXES eigen3 eigen
-    )
+  if(NOT EIGEN3_INCLUDE_DIR)
+    find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
+        HINTS
+        ENV EIGEN3_ROOT
+        ENV EIGEN3_ROOT_DIR
+        PATHS
+        ${CMAKE_INSTALL_PREFIX}/include
+        ${KDE4_INCLUDE_DIR}
+        PATH_SUFFIXES eigen3 eigen
+      )
+  endif(NOT EIGEN3_INCLUDE_DIR)

   if(EIGEN3_INCLUDE_DIR)
     _eigen3_check_version()


Fix a small screwup

Fix a small screwup

--- cmake/FindOpenCL.cmake
+++ cmake/FindOpenCL.cmake
@@ -75,7 +75,7 @@

 find_path(OpenCL_INCLUDE_DIR
   NAMES
-    cl.h cl.h
+    cl.h
   PATHS
     ENV "PROGRAMFILES(X86)"
     ENV AMDAPPSDKROOT


fix a bug in FindGlog.cmake

fix a bug in FindGlog.cmake

Summary:
Call `find_package_handle_standard_args()` with a package name of `Glog`
rather than `glog`, so that it sets `Glog_FOUND` rather than `glog_FOUND`.
This argument needs to match the case of our file name (FindGlog.cmake), since
CMake variables are case-sensitive.

Reviewed By: Orvid

Differential Revision: D36678745

fbshipit-source-id: 6a0578103d12684e414664b17f7880664c0141f4

--- build/fbcode_builder/CMake/FindGlog.cmake
+++ build/fbcode_builder/CMake/FindGlog.cmake
@@ -19,7 +19,7 @@

 select_library_configurations(GLOG)

-find_package_handle_standard_args(glog DEFAULT_MSG
+find_package_handle_standard_args(Glog DEFAULT_MSG
   GLOG_LIBRARY
   GLOG_INCLUDE_DIR)


Remove code for old ITK_WRAPPING option.

It is not reasonable to use SimpleITK along with native ITK wrapping.

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -350,11 +350,6 @@
 # ITK
 #------------------------------------------------------------------------------

-set(ITK_WRAPPING OFF CACHE BOOL "Turn OFF wrapping ITK with WrapITK")
-mark_as_advanced( FORCE ITK_WRAPPING )
-if(ITK_WRAPPING)
-  list(APPEND ITK_DEPENDENCIES Swig)
-endif()
 option(SimpleITK_USE_SYSTEM_ITK "Use a pre-built version of ITK" OFF)
 sitk_legacy_naming( SimpleITK_USE_SYSTEM_ITK USE_SYSTEM_ITK )
 mark_as_advanced(SimpleITK_USE_SYSTEM_ITK)


Suppress GCC warnings for float comparison

--- support/cmake/set_openspace_compile_settings.cmake
+++ support/cmake/set_openspace_compile_settings.cmake
@@ -203,6 +203,7 @@
     "-Wlogical-op"
     "-Wint-in-bool-context"
     "-Wno-deprecated-copy"
+    "-Wno-float-equal"
     "-Wno-write-strings"
     "-Wnon-virtual-dtor"
     "-Wold-style-cast"


We're up to Boost 1.42 now.  Just updating the list.

--HG--
branch : v1-7

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -125,7 +125,7 @@
 		# Statically linking boost to a dynamic Ogre build doesn't work on Linux 64bit
 		set(Boost_USE_STATIC_LIBS ${OGRE_STATIC})
 	endif ()
-	set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" "1.40.0" "1.40")
+	set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" "1.40.0" "1.40" "1.41" "1.42")
 	# Components that need linking (NB does not include header-only components like bind)
 	set(OGRE_BOOST_COMPONENTS thread date_time)
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)


Use updated CTK with command line module support.

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag 412abe63)
+    set(revision_tag d67997d6)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -49,7 +49,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 75e0c23c475d32d1a215c6241c49bb29
+      URL_MD5 f3ff74955ca53f4c71cfda4c34a0fc5f
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}
@@ -60,6 +60,8 @@
         -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
         -DGit_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
         -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
+        -DCTK_LIB_CommandLineModules/Backend/LocalProcess:BOOL=ON
+        -DCTK_LIB_CommandLineModules/Frontend/QtGui:BOOL=ON
         -DCTK_LIB_PluginFramework:BOOL=ON
         -DCTK_LIB_DICOM/Widgets:BOOL=ON
         -DCTK_PLUGIN_org.commontk.eventadmin:BOOL=ON


Update CTK revision.

Update CTK revision.

This CTK version has cleaned up it's debug messages in the
Plugin Framework.

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag 5f8872e0)
+    SET(revision_tag cd46fbef)
     IF(${proj}_REVISION_TAG)
       SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Upgrade CTK

Upgrade CTK

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag 0d43ccf0)
+    set(revision_tag 0c2a619a)

     set(ctk_optional_cache_args )
     if(MITK_USE_Python)
@@ -57,7 +57,7 @@
     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 e40466b607529a6d80f0d08b19cc4f05
+      URL_MD5 e1f94ba0199eccf335ec2c2b48e155da
       # PATCH_COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/CTK.patch
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""


Use official ITK release tarball

Use official ITK release tarball

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -52,9 +52,8 @@
   ExternalProject_Add(${proj}
      LIST_SEPARATOR ${sep}
      UPDATE_COMMAND ""
-     # ITK 4.13 release branch snapshot
-     URL https://github.com/InsightSoftwareConsortium/ITK/archive/e53d1d94.tar.gz
-     URL_MD5 977f77cb299cf3d722d13dd5408bcde5
+     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.13.3.tar.gz
+     URL_MD5 d1c10c8288b47577d718a71190444815
      CMAKE_GENERATOR ${gen}
      CMAKE_GENERATOR_PLATFORM ${gen_platform}
      CMAKE_ARGS


Propagate some CMake variables to checkperf

Although it passes user-defined options, if the project is build in Debug mode or with Clang (since
CXX defaults to gcc on Linux) results can flactuate

--- benchmark/checkperf.cmake
+++ benchmark/checkperf.cmake
@@ -58,7 +58,9 @@
   # - second, cmake ..
   add_custom_command(
     OUTPUT ${SIMDJSON_CHECKPERF_DIR}/build/cmake_install.cmake # We make many things but this seems the most cross-platform one we can depend on
-    COMMAND ${CMAKE_COMMAND} -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_COMPETITION=OFF -G ${CMAKE_GENERATOR} ..
+    COMMAND
+    ${CMAKE_COMMAND} -E env CXX=${CMAKE_CXX_COMPILER} CC=${CMAKE_C_COMPILER}
+    ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_COMPETITION=OFF -G ${CMAKE_GENERATOR} ..
     WORKING_DIRECTORY ${SIMDJSON_CHECKPERF_DIR}/build
     DEPENDS ${SIMDJSON_CHECKPERF_DIR}/build/CMakeCache.txt
   )


vtkFiltersPython: Disable without Python wrapping

Change-Id: Ib90ccaa7ea9c7dfc2ea4e7647f423a0c45f31b04

--- Filters/Python/module.cmake
+++ Filters/Python/module.cmake
@@ -1,9 +1,11 @@
-vtk_module(vtkFiltersPython
-  GROUPS
-    StandAlone
-  DEPENDS
-    vtkCommonExecutionModel
-    vtkPython
-  PRIVATE_DEPENDS
-    vtkWrappingPythonCore
-  )
+if (VTK_WRAP_PYTHON)
+  vtk_module(vtkFiltersPython
+    GROUPS
+      StandAlone
+    DEPENDS
+      vtkCommonExecutionModel
+      vtkPython
+    PRIVATE_DEPENDS
+      vtkWrappingPythonCore
+    )
+endif ()


[Findsodium.cmake] DON'T OVERWRITE LIBRARY SUFFIXES (#576)

--- contrib/Findsodium.cmake
+++ contrib/Findsodium.cmake
@@ -130,6 +130,7 @@
             PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX}
         )
         if (NOT sodium_USE_STATIC_LIBS)
+            set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
             set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
             find_library(sodium_DLL_DEBUG libsodium
                 HINTS ${sodium_DIR}
@@ -139,6 +140,7 @@
                 HINTS ${sodium_DIR}
                 PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX}
             )
+            set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
         endif()

     elseif(_GCC_COMPATIBLE)


Add a configure check for a regression with icc-14.0.0 and libstdc++-4.7 in C++11 mode

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

--- deal.II/cmake/checks/check_03_compiler_bugs.cmake
+++ deal.II/cmake/checks/check_03_compiler_bugs.cmake
@@ -314,15 +314,42 @@
   "
   DEAL_II_ICC_NUMERICLIMITS_BUG)

-IF(DEAL_II_ICC_NUMERICLIMITS_BUG)
+#
+# icc-14.0.0 has an astonishing bug [1] where it hits an internal compiler
+# error when run in C++11 mode with libstdc++-4.7 (from gcc).
+#
+# We just disable C++11 mode in this case
+#
+# [1] http://software.intel.com/en-us/forums/topic/472385
+#
+# - Matthias Maier, 2013
+#
+CHECK_CXX_COMPILER_BUG(
+  "
+  #include <vector>
+  template<typename T> void foo()
+  {
+    std::vector<double> data(100);
+  }
+  int main()
+  {
+    foo<int>();
+  }
+  "
+  DEAL_II_ICC_LIBSTDCPP47CXX11_BUG)
+
+
+IF( DEAL_II_ICC_NUMERICLIMITS_BUG OR
+    DEAL_II_ICC_LIBSTDCPP47CXX11_BUG )
   MESSAGE(STATUS
-    "DEAL_II_ICC_NUMERICLIMITS_BUG found, disabling c++11 support"
+    "Intel C++11 bug found, disabling C++11 support"
     )
   STRIP_FLAG(CMAKE_CXX_FLAGS "${DEAL_II_CXX11_FLAG}")
   SET(DEAL_II_CAN_USE_CXX1X FALSE)
   SET(DEAL_II_USE_CXX11 FALSE)
 ENDIF()

+
 #
 # gcc-4.8.1 has some problems with the constexpr "vertices_per_cell" in the
 # definition of alternating_form_at_vertices.


Fix 64-bit ABI detection on iOS platform again. Older Xcode/lipo tool may not recognize 64-bit ARM arch as 'arm64' yet, so use 'x86_64' as the grep keyword instead. [skip appveyor] [ci only: OSX]

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -257,7 +257,7 @@
                 # Auto-discover build options used by the found library
                 if (IOS)
                     # Since Urho3D library for iOS is a universal binary, we need another way to find out the compiler ABI when the library was built
-                    execute_process (COMMAND lipo -info ${URHO3D_LIBRARIES} COMMAND grep -cq 'arm64' RESULT_VARIABLE GREP_RESULT OUTPUT_QUIET ERROR_QUIET)
+                    execute_process (COMMAND lipo -info ${URHO3D_LIBRARIES} COMMAND grep -cq 'x86_64' RESULT_VARIABLE GREP_RESULT OUTPUT_QUIET ERROR_QUIET)
                     math (EXPR ABI_64BIT "1 - ${GREP_RESULT}")
                 endif ()
                 set (URHO3D_64BIT ${ABI_64BIT} CACHE BOOL "Enable 64-bit build, the value is auto-discovered based on the found Urho3D library" FORCE) # Force it as it is more authoritative than user-specified option


Remove conflicting optimization flags (-mcpu includes -march) (#10165)

--- cmake/toolchains/Toolchain-arm-none-eabi.cmake
+++ cmake/toolchains/Toolchain-arm-none-eabi.cmake
@@ -55,11 +55,11 @@

 set(cpu_flags)
 if (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m7")
-	set(cpu_flags "-mcpu=cortex-m7 -mthumb -march=armv7e-m -mfpu=fpv5-d16 -mfloat-abi=hard")
+	set(cpu_flags "-mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard")
 elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m4")
-	set(cpu_flags "-mcpu=cortex-m4 -mthumb -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard")
+	set(cpu_flags "-mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard")
 elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m3")
-	set(cpu_flags "-mcpu=cortex-m3 -mthumb -march=armv7-m")
+	set(cpu_flags "-mcpu=cortex-m3 -mthumb")
 else ()
 	message(FATAL_ERROR "Processor not recognised in toolchain file")
 endif()


updates to test.cmake

updates to test.cmake

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -43,6 +43,7 @@
       WORKING_DIRECTORY ${TEST_MODELS_DIRECTORY}
   )
 ENDMACRO()
+

 # increase default output sizes for test outputs
 IF (NOT DEFINED CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE)


Set branding to VeloView

Set branding to VeloView

--- Application/SoftwareInformation/branding.cmake
+++ Application/SoftwareInformation/branding.cmake
@@ -1,5 +1,5 @@
-set(SOFTWARE_NAME "LidarView")
-set(VENDOR "Kitware, Inc.")
+set(SOFTWARE_NAME "VeloView")
+set(VENDOR "Velodyne, Inc.")
 set(PROJECT_NAME "${SOFTWARE_NAME}")

 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${SOFTWARE_NAME}")


Generate only version header if forge is not build

--- CMakeModules/AFconfigure_forge_submodule.cmake
+++ CMakeModules/AFconfigure_forge_submodule.cmake
@@ -5,35 +5,43 @@
 # The complete license agreement can be obtained at:
 # http://arrayfire.com/licenses/BSD-3-Clause

-set(ArrayFireInstallPrefix ${CMAKE_INSTALL_PREFIX})
-set(ArrayFireBuildType ${CMAKE_BUILD_TYPE})
-set(CMAKE_INSTALL_PREFIX ${ArrayFire_BINARY_DIR}/extern/forge/package)
-set(CMAKE_BUILD_TYPE Release)
-set(FG_BUILD_EXAMPLES OFF CACHE BOOL "Used to build Forge examples")
-set(FG_BUILD_DOCS OFF CACHE BOOL "Used to build Forge documentation")
-set(FG_WITH_FREEIMAGE OFF CACHE BOOL "Turn on usage of freeimage dependency")
-if (AF_BUILD_FORGE)
+if(AF_BUILD_FORGE)
+  set(ArrayFireInstallPrefix ${CMAKE_INSTALL_PREFIX})
+  set(ArrayFireBuildType ${CMAKE_BUILD_TYPE})
+  set(CMAKE_INSTALL_PREFIX ${ArrayFire_BINARY_DIR}/extern/forge/package)
+  set(CMAKE_BUILD_TYPE Release)
+  set(FG_BUILD_EXAMPLES OFF CACHE BOOL "Used to build Forge examples")
+  set(FG_BUILD_DOCS OFF CACHE BOOL "Used to build Forge documentation")
+  set(FG_WITH_FREEIMAGE OFF CACHE BOOL "Turn on usage of freeimage dependency")
+
   add_subdirectory(extern/forge)
-else (AF_BUILD_FORGE)
-  add_subdirectory(extern/forge EXCLUDE_FROM_ALL)
-endif (AF_BUILD_FORGE)
-mark_as_advanced(
-    FG_BUILD_EXAMPLES
-    FG_BUILD_DOCS
-    FG_WITH_FREEIMAGE
-    FG_USE_WINDOW_TOOLKIT
-    FG_USE_SYSTEM_CL2HPP
-    FG_ENABLE_HUNTER
-    glfw3_DIR
-    glm_DIR
-    )
-set(CMAKE_BUILD_TYPE ${ArrayFireBuildType})
-set(CMAKE_INSTALL_PREFIX ${ArrayFireInstallPrefix})

-if (AF_BUILD_FORGE)
+  mark_as_advanced(
+      FG_BUILD_EXAMPLES
+      FG_BUILD_DOCS
+      FG_WITH_FREEIMAGE
+      FG_USE_WINDOW_TOOLKIT
+      FG_USE_SYSTEM_CL2HPP
+      FG_ENABLE_HUNTER
+      glfw3_DIR
+      glm_DIR
+      )
+  set(CMAKE_BUILD_TYPE ${ArrayFireBuildType})
+  set(CMAKE_INSTALL_PREFIX ${ArrayFireInstallPrefix})
+
   install(FILES
       $<TARGET_FILE:forge>
       $<TARGET_SONAME_FILE:forge>
       DESTINATION "${AF_INSTALL_LIB_DIR}"
       COMPONENT common_backend_dependencies)
-endif (AF_BUILD_FORGE)
+else(AF_BUILD_FORGE)
+  set(FG_VERSION "1.0.0")
+  set(FG_VERSION_MAJOR 1)
+  set(FG_VERSION_MINOR 0)
+  set(FG_VERSION_PATCH 0)
+  set(FG_API_VERSION_CURRENT 10)
+  configure_file(
+    ${PROJECT_SOURCE_DIR}/extern/forge/CMakeModules/version.h.in
+    ${PROJECT_BINARY_DIR}/extern/forge/include/fg/version.h
+    )
+endif(AF_BUILD_FORGE)


Fix build on Windows

Fix build on Windows

--- cmake/Modules/FindMaya.cmake
+++ cmake/Modules/FindMaya.cmake
@@ -30,6 +30,7 @@

 # On Windows, verify that the correct compiler is used.
 if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
+    list( APPEND _maya_msvc_versions 1700 )
     list( APPEND _maya_msvc_versions 1700 )
     list( APPEND _maya_msvc_versions 1700 )
     list( APPEND _maya_msvc_versions 1600 )


[cmake] Fix fallout from pull request #37741

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -371,7 +371,11 @@
   if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
     if(SWIFT_USE_LINKER)
       target_link_options(${target} PRIVATE
-        -fuse-ld=${SWIFT_USE_LINKER}$<$<STREQUAL:${CMAKE_HOST_SYSTEM_NAME},Windows>:.exe>)
+        $<$<LINK_LANGUAGE:CXX>:-fuse-ld=${SWIFT_USE_LINKER}$<$<STREQUAL:${CMAKE_HOST_SYSTEM_NAME},Windows>:.exe>>)
+      if (CMAKE_Swift_COMPILER)
+        target_link_options(${target} PRIVATE
+          $<$<LINK_LANGUAGE:Swift>:-use-ld=${SWIFT_USE_LINKER}$<$<STREQUAL:${CMAKE_HOST_SYSTEM_NAME},Windows>:.exe>>)
+      endif()
     endif()
   endif()


[Build] Relax CMAKE_C_COMPILER_ID "Clang" check to match AppleClang

In https://github.com/apple/swift/pull/19973 the logic that adds "-target" when
building the C parts of the Standard Library and overlays was changed to use
CMAKE_C_COMPILER_ID to only do so when the compiler ID is "Clang". However,
on Apple toolchains the compiler ID is "AppleClang", so the target was no
longer being explicitly set.

Update the logic to relax the explicit check for "Clang" to also allow
"AppleClang".

rdar://problem/45579667

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -120,7 +120,8 @@
   endif()

   # MSVC, clang-cl, gcc don't understand -target.
-  if(CMAKE_C_COMPILER_ID STREQUAL Clang AND NOT SWIFT_COMPILER_IS_MSVC_LIKE)
+  if(CMAKE_C_COMPILER_ID MATCHES "^Clang|AppleClang$" AND
+      NOT SWIFT_COMPILER_IS_MSVC_LIKE)
     list(APPEND result "-target" "${SWIFT_SDK_${CFLAGS_SDK}_ARCH_${CFLAGS_ARCH}_TRIPLE}${DEPLOYMENT_VERSION}")
   endif()