Made test run mandatory before considering the check target to be run

--- test/test_driver.cmake
+++ test/test_driver.cmake
@@ -32,7 +32,7 @@
     )
     add_custom_command(
         TARGET check
-        POST_BUILD
+        PRE_BUILD
         COMMAND make ${test_target} #TODO: Windows?
         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
         COMMENT "Running ${test_target} ..." VERBATIM


build: allow the user to specify `llvm-tblgen`

This follows the same pattern as Clang and permits the user to specify
the tablegen to use via `-DLLVM_TABLEGEN=`.  This allows for
cross-compiling LLDB for a foreign target (e.g. Windows ARM64 on Windows
X64).  The LLVM dependency for LLDB in that case must be a Windows ARM64
build which cannot cross-compile llvm-tblgen due to the way that Visual
Studio works.  Instead, permit the user to have a separate tablegen
build which can be used during the build.

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

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -31,31 +31,35 @@
 find_program(lit_full_path ${lit_file_name} ${config_dirs} NO_DEFAULT_PATH)
 set(LLVM_DEFAULT_EXTERNAL_LIT ${lit_full_path} CACHE PATH "Path to llvm-lit")

-if(CMAKE_CROSSCOMPILING)
-  set(LLVM_NATIVE_BUILD "${LLVM_BINARY_DIR}/NATIVE")
-  if (NOT EXISTS "${LLVM_NATIVE_BUILD}")
-    message(FATAL_ERROR
-      "Attempting to cross-compile LLDB standalone but no native LLVM build
-      found. Please cross-compile LLVM as well.")
+if(LLVM_TABLEGEN)
+  set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN})
+else()
+  if(CMAKE_CROSSCOMPILING)
+    set(LLVM_NATIVE_BUILD "${LLVM_BINARY_DIR}/NATIVE")
+    if (NOT EXISTS "${LLVM_NATIVE_BUILD}")
+      message(FATAL_ERROR
+        "Attempting to cross-compile LLDB standalone but no native LLVM build
+        found. Please cross-compile LLVM as well.")
+    endif()
+
+    if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
+      set(HOST_EXECUTABLE_SUFFIX ".exe")
+    endif()
+
+    if (NOT CMAKE_CONFIGURATION_TYPES)
+      set(LLVM_TABLEGEN_EXE
+        "${LLVM_NATIVE_BUILD}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+    else()
+      # NOTE: LLVM NATIVE build is always built Release, as is specified in
+      # CrossCompile.cmake
+      set(LLVM_TABLEGEN_EXE
+        "${LLVM_NATIVE_BUILD}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+    endif()
+  else()
+    set(tblgen_file_name "llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
+    append_configuration_directories(${LLVM_TOOLS_BINARY_DIR} config_dirs)
+    find_program(LLVM_TABLEGEN_EXE ${tblgen_file_name} ${config_dirs} NO_DEFAULT_PATH)
   endif()
-
-  if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
-    set(HOST_EXECUTABLE_SUFFIX ".exe")
-  endif()
-
-  if (NOT CMAKE_CONFIGURATION_TYPES)
-    set(LLVM_TABLEGEN_EXE
-      "${LLVM_NATIVE_BUILD}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
-  else()
-    # NOTE: LLVM NATIVE build is always built Release, as is specified in
-    # CrossCompile.cmake
-    set(LLVM_TABLEGEN_EXE
-      "${LLVM_NATIVE_BUILD}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
-  endif()
-else()
-  set(tblgen_file_name "llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
-  append_configuration_directories(${LLVM_TOOLS_BINARY_DIR} config_dirs)
-  find_program(LLVM_TABLEGEN_EXE ${tblgen_file_name} ${config_dirs} NO_DEFAULT_PATH)
 endif()

 # They are used as destination of target generators.


[cmake] Fix add_version_info_from_vcs git svn version bug.

Summary:
add_version_info_from_vcs was setting SVN_REVISION to the last fetched
svn revision when using git svn instead of the svn revision
corresponding to HEAD.  This leads to conflicts with the definition of
SVN_REVISION in SVNVersion.inc generated by GetSVN.cmake when HEAD is
not the most recently fetched svn revision.

Use 'git svn info' to determine SVN_REVISION when git svn is being used
instead (as is done in GetSVN.cmake).

Reviewers: beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16299

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

--- cmake/modules/VersionFromVCS.cmake
+++ cmake/modules/VersionFromVCS.cmake
@@ -27,16 +27,20 @@
       find_program(git_executable NAMES git git.exe git.cmd)
       if( git_executable )
         set(is_git_svn_rev_exact false)
-        execute_process(COMMAND ${git_executable} svn log --limit=1 --oneline
+        execute_process(COMMAND
+          ${git_executable} svn info
           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
           TIMEOUT 5
           RESULT_VARIABLE git_result
           OUTPUT_VARIABLE git_output)
         if( git_result EQUAL 0 )
-          string(REGEX MATCH r[0-9]+ git_svn_rev ${git_output})
-          string(LENGTH "${git_svn_rev}" rev_length)
-          math(EXPR rev_length "${rev_length}-1")
-          string(SUBSTRING "${git_svn_rev}" 1 ${rev_length} git_svn_rev_number)
+          string(REGEX MATCH "URL: ([^ \n]*)" svn_url ${git_output})
+          if(svn_url)
+            set(LLVM_REPOSITORY ${CMAKE_MATCH_1} PARENT_SCOPE)
+          endif()
+
+          string(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
+            "\\2" git_svn_rev_number "${git_output}")
           set(SVN_REVISION ${git_svn_rev_number} PARENT_SCOPE)
           set(git_svn_rev "-svn-${git_svn_rev}")

@@ -69,18 +73,6 @@
           set(result "${result}${git_svn_rev}")
         endif()

-        execute_process(COMMAND
-          ${git_executable} svn info
-          WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-          TIMEOUT 5
-          RESULT_VARIABLE git_result
-          OUTPUT_VARIABLE git_output)
-        if( git_result EQUAL 0)
-          string(REGEX MATCH "URL: ([^ \n]*)" svn_url ${git_output})
-          if(svn_url)
-            set(LLVM_REPOSITORY ${CMAKE_MATCH_1} PARENT_SCOPE)
-          endif()
-        endif()
       endif()
     endif()
   endif()


Begin adding objects.

Begin adding objects.

--- cmake/FileList.cmake
+++ cmake/FileList.cmake
@@ -212,6 +212,7 @@
 src/platformer/background.cpp
 src/platformer/camera.cpp
 src/platformer/game.cpp
+src/platformer/object.cpp
 src/platformer/tile.cpp
 src/platformer/world.cpp
 )


dismiss glew

dismiss glew

--- cmake/FindGLEW.cmake
+++ cmake/FindGLEW.cmake
@@ -1,43 +0,0 @@
-# GLEW_FOUND
-# GLEW_INCLUDE_DIR
-# GLEW_LIBRARY
-# GLEW_BINARY
-
-find_path(GLEW_INCLUDE_DIR GL/glew.h
-    $ENV{GLEWDIR}/include
-    $ENV{GLEW_HOME}/include
-    $ENV{PROGRAMFILES}/GLEW/include
-    /usr/include
-    /usr/local/include
-    /sw/include
-    /opt/local/include
-    DOC "The directory where GL/glew.h resides")
-
-find_library(GLEW_LIBRARY
-    NAMES GLEW glew glew32 glew32s
-    PATHS
-    $ENV{GLEWDIR}/lib
-    $ENV{GLEW_HOME}/lib
-    /usr/lib64
-    /usr/local/lib64
-    /sw/lib64
-    /opt/local/lib64
-    /usr/lib
-    /usr/local/lib
-    /sw/lib
-    /opt/local/lib
-    DOC "The GLEW library")
-
-if(WIN32)
-
-    find_file(GLEW_BINARY
-        NAMES glew32.dll glew32s.dll
-        PATHS
-        $ENV{GLEWDIR}/bin
-        $ENV{GLEW_HOME}/bin
-        DOC "The GLEW binary")
-
-endif()
-
-find_package_handle_standard_args(GLEW REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY)
-mark_as_advanced(GLEW_INCLUDE_DIR GLEW_LIBRARY)


🐛 Workaround for -lm static linking.

🐛 Workaround for -lm static linking.

--- cmake/FindOTF2.cmake
+++ cmake/FindOTF2.cmake
@@ -48,8 +48,9 @@
         IF(${_ARG} MATCHES "^-l")
             STRING(REGEX REPLACE "^-l" "" _ARG "${_ARG}")
             STRING(STRIP "${_ARG}" _ARG)
+            # NO_DEFAULT_PATH - We have to "filter" -lm, as g++ links it anyways. And then stuff explodes
             FIND_LIBRARY(_OTF2_LIB_FROM_ARG NAMES ${_ARG}
-                HINTS ${OTF2_LINK_DIRS}
+                HINTS ${OTF2_LINK_DIRS} NO_DEFAULT_PATH
             )
             IF(_OTF2_LIB_FROM_ARG)
                 SET(OTF2_LIBRARIES ${OTF2_LIBRARIES} ${_OTF2_LIB_FROM_ARG})


update swig download url

update swig download url

--- cmake/get-swig.cmake
+++ cmake/get-swig.cmake
@@ -16,7 +16,7 @@
         swig
         PREFIX              ${DEPENDENCY_EXTRACT_DIR}
         DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
-        URL                 http://prdownloads.sourceforge.net/swig/swigwin-${SWIG_VERSION}.zip
+        URL                 http://downloads.sourceforge.net/project/swig/swigwin/swigwin-${SWIG_VERSION}/swigwin-${SWIG_VERSION}.zip
         URL_MD5             f229724fe856aa78df6128ecfefe6e0a
         #INSTALL_DIR         ${DEPENDENCY_INSTALL_DIR}/../build-tools/swig
         CONFIGURE_COMMAND   ""


BUG: Midas server was deprecated in 2018

Use new girder interface for accessing data
files.

--- CMake/ANTSExternalData.cmake
+++ CMake/ANTSExternalData.cmake
@@ -34,8 +34,8 @@
   # Data published by Iowa Psychiatry web interface
   ## The primary home for data
   "http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)"
-  # Data published by MIDAS
-  "http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+  # Data published on Girder
+  "https://data.kitware.com:443/api/v1/file/hashsum/%(algo)/%(hash)/download"
   # Data published by developers using git-gerrit-push.
   "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"
   )


Add env var for flatc schema compiler cmake module

--- CMake/BuildFlatBuffers.cmake
+++ CMake/BuildFlatBuffers.cmake
@@ -63,6 +63,13 @@
     set(FLATC_TARGET flatc)
     set(FLATC flatc)
   endif()
+  set(FLATC_SCHEMA_ARGS --gen-mutable)
+  if(FLATBUFFERS_FLATC_SCHEMA_EXTRA_ARGS)
+    set(FLATC_SCHEMA_ARGS
+      ${FLATBUFFERS_FLATC_SCHEMA_EXTRA_ARGS}
+      ${FLATC_SCHEMA_ARGS}
+      )
+  endif()

   set(schema_glob "*.fbs")
   # Generate the include files parameters.
@@ -86,7 +93,7 @@
       set(generated_include ${generated_includes_dir}/${filename}_generated.h)
       add_custom_command(
         OUTPUT ${generated_include}
-        COMMAND ${FLATC} --gen-mutable
+        COMMAND ${FLATC} ${FLATC_SCHEMA_ARGS}
         -o ${generated_includes_dir}
         ${include_params}
         -c ${schema}


Issue thompson318#1 unset QT if not in use and remove user variable (#2)

--- CMake/mpAddGuiProjects.cmake
+++ CMake/mpAddGuiProjects.cmake
@@ -33,9 +33,6 @@
   message("Forcing BUILD_QOpenGLDemo to OFF as you want a python module.")
 endif()

-option(MYPROJECT_USE_QT "Use Qt." OFF)
-mark_as_advanced(MYPROJECT_USE_QT) # Qt gets baked into VTK, so really developers should not fiddle with this.
-
 if(BUILD_QtVTKDemo AND NOT MYPROJECT_USE_QT)
   set(MYPROJECT_USE_QT ON CACHE BOOL "Use Qt." FORCE)
   message("Forcing MYPROJECT_USE_QT to ON due to BUILD_QtVTKDemo being ON.")
@@ -66,6 +63,11 @@
   message("Forcing MYPROJECT_USE_QT to ON due to BUILD_QOpenGLDemo being ON.")
 endif()

+if(NOT BUILD_QOpenGLDemo AND NOT BUILD_QMLVTKDemo AND NOT BUILD_QtVTKDemo AND MYPROJECT_USE_QT)
+	set(MYPROJECT_USE_QT OFF CACHE BOOL "Use Qt." FORCE)
+  message("Setting MYPROJECT_USE_QT to OFF as nothing requires it")
+endif()
+
 ######################################################################
 # This is a list of all known GUI apps. Used for things like
 # creating Mac OSX bundles, and each command line app gets copied


fix bug in OMPL cmake module. closes #239.

--- doc/markdown/FindOMPL.cmake
+++ doc/markdown/FindOMPL.cmake
@@ -4,7 +4,7 @@
 # OMPL_FOUND - OMPL was found
 # OMPL_INCLUDE_DIRS - The OMPL include directory
 # OMPL_LIBRARIES - The OMPL library
-# OMPLAPP_LIBRARIES - The OMPL.app library
+# OMPLAPP_LIBRARIES - The OMPL.app libraries
 # OMPL_VERSION - The OMPL version in the form <major>.<minor>.<patchlevel>
 # OMPL_MAJOR_VERSION - Major version
 # OMPL_MINOR_VERSION - Minor version
@@ -55,17 +55,23 @@
     endif()
     set(OMPL_LIBRARIES "${OMPL_LIBRARY}" CACHE FILEPATH "Path to OMPL library")
 endif()
-# find the OMPL.app library
+# find the OMPL.app libraries
+find_library(OMPLAPPBASE_LIBRARY ompl_app_base
+    PATHS ${OMPL_LIB_PATH}
+    PATH_SUFFIXES lib build/lib)
 find_library(OMPLAPP_LIBRARY ompl_app
     PATHS ${OMPL_LIB_PATH}
     PATH_SUFFIXES lib build/lib)
-if (OMPLAPP_LIBRARY)
+if (OMPLAPPBASE_LIBRARY AND OMPLAPP_LIBRARY)
     if (OMPL_FIND_VERSION)
+        get_filename_component(libpath ${OMPLAPPBASE_LIBRARY} PATH)
+        file(GLOB OMPLAPPBASE_LIBS "${libpath}/libompl_app_base.${OMPL_FIND_VERSION}.*")
+        list(GET OMPLAPPBASE_LIBS -1 OMPLAPPBASE_LIBRARY)
         get_filename_component(libpath ${OMPLAPP_LIBRARY} PATH)
         file(GLOB OMPLAPP_LIBS "${libpath}/libompl_app.${OMPL_FIND_VERSION}.*")
         list(GET OMPLAPP_LIBS -1 OMPLAPP_LIBRARY)
     endif()
-    set(OMPLAPP_LIBRARIES "${OMPLAPP_LIBRARY}" CACHE FILEPATH "Path to OMPL.app library")
+    set(OMPLAPP_LIBRARIES "${OMPLAPPBASE_LIBRARY};${OMPLAPP_LIBRARY}" CACHE STRING "Paths to OMPL.app libraries")
 endif()

 # find include path


Update cmake-conan to version 0.17.0 [skip ci]

--- cmake/conan.cmake
+++ cmake/conan.cmake
@@ -33,7 +33,7 @@
 # but it is only necessary on the end-user side. It is not necessary to create conan
 # packages, in fact it shouldn't be use for that. Check the project documentation.

-# version: 0.16.1
+# version: 0.17.0

 include(CMakeParseArguments)

@@ -55,6 +55,8 @@
         set(${result} 15 PARENT_SCOPE)
     elseif(NOT MSVC_VERSION VERSION_LESS 1920 AND MSVC_VERSION VERSION_LESS 1930)
         set(${result} 16 PARENT_SCOPE)
+    elseif(NOT MSVC_VERSION VERSION_LESS 1930 AND MSVC_VERSION VERSION_LESS 1940)
+        set(${result} 17 PARENT_SCOPE)
     else()
         message(FATAL_ERROR "Conan: Unknown MSVC compiler version [${MSVC_VERSION}]")
     endif()
@@ -124,6 +126,10 @@

     if(ARGUMENTS_ARCH)
         set(_CONAN_SETTING_ARCH ${ARGUMENTS_ARCH})
+    endif()
+
+    if(USING_CXX)
+        set(_CONAN_SETTING_COMPILER_CPPSTD ${CMAKE_CXX_STANDARD})
     endif()

     if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU)
@@ -415,7 +421,8 @@

 function(_collect_settings result)
     set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version
-                            compiler.runtime compiler.libcxx compiler.toolset)
+                            compiler.runtime compiler.libcxx compiler.toolset
+                            compiler.cppstd)
     foreach(ARG ${ARGUMENTS_PROFILE_AUTO})
         string(TOUPPER ${ARG} _arg_name)
         string(REPLACE "." "_" _arg_name ${_arg_name})
@@ -427,10 +434,10 @@
 endfunction()

 function(conan_cmake_autodetect detected_settings)
-    _conan_detect_build_type()
+    _conan_detect_build_type(${ARGV})
     _conan_check_system_name()
     _conan_check_language()
-    _conan_detect_compiler()
+    _conan_detect_compiler(${ARGV})
     _collect_settings(collected_settings)
     set(${detected_settings} ${collected_settings} PARENT_SCOPE)
 endfunction()
@@ -807,7 +814,8 @@
     endif()

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

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


Update WSREP_PATCH_REVNO.

Update WSREP_PATCH_REVNO.

--- cmake/wsrep.cmake
+++ cmake/wsrep.cmake
@@ -23,7 +23,7 @@
 # MariaDB addition: Revision number of the last revision merged from
 # codership branch visible in @@visible_comment.
 # Branch : https://github.com/codership/mysql-wsrep/tree/5.6
-SET(WSREP_PATCH_REVNO "21a2415") # Should be updated on every merge.
+SET(WSREP_PATCH_REVNO "af7f02e") # Should be updated on every merge.

 # MariaDB: Obtain patch revision number:
 # Update WSREP_PATCH_REVNO if WSREP_REV environment variable is set.


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


- ошибка компиляции хедеров

 - ошибка компиляции хедеров

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


[FIX] Removed superfluous CONFIG option from find_package and updated install path for config.cmake

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -322,7 +322,7 @@
         find_package(ZLIB)
         find_package(BZip2)
         find_package(Boost)
-        find_package(SeqAn CONFIG REQUIRED)
+        find_package(SeqAn REQUIRED)
     endif ()

 endmacro (seqan_build_system_init)
@@ -375,7 +375,7 @@
             install(FILES "${CMAKE_BINARY_DIR}/util/pkgconfig/seqan-${SEQAN_VERSION_MAJOR}.pc" DESTINATION share/pkgconfig)
         endif (NOT CMAKE_SYSTEM_NAME MATCHES Windows)
         # Install FindSeqAn TODO(h-2) rename seqan-config.cmake to seqan-config${SEQAN_VERSION_MAJOR}.cmake after 2.x cycle
-        install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/util/cmake/seqan-config.cmake" DESTINATION share/cmake/)
+        install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/util/cmake/seqan-config.cmake" DESTINATION share/cmake/seqan/)

         # Install headers
         file (GLOB HEADERS


Improved support for XCTest Objc unit tests

--- Googlify.cmake
+++ Googlify.cmake
@@ -19,6 +19,13 @@
   include(support/iOS.cmake)
 else ()
   option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+endif ()
+
+set(OBJC_TEST_SUPPORTED TRUE)
+find_program(XCTEST xctest)
+if (NOT XCTEST)
+  set(OBJC_TEST_SUPPORTED FALSE)
+  message(WARNING "xctest not found, Objective-C unit testing will be disabled.")
 endif ()

 set(PYTHON_SUPPORTED TRUE)
@@ -293,6 +300,12 @@
 function(get_classpath_target_for_target TARGET OUT)
   set(${OUT} "${TARGET}.classpath_" PARENT_SCOPE)
 endfunction(get_classpath_target_for_target)
+
+#! @brief Returns the CMakeFiles subdirectory for the given target.
+function(get_cmake_files_subdir TARGET OUT)
+  get_full_target(${TARGET} FULL_TARGET)
+  set(${OUT} ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${FULL_TARGET}.dir PARENT_SCOPE)
+endfunction()

 function(get_directory_for_prefix PREFIX OUT)
   if ("${PREFIX}" STREQUAL "")
@@ -589,6 +602,41 @@
   link_third_party_with_full_targets("${FULL_TARGET}" ${LIB})
 endfunction(link_third_party)

+function(link_third_party_with_full_targets TARGET LIB)
+  get_target_property(IS_JAVA ${TARGET} IS_JAVA)
+  if (${IS_JAVA} STREQUAL TRUE)
+    link_third_party_with_full_targets_java(${TARGET} ${LIB})
+    return()
+  endif ()
+  get_target_property(IS_PYTHON ${TARGET} IS_PYTHON)
+  if (${IS_PYTHON} STREQUAL TRUE)
+    link_third_party_with_full_targets_python(${TARGET} ${LIB})
+    return()
+  endif ()
+  link_third_party_with_full_targets_c(${TARGET} ${LIB})
+endfunction(link_third_party_with_full_targets)
+
+function(link_third_party_with_full_targets_c TARGET LIB)
+  get_target_property(IS_OBJC ${TARGET} IS_OBJC)
+  get_target_property(IS_TEST ${TARGET} IS_TEST)
+  if (IS_OBJC AND IS_TEST AND NOT OBJC_TEST_SUPPORTED)
+    return()
+  endif ()
+  get_target(${LIB} LIB_TARGET)
+  if (NOT LIB_TARGET)
+    message(FATAL_ERROR "No such library: ${LIB}")
+  endif ()
+  add_dependencies(${TARGET} ${LIB_TARGET})
+  get_libraries(${LIB} LIBRARIES)
+  get_include_directories(${LIB} INCLUDE_DIRECTORIES)
+  if (NOT "${LIBRARIES}" STREQUAL "")
+    target_link_libraries(${TARGET} ${LIBRARIES})
+  endif ()
+  if (NOT "${INCLUDE_DIRECTORIES}" STREQUAL "")
+    target_include_directories(${TARGET} PUBLIC ${INCLUDE_DIRECTORIES})
+  endif ()
+endfunction()
+
 function(link_third_party_with_full_targets_java TARGET LIB)
   if (NOT JAVA_SUPPORTED)
     return()
@@ -608,7 +656,7 @@
         $<TARGET_PROPERTY:${TARGET},CLASSPATH_FILE> > /dev/null
     VERBATIM)
   add_dependencies(${CLASSPATH_TARGET} ${LIB_TARGET})
-endfunction(link_third_party_with_full_targets_java)
+endfunction()

 function(link_third_party_with_full_targets_python TARGET LIB)
   if (NOT PYTHON_SUPPORTED)
@@ -619,76 +667,59 @@
     message(FATAL_ERROR "No such library: ${LIB}")
   endif ()
   add_dependencies(${TARGET} ${LIB_TARGET})
-endfunction(link_third_party_with_full_targets_python)
-
-function(link_third_party_with_full_targets TARGET LIB)
-  get_target_property(IS_JAVA "${TARGET}" IS_JAVA)
-  if (${IS_JAVA} STREQUAL TRUE)
-    link_third_party_with_full_targets_java(${TARGET} ${LIB})
-    return()
-  endif ()
-  get_target_property(IS_PYTHON "${TARGET}" IS_PYTHON)
-  if (${IS_PYTHON} STREQUAL TRUE)
-    link_third_party_with_full_targets_python(${TARGET} ${LIB})
-    return()
-  endif ()
-  get_target(${LIB} LIB_TARGET)
-  if (NOT LIB_TARGET)
-    message(FATAL_ERROR "No such library: ${LIB}")
-  endif ()
-  add_dependencies(${TARGET} ${LIB_TARGET})
-  get_libraries(${LIB} LIBRARIES)
-  get_include_directories(${LIB} INCLUDE_DIRECTORIES)
-  if (NOT "${LIBRARIES}" STREQUAL "")
-    target_link_libraries(${TARGET} ${LIBRARIES})
-  endif ()
-  if (NOT "${INCLUDE_DIRECTORIES}" STREQUAL "")
-    target_include_directories(${TARGET} PUBLIC ${INCLUDE_DIRECTORIES})
-  endif ()
-endfunction(link_third_party_with_full_targets)
+endfunction()

 function(link_with_cmake_target TARGET LIB)
   get_full_target(${TARGET} FULL_TARGET)
   get_target_property(IS_JAVA ${FULL_TARGET} IS_JAVA)
   if (${IS_JAVA} STREQUAL TRUE)
-    link_with_cmake_target_java(${FULL_TARGET} ${LIB})
+    link_with_full_cmake_target_java(${FULL_TARGET} ${LIB})
     return()
   endif ()
   get_target_property(IS_PYTHON ${FULL_TARGET} IS_PYTHON)
   if (${IS_PYTHON} STREQUAL TRUE)
-    link_with_cmake_target_python(${FULL_TARGET} ${LIB})
-    return()
-  endif ()
+    link_with_full_cmake_target_python(${FULL_TARGET} ${LIB})
+    return()
+  endif ()
+  link_with_full_cmake_target_c(${FULL_TARGET} ${LIB})
+endfunction()
+
+function(link_with_full_cmake_target_c FULL_TARGET LIB)
+  get_target_property(IS_OBJC ${FULL_TARGET} IS_OBJC)
+  get_target_property(IS_TEST ${FULL_TARGET} IS_TEST)
+  if (IS_OBJC AND IS_TEST AND NOT OBJC_TEST_SUPPORTED)
+    return()
+  endif()
   target_link_libraries(${FULL_TARGET} ${LIB})
 endfunction()

-function(link_with_cmake_target_java TARGET LIB)
+function(link_with_full_cmake_target_java FULL_TARGET LIB)
   if (NOT JAVA_SUPPORTED)
     return()
   endif ()
-  get_classpath_target_for_target(${TARGET} CLASSPATH_TARGET)
+  get_classpath_target_for_target(${FULL_TARGET} CLASSPATH_TARGET)
   get_classpath_target_for_target(${LIB} LIB_CLASSPATH_TARGET)
   get_output_file(${LIB} LIB_OUTPUT_FILE)
   add_custom_command(
     TARGET "${CLASSPATH_TARGET}" POST_BUILD
     COMMAND cat "$<TARGET_PROPERTY:${LIB},CLASSPATH_FILE>" >>
-        "$<TARGET_PROPERTY:${TARGET},CLASSPATH_FILE>"
+        "$<TARGET_PROPERTY:${FULL_TARGET},CLASSPATH_FILE>"
     COMMAND echo "${LIB_OUTPUT_FILE}" >>
-        "$<TARGET_PROPERTY:${TARGET},CLASSPATH_FILE>"
+        "$<TARGET_PROPERTY:${FULL_TARGET},CLASSPATH_FILE>"
     # Remove duplicate lines.
-    COMMAND cat "$<TARGET_PROPERTY:${TARGET},CLASSPATH_FILE>" | sort | uniq |
-        tee "$<TARGET_PROPERTY:${TARGET},CLASSPATH_FILE>" > /dev/null
-    VERBATIM)
-  add_dependencies(${TARGET} ${LIB})
+    COMMAND cat "$<TARGET_PROPERTY:${FULL_TARGET},CLASSPATH_FILE>" | sort | uniq |
+        tee "$<TARGET_PROPERTY:${FULL_TARGET},CLASSPATH_FILE>" > /dev/null
+    VERBATIM)
+  add_dependencies(${FULL_TARGET} ${LIB})
   add_dependencies(${CLASSPATH_TARGET} ${LIB_CLASSPATH_TARGET})
-endfunction(link_with_cmake_target_java)
-
-function(link_with_cmake_target_python TARGET LIB)
+endfunction()
+
+function(link_with_full_cmake_target_python FULL_TARGET LIB)
   if (NOT PYTHON_SUPPORTED)
     return()
   endif ()
-  add_dependencies(${TARGET} ${LIB})
-endfunction(link_with_cmake_target_python)
+  add_dependencies(${FULL_TARGET} ${LIB})
+endfunction()

 function(objc_binary TARGET)
   prepare_sources_for_objc(${ARGN})
@@ -701,19 +732,46 @@
 endfunction()

 function(objc_test TARGET)
+  get_full_target(${TARGET} FULL_TARGET)
+  if (NOT OBJC_TEST_SUPPORTED)
+    add_custom_target(${FULL_TARGET})
+    set_target_properties(${FULL_TARGET} PROPERTIES IS_OBJC TRUE IS_TEST TRUE)
+    return()
+  endif ()
+
+  get_cmake_files_subdir(${TARGET} CMAKE_FILES_SUBDIR)
+  set(BUNDLE ${CMAKE_FILES_SUBDIR}/${TARGET}.xctest)
+  set(BUNDLE_MACOS_DIR ${BUNDLE}/Contents/MacOS)
+  set(TEST_EXE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET})
+
+  add_custom_command(
+      OUTPUT ${TEST_EXE}
+      COMMAND echo "#!/usr/bin/env bash" > ${TEST_EXE}
+      COMMAND echo "\
+        if [ $# -eq 0 ]$<SEMICOLON> then\
+          ${XCTEST} -XCTest All ${BUNDLE}$<SEMICOLON>\
+        else\
+          ${XCTEST} -XCTest $@ ${BUNDLE}$<SEMICOLON>\
+        fi" >> ${TEST_EXE}
+      COMMAND chmod +x ${TEST_EXE}
+      VERBATIM)
+  set(TEST_EXE_TARGET ${FULL_TARGET}_)
+  add_custom_target(${TEST_EXE_TARGET} SOURCES ${TEST_EXE})
+
   prepare_sources_for_objc(${ARGN})
   cc_test(${TARGET} ${ARGN})
   add_linkflags(${TARGET} "-bundle")
-  get_full_target(${TARGET} FULL_TARGET)
-  set_target_properties(${FULL_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
-                        ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
-  set(BUNDLE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}.xctest)
-  set(EXE_LOCATION ${BUNDLE}/Contents/MacOS)
+  set_target_properties(
+      ${FULL_TARGET} PROPERTIES
+      RUNTIME_OUTPUT_DIRECTORY ${CMAKE_FILES_SUBDIR}
+      IS_OBJC TRUE
+      IS_TEST TRUE)
   add_custom_command(
       TARGET ${FULL_TARGET} POST_BUILD
-      COMMAND ${CMAKE_COMMAND} -E make_directory ${EXE_LOCATION} &&
-              mv $<TARGET_FILE:${FULL_TARGET}> ${EXE_LOCATION}
+      COMMAND ${CMAKE_COMMAND} -E make_directory ${BUNDLE_MACOS_DIR}
+      COMMAND mv $<TARGET_FILE:${FULL_TARGET}> ${BUNDLE_MACOS_DIR}
       VERBATIM)
+  add_dependencies(${FULL_TARGET} ${TEST_EXE_TARGET})
 endfunction()

 function(prepare_python_package PREFIX OUT)


PKG: skip  .py from install_rule

PKG: skip  .py from install_rule

--- Packaging/install_rule.cmake
+++ Packaging/install_rule.cmake
@@ -30,13 +30,16 @@
     elseif("${sfile_ABS_LOWER}" MATCHES "(\\.lib)$")
       set(install_type FILES)
       set(install_dir lib)
-    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.a)$")
-      set(install_type FILES)
-      set(install_dir lib)
+    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.pyd)$")
+      #python bindings are installed in install_python_bindings
+      continue()
     elseif("${sfile_ABS_LOWER}" MATCHES "\\.lnk$")
       #we don't install symlink on windows. issue a warning
       message(WARNING "${sfile_ABS} is a symbolic link and this will be excluded from package")
       continue()
+    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.a)$")
+      set(install_type FILES)
+      set(install_dir lib)
     elseif("${sfile_ABS_LOWER}" MATCHES "\\.prl$")
       continue()
     elseif("${sfile_ABS_LOWER}" MATCHES "\\.la$")


