raised limit of output data to show on CDash

--- src/CTestConfig.cmake
+++ src/CTestConfig.cmake
@@ -11,3 +11,5 @@
 set(CTEST_DROP_SITE "neutronbalance.mit.edu")
 set(CTEST_DROP_LOCATION "/CDash/submit.php?project=OpenMC")
 set(CTEST_DROP_SITE_CDASH TRUE)
+SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "20000")
+SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "20000")


 Removed obsolete ftemplate-depth, as the defaults should be fine

git-svn-id: b66b41e514ff40863ef1aa95df2dbf63dd8d6be1@975 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCompiler.cmake
+++ cmake/ACGCompiler.cmake
@@ -66,13 +66,15 @@
   list(APPEND ADDITIONAL_C_DEBUG_FLAGS            "-DINCLUDE_TEMPLATES" )
   list(APPEND ADDITIONAL_C_RELEASE_FLAGS          "-DINCLUDE_TEMPLATES" )
   list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS   "-DINCLUDE_TEMPLATES" )
-
-  # Increase the template depth as this might be exceeded from time to time
-  IF( NOT CMAKE_SYSTEM MATCHES "SunOS*")
-    list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS          "-ftemplate-depth-100" )
-    list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS        "-ftemplate-depth-100" )
-    list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-ftemplate-depth-100" )
-  ENDIF()
+
+#  Deprecated setting. Remove in future release, as the default template depth
+#  should be enough with state of the art compilers
+#  # Increase the template depth as this might be exceeded from time to time
+#  IF( NOT CMAKE_SYSTEM MATCHES "SunOS*")
+#    list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS          "-ftemplate-depth-100" )
+#    list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS        "-ftemplate-depth-100" )
+#    list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-ftemplate-depth-100" )
+#  ENDIF()

   ################################################################################
   # OS Defines


Remove contained folders in ContainTest

Remove contained folders in ContainTest

--- cmake/ContainTest.cmake
+++ cmake/ContainTest.cmake
@@ -7,6 +7,7 @@
     set(TEST_ENV "")
     foreach(VARIABLE XDG_DATA_HOME XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME XDG_RUNTIME_DIR TMPDIR)
         set(CONTAINER "${CMAKE_CURRENT_BINARY_DIR}/${test_name}-folders/${VARIABLE}")
+        file(REMOVE_RECURSE ${CONTAINER})
         file(MAKE_DIRECTORY ${CONTAINER})
         set(TEST_ENV "${TEST_ENV}${VARIABLE}=${CONTAINER};")
     endforeach()


Improve FindPSP2SDK.cmake

Improve FindPSP2SDK.cmake

--- cmake/FindPSP2SDK.cmake
+++ cmake/FindPSP2SDK.cmake
@@ -17,26 +17,22 @@
 endif()

 find_path(PSP2SDK_PATH
-    NAMES
-        psp2.x
+    NAMES psp2.x
     HINTS
         $ENV{PSP2SDK}
         /opt/psp2sdk
+        /opt/devkitpro/devkitARM/psp2
 )

 find_program(PSP2SDK_FIXUP_BIN
-    NAMES
-        psp2-fixup
-    HINTS
-        ${PSP2SDK_PATH}
+    NAMES psp2-fixup
+    HINTS ${PSP2SDK_PATH}
     PATH_SUFFIXES bin
 )

 find_path(PSP2SDK_INCLUDE_DIR
-    NAMES
-        psp2/gxm.h
-    HINTS
-        ${PSP2SDK_PATH}
+    NAMES psp2/gxm.h
+    HINTS ${PSP2SDK_PATH}
     PATH_SUFFIXES include
 )


VFS-8828 Updated boost python cmake script

--- cmake/FindPython3.cmake
+++ cmake/FindPython3.cmake
@@ -37,6 +37,8 @@
     find_library(LIBBOOST_PYTHON3 NAMES boost_python-py35
                                         boost_python-py36
                                         boost_python-py37
+                                        boost_python-py38
+                                        boost_python-py39
                                         boost_python3
                                         libboost_python3.so.1.58.0
                                         libboost_python35.so.1.66.0
@@ -47,6 +49,8 @@
                                         libboost_python35.so.1.67.0
                                         libboost_python36.so.1.67.0
                                         libboost_python37.so.1.67.0
+                                        libboost_python37.so.1.77.0
+                                        libboost_python38.so.1.77.0
                                         libboost_python39.so.1.77.0)

     execute_process(COMMAND bash -c "cat /etc/os-release | grep ID_LIKE" OUTPUT_VARIABLE OS_ID_LIKE)


cmake: improve setting descriptions

cmake: improve setting descriptions

--- cmake/bvs-options.cmake
+++ cmake/bvs-options.cmake
@@ -6,26 +6,26 @@
 mark_as_advanced(BVS_ANDROID_APP)

 # BVS_GCC_VISIBILITY
-set(BVS_GCC_VISIBILITY ON CACHE BOOL "Enable gcc's visibility feature (reduce dynamic library load times as well as decrease library size).")
+set(BVS_GCC_VISIBILITY ON CACHE BOOL "Enable GCC's visibility feature (reduce library size and load time).")
 mark_as_advanced(BVS_GCC_VISIBILITY)

 # BVS_LOG_SYSTEM
-set(BVS_LOG_SYSTEM ON CACHE BOOL "Enable BVS builtin log system.")
+set(BVS_LOG_SYSTEM ON CACHE BOOL "Enable BVS' builtin log system.")

 # BVS_MODULE_HOTSWAP
-set(BVS_MODULE_HOTSWAP OFF CACHE BOOL "Enable BVS's HotSwap(TM;-) facilities. WARNING: DEVELOPERS ONLY!")
+set(BVS_MODULE_HOTSWAP OFF CACHE BOOL "Enable BVS's modular HotSwap(TM;-) facilities. WARNING: DEVELOPERS ONLY!")
 mark_as_advanced(BVS_MODULE_HOTSWAP)

 # BVS_STATIC_MODULES
-set(BVS_STATIC_MODULES OFF CACHE BOOL "Enable compilation of static modules and creation of single library object!")
+set(BVS_STATIC_MODULES OFF CACHE BOOL "Include modules in 'libbvs'!")
 mark_as_advanced(BVS_STATIC_MODULES)

 # BVS_THREAD_NAMES
-set(BVS_THREAD_NAMES ${UNIX} CACHE BOOL "Enable thread naming (htop: enable 'Show custom thread names', or try 'ps -La'). UNIX ONLY!")
+set(BVS_THREAD_NAMES ${UNIX} CACHE BOOL "Name threads (htop: enable 'Show custom thread names', or try 'ps -La'). UNIX ONLY!")
 mark_as_advanced(BVS_THREAD_NAMES)

 # BVS_OSX_ANOMALIES
-set(BVS_OSX_ANOMALIES ${APPLE} CACHE BOOL "Enable OSX anomalies, e.g. 'so->dylib'.")
+set(BVS_OSX_ANOMALIES ${APPLE} CACHE BOOL "Deal with OSX anomalies, e.g. 'so->dylib'.")
 mark_as_advanced(BVS_OSX_ANOMALIES)


always regenerate debian dir.

always regenerate debian dir.

--- cmake/debian-util.cmake
+++ cmake/debian-util.cmake
@@ -23,19 +23,10 @@
   endif()

   assert(CATKIN_ENV)
-  message("CATKIN_ENV IS NOW ${CATKIN_ENV}")
-  #
-  # Generate control file
-  #
-  add_custom_command(

-    OUTPUT
-    ${PROJECT_SOURCE_DIR}/debian/control
-    ${PROJECT_SOURCE_DIR}/debian/rules
-    ${PROJECT_SOURCE_DIR}/debian/changelog
-    ${PROJECT_SOURCE_DIR}/debian/copyright
+  add_custom_target(
+    ${PROJECT_NAME}-gendebian

-    COMMAND pwd
     COMMAND
     ${CATKIN_ENV}
     ${catkin_EXTRAS_DIR}/catkin_generate_debian.py
@@ -44,21 +35,6 @@
     ${catkin_EXTRAS_DIR}/em           # templates
     ${PROJECT_SOURCE_DIR}/debian      # outdir
     ${CMAKE_BINARY_DIR}
-
-    DEPENDS
-    ${PROJECT_SOURCE_DIR}/stack.yaml
-    ${catkin_EXTRAS_DIR}/catkin_generate_debian.py
-    ${catkin_EXTRAS_DIR}/em/control.em
-    ${catkin_EXTRAS_DIR}/em/rules.cmake.em
-    ${catkin_EXTRAS_DIR}/em/copyright.willowgarage.em
-    ${catkin_EXTRAS_DIR}/em/changelog.em
-
-    COMMENT "Shelling out..."
-    VERBATIM
-    )
-
-  add_custom_target(
-    ${PROJECT_NAME}-gendebian

     DEPENDS
     ${PROJECT_SOURCE_DIR}/debian/control


WRG: syntax correction to avoid warning

WRG: syntax correction to avoid warning

--- Packaging/patch_cmake_files.cmake
+++ Packaging/patch_cmake_files.cmake
@@ -62,13 +62,13 @@

   #patch for ABI compatibility
   if(EXISTS "${PATCH_STAGE_DIR}/UseOTB.cmake")
-    file(APPEND "${PATCH_STAGE_DIR}/UseOTB.cmake"
-      "\n# ABI compatibility
-      if ( CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 )
-          add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
-        endif()
-      endif()" )
+    file(APPEND "${PATCH_STAGE_DIR}/UseOTB.cmake"
+"\n\n# ABI compatibility \
+\nif ( CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\") \
+\n  if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 ) \
+\n    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) \
+\n  endif() \
+\nendif()" )
   endif()


Fix module triples for “ios-like” Mac Catalyst modules

The “ios-like” build flavor is used to build modules that do not exist on macOS for Mac Catalyst. Even though they are built for the “OSX” SDK, they need to have a “MACCATALYST”-style module triple; unfortunately, the transition to naming swiftmodules by module triple in #31170 did not handle this edge case correctly.

This commit handles that by piggybacking on a similar special case used to change the lib/swift subdirectory.

--- stdlib/cmake/modules/SwiftSource.cmake
+++ stdlib/cmake/modules/SwiftSource.cmake
@@ -362,13 +362,13 @@
       )

   # Determine the subdirectory where the binary should be placed.
+  set(library_subdir_sdk "${SWIFTFILE_SDK}")
+  if(maccatalyst_build_flavor STREQUAL "ios-like")
+    set(library_subdir_sdk "MACCATALYST")
+  endif()
+
   compute_library_subdir(library_subdir
-      "${SWIFTFILE_SDK}" "${SWIFTFILE_ARCHITECTURE}")
-
-  if(maccatalyst_build_flavor STREQUAL "ios-like")
-  	compute_library_subdir(library_subdir
-      "MACCATALYST" "${SWIFTFILE_ARCHITECTURE}")
-  endif()
+    "${library_subdir_sdk}" "${SWIFTFILE_ARCHITECTURE}")

   # If we have a custom module cache path, use it.
   if (SWIFT_MODULE_CACHE_PATH)
@@ -464,7 +464,7 @@
     list(APPEND swift_flags "-parse-as-library")

     set(module_base "${module_dir}/${SWIFTFILE_MODULE_NAME}")
-    set(module_triple ${SWIFT_SDK_${SWIFTFILE_SDK}_ARCH_${SWIFTFILE_ARCHITECTURE}_MODULE})
+    set(module_triple ${SWIFT_SDK_${library_subdir_sdk}_ARCH_${SWIFTFILE_ARCHITECTURE}_MODULE})
     if(SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS OR
        SWIFTFILE_SDK STREQUAL "MACCATALYST")
       set(specific_module_dir "${module_base}.swiftmodule")


nodejs build: fix MSVC Note

nodejs build: fix MSVC Note

Note: vcbuild no longer signs by default. "nosign" is redundant.
issue https://github.com/smanders/externpro/issues/272

--- projects/nodejs.cmake
+++ projects/nodejs.cmake
@@ -84,7 +84,7 @@
     endif()
   endif()
   if(MSVC)
-    set(XP_CONFIGURE_BASE vcbuild nosign)
+    set(XP_CONFIGURE_BASE vcbuild)
     set(XP_CONFIGURE_Release ${XP_CONFIGURE_BASE} release ${destcpu})
     set(XP_CONFIGURE_Debug ${XP_CONFIGURE_BASE} debug ${destcpu})
   elseif(UNIX)


BOOST_FOUND cmake variable, added to reqVars

--- projects/use/usexp-boost-config.cmake
+++ projects/use/usexp-boost-config.cmake
@@ -83,13 +83,19 @@
     set(_boost_COMPILER "-${_boost_COMPILER}")
   endif()
   find_package(Boost ${BOOST_VER} REQUIRED COMPONENTS ${Boost_LIBS})
+  set(${PRJ}_FOUND ${Boost_FOUND})
   set(${PRJ}_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
   set(${PRJ}_LIBRARIES ${Boost_LIBRARIES} ${syslibs})
-  set(reqVars ${PRJ}_INCLUDE_DIR ${PRJ}_LIBRARIES)
+  set(reqVars ${PRJ}_FOUND ${PRJ}_INCLUDE_DIR ${PRJ}_LIBRARIES)
 else()
   string(REPLACE "." "_" VER_ ${BOOST_VER2})
   set(${PRJ}_INCLUDE_DIR ${XP_ROOTDIR}/include/boost-${VER_})
-  set(reqVars ${PRJ}_INCLUDE_DIR)
+  if(EXISTS ${${PRJ}_INCLUDE_DIR} AND IS_DIRECTORY ${${PRJ}_INCLUDE_DIR})
+    set(${PRJ}_FOUND TRUE)
+  else()
+    set(${PRJ}_FOUND FALSE)
+  endif()
+  set(reqVars ${PRJ}_FOUND ${PRJ}_INCLUDE_DIR)
 endif()
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars})


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

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


BUG #13297: Don't enable modules needed only for tests.

Currently if a module is enabled, and its test module depends on additional
modules (specified using TEST_DEPENDS), then those modules are automatically
enabled. That's incorrect and causes issues with modules needing MPI being
enabled simply because a testing module needs it.

This patch fixes this issue. Instead of add test modules to the graph used for
building the depencies, we parse the tests separately, only enabling those that
have all their dependencies met.

Also added an advanced option VTK_BUILD_ALL_MODULES_FOR_TESTS (which is
available only when BUILD_TESTING is ON) that when set to ON (OFF by default)
can revert to old behavior i.e. enable test dependencies automatically.

Change-Id: I871a3cbef52aa0e030a0e3cf16446771a9404127

--- CMake/vtkModuleTop.cmake
+++ CMake/vtkModuleTop.cmake
@@ -58,6 +58,12 @@
 option(VTK_BUILD_ALL_MODULES "Request to build all modules" OFF)
 mark_as_advanced(VTK_BUILD_ALL_MODULES)

+include(CMakeDependentOption)
+cmake_dependent_option(VTK_BUILD_ALL_MODULES_FOR_TESTS
+  "Enable modules as needed for testing all the enabled modules" OFF
+  "BUILD_TESTING" OFF)
+mark_as_advanced(VTK_BUILD_ALL_MODULES_FOR_TESTS)
+
 # Provide an option for each module.
 foreach(vtk-module ${VTK_MODULES_ALL})
   if(NOT ${vtk-module}_IS_TEST)
@@ -83,9 +89,26 @@
       vtk_module_enable(${dep} ${vtk-module})
     endforeach()

-    foreach(test IN LISTS ${vtk-module}_TESTED_BY)
+    # If VTK_BUILD_ALL_MODULES_FOR_TESTS is true, then and then
+    # alone do we include the test modules in building build the dependency
+    # graph for enabled modules (BUG #13297).
+    if (VTK_BUILD_ALL_MODULES_FOR_TESTS)
+      foreach(test IN LISTS ${vtk-module}_TESTED_BY)
         vtk_module_enable(${test} "")
-    endforeach()
+      endforeach()
+    elseif (BUILD_TESTING)
+      # identify vtkTesting<> dependencies on the test module and enable them.
+      # this ensures that core testing modules such as vtkTestingCore,
+      # vtkTestingRendering which many test modules depend on, are automatically
+      # enabled.
+      foreach(test IN LISTS ${vtk-module}_TESTED_BY)
+        foreach(test-depends IN LISTS VTK_MODULE_${test}_DEPENDS)
+          if (test-depends MATCHES "^vtkTesting.*")
+            vtk_module_enable(${test-depends} "")
+          endif()
+        endforeach()
+      endforeach()
+    endif()
   endif()
 endmacro()

@@ -122,6 +145,31 @@
 # Order list to satisfy dependencies.
 include(CMake/TopologicalSort.cmake)
 topological_sort(VTK_MODULES_ENABLED VTK_MODULE_ _DEPENDS)
+
+if (NOT VTK_BUILD_ALL_MODULES_FOR_TESTS)
+  # If VTK_BUILD_ALL_MODULES_FOR_TESTS is OFF, it implies that we didn't add any
+  # test modules to the dependecy graph. We now add the test modules for all
+  # enabled modules iff the all the test dependecies are already satisfied
+  # (BUG #13297).
+  foreach(vtk-module IN LISTS VTK_MODULES_ENABLED)
+    foreach(test IN LISTS ${vtk-module}_TESTED_BY)
+      # if all test-dependencies are satisfied, enable it.
+      set (missing_dependencis)
+      foreach(test-depends IN LISTS VTK_MODULE_${test}_DEPENDS)
+        list(FIND VTK_MODULES_ENABLED ${test-depends} found)
+        if (found EQUAL -1)
+          list(APPEND missing_dependencis ${test-depends})
+        endif()
+      endforeach()
+      if (NOT missing_dependencis)
+        vtk_module_enable(${test} "")
+      else()
+        message(STATUS
+        "Disable test module ${test} since required modules are not enabled: ${missing_dependencis}")
+      endif()
+    endforeach()
+  endforeach()
+endif()

 # Report what will be built.
 set(_modules_enabled_alpha "${VTK_MODULES_ENABLED}")


COMP: Upgraded CTK to commit 9440d3c9

COMP: Upgraded CTK to commit 9440d3c9

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

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag b721b7ca)
+    set(revision_tag 9440d3c9)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -75,7 +75,7 @@
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
       #GIT_REPOSITORY https://github.com/commontk/CTK.git
       #GIT_TAG origin/master
-      URL_MD5 9ebeb78c78ff9f458045e0a5ecffc73f
+      URL_MD5 3b677395c36be4d00b40b569b76906b5
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


COMP: VCL constexpr patch is also needed for GCC 4.7.

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -55,7 +55,7 @@
   endif()

   set(vcl_constexpr_patch)
-  if(GCC_VERSION VERSION_LESS 4.7 AND GCC_VERSION VERSION_GREATER 4)
+  if(GCC_VERSION VERSION_LESS 4.8 AND GCC_VERSION VERSION_GREATER 4)
     set(vcl_constexpr_patch
       COMMAND ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/ITK-4.7.1-gcc-4.6.patch
     )


TBB supports VS2015 now, so check for that

--- projects/win32/tbb.cmake
+++ projects/win32/tbb.cmake
@@ -10,6 +10,8 @@
   set(tbb_vsdir vc11)
 elseif (MSVC12)
   set(tbb_vsdir vc12)
+elseif (MSVC14)
+  set(tbb_vsdir vc14)
 else ()
   message(FATAL_ERROR "tbb does not support your Visual Studio compiler; please use a system version.")
 endif ()


Update hunter.cmake

Update hunter.cmake

--- cmake/projects/Buffer/hunter.cmake
+++ cmake/projects/Buffer/hunter.cmake
@@ -3,6 +3,17 @@
 include(hunter_pick_scheme)

 # List of versions here...