This fixes the build system for vtkPCLFiltersPython, which was not being build to drc/software/build/lib/python2.7/site-packages and therefore not found by the director - fixed by Pat


better lapack detection

better lapack detection

--- lib/TH/cmake/FindLAPACK.cmake
+++ lib/TH/cmake/FindLAPACK.cmake
@@ -82,7 +82,7 @@
 if(BLAS_FOUND)

   # Intel MKL
-  IF((NOT LAPACK_LIBRARIES) AND (BLAS_INFO STREQUAL "mkl"))
+  IF((NOT LAPACK_INFO) AND (BLAS_INFO STREQUAL "mkl"))
     IF(MKL_LAPACK_LIBRARIES)
       SET(LAPACK_LIBRARIES ${MKL_LAPACK_LIBRARIES} ${MKL_LIBRARIES})
     ELSE(MKL_LAPACK_LIBRARIES)
@@ -93,91 +93,62 @@
   ENDIF()

   # OpenBlas
-  IF((NOT LAPACK_LIBRARIES) AND (BLAS_INFO STREQUAL "open"))
-    check_lapack_libraries(
-      LAPACK_LIBRARIES
-      LAPACK
-      cheev
-      ""
-      ""
-      "${BLAS_LIBRARIES}"
-      )
-    if(LAPACK_LIBRARIES)
-      SET(LAPACK_INFO "openblas")
-    else(LAPACK_LIBRARIES)
+  IF((NOT LAPACK_INFO) AND (BLAS_INFO STREQUAL "open"))
+    SET(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
+    check_function_exists("cheev_" OPEN_LAPACK_WORKS)
+    if(OPEN_LAPACK_WORKS)
+      SET(LAPACK_INFO "open")
+    else()
       message(STATUS "It seems OpenBlas has not been compiled with Lapack support")
-    endif(LAPACK_LIBRARIES)
+    endif()
   endif()

-  # Goto2
-  IF((NOT LAPACK_LIBRARIES) AND (BLAS_INFO STREQUAL "goto"))
-    check_lapack_libraries(
-      LAPACK_LIBRARIES
-      LAPACK
-      cheev
-      ""
-      ""
-      "${BLAS_LIBRARIES}"
-      )
-    if(LAPACK_LIBRARIES)
+  # GotoBlas
+  IF((NOT LAPACK_INFO) AND (BLAS_INFO STREQUAL "goto"))
+    SET(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
+    check_function_exists("cheev_" GOTO_LAPACK_WORKS)
+    if(GOTO_LAPACK_WORKS)
       SET(LAPACK_INFO "goto")
-    else(LAPACK_LIBRARIES)
+    else()
       message(STATUS "It seems GotoBlas has not been compiled with Lapack support")
-    endif(LAPACK_LIBRARIES)
+    endif()
   endif()

-  #acml lapack
-  IF((NOT LAPACK_LIBRARIES) AND (BLAS_INFO STREQUAL "acml"))
-    check_lapack_libraries(
-      LAPACK_LIBRARIES
-      LAPACK
-      cheev
-      ""
-      ""
-      "${BLAS_LIBRARIES}"
-      )
-    if(LAPACK_LIBRARIES)
+  # ACML
+  IF((NOT LAPACK_INFO) AND (BLAS_INFO STREQUAL "acml"))
+    SET(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
+    check_function_exists("cheev_" ACML_LAPACK_WORKS)
+    if(ACML_LAPACK_WORKS)
       SET(LAPACK_INFO "acml")
-    else(LAPACK_LIBRARIES)
-      message(STATUS "Strangely, your ACML library does not support Lapack?!")
-    endif(LAPACK_LIBRARIES)
+    else()
+      message(STATUS "Strangely, this ACML library does not support Lapack?!")
+    endif()
   endif()

-  # Apple LAPACK library?
-  IF((NOT LAPACK_LIBRARIES) AND (BLAS_INFO STREQUAL "accelerate"))
-    check_lapack_libraries(
-      LAPACK_LIBRARIES
-      LAPACK
-      cheev
-      ""
-      ""
-      "${BLAS_LIBRARIES}"
-      )
-    if(LAPACK_LIBRARIES)
+  # Accelerate
+  IF((NOT LAPACK_INFO) AND (BLAS_INFO STREQUAL "accelerate"))
+    SET(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
+    check_function_exists("cheev_" ACCELERATE_LAPACK_WORKS)
+    if(ACCELERATE_LAPACK_WORKS)
       SET(LAPACK_INFO "accelerate")
-    else(LAPACK_LIBRARIES)
-      message(STATUS "Strangely, your Accelerate library does not support Lapack?!")
-    endif(LAPACK_LIBRARIES)
+    else()
+      message(STATUS "Strangely, this Accelerate library does not support Lapack?!")
+    endif()
   endif()

-  IF((NOT LAPACK_LIBRARIES) AND (BLAS_INFO STREQUAL "veclib"))
-    check_lapack_libraries(
-      LAPACK_LIBRARIES
-      LAPACK
-      cheev
-      ""
-      ""
-      "${BLAS_LIBRARIES}"
-      )
-    if(LAPACK_LIBRARIES)
+  # vecLib
+  IF((NOT LAPACK_INFO) AND (BLAS_INFO STREQUAL "veclib"))
+    SET(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES})
+    check_function_exists("cheev_" VECLIB_LAPACK_WORKS)
+    if(VECLIB_LAPACK_WORKS)
       SET(LAPACK_INFO "veclib")
-    else(LAPACK_LIBRARIES)
-      message(STATUS "Strangely, your vecLib library does not support Lapack?!")
-    endif(LAPACK_LIBRARIES)
+    else()
+      message(STATUS "Strangely, this vecLib library does not support Lapack?!")
+    endif()
   endif()

   # Generic LAPACK library?
-  IF((NOT LAPACK_LIBRARIES) AND (BLAS_INFO STREQUAL "generic"))
+  IF((NOT LAPACK_INFO) AND (BLAS_INFO STREQUAL "generic"))
     check_lapack_libraries(
       LAPACK_LIBRARIES
       LAPACK
@@ -195,11 +166,11 @@
   message(STATUS "LAPACK requires BLAS")
 endif(BLAS_FOUND)

-if(LAPACK_LIBRARIES)
+if(LAPACK_INFO)
   set(LAPACK_FOUND TRUE)
-else(LAPACK_LIBRARIES)
+else(LAPACK_INFO)
   set(LAPACK_FOUND FALSE)
-endif(LAPACK_LIBRARIES)
+endif(LAPACK_INFO)

 IF (NOT LAPACK_FOUND AND LAPACK_FIND_REQUIRED)
   message(FATAL_ERROR "Cannot find a library with LAPACK API. Please specify library location.")


Revert "[cmake] openblas also installs a cmake file"

This commit should have never been pushed
This is needed on my machine, but has not been well tested ...
This reverts commit a5393156577347a99e12d38b424a283a098becfe.

--- cmake/FindBLAS.cmake
+++ cmake/FindBLAS.cmake
@@ -232,28 +232,13 @@
       set(OPENBLAS_LIB_NAME "openblas")
     endif()
     message(STATUS "Try to find blas in openblas ...")
-
-    # OpenBLAS has a CMake module now .. yeah --xhub
-    if (OPENBLAS_LIB_NAME STREQUAL "openblas")
-      find_package(OpenBLAS)
-      if (OpenBLAS_FOUND)
-        set(BLAS_LIBRARIES ${OpenBLAS_LIBRARIES})
-        set(INCLUDE_DIR_HINTS ${OpenBLAS_INCLUDE_DIR})
-        set(BLAS_VERSION ${OpenBLAS_VERSION})
-      endif()
-    endif()
-
-    # Fall back to classical method
-    if (NOT BLAS_LIBRARIES)
-      check_blas_libraries(
-        BLAS_LIBRARIES
-        BLAS
-        sgemm
-        ""
-        "${OPENBLAS_LIB_NAME}"
-        "")
-    endif()
-
+    check_blas_libraries(
+      BLAS_LIBRARIES
+      BLAS
+      sgemm
+      ""
+      "${OPENBLAS_LIB_NAME}"
+      "")
     if(BLAS_LIBRARIES)
       set(WITH_BLAS "openblas" CACHE STRING "Blas implementation type [mkl/openblas/atlas/accelerate/generic]" FORCE)
       set(BLAS_HEADER cblas.h CACHE STRING "Blas header name")
@@ -266,11 +251,8 @@
       #set(BLAS_INCLUDE_SUFFIXES cblas_header)
       #set(INCLUDE_DIR_HINTS ${CMAKE_SOURCE_DIR}/externals/blas_lapack)

-      if (NOT INCLUDE_DIR_HINTS)
-        get_filename_component(_bdir ${BLAS_LIBRARIES} DIRECTORY)
-        set(INCLUDE_DIR_HINTS "${_bdir}/../include/openblas/")
-      endif()
-
+      get_filename_component(_bdir ${BLAS_LIBRARIES} DIRECTORY)
+      set(INCLUDE_DIR_HINTS "${_bdir}/../include/openblas/")
       set(OPENBLAS_FOUND 1)

     endif(BLAS_LIBRARIES)


FindOgre.cmake: take into consideration that VC9 has $(ConfigurationName) VS env var, but VC10 and onwards has $(Configuration) VS env var instead.

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -104,8 +104,10 @@
         link_directories(${OGRE_DIR}/lib)
         if (WIN32)
             include_directories(${OGRE_DIR}/include/OGRE/RenderSystems/Direct3D9)
-            link_directories(${OGRE_DIR}/lib/$(Configuration))
-            link_directories(${OGRE_DIR}/lib/$(Configuration)/opt)
+            # Note: VC9 uses $(ConfigurationName), but #VC10 and onwards uses $(Configuration).
+            # However VC10 seems to able to $(ConfigurationName) also, so use that.
+            link_directories(${OGRE_DIR}/lib/$(ConfigurationName))
+            link_directories(${OGRE_DIR}/lib/$(ConfigurationName)/opt)
         endif()
         message(STATUS "Using Ogre from SDK directory " ${OGRE_DIR})
     else()


MOD: Fixed a bug that made OgreRenderer link to the Ogre release lib always

--HG--
branch : v0-8

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -75,13 +75,13 @@

 # Find the release and debug libraries.
 find_library(OGRE_LIB NAMES OgreMain
-    PATHS ${OGRE_PREFIX_PATH}
-    PATH_SUFFIXES Release lib/Release
-)
+             PATHS ${OGRE_PREFIX_PATH}
+             PATH_SUFFIXES Release lib/Release)
+
 find_library(OGRE_LIB_DBG NAMES OgreMain_d
-    PATHS ${OGRE_PREFIX_PATH}
-    PATH_SUFFIXES Debug lib/Debug
-)
+             PATHS ${OGRE_PREFIX_PATH}
+             PATH_SUFFIXES Debug lib/Debug)
+
 mark_as_advanced(OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH OGRE_LIB OGRE_LIB_DBG)

 # If the Ogre build settings file was found, parse it to identify the Ogre Thread provider.
@@ -100,7 +100,7 @@
     # Set-up the list of directories for the OGRE libraries to link against in the Ogre related components.
     set (OGRE_LIBRARIES ${OGRE_LIB})
     if (OGRE_LIB_DBG)
-        set (OGRE_LIBRARIES_DBG ${OGRE_LIB_DBG};${Boost_THREAD_LIBRARY_DEBUG};${Boost_SYSTEM_LIBRARY_DEBUG};${Boost_DATE_TIME_LIBRARY_DEBUG};${Boost_CHRONO_LIBRARY_DEBUG})
+        set (OGRE_LIBRARIES_DBG ${OGRE_LIB_DBG})
     endif()

     # Ogre was found. If the thread provider is boost, also search for the boost libs.


FindQore.cmake unified accross modules

FindQore.cmake unified accross modules

git-svn-id: 4cfee5cd3619bc8cc86be56f2a5e59021084636e@6200 1b0b35fe-f740-4c1b-b404-a338b32e513b

--- cmake/FindQore.cmake
+++ cmake/FindQore.cmake
@@ -17,8 +17,10 @@

 MACRO (QORE_WRAP_QPP _cpp_files _inputs )
   message(STATUS "QPP: ${QORE_QPP_EXECUTABLE}")
+  message(STATUS "QPP2: ${_inputs}")

   FOREACH (it ${_inputs})
+    message(STATUS "QPP1: ${it}")
     GET_FILENAME_COMPONENT(_outfile ${it} NAME_WE)
     GET_FILENAME_COMPONENT(_infile ${it} ABSOLUTE)
     SET(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/${_outfile}.cpp)


disable -Wparenthesis for GCC 4.4.x - gives too many false positives

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -228,7 +228,12 @@
          endif()
       endif()

-      if(Vc_GCC_VERSION STREQUAL "4.7.0")
+      if(Vc_GCC_VERSION VERSION_LESS 4.5.0)
+         message(WARNING "GCC 4.4.x shows false positives for -Wparentheses, thus we rather disable the warning.")
+         string(REPLACE " -Wparentheses " " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+         string(REPLACE " -Wparentheses " " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+         set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -Wno-parenthesis")
+      elseif(Vc_GCC_VERSION VERSION_EQUAL 4.7.0)
          message(WARNING "GCC 4.7.0 miscompiles at -O3, adding -fno-predictive-commoning to the compiler flags as workaround")
          set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -fno-predictive-commoning")
       endif()


Revert "Compile own version of sdl2 to try fix dep problems on windows."

This reverts commit beec94d2984a190c7281af155ee85e686ead7e4b.

--- cmake/get-sdl2.cmake
+++ cmake/get-sdl2.cmake
@@ -7,12 +7,51 @@

 set(SDL2_VERSION "2.0.5")

-set(SDL2_CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-    -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-    -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-    -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
+# For Windows it's faster to download the pre-compiled development binaries.
+if (WIN32)
+
+  if(MINGW) # download pre-compiled SDL2 dev package for MinGW 32/64-bit
+
+    ExternalProject_Add(
+      sdl2
+      PREFIX ${DEPENDENCY_EXTRACT_DIR}
+      DOWNLOAD_DIR ${DEPENDENCY_DOWNLOAD_DIR}
+      URL http://libsdl.org/release/SDL2-devel-${SDL2_VERSION}-mingw.tar.gz
+      URL_MD5 ecf8fb614d57e7d284086a36dae6878f
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/sdl2/lib     ${DEPENDENCY_INSTALL_DIR}/lib
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/sdl2/include ${DEPENDENCY_INSTALL_DIR}/include/SDL2
+    )
+
+  endif(MINGW)
+
+  if(MSVC) # download pre-compiled SDL2 dev package for Visual C++ 32/64-bit
+
+    ExternalProject_Add(
+      sdl2
+      PREFIX ${DEPENDENCY_EXTRACT_DIR}
+      DOWNLOAD_DIR ${DEPENDENCY_DOWNLOAD_DIR}
+      URL http://libsdl.org/release/SDL2-devel-${SDL2_VERSION}-VC.zip
+      URL_MD5 b771f36bb640c173e53fa8259cdd3835
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/sdl2/lib     ${DEPENDENCY_INSTALL_DIR}/lib
+        COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPENDENCY_EXTRACT_DIR}/src/sdl2/include ${DEPENDENCY_INSTALL_DIR}/include/SDL2
+    )
+
+  endif(MSVC)
+
+else() # build from source
+
+  set(SDL2_CMAKE_ARGS
+      -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+      -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+      -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
+      -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
   )

   ExternalProject_Add(


COMP: AppFusion requires AppProjection at runtime because of BundleToPerfectSensor composite app. We should not allow building one without the other.

--- Modules/Applications/AppFusion/otb-module.cmake
+++ Modules/Applications/AppFusion/otb-module.cmake
@@ -28,9 +28,8 @@
     OTBApplicationEngine
     OTBProjection
     OTBInterpolation
-
+    OTBAppProjection
   TEST_DEPENDS
-    OTBAppProjection
     OTBTestKernel
     OTBCommandLine


[cmake] removes duplicated macro default fix

--- config.h.cmake
+++ config.h.cmake
@@ -118,10 +118,6 @@
 # define HAVE_UG 0
 #endif

-#ifndef HAVE_ALBERTA
-# define HAVE_ALBERTA 0
-#endif
-
 #ifndef HAVE_GRAPE
 # define HAVE_GRAPE 0
 #endif


Update defaults.cmake.

Update defaults.cmake.

--- defaults.cmake
+++ defaults.cmake
@@ -608,7 +608,9 @@
   check_cxx_flag("-Werror=unknown-warning-option" HAS_CXX_FLAG_WERROR_UNKNOWN_WARNING_OPTION)

   check_c_flag("-std=c99" HAS_C_FLAG_STD_C99)
-  check_cxx_flag("-std=c++11" HAS_CXX_FLAG_STD_CXX11)
+  if(NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") # Boost fails with g++/c++11
+    check_cxx_flag("-std=c++11" HAS_CXX_FLAG_STD_CXX11)
+  endif()

   check_c_flag("-Werror=return-type" HAS_C_FLAG_WERROR_RETURN_TYPE)
   check_cxx_flag("-Werror=return-type" HAS_CXX_FLAG_WERROR_RETURN_TYPE)


ENH: Add a proper link to bugtracking and doxygen

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -22,9 +22,9 @@
 SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/xdmf-rollup-dashboard.sh")
 SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/cvsweb.cgi/Xdmf/")
 SET (CVS_WEB_CVSROOT "Xdmf")
-#SET (DOXYGEN_URL "http://${DROP_SITE}/" )
-#SET (GNATS_WEB_URL "http://${DROP_SITE}/")
-SET (GNATS_WEB_URL "http://public.kitware.com/Bug/bug.php")
+SET (USE_DOXYGEN "On")
+SET (DOXYGEN_URL "http://www.arl.hpc.mil/ice/Manuals/Xdmf/index.html" )
+SET (GNATS_WEB_URL "http://public.kitware.com/Bug/index.php")
 SET (USE_GNATS "On")

 # copy over the testing logo


ENH: midas_add_test function needs to support the add_test(NAME signature.

SVN-Revision: 3265

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -46,7 +46,15 @@
 # See the License for more information.
 #=============================================================================

-function(midas_add_test testName)
+function(midas_add_test)
+  # Determine the test name.
+  list(GET ARGN 0 firstArg)
+  if(firstArg EQUAL "NAME")
+    list(GET ARGN 1 testName)
+  else(firstArg EQUAL "NAME")
+    list(GET ARGN 0 testName)
+  endif(firstArg EQUAL "NAME")
+
   if(NOT DEFINED MIDAS_REST_URL)
     message(FATAL_ERROR "You must set MIDAS_REST_URL to the URL of the MIDAS REST API.")
   endif(NOT DEFINED MIDAS_REST_URL)


BUG: Enable and enter path to Slicer for Abydos

--- Abydos_Kitware_TubeTK_Slicer.cmake
+++ Abydos_Kitware_TubeTK_Slicer.cmake
@@ -66,9 +66,9 @@
 # The following libraries are not handled by Superbuild.
 #   If you wan tto use them, they must already be installed on your system.
 #
-set( TubeTK_BUILD_USING_SLICER OFF )
+set( TubeTK_BUILD_USING_SLICER ON )
 #if TubeTK_BUILD_USING_SLICER is ON, you need to fix the following line
-#set( Slicer_DIR "/Users/aylward/src/Slicer-Release/Slicer-build" )
+set( Slicer_DIR "C:/dashboard/src/Slicer-${SITE_BUILD_TYPE}" )

 set( TubeTK_USE_BOOST OFF )
 #if TubeTK_USE_BOOST is ON, you need to fix the following line


flags/disable_warnings: update CMAKE_C_FLAGS too

--- flags/disable_warnings.cmake
+++ flags/disable_warnings.cmake
@@ -10,3 +10,4 @@
 include(polly_add_cache_flag)

 polly_add_cache_flag(CMAKE_CXX_FLAGS "-w")
+polly_add_cache_flag(CMAKE_C_FLAGS "-w")


Update CMake/RealmCore.cmake to fix linker problems downstream

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -200,7 +200,7 @@
     set_property(TARGET realm PROPERTY IMPORTED_LOCATION_RELEASE ${core_library_release})
     set_property(TARGET realm PROPERTY IMPORTED_LOCATION ${core_library_release})

-    set_property(TARGET realm PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads ${CRYPTO_LIBRARIES})
+    set_property(TARGET realm PROPERTY INTERFACE_LINK_LIBRARIES ${CRYPTO_LIBRARIES} Threads::Threads)

     # Create directories that are included in INTERFACE_INCLUDE_DIRECTORIES, as CMake requires they exist at
     # configure time, when they'd otherwise not be created until we download and extract core.


cmake: Fix libvlc linking with module.

cmake: Fix libvlc linking with module.

--- extras/buildsystem/cmake/include/vlc_module_funcs.cmake
+++ extras/buildsystem/cmake/include/vlc_module_funcs.cmake
@@ -3,7 +3,7 @@
 MACRO(vlc_add_module module_name)
     if(ENABLE_VLC_MODULE_${module_name})
         add_library( ${module_name}_plugin MODULE ${ARGN} )
-        set(VLC_${module_name}_LINK_LIBRARIES "VLC_${module_name}_LINK_LIBRARIES libvlc")
+        set(VLC_${module_name}_LINK_LIBRARIES "${VLC_${module_name}_LINK_LIBRARIES};libvlc")
         set_target_properties( ${module_name}_plugin PROPERTIES COMPILE_FLAGS
                 "-D__PLUGIN__ -DMODULE_NAME=${module_name} -DMODULE_NAME_IS_${module_name} -I${CMAKE_CURRENT_SOURCE_DIR} ${VLC_${module_name}_COMPILE_FLAG}" )
         if (VLC_${module_name}_LINK_LIBRARIES)


Added headers to files.cmake.

Added headers to files.cmake.

--- Core/Code/files.cmake
+++ Core/Code/files.cmake
@@ -1,10 +1,27 @@
 SET(H_FILES
+  Algorithms/itkImportMitkImageContainer.h
+  Algorithms/itkImportMitkImageContainer.txx
   Algorithms/itkLocalVariationImageFilter.h
+  Algorithms/itkLocalVariationImageFilter.txx
+  Algorithms/itkMITKScalarImageToHistogramGenerator.h
+  Algorithms/itkMITKScalarImageToHistogramGenerator.txx
   Algorithms/itkTotalVariationDenoisingImageFilter.h
+  Algorithms/itkTotalVariationDenoisingImageFilter.txx
   Algorithms/itkTotalVariationSingleIterationImageFilter.h
+  Algorithms/itkTotalVariationSingleIterationImageFilter.txx
+
+  Algorithms/mitkImageAccessByItk.h
+  Algorithms/mitkImageCast.h
+  Algorithms/mitkImageToItk.h
+  Algorithms/mitkImageToItk.txx
+  Algorithms/mitkInstantiateAccessFunctions.h
+  Algorithms/mitkITKImageImport.h
+  Algorithms/mitkITKImageImport.txx
+  Algorithms/mitkPixelTypeList.h

   # Preprocessor macros taken from Boost
   Algorithms/mitkPPArithmeticDec.h
+  Algorithms/mitkPPArgCount.h
   Algorithms/mitkPPCat.h
   Algorithms/mitkPPConfig.h
   Algorithms/mitkPPControlExprIIf.h


SWD-35 some cleanups

SWD-35 some cleanups

git-svn-id: 9eeea04daec118c8b99ac1589bcc03db7f3e68a4@67 3149698f-976c-419d-aa71-eec1decff2c2

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -268,7 +268,7 @@
 # returns the extension of the mex (the suffixes)
 macro(get_matlab_suffix matlab_root mex_suffix)

-  # todo setup the extension properly
+  # todo setup the extension properly. Currently I do not know if this is sufficient for all win32 distributions
   set(mexext_suffix "")
   if(WIN32)
     list(APPEND mexext_suffix ".bat")


messages

messages

git-svn-id: 609522d7d408cfa97e9ff3bac4923f7fa96011fc@130 3149698f-976c-419d-aa71-eec1decff2c2

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -493,7 +493,10 @@
     endif()

     if(MATLAB_PROGRAM)
-      message(STATUS "[MATLAB] found from the command line at ${MATLAB_PROGRAM}")
+      if(MATLAB_FIND_DEBUG)
+        message(STATUS "[MATLAB] found from the command line at ${MATLAB_PROGRAM}")
+      endif()
+
       if(IS_SYMLINK  ${MATLAB_PROGRAM})
         message("is symlink")
       endif()
@@ -516,9 +519,10 @@
     if((NOT _matlab_possible_roots) OR APPLE)

       matlab_get_supported_releases(matlab_releases)
-      message(STATUS "[MATLAB] Matlab supported versions ${matlab_releases}. If more version should be supported "
-                     "the variable MATLAB_ADDITIONAL_VERSIONS can be set according to the documentation")
-
+      if(MATLAB_FIND_DEBUG)
+        message(STATUS "[MATLAB] Matlab supported versions ${matlab_releases}. If more version should be supported "
+                       "the variable MATLAB_ADDITIONAL_VERSIONS can be set according to the documentation")
+      endif()

       foreach(current_matlab_release IN LISTS matlab_releases)
         set(_matlab_full_string "/Applications/MATLAB_${current_matlab_release}.app")


Fixed a stupid install bug on Linux introduced in my latest CMake changes

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -26,29 +26,29 @@
 endfunction(ogre_create_vcproj_userfile)

 # install targets according to current build type
-function(ogre_install_target TARGETNAME)
+function(ogre_install_target TARGETNAME SUFFIX)
   install(TARGETS ${TARGETNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
-    LIBRARY DESTINATION "lib" CONFIGURATIONS Release None ""
-    ARCHIVE DESTINATION "lib" CONFIGURATIONS Release None ""
+    LIBRARY DESTINATION "lib${SUFFIX}" CONFIGURATIONS Release None ""
+    ARCHIVE DESTINATION "lib${SUFFIX}" CONFIGURATIONS Release None ""
     FRAMEWORK DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
   )
   install(TARGETS ${TARGETNAME}
     RUNTIME DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
-    LIBRARY DESTINATION "lib" CONFIGURATIONS RelWithDebInfo
-    ARCHIVE DESTINATION "lib" CONFIGURATIONS RelWithDebInfo
+    LIBRARY DESTINATION "lib${SUFFIX}" CONFIGURATIONS RelWithDebInfo
+    ARCHIVE DESTINATION "lib${SUFFIX}" CONFIGURATIONS RelWithDebInfo
     FRAMEWORK DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
   )
   install(TARGETS ${TARGETNAME}
     RUNTIME DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
-    LIBRARY DESTINATION "lib" CONFIGURATIONS MinSizeRel
-    ARCHIVE DESTINATION "lib" CONFIGURATIONS MinSizeRel
+    LIBRARY DESTINATION "lib${SUFFIX}" CONFIGURATIONS MinSizeRel
+    ARCHIVE DESTINATION "lib${SUFFIX}" CONFIGURATIONS MinSizeRel
     FRAMEWORK DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
   )
   install(TARGETS ${TARGETNAME}
     RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
-    LIBRARY DESTINATION "lib" CONFIGURATIONS Debug
-    ARCHIVE DESTINATION "lib" CONFIGURATIONS Debug
+    LIBRARY DESTINATION "lib${SUFFIX}" CONFIGURATIONS Debug
+    ARCHIVE DESTINATION "lib${SUFFIX}" CONFIGURATIONS Debug
     FRAMEWORK DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
   )
 endfunction(ogre_install_target)
@@ -75,7 +75,7 @@
       set_target_properties(${LIBNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
 	endif (CMAKE_COMPILER_IS_GNUCXX)
   endif (OGRE_STATIC)
-  ogre_install_target(${LIBNAME})
+  ogre_install_target(${LIBNAME} "")

   if (OGRE_INSTALL_PDB)
     # install debug pdb files
@@ -115,7 +115,7 @@
       set_target_properties(${PLUGINNAME} PROPERTIES PREFIX "")
 	endif (CMAKE_COMPILER_IS_GNUCXX)
   endif (OGRE_STATIC)
-  ogre_install_target(${PLUGINNAME})
+  ogre_install_target(${PLUGINNAME} ${OGRE_PLUGIN_PATH})

   if (OGRE_INSTALL_PDB)
     # install debug pdb files
@@ -227,18 +227,18 @@
   endif (APPLE)

   if (OGRE_INSTALL_SAMPLES)
-    ogre_install_target(${SAMPLENAME})
+    ogre_install_target(${SAMPLENAME} "")
+    if (OGRE_INSTALL_PDB)
+      # install debug pdb files
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${SAMPLENAME}.pdb
+        DESTINATION bin${OGRE_DEBUG_PATH} CONFIGURATIONS Debug
+        )
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_RELWDBG_PATH}/${SAMPLENAME}.pdb
+        DESTINATION bin${OGRE_RELWDBG_PATH} CONFIGURATIONS RelWithDebInfo
+        )
+    endif ()
   endif ()

-  if (OGRE_INSTALL_PDB)
-    # install debug pdb files
-	install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${SAMPLENAME}.pdb
-	  DESTINATION bin${OGRE_DEBUG_PATH} CONFIGURATIONS Debug
-	)
-	install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_RELWDBG_PATH}/${SAMPLENAME}.pdb
-	  DESTINATION bin${OGRE_RELWDBG_PATH} CONFIGURATIONS RelWithDebInfo
-	)
-  endif ()
 endfunction(ogre_config_sample)

 # setup Ogre tool build
@@ -253,18 +253,18 @@
   endif ()

   if (OGRE_INSTALL_TOOLS)
-    ogre_install_target(${TOOLNAME})
+    ogre_install_target(${TOOLNAME} "")
+    if (OGRE_INSTALL_PDB)
+      # install debug pdb files
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${TOOLNAME}.pdb
+        DESTINATION bin${OGRE_DEBUG_PATH}
+        CONFIGURATIONS Debug
+        )
+      install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_RELWDBG_PATH}/${TOOLNAME}.pdb
+        DESTINATION bin${OGRE_RELWDBG_PATH}
+        CONFIGURATIONS RelWithDebInfo
+        )
+    endif ()
   endif ()

-  if (OGRE_INSTALL_PDB)
-    # install debug pdb files
-	install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_DEBUG_PATH}/${TOOLNAME}.pdb
-	  DESTINATION bin${OGRE_DEBUG_PATH}
-	  CONFIGURATIONS Debug
-	)
-	install(FILES ${OGRE_BINARY_DIR}/bin${OGRE_RELWDBG_PATH}/${TOOLNAME}.pdb
-	  DESTINATION bin${OGRE_RELWDBG_PATH}
-	  CONFIGURATIONS RelWithDebInfo
-	)
-  endif ()
 endfunction(ogre_config_tool)