+hunter_add_version(
+    PACKAGE_NAME
+    Buffer
+    VERSION
+    "0.1.2"
+    URL
+    "https://github.com/designerror/buffer/archive/v0.1.3.tar.gz"
+    SHA1
+    5993c1c9db4ee8b9eb5a8f8fb8623d675c5421a5
+)
+
 hunter_add_version(
     PACKAGE_NAME
     Buffer


Simplify flex/bison handling (#977)

Simplify flex/bison handling (#977)

Rely on CMake's own finding of flex/bison, simplifying our code to
just the helpful shortcut macro. Also make finding these REQUIRED,
which makes an easier-to-interpret error message than simply not
defining the macro.

--- src/cmake/flexbison.cmake
+++ src/cmake/flexbison.cmake
@@ -1,8 +1,7 @@
 # LG's macros for using flex and bison.
-# Merely including this file will set FLEX_EXECUTABLE and BISON_EXECUTABLE
-# to the locations of 'flex' and 'bison' on the system, and leave them
-# undefined if those programs were not found.
-# If both are found, there will also be a macro defined:
+# Merely including this file will require flex and bison to be found.
+#
+# The main purpose is to define the macro FLEX_BISON:
 #   FLEX_BISON ( flexsrc bisonsrc srclist compiler_headers )
 # where
 #   flexsrc = the name of the .l file
@@ -14,77 +13,48 @@
 #             for the .y and .l files.

-IF (NOT FLEX_EXECUTABLE)
-  if (NOT Flex_FIND_QUIETLY)
-    MESSAGE (STATUS "Looking for flex")
-  endif ()
-  FIND_PROGRAM (FLEX_EXECUTABLE flex)
-  IF (FLEX_EXECUTABLE)
-    if (NOT Flex_FIND_QUIETLY)
-      MESSAGE (STATUS "Looking for flex -- ${FLEX_EXECUTABLE}")
-    endif ()
-  ENDIF (FLEX_EXECUTABLE)
-ENDIF (NOT FLEX_EXECUTABLE)
+find_package (BISON REQUIRED)
+find_package (FLEX REQUIRED)

-IF (NOT BISON_EXECUTABLE)
-  if (NOT Bison_FIND_QUIETLY)
-    MESSAGE (STATUS "Looking for bison")
-  endif ()
-  FIND_PROGRAM (BISON_EXECUTABLE bison)
-  IF (BISON_EXECUTABLE)
-    if (NOT Bison_FIND_QUIETLY)
-      MESSAGE (STATUS "Looking for bison -- ${BISON_EXECUTABLE}")
-    endif ()
-  ENDIF (BISON_EXECUTABLE)
-ENDIF (NOT BISON_EXECUTABLE)
+if ( FLEX_EXECUTABLE AND BISON_EXECUTABLE )
+    macro ( FLEX_BISON flexsrc bisonsrc prefix srclist compiler_headers )
+        if (VERBOSE)
+            message (STATUS "FLEX_BISON flex=${flexsrc} bison=${bisonsrc} prefix=${prefix}")
+        endif ()
+        get_filename_component ( bisonsrc_we ${bisonsrc} NAME_WE )
+        set ( bisonoutputcxx "${CMAKE_CURRENT_BINARY_DIR}/${bisonsrc_we}.cpp" )
+        set ( bisonoutputh "${CMAKE_CURRENT_BINARY_DIR}/${bisonsrc_we}.h" )

-
-IF ( FLEX_EXECUTABLE AND BISON_EXECUTABLE )
-    MACRO ( FLEX_BISON flexsrc bisonsrc prefix srclist compiler_headers )
-        if (VERBOSE)
-            MESSAGE (STATUS "FLEX_BISON flex=${flexsrc} bison=${bisonsrc} prefix=${prefix}")
-        endif ()
-        #MESSAGE (STATUS "  src ${CMAKE_CURRENT_SOURCE_DIR}")
-        #MESSAGE (STATUS "  bin ${CMAKE_CURRENT_BINARY_DIR}")
-        GET_FILENAME_COMPONENT ( bisonsrc_we ${bisonsrc} NAME_WE )
-        SET ( bisonoutputcxx "${CMAKE_CURRENT_BINARY_DIR}/${bisonsrc_we}.cpp" )
-        SET ( bisonoutputh "${CMAKE_CURRENT_BINARY_DIR}/${bisonsrc_we}.h" )
-        # MESSAGE (STATUS "  bison output ${bisonoutputcxx} ${bisonoutputh}")
-
-        GET_FILENAME_COMPONENT ( flexsrc_we ${flexsrc} NAME_WE )
-        SET ( flexoutputcxx "${CMAKE_CURRENT_BINARY_DIR}/${flexsrc_we}.cpp" )
-        # MESSAGE (STATUS "  flex output ${flexoutputcxx}")
-
-        SET ( ${srclist} ${${srclist}} ${bisonoutputcxx} ${flexoutputcxx} )
-        # MESSAGE (STATUS "  src list now ${${srclist}}")
-        # MESSAGE (STATUS "  compiler headers = ${${compiler_headers}}")
+        get_filename_component ( flexsrc_we ${flexsrc} NAME_WE )
+        set ( flexoutputcxx "${CMAKE_CURRENT_BINARY_DIR}/${flexsrc_we}.cpp" )
+        set ( ${srclist} ${${srclist}} ${bisonoutputcxx} ${flexoutputcxx} )

         # Be really sure that we prefer the FlexLexer.h that comes with
         # the flex binary we're using, not some other one in the system.
-        GET_FILENAME_COMPONENT ( FLEX_UP ${FLEX_EXECUTABLE} PATH )
-        GET_FILENAME_COMPONENT ( FLEX_UP_UP ${FLEX_UP} PATH )
-        SET ( FLEX_INCLUDE_DIR "${FLEX_UP_UP}/include" )
+        get_filename_component ( FLEX_UP ${FLEX_EXECUTABLE} PATH )
+        get_filename_component ( FLEX_UP_UP ${FLEX_UP} PATH )
+        set ( FLEX_INCLUDE_DIR "${FLEX_UP_UP}/include" )
         if (VERBOSE)
-            MESSAGE (STATUS "Flex include dir = ${FLEX_INCLUDE_DIR}")
+            message (STATUS "Flex include dir = ${FLEX_INCLUDE_DIR}")
         endif ()
-        INCLUDE_DIRECTORIES ( ${FLEX_INCLUDE_DIR} )
+        include_directories ( ${FLEX_INCLUDE_DIR} )

-        INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_BINARY_DIR} )
-        INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_SOURCE_DIR} )
-        ADD_CUSTOM_COMMAND ( OUTPUT ${bisonoutputcxx}
+        # include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
+        include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} )
+        add_custom_command ( OUTPUT ${bisonoutputcxx}
           COMMAND ${BISON_EXECUTABLE} -dv -p ${prefix} -o ${bisonoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${bisonsrc}"
           MAIN_DEPENDENCY ${bisonsrc}
           DEPENDS ${${compiler_headers}}
           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
         if ( WINDOWS )
-            SET ( WINCOMPAT --wincompat )
+            set ( FB_WINCOMPAT --wincompat )
         else ()
-            SET ( WINCOMPAT )
+            set ( FB_WINCOMPAT )
         endif ()
-        ADD_CUSTOM_COMMAND ( OUTPUT ${flexoutputcxx}
-          COMMAND ${FLEX_EXECUTABLE} ${WINCOMPAT} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
+        add_custom_command ( OUTPUT ${flexoutputcxx}
+          COMMAND ${FLEX_EXECUTABLE} ${FB_WINCOMPAT} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
           MAIN_DEPENDENCY ${flexsrc}
           DEPENDS ${${compiler_headers}}
           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
-      ENDMACRO ()
-ENDIF ()
+    endmacro ()
+endif ()


BUG: use xdk\share\proj instead of xdk\share for PROJ_LIB dir

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -39,7 +39,7 @@
   set(ENV{PATH} "${XDK_PATH_NATIVE}\\bin;$ENV{PATH}" )
   set(ENV{PATH} "$ENV{PATH};${XDK_PATH_NATIVE}\\lib" )
   set(ENV{GDAL_DATA} "${XDK_PATH_NATIVE}\\data" )
-  set(ENV{PROJ_LIB} "${XDK_PATH_NATIVE}\\share" )
+  set(ENV{PROJ_LIB} "${XDK_PATH_NATIVE}\\share\\proj" )
   # needed to load Qt plugins for testing, not for binary packages where we use a qt.conf file
   set(ENV{QT_PLUGIN_PATH} "${XDK_PATH_NATIVE}\\plugins")
   set( CTEST_ENVIRONMENT


Fix the link for TBB

Fix the link for TBB

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -146,7 +146,7 @@

 # ThreadingBuildingBlocks
 find_package(TBB)
-macro_log_feature(TBB_FOUND "tbb" "Threading Building Blocks" "http://openttb.org/" FALSE "" "")
+macro_log_feature(TBB_FOUND "tbb" "Threading Building Blocks" "http://www.threadingbuildingblocks.org/" FALSE "" "")


Update boost to next release version 1.56.


Update boost to next release version 1.56.

--HG--
branch : v2-0


COMP: ExternalProject XIP is now built with HAS_{VTK,ITK} set to OFF

--- CMakeExternals/XIP.cmake
+++ CMakeExternals/XIP.cmake
@@ -14,5 +14,7 @@
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
       ${ep_common_args}
+      -DHAS_VTK:BOOL=OFF
+      -DHAS_ITK:BOOL=OFF
     )
 ENDIF()


Fix system lib path in cmake file

Fix system lib path in cmake file

--- config.cmake
+++ config.cmake
@@ -26,6 +26,6 @@
 include_directories(${BSON_INCLUDE_DIR})

 HHVM_EXTENSION(mongo src/ext_mongo.cpp src/mongo_common.cpp src/MongoClient.cpp src/MongoCursor.cpp src/MongoCollection.cpp src/bson.cpp src/bson_decode.cpp src/contrib/encode.cpp)
-HHVM_SYSTEMLIB(mongo ext_mongo.php)
+HHVM_SYSTEMLIB(mongo src/ext_mongo.php)

 target_link_libraries(mongo ${MONGOC_LIBRARY})


common.cmake: bugfix & refactoring

common.cmake: bugfix & refactoring

--- common.cmake
+++ common.cmake
@@ -1,3 +1,7 @@
+# It's a CMake code snippet I use in all of my CMake projects.
+# It makes targets link the runtime statically by default + strips debug
+# symbols in release builds.
+
 get_directory_property(parent_directory PARENT_DIRECTORY)
 set(is_root_project $<NOT:parent_directory>)

@@ -17,9 +21,13 @@
 set(CMAKE_CXX_EXTENSIONS OFF)

 function(use_static_runtime_msvc target)
-    target_compile_options("${target}" PRIVATE
-        $<$<CONFIG:Debug>:/MTd>
-        $<$<NOT:$<CONFIG:Debug>>:/MT>)
+    get_target_property(target_type "${target}" TYPE)
+    if(target_type STREQUAL INTERFACE_LIBRARY)
+    else()
+        target_compile_options("${target}" PRIVATE
+            $<$<CONFIG:Debug>:/MTd>
+            $<$<NOT:$<CONFIG:Debug>>:/MT>)
+    endif()
 endfunction()

 function(use_static_runtime_gcc target)
@@ -40,8 +48,12 @@
 endfunction()

 function(strip_symbol_table_gcc target)
-    target_link_libraries("${target}" PRIVATE
-        $<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>:-s>)
+    get_target_property(target_type "${target}" TYPE)
+    set(release_build $<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>)
+    if(target_type STREQUAL INTERFACE_LIBRARY)
+    else()
+        target_link_libraries("${target}" PRIVATE $<${release_build}:-s>)
+    endif()
 endfunction()

 function(strip_symbol_table target)
@@ -53,23 +65,26 @@
     endif()
 endfunction()

+function(apply_common_settings target)
+    if(TARGET "${target}")
+        get_target_property(target_imported "${target}" IMPORTED)
+        if(target_imported STREQUAL NOTFOUND OR NOT target_imported)
+            if(STRIP_SYMBOL_TABLE)
+                strip_symbol_table("${target}")
+            endif()
+            if(USE_STATIC_RUNTIME)
+                use_static_runtime("${target}")
+            endif()
+        endif()
+    endif()
+endfunction()
+
 macro(add_executable target)
     _add_executable(${ARGV})
-    if(TARGET "${target}")
-        if(USE_STATIC_RUNTIME)
-            use_static_runtime("${target}")
-        endif()
-        if(STRIP_SYMBOL_TABLE)
-            strip_symbol_table("${target}")
-        endif()
-    endif()
+    apply_common_settings("${target}")
 endmacro()

 macro(add_library target)
     _add_library(${ARGV})
-    if(TARGET "${target}")
-        if(USE_STATIC_RUNTIME)
-            use_static_runtime("${target}")
-        endif()
-    endif()
+    apply_common_settings("${target}")
 endmacro()


COMP: Remove gold linker support

COMP: Remove gold linker support

Deprecated and does conflicts with LTO. Closes #1952

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -328,29 +328,6 @@
       set(ITK_REQUIRED_CXX_FLAGS "${ITK_REQUIRED_CXX_FLAGS} -Wno-array-bounds")
     endif()

-    if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
-      set(_safe_cmake_required_flags "${CMAKE_REQUIRED_FLAGS}")
-      set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fuse-ld=gold")
-      CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" have_gold)
-      set(CMAKE_REQUIRED_FLAGS "${_safe_cmake_required_flags}")
-      if(have_gold)
-        set(_use_gold_linker_default ON)
-        set(_gold_linker_failure_condition_0 "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0")
-        set(_gold_linker_failure_condition_1  NOT BUILD_SHARED_LIBS AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_EQUAL "4.9.0")
-        if( (${_gold_linker_failure_condition_0}) OR (${_gold_linker_failure_condition_1}) )
-          set(_use_gold_linker_default OFF)
-        endif()
-        option(ITK_USE_GOLD_LINKER "Use the gold linker instead of ld." ${_use_gold_linker_default})
-        mark_as_advanced(ITK_USE_GOLD_LINKER)
-        # The gold linker is approximately 3X faster.
-        if(ITK_USE_GOLD_LINKER)
-          set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=gold ${CMAKE_EXE_LINKER_FLAGS}")
-          set(CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=gold ${CMAKE_MODULE_LINKER_FLAGS}")
-          set(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=gold ${CMAKE_SHARED_LINKER_FLAGS}")
-        endif()
-      endif()
-    endif()
-
     if(APPLE)
       option(ITK_USE_64BITS_APPLE_TRUNCATION_WARNING "Turn on warnings on 64bits to 32bits truncations." OFF)
       mark_as_advanced(ITK_USE_64BITS_APPLE_TRUNCATION_WARNING)


REGEX REPLACE -> std REPLACE

REGEX REPLACE -> std REPLACE

--- CMakeExternals/PatchGDCM-20130814.cmake
+++ CMakeExternals/PatchGDCM-20130814.cmake
@@ -5,7 +5,7 @@
 file(STRINGS Source/MediaStorageAndFileFormat/gdcmSorter.cxx sourceCode NEWLINE_CONSUME)

 # Changing the way gdcmSorter.cxx behaves when encountering an unreadable file
-string(REGEX REPLACE "f = NULL;" "std::cerr << "Err: File could not be read: " << it->c_str() << std::endl;\n return false;" sourceCode ${sourceCode})
+string(REPLACE "f = NULL;" "std::cerr << \"Err: File could not be read: \" << it->c_str() << std::endl; \n      return false;" sourceCode ${sourceCode})

 # set variable CONTENTS, which is substituted in TEMPLATE_FILE
 set(CONTENTS ${sourceCode})


revised nightly test script

revised nightly test script

--- ctest/TEMPLATE-ctest-nightly.cmake
+++ ctest/TEMPLATE-ctest-nightly.cmake
@@ -42,8 +42,6 @@
     set(CTEST_TRACK "MinVR ${DASHBOARD_TEST_NAME}")
     set(CTEST_BUILD_NAME "${CMAKE_HOST_SYSTEM} ${CTEST_BUILD_CONFIGURATION} [${CTEST_GIT_BRANCH}]")

-    #set(CTEST_BUILD_NAME "MinVR_${DASHBOARD_TEST_NAME}_${CMAKE_HOST_SYSTEM}_${CTEST_BUILD_CONFIGURATION}")
-
     set(CTEST_USE_LAUNCHERS 1)

     find_program(CTEST_GIT_COMMAND NAMES git)
@@ -56,13 +54,12 @@
     message("\n1. ctest_start()")
     ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
     ctest_start("${CTEST_MODEL}" TRACK ${CTEST_TRACK})
-    #ctest_start("${CTEST_MODEL}")

     # Step 2: ctest_update()
     message("\n2. ctest_update()")
     ctest_update(RETURN_VALUE exitcode)
     ctest_submit(PARTS Update)
-    if("${exitcode}" STREQUAL "0")
+    if(NOT "${exitcode}" STREQUAL "-1")

         # Step 3: ctest_configure()
         message("\n3. ctest_configure()")
@@ -110,11 +107,8 @@
     set(CTEST_SOURCE_DIRECTORY "${DASHBOARD_DIR}/MinVR_${DASHBOARD_TEST_NAME}/src/examples/${EXAMPLE_NAME}")
     set(CTEST_BINARY_DIRECTORY "${DASHBOARD_DIR}/MinVR_${DASHBOARD_TEST_NAME}/build/examples/${EXAMPLE_NAME}")

-
     set(CTEST_TRACK "${EXAMPLE_NAME} ${DASHBOARD_TEST_NAME}")
     set(CTEST_BUILD_NAME "${CMAKE_HOST_SYSTEM} ${CTEST_BUILD_CONFIGURATION} [${CTEST_GIT_BRANCH}]")
-
-    #set(CTEST_BUILD_NAME "${EXAMPLE_NAME}_${DASHBOARD_TEST_NAME}_${CMAKE_HOST_SYSTEM}_${CTEST_BUILD_CONFIGURATION}")

     set(CTEST_USE_LAUNCHERS 1)

@@ -127,13 +121,12 @@
     message("\n1. ctest_start()")
     ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
     ctest_start("${CTEST_MODEL}" TRACK ${CTEST_TRACK})
-    #ctest_start("${CTEST_MODEL}")

     # Step 2: ctest_update()
     message("\n2. ctest_update()")
     ctest_update(RETURN_VALUE exitcode)
     ctest_submit(PARTS Update)
-    if("${exitcode}" STREQUAL "0")
+    if(NOT "${exitcode}" STREQUAL "-1")

         # Step 3: ctest_configure()
         message("\n3. ctest_configure()")


Timo's fix for cmake output.

Timo's fix for cmake output.

git-svn-id: 25ef932062c7d454eca13bcaa0e2d6c96abd0655@29716 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_finalize.cmake
+++ deal.II/cmake/setup_finalize.cmake
@@ -189,6 +189,8 @@
       ELSE()
         _both("#        ${_var} set up with bundled packages\n")
       ENDIF()
+    ELSE()
+     _both("#        ${_var} = ${${_var}}\n")
     ENDIF()
   ELSE()
     # FEATURE is disabled


SuperBuild: update cmake flags for msvc

SuperBuild: update cmake flags for msvc

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -105,13 +105,13 @@
   ADD_SUPERBUILD_CMAKE_VAR(OTB JPEG_LIBRARY)
 endif()

-if(MSVC)
-  set(_CXX_FLAGS )
-endif()
-
 # forward compilation flags
 set(OTB_SB_C_FLAGS "${SB_PRIOR_INCLUDE_FLAGS} ${CMAKE_C_FLAGS} ")
-set(OTB_SB_CXX_FLAGS "${SB_PRIOR_INCLUDE_FLAGS} ${CMAKE_CXX_FLAGS} /EHsc /DNOMINMAX")
+set(OTB_SB_CXX_FLAGS "${SB_PRIOR_INCLUDE_FLAGS} ${CMAKE_CXX_FLAGS}")
+
+if(MSVC)
+  set(OTB_SB_CXX_FLAGS "${OTB_SB_CXX_FLAGS} /EHsc /DNOMINMAX")
+endif()

 set(OTB_SB_COMPILATION_FLAGS
   -DCMAKE_C_FLAGS:STRING=${OTB_SB_C_FLAGS}


Made Boost_LIB_DIAGNOSTIC_DEFINITIONS an advanced option.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@1313 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/FindBoost.cmake
+++ library/FindBoost.cmake
@@ -210,6 +210,7 @@
     # BOOST_LIB_DIAGNOSTIC will cause the auto-linking code to emit a #pragma message each time
     # a library is selected for linking.
     SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define")
+    MARK_AS_ADVANCED(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
   ENDIF(WIN32)


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -24,6 +24,7 @@
 Name[ug]=مۇڭداشقۇ
 Name[uk]=Миттєвий обмін повідомленнями
 Name[x-test]=xxInstant Messagingxx
+Name[zh_CN]=即时通讯
 Name[zh_TW]=即時訊息
 Comment=Start a chat with any of your IM contacts or change your IM status
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
@@ -49,6 +50,7 @@
 Comment[sv]=Börja chatta med någon direktmeddelandekontakt eller ändra din direktmeddelandestatus
 Comment[uk]=Почати спілкування з будь-яким з ваших контактів або змінити ваш запис стану у системах обміну повідомленнями
 Comment[x-test]=xxStart a chat with any of your IM contacts or change your IM statusxx
+Comment[zh_CN]=与任意您的即时通讯联系人开始聊天或修改您的状态
 Comment[zh_TW]=與您的即時訊息聯絡人開始聊天，或是變更您的即時訊息狀態
 Icon=user-online


add VSX identifier

add VSX identifier

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -424,6 +424,8 @@
   ei_is_64bit_env(IS_64BIT_ENV)
   if(EIGEN_TEST_NEON)
     set(${VAR} NEON)
+  elseif(EIGEN_TEST_VSX)
+    set(${VAR} VSX)
   elseif(EIGEN_TEST_ALTIVEC)
     set(${VAR} ALVEC)
   elseif(EIGEN_TEST_FMA)


[cmake] Remove deadcode

[cmake] Remove deadcode

CMake minimal version is already 3.13 in Radium-Engine/CMakeLists.txt

--- cmake/externalFunc.cmake
+++ cmake/externalFunc.cmake
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 3.12)
+
 include(ExternalInclude)

 macro(addExternalFolder NAME FOLDER )
@@ -47,27 +49,11 @@
             message(STATUS "[addExternalFolder] Enable compatibility mode for Xcode Generator")
         endif ()

-        if (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.12)
-            execute_process(
-                    COMMAND ${CMAKE_COMMAND} --build . -j ${RADIUM_BUILD_EXTERNAL_PARALLEL_LEVEL} --config ${CMAKE_BUILD_TYPE} --target ${RadiumExternalMakeTarget}
-                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external
-                    RESULT_VARIABLE ret
-            )
-        else ()
-            set(TOOL_OPTIONS "")
-            if( ${generator_lower} MATCHES "|makefile|" OR ${generator_lower} MATCHES "|ninja|" )
-              set( TOOL_OPTIONS -- -j${RADIUM_BUILD_EXTERNAL_PARALLEL_LEVEL} )
-            elseif( ${generator_lower} MATCHES "|visual|" )
-              set( TOOL_OPTIONS -- /m )
-            else()
-              message(WARNING "[addExternalFolder] Parallel build are not supported with your generator ${CMAKE_GENERATOR}")
-            endif()
-            execute_process(
-              COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${RadiumExternalMakeTarget} ${TOOL_OPTIONS}
-              WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external
-              RESULT_VARIABLE ret
-              )
-        endif()
+        execute_process(
+                COMMAND ${CMAKE_COMMAND} --build . -j ${RADIUM_BUILD_EXTERNAL_PARALLEL_LEVEL} --config ${CMAKE_BUILD_TYPE} --target ${RadiumExternalMakeTarget}
+                WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/external
+                RESULT_VARIABLE ret
+        )

         if(NOT ret EQUAL "0")
             message( FATAL_ERROR "[addExternalFolder] Cmake build step failed. ")


CMake: added \bigobj by default for VS closes inviwo/inviwo-dev#742

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -191,6 +191,7 @@
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ym0x20000000")
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm512")
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
 	ENDIF(MSVC)
 ENDIF()


add missing tarball cmake file

add missing tarball cmake file


add function stm32_print_size_of_target

add function stm32_print_size_of_target

--- cmake/stm32/common.cmake
+++ cmake/stm32/common.cmake
@@ -41,6 +41,12 @@
 find_program(CMAKE_SIZE NAMES ${STM32_TARGET_TRIPLET}-size PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)
 find_program(CMAKE_DEBUGGER NAMES ${STM32_TARGET_TRIPLET}-gdb PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)
 find_program(CMAKE_CPPFILT NAMES ${STM32_TARGET_TRIPLET}-c++filt PATHS ${TOOLCHAIN_BIN_PATH} NO_DEFAULT_PATH)
+
+FUNCTION(stm32_print_size_of_target TARGET)
+    # this target is always considered out of date so size will always be displayed on build
+    ADD_CUSTOM_TARGET(${TARGET}_size ALL COMMAND ${CMAKE_SIZE} ${TARGET}${CMAKE_EXECUTABLE_SUFFIX_C}
+                                                        DEPENDS ${TARGET}${CMAKE_EXECUTABLE_SUFFIX_C})
+ENDFUNCTION()

 function(stm32_get_chip_type FAMILY DEVICE TYPE)
     set(INDEX 0)


Add Emscripten 'aggessive variable elimination' flag on Release build.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -744,6 +744,7 @@
         set (MEMORY_LINKER_FLAGS "-s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY}")
     endif ()
     set (${LINKER_FLAGS} "${${LINKER_FLAGS}} ${MEMORY_LINKER_FLAGS} -s USE_SDL=2 -s ERROR_ON_UNDEFINED_SYMBOLS=1")    # Urho3D uses SDL2 so set it here instead of in the toolchain which potentially could be reused in other projects not using SDL2
+    set (${LINKER_FLAGS}_RELEASE "-s AGGRESSIVE_VARIABLE_ELIMINATION=1")     # Remove variables to make the -O3 regalloc easier
     if (NOT DEFINED ENV{CI})
         set (${LINKER_FLAGS}_DEBUG -g4)     # Preserve LLVM debug information, show line number debug comments, and generate source maps
     endif ()


Fix the problem of enabling C++11 standard for MinGW on Windows host.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -478,11 +478,11 @@

 # Platform and compiler specific options
 if (URHO3D_C++11)
-    add_definitions (-DURHO3D_CPP11)   # Note the define is NOT 'URHO3D_C++11'!
+    add_definitions (-DURHO3D_CXX11)   # Note the define is NOT 'URHO3D_C++11'!
     if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
         # Use gnu++11/gnu++0x instead of c++11/c++0x as the latter does not work as expected when cross compiling
         foreach (STANDARD gnu++11 gnu++0x)  # Fallback to gnu++0x on older GCC version
-            execute_process (COMMAND echo COMMAND ${CMAKE_CXX_COMPILER} -std=${STANDARD} -E - RESULT_VARIABLE GCC_EXIT_CODE OUTPUT_QUIET ERROR_QUIET)
+            execute_process (COMMAND ${CMAKE_COMMAND} -E echo COMMAND ${CMAKE_CXX_COMPILER} -std=${STANDARD} -E - RESULT_VARIABLE GCC_EXIT_CODE OUTPUT_QUIET ERROR_QUIET)
             if (GCC_EXIT_CODE EQUAL 0)
                 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=${STANDARD}")
                 break ()


pass unparsed arguments to hunter gate

pass unparsed arguments to hunter gate

--- scripts/AddHunter.cmake
+++ scripts/AddHunter.cmake
@@ -27,7 +27,7 @@
   if(ih_LOCAL)
     set(local LOCAL)
   endif()
-  HunterGate(URL ${ih_URL} SHA1 ${ih_SHA1} ${local})
+  HunterGate(URL ${ih_URL} SHA1 ${ih_SHA1} ${local} ${ih_UNPARSED_ARGUMENTS})
   if(NOT ih_NO_COOKOFF_RECIPES)
     set(HUNTER_REPOSITORY_cookoff_DIRECTORY ${GREAT_CMAKE_COOKOFF_HUNTER_RECIPES_DIR})
     set(HUNTER_REPOSITORY_cookoff_URL "local")


FindPythonModules: use a function

FindPythonModules: use a function

Prevent unnecessary scope pollution.

Change-Id: If268d5fcbcf4edd7b5dcac62fa567ca4cf634082

--- CMake/FindPythonModules.cmake
+++ CMake/FindPythonModules.cmake
@@ -1,7 +1,7 @@

 # Check whether a Python module is available by name, and if it is,
 # define a variable in the internal cache.
-macro(_find_python_module_internal module_name)
+function(_find_python_module_internal module_name)
   # Check for presence of the module.  Even though we don't use all the
   # variable names set here, assigning them suppresses their output in CMake.
   execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import ${module_name}"
@@ -10,18 +10,16 @@
     ERROR_VARIABLE IMPORT_${module_name}_ERROR
     )
   if(${IMPORT_${module_name}_EXITCODE} EQUAL 0)
-    set(PYTHON_MODULE_${module_name}_FOUND TRUE
-      CACHE BOOL "Whether or not this Python module is present")
+    set(PYTHON_MODULE_${module_name}_FOUND TRUE PARENT_SCOPE)
   else()
-    set(PYTHON_MODULE_${module_name}_FOUND FALSE
-      CACHE BOOL "Whether or not this Python module is present")
+    set(PYTHON_MODULE_${module_name}_FOUND FALSE PARENT_SCOPE)
   endif()
-endmacro()
+endfunction()

-# Macro to simplify checking if a Python module is available
-macro(find_python_module module_name result)
+# Function to simplify checking if a Python module is available
+function(find_python_module module_name result)
   if(NOT DEFINED PYTHON_MODULE_${module_name}_FOUND)
     _find_python_module_internal(${module_name})
   endif()
-  set(${result} ${PYTHON_MODULE_${module_name}_FOUND})
-endmacro()
+  set(${result} ${PYTHON_MODULE_${module_name}_FOUND} PARENT_SCOPE)
+endfunction()


Create symlinks to MitkCore auto-load modules

--- CMake/FixMacOSInstaller.cmake
+++ CMake/FixMacOSInstaller.cmake
@@ -1,5 +1,9 @@
 set(bundle_path "${CMAKE_INSTALL_PREFIX}/${_bundle_dest_dir}/../..")
 get_filename_component(bundle_path ${bundle_path} REALPATH)
+
+#############################
+# (1) Fix Qt-related issues #
+#############################

 # Compile list of Qt frameworks in bundle
 unset(qt_frameworks)
@@ -35,3 +39,14 @@
 set(app_path "${bundle_path}/Contents/MacOS/${app}")
 execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../Frameworks" ${app_path} ERROR_QUIET)
 execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../../../../.." ${qtwebengineprocess_path} ERROR_QUIET)
+
+##################################################
+# (2) Fix hard dependencies to auto-load modules #
+##################################################
+
+# Create symlinks to auto-load modules in MitkCore directory
+file(GLOB autoload_module_paths "${bundle_path}/Contents/MacOS/MitkCore/*.dylib")
+foreach(autoload_module_path ${autoload_module_paths})
+  get_filename_component(autoload_module ${autoload_module_path} NAME)
+  execute_process(COMMAND ln -s MitkCore/${autoload_module} WORKING_DIRECTORY "${bundle_path}/Contents/MacOS")
+endforeach()


CMake: another OSX fix for FindOgre

CMake: another OSX fix for FindOgre

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -406,7 +406,7 @@
   # find link libraries for plugins
   set(OGRE_${PLUGIN}_LIBRARY_NAMES "${PLUGIN}${OGRE_LIB_SUFFIX}")
   get_debug_names(OGRE_${PLUGIN}_LIBRARY_NAMES)
-  set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
+  #set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
   find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
     HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt release release/opt relwithdebinfo relwithdebinfo/opt minsizerel minsizerel/opt)
   find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}


fix TBB/clang incompatibility and add ENABLE_TBB cmake option

(off by default)

--- CMake/hoomd/HOOMDCommonLibsSetup.cmake
+++ CMake/hoomd/HOOMDCommonLibsSetup.cmake
@@ -17,20 +17,37 @@
     endif (DL_LIB AND UTIL_LIB)
 endif (UNIX AND NOT APPLE)

-# find TBB lib and includes
-find_library(TBB_LIBRARY tbb
-             PATHS ENV TBB_LINK)
-find_path(TBB_INCLUDE_DIR tbb/tbb.h
-          PATHS ENV TBB_INC)
-include_directories(${TBB_INCLUDE_DIR})
-if (TBB_LIBRARY)
-    mark_as_advanced(TBB_LIBRARY)
+option(ENABLE_TBB "Enable support for Threading Building Blocks (TBB)" off)
+
+if(ENABLE_TBB)
+    # find TBB lib and includes
+    find_library(TBB_LIBRARY tbb
+                 PATHS ENV TBB_LINK)
+    find_path(TBB_INCLUDE_DIR tbb/tbb.h
+              PATHS ENV TBB_INC)
+    include_directories(${TBB_INCLUDE_DIR})
+    if (TBB_LIBRARY)
+        mark_as_advanced(TBB_LIBRARY)
+    endif()
+    if (TBB_INCLUDE_DIR)
+        mark_as_advanced(TBB_INCLUDE_DIR)
+    endif()
+    if (TBB_INCLUDE_DIR AND TBB_LIBRARY)
+        add_definitions(-DENABLE_TBB)
+    endif()
+
+    # Detect clang and fix incompatiblity with TBB
+    # https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
+    if (NOT TBB_USE_GLIBCXX_VERSION AND UNIX AND NOT APPLE)
+      if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+        # using Clang
+        string(REPLACE "." "0" TBB_USE_GLIBCXX_VERSION ${CMAKE_CXX_COMPILER_VERSION})
+      endif()
+    endif()
 endif()
-if (TBB_INCLUDE_DIR)
-    mark_as_advanced(TBB_INCLUDE_DIR)
-endif()
-if (TBB_INCLUDE_DIR AND TBB_LIBRARY)
-    add_definitions(-DENABLE_TBB)
+
+if (TBB_USE_GLIBCXX_VERSION)
+   add_definitions(-DTBB_USE_GLIBCXX_VERSION=${TBB_USE_GLIBCXX_VERSION})
 endif()

 set(HOOMD_COMMON_LIBS


Adapted MITK-Data hash

Adapted MITK-Data hash

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag 4259856b)
+  set(revision_tag f31f5df7)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Attemt to (un)set R__EXTERN_LLVMDIR through CMake

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@45737 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -326,6 +326,8 @@
 set(haslzmacompression ${has${lzma}})
 set(hascocoa ${has${cocoa}})
 set(usec++11 ${has${c++11}})
+set(hasllvm undef)
+set(llvmdir /**/)

 #---root-config----------------------------------------------------------------------------------------------
 ROOT_SHOW_OPTIONS(features)


refs #5485 fix gcov linking

refs #5485 fix gcov linking

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@48037 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -197,7 +197,7 @@
     foreach(lib ${ARGN})
       add_space_separated_property(TARGET ${lib} COMPILE_FLAGS --coverage)
       add_space_separated_property(TARGET ${lib} LINK_FLAGS --coverage)
-      target_link_libraries(${lib} LINK_INTERFACE_LIBRARIES_DEBUG gcov)
+      target_link_libraries(${lib} LINK_INTERFACE_LIBRARIES gcov)
     endforeach(lib)
   endif (USE_GCOV)
 endfunction(maybe_add_gcov_to_libraries)


Fixed Ant search (Android build)

Fixed Ant search (Android build)

--- cmake/OpenCVDetectApacheAnt.cmake
+++ cmake/OpenCVDetectApacheAnt.cmake
@@ -1,10 +1,18 @@
 file(TO_CMAKE_PATH "$ENV{ANT_DIR}" ANT_DIR_ENV_PATH)
 file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles_ENV_PATH)

-find_host_program(ANT_EXECUTABLE NAMES ant.bat ant
-  PATHS "${ANT_DIR_ENV_PATH}/bin"
-        "${ProgramFiles_ENV_PATH}/apache-ant/bin"
+if(WIN32)
+  set(ANT_NAME ant.bat)
+else()
+  set(ANT_NAME ant)
+endif()
+
+find_host_program(ANT_EXECUTABLE NAMES ${ANT_NAME}
+  PATHS "${ANT_DIR_ENV_PATH}/bin" "${ProgramFiles_ENV_PATH}/apache-ant/bin"
+  NO_DEFAULT_PATH
   )
+
+find_host_program(ANT_EXECUTABLE NAMES ${ANT_NAME})

 if(ANT_EXECUTABLE)
   execute_process(COMMAND ${ANT_EXECUTABLE} -version


Also silence implicit-fallthrough for C.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -147,6 +147,7 @@
 elseif(CMAKE_COMPILER_IS_GNUCXX)
   if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-implicit-fallthrough -Wno-noexcept-type")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-implicit-fallthrough")
   endif()
 endif()


More clang warning flags

More clang warning flags

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -111,7 +111,7 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
   endif()
   if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion")
   endif()
 endif()


From Lorenzo:
avoid to run script for preparing environment for rootcint, since the
script is not always copied in ROOTSYS/bin.

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@41749 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -58,7 +58,8 @@
   if(WIN32)
     set(rootcint_cmd rootcint)
   else()
-    set(rootcint_cmd ${ROOTSYS}/bin/setenvwrap.csh ${ld_library_path}=${ROOTSYS}/lib ${ROOTSYS}/bin/rootcint)
+    set(rootcint_cmd rootcint)
+#    set(rootcint_cmd ${ROOTSYS}/bin/setenvwrap.csh ${ld_library_path}=${ROOTSYS}/lib ${ROOTSYS}/bin/rootcint)
   endif()
   set(rlibmap_cmd rlibmap)
 endif()


Another CMake error (only detected by travis?)

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -184,13 +184,13 @@
 				LIST(APPEND AUX_DEPS_LIST ${DEP})

 				# Check if all dependencies are to be build:
-				if (${BUILD_mrpt-${DEP_MRPT_NAME}} STREQUAL "OFF")
+				if ("${BUILD_mrpt-${DEP_MRPT_NAME}}" STREQUAL "OFF")
 					SET(AUX_ALL_DEPS_BUILD 0)
 					MESSAGE(STATUS "*Warning*: Lib mrpt-${name} cannot be built because dependency mrpt-${DEP_MRPT_NAME} has been disabled!")
-				endif (${BUILD_mrpt-${DEP_MRPT_NAME}} STREQUAL "OFF")
+				endif ()

 			ENDIF(NOT "${DEP_MRPT_NAME}" STREQUAL "")
-		ENDIF (${DEP} MATCHES "mrpt-")
+		ENDIF (${DEP} MATCHES "mrpt-")
 	ENDFOREACH(DEP)

 	# Impossible to build?


Changes to DYLD_FALLBACK_LIBRARY_PATH in tests

Closes #17

--- tests/create_environment_script.cmake
+++ tests/create_environment_script.cmake
@@ -51,7 +51,7 @@
 # Check DYLD_ENVIRONMENT_PATH has expected path
 function(check_path)
     unset(expected)
-    foreach(current $ENV{DYLD_LIBRARY_PATH} ${ARGN})
+    foreach(current $ENV{DYLD_FALLBACK_LIBRARY_PATH} ${ARGN})
         if("${expected}" STREQUAL "")
             set(expected "${current}")
         else()
@@ -81,14 +81,14 @@

 # Check dyldpath modifications
 create_environment_script(PATH "${PROJECT_BINARY_DIR}/dyld.sh"
-    EXECUTABLE "echo $DYLD_LIBRARY_PATH")
+    EXECUTABLE "echo $DYLD_FALLBACK_LIBRARY_PATH")
 file(REMOVE "${PROJECT_BINARY_DIR}/paths/ldpaths")
 file(REMOVE_RECURSE
     "${PROJECT_BINARY_DIR}/lib" "${PROJECT_BINARY_DIR}/lib64"
     "${PROJECT_BINARY_DIR}/lib32"
 )
 check_path()
-try_execute(dyld OUTPUT "$ENV{DYLD_LIBRARY_PATH}")
+try_execute(dyld OUTPUT "$ENV{DYLD_FALLBACK_LIBRARY_PATH}")

 # add a system environment path -- should not be added to ldpaths
 # for simplicity, do this first: the file ldpaths should not be created by call


added hooks for including .cmake file prior to each run, to
support building with custom toolchain

SVN-Revision: 178

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -28,17 +28,19 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 # DAMAGE.

-# Unfinished features in i#66:
+# Unfinished features in i#66 (now under i#121):
 # * have a list of known failures and label w/ " (known: i#XX)"
-# * use the features in the latest CTest: -W, -j
 # * ssh support for running on remote machines: copy, disable pdbs, run
+# * i#111: use the features in the latest CTest: -W, -j

 cmake_minimum_required (VERSION 2.2)

 # arguments are a ;-separated list (must escape as \; from ctest_run_script())
-set(arg_nightly OFF)
-set(arg_long OFF)
-set(arg_include "")
+set(arg_nightly OFF)  # whether to report the results
+set(arg_long OFF)     # whether to run the long suite
+set(arg_include "")   # cmake file to include up front
+set(arg_preload "")   # cmake file to include prior to each 32-bit build
+set(arg_preload64 "") # cmake file to include prior to each 64-bit build

 foreach (arg ${CTEST_SCRIPT_ARG})
   if (${arg} STREQUAL "nightly")
@@ -50,6 +52,12 @@
   if (${arg} MATCHES "^include=")
     string(REGEX REPLACE "^include=" "" arg_include "${arg}")
   endif (${arg} MATCHES "^include=")
+  if (${arg} MATCHES "^preload=")
+    string(REGEX REPLACE "^preload=" "" arg_preload "${arg}")
+  endif (${arg} MATCHES "^preload=")
+  if (${arg} MATCHES "^preload64=")
+    string(REGEX REPLACE "^preload64=" "" arg_preload64 "${arg}")
+  endif (${arg} MATCHES "^preload64=")
 endforeach (arg)

 # allow setting the base cache variables via an include file
@@ -156,6 +164,20 @@
 # returns the build dir in "last_build_dir"
 function(testbuild_ex name is64 initial_cache build_args)
   set(CTEST_BUILD_NAME "${name}")
+  # Support other VC installations than VS2005 via pre-build include file.
+  # Preserve path so include file can simply prepend each time.
+  set(pre_path "$ENV{PATH}")
+  if (is64)
+    set(preload_file "${arg_preload64}")
+  else (is64)
+    set(preload_file "${arg_preload}")
+  endif (is64)
+  if (preload_file)
+    # Command-style CTest (i.e., using ctest_configure(), etc.) does
+    # not support giving args to CTEST_CMAKE_COMMAND so we are forced
+    # to do an include() instead of -C
+    include("${preload_file}")
+  endif (preload_file)
   # support "make install"
   set(CTEST_BUILD_COMMAND "${CTEST_BUILD_COMMAND_BASE} ${build_args}")
   set(CTEST_BINARY_DIRECTORY "${BINARY_BASE}/build_${CTEST_BUILD_NAME}")
@@ -170,6 +192,9 @@
   file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "${CTEST_INITIAL_CACHE}")

   if (WIN32)
+    # If other compilers also on path ensure we pick cl
+    set(ENV{CC} "cl")
+    set(ENV{CXX} "cl")
     # Convert env vars to run proper compiler.
     # Note that this is fragile and won't work with non-standard
     # directory layouts: we assume standard VS2005 or SDK.
@@ -224,6 +249,7 @@
   if (DO_SUBMIT)
     ctest_submit()
   endif (DO_SUBMIT)
+  set(ENV{PATH} "${pre_path}")
 endfunction(testbuild_ex)

 function(testbuild name is64 initial_cache)


Allow several build system on same source dir

Remove generated CMake files from source directory
To allow building with several build system without cleaning.

--- core/lib/cmake/ProjectSecp256k1.cmake
+++ core/lib/cmake/ProjectSecp256k1.cmake
@@ -49,6 +49,9 @@
         BUILD_COMMAND ""
         ${_overwrite_install_command}
         BUILD_BYPRODUCTS "${SECP256K1_LIBRARY}"
+        BINARY_DIR ${CMAKE_BINARY_DIR}/core/lib/secp256k1
+        STAMP_DIR ${CMAKE_BINARY_DIR}/core/lib/secp256k1
+        TMP_DIR ${CMAKE_BINARY_DIR}/core/lib/secp256k1
 )

 # Create imported library


cmake: sitl_target sort lists and trim a few options

--- platforms/posix/cmake/sitl_target.cmake
+++ platforms/posix/cmake/sitl_target.cmake
@@ -4,29 +4,20 @@

 # add a symlink to the logs dir to make it easier to find them
 add_custom_command(OUTPUT ${PX4_BINARY_DIR}/logs
-		COMMAND ${CMAKE_COMMAND} -E create_symlink ${SITL_WORKING_DIR}/rootfs/log logs
-		WORKING_DIRECTORY ${PX4_BINARY_DIR})
+	COMMAND ${CMAKE_COMMAND} -E create_symlink ${SITL_WORKING_DIR}/rootfs/log logs
+	WORKING_DIRECTORY ${PX4_BINARY_DIR}
+)
 add_custom_target(logs_symlink DEPENDS ${PX4_BINARY_DIR}/logs)
-
 add_dependencies(px4 logs_symlink)

 add_custom_target(run_config
-		COMMAND Tools/sitl_run.sh
-			$<TARGET_FILE:px4>
-			${config_sitl_debugger}
-			${config_sitl_viewer}
-			${config_sitl_model}
-			${PX4_SOURCE_DIR}
-			${PX4_BINARY_DIR}
-		WORKING_DIRECTORY ${SITL_WORKING_DIR}
-		USES_TERMINAL
-		DEPENDS px4 logs_symlink
-		)
-
-px4_add_git_submodule(TARGET git_gazebo PATH "${PX4_SOURCE_DIR}/Tools/sitl_gazebo")
+	COMMAND Tools/sitl_run.sh $<TARGET_FILE:px4> ${config_sitl_debugger} ${config_sitl_viewer} ${config_sitl_model} ${PX4_SOURCE_DIR} ${PX4_BINARY_DIR}
+	WORKING_DIRECTORY ${SITL_WORKING_DIR}
+	USES_TERMINAL
+	DEPENDS px4 logs_symlink
+)
+
 px4_add_git_submodule(TARGET git_jmavsim PATH "${PX4_SOURCE_DIR}/Tools/jMAVSim")
-px4_add_git_submodule(TARGET git_flightgear_bridge PATH "${PX4_SOURCE_DIR}/Tools/flightgear_bridge")
-px4_add_git_submodule(TARGET git_jsbsim_bridge PATH "${PX4_SOURCE_DIR}/Tools/jsbsim_bridge")

 # Add support for external project building
 include(ExternalProject)