iOS: Explicitly specify the release lib paths so that libraries are always installed to the correct places.  This fixes the problem of duplicate, single architecture libraries in SDK builds.

--HG--
branch : v1-7

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -43,6 +43,10 @@
   set(OGRE_LIB_RELWDBG_PATH "")
   set(OGRE_LIB_MINSIZE_PATH "")
   set(OGRE_LIB_DEBUG_PATH "")
+  if(APPLE AND OGRE_BUILD_PLATFORM_IPHONE)
+    set(OGRE_RELEASE_PATH "/release")
+    set(OGRE_LIB_RELEASE_PATH "/release")
+  endif(APPLE AND OGRE_BUILD_PLATFORM_IPHONE)
   if (APPLE)
     set(OGRE_PLUGIN_PATH "/")
   else()


Remove old HunterGate

Remove old HunterGate

--- HunterGate.cmake
+++ HunterGate.cmake
@@ -1,350 +0,0 @@
-# Copyright (c) 2013-2014, Ruslan Baratov
-# All rights reserved.
-
-# This is a gate file to Hunter package manager.
-# Usage: include this file using `include` command and add package you need:
-#
-#     include("HunterGate.cmake")
-#     hunter_add_package(Foo)
-#     hunter_add_package(Boo COMPONENTS Bar Baz)
-#
-# Projects:
-#     * https://github.com/hunter-packages/gate/
-#     * https://github.com/ruslo/hunter
-
-cmake_minimum_required(VERSION 2.8.10)
-
-set(HUNTER_MINIMUM_VERSION "0.3.7")
-set(HUNTER_MINIMUM_VERSION_HASH 2e0fd774b5f03bd0789964aadbe0c90eb6ffff6b)
-
-# Set HUNTER_ROOT cmake variable to suitable value.
-# Info about variable can be found in HUNTER_ROOT_INFO.
-function(hunter_gate_detect_root)
-  # Check CMake variable
-  if(HUNTER_ROOT)
-    set(HUNTER_ROOT_INFO "HUNTER_ROOT detected by cmake variable" PARENT_SCOPE)
-    return()
-  endif()
-
-  # Check environment variable
-  string(COMPARE NOTEQUAL "$ENV{HUNTER_ROOT}" "" not_empty)
-  if(not_empty)
-    set(HUNTER_ROOT "$ENV{HUNTER_ROOT}" PARENT_SCOPE)
-    set(
-        HUNTER_ROOT_INFO
-        "HUNTER_ROOT detected by environment variable"
-        PARENT_SCOPE
-    )
-    return()
-  endif()
-
-  # Check HOME environment variable
-  string(COMPARE NOTEQUAL "$ENV{HOME}" "" result)
-  if(result)
-    set(HUNTER_ROOT "$ENV{HOME}/HunterPackages" PARENT_SCOPE)
-    set(
-        HUNTER_ROOT_INFO
-        "HUNTER_ROOT set using HOME environment variable"
-        PARENT_SCOPE
-    )
-    return()
-  endif()
-
-  # Check PROGRAMFILES environment variable (windows only)
-  if(WIN32)
-    string(COMPARE NOTEQUAL "$ENV{PROGRAMFILES}" "" result)
-    if(result)
-      set(HUNTER_ROOT "$ENV{PROGRAMFILES}/HunterPackages" PARENT_SCOPE)
-      set(
-          HUNTER_ROOT_INFO
-          "HUNTER_ROOT set using PROGRAMFILES environment variable"
-          PARENT_SCOPE
-      )
-      return()
-    endif()
-  endif()
-
-  # Create in project
-  if(NOT PROJECT_SOURCE_DIR)
-     message(FATAL_ERROR "PROJECT_SOURCE_DIR is empty")
-  endif()
-
-  set(HUNTER_ROOT "${PROJECT_SOURCE_DIR}/HunterPackages" PARENT_SCOPE)
-  set(
-      HUNTER_ROOT_INFO
-      "HUNTER_ROOT set by project sources directory"
-      PARENT_SCOPE
-  )
-endfunction()
-
-# Download project to HUNTER_ROOT
-function(hunter_gate_do_download)
-  message(
-      STATUS
-      "[hunter] Hunter not found, start download to '${HUNTER_ROOT}' ..."
-  )
-
-  if(NOT PROJECT_BINARY_DIR)
-    message(
-        FATAL_ERROR
-        "PROJECT_BINARY_DIR is empty. "
-        "Move HunterGate file **after** first project command"
-    )
-  endif()
-
-  set(TEMP_DIR "${PROJECT_BINARY_DIR}/Hunter-activity/gate")
-  set(TEMP_BUILD "${TEMP_DIR}/_builds")
-
-  set(URL_BASE "https://github.com/ruslo/hunter/archive")
-  file(
-      WRITE
-      "${TEMP_DIR}/CMakeLists.txt"
-      "cmake_minimum_required(VERSION 2.8.10)\n"
-      "include(ExternalProject)\n"
-      "ExternalProject_Add(\n"
-      "    Hunter\n"
-      "    URL\n"
-      "    \"${URL_BASE}/v${HUNTER_MINIMUM_VERSION}.tar.gz\"\n"
-      "    URL_HASH\n"
-      "    SHA1=${HUNTER_MINIMUM_VERSION_HASH}\n"
-      "    DOWNLOAD_DIR\n"
-      "    \"${HUNTER_ROOT}/Download\"\n"
-      "    SOURCE_DIR\n"
-      "    \"${HUNTER_ROOT}/Source\"\n"
-      "    CONFIGURE_COMMAND\n"
-      "    \"\"\n"
-      "    BUILD_COMMAND\n"
-      "    \"\"\n"
-      "    INSTALL_COMMAND\n"
-      "    \"\"\n"
-      ")\n"
-  )
-
-  execute_process(
-      COMMAND
-      "${CMAKE_COMMAND}" "-H${TEMP_DIR}" "-B${TEMP_BUILD}"
-      WORKING_DIRECTORY
-      "${TEMP_DIR}"
-      RESULT_VARIABLE
-      HUNTER_DOWNLOAD_RESULT
-  )
-
-  if(NOT HUNTER_DOWNLOAD_RESULT EQUAL 0)
-    message(FATAL_ERROR "Configure download project failed")
-  endif()
-
-  execute_process(
-      COMMAND
-      "${CMAKE_COMMAND}" --build "${TEMP_BUILD}"
-      WORKING_DIRECTORY
-      "${TEMP_DIR}"
-      RESULT_VARIABLE
-      HUNTER_DOWNLOAD_RESULT
-  )
-
-  if(NOT HUNTER_DOWNLOAD_RESULT EQUAL 0)
-    message(FATAL_ERROR "Build download project failed")
-  endif()
-
-  execute_process(
-      COMMAND
-      "${CMAKE_COMMAND}"
-      -E
-      touch
-      "${HUNTER_ROOT}/installed.by.gate"
-  )
-
-  message(STATUS "[hunter] downloaded to '${HUNTER_ROOT}'")
-endfunction()
-
-hunter_gate_detect_root() # set HUNTER_ROOT and HUNTER_ROOT_INFO
-
-if(NOT HUNTER_ROOT)
-  message(
-      FATAL_ERROR
-      "Internal error in 'hunter_gate_detect_root': HUNTER_ROOT is not setted"
-  )
-endif()
-
-# Beautify path, fix probable problems with windows path slashes
-get_filename_component(HUNTER_ROOT "${HUNTER_ROOT}" ABSOLUTE)
-
-if(NOT EXISTS "${HUNTER_ROOT}")
-  hunter_gate_do_download()
-  if(NOT EXISTS "${HUNTER_ROOT}")
-    message(
-        FATAL_ERROR
-        "Internal error in 'hunter_gate_do_download': "
-        "directory HUNTER_ROOT not found"
-    )
-  endif()
-endif()
-
-# at this point: HUNTER_ROOT exists and is file or directory
-if(NOT IS_DIRECTORY "${HUNTER_ROOT}")
-  message(
-      FATAL_ERROR
-      "HUNTER_ROOT is not directory (${HUNTER_ROOT})"
-      "(${HUNTER_ROOT_INFO})"
-  )
-endif()
-
-# at this point: HUNTER_ROOT exists and is directory
-file(GLOB _hunter_result "${HUNTER_ROOT}/*")
-list(LENGTH _hunter_result _hunter_result_len)
-if(_hunter_result_len EQUAL 0)
-  # HUNTER_ROOT directory is empty, let's download it
-  hunter_gate_do_download()
-endif()
-
-unset(_hunter_result)
-unset(_hunter_result_len)
-
-# at this point: HUNTER_ROOT exists and is not empty directory
-if(NOT EXISTS "${HUNTER_ROOT}/Source/cmake/Hunter")
-  message(
-      FATAL_ERROR
-      "HUNTER_ROOT directory exists (${HUNTER_ROOT})"
-      "but '${HUNTER_ROOT}/Source/cmake/Hunter' file not found"
-      "(${HUNTER_ROOT_INFO})"
-  )
-endif()
-
-# check version
-if(NOT EXISTS "${HUNTER_ROOT}/Source/cmake/version.cmake")
-  message(
-      FATAL_ERROR
-      "HUNTER_ROOT directory exists (${HUNTER_ROOT})"
-      "but '${HUNTER_ROOT}/Source/cmake/version.cmake' file not found"
-      "(${HUNTER_ROOT_INFO})"
-  )
-endif()
-
-unset(HUNTER_VERSION)
-include("${HUNTER_ROOT}/Source/cmake/version.cmake")
-if(NOT HUNTER_VERSION)
-  message(
-      FATAL_ERROR
-      "Internal error: HUNTER_VERSION is not set in `version.cmake`"
-      " (${HUNTER_ROOT_INFO})"
-  )
-endif()
-
-if(HUNTER_VERSION VERSION_LESS HUNTER_MINIMUM_VERSION)
-  message(
-      "Current version is ${HUNTER_VERSION}. "
-      "Minimum version is ${HUNTER_MINIMUM_VERSION}. "
-      "Try autoupdate..."
-  )
-
-  if(NOT EXISTS "${HUNTER_ROOT}/installed.by.gate")
-    message(
-        FATAL_ERROR
-        "Please update version manually or remove directory `${HUNTER_ROOT}`."
-        " Version read from file `${HUNTER_ROOT}/Source/cmake/version.cmake`."
-        " (${HUNTER_ROOT_INFO})"
-    )
-  endif()
-
-  if(EXISTS "${HUNTER_ROOT}/Source/.git")
-    message(
-        FATAL_ERROR
-        "Internal error: `installed.by.gate` and `.git`"
-        " (${HUNTER_ROOT_INFO})"
-    )
-  endif()
-  # File `${HUNTER_ROOT}/installed.by.gate` exists, hence current version
-  # installed by older gate file and can be auto-updated by current gate
-  if(NOT EXISTS "${HUNTER_ROOT}/Source/scripts/sleep.cmake")
-    message(FATAL_ERROR "Internal error: sleep.cmake not found")
-  endif()
-
-  set(_hunter_timeout 10)
-  message("")
-  message("***** AUTO UPDATE *****")
-  message("")
-  message("Directories:")
-  message("    * `${HUNTER_ROOT}/Base`")
-  message("    * `${HUNTER_ROOT}/Source`")
-  message("will be REMOVED")
-  message("")
-
-  foreach(x RANGE ${_hunter_timeout})
-    math(EXPR _hunter_output "(${_hunter_timeout}) - (${x})")
-    execute_process(
-        COMMAND
-        "${CMAKE_COMMAND}"
-        -E
-        echo_append
-        "${_hunter_output} "
-    )
-    if(NOT _hunter_output EQUAL 0)
-      execute_process(
-          COMMAND
-          "${CMAKE_CTEST_COMMAND}"
-          -S
-          "${HUNTER_ROOT}/Source/scripts/sleep.cmake"
-      )
-    endif()
-  endforeach()
-
-  # One more sanity check...
-  string(COMPARE EQUAL "${HUNTER_ROOT}" "" _hunter_root_is_empty)
-  if(_hunter_root_is_empty)
-    message(FATAL_ERROR "Internal error: HUNTER_ROOT is empty")
-  endif()
-
-  # Remove old version
-  if(EXISTS "${HUNTER_ROOT}/Base")
-    execute_process(
-        COMMAND
-        "${CMAKE_COMMAND}"
-        -E
-        remove_directory
-        "${HUNTER_ROOT}/Base"
-    )
-  endif()
-  if(EXISTS "${HUNTER_ROOT}/Source")
-    execute_process(
-        COMMAND
-        "${CMAKE_COMMAND}"
-        -E
-        remove_directory
-        "${HUNTER_ROOT}/Source"
-    )
-  endif()
-
-  # Download new version
-  hunter_gate_do_download()
-
-  # Sanity check: master file exists
-  if(NOT EXISTS "${HUNTER_ROOT}/Source/cmake/Hunter")
-    message(FATAL_ERROR "Broken download: master file not found")
-  endif()
-
-  # Sanity check: version is not less than minimum
-  if(NOT EXISTS "${HUNTER_ROOT}/Source/cmake/version.cmake")
-    message(FATAL_ERROR "Broken download: version.cmake not found")
-  endif()
-
-  unset(HUNTER_VERSION)
-  include("${HUNTER_ROOT}/Source/cmake/version.cmake")
-  if(NOT HUNTER_VERSION)
-    message(
-        FATAL_ERROR
-        "Internal error: HUNTER_VERSION is not set in `version.cmake`"
-    )
-  endif()
-
-  if(HUNTER_VERSION VERSION_LESS HUNTER_MINIMUM_VERSION)
-    message(FATAL_ERROR "Broken download: version is less than minimum")
-  endif()
-endif()
-
-# HUNTER_ROOT found or downloaded if not exists, i.e. can be used now
-include("${HUNTER_ROOT}/Source/cmake/Hunter")
-
-include(hunter_status_debug)
-hunter_status_debug("${HUNTER_ROOT_INFO}")
-
-include(hunter_add_package)


Dont run TSan on Debian.

Dont run TSan on Debian.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -365,7 +365,8 @@
     if(CC_VERSION VERSION_GREATER 5 OR CC_VERSION VERSION_EQUAL 5)
         if(CC_TSAN GREATER 0)
             execute_process(COMMAND cat /etc/os-release COMMAND grep -c Ubuntu OUTPUT_VARIABLE CI_UBUNTU )
-            if(CI_UBUNTU EQUAL 0)
+            execute_process(COMMAND cat /etc/os-release COMMAND grep -c Debian OUTPUT_VARIABLE CI_DEBIAN )
+            if(CI_UBUNTU EQUAL 0 AND CI_DEBIAN EQUAL 0)
                 set(CTEST_MEMORYCHECK_TYPE "ThreadSanitizer")
             endif()
         endif()


COMP: update tag for otbGRM remote module

--- Modules/Remote/otbGRM.remote.cmake
+++ Modules/Remote/otbGRM.remote.cmake
@@ -32,5 +32,5 @@
 http://tully.ups-tlse.fr/lassallep/grm
 "
   GIT_REPOSITORY https://github.com/orfeotoolbox/GRM
-  GIT_TAG 209161cc0b3fadad7999e80b83838868f430289e
+  GIT_TAG 75ffa60a382de74ae7a66328919d7da543eaf013
 )