@@ -40,6 +31,7 @@
 endif()

 # project to build sitl_gazebo if necessary
+px4_add_git_submodule(TARGET git_gazebo PATH "${PX4_SOURCE_DIR}/Tools/sitl_gazebo")
 ExternalProject_Add(sitl_gazebo
 	SOURCE_DIR ${PX4_SOURCE_DIR}/Tools/sitl_gazebo
 	CMAKE_ARGS
@@ -47,8 +39,7 @@
 		-DSEND_ODOMETRY_DATA=ON
 	BINARY_DIR ${PX4_BINARY_DIR}/build_gazebo
 	INSTALL_COMMAND ""
-	DEPENDS
-		git_gazebo
+	DEPENDS git_gazebo
 	USES_TERMINAL_CONFIGURE true
 	USES_TERMINAL_BUILD true
 	EXCLUDE_FROM_ALL true
@@ -58,8 +49,7 @@

 ExternalProject_Add(mavsdk_tests
 	SOURCE_DIR ${PX4_SOURCE_DIR}/test/mavsdk_tests
-	CMAKE_ARGS
-		-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
+	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
 	BINARY_DIR ${PX4_BINARY_DIR}/mavsdk_tests
 	INSTALL_COMMAND ""
 	USES_TERMINAL_CONFIGURE true
@@ -68,28 +58,26 @@
 	BUILD_ALWAYS 1
 )

+px4_add_git_submodule(TARGET git_flightgear_bridge PATH "${PX4_SOURCE_DIR}/Tools/flightgear_bridge")
 ExternalProject_Add(flightgear_bridge
 	SOURCE_DIR ${PX4_SOURCE_DIR}/Tools/flightgear_bridge
-	CMAKE_ARGS
-		-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
+	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
 	BINARY_DIR ${PX4_BINARY_DIR}/build_flightgear_bridge
 	INSTALL_COMMAND ""
-	DEPENDS
-		git_flightgear_bridge
+	DEPENDS git_flightgear_bridge
 	USES_TERMINAL_CONFIGURE true
 	USES_TERMINAL_BUILD true
 	EXCLUDE_FROM_ALL true
 	BUILD_ALWAYS 1
 )

+px4_add_git_submodule(TARGET git_jsbsim_bridge PATH "${PX4_SOURCE_DIR}/Tools/jsbsim_bridge")
 ExternalProject_Add(jsbsim_bridge
 	SOURCE_DIR ${PX4_SOURCE_DIR}/Tools/jsbsim_bridge
-	CMAKE_ARGS
-		-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
+	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
 	BINARY_DIR ${PX4_BINARY_DIR}/build_jsbsim_bridge
 	INSTALL_COMMAND ""
-	DEPENDS
-		git_jsbsim_bridge
+	DEPENDS git_jsbsim_bridge
 	USES_TERMINAL_CONFIGURE true
 	USES_TERMINAL_BUILD true
 	EXCLUDE_FROM_ALL true
@@ -97,29 +85,79 @@
 )

 # create targets for each viewer/model/debugger combination
-set(viewers none jmavsim gazebo)
-set(debuggers none ide gdb lldb ddd valgrind callgrind)
-set(models none shell
-	if750a iris iris_dual_gps iris_opt_flow iris_opt_flow_mockup iris_vision iris_rplidar iris_irlock iris_ctrlalloc iris_obs_avoid iris_rtps px4vision solo typhoon_h480
-	plane plane_cam plane_catapult plane_lidar techpod
-	standard_vtol tailsitter tiltrotor
-	rover r1_rover boat cloudship nxp_cupcar
-	uuv_hippocampus uuv_bluerov2_heavy)
-set(worlds none empty baylands ksql_airport mcmillan_airfield sonoma_raceway warehouse windy yosemite)
+set(viewers
+	none
+	jmavsim
+	gazebo
+)
+
+set(debuggers
+	none
+	gdb
+	lldb
+	valgrind
+	callgrind
+)
+
+set(models
+	none
+	boat
+	cloudship
+	if750a
+	iris
+	iris_ctrlalloc
+	iris_dual_gps
+	iris_irlock
+	iris_obs_avoid
+	iris_opt_flow
+	iris_opt_flow_mockup
+	iris_rplidar
+	iris_rtps px4vision
+	iris_vision
+	nxp_cupcar
+	plane
+	plane_cam
+	plane_catapult
+	plane_lidar
+	r1_rover
+	rover
+	shell
+	solo
+	standard_vtol
+	tailsitter
+	techpod
+	tiltrotor
+	typhoon_h480
+	uuv_bluerov2_heavy
+	uuv_hippocampus
+)
+
+set(worlds
+	none
+	baylands
+	empty
+	ksql_airport
+	mcmillan_airfield
+	sonoma_raceway
+	warehouse
+	windy
+	yosemite
+)
+
 set(all_posix_vmd_make_targets)
 foreach(viewer ${viewers})
 	foreach(debugger ${debuggers})
 		foreach(model ${models})
 			foreach(world ${worlds})
-				if (world STREQUAL "none")
-					if (debugger STREQUAL "none")
-						if (model STREQUAL "none")
+				if(world STREQUAL "none")
+					if(debugger STREQUAL "none")
+						if(model STREQUAL "none")
 							set(_targ_name "${viewer}")
 						else()
 							set(_targ_name "${viewer}_${model}")
 						endif()
 					else()
-						if (model STREQUAL "none")
+						if(model STREQUAL "none")
 							set(_targ_name "${viewer}___${debugger}")
 						else()
 							set(_targ_name "${viewer}_${model}_${debugger}")
@@ -127,35 +165,27 @@
 					endif()

 					add_custom_target(${_targ_name}
-						COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh
-							$<TARGET_FILE:px4>
-							${debugger}
-							${viewer}
-							${model}
-							${world}
-							${PX4_SOURCE_DIR}
-							${PX4_BINARY_DIR}
+						COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh $<TARGET_FILE:px4> ${debugger} ${viewer} ${model} ${world} ${PX4_SOURCE_DIR} ${PX4_BINARY_DIR}
 						WORKING_DIRECTORY ${SITL_WORKING_DIR}
 						USES_TERMINAL
-						DEPENDS
-							logs_symlink
+						DEPENDS logs_symlink
 					)
 					list(APPEND all_posix_vmd_make_targets ${_targ_name})
-					if (viewer STREQUAL "gazebo")
+					if(viewer STREQUAL "gazebo")
 						add_dependencies(${_targ_name} px4 sitl_gazebo)
 					elseif(viewer STREQUAL "jmavsim")
 						add_dependencies(${_targ_name} px4 git_jmavsim)
 					endif()
 				else()
-					if (viewer STREQUAL "gazebo")
-						if (debugger STREQUAL "none")
-							if (model STREQUAL "none")
+					if(viewer STREQUAL "gazebo")
+						if(debugger STREQUAL "none")
+							if(model STREQUAL "none")
 								set(_targ_name "${viewer}___${world}")
 							else()
 								set(_targ_name "${viewer}_${model}__${world}")
 							endif()
 						else()
-							if (model STREQUAL "none")
+							if(model STREQUAL "none")
 								set(_targ_name "${viewer}__${debugger}_${world}")
 							else()
 								set(_targ_name "${viewer}_${model}_${debugger}_${world}")
@@ -163,14 +193,7 @@
 						endif()

 						add_custom_target(${_targ_name}
-							COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh
-								$<TARGET_FILE:px4>
-								${debugger}
-								${viewer}
-								${model}
-								${world}
-								${PX4_SOURCE_DIR}
-								${PX4_BINARY_DIR}
+							COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh $<TARGET_FILE:px4> ${debugger} ${viewer} ${model} ${world} ${PX4_SOURCE_DIR} ${PX4_BINARY_DIR}
 							WORKING_DIRECTORY ${SITL_WORKING_DIR}
 							USES_TERMINAL
 							DEPENDS logs_symlink
@@ -185,20 +208,31 @@
 endforeach()

 # create targets for jsbsim
-set(models_jsbsim none rascal quadrotor_x hexarotor_x malolo)
-set(worlds_jsbsim none LSZH)
+set(models_jsbsim
+	none
+	rascal
+	quadrotor_x
+	hexarotor_x
+	malolo
+)
+
+set(worlds_jsbsim
+	none
+	LSZH
+)
+
 foreach(debugger ${debuggers})
 	foreach(model ${models_jsbsim})
 		foreach(world ${worlds_jsbsim})
-			if (world STREQUAL "none")
-				if (debugger STREQUAL "none")
-					if (model STREQUAL "none")
+			if(world STREQUAL "none")
+				if(debugger STREQUAL "none")
+					if(model STREQUAL "none")
 						set(_targ_name "jsbsim")
 					else()
 						set(_targ_name "jsbsim_${model}")
 					endif()
 				else()
-					if (model STREQUAL "none")
+					if(model STREQUAL "none")
 						set(_targ_name "jsbsim__${debugger}_${world}")
 					else()
 						set(_targ_name "jsbsim_${model}_${debugger}_${world}")
@@ -206,30 +240,22 @@
 				endif()

 				add_custom_target(${_targ_name}
-				COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh
-					$<TARGET_FILE:px4>
-					${debugger}
-					jsbsim
-					${model}
-					"LSZH"
-					${PX4_SOURCE_DIR}
-					${PX4_BINARY_DIR}
-				WORKING_DIRECTORY ${SITL_WORKING_DIR}
-				USES_TERMINAL
-				DEPENDS
-					logs_symlink
+					COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh $<TARGET_FILE:px4> ${debugger} jsbsim ${model} "LSZH" ${PX4_SOURCE_DIR} ${PX4_BINARY_DIR}
+					WORKING_DIRECTORY ${SITL_WORKING_DIR}
+					USES_TERMINAL
+					DEPENDS logs_symlink
 				)
 				list(APPEND all_posix_vmd_make_targets ${_targ_name})
 				add_dependencies(${_targ_name} px4 jsbsim_bridge)
 			else()
-				if (debugger STREQUAL "none")
-					if (model STREQUAL "none")
+				if(debugger STREQUAL "none")
+					if(model STREQUAL "none")
 						set(_targ_name "jsbsim___${world}")
 					else()
 						set(_targ_name "jsbsim_${model}__${world}")
 					endif()
 				else()
-					if (model STREQUAL "none")
+					if(model STREQUAL "none")
 						set(_targ_name "jsbsim___${debugger}_${world}")
 					else()
 						set(_targ_name "jsbsim_${model}_${debugger}_${world}")
@@ -237,18 +263,10 @@
 				endif()

 				add_custom_target(${_targ_name}
-				COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh
-					$<TARGET_FILE:px4>
-					${debugger}
-					jsbsim
-					${model}
-					${world}
-					${PX4_SOURCE_DIR}
-					${PX4_BINARY_DIR}
-				WORKING_DIRECTORY ${SITL_WORKING_DIR}
-				USES_TERMINAL
-				DEPENDS
-					logs_symlink
+					COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh $<TARGET_FILE:px4> ${debugger} jsbsim ${model} ${world} ${PX4_SOURCE_DIR} ${PX4_BINARY_DIR}
+					WORKING_DIRECTORY ${SITL_WORKING_DIR}
+					USES_TERMINAL
+					DEPENDS logs_symlink
 				)
 				list(APPEND all_posix_vmd_make_targets ${_targ_name})
 				add_dependencies(${_targ_name} px4 jsbsim_bridge)
@@ -257,32 +275,24 @@
 	endforeach()
 endforeach()

-#add flighgear targets
-if( ENABLE_LOCKSTEP_SCHEDULER STREQUAL "no")
+# add flighgear targets
+if(ENABLE_LOCKSTEP_SCHEDULER STREQUAL "no")
 	set(models
 		rascal
 		rascal-electric
 		tf-g1
 		tf-r1
-		)
+	)
 	set(all_posix_vmd_make_targets)

 	foreach(model ${models})
 		set(_targ_name "flightgear_${model}")
 		add_custom_target(${_targ_name}
-			COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh
-				$<TARGET_FILE:px4>
-				none
-				flightgear
-				${model}
-				none
-				${PX4_SOURCE_DIR}
-				${PX4_BINARY_DIR}
+			COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh $<TARGET_FILE:px4> none flightgear ${model} none ${PX4_SOURCE_DIR} ${PX4_BINARY_DIR}
 			WORKING_DIRECTORY ${SITL_WORKING_DIR}
 			USES_TERMINAL
-			DEPENDS
-				logs_symlink
-			)
+			DEPENDS logs_symlink
+		)

 		add_dependencies(${_targ_name} px4 flightgear_bridge)
 		list(APPEND all_posix_vmd_make_targets ${_targ_name})


Make zstd position independent

Make zstd position independent

Summary: Closes https://github.com/caffe2/caffe2/pull/1975

Differential Revision: D7012872

Pulled By: sf-wind

fbshipit-source-id: 31a8f787faf99894ac25508d85e1eb0f0e8e84a2

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -511,4 +511,5 @@
   list(APPEND Caffe2_DEPENDENCY_LIBS libzstd_static)
   caffe2_include_directories(${PROJECT_SOURCE_DIR}/third_party/zstd/lib)
   add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/zstd/build/cmake)
-endif()
+  set_property(TARGET libzstd_static PROPERTY POSITION_INDEPENDENT_CODE ON)
+endif()


use C++11 as default (first step for #262)

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -325,7 +325,7 @@
 #

-option (ENABLE_CXX11 "Include code using C++11 standard, needs gcc 4.7 or comparable clang/icc" OFF)
+option (ENABLE_CXX11 "Include code using C++11 standard, needs gcc 4.7 or comparable clang/icc" ON)

 set (GTEST_ROOT "" CACHE PATH "use external gtest instead of internal")


IVGCVSW-6296 Add -Wno-psabi to GCC flags

Signed-off-by: Finn Williams <51681b3f0284746ec141d38e636b0ad910c04d7c@arm.com>
Change-Id: I4f9800e53b80a836ab6fa0ee3bb5643ce8d7181b

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -67,6 +67,9 @@
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 if(COMPILER_IS_GNU_LIKE)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -Werror -Wold-style-cast -Wno-missing-braces -Wconversion -Wsign-conversion")
+    if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -Wno-psabi")
+    endif()
 elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
 	# Disable C4996 (use of deprecated identifier) due to https://developercommunity.visualstudio.com/content/problem/252574/deprecated-compilation-warning-for-virtual-overrid.html
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /MP /wd4996")


Typo in DirectML.Debug.dll

Typo in DirectML.Debug.dll

--- cmake/external/dml.cmake
+++ cmake/external/dml.cmake
@@ -81,25 +81,25 @@
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib          ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.lib
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll          ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.dll
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb          ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.pdb
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug.dll
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug.pdb

       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib          ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.lib
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll          ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.dll
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb          ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.pdb
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug.dll
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug.pdb

       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib          ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.lib
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll          ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.dll
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb          ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.pdb
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug.dll
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug.pdb

       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib        ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.lib
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll        ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.dll
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb        ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.pdb
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug.dll
       COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.pdb  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug.pdb

       VERBATIM


Add functions to collect sources

Add functions to collect sources

Add functions to collect sources to use in other place of source tree

--- cmake/scripts/l10n.cmake
+++ cmake/scripts/l10n.cmake
@@ -176,6 +176,7 @@
     set(argnames
         PROGRAM OPTIONS
         TARGET DOMAIN POT_DIRECTORY SOURCES
+        WORKING_DIRECTORY
         PACKAGE PACKAGE_VERSION COPYRIGHT BUGS
         INSTALL TEST_TRANSLATION
     )
@@ -186,6 +187,9 @@
     endif()
     if(NOT SOURCES)
         message(FATAL_ERROR "No sources specified for POT extraction")
+    endif()
+    if(NOT WORKING_DIRECTORY)
+        set(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
     endif()

     set(out_file_name "${DOMAIN}.pot")
@@ -280,3 +284,26 @@
     extract_l10n(PROGRAM ${XGETTEXT} OPTIONS ${XGETTEXT_OPTIONS} ${ARGN})
     set(L10N_DOMAINS ${L10N_DOMAINS} PARENT_SCOPE)
 endfunction()
+
+function(l10n_reset_sources VAR_NAME)
+    set(${VAR_NAME} CACHE INTERNAL "L10N source list ${VAR_NAME}")
+endfunction()
+
+function(l10n_collect_sources VAR_NAME)
+    set(l10n_options POT_DIRECTORY)
+    foreach(arg_name ${l10n_options})
+        if (NOT ${arg_name})
+            if (L10N_${arg_name})
+                set(${arg_name} ${L10N_${arg_name}})
+            endif()
+        endif()
+    endforeach(arg_name ${argnames})
+
+    set(src_list ${${VAR_NAME}})
+    foreach(src ${ARGN})
+        set(src_path ${CMAKE_CURRENT_SOURCE_DIR}/${src})
+        list(APPEND src_list ${src_path})
+    endforeach()
+    set(${VAR_NAME} ${src_list}
+        CACHE INTERNAL "L10N source list ${VAR_NAME}")
+endfunction()


added floating scan and print support

added floating scan and print support

Also allow combining nano.specs and nosys.specs

--- cmake/stm32/common.cmake
+++ cmake/stm32/common.cmake
@@ -228,20 +228,26 @@
     add_library(STM32::NoSys INTERFACE IMPORTED)
     target_compile_options(STM32::NoSys INTERFACE $<$<C_COMPILER_ID:GNU>:--specs=nosys.specs>)
     target_link_options(STM32::NoSys INTERFACE $<$<C_COMPILER_ID:GNU>:--specs=nosys.specs>)
-    #This custom property is used to check that specs is not set yet on a target linking to this one
-    set_property(TARGET STM32::NoSys PROPERTY INTERFACE_CUSTOM_GCC_SPECS "NOSYS")
-    set_property(TARGET STM32::NoSys APPEND PROPERTY
-        COMPATIBLE_INTERFACE_STRING CUSTOM_GCC_SPECS)
 endif()

 if(NOT (TARGET STM32::Nano))
     add_library(STM32::Nano INTERFACE IMPORTED)
     target_compile_options(STM32::Nano INTERFACE $<$<C_COMPILER_ID:GNU>:--specs=nano.specs>)
     target_link_options(STM32::Nano INTERFACE $<$<C_COMPILER_ID:GNU>:--specs=nano.specs>)
-    #This custom property is used to check that specs is not set yet on a target linking to this one
-    set_property(TARGET STM32::Nano PROPERTY INTERFACE_CUSTOM_GCC_SPECS "NANO")
-    set_property(TARGET STM32::Nano APPEND PROPERTY
-        COMPATIBLE_INTERFACE_STRING CUSTOM_GCC_SPECS)
+endif()
+
+if(NOT (TARGET STM32::Nano::FloatPrint))
+    add_library(STM32::Nano::FloatPrint INTERFACE IMPORTED)
+    target_link_options(STM32::Nano::FloatPrint INTERFACE
+        $<$<C_COMPILER_ID:GNU>:-Wl,--undefined,_printf_float>
+    )
+endif()
+
+if(NOT (TARGET STM32::Nano::FloatScan))
+    add_library(STM32::Nano::FloatScan INTERFACE IMPORTED)
+    target_link_options(STM32::Nano::FloatPrint INTERFACE
+        $<$<C_COMPILER_ID:GNU>:-Wl,--undefined,_scanf_float>
+    )
 endif()

 include(stm32/utilities)


Do not build glm tests nor static libs ;

--- cmake/submoduleGLM.cmake
+++ cmake/submoduleGLM.cmake
@@ -38,6 +38,8 @@
         -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
         -DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
         -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
+        -DGLM_TEST_ENABLE=OFF
+        -DBUILD_STATIC_LIBS=OFF
         STEP_TARGETS install
         EXCLUDE_FROM_ALL TRUE
 )


Add trivial check for stdatomic.h

Add trivial check for stdatomic.h

--- cmake/system_check.cmake
+++ cmake/system_check.cmake
@@ -116,3 +116,10 @@
 endif()
   file(REMOVE "avx512.c" "avx512.o")
 endif()
+
+include(CheckIncludeFile)
+CHECK_INCLUDE_FILE("stdatomic.h" HAVE_C11)
+if (HAVE_C11 EQUAL 1)
+message (STATUS found stdatomic.h)
+set (CCOMMON_OPT "${CCOMMON_OPT} -DHAVE_C11")
+endif()


Do not fail if D was not found.

Do not fail if D was not found.

--- library/cmake/Modules/FindDCompiler.cmake
+++ library/cmake/Modules/FindDCompiler.cmake
@@ -72,5 +72,5 @@
     message(STATUS "Found host D compiler ${D_COMPILER}, with default flags '${D_COMPILER_FLAGS}'")
     message(STATUS "Host D compiler version: ${D_COMPILER_VERSION_STRING}")
 else()
-    message(FATAL_ERROR "No D compiler found! Try setting the 'D_COMPILER' variable or 'DMD' environment variable.")
+    message(STATUS "Could NOT find D")
 endif()


Added new triangle mesh modules. https://tracker.physiomeproject.org/show_bug.cgi?id=1989

git-svn-id: 4705079bc6b8aadf675e3696f5c015a6aa4916e3@6589 3c1deb5b-d424-0410-962d-aba41a686d42

--- source/graphics.cmake
+++ source/graphics.cmake
@@ -21,6 +21,7 @@
 	graphics/renderstl.cpp
 	graphics/rendervrml.cpp
 	graphics/renderwavefront.cpp
+	graphics/render_triangularisation.cpp
 	graphics/quaternion.cpp
 	graphics/selected_graphic.c
 	graphics/spectrum.cpp
@@ -28,6 +29,7 @@
 	graphics/texture.cpp
 	graphics/texture_line.c
 	graphics/transform_tool.cpp
+	graphics/triangle_mesh.cpp
 	graphics/userdef_objects.c
 	graphics/volume_texture.c )