Add a test for an icc-13 bug throwing an internal compiler error when encountering

std::numeric_limits<int>::max()

under very special conditions

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

--- deal.II/cmake/checks/check_02_compiler_bugs.cmake
+++ deal.II/cmake/checks/check_02_compiler_bugs.cmake
@@ -358,3 +358,37 @@
 ENDIF()

+#
+# icc-13 triggers an internal compiler error when compiling
+# std::numeric_limits<...>::min() with -std=c++0x [1].
+# Just disable C++11 support completely in this case.
+#
+# Reported by Ted Kord.
+#
+# - Matthias Maier, 2013
+#
+# [1] http://software.intel.com/en-us/forums/topic/328902
+#
+CHECK_CXX_COMPILER_BUG(
+  "
+  #include <limits>
+  struct Integer
+  {
+    static const int min_int_value;
+    static const int max_int_value;
+  };
+  const int Integer::min_int_value = std::numeric_limits<int>::min();
+  const int Integer::max_int_value = std::numeric_limits<int>::max();
+  int main() { return 0; }
+  "
+  DEAL_II_ICC_NUMERICLIMITS_BUG)
+
+IF(DEAL_II_ICC_NUMERICLIMITS_BUG)
+  MESSAGE(STATUS
+    "DEAL_II_ICC_NUMERICLIMITS_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_CAN_USE_CXX11 FALSE)
+ENDIF()
+


disable RTCc

disable RTCc

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -75,9 +75,9 @@
         # /wd4201     # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
         /wd4127       # -> disable warning: conditional expression is constant (caused by Qt and duk)

-        $<$<CONFIG:Debug>:
-        /RTCc         # -> value is assigned to a smaller data type and results in a data loss
-        >
+        #$<$<CONFIG:Debug>:
+        #/RTCc         # -> value is assigned to a smaller data type and results in a data loss
+        #>

         $<$<CONFIG:Release>:
         /Gw           # -> whole program global optimization


Remove warning flag -Wreoder which is uncompatible with C

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -111,7 +111,6 @@
         -Wextra
         -Wunused

-        -Wreorder
         -Wignored-qualifiers
         -Wmissing-braces
         -Wreturn-type


Go Travis again 2

Go Travis again 2

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -138,8 +138,8 @@
         # -Wmisleading-indentation

         # clang
-        # -stdlib=libc++
-        -stdlib=libstdc++
+        -stdlib=libc++
+        # -stdlib=libstdc++
         $<$<CXX_COMPILER_ID:GNU>:
             -Wmaybe-uninitialized


Removed HOUDINI_BIN variable in favor of multiple search paths.

--- cmake/FindHoudiniUsd.cmake
+++ cmake/FindHoudiniUsd.cmake
@@ -97,20 +97,14 @@
 endforeach()

 # Find Usd Schema Generator
-
-if(APPLE)
-        set(HOUDINI_BIN ${HOUDINI_ROOT}/Resources/bin)
-else()
-        set(HOUDINI_BIN ${HOUDINI_ROOT}/bin)
-endif()
-
 if (NOT USD_SCHEMA_GENERATOR)
         find_program(USD_SCHEMA_GENERATOR
                 NAMES
                 usdGenSchema.py
                 usdGenSchema
                 PATHS
-                ${HOUDINI_BIN}
+                ${HOUDINI_BIN}/bin
+                ${HOUDINI_ROOT}/Resources/bin
                 REQUIRED
                 NO_DEFAULT_PATH
                 )


Do not include .result~ files and such into packages

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -397,6 +397,7 @@
       PATTERN "*.vcxproj.filters" EXCLUDE
       PATTERN "*.vcxproj.user" EXCLUDE
       PATTERN "CTest" EXCLUDE
+      PATTERN "*~" EXCLUDE
     )
   ENDIF()
 ENDFUNCTION()