Make AcidConfig work more like a FindXXX module

If found, it will say "Acid found: /some/path/libAcid.so" when found from find_package(Acid)

It will also set the ACID_FOUND var for convenience.

--- Sources/AcidConfig.cmake
+++ Sources/AcidConfig.cmake
@@ -1,9 +1,31 @@
+# This creates the IMPORTED TARGET Acid::Acid
+#
+# To use this...
+# target_link_libraries(yourliborexe Acid::Acid)
+#
+# Optionally use PRIVATE/PUBLIC based on your needs like so...
+# target_link_libraries(yourliborexe PRIVATE Acid::Acid)
+#
+# Because it's an IMPORTED TARGET, you don't need to include its headers seperately, it's handled for you
+
 include(CMakeFindDependencyMacro)
 # Since these are required for PUBLIC usage, they must be found here
 # Then people don't have to pre-emptively find_package(Threads) or Vulkan
 # before find_package(Acid)
-find_dependency(Threads REQUIRED)
-find_dependency(Vulkan REQUIRED)
+find_dependency(Threads)
+find_dependency(Vulkan)
 # Includes the targets which are in the same dir as this file
 # So CMAKE_CURRENT_LIST_DIR will be determined when calling find_package(Acid)
 include(${CMAKE_CURRENT_LIST_DIR}/AcidTargets.cmake)
+
+if(TARGET Acid::Acid)
+	# Note "Found Acid: " will be automatically prefixed by find_package_handle_standard_args
+	# Example output when doing find_package(Acid)...
+	# -- Found Acid: /usr/lib/libAcid.so
+	get_property(_ACID_TARGET_LOCATION TARGET Acid::Acid PROPERTY LOCATION)
+endif()
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Acid
+	FOUND_VAR ACID_FOUND
+	REQUIRED_VARS _ACID_TARGET_LOCATION
+	)


Xmlrpc-epi include dir on unix.

Xmlrpc-epi include dir on unix.

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

--- CMakeModules/XmlRpcEpi.cmake
+++ CMakeModules/XmlRpcEpi.cmake
@@ -11,6 +11,8 @@
 		link_directories (
 			${PROJECT_SOURCE_DIR}/external_libs/xmlrpc-epi/
 		)
+	else (MSVC)
+		include_directories (/usr/include/xmlrpc-epi)
 	endif (MSVC)
 endmacro (INCLUDE_XMLRPCEPI)


Updated gfortran flags for mac

Updated gfortran flags for mac

--- myCMakeFiles/FortranEnvironment.cmake
+++ myCMakeFiles/FortranEnvironment.cmake
@@ -39,11 +39,27 @@
 # Set gfortran compile flags
 if (${F90tag} MATCHES "gfortran")
   MESSAGE(STATUS "Getting gfortran flags")
+
+  set (GFORTRAN_RELEASE "-O3 -fopenmp -std=f2008ts -funroll-all-loops -finline-functions -static-libgfortran -static-libgcc -ffree-line-length-none -fall-intrinsics")
+  set (GFORTRAN_DEBUG   "-O0 -g -fopenmp -std=f2008ts -fbacktrace -fbounds-check -Waliasing -Wampersand -Wconversion -Wsurprising -Wc-binding-type -Wintrinsics-std -Wtabs -Wintrinsic-shadow -Wline-truncation -Wtarget-lifetime -Wreal-q-constant -static-libgfortran -static-libgcc -ffree-line-length-none -fall-intrinsics")

-  set (CMAKE_Fortran_FLAGS_RELEASE "-O3 -fopenmp -std=f2008ts -funroll-all-loops  -finline-functions -static-libgfortran -static-libgcc -ffree-line-length-none -fall-intrinsics")
-  set (CMAKE_Fortran_FLAGS_DEBUG   "-O0 -g -fopenmp -std=f2008ts -fbacktrace -fbounds-check -Waliasing -Wampersand -Wconversion -Wsurprising -Wc-binding-type -Wintrinsics-std -Wtabs -Wintrinsic-shadow -Wline-truncation -Wtarget-lifetime -Wreal-q-constant -static-libgfortran -static-libgcc -ffree-line-length-none -fall-intrinsics")
+  if (WIN32)
+    set (CMAKE_Fortran_FLAGS_RELEASE ${GFORTRAN_RELEASE})
+    set (CMAKE_Fortran_FLAGS_DEBUG   ${GFORTRAN_DEBUG})
+  endif ()
+
+  if (${LINUX})
+    set (CMAKE_Fortran_FLAGS_RELEASE ${GFORTRAN_RELEASE})
+    set (CMAKE_Fortran_FLAGS_DEBUG   ${GFORTRAN_DEBUG})
+  endif ()
+
+  if (APPLE)
+    set (CMAKE_Fortran_FLAGS_RELEASE "${GFORTRAN_RELEASE} -fno-underscoring")
+    set (CMAKE_Fortran_FLAGS_DEBUG   "${GFORTRAN_DEBUG} -fno-underscoring")
+  endif ()

 elseif (${F90tag} MATCHES "ifort")
+
   MESSAGE(STATUS "Getting ifort flags")

   if (WIN32)


SuperBuild: PROJ4 -> PROJ. used like that in External_proj.cmake

--- SuperBuild/CMake/External_geotiff.cmake
+++ SuperBuild/CMake/External_geotiff.cmake
@@ -8,8 +8,8 @@
 set(GEOTIFF_SB_CONFIG)
 ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF TIFF_INCLUDE_DIR)
 ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF TIFF_LIBRARY)
-ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF PROJ4_INCLUDE_DIR)
-ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF PROJ4_LIBRARY)
+ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF PROJ_INCLUDE_DIR)
+ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF PROJ_LIBRARY)
 ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF ZLIB_INCLUDE_DIR)
 ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF ZLIB_LIBRARY)
 ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF JPEG_INCLUDE_DIR)


Fixed physx3 linux cmake build

Fixed physx3 linux cmake build

--- Tools/CMake/modules/module_physx3.cmake
+++ Tools/CMake/modules/module_physx3.cmake
@@ -108,6 +108,7 @@
    FIND_PHYSX3_LIBRARY(PVD PxPvdSDK 1 ${PHYSX3_BASE_PATH}/PxShared/Lib/)

    if(NOT PHYSX3_CORE_LIBRARY)
+      message(FATAL_ERROR "Could not find core PhysX lib")
       return()
    endif()

@@ -153,29 +154,29 @@
 	  FIND_PHYSX3_LIBRARY(CHARACTER PhysX3CharacterKinematic 0 ${PHYSX3_PATH}/Lib/)
       FIND_PHYSX3_LIBRARY(FOUNDATION PxFoundation 0 ${PHYSX3_BASE_PATH}/PxShared/lib/)
       FIND_PHYSX3_LIBRARY(PVD PxPvdSDK 0 ${PHYSX3_BASE_PATH}/PxShared/lib/)
-  elseif() #linux
+  else() #linux
       FIND_PHYSX3_LIBRARY(CORE PhysX3 1 ${PHYSX3_PATH}/Bin/)
       FIND_PHYSX3_LIBRARY(COMMON PhysX3Common 1 ${PHYSX3_PATH}/Bin/)
+      FIND_PHYSX3_LIBRARY(GPU PhysX3Gpu 1 ${PHYSX3_PATH}/Bin/)
       FIND_PHYSX3_LIBRARY(CHARACTER PhysX3CharacterKinematic 1 ${PHYSX3_PATH}/Bin/)
       FIND_PHYSX3_LIBRARY(COOKING PhysX3Cooking 1 ${PHYSX3_PATH}/Bin/)
       FIND_PHYSX3_LIBRARY(FOUNDATION PxFoundation 1 ${PHYSX3_BASE_PATH}/PxShared/bin/)
       FIND_PHYSX3_LIBRARY(PVD PxPvdSDK 1 ${PHYSX3_BASE_PATH}/PxShared/bin/)
-	  FIND_PHYSX3_LIBRARY(CUDA PxCudaContextManager 0 ${PHYSX3_BASE_PATH}/PxShared/lib/)
-	  FIND_PHYSX3_LIBRARY(GPU PhysX3Gpu 1 ${PHYSX3_PATH}/Bin/)
 	  FIND_PHYSX3_LIBRARY(XML PsFastXml 0 ${PHYSX3_BASE_PATH}/PxShared/lib/)
    endif()

    if(NOT PHYSX3_CORE_LIBRARY)
+      message(FATAL_ERROR "Could not find core PhysX lib")
       return()
    endif()

    #Add the libs
    set(PHYSX_LIBRARIES
       ${PHYSX3_CORE_LIBRARY}
-      ${PHYSX3_GPU_LIBRARY}
       ${PHYSX3_CHARACTER_LIBRARY}
       ${PHYSX3_COOKING_LIBRARY}
       ${PHYSX3_COMMON_LIBRARY}
+      ${PHYSX3_GPU_LIBRARY}
       ${PHYSX3_EXTENSIONS_LIBRARY}
       ${PHYSX3_CONTROLLER_LIBRARY}
       ${PHYSX3_SCENEQUERY_LIBRARY}
@@ -184,7 +185,6 @@
       ${PHYSX3_LOWLEVEL_DYNAMICS_LIBRARY}
       ${PHYSX3_LOWLEVEL_CLOTH_LIBRARY}
       ${PHYSX3_LOWLEVEL_PARTICLES_LIBRARY}
-      ${PHYSX3_CUDA_LIBRARY}
       ${PHYSX3_TASK_LIBRARY}
       ${PHYSX3_XML_LIBRARY}
       ${PHYSX3_FOUNDATION_LIBRARY}
@@ -193,10 +193,10 @@

    set(PHYSX_LIBRARIES_DEBUG
       ${PHYSX3_CORE_LIBRARY_DEBUG}
-      ${PHYSX3_GPU_LIBRARY_DEBUG}
       ${PHYSX3_CHARACTER_LIBRARY_DEBUG}
       ${PHYSX3_COOKING_LIBRARY_DEBUG}
       ${PHYSX3_COMMON_LIBRARY_DEBUG}
+      ${PHYSX3_GPU_LIBRARY_DEBUG}
       ${PHYSX3_EXTENSIONS_LIBRARY_DEBUG}
       ${PHYSX3_CONTROLLER_LIBRARY_DEBUG}
       ${PHYSX3_SCENEQUERY_LIBRARY_DEBUG}
@@ -205,7 +205,6 @@
       ${PHYSX3_LOWLEVEL_DYNAMICS_LIBRARY_DEBUG}
       ${PHYSX3_LOWLEVEL_CLOTH_LIBRARY_DEBUG}
       ${PHYSX3_LOWLEVEL_PARTICLES_LIBRARY_DEBUG}
-      ${PHYSX3_CUDA_LIBRARY_DEBUG}
       ${PHYSX3_TASK_LIBRARY_DEBUG}
       ${PHYSX3_XML_LIBRARY_DEBUG}
       ${PHYSX3_FOUNDATION_LIBRARY_DEBUG}


Updating along ITK release branch

Updating along ITK release branch

7f54e86 COMP: fixed error "Dunno about this gcc" for gcc 5.1

Change-Id: I0a2c5ebfbae7535f32a92ebe7bb78480e870cd8a

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

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 680107c325bee5c51928ec3c7e9e31bc61ae9f7b) # after v4.7.1 release
+set(ITK_TAG_COMMAND GIT_TAG 0ccdf6f19d36b812c77bfc4fa4ff9dfd6243ac66) # after v4.7.2 release

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


Enable SimpleFilters remote module by default

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -17,6 +17,10 @@

 if(NOT DEFINED Module_ITKReview)
   set(Module_ITKReview ON)
+endif()
+
+if(NOT DEFINED Module_SimpleITKFilters)
+  set(Module_SimpleITKFilters ON)
 endif()


Enable C++14 standard to the external/date target.

--- external/External.cmake
+++ external/External.cmake
@@ -560,6 +560,7 @@
                        "-DUSE_TZ_DB_IN_DOT=OFF"
                        "-DENABLE_DATE_TESTING=OFF"
                        "-DDISABLE_STRING_VIEW=OFF"
+                       "-DCMAKE_CXX_STANDARD=14"
             #--Output ldateing-------------
             LOG_DOWNLOAD  1
             LOG_UPDATE    1


Win32でのOBSのデフォルトのインストール場所を追加

Win32でのOBSのデフォルトのインストール場所を追加

--- tools/cmake/FindOBS.cmake
+++ tools/cmake/FindOBS.cmake
@@ -6,7 +6,9 @@
 endif(NOT OBS_SRC)

 if(NOT OBS_APP)
-	if(APPLE)
+	if(WIN32)
+		set(OBS_APP "C:/Program Files (x86)/obs-studio")
+	elseif(APPLE)
 		set(OBS_APP "/Applications/OBS.app")
 	else()
 		MESSAGE(FATAL_ERROR "Please set obs app root path: -DOBS_APP=...")


cmake: set build dir for mconf-idf

cmake: set build dir for mconf-idf

Fixes an issue where if idf_build_process is called in a CMake
subdirectory, menuconfig looks for the mconf-idf binary in the wrong
place (in the subdirectory build dir instead of root binary dir).

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -47,7 +47,7 @@
         externalproject_add(mconf-idf
             SOURCE_DIR ${src_path}
             CONFIGURE_COMMAND ""
-            BINARY_DIR "kconfig_bin"
+            BINARY_DIR "${CMAKE_BINARY_DIR}/kconfig_bin"
             BUILD_COMMAND rm -f ${src_path}/zconf.lex.c ${src_path}/zconf.hash.c
             COMMAND make -f ${src_path}/Makefile mconf-idf
             BUILD_BYPRODUCTS ${MCONF}


Adding missing SPN dependencies.

Adding missing SPN dependencies.

--- packages/SPn/cmake/Dependencies.cmake
+++ packages/SPn/cmake/Dependencies.cmake
@@ -9,8 +9,8 @@
 ##---------------------------------------------------------------------------##

 SET(LIB_REQUIRED_DEP_PACKAGES
-  Matprop Utils Teuchos Epetra Thyra Stratimikos AztecOO Belos
-  Ifpack Anasazi Tpetra Ifpack2)
+    Matprop Utils Teuchos Epetra Thyra ThyraTpetraAdapters Stratimikos AztecOO
+    Belos Ifpack Anasazi Tpetra Ifpack2 EpetraExt)

 SET(LIB_OPTIONAL_DEP_PACKAGES
     ML MCLS MueLu)


Commented out invalid installation of d3dcompiler

--HG--
branch : v1-9

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -124,8 +124,8 @@
       install_release(OIS.dll)
       if (OGRE_BUILD_RENDERSYSTEM_D3D11 AND MSVC11)
         # Install d3dcompiler found in Windows SDK
-        install_debug()
-        install_release()
+        #install_debug()
+        #install_release()
       endif()
     endif()


try updating device linker command line

try updating device linker command line

--- CMake/hoomd/HOOMDHIPSetup.cmake
+++ CMake/hoomd/HOOMDHIPSetup.cmake
@@ -48,9 +48,9 @@
             "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -fgpu-rdc <SOURCE> -o <OBJECT>")

         set(CMAKE_CUDA_DEVICE_LINK_LIBRARY
-            "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <LANGUAGE_COMPILE_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}")
+            "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <LANGUAGE_COMPILE_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
         set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE
-            "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_DLINK_FLAGS}")
+            "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")

         if(CMAKE_GENERATOR STREQUAL "Ninja")
             # this is also ugly, but ninja/hipcc is only supported with a future cmake


Set -DVCL_CAN_STATIC_CONST_INIT_FLOAT=0 for gcc4.*

Otherwise it won't compile.

--- add_dependencies.cmake
+++ add_dependencies.cmake
@@ -215,7 +215,12 @@
 include(${ITK_USE_FILE})
 if(MSVC)
 else()
-  #add_definitions("-DVCL_CAN_STATIC_CONST_INIT_FLOAT=0")
+  if(CMAKE_COMPILER_IS_GNUCC)
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+      add_definitions("-DVCL_CAN_STATIC_CONST_INIT_FLOAT=0")
+    endif()
+  endif()
+
   add_definitions("-DVCL_NEEDS_INLINE_INSTANTIATION=0")
   add_definitions("-D_MWAITXINTRIN_H_INCLUDED")
   add_definitions("-D_FORCE_INLINES")


ENH: Bump TubeTK Sha

ENH: Bump TubeTK Sha

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "1cd6310caf074e4a69688774897525ab5d05eb73"
+    GIT_TAG "2ef59cfb598f8611a1320396d606250d45ccfd08"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}