Use CMAKE_CFG_INTDIR instead of different MSVC and Xcode specific  configuration names

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -30,8 +30,7 @@
     STRING(REPLACE ".exe" ".pdb" pdb_location ${location})
     STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
     STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
-    STRING(REPLACE "$(OutDir)" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
-    STRING(REPLACE "$(ConfigurationName)" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
+    STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
     INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION})
   ENDFOREACH()
   ENDIF()
@@ -62,7 +61,7 @@
     DEPENDS ${output})
   SET_TARGET_PROPERTIES(symlink_${linkbasename}${ext} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
   # For Xcode, replace project config with install config
-  STRING(REPLACE "$(CONFIGURATION)" "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
+  STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
   INSTALL(FILES ${output} DESTINATION ${destination})
 ENDIF()
 ENDMACRO()


[CMake] Update GetSVN.cmake to handle repo

Summary:
When repo is used with git, 'clang --version' option does not display
the correct revision information (i.e. git hash on TOP) as the following:

clang version 6.0.0 --->
clang version 6.0.0 (clang version) (llvm version)

This is because repo also creates .git/svn folder as git-svn does and
this makes repo with git uses "git svn info" command, which is only for
git-svn, to retrieve its revision information, making null for the info.
To correctly distinguish between git-svn and repo with git, the folder
hierarchy to specify for git-svn should be .git/svn/refs as the "git svn
info" command depends on the revision data in .git/svn/refs. This patch
in turn makes repo with git passes through to the third macro,
get_source_info_git, in  get_source_info function, resulting in correctly
retrieving the revision information for repo with git using "git log ..."
command.

This patch is tested with git, svn, git-svn, and repo with git.

Reviewers: llvm-commits, probinson, rnk

Reviewed By: rnk

Subscribers: rnk, mehdi_amini, beanz, mgorny

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

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

--- cmake/modules/GetSVN.cmake
+++ cmake/modules/GetSVN.cmake
@@ -84,7 +84,7 @@
 function(get_source_info path revision repository)
   if (EXISTS "${path}/.svn")
     get_source_info_svn("${path}" revision repository)
-  elseif (EXISTS "${path}/.git/svn")
+  elseif (EXISTS "${path}/.git/svn/refs")
     get_source_info_git_svn("${path}" revision repository)
   elseif (EXISTS "${path}/.git")
     get_source_info_git("${path}" revision repository)


Honour the OCTAVE_OCT_DIR variable if set externally. Useful for package
maintainers.

svn path=/trunk/; revision=7964

--- cmake/modules/octave.cmake
+++ cmake/modules/octave.cmake
@@ -181,6 +181,7 @@
     )
     #message(STATUS "_OCTAVE_M_DIR = ${_OCTAVE_M_DIR}")
     #OCTAVE_OCT_DIR
+    if(NOT DEFINED OCTAVE_OCT_DIR)
     file(WRITE ${CMAKE_BINARY_DIR}/octave_command
     "printf(octave_config_info(\"localoctfilepath\"));"
     )
@@ -196,6 +197,7 @@
     OCTAVE_OCT_DIR
     ${_OCTAVE_OCT_DIR}
     )
+    endif(NOT DEFINED OCTAVE_OCT_DIR)
     #message(STATUS "OCTAVE_OCT_DIR = ${OCTAVE_OCT_DIR}")
   else(
    NUMERICAL_OCTAVE_VERSION
@@ -213,6 +215,7 @@
     OUTPUT_VARIABLE _OCTAVE_M_DIR
     )
     #OCTAVE_OCT_DIR
+    if(NOT DEFINED OCTAVE_OCT_DIR)
     file(WRITE ${CMAKE_BINARY_DIR}/octave_command
     "printf(octave_config_info(\"localoctfiledir\"));"
     )
@@ -221,6 +224,7 @@
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     OUTPUT_VARIABLE OCTAVE_OCT_DIR
     )
+    endif(NOT DEFINED OCTAVE_OCT_DIR)
   endif(
    NUMERICAL_OCTAVE_VERSION
    LESS


For numpy case switch from assuming python's numpy.get_include() will
_always_ find the parent of the numpy directory where arrayobject.h is
found, to using the numpy.get_include() result (with numpy directory
appended) as the first place that find_path searches for arrayobject.h.
This gives the user the option of using CMAKE_INCLUDE_PATH to help find
arrayobject.h for unusual numpy installations.

svn path=/trunk/; revision=10182

--- cmake/modules/python.cmake
+++ cmake/modules/python.cmake
@@ -77,9 +77,14 @@
     endif(NUMPY_ERR)
   endif(HAVE_NUMPY)
   if(HAVE_NUMPY)
-    # Set include path to find numpy headers
-    set(NUMERIC_INCLUDE_PATH ${NUMPY_INCLUDE_PATH}/numpy CACHE PATH "Path to python Numeric/numpy include files")
-    set(PYTHON_NUMERIC_NAME numpy CACHE INTERNAL "")
+    find_path(
+      NUMERIC_INCLUDE_PATH
+      arrayobject.h
+      ${NUMPY_INCLUDE_PATH}/numpy
+      )
+    if(NUMERIC_INCLUDE_PATH)
+      set(PYTHON_NUMERIC_NAME numpy CACHE INTERNAL "")
+    endif(NUMERIC_INCLUDE_PATH)
   else(HAVE_NUMPY)
     # Check for Python Numeric header in same include path or Numeric
     # subdirectory of that path to avoid version mismatch.
@@ -88,7 +93,7 @@
       arrayobject.h
       ${PYTHON_INCLUDE_PATH} ${PYTHON_INCLUDE_PATH}/Numeric
       )
-    if (NUMERIC_INCLUDE_PATH)
+    if(NUMERIC_INCLUDE_PATH)
       set(PYTHON_NUMERIC_NAME Numeric CACHE INTERNAL "")
     endif (NUMERIC_INCLUDE_PATH)
   endif(HAVE_NUMPY)


Bump version

Bump version

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -20,7 +20,7 @@

 SET(OSPRAY_VERSION_MAJOR 1)
 SET(OSPRAY_VERSION_MINOR 4)
-SET(OSPRAY_VERSION_PATCH 2)
+SET(OSPRAY_VERSION_PATCH 3)
 SET(OSPRAY_VERSION_GITHASH 0)
 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
   FIND_PACKAGE(Git)


Automatically package demo applications

Automatically package demo applications

--- CMake/msvCPack.cmake
+++ CMake/msvCPack.cmake
@@ -95,16 +95,12 @@

 set(CPACK_PACKAGE_EXECUTABLES)

-if (MSVTK_APP_ECG)
-  get_target_property(ECG_EXECUTABLE_NAME ECG OUTPUT_NAME)
-  list(APPEND CPACK_PACKAGE_EXECUTABLES "${ECG_EXECUTABLE_NAME}" "ECG")
-endif()
-
-if (MSVTK_APP_VTKButtons)
-  get_target_property(VTKButtons_EXECUTABLE_NAME VTKButtons OUTPUT_NAME)
-  list(APPEND CPACK_PACKAGE_EXECUTABLES "${VTKButtons_EXECUTABLE_NAME}" "VTKButtons")
-endif()
-
+foreach(app ${MSVTK_APPLICATIONS_SUBDIRS})
+  if(MSVTK_APP_${app})
+    get_target_property(${app}_EXECUTABLE_NAME ${app} OUTPUT_NAME)
+    list(APPEND CPACK_PACKAGE_EXECUTABLES "${${app}_EXECUTABLE_NAME}" "${app}")
+  endif()
+endforeach()
 # -------------------------------------------------------------------------
 # File extensions
 # -------------------------------------------------------------------------


Update Clang.cmake

Update Clang.cmake

--- cmake/platform/unix/compiler/Clang.cmake
+++ cmake/platform/unix/compiler/Clang.cmake
@@ -3,6 +3,7 @@
 add_compiler_flags(-std=c++17)
 add_compiler_flags(-frelaxed-template-template-args)
 add_compiler_flags(-Wno-keyword-compat -Wno-unused-command-line-argument)
+add_linker_flags(-lpthread)

 if(APPLE)
   add_compiler_flags(-ftemplate-depth=900 -Wno-macro-redefined)
@@ -10,4 +11,4 @@
   add_compiler_flags(-ftemplate-depth=900 -Wno-expansion-to-defined)
 endif()

-set(CLANG TRUE)+set(CLANG TRUE)


de-screamify FindTBB.cmake

de-screamify FindTBB.cmake

--- components/ospcommon/cmake/FindTBB.cmake
+++ components/ospcommon/cmake/FindTBB.cmake
@@ -14,35 +14,35 @@
 ## limitations under the License.                                           ##
 ## ======================================================================== ##

-SET(TBB_VERSION_REQUIRED "3.0")
+set(TBB_VERSION_REQUIRED "3.0")

-IF (NOT TBB_ROOT)
-  SET(TBB_ROOT $ENV{TBB_ROOT})
-ENDIF()
-IF (NOT TBB_ROOT)
-  SET(TBB_ROOT $ENV{TBBROOT})
-ENDIF()
+if (NOT TBB_ROOT)
+  set(TBB_ROOT $ENV{TBB_ROOT})
+endif()
+if (NOT TBB_ROOT)
+  set(TBB_ROOT $ENV{TBBROOT})
+endif()

 # detect changed TBB_ROOT
-IF (NOT TBB_ROOT STREQUAL TBB_ROOT_LAST)
-  UNSET(TBB_INCLUDE_DIR CACHE)
-  UNSET(TBB_LIBRARY CACHE)
-  UNSET(TBB_LIBRARY_DEBUG CACHE)
-  UNSET(TBB_LIBRARY_MALLOC CACHE)
-  UNSET(TBB_LIBRARY_MALLOC_DEBUG CACHE)
-ENDIF()
+if (NOT TBB_ROOT STREQUAL TBB_ROOT_LAST)
+  unset(TBB_INCLUDE_DIR CACHE)
+  unset(TBB_LIBRARY CACHE)
+  unset(TBB_LIBRARY_DEBUG CACHE)
+  unset(TBB_LIBRARY_MALLOC CACHE)
+  unset(TBB_LIBRARY_MALLOC_DEBUG CACHE)
+endif()

-IF (WIN32)
+if (WIN32)
   # workaround for parentheses in variable name / CMP0053
-  SET(PROGRAMFILESx86 "PROGRAMFILES(x86)")
-  SET(PROGRAMFILES32 "$ENV{${PROGRAMFILESx86}}")
-  IF (NOT PROGRAMFILES32)
-    SET(PROGRAMFILES32 "$ENV{PROGRAMFILES}")
-  ENDIF()
-  IF (NOT PROGRAMFILES32)
-    SET(PROGRAMFILES32 "C:/Program Files (x86)")
-  ENDIF()
-  FIND_PATH(TBB_ROOT include/tbb/task_scheduler_init.h
+  set(PROGRAMFILESx86 "PROGRAMFILES(x86)")
+  set(PROGRAMFILES32 "$ENV{${PROGRAMFILESx86}}")
+  if (NOT PROGRAMFILES32)
+    set(PROGRAMFILES32 "$ENV{PROGRAMFILES}")
+  endif()
+  if (NOT PROGRAMFILES32)
+    set(PROGRAMFILES32 "C:/Program Files (x86)")
+  endif()
+  find_path(TBB_ROOT include/tbb/task_scheduler_init.h
     DOC "Root of TBB installation"
     HINTS ${TBB_ROOT}
     PATHS
@@ -53,29 +53,29 @@
       "${PROGRAMFILES32}/Intel/compilers_and_libraries/windows/tbb"
   )

-  IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
-    SET(TBB_ARCH intel64)
-  ELSE()
-    SET(TBB_ARCH ia32)
-  ENDIF()
+  if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+    set(TBB_ARCH intel64)
+  else()
+    set(TBB_ARCH ia32)
+  endif()

-  SET(TBB_LIBDIR ${TBB_ROOT}/lib)
+  set(TBB_LIBDIR ${TBB_ROOT}/lib)

-  FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
-  SET(TBB_LIB_HINTS
+  find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
+  set(TBB_LIB_HINTS
     PATHS
     ${TBB_LIBDIR}/${TBB_ARCH}/vc14
     ${TBB_LIBDIR}
     NO_DEFAULT_PATH
   )
-  FIND_LIBRARY(TBB_LIBRARY tbb ${TBB_LIB_HINTS})
-  FIND_LIBRARY(TBB_LIBRARY_DEBUG tbb_debug ${TBB_LIB_HINTS})
-  FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc ${TBB_LIB_HINTS})
-  FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG tbbmalloc_debug ${TBB_LIB_HINTS})
+  find_library(TBB_LIBRARY tbb ${TBB_LIB_HINTS})
+  find_library(TBB_LIBRARY_DEBUG tbb_debug ${TBB_LIB_HINTS})
+  find_library(TBB_LIBRARY_MALLOC tbbmalloc ${TBB_LIB_HINTS})
+  find_library(TBB_LIBRARY_MALLOC_DEBUG tbbmalloc_debug ${TBB_LIB_HINTS})

-ELSE ()
+else ()

-  FIND_PATH(TBB_ROOT include/tbb/task_scheduler_init.h
+  find_path(TBB_ROOT include/tbb/task_scheduler_init.h
     DOC "Root of TBB installation"
     HINTS ${TBB_ROOT}
     PATHS
@@ -85,70 +85,70 @@
       /opt/intel/tbb
   )

-  IF (APPLE)
-    FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
-    FIND_LIBRARY(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
-    FIND_LIBRARY(TBB_LIBRARY_DEBUG tbb_debug PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
-    FIND_LIBRARY(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
-    FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG tbbmalloc_debug PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
-  ELSE()
-    FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
-    SET(TBB_HINTS HINTS ${TBB_ROOT}/lib/intel64/gcc4.7 ${TBB_ROOT}/lib/intel64/gcc4.4 ${TBB_ROOT}/lib ${TBB_ROOT}/lib64 PATHS /usr/libx86_64-linux-gnu/)
-    FIND_LIBRARY(TBB_LIBRARY libtbb.so.2 ${TBB_HINTS})
-    FIND_LIBRARY(TBB_LIBRARY_DEBUG libtbb_debug.so.2 ${TBB_HINTS})
-    FIND_LIBRARY(TBB_LIBRARY_MALLOC libtbbmalloc.so.2 ${TBB_HINTS})
-    FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG libtbbmalloc_debug.so.2 ${TBB_HINTS})
-  ENDIF()
-ENDIF()
+  if (APPLE)
+    find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
+    find_library(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+    find_library(TBB_LIBRARY_DEBUG tbb_debug PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+    find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+    find_library(TBB_LIBRARY_MALLOC_DEBUG tbbmalloc_debug PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+  else()
+    find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
+    set(TBB_HINTS HINTS ${TBB_ROOT}/lib/intel64/gcc4.7 ${TBB_ROOT}/lib/intel64/gcc4.4 ${TBB_ROOT}/lib ${TBB_ROOT}/lib64 PATHS /usr/libx86_64-linux-gnu/)
+    find_library(TBB_LIBRARY libtbb.so.2 ${TBB_HINTS})
+    find_library(TBB_LIBRARY_DEBUG libtbb_debug.so.2 ${TBB_HINTS})
+    find_library(TBB_LIBRARY_MALLOC libtbbmalloc.so.2 ${TBB_HINTS})
+    find_library(TBB_LIBRARY_MALLOC_DEBUG libtbbmalloc_debug.so.2 ${TBB_HINTS})
+  endif()
+endif()

-SET(TBB_ROOT_LAST ${TBB_ROOT} CACHE INTERNAL "Last value of TBB_ROOT to detect changes")
+set(TBB_ROOT_LAST ${TBB_ROOT} CACHE INTERNAL "Last value of TBB_ROOT to detect changes")

-SET(TBB_ERROR_MESSAGE
+set(TBB_ERROR_MESSAGE
   "Threading Building Blocks (TBB) with minimum version ${TBB_VERSION_REQUIRED} not found.
 OSPRay uses TBB as default tasking system. Please make sure you have the TBB headers installed as well (the package is typically named 'libtbb-dev' or 'tbb-devel') and/or hint the location of TBB in TBB_ROOT.
 Alternatively, you can try to use OpenMP as tasking system by setting OSPRAY_TASKING_SYSTEM=OpenMP")

-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(TBB
   ${TBB_ERROR_MESSAGE}
   TBB_INCLUDE_DIR TBB_LIBRARY TBB_LIBRARY_MALLOC
 )

 # check version
-IF (TBB_INCLUDE_DIR)
-  FILE(READ ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h TBB_STDDEF_H)
+if (TBB_INCLUDE_DIR)
+  file(READ ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h TBB_STDDEF_H)

-  STRING(REGEX MATCH "#define TBB_VERSION_MAJOR ([0-9]+)" DUMMY "${TBB_STDDEF_H}")
-  SET(TBB_VERSION_MAJOR ${CMAKE_MATCH_1})
+  string(REGEX MATCH "#define TBB_VERSION_MAJOR ([0-9]+)" DUMMY "${TBB_STDDEF_H}")
+  set(TBB_VERSION_MAJOR ${CMAKE_MATCH_1})

-  STRING(REGEX MATCH "#define TBB_VERSION_MINOR ([0-9]+)" DUMMY "${TBB_STDDEF_H}")
-  SET(TBB_VERSION "${TBB_VERSION_MAJOR}.${CMAKE_MATCH_1}")
+  string(REGEX MATCH "#define TBB_VERSION_MINOR ([0-9]+)" DUMMY "${TBB_STDDEF_H}")
+  set(TBB_VERSION "${TBB_VERSION_MAJOR}.${CMAKE_MATCH_1}")

-  IF (TBB_VERSION VERSION_LESS TBB_VERSION_REQUIRED)
-    MESSAGE(FATAL_ERROR ${TBB_ERROR_MESSAGE})
-  ENDIF()
+  if (TBB_VERSION VERSION_LESS TBB_VERSION_REQUIRED)
+    message(FATAL_ERROR ${TBB_ERROR_MESSAGE})
+  endif()

-  SET(TBB_VERSION ${TBB_VERSION} CACHE STRING "TBB Version")
-  MARK_AS_ADVANCED(TBB_VERSION)
-ENDIF()
+  set(TBB_VERSION ${TBB_VERSION} CACHE STRING "TBB Version")
+  mark_as_advanced(TBB_VERSION)
+endif()

-IF (TBB_FOUND)
-  SET(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
+if (TBB_FOUND)
+  set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
   # NOTE(jda) - TBB found in CentOS 6/7 package manager does not have debug
   #             versions of the library...silently fall-back to using only the
   #             libraries which we actually found.
-  IF (NOT TBB_LIBRARY_DEBUG)
-    SET(TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC})
-  ELSE ()
-    SET(TBB_LIBRARIES
+  if (NOT TBB_LIBRARY_DEBUG)
+    set(TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC})
+  else ()
+    set(TBB_LIBRARIES
         optimized ${TBB_LIBRARY} optimized ${TBB_LIBRARY_MALLOC}
         debug ${TBB_LIBRARY_DEBUG} debug ${TBB_LIBRARY_MALLOC_DEBUG}
     )
-  ENDIF()
-ENDIF()
+  endif()
+endif()

-MARK_AS_ADVANCED(TBB_INCLUDE_DIR)
-MARK_AS_ADVANCED(TBB_LIBRARY)
-MARK_AS_ADVANCED(TBB_LIBRARY_DEBUG)
-MARK_AS_ADVANCED(TBB_LIBRARY_MALLOC)
-MARK_AS_ADVANCED(TBB_LIBRARY_MALLOC_DEBUG)
+mark_as_advanced(TBB_INCLUDE_DIR)
+mark_as_advanced(TBB_LIBRARY)
+mark_as_advanced(TBB_LIBRARY_DEBUG)
+mark_as_advanced(TBB_LIBRARY_MALLOC)
+mark_as_advanced(TBB_LIBRARY_MALLOC_DEBUG)


Move a VS flag from rlz to debug as it's only useful in debug and invalid in rlz

--- RageCommon.cmake
+++ RageCommon.cmake
@@ -141,7 +141,7 @@

 	IF (CMAKE_BUILD_TYPE STREQUAL Debug)
 		ADD_DEFINITIONS(-D_DEBUG)
-		SET( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4100 /wd4290 /wd4512")
+		SET( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4100 /wd4290 /wd4512 /NODEFAULTLIB:msvcrt.lib")
 		SET(CMAKE_CXX_WARNING_LEVEL 4)

 		SET(CHECK_MEM_LEAKS OFF CACHE BOOL "On to check memory with VLD (must be installed)")
@@ -152,7 +152,6 @@

 	IF (CMAKE_BUILD_TYPE STREQUAL Release)
 		ADD_DEFINITIONS(-DNDEBUG)
-		SET( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /NODEFAULTLIB:msvcrt.lib" )
 		SET(CMAKE_CXX_WARNING_LEVEL 2)
 	ENDIF (CMAKE_BUILD_TYPE STREQUAL Release)


Pass option CTK_ENABLE_Python_Wrapping from Superbuild to inner build. See #123

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -78,7 +78,7 @@
   DOCUMENTATION_TARGET_IN_ALL
   CTEST_USE_LAUNCHERS
   CTK_WRAP_PYTHONQT_FULL
-  CTK_WRAP_PYTHONQT_LIGHT
+  CTK_ENABLE_Python_Wrapping
   ${ctk_libs_bool_vars}
   ${ctk_plugins_bool_vars}
   ${ctk_applications_bool_vars}


config.h generation was leading to a whole rebuilt...

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@1070 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/SiconosProject.cmake
+++ Numerics/cmake/SiconosProject.cmake
@@ -64,7 +64,10 @@
   INCLUDE(SiconosDoc)

   # config.h and include
-  CONFIGURE_FILE(config.h.cmake config.h)
+  IF(NOT CONFIG_H_GLOBAL_CONFIGURED)
+    SET(CONFIG_H_GLOBAL_CONFIGURED 1 CACHE BOOL "config.h global generation." )
+    CONFIGURE_FILE(config.h.cmake config.h)
+  ENDIF(NOT CONFIG_H_GLOBAL_CONFIGURED)
   INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})

   # Top level install
@@ -257,7 +260,10 @@
     ENDIF(${_N}_FOUND)
   ENDFOREACH(_N ${_NAME} ${_UNAME})
   # update config.h
-  CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
+  IF(NOT CONFIG_H_${_NAME}_CONFIGURED)
+    SET(CONFIG_H_${_NAME}_CONFIGURED 1 CACHE BOOL "config.h generation for package ${_NAME}")
+    CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
+  ENDIF(NOT CONFIG_H_${_NAME}_CONFIGURED)
   SET(_N)
   SET(_NAME)
   SET(_UNAME)


ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.47 -j1.48 vtkGenerateVTKConfig.cmake)

--- vtkGenerateVTKConfig.cmake
+++ vtkGenerateVTKConfig.cmake
@@ -50,8 +50,8 @@
 # Library directory.
 SET(VTK_LIBRARY_DIRS_CONFIG ${LIBRARY_OUTPUT_PATH})

-# Runtime directory.
-SET(VTK_RUNTIME_DIRS_CONFIG ${LIBRARY_OUTPUT_PATH})
+# Runtime library directory.
+SET(VTK_RUNTIME_LIBRARY_DIRS_CONFIG ${LIBRARY_OUTPUT_PATH})

 # Determine the include directories needed.
 SET(VTK_INCLUDE_DIRS_CONFIG
@@ -175,9 +175,9 @@

 # Runtime directories.
 IF(WIN32)
-  SET(VTK_RUNTIME_DIRS_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR})
+  SET(VTK_RUNTIME_LIBRARY_DIRS_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR})
 ELSE(WIN32)
-  SET(VTK_RUNTIME_DIRS_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_LIB_DIR})
+  SET(VTK_RUNTIME_LIBRARY_DIRS_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_LIB_DIR})
 ENDIF(WIN32)

 IF(WIN32)


COMP: set Expat install library directory with a CMake variable instead of patching it

--- SuperBuild/CMake/External_expat.cmake
+++ SuperBuild/CMake/External_expat.cmake
@@ -34,6 +34,7 @@
   -DBUILD_examples:BOOL=OFF
   -DBUILD_tests:BOOL=OFF
   -DBUILD_tools:BOOL=OFF
+  -DCMAKE_INSTALL_LIBDIR:STRING=lib
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   LOG_DOWNLOAD 1
   LOG_CONFIGURE 1
@@ -41,9 +42,4 @@
   LOG_INSTALL 1
   )

-set(_SB_EXPAT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
-if(WIN32)
-  set(_SB_EXPAT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libexpat.lib)
-elseif(UNIX)
-  set(_SB_EXPAT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libexpat${CMAKE_SHARED_LIBRARY_SUFFIX})
-endif()
+SUPERBUILD_UPDATE_CMAKE_VARIABLES(EXPAT FALSE)


Static link libcurl

Static link libcurl

--- Tools/CMake/modules/module_curl.cmake
+++ Tools/CMake/modules/module_curl.cmake
@@ -34,6 +34,7 @@
 set(BUILD_TESTING OFF CACHE INTERNAL "" FORCE)
 set(CMAKE_USE_LIBSSH2 OFF CACHE INTERNAL "" FORCE)
 set(CURL_STATICLIB ON CACHE INTERNAL "" FORCE)
+set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
 set(ENABLE_MANUAL OFF CACHE INTERNAL "" FORCE)
 set(ENABLE_UNIX_SOCKETS OFF CACHE INTERNAL "" FORCE)
 set(HTTP_ONLY ON CACHE INTERNAL "" FORCE)


CMake: minor (missing STATUS in MESSAGE command)

--- adm_local/cmake_files/FindMetis.cmake
+++ adm_local/cmake_files/FindMetis.cmake
@@ -44,7 +44,7 @@
 ENDFOREACH(ln ${list_metis_h_content})
 IF(metis_major_version STREQUAL 5)
   SET(SALOME_MED_METIS_V5 1)
-  MESSAGE("-- Metis maj version 5 detected.")
+  MESSAGE(STATUS "Metis maj version 5 detected.")
 ELSE(metis_major_version STREQUAL 5)
-   MESSAGE("-- Metis maj version 4 detected.")
+   MESSAGE(STATUS "Metis maj version 4 detected.")
 ENDIF(metis_major_version STREQUAL 5)


Only give MinGW compiler version too low warning once. [ci skip]

--- CMake/Modules/CheckCompilerToolchain.cmake
+++ CMake/Modules/CheckCompilerToolchain.cmake
@@ -141,8 +141,10 @@
         endforeach ()
     else ()
         if (MINGW AND COMPILER_VERSION VERSION_LESS 4.9.1)
-            # Certain MinGW versions fail to compile SSE code. This is the initial guess for known "bad" version range, and can be tightened later
-            message (WARNING "Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1. You can also try to re-enable SSE with CMake option -DURHO3D_SSE=1, but this may result in compile errors.")
+            if (NOT DEFINED URHO3D_SSE)     # Only give the warning once during initial configuration
+                # Certain MinGW versions fail to compile SSE code. This is the initial guess for known "bad" version range, and can be tightened later
+                message (WARNING "Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1. You can also try to re-enable SSE with CMake option -DURHO3D_SSE=1, but this may result in compile errors.")
+            endif ()
         elseif (NOT EMSCRIPTEN)     # Emscripten does not support SSE/SSE2 (yet) now but erroneously responding positively to our probe, so skip them for Emscripten for now
             check_extension (sse)
             check_extension (sse2)


SuperBuild: qt4 enable xrender and xrandr

--- SuperBuild/CMake/External_qt4.cmake
+++ SuperBuild/CMake/External_qt4.cmake
@@ -30,7 +30,7 @@
   if(APPLE)
     set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -no-framework")
   else() #Linux
-    set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -sm -xrender -gtkstyle")
+    set(QT4_SB_CONFIG "${QT4_SB_CONFIG} -sm -xrender -xrandr -gtkstyle")
   endif()
 endif()


added environment variable at install

added environment variable at install

--- SuperBuild/External_CCPi-Regularisation-Toolkit.cmake
+++ SuperBuild/External_CCPi-Regularisation-Toolkit.cmake
@@ -88,7 +88,7 @@
         -DPYTHON_DEST_DIR:PATH=${PYTHON_DEST}

       BUILD_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${${proj}_TAG} ${CMAKE_COMMAND} --build .
-      INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
+      INSTALL_COMMAND ${CMAKE_COMMAND} -E env CIL_VERSION=${${proj}_TAG} ${CMAKE_COMMAND} --build . --target install
       #TEST_COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${${proj}_SOURCE_DIR}/test/ -p test*.py
       DEPENDS
         ${${proj}_DEPENDENCIES}


FIXME: install: do not install a200t pinmap

Signed-off-by: Karol Gugala <38af71640571ee4b5093d4f69ffca1ac454f2948@antmicro.com>

--- xc7/make/install.cmake
+++ xc7/make/install.cmake
@@ -130,6 +130,11 @@
     return()
   endif()

+  # FIXME: do not install a200t
+  if(${DEVICE} STREQUAL "xca200t")
+    message(STATUS "FIXME: Skipping device files installation for ${DEVICE}-${PACKAGE} part: ${PART}")
+    return()
+  endif()

   get_target_property_required(PINMAP ${BOARD} PINMAP)
   get_file_location(PINMAP_FILE ${PINMAP})


Fixes bug where proto dependencies are not recorded properly.

--- internal/proto_library.cmake
+++ internal/proto_library.cmake
@@ -141,6 +141,12 @@
       MESSAGE(FATAL_ERROR "no target defined!")
     ENDIF()

+    # This makes sure CMAKE knows to build all of our dependencies first
+    FOREACH(dependency_uri ${_PACKAGES})
+      URI_TO_TARGET_NAME(${dependency_uri} dependency_target)
+      ADD_DEPENDENCIES(${target} ${dependency_target})
+    ENDFOREACH()
+
     # install generated files
     STRING(REGEX REPLACE "${CMAKE_SOURCE_DIR}/(.*)" "\\1" dest_dir ${CMAKE_CURRENT_SOURCE_DIR})
     INSTALL(FILES ${TARGET_FILE} DESTINATION ${dest_dir} )


WaffleDefineCompilerFlags: FindPkgConfig variables are lists

In case of a list, cmake uses ';' as an element separator.
When the list is used as a string, as compiler CFLAGS,
the ';' ends up being picked up by the shell as an 'end of command'.

Iterate through the list and use ' ' as element separator.

Reviewed-by: Dylan Baker <dd378c4ca75f71f527acddef5b43fc35b68d5b7a@pnwbakers.com>
Signed-off-by: Adrian Negreanu <5de5a0cc5220866311a725b4ad2b413952bf9ecf@nxp.com>

--- cmake/Modules/WaffleDefineCompilerFlags.cmake
+++ cmake/Modules/WaffleDefineCompilerFlags.cmake
@@ -60,7 +60,9 @@
     endif()

     if(egl_FOUND)
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${egl_CFLAGS_OTHER}")
+        foreach(FLAG ${egl_CFLAGS_OTHER})
+            set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAG}")
+        endforeach()
     endif(egl_FOUND)

     if(MINGW)


Android-Google-APIs: 19-r18

Android-Google-APIs: 19-r18

--- cmake/projects/Android-Google-APIs/hunter.cmake
+++ cmake/projects/Android-Google-APIs/hunter.cmake
@@ -37,9 +37,9 @@
     VERSION
     "19" # version affects layout: <sdk>/add-ons/addon-google_apis-google-19
     URL
-    "https://dl.google.com/android/repository/google_apis-19_r14.zip"
+    "https://dl.google.com/android/repository/google_apis-19_r18.zip"
     SHA1
-    cb053798e862c0f674ef909aa58218f07d277d18
+    701595b0d9985cca00be29b3c606e64731c3e1f7
 )

 hunter_add_version(


BUG: slicer.kitware.com/midas3/ ExternalData will not support http.

Support for the http protocol is being removed from this ExternalData archive.
Make only support for https explicit to improve error messages.

Change-Id: I2fec19921295f51333046f087c0fd449442fac6b

--- CMake/ITKExternalData.cmake
+++ CMake/ITKExternalData.cmake
@@ -38,7 +38,7 @@
     "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"

     # Mirror supported by the Slicer community.
-    "http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
+    "https://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
     )
 endif()


Disable precompiled headers in OpenCV

Disable precompiled headers in OpenCV

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -61,6 +61,7 @@
         -DENABLE_CXX11:BOOL=ON
         -DWITH_IPP:BOOL=OFF
         -DBUILD_IPP_IW:BOOL=OFF
+        -DENABLE_PRECOMPILED_HEADERS:BOOL=OFF
         ${additional_cmake_args}
         ${${proj}_CUSTOM_CMAKE_ARGS}
       CMAKE_CACHE_ARGS


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -458,6 +458,7 @@
 	set(_LIBRARY_NAME ${_MAIN_NAME})
 	source_group( "Source Files" FILES ${_SOURCES} )
 	common_flags()
+	add_definitions(-D${_LIBRARY_NAME}_STATIC)
 	include_directories(${CMAKE_SOURCE_DIR})
 	foreach(INCLUDE_DIR ${CMAKI_INCLUDE_DIRS})
 		include_directories(${INCLUDE_DIR})


Enable /std:c11 for MSVC builds. (#7943)

There seems to be a version dependency on whether this flag gates all C11 related features, which is causing the CI releases to fail on missing support for _Generic.

Setting this option per the recommendation at https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/ as a first step. That post also indicates a tie-in to a Windows update (??? - really, for a pre-processor change), but starting here.

This will now hard fail on older versions of MSVC (<16.9 iiuc). This is deemed better than soft failures due to unsupported compiler features.

--- build_tools/cmake/iree_copts.cmake
+++ build_tools/cmake/iree_copts.cmake
@@ -128,6 +128,9 @@

     # Use the modern C preprocessor to more closely match standards/clang/gcc behavior.
     "/Zc:preprocessor"
+
+    # Enable C11 standards conforming mode.
+    "$<$<COMPILE_LANGUAGE:C>:/std:c11>"
 )

 # Compiler diagnostics.


Add License to Finder

Add License to Finder

--- CMake/Findflatbuffers.cmake
+++ CMake/Findflatbuffers.cmake
@@ -1,6 +1,5 @@
 # Find the flatbuffers schema compiler
 # Copyright 2014 Stefan.Eilemann@epfl.ch
-#
 # Output Variables:
 # * FLATC_EXECUTABLE the flatc compiler executable
 # * FLATBUFFERS_FOUND
@@ -8,6 +7,18 @@
 # Provides:
 # * FLATC_TARGET(Name <files>) creates the C++ headers for the given flatbuffer
 #   schema files. Returns the header files in ${Name}_OUTPUTS
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.

 find_program(FLATC_EXECUTABLE NAMES flatc)
 find_path(FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h)


Fixed FindWasm

Fixed FindWasm

--- CMakeModules/FindWasm.cmake
+++ CMakeModules/FindWasm.cmake
@@ -2,12 +2,10 @@

 # TODO: Check if compiler is able to generate wasm32
 if ("${WASM_ROOT}" STREQUAL "")
-   #   if (NOT "$ENV{WASM_ROOT}" STREQUAL "")
-   #   set( WASM_ROOT $ENV{WASM_ROOT} )
    if (APPLE)
       set( WASM_ROOT "/usr/local/wasm" )
    elseif (UNIX AND NOT APPLE)
-      set( WASM_ROOT "/opt/wasm" )
+      set( WASM_ROOT "$ENV{HOME}/opt/wasm" )
    else()
       message(FATAL_ERROR "WASM not found and don't know where to look, please specify WASM_ROOT")
    endif()


Fixed indentation

Fixed indentation

--- config.h.cmake
+++ config.h.cmake
@@ -24,11 +24,13 @@

 #define GTK_THEME_DIR "@GTK_THEME_DIR@/gtk-2.0"
 #ifndef OXYGEN_DEBUG
-#   define OXYGEN_DEBUG @OXYGEN_DEBUG@
+#define OXYGEN_DEBUG @OXYGEN_DEBUG@
 #endif
+
 #ifndef OXYGEN_DEBUG_INNERSHADOWS
-#   define OXYGEN_DEBUG_INNERSHADOWS @OXYGEN_DEBUG_INNERSHADOWS@
+#define OXYGEN_DEBUG_INNERSHADOWS @OXYGEN_DEBUG_INNERSHADOWS@
 #endif
+
 #define OXYGEN_ICON_HACK @OXYGEN_ICON_HACK@
 #define OXYGEN_FORCE_KDE_ICONS_AND_FONTS @OXYGEN_FORCE_KDE_ICONS_AND_FONTS@
 #define HAVE_DBUS @HAVE_DBUS@


Fixing again OSX build options.

Fixing again OSX build options.

--- cmake/BuildOptionsPONA.cmake
+++ cmake/BuildOptionsPONA.cmake
@@ -12,9 +12,9 @@
 		SET(CMAKE_EXE_LINKER_FLAGS "-m64 ${CMAKE_EXE_LINKER_FLAGS}")
 	ENDIF(PONA_BUILD64)
 ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-	IF(CMAKE_SYSTEM_VERSION GREATER 10.5)
+	IF(CMAKE_SYSTEM_VERSION GREATER 9.9.9)
 		ADD_DEFINITIONS(-D_XOPEN_SOURCE)
-	ENDIF(CMAKE_SYSTEM_VERSION GREATER 10.5)
+	ENDIF(CMAKE_SYSTEM_VERSION GREATER 9.9.9)
 	SET(CMAKE_SHARED_LINKER_FLAGS "-U_undefined -undefined dynamic_lookup ${CMAKE_SHARED_LINKER_FLAGS}")
 	SET(PONA_BUILD64 ON CACHE BOOL "Build 64 bit version of libPONA.")
 	IF(PONA_BUILD64)