experimental - try 10.6 SDK and lvmgcc42 on TeamCity

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -101,8 +101,8 @@

   # To support a different SDK update these Xcode settings:
   set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
-  set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
-  set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0")
+  set(CMAKE_OSX_SYSROOT macosx10.6)
+  set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
   set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)

   # NOTE: To attempt an i386/PPC Universal build, add this on the configure line:


Automated merge with https://hg.secondlife.com/mesh-development

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -88,7 +88,7 @@
   if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
     # NOTE: setting -isysroot is NOT adequate: http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00696.html
     # see http://public.kitware.com/Bug/view.php?id=9959 + poppy
-    set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
+    set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
     set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4)
   endif (NOT CMAKE_OSX_DEPLOYMENT_TARGET)


Oops, Xcode5 has no 10.7 target out of the box


Compile with ALLOW_MEMORY_GROWTH for large games like Counterfeit Monkey

--- src/common.cmake
+++ src/common.cmake
@@ -11,6 +11,7 @@
     target_link_libraries(${target} remglk)
     target_link_options(${target} PRIVATE
         # Required options
+        -sALLOW_MEMORY_GROWTH=1
         -sASYNCIFY=1
         -sASYNCIFY_IMPORTS=['emglken_fill_stdin_buffer']
         -sEXIT_RUNTIME=1


Restructure ADD_GUILE_MODULE

Restructure ADD_GUILE_MODULE

--- lib/OpenCogFunctions.cmake
+++ lib/OpenCogFunctions.cmake
@@ -33,26 +33,29 @@
 # https://www.gnu.org/software/guile/manual/guile.html#Modules-and-the-File-System
 # https://www.gnu.org/software/guile/manual/guile.html#Creating-Guile-Modules

-# ----------------------------------------------------------------------------
-# MODULE_FILE: The name of the file that defines the module. It has
+# Definitions:
+#
+# * MODULE_FILE: The name of the file that defines the module. It has
 #   the same name as the directory it is in, or the name of the parent
 #   directory of current directory if it is in a folder named 'scm'.
 #   In addition this file shoule have a define-module expression
 #   for it be importable, as per guile's specification. See reference
 #   links above.
-FUNCTION(PROCESS_GUILE_PATH PREFIX_DIR_PATH CURRENT_SRC_DIR BUILD_DIR MODULE_FILE)
+
+# ----------------------------------------------------------------------------
+FUNCTION(PROCESS_GUILE_PATH PREFIX_DIR_PATH FILE_NAME)
     # NOTE: Directory paths are not allowed as module names.
     # Check if directory path was passed as a file name.
-    STRING(REGEX MATCH "([a-z0-9/-]+)/([a-z0-9/-]*)" "" ${MODULE_FILE})
+    STRING(REGEX MATCH "([a-z0-9/-]+)/([a-z0-9/-]*)" "" ${FILE_NAME})
     IF(CMAKE_MATCH_2)
         MESSAGE(FATAL_ERROR "Only files found in "
-            "${CURRENT_SRC_DIR} are allowed")
+            "${CMAKE_CURRENT_SOURCE_DIR} are allowed")
     ENDIF()

     # Check if the file exists
-    IF(NOT EXISTS ${CURRENT_SRC_DIR}/${MODULE_FILE})
-        MESSAGE(FATAL_ERROR "${MODULE_FILE} file does not exist in "
-            ${CURRENT_SRC_DIR})
+    IF(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE_NAME})
+        MESSAGE(FATAL_ERROR "${FILE_NAME} file does not exist in "
+            ${CMAKE_CURRENT_SOURCE_DIR})
     ENDIF()

     # Clean path for specifying module paths
@@ -61,12 +64,12 @@
     # check for that, add it.
     STRING(REGEX MATCH
         "^(${PREFIX_DIR_PATH})/([a-z0-9/-]+)/(scm?)([a-z0-9/-]*)" ""
-        ${CURRENT_SRC_DIR})
+        ${CMAKE_CURRENT_SOURCE_DIR})

     IF(CMAKE_MATCH_0)
         SET(CLEAN_PATH "${PREFIX_DIR_PATH}/${CMAKE_MATCH_2}${CMAKE_MATCH_4}")
     ELSE()
-        SET(CLEAN_PATH ${CURRENT_SRC_DIR})
+        SET(CLEAN_PATH ${CMAKE_CURRENT_SOURCE_DIR})
     ENDIF()

     # Specify the module paths.
@@ -81,18 +84,22 @@
     # MODULE_DIR_PATH: the directory path where the files associated
     #   with the module are installed/symlinked at, with the exception of
     #   the MODULE_FILE.
-    SET(MODULE_NAME ${CMAKE_MATCH_3})
-    SET(MODULE_FILE_DIR_PATH ${CMAKE_MATCH_2})
-    SET(MODULE_DIR_PATH ${CMAKE_MATCH_2}/${CMAKE_MATCH_3})
-    SET(GUILE_SYMLINK_DIR "${BUILD_DIR}/opencog/scm")
+    SET(MODULE_NAME ${CMAKE_MATCH_3} PARENT_SCOPE)
+    SET(MODULE_FILE_DIR_PATH ${CMAKE_MATCH_2} PARENT_SCOPE)
+    SET(MODULE_DIR_PATH ${CMAKE_MATCH_2}/${CMAKE_MATCH_3} PARENT_SCOPE)
+ENDFUNCTION(PROCESS_GUILE_PATH)
+
+# ----------------------------------------------------------------------------
+FUNCTION(PROCESS_MODULE_STRUCTURE FILE_NAME)
+    SET(GUILE_SYMLINK_DIR "${CMAKE_BINARY_DIR}/opencog/scm")
     SET(GUILE_INSTALL_DIR "${DATADIR}/scm")

     # Create symlinks in build directory mirroring the install path structure.
     # Also configure for install.
-    IF ("${MODULE_NAME}.scm" STREQUAL "${MODULE_FILE}")
+    IF ("${MODULE_NAME}.scm" STREQUAL "${FILE_NAME}")
         EXECUTE_PROCESS(
             COMMAND ${CMAKE_COMMAND} -E make_directory ${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}
-            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CURRENT_SRC_DIR}/${MODULE_FILE}" "${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}/${MODULE_FILE}"
+            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_NAME}" "${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}/${FILE_NAME}"
         )
         SET(FILE_INSTALL_PATH "${GUILE_INSTALL_DIR}/${MODULE_FILE_DIR_PATH}"
             PARENT_SCOPE
@@ -100,19 +107,19 @@
     ELSE()
         EXECUTE_PROCESS(
             COMMAND ${CMAKE_COMMAND} -E make_directory ${GUILE_SYMLINK_DIR}/${MODULE_DIR_PATH}
-            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CURRENT_SRC_DIR}/${MODULE_FILE}" "${GUILE_SYMLINK_DIR}/${MODULE_DIR_PATH}/${MODULE_FILE}"
+            COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_NAME}" "${GUILE_SYMLINK_DIR}/${MODULE_DIR_PATH}/${FILE_NAME}"
         )
         SET(FILE_INSTALL_PATH "${GUILE_INSTALL_DIR}/${MODULE_DIR_PATH}"
             PARENT_SCOPE
         )
     ENDIF()
-ENDFUNCTION(PROCESS_GUILE_PATH)
+ENDFUNCTION(PROCESS_MODULE_STRUCTURE)

+# ----------------------------------------------------------------------------
 FUNCTION(ADD_GUILE_MODULE SCHEME_FILE)
     FOREACH(FILE_NAME ${ARGV})
-        PROCESS_GUILE_PATH(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
-            ${CMAKE_BINARY_DIR} ${FILE_NAME}
-        )
+        PROCESS_GUILE_PATH(${CMAKE_SOURCE_DIR} ${FILE_NAME})
+        PROCESS_MODULE_STRUCTURE(${FILE_NAME})

         # The install configuration isn't part of PROCESS_GUILE_PATH function
         # so as to avoid "Command INSTALL() is not scriptable" error, when


getdeps: add an install_fb_python_executable() function to the CMake utilities

Summary:
Add a `install_fb_python_executable()` function to `FBPythonBinary.cmake` for
helping to install python executables generated with
`add_fb_python_executable()`.  This primarily helps by automatically looking
up the correct output file to install from the generated targets.

Reviewed By: wez

Differential Revision: D18774539

fbshipit-source-id: 4b397580d72ac448f21d1db6d2cdd653cf3635df

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -548,6 +548,30 @@
 endfunction()

 #
+# Install an FB-style packaged python binary.
+#
+# - DESTINATION <export-name>:
+#   Associate the installed target files with the given export-name.
+#
+function(install_fb_python_executable TARGET)
+  # Parse the arguments
+  set(one_value_args DESTINATION)
+  set(multi_value_args)
+  fb_cmake_parse_args(
+    ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
+  )
+
+  if(NOT DEFINED ARG_DESTINATION)
+    set(ARG_DESTINATION bin)
+  endif()
+
+  install(
+    PROGRAMS "$<TARGET_PROPERTY:${TARGET}.GEN_PY_EXE,EXECUTABLE>"
+    DESTINATION "${ARG_DESTINATION}"
+  )
+endfunction()
+
+#
 # Install a python library.
 #
 # - EXPORT <export-name>:


Try again

Try again

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

 		# Capturing lcov counters and generating report
     COMMAND ${LCOV_PATH} --directory . --capture ${LCOV_SCRIPT} --output-file ${coverage_info}
-		COMMAND ${LCOV_PATH} --remove ${coverage_info} '/usr/*' '3rdParty/*' 'tests/*' '/home/travis/build/mbrucher/boost-build/*' --output-file ${coverage_cleaned}
+		COMMAND ${LCOV_PATH} --remove ${coverage_info} '/usr/*' '${CMAKE_SOURCE_DIR}/3rdParty/*' '${CMAKE_SOURCE_DIR}/tests/*' '/home/travis/build/mbrucher/boost-build/*' --output-file ${coverage_cleaned}
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${coverage_cleaned}
 		COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}


COMP: raise warning if there is local file modifications (for Dashboard)

--- CMake/SourceStatus.cmake
+++ CMake/SourceStatus.cmake
@@ -57,7 +57,7 @@
   if(OTB_WC_STATUS)
     message(STATUS "  Local file modifications (${dir_name}) :")
     string(REPLACE "\n" "\n--     " OTB_WC_STATUS_PRETTYPRINT "    ${OTB_WC_STATUS}")
-    message(STATUS "${OTB_WC_STATUS_PRETTYPRINT}")
+    message(WARNING "${OTB_WC_STATUS_PRETTYPRINT}")
   else()
     message(STATUS "  No files modified locally (${dir_name})")
   endif()


Updated CTK version and correct md5 checksum

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

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag 96bb84d885d936b3980f07f7dc5dafecfcc96a8e)
+    set(revision_tag 96bb84d8)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -49,7 +49,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 a3130b2c3e7a1d320740938f61b65840
+      URL_MD5 e214b632dc876592923d5d8ca77296d5
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


Revert "Use VTK v5.10 in Superbuild"

Revert "Use VTK v5.10 in Superbuild"

This reverts commit cbccea5615154a65aab77465362b67e63d1f5b84.

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -16,7 +16,7 @@
   MESSAGE(STATUS "Adding external project: ${proj}")
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${git_protocol}://vtk.org/VTK.git
-    GIT_TAG "v5.10.0"
+    GIT_TAG "origin/master"
     INSTALL_COMMAND ""
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-build


COMP: Fix command line argument switch for msys shells (affecting tests)

--- BlueBerry/CMake/berryTestingHelpers.cmake
+++ BlueBerry/CMake/berryTestingHelpers.cmake
@@ -7,11 +7,16 @@
 #
 MACRO(MACRO_TEST_PLUGIN)

+  SET(_cla_switch "--")
   IF(WIN32)
-    ADD_TEST(${BUNDLE-SYMBOLICNAME} ${BLUEBERRY_TEST_APP} /BlueBerry.application=coretestapplication /BlueBerry.testplugin=${BUNDLE-SYMBOLICNAME})
-  ELSE()
-    ADD_TEST(${BUNDLE-SYMBOLICNAME} ${BLUEBERRY_TEST_APP} --BlueBerry.application=coretestapplication --BlueBerry.testplugin=${BUNDLE-SYMBOLICNAME})
+    IF(MSYS)
+      SET(_cla_switch "//")
+    ELSE()
+      SET(_cla_switch "/")
+    ENDIF()
   ENDIF()
+
+  ADD_TEST(${BUNDLE-SYMBOLICNAME} ${BLUEBERRY_TEST_APP} ${_cla_switch}BlueBerry.application=coretestapplication ${_cla_switch}BlueBerry.testplugin=${BUNDLE-SYMBOLICNAME})

 ENDMACRO(MACRO_TEST_PLUGIN)

@@ -22,21 +27,21 @@
 #                          a minimalistic default application will be started
 MACRO(MACRO_TEST_UIPLUGIN)

+  SET(_cla_switch "--")
+  IF(WIN32)
+    IF(MSYS)
+      SET(_cla_switch "//")
+    ELSE()
+      SET(_cla_switch "/")
+    ENDIF()
+  ENDIF()
+
   IF(BLUEBERRY_ENABLE_GUI_TESTING)
-      IF(BLUEBERRY_TEST_APP_ID)
-        SET(_app_id_arg "BlueBerry.testapplication=${BLUEBERRY_TEST_APP_ID}")
-        IF(WIN32)
-          SET(_app_id_arg "/${_app_id_arg}")
-        ELSE()
-          SET(_app_id_arg "--${_app_id_arg}")
-        ENDIF()
-      ENDIF()
-
-      IF(WIN32)
-        ADD_TEST(${BUNDLE-SYMBOLICNAME} ${BLUEBERRY_TEST_APP} /BlueBerry.application=uitestapplication ${_app_id_arg} /BlueBerry.testplugin=${BUNDLE-SYMBOLICNAME})
-      ELSE()
-        ADD_TEST(${BUNDLE-SYMBOLICNAME} ${BLUEBERRY_TEST_APP} --BlueBerry.application=uitestapplication ${_app_id_arg} --BlueBerry.testplugin=${BUNDLE-SYMBOLICNAME})
-      ENDIF()
+    IF(BLUEBERRY_TEST_APP_ID)
+      SET(_app_id_arg "${_cla_switch}BlueBerry.testapplication=${BLUEBERRY_TEST_APP_ID}")
+
+      ADD_TEST(${BUNDLE-SYMBOLICNAME} ${BLUEBERRY_TEST_APP} ${_cla_switch}BlueBerry.application=uitestapplication ${_app_id_arg} ${_cla_switch}BlueBerry.testplugin=${BUNDLE-SYMBOLICNAME})
+    ENDIF()
   ENDIF()

-ENDMACRO(MACRO_TEST_UIPLUGIN)+ENDMACRO(MACRO_TEST_UIPLUGIN)


fix path to farsight include folder

fix path to farsight include folder

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

--- CMakeModules/TelepathyFarsight2.cmake
+++ CMakeModules/TelepathyFarsight2.cmake
@@ -6,7 +6,7 @@
 macro (INCLUDE_TELEPATHY_FARSIGHT2)

     if (MSVC)
-	  include_directories (${NAALI_DEP_PATH}telepathy-farsight2/include)
+	  include_directories (${NAALI_DEP_PATH}/telepathy-farsight2/include)
 	  link_directories (${NAALI_DEP_PATH}/telepathy-farsight2/lib)
     else(NOT MSVC AND TELEPATHY_FARSIGHT2_FOUND)
 	  include_directories(${TELEPATHY_FARSIGHT2_INCLUDE_DIRS})


[cmake] Use -mgeneral-regs-only when possible

--- other/cmake/compiler_flags.cmake
+++ other/cmake/compiler_flags.cmake
@@ -165,7 +165,7 @@

    if (NOT ${GCC_TC_VER} VERSION_LESS "7.3.0")

-      # Older GCC versions do NOT support some UBSAN features.
+      # GCC >= 7.3.0 support some additional UBSAN features.

       list(
          APPEND GENERAL_KERNEL_FLAGS_LIST
@@ -217,13 +217,70 @@
 JOIN("${LOWLEVEL_BINARIES_FLAGS_LIST}" ${SPACE} LOWLEVEL_BINARIES_FLAGS)

-set(
-   DISABLE_FPU_FLAGS_LIST
-
-   # Disable the generation of any kind of FPU instructions
-   -mno-80387
-   -mno-mmx
-   -mno-sse
-   -mno-avx
-)
+#
+# On x86, -mgeneral-regs-only is supported only by GCC >= 7.0.
+# Clang supports it only on Aarch64 and the patch for making it generic
+# has been abandoned: https://reviews.llvm.org/D38479
+#
+set(MGENERAL_REGS_ONLY_SUPPORTED OFF)
+
+if (${KERNEL_SYSCC} OR ${USE_SYSCC})
+
+   # Special case: we're using the system compiler
+   if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+      if (${CMAKE_C_COMPILER_VERSION} VERSION_LESS "7.3.0")
+
+         # GCC-only flags for older GCC compilers
+         list(
+            APPEND DISABLE_FPU_FLAGS_LIST
+
+            -mno-fp-ret-in-387
+            -mskip-rax-setup
+         )
+
+      else()
+         set(MGENERAL_REGS_ONLY_SUPPORTED ON)
+      endif()
+   endif()
+
+else()
+
+   # DEFAULT CASE: we're using a GCC compiler from our toolchain
+   if (${GCC_TC_VER} VERSION_LESS "7.3.0")
+
+      # GCC-only flags for older GCC compilers
+      list(
+         APPEND DISABLE_FPU_FLAGS_LIST
+
+         -mno-fp-ret-in-387
+         -mskip-rax-setup
+      )
+
+   else()
+      set(MGENERAL_REGS_ONLY_SUPPORTED ON)
+   endif()
+endif()
+
+# Disable the generation of any kind of FPU instructions
+if (${MGENERAL_REGS_ONLY_SUPPORTED})
+
+   list(
+      APPEND DISABLE_FPU_FLAGS_LIST -mgeneral-regs-only
+   )
+
+else()
+
+list(
+      APPEND DISABLE_FPU_FLAGS_LIST
+
+      -mno-80387
+      -mno-mmx
+      -mno-3dnow
+      -mno-sse
+      -mno-sse2
+      -mno-avx
+   )
+
+endif()
+
 JOIN("${DISABLE_FPU_FLAGS_LIST}" ${SPACE} DISABLE_FPU_FLAGS)


update iOS toolchain for changes in CMake 3.14

--- toolchains/ios.toolchain.cmake
+++ toolchains/ios.toolchain.cmake
@@ -17,27 +17,31 @@
 #
 ################################################################################

-set(CMAKE_C_COMPILER_ID   AppleClang)
-set(CMAKE_CXX_COMPILER_ID AppleClang)
+cmake_minimum_required( VERSION 3.14 )
+
+set( CMAKE_C_COMPILER_ID   AppleClang )
+set( CMAKE_CXX_COMPILER_ID AppleClang )
+
+if( NOT ${CMAKE_GENERATOR} MATCHES "Xcode" )
+    message( FATAL_ERROR "iOS toolchain supports only XCode generator" )
+endif()

 include( "${CMAKE_CURRENT_LIST_DIR}/apple.cmake" )
 unset( TNUN_native_optimization ) # This makes no sense when cross-compiling.

 # Standard settings
-set( CMAKE_SYSTEM_NAME      Darwin )
+set( CMAKE_SYSTEM_NAME      iOS    )
+set( CMAKE_OSX_SYSROOT      "iphoneos" )
 set( CPACK_SYSTEM_NAME      iOS    )
-set( CMAKE_SYSTEM_VERSION   6      )
+set( CMAKE_SYSTEM_VERSION   8.0    )
 set( CMAKE_SYSTEM_PROCESSOR arm    )
+set( CMAKE_OSX_ARCHITECTURES armv7 armv7s arm64 i386 x86_64 )
 set( APPLE true )
 set( iOS   true )
 # Compatibility with build scripts that rely on iOS toolchains defining IOS instead of iOS
 # CMake variables are case sensitive (unlike functions, macros and commands: https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#variables
 set( IOS   true )
 set( UNIX  true )
-
-if( NOT ${CMAKE_GENERATOR} MATCHES "Xcode" )
-    message( FATAL_ERROR "iOS toolchain supports only XCode generator" )
-endif()

 set( TNUN_os_suffix iOS )


COMP: Reverted use of IncrediBuild on Elastix, because of VS2013 link errors in Debug mode (LNK1318: Unexpected PDB error,  LNK1102: out of memory), trying to link selx test executables, in SuperElastix-build\bin\Debug (selxNiftyregComponentTest, selxNetworkBuilderTest, selxRegistrationItkv4Test, selxSuperElastixFilterTest, selxitkImageFilterTest, selxElastixComponentTest).

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -21,8 +21,6 @@

 set( ELASTIX_GIT_REPOSITORY http://github.com/mstaring/elastix )
 set( ELASTIX_GIT_TAG fd5cde3060ca4093d4c904ead36b3a0dd2f63360 )
-
-UPDATE_SELX_SUPERBUILD_COMMAND(Project)

 ExternalProject_Add( ${proj}
   GIT_REPOSITORY ${ELASTIX_GIT_REPOSITORY}
@@ -115,7 +113,6 @@
   -DUSE_ViolaWellsMutualInformationMetric:BOOL=ON
   -DUSE_WeightedCombinationTransformElastix:BOOL=ON
   DEPENDS ITK
-  BUILD_COMMAND ${SELX_SUPERBUILD_COMMAND}
 )

 ExternalProject_Get_Property( Elastix binary_dir )


MSVC: added the missing TNUN_compiler_optimize_for_size variable.

--- toolchains/msvc.toolchain.cmake
+++ toolchains/msvc.toolchain.cmake
@@ -27,6 +27,7 @@
 set( TNUN_compiler_exceptions_off         -wd4577                                             )
 set( TNUN_compiler_report_optimization    -Qpar-report:1 -Qvec-report:2                       ) # https://msdn.microsoft.com/en-us/library/jj658585.aspx Vectorizer and Parallelizer Messages
 set( TNUN_compiler_optimize_for_speed     -Ox -Ot -Qpar                                       )
+set( TNUN_compiler_optimize_for_size      -Ox -Os                                             )
 set( TNUN_compiler_runtime_sanity_checks  -GS -sdl -guard:cf -fp:strict -RTC1                 )
 set( TNUN_warnings_as_errors              -WX                                                 )
 set( TNUN_default_warnings                -W4                                                 )


disable more warnings on MSVC

disable more warnings on MSVC

--- toolchains/msvc.toolchain.cmake
+++ toolchains/msvc.toolchain.cmake
@@ -30,7 +30,7 @@

 # w4373: '...': virtual function overrides '...', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
 # w4324: 'structure was padded due to alignment specifier'
-add_compile_options( /std:c++latest -MP -Oi -W4 -Zc:threadSafeInit- -wd4324 -wd4373 )
+add_compile_options( /std:c++latest -MP -Oi -W4 -Zc:threadSafeInit- -wd4324 -wd4373 -wd4100 -wd4456 -wd4067 -wd4995 -wd4635 -wd4800 -wd4101 -wd4756 -wd4068 -wd4056 -wd4996 -wd4503)
 add_definitions(
   -D_CRT_SECURE_NO_WARNINGS
   -D_SCL_SECURE_NO_WARNINGS


Add Windows driver support macro.

Add Windows driver support macro.

--- src/config.cmake
+++ src/config.cmake
@@ -189,6 +189,12 @@

 /* Define to enable PulseAudio driver */
 #cmakedefine PULSE_SUPPORT @PULSE_SUPPORT@
+
+/* Define to enable DirectSound driver */
+#cmakedefine DSOUND_SUPPORT @DSOUND_SUPPORT@
+
+/* Define to enable Windows MIDI driver */
+#cmakedefine WINMIDI_SUPPORT @WINMIDI_SUPPORT@

 /* Define to 1 if you have the ANSI C header files. */
 #cmakedefine STDC_HEADERS @STDC_HEADERS@


ENH: CI: PKG: Added (temporary) debug traces.

--- Packaging/detect_using_file_command.cmake
+++ Packaging/detect_using_file_command.cmake
@@ -28,6 +28,8 @@
   if(NOT file_rv STREQUAL "0")
     message(FATAL_ERROR "${FILE_COMMAND} failed: ${file_rv}\n${file_ev}\n${file_ov}")
   endif()
+
+  message( "file_ov: '${file_ov}'" )

   get_filename_component(input_file_NAME ${input_file} NAME)
   string(REPLACE "${input_file}" " _file_full_ " file_ov "${file_ov}")


#51 update BasisBootstrapping.cmake to allow latest version of cmake-basis to be used from git repo.

--- BasisBootstrapping.cmake
+++ BasisBootstrapping.cmake
@@ -1,5 +1,5 @@
 # ============================================================================
-# Copyright (c) 2015 <provider-name>
+# Copyright (c) 2014 <provider-name>
 # All rights reserved.
 #
 # See COPYING file for license information.
@@ -26,17 +26,19 @@
 # @par
 #

 #

-#    @tp @b VERSION major.minor.patch @endtp
-#    Version of CMake BASIS to download.
+#    @tp @b VERSION major.minor.patch|commit @endtp
+#    Release, commit, or branch of CMake BASIS to download.
 #

 #

 #    @tp @b DOWNLOAD_URL url @endtp
 #    URL from which to download the CMake BASIS source distribution package.
 #        The given URL can be either a complete download URL which includes the
-#        package name (which must end with .tar.gz or .zip) or the path of
+#        package name (which must end with .tar.gz or .zip), the path of
 #        a remote directory which contains the CMake BASIS packages named
-#        cmake-basis-version.zip (for Windows) and cmake-basis-version.tar.gz (for Unix).
-#        (default: http://opensource.andreasschuh.com/cmake-basis/_downloads)
+#        cmake-basis-version.zip (for Windows) and cmake-basis-version.tar.gz
+#        (for Unix), or the URL of a Git repository.
+#        (default: http://opensource.andreasschuh.com/cmake-basis/_downloads
+#                  or git@github.com:schuhschuh/cmake-basis.git)
 #

 #

 #    @tp @b INFORM_USER @endtp
@@ -86,17 +88,21 @@
     endif ()
   endif ()

-  set (DOWNLOAD_PATH    "${CMAKE_CURRENT_BINARY_DIR}")
-  if (WIN32)
-    set (BASIS_ARCHIVE "cmake-basis-${BASIS_VERSION}.zip")
+  set (DOWNLOAD_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+  if (BASIS_VERSION MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+(-[a-z]*)?$")
+    if (WIN32)
+      set (BASIS_ARCHIVE "cmake-basis-${BASIS_VERSION}.zip")
+    else ()
+      set (BASIS_ARCHIVE "cmake-basis-${BASIS_VERSION}.tar.gz")
+    endif ()
+    if (NOT BASIS_DOWNLOAD_URL)
+      set (BASIS_DOWNLOAD_URL "http://opensource.andreasschuh.com/cmake-basis/_downloads")
+    endif ()
+    if (NOT BASIS_DOWNLOAD_URL MATCHES "\\.(zip|tar\\.gz)$")
+      set (BASIS_DOWNLOAD_URL "${BASIS_DOWNLOAD_URL}/${BASIS_ARCHIVE}")
+    endif ()
   else ()
-    set (BASIS_ARCHIVE "cmake-basis-${BASIS_VERSION}.tar.gz")
-  endif ()
-  if (NOT BASIS_DOWNLOAD_URL)
-    set (BASIS_DOWNLOAD_URL "http://opensource.andreasschuh.com/cmake-basis/_downloads")
-  endif ()
-  if (NOT BASIS_DOWNLOAD_URL MATCHES "\\.(zip|tar\\.gz)$")
-    set (BASIS_DOWNLOAD_URL "${BASIS_DOWNLOAD_URL}/${BASIS_ARCHIVE}")
+    set (BASIS_DOWNLOAD_URL "git@github.com:schuhschuh/cmake-basis.git")
   endif ()
   set (BASIS_SOURCE_DIR "${DOWNLOAD_PATH}/cmake-basis-${BASIS_VERSION}")
   set (BASIS_BINARY_DIR "${DOWNLOAD_PATH}/cmake-basis-${BASIS_VERSION}/build")
@@ -109,34 +115,74 @@

     # download and extract source code if not done before
     if (NOT EXISTS "${BASIS_SOURCE_DIR}/BasisProject.cmake")
-      # download source code distribution package
-      if (NOT EXISTS "${DOWNLOAD_PATH}/${BASIS_ARCHIVE}")
-        message (STATUS "Downloading CMake BASIS v${BASIS_VERSION}...")
-        file (DOWNLOAD "${BASIS_DOWNLOAD_URL}" "${DOWNLOAD_PATH}/${BASIS_ARCHIVE}" STATUS RETVAL)
-        list (GET RETVAL 1 ERRMSG)
-        list (GET RETVAL 0 RETVAL)
-        if (NOT RETVAL EQUAL 0)
-          message (FATAL_ERROR "Failed to download CMake BASIS v${BASIS_VERSION} from\n"
+
+      # clone Git repository and checkout specified commit/branch
+      if (BASIS_DOWNLOAD_URL MATCHES ".git$")
+
+        find_package (Git QUIET)
+        if (NOT GIT_FOUND)
+          set (ERRMSG "Git client not found: GIT_EXECUTABLE")
+        else ()
+          mark_as_advanced (GIT_EXECUTABLE)
+          message (STATUS "Cloning CMake BASIS repository...")
+          execute_process (
+            COMMAND "${GIT_EXECUTABLE}" clone "${BASIS_DOWNLOAD_URL}" "${BASIS_SOURCE_DIR}"
+            RESULT_VARIABLE RETVAL
+            ERROR_VARIABLE  ERRMSG
+          )
+          if (RETVAL EQUAL 0)
+            execute_process (
+              COMMAND "${GIT_EXECUTABLE}" checkout --detach "${BASIS_VERSION}"
+              WORKING_DIRECTORY "${BASIS_SOURCE_DIR}"
+              RESULT_VARIABLE   RETVAL
+              ERROR_VARIABLE    ERRMSG
+            )
+            if (RETVAL EQUAL 0)
+              set (ERRMSG)
+              message (STATUS "Cloning CMake BASIS repository... - done")
+            endif ()
+          endif ()
+        endif ()
+        if (ERRMSG)
+          message (FATAL_ERROR "Failed to clone CMake BASIS ${BASIS_VERSION} from\n"
                                "\t${BASIS_DOWNLOAD_URL}\n"
                                "Error: ${ERRMSG}\n"
-                               "Either try again or follow the instructions at\n"
+                               "Ensure GIT_EXECUTABLE is set and try again or follow the instructions at\n"
                                "\thttp://opensource.andreasschuh.com/cmake-basis/\n"
                                "to download and install it manually before configuring this project.\n")
         endif ()
-        message (STATUS "Downloading CMake BASIS v${BASIS_VERSION}... - done")
+
+      else ()
+
+        # download source code distribution package
+        if (NOT EXISTS "${DOWNLOAD_PATH}/${BASIS_ARCHIVE}")
+          message (STATUS "Downloading CMake BASIS v${BASIS_VERSION}...")
+          file (DOWNLOAD "${BASIS_DOWNLOAD_URL}" "${DOWNLOAD_PATH}/${BASIS_ARCHIVE}" STATUS RETVAL)
+          list (GET RETVAL 1 ERRMSG)
+          list (GET RETVAL 0 RETVAL)
+          if (NOT RETVAL EQUAL 0)
+            message (FATAL_ERROR "Failed to download CMake BASIS v${BASIS_VERSION} from\n"
+                                 "\t${BASIS_DOWNLOAD_URL}\n"
+                                 "Error: ${ERRMSG}\n"
+                                 "Either try again or follow the instructions at\n"
+                                 "\thttp://opensource.andreasschuh.com/cmake-basis/\n"
+                                 "to download and install it manually before configuring this project.\n")
+          endif ()
+          message (STATUS "Downloading CMake BASIS v${BASIS_VERSION}... - done")
+        endif ()
+        # extract source package
+        message (STATUS "Extracting CMake BASIS...")
+        execute_process (COMMAND ${CMAKE_COMMAND} -E tar -xvzf "${DOWNLOAD_PATH}/${BASIS_ARCHIVE}" RESULT_VARIABLE RETVAL)
+        if (NOT RETVAL EQUAL 0)
+          file (REMOVE_RECURSE "${BASIS_SOURCE_DIR}")
+          message (FATAL_ERROR "Failed to extract the downloaded archive file ${DOWNLOAD_PATH}/${BASIS_ARCHIVE}!")
+        endif ()
+        message (STATUS "Extracting CMake BASIS... - done")
+
       endif ()
-      # extract source package
-      message (STATUS "Extracting CMake BASIS...")
-      execute_process (COMMAND ${CMAKE_COMMAND} -E tar -xvzf "${DOWNLOAD_PATH}/${BASIS_ARCHIVE}" RESULT_VARIABLE RETVAL)
-      if (NOT RETVAL EQUAL 0)
-        file (REMOVE_RECURSE "${BASIS_SOURCE_DIR}")
-        message (FATAL_ERROR "Failed to extract the downloaded archive file ${DOWNLOAD_PATH}/${BASIS_ARCHIVE}!")
-      endif ()
-      message (STATUS "Extracting CMake BASIS... - done")
     endif ()

     # configure
-    # TODO: Does this work on Windows as well ? Do we need "-G${CMAKE_GENERATOR}" ?
     file (MAKE_DIRECTORY "${BASIS_BINARY_DIR}")

     set (CMAKE_ARGUMENTS "-DBASIS_REGISTER:BOOL=OFF") # do not register this BASIS build/installation
@@ -153,14 +199,14 @@
       math (EXPR N "${N} - 2")
     endwhile ()
     execute_process (
-      COMMAND "${CMAKE_COMMAND}" ${CMAKE_ARGUMENTS} "${BASIS_SOURCE_DIR}"
+      COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" ${CMAKE_ARGUMENTS} "${BASIS_SOURCE_DIR}"
       WORKING_DIRECTORY "${BASIS_BINARY_DIR}"
     )
     # build
-    execute_process (COMMAND "${CMAKE_BUILD_TOOL}" all WORKING_DIRECTORY "${BASIS_BINARY_DIR}")
+    execute_process (COMMAND "${CMAKE_COMMAND}" --build "${BASIS_BINARY_DIR}" --config Release)
     # install
     if (BASIS_INSTALL_PREFIX)
-      execute_process (COMMAND "${CMAKE_BUILD_TOOL}" install WORKING_DIRECTORY "${BASIS_BINARY_DIR}")
+      execute_process (COMMAND "${CMAKE_COMMAND}" --build "${BASIS_BINARY_DIR}" --config Release --target install)
       set (BASIS_DIR "${BASIS_INSTALL_PREFIX}" PARENT_SCOPE)
     else ()
       set (BASIS_DIR "${BASIS_BINARY_DIR}" PARENT_SCOPE)


Remove a GL ES 2 reference in the 1.7 branch

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -92,10 +92,6 @@
 find_package(OpenGLES)
 macro_log_feature(OPENGLES_FOUND "OpenGL ES" "Support for the OpenGL ES 1.x render system" "http://www.khronos.org/opengles/" FALSE "" "")

-# Find OpenGL ES 2.x
-#find_package(OpenGLES2)
-#macro_log_feature(OPENGLES2_FOUND "OpenGL ES 2" "Support for the OpenGL ES 2.x render system" "http://www.khronos.org/opengles/" FALSE "" "")
-
 # Find DirectX
 if(WIN32)
 	find_package(DirectX)


Dependencies: make sure we capture our self-build SDL2 on Linux

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -119,6 +119,7 @@
             -E make_directory ${PROJECT_BINARY_DIR}/SDL2-build)
         execute_process(COMMAND ${BUILD_COMMAND_COMMON}
             -DSDL_STATIC=FALSE
+            -DCMAKE_INSTALL_LIBDIR=lib
             ${PROJECT_BINARY_DIR}/SDL2-2.0.22
             WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/SDL2-build)
         execute_process(COMMAND ${CMAKE_COMMAND}


BUG: variables which were "0" would not be passed

--- CMake/VariableList.cmake
+++ CMake/VariableList.cmake
@@ -7,7 +7,7 @@
 #
 function( VariableListToCache var_list cache )
   foreach( var IN LISTS ${var_list} )
-    if( ${var} ) # if variable has been set
+    if( NOT ${var} STREQUAL "" ) # if variable has been set
       get_property( type CACHE ${var} PROPERTY TYPE )
       get_property( advanced CACHE ${var} PROPERTY ADVANCED )
       get_property( helpstring CACHE ${var} PROPERTY HELPSTRING )
@@ -31,7 +31,7 @@
 #
 function( VariableListToArgs var_list args )
   foreach( var IN LISTS ${var_list} )
-    if( ${var} ) # if variable has been set
+    if( NOT ${var} STREQUAL "" ) # if variable has been set
       get_property( type CACHE ${var} PROPERTY TYPE )
       list( APPEND _args "-D${var}:${type}=${${var}}" )
     endif()


Update CTK for VS 2010 support and make revision tags customizable.

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -14,10 +14,17 @@
   SET(CTK_DEPENDS ${proj})

   IF(NOT DEFINED CTK_DIR)
+
+    SET(revision_tag e80497a32aadaf2099f7)
+    IF(${proj}_REVISION_TAG)
+      SET(revision_tag ${${proj}_REVISION_TAG})
+    ENDIF()
+
     ExternalProject_Add(${proj}
       GIT_REPOSITORY git://github.com/commontk/CTK.git
-      GIT_TAG f6c3e844ffedbac6f3139265fbdd19c979e44152
+      GIT_TAG ${revision_tag}
       BINARY_DIR ${proj}-build
+      UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}
       CMAKE_ARGS


incompressible: append solver name to test name

--- phSolver/incompressible/test/testing.cmake
+++ phSolver/incompressible/test/testing.cmake
@@ -1,4 +1,4 @@
-set(testLabel "phsolver_incompressible")
+set(testLabel "phsolver_incompressible_${solver}")
 add_test(NAME ${testLabel}_sync
   COMMAND ${CMAKE_COMMAND}
   -DNAME=${casename}


Use prebuilt swig.exe when on Windows.

Use prebuilt swig.exe when on Windows.

--- external/Swig.cmake
+++ external/Swig.cmake
@@ -27,17 +27,22 @@

 if (NOT SWIG_FOUND)
   # Build SWIG from source.
-  ExternalProject_Add(
-    Swig
-    URL http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz
-    UPDATE_COMMAND ""
-    CONFIGURE_COMMAND
-      curl -OL http://downloads.sourceforge.net/project/pcre/pcre/8.37/pcre-8.37.tar.gz &&
-      ${EP_BASE}/Source/Swig/Tools/pcre-build.sh &&
-      ${EP_BASE}/Source/Swig/configure --prefix=${EP_BASE}/Install --enable-cpp11-testing
-  )
-  set(SWIG_EXECUTABLE ${EP_BASE}/Install/bin/swig)
-  set(SWIG_DIR ${EP_BASE}/Install/share/swig/3.0.2)
+  if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+    set(SWIG_EXECUTABLE
+        ${PROJECT_SOURCE_DIR}/${PLATFORM}${BITNESS}/bin/swig.exe)
+  else()
+    ExternalProject_Add(
+      Swig
+      URL http://prdownloads.sourceforge.net/swig/swig-3.0.2.tar.gz
+      UPDATE_COMMAND ""
+      CONFIGURE_COMMAND
+        curl -OL http://downloads.sourceforge.net/project/pcre/pcre/8.37/pcre-8.37.tar.gz &&
+        ${EP_BASE}/Source/Swig/Tools/pcre-build.sh &&
+        ${EP_BASE}/Source/Swig/configure --prefix=${EP_BASE}/Install --enable-cpp11-testing
+    )
+    set(SWIG_EXECUTABLE ${EP_BASE}/Install/bin/swig)
+    set(SWIG_DIR ${EP_BASE}/Install/share/swig/3.0.2)
+  endif()
 else()
   # Create a dummy target to depend on.
   add_custom_target(Swig)


[cmake] define DUNE_STUFF_SSIZE_T

[cmake] define DUNE_STUFF_SSIZE_T

--- config.h.cmake
+++ config.h.cmake
@@ -1,4 +1,7 @@
 /* begin dune-stuff */
+
+/* We need this for the python bindings (there is no unsigned in python). */
+#define DUNE_STUFF_SSIZE_T long int

 /* Define to the version of dune-stuff */
 #define DUNE_STUFF_VERSION "${DUNE_STUFF_VERSION}"
@@ -20,4 +23,4 @@

 #define DS_OVERRIDE ${DS_OVERRIDE}
 #define DS_FINAL  ${DS_FINAL}
-/* end dune-stuff */+/* end dune-stuff */


Fixed arabica compilation architectures

Fixed arabica compilation architectures

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -754,7 +754,7 @@
       -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS_WITH_ARCHS}
       -DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
       -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-      -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
+      -DCMAKE_OSX_ARCHITECTURES=${ARCHS}
       -DCMAKE_INSTALL_PREFIX=${ARABICA_PREFIX}
       -DBUILD_ARABICA_EXAMPLES=OFF)
 add_external_project_step(${ARABICA_TARGET} set_install_names


disable jaspReliability cause https://github.com/jasp-stats/INTERNAL-jasp/issues/2170

--- Tools/CMake/Modules.cmake
+++ Tools/CMake/Modules.cmake
@@ -43,7 +43,7 @@
     "jaspNetwork"
     "jaspQualityControl"
     "jaspProphet"
-    "jaspReliability"
+   # "jaspReliability"
     "jaspSem"
     "jaspSummaryStatistics"
     "jaspVisualModeling"


Squashed 'CMake/' changes from 47da3bb..8df00a2

8df00a2 Less make spam.

git-subtree-dir: CMake
git-subtree-split: 8df00a2d6292bd98cbbcbf2f433263ae21e5ac5a

--- Tools/FindFlexBison.cmake
+++ Tools/FindFlexBison.cmake
@@ -6,5 +6,7 @@
 find_package (FLEX)
 find_package (BISON)

-message ("Flex version: ${FLEX_VERSION}")
-message ("Bison version: ${BISON_VERSION}")
+if (FLEX_EXECUTABLE AND BISON_EXECUTABLE)
+	message ("Flex version: ${FLEX_VERSION}")
+	message ("Bison version: ${BISON_VERSION}")
+endif ()


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


cmake/BuildPCRE2.cmake: back to an INSTALL_COMMAND with DESTDIR= - it fails with MSBuild and this not understood [ci skip]

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -42,7 +42,7 @@
   PREFIX "${CMAKE_CURRENT_BINARY_DIR}/pcre2"
   CMAKE_ARGS ${_PCRE2_CMAKE_ARGS}
   CMAKE_CACHE_ARGS ${_CMAKE_CACHE_ARGS}
-  INSTALL_COMMAND ""
+  INSTALL_COMMAND "${CMAKE_MAKE_PROGRAM}" install "DESTDIR="
   )
 SET (PCRE2_INCLUDE_DIR "${3RDPARTY_OUTPUT_PATH}/include")
 IF (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL Debug) OR (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo))


fix mpi find

fix mpi find

--- cmake/CommonDefs.cmake
+++ cmake/CommonDefs.cmake
@@ -176,11 +176,12 @@

 macro(add_mpi)
     find_package (MPI)
-    message(STATUS "MPI includes: " ${MPI_INCLUDE_DIRS} )
+    message(STATUS "MPI includes: " ${MPI_CXX_INCLUDE_PATH} )
     message(STATUS "MPI CXX libs: " ${MPI_CXX_LIBRARIES} )
     message(STATUS "MPI definitions : " ${MPI_CXX_COMPILE_FLAGS} ${MPI_C_COMPILE_FLAGS})
     add_definitions(${MPI_CXX_COMPILE_FLAGS}  ${MPI_C_COMPILE_FLAGS})
     target_link_libraries(${PROJECT_NAME} PUBLIC ${MPI_CXX_LIBRARIES})
+    include_directories(${MPI_CXX_INCLUDE_PATH})
 endmacro(add_mpi)

 # Usage: add_this_package(srcs...)


CMake: $<CONFIG> prefered over $<CONFIGURATION>

--- cmake/DaemonGame.cmake
+++ cmake/DaemonGame.cmake
@@ -76,7 +76,7 @@
                 CMAKE_ARGS
                     -DFORK=2
                     -DCMAKE_TOOLCHAIN_FILE=${Daemon_SOURCE_DIR}/cmake/toolchain-pnacl.cmake
-                    -DCMAKE_BUILD_TYPE=$<CONFIGURATION>
+                    -DCMAKE_BUILD_TYPE=$<CONFIG>
                     -DDEPS_DIR=${DEPS_DIR}
                     -DBUILD_CGAME=${BUILD_CGAME}
                     -DBUILD_SGAME=${BUILD_SGAME}


Delete FindEigen3.cmake, now is provided by YCM

Relative YCM issue : https://github.com/robotology/ycm/issues/25

--- cmake/FindEigen3.cmake
+++ cmake/FindEigen3.cmake
@@ -1,81 +0,0 @@
-# - Try to find Eigen3 lib
-#
-# This module supports requiring a minimum version, e.g. you can do
-#   find_package(Eigen3 3.1.2)
-# to require version 3.1.2 or newer of Eigen3.
-#
-# Once done this will define
-#
-#  EIGEN3_FOUND - system has eigen lib with correct version
-#  EIGEN3_INCLUDE_DIR - the eigen include directory
-#  EIGEN3_VERSION - eigen version
-
-# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
-# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
-# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
-# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
-
-if(NOT Eigen3_FIND_VERSION)
-  if(NOT Eigen3_FIND_VERSION_MAJOR)
-    set(Eigen3_FIND_VERSION_MAJOR 2)
-  endif(NOT Eigen3_FIND_VERSION_MAJOR)
-  if(NOT Eigen3_FIND_VERSION_MINOR)
-    set(Eigen3_FIND_VERSION_MINOR 91)
-  endif(NOT Eigen3_FIND_VERSION_MINOR)
-  if(NOT Eigen3_FIND_VERSION_PATCH)
-    set(Eigen3_FIND_VERSION_PATCH 0)
-  endif(NOT Eigen3_FIND_VERSION_PATCH)
-
-  set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
-endif(NOT Eigen3_FIND_VERSION)
-
-macro(_eigen3_check_version)
-  file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
-
-  string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
-  set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
-  string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
-  set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
-  string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
-  set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
-
-  set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
-  if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-    set(EIGEN3_VERSION_OK FALSE)
-  else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-    set(EIGEN3_VERSION_OK TRUE)
-  endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
-
-  if(NOT EIGEN3_VERSION_OK)
-
-    message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
-                   "but at least version ${Eigen3_FIND_VERSION} is required")
-  endif(NOT EIGEN3_VERSION_OK)
-endmacro(_eigen3_check_version)
-
-if (EIGEN3_INCLUDE_DIR)
-
-  # in cache already
-  _eigen3_check_version()
-  set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
-
-else (EIGEN3_INCLUDE_DIR)
-
-  find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
-      PATHS
-      ${CMAKE_INSTALL_PREFIX}/include
-      ${KDE4_INCLUDE_DIR}
-      PATH_SUFFIXES eigen3 eigen
-    )
-
-  if(EIGEN3_INCLUDE_DIR)
-    _eigen3_check_version()
-  endif(EIGEN3_INCLUDE_DIR)
-
-  include(FindPackageHandleStandardArgs)
-  find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
-
-  mark_as_advanced(EIGEN3_INCLUDE_DIR)
-
-endif(EIGEN3_INCLUDE_DIR)
-


Fix minor issue in command line tool cmake module

Would cause error when appending to cflags in a project specific CMakeLists.txt

--- cmake/cline_tool.cmake
+++ cmake/cline_tool.cmake
@@ -15,8 +15,8 @@
 #

 macro(add_command_line_tool name)
-    set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-O3")
-    set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-O3")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
     set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
     add_executable(${name} ${ARGN})
 endmacro()


[axl_cmake] keep LUA_LIB_NAME if LUA_LIB_DIR is not set

--- cmake/import_lua.cmake
+++ cmake/import_lua.cmake
@@ -30,11 +30,18 @@
 endif ()

 if (NOT LUA_LIB_DIR)
-	axl_find_lib_dir_ex (
-		RESULT_LIB_DIR LUA_LIB_DIR
-		RESULT_LIB_NAME LUA_LIB_NAME
-		LIB_NAME ${_LUA_NAME_LIST}
-		)
+	if (NOT_LUA_LIB_NAME)
+		axl_find_lib_dir_ex (
+			RESULT_LIB_DIR LUA_LIB_DIR
+			RESULT_LIB_NAME LUA_LIB_NAME
+			LIB_NAME ${_LUA_NAME_LIST}
+			)
+	else ()
+		axl_find_lib_dir_ex (
+			RESULT_LIB_DIR LUA_LIB_DIR
+			LIB_NAME ${LUA_LIB_NAME}
+			)
+	endif ()
 elseif (NOT LUA_LIB_NAME)
 	axl_find_lib_dir_ex (
 		RESULT_LIB_NAME LUA_LIB_NAME
@@ -43,7 +50,7 @@
 		)
 endif ()

-if (EXISTS ${LUA_INC_DIR}/lua.h AND LUA_LIB_NAME)
+if (EXISTS ${LUA_INC_DIR}/lua.h AND LUA_LIB_DIR AND LUA_LIB_NAME)
 	axl_message ("Lua paths:")
 	axl_message ("    Includes:"  "${LUA_INC_DIR}")
 	axl_message ("    Library dir:" "${LUA_LIB_DIR}")


Suppress warning message about turning tk-related devices OFF for the case
when they are all OFF already.

svn path=/trunk/; revision=7975

--- cmake/modules/tk.cmake
+++ cmake/modules/tk.cmake
@@ -44,12 +44,14 @@
 # tkwin_SOURCE		  - list of source files other than tkwin.c

 if(NOT ENABLE_tk)
-  message(STATUS
-  "WARNING: ENABLE_tk OFF.  Setting PLD_tk, PLD_ntk, and PLD_tkwin OFF."
-  )
-  set(PLD_tk OFF CACHE BOOL "Enable tk device" FORCE)
-  set(PLD_ntk OFF CACHE BOOL "Enable ntk device" FORCE)
-  set(PLD_tkwin OFF CACHE BOOL "Enable tkwin device" FORCE)
+  if(PLD_tk OR PLD_ntk OR PLD_tkwin)
+    message(STATUS
+    "WARNING: ENABLE_tk OFF.  Setting PLD_tk, PLD_ntk, and PLD_tkwin OFF."
+    )
+    set(PLD_tk OFF CACHE BOOL "Enable tk device" FORCE)
+    set(PLD_ntk OFF CACHE BOOL "Enable ntk device" FORCE)
+    set(PLD_tkwin OFF CACHE BOOL "Enable tkwin device" FORCE)
+  endif(PLD_tk OR PLD_ntk OR PLD_tkwin)
 endif(NOT ENABLE_tk)

 # Transform TK_INCLUDE_PATH (which is a list) to blank-delimited flag form.


only clean the test results of the current project (fix #737)

--- cmake/test/tests.cmake
+++ cmake/test/tests.cmake
@@ -74,10 +74,15 @@
   add_custom_target(run_tests)
 endif()

-# create target to clean test results
+# create target to clean all test results
 if(NOT TARGET clean_test_results)
   add_custom_target(clean_test_results
     COMMAND ${CMAKE_COMMAND} -E remove_directory ${CATKIN_TEST_RESULTS_DIR})
+endif()
+# create target to clean project specific test results
+if(NOT TARGET clean_test_results_${PROJECT_NAME})
+  add_custom_target(clean_test_results_${PROJECT_NAME}
+    COMMAND ${CMAKE_COMMAND} -E remove_directory ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME})
 endif()

 #
@@ -140,5 +145,5 @@
   add_custom_target(_run_tests_${PROJECT_NAME}_${type}_${name}
     COMMAND ${cmd})
   add_dependencies(_run_tests_${PROJECT_NAME}_${type} _run_tests_${PROJECT_NAME}_${type}_${name})
-  add_dependencies(_run_tests_${PROJECT_NAME}_${type}_${name} clean_test_results tests ${_testing_DEPENDENCIES})
+  add_dependencies(_run_tests_${PROJECT_NAME}_${type}_${name} clean_test_results_${PROJECT_NAME} tests ${_testing_DEPENDENCIES})
 endfunction()


disable flag for vigra numpy -- default off

--- vigra.cmake
+++ vigra.cmake
@@ -18,7 +18,16 @@
 include (hdf5)
 include (python)
 include (boost)
-include (numpy)
+
+if (NOT DISABLE_VIGRANUMPY)
+    include (numpy)
+    set(NUMPY_DEP ${numpy_NAME})
+    set(WITH_VIGRANUMPY "TRUE")
+else()
+    set(NUMPY_DEP "")
+    set(WITH_VIGRANUMPY "FALSE")
+endif()
+
 include (nose)

 # select the desired VIGRA commit
@@ -43,7 +52,7 @@
 message ("Installing ${vigra_NAME}/${VIGRA_VERSION} into FlyEM build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${vigra_NAME}
     DEPENDS             ${libjpeg_NAME} ${libtiff_NAME} ${libpng_NAME} ${openexr_NAME} ${libfftw_NAME}
-                        ${hdf5_NAME} ${python_NAME} ${boost_NAME} ${numpy_NAME} ${nose_NAME}
+    ${hdf5_NAME} ${python_NAME} ${boost_NAME} ${NUMPY_DEP} ${nose_NAME}
     PREFIX              ${BUILDEM_DIR}
     GIT_REPOSITORY      ${vigra_URL}
     #URL                 ${vigra_URL}
@@ -67,6 +76,7 @@
         -DHDF5_HL_LIBRARY=${BUILDEM_DIR}/lib/libhdf5_hl.${BUILDEM_PLATFORM_DYLIB_EXTENSION}
         -DHDF5_INCLUDE_DIR=${BUILDEM_DIR}/include
         -DFFTW3F_INCLUDE_DIR=
+        -DWITH_VIGRANUMPY=${WITH_VIGRANUMPY}
         -DFFTW3F_LIBRARY=
         -DFFTW3_INCLUDE_DIR=${BUILDEM_DIR}/include
         -DFFTW3_LIBRARY=${BUILDEM_DIR}/lib/libfftw3.${BUILDEM_PLATFORM_DYLIB_EXTENSION}


vigra.cmake: Fixed syntax error in warning message.


fix disabling of building of clang-format on Solaris

--- projects/clangformat.cmake
+++ projects/clangformat.cmake
@@ -15,7 +15,7 @@
   if(NOT (XP_DEFAULT OR XP_PRO_LLVM))
     return()
   endif()
-  if(${CMAKE_SYSTE_NAME} STREQUAL "SunOS")
+  if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
     return() # we don't build clang-format on Solaris
     # at first we didn't have the right version of python
     # but even after getting python 2.7, we had linker errors


Split off 7.12.72

Split off 7.12.72

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

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


Split off 8.2.6

Split off 8.2.6

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

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


Fix cmake warning in newer verisons of cmake.

--- build/cmake/package.cmake
+++ build/cmake/package.cmake
@@ -252,8 +252,14 @@
   COMMAND rm -rf ${WORK_DIR}/package-dest-hadoop-analytics
 )

+# CMake policy CMP0037 to allow target named "test".
+cmake_policy(PUSH)
+if(POLICY CMP0037)
+  cmake_policy(SET CMP0037 OLD)
+endif()
 add_custom_target(
   package
   COMMAND ${CMAKE_BUILD_TOOL} package-core
   COMMAND ${CMAKE_BUILD_TOOL} package-hadoop-analytics
 )
+cmake_policy(POP)


Reapplying r256836 with a fix for MSVC 14 support.

Enable more strict standards conformance in MSVC for rvalue casting and string literal type conversion to non-const types. Also enables generation of intrinsics for more functions.

Patch by Alexander Riccio

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -371,6 +371,23 @@

   append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)

+  # /Zc:strictStrings is incompatible with VS12's (Visual Studio 2013's)
+  # debug mode headers. Instead of only enabling them in VS2013's debug mode,
+  # we'll just enable them for Visual Studio 2015 (VS 14, MSVC_VERSION 1900)
+  # and up.
+  if (NOT (MSVC_VERSION LESS 1900))
+    # Disable string literal const->non-const type conversion.
+    # "When specified, the compiler requires strict const-qualification
+    # conformance for pointers initialized by using string literals."
+    append("/Zc:strictStrings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  endif(NOT (MSVC_VERSION LESS 1900))
+
+  # "Generate Intrinsic Functions".
+  append("/Oi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+  # "Enforce type conversion rules".
+  append("/Zc:rvalueCast" CMAKE_CXX_FLAGS)
+
   if (NOT LLVM_ENABLE_TIMESTAMPS AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     # clang-cl and cl by default produce non-deterministic binaries because
     # link.exe /incremental requires a timestamp in the .obj file.  clang-cl


Fix for ROOT-6893 - Davix not enabled by default after building it with the davix option

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -202,6 +202,11 @@
 set(davixlibdir ${DAVIX_LIBRARY_DIR})
 set(davixlib ${DAVIX_LIBRARY})
 set(davixincdir ${DAVIX_INCLUDE_DIR})
+if(davix)
+  set(useoldwebfile no)
+else()
+  set(useoldwebfile yes)
+endif()

 set(buildnetxng ${value${netxng}})
 if(netxng)


Correct the return values for the ungetc check

--- src/pal/src/configure.cmake
+++ src/pal/src/configure.cmake
@@ -879,12 +879,13 @@
 check_cxx_source_runs("
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>

 int main(void)
 {
   char* szFileName;
   FILE* pFile = NULL;
-  int ret = 0;
+  int ret = 1;

   szFileName = tempnam(\".\", \"tmp\");

@@ -892,11 +893,11 @@
   pFile = fopen(szFileName, \"a\");
   if (pFile == NULL)
   {
-    exit(1);
+    exit(0);
   }
   if (ungetc('A', pFile) != EOF)
   {
-    ret = 1;
+    ret = 0;
   }
   unlink(szFileName);
   exit(ret);


ENH: Make the number of headers settable.

This make the number of headers included in the header test settable.  This is
done through the CMake cache variable.

Intermittent bugs still show up because the header order changes randomly.  If
this MAXIMUM_NUMBER_OF_HEADERS is set to 1, it should detect all the the bugs.

The result of a discussion with Bill Lorenson and Arnaud Gelas.

Change-Id: I410632658e9ac89558fc6e488e393e5c78f682bc

--- CMake/ITKModuleHeaderTest.cmake
+++ CMake/ITKModuleHeaderTest.cmake
@@ -10,7 +10,9 @@

 # The maximum number of headers in a test.  (This helps limit memory issues,
 # and the cppcheck tests.)
-set( MAXIMUM_NUMBER_OF_HEADERS 35 )
+set( MAXIMUM_NUMBER_OF_HEADERS 35
+  CACHE STRING "The number of headers in a HeaderTest code." )
+mark_as_advanced( MAXIMUM_NUMBER_OF_HEADERS )

 add_custom_target( ITKHeaderTests
   ${CMAKE_COMMAND} --build ${ITK_BINARY_DIR}


CMake: Remove debug warning.

CMake: Remove debug warning.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -55,7 +55,6 @@
             if(${COND})
             else()
                 set (${VAR} ${CONDITION_VALUE})
-                message(WARNING "Reset ${VAR} to ${CONDITION_VALUE} because condition not satisfied: ${COND}")
                 break()
             endif ()
         endforeach()


Issue #43: Specify Major/Minor python version in boost library name.

--- CMake/mpAddPythonBindings.cmake
+++ CMake/mpAddPythonBindings.cmake
@@ -35,7 +35,7 @@
   if(BUILD_Python_Boost)
     list(APPEND MYPROJECT_BOOST_LIBS "system")
     if (${PYTHON_VERSION_MAJOR} EQUAL 3 AND WITHIN_SUBBUILD)
-      list(APPEND MYPROJECT_BOOST_LIBS "python3")
+      list(APPEND MYPROJECT_BOOST_LIBS "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
     else()
       list(APPEND MYPROJECT_BOOST_LIBS "python")
     endif()


fpta-make: fix message space (cosmetic).

--- cmake.fpta/compiler.cmake
+++ cmake.fpta/compiler.cmake
@@ -3,7 +3,7 @@
 #
 if(NOT (CMAKE_C_COMPILER_ID STREQUAL CMAKE_CXX_COMPILER_ID))
   message(WARNING "CMAKE_C_COMPILER_ID (${CMAKE_C_COMPILER_ID}) is different "
-    "from CMAKE_CXX_COMPILER_ID (${CMAKE_CXX_COMPILER_ID})."
+    "from CMAKE_CXX_COMPILER_ID (${CMAKE_CXX_COMPILER_ID}). "
     "The final binary may be unusable.")
 endif()


Update LibFindMacros.cmake

Update LibFindMacros.cmake

remove AICS copyright because this script is public domain source

--- cmake/LibFindMacros.cmake
+++ cmake/LibFindMacros.cmake
@@ -1,13 +1,3 @@
-###################################################################################
-#
-# PDMlib - Particle Data Management library
-#
-#
-# Copyright (c) 2014 Advanced Institute for Computational Science, RIKEN.
-# All rights reserved.
-#
-###################################################################################
-
 # Version 2.2
 # Public Domain, originally written by Lasse Kärkkäinen <tronic>
 # Maintained at https://github.com/Tronic/cmake-modules


Adding package prefix to the location of the package created by CPack.  This is to make it easier for the buildbot to upload the package and sync. it with the physiomeproject website.  https://tracker.physiomeproject.org/show_bug.cgi?id=3439

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

--- cmake/ZincPackaging.cmake
+++ cmake/ZincPackaging.cmake
@@ -44,6 +44,7 @@

 message(STATUS "'zinc-${ZINC_VERSION}-${ZINC_ARCHITECTURE}-${ZINC_SYSTEM}'" )
 SET( CPACK_PACKAGE_FILE_NAME "zinc-${ZINC_VERSION}-${ZINC_ARCHITECTURE}-${ZINC_SYSTEM}" )
+SET( CPACK_OUTPUT_FILE_PREFIX "package" )

 INCLUDE(CPack)


code-analysis: Removed logging.

code-analysis: Removed logging.

--- cmake/code-analysis.cmake
+++ cmake/code-analysis.cmake
@@ -5,17 +5,17 @@
 # Verify if static analysis is possible

 if(NOT CPPCHECK)
-    message(WARNING "- Cppcheck not found.")
+    message("STATIC ANALYSIS - Cppcheck not found.")
     set(SKIP_ANALYSIS true)
 endif()

 if(NOT CPPCHECK_JUNIT)
-    message(WARNING "- Cppcheck-junit not found.")
+    message("STATIC ANALYSIS - Cppcheck-junit not found.")
     set(SKIP_ANALYSIS true)
 endif()

 if(NOT CPPCHECK_HTML)
-    message(WARNING "- Cppcheck-html not found.")
+    message("STATIC ANALYSIS - Cppcheck-html not found.")
     set(SKIP_ANALYSIS true)
 endif()

@@ -25,18 +25,12 @@
     add_custom_target( ${ANALYSIS_ALL}
         COMMENT "Main target for all static analysis targets."
     )
-
-    message("STATIC ANALYSIS")
-    message("- Target '${ANALYSIS_ALL}' will build all static analysis targets. Run the following to generate reports:\n \
-    \tcmake --build . --target static_analysis_all\n \
-    \tcmake --build . --target install"
-    )
+    message("STATIC ANALYSIS - To generate reports: `cmake --build . --target static_analysis_all`" )
 endif()

 function(setup_target_for_analysis TARGET)
-    message("STATIC ANALYSIS")
     if(SKIP_ANALYSIS OR NOT TARGET)
-        message("- Skipping setting up static analysis for target '${TARGET}'...\n")
+        return()
     else()
         setup_target_for_analysis_internal( ${TARGET} )
     endif()
@@ -106,8 +100,5 @@
         OPTIONAL
     )

-    message("- Static analysis setup for target '${TARGET}' in:\n
-    \t\"${TARGET_BINARY_DIR}\".\n \
-    \tReport found at: \"${OUTPUT_FILE}\"\n"
-    )
+    message("STATIC ANALYSIS - Static analysis setup for target '${TARGET}'")
 endfunction()


Add warning messages if pango or pangoft2 not found by pkg-config.

svn path=/trunk/; revision=7316

--- cmake/modules/pango.cmake
+++ cmake/modules/pango.cmake
@@ -26,11 +26,21 @@
   pango
   PANGO_INCLUDE_DIR PANGO_LINK_DIR PANGO_LINK_FLAGS PANGO_CFLAGS
   )
+  if(NOT PANGO_INCLUDE_DIR)
+    message(STATUS
+    "WARNING: pkg-config does not find pango."
+    )
+  endif(NOT PANGO_INCLUDE_DIR)

   pkgconfig(
   pangoft2
   PANGOFT2_INCLUDE_DIR PANGOFT2_LINK_DIR PANGOFT2_LINK_FLAGS PANGOFT2_CFLAGS
   )
+  if(NOT PANGOFT2_INCLUDE_DIR)
+    message(STATUS
+    "WARNING: pkg-config does not find pangoft2."
+    )
+  endif(NOT PANGOFT2_INCLUDE_DIR)
 else(PKGCONFIG_EXECUTABLE)
   message(STATUS
   "WARNING: pango not found because pkg-config not available."


Add paths to look for PVR library in cmake

--- CMakeModules/FindPVRTexLib.cmake
+++ CMakeModules/FindPVRTexLib.cmake
@@ -1,30 +1,39 @@
 # FasTC
-# Copyright (c) 2012 University of North Carolina at Chapel Hill. All rights reserved.
+# Copyright (c) 2013 University of North Carolina at Chapel Hill.
+# All rights reserved.
 #
-# Permission to use, copy, modify, and distribute this software and its documentation for educational,
-# research, and non-profit purposes, without fee, and without a written agreement is hereby granted,
-# provided that the above copyright notice, this paragraph, and the following four paragraphs appear
-# in all copies.
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for educational, research, and non-profit purposes, without
+# fee, and without a written agreement is hereby granted, provided that the
+# above copyright notice, this paragraph, and the following four paragraphs
+# appear in all copies.
 #
-# Permission to incorporate this software into commercial products may be obtained by contacting the
-# authors or the Office of Technology Development at the University of North Carolina at Chapel Hill <otd@unc.edu>.
+# Permission to incorporate this software into commercial products may be
+# obtained by contacting the authors or the Office of Technology Development
+# at the University of North Carolina at Chapel Hill <otd@unc.edu>.
 #
-# This software program and documentation are copyrighted by the University of North Carolina at Chapel Hill.
-# The software program and documentation are supplied "as is," without any accompanying services from the
-# University of North Carolina at Chapel Hill or the authors. The University of North Carolina at Chapel Hill
-# and the authors do not warrant that the operation of the program will be uninterrupted or error-free. The
-# end-user understands that the program was developed for research purposes and is advised not to rely
-# exclusively on the program for any reason.
+# This software program and documentation are copyrighted by the University of
+# North Carolina at Chapel Hill. The software program and documentation are
+# supplied "as is," without any accompanying services from the University of
+# North Carolina at Chapel Hill or the authors. The University of North
+# Carolina at Chapel Hill and the authors do not warrant that the operation of
+# the program will be uninterrupted or error-free. The end-user understands
+# that the program was developed for research purposes and is advised not to
+# rely exclusively on the program for any reason.
 #
-# IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE AUTHORS BE LIABLE TO ANY PARTY FOR
-# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE
-# USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE
-# AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE
+# AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
+# OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF
+# THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA
+# AT CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
 #
-# THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
-# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY
-# STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY
-# OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+# THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY
+# DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY
+# STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON
+# AN "AS IS" BASIS, AND THE UNIVERSITY  OF NORTH CAROLINA AT CHAPEL HILL AND
+# THE AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
 # ENHANCEMENTS, OR MODIFICATIONS.
 #
 # Please send all BUG REPORTS to <pavel@cs.unc.edu>.
@@ -56,6 +65,23 @@
     PATHS "/Applications/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library/OSX_x86/Static"
           "/Applications/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library/OSX_x86/Dynamic"
   )
+ELSEIF(MSVC)
+  find_path(
+    PVRTEXLIB_INCLUDE_DIR PVRTexture.h
+    PATHS "C:/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library/Include"
+  )
+
+  IF(${CMAKE_GENERATOR} MATCHES Win64)
+    find_library(PVRTEXLIB_LIB PVRTexLib
+      PATHS "C:/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library/Windows_x86_64/Static"
+            "C:/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library/Windows_x86_64/Dynamic"
+    )
+  ELSE()
+    find_library(PVRTEXLIB_LIB PVRTexLib
+      PATHS "C:/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library/Windows_x86_32/Static"
+            "C:/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library/Windows_x86_32/Dynamic"
+    )
+  ENDIF()
 ENDIF()

 set(PVRTEXLIB_LIBRARIES ${PVRTEXLIB_LIB} )


Fixed bug in FindTbagPython.cmake script.

--- cmake/TbagFindPackage/FindTbagPython.cmake
+++ cmake/TbagFindPackage/FindTbagPython.cmake
@@ -5,8 +5,8 @@
 #  TbagPython_FIND_VERSION

 macro (tabg_python__find_development_in_interpreter)
-    execute_process(COMMAND "${Python_EXECUTABLE}" "-c"
-                            "import distutils.sysconfig as s; print(s.get_python_inc())"
+    execute_process (COMMAND "${Python_EXECUTABLE}" "-c"
+                             "import distutils.sysconfig as s; print(s.get_python_inc())"
             RESULT_VARIABLE __result
             OUTPUT_VARIABLE __output
             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -16,8 +16,8 @@
         message (FATAL "Python script error (INC): ${__result}")
     endif ()

-    execute_process(COMMAND "${Python_EXECUTABLE}" "-c"
-                            "import distutils.sysconfig as s; print(s.get_config_var('LIBDIR'))"
+    execute_process (COMMAND "${Python_EXECUTABLE}" "-c"
+                             "import distutils.sysconfig as s; print(s.get_config_var('LIBDIR'))"
             RESULT_VARIABLE __result
             OUTPUT_VARIABLE __output
             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -27,8 +27,8 @@
         message (FATAL "Python script error (LIBDIR): ${__result}")
     endif ()

-    execute_process(COMMAND "${Python_EXECUTABLE}" "-c"
-                            "import distutils.sysconfig as s; print(s.get_config_var('PYTHONFRAMEWORKPREFIX'))"
+    execute_process (COMMAND "${Python_EXECUTABLE}" "-c"
+                             "import distutils.sysconfig as s; print(s.get_config_var('PYTHONFRAMEWORKPREFIX'))"
             RESULT_VARIABLE __result
             OUTPUT_VARIABLE __output
             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -38,8 +38,8 @@
         message (FATAL "Python script error (base): ${__result}")
     endif ()

-    execute_process(COMMAND "${Python_EXECUTABLE}" "-c"
-                            "import distutils.sysconfig as s; print(s.get_config_var('LDLIBRARY'))"
+    execute_process (COMMAND "${Python_EXECUTABLE}" "-c"
+                             "import distutils.sysconfig as s; print(s.get_config_var('LDLIBRARY'))"
             RESULT_VARIABLE __result
             OUTPUT_VARIABLE __output
             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -53,8 +53,8 @@
         message (FATAL "Python script error (LDLIBRARY): ${__result}")
     endif ()

-    execute_process(COMMAND "${Python_EXECUTABLE}" "-c"
-                            "import platform as p; print(p.python_version())"
+    execute_process (COMMAND "${Python_EXECUTABLE}" "-c"
+                             "import platform as p; print(p.python_version())"
             RESULT_VARIABLE __result
             OUTPUT_VARIABLE __output
             OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -97,6 +97,10 @@
         endif ()
     endforeach ()

+    if (NOT __python_quiet STREQUAL "QUIET")
+        set (__python_quiet REQUIRED)
+    endif ()
+
     if (__python_last)
         set (__original_cmake_find_framework ${CMAKE_FIND_FRAMEWORK})
         set (__original_python_find_registry ${Python_FIND_REGISTRY})
@@ -105,7 +109,7 @@
     endif ()

     if (__python_interpreter AND NOT Python_Interpreter_FOUND)
-        if (CMAKE_VERSION VERSION_LESS "3.12")
+        #if (CMAKE_VERSION VERSION_LESS "3.12")
             if (TbagPython_PYENV_NAME)
                 set (Python_ROOT_DIR "$ENV{HOME}/.pyenv/versions/${TbagPython_PYENV_NAME}")
                 set (Python_Interpreter_FOUND ON)
@@ -137,12 +141,19 @@
                     set (Python_VERSION_PATCH ${PYTHON_VERSION_PATCH})
                 endif ()
             endif ()
-        else ()
-            if (TbagPython_PYENV_NAME)
-                set (Python_ROOT_DIR "$ENV{HOME}/.pyenv/versions/${TbagPython_PYENV_NAME}")
-            endif ()
-            find_package (Python ${__python_quiet} ${TbagPython_FIND_VERSION} COMPONENTS Interpreter)
-        endif ()
+        #else ()
+        #    if (TbagPython_PYENV_NAME)
+        #        set (Python_ROOT_DIR "$ENV{HOME}/.pyenv/versions/${TbagPython_PYENV_NAME}")
+        #    endif ()
+        #    message (STATUS "[FindTbagPython] Python_ROOT_DIR: ${Python_ROOT_DIR}")
+        #    if ("${TbagPython_FIND_VERSION}" VERSION_LESS "3")
+        #        message (STATUS "[FindTbagPython] Find Python2")
+        #        find_package (Python2 ${__python_quiet} ${TbagPython_FIND_VERSION} COMPONENTS Interpreter)
+        #    else ()
+        #        message (STATUS "[FindTbagPython] Find Python3")
+        #        find_package (Python3 ${__python_quiet} ${TbagPython_FIND_VERSION} COMPONENTS Interpreter)
+        #    endif ()
+        #endif ()
     endif ()

     if (__python_development AND NOT Python_Development_FOUND)


added OpenBLAS stuff

added OpenBLAS stuff

--- cmake/downloaded/autocmake_math_libs.cmake
+++ cmake/downloaded/autocmake_math_libs.cmake
@@ -118,9 +118,9 @@

 set(OPENBLAS_BLAS_INCLUDE_PATH_SUFFIXES)

-set(OPENBLAS_BLAS_HEADERS cblas_openblas.h)
-
-set(OPENBLAS_BLAS_LIBRARY_PATH_SUFFIXES)
+set(OPENBLAS_BLAS_HEADERS cblas_openblas.h openblas_config.h cblas.h f77blas.h)
+
+set(OPENBLAS_BLAS_LIBRARY_PATH_SUFFIXES openblas openblas-base)

 set(OPENBLAS_BLAS_LIBS openblas)


build: allow the user to specify the llvm tools

This is needed for cross-compiling the toolchain to Windows ARM64 on
Windows x64 using Visual Studio which does not permit the NATIVE
sub-build to work properly.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -63,32 +63,36 @@
   endif()

   if(SWIFT_INCLUDE_TOOLS)
-    if(CMAKE_CROSSCOMPILING)
-      set(LLVM_NATIVE_BUILD_DIR "${LLVM_BINARY_DIR}/NATIVE")
-      if(NOT EXISTS "${LLVM_NATIVE_BUILD_DIR}")
-        message(FATAL_ERROR
-          "Attempting to cross-compile swift standalone but no native LLVM build
-          found.  Please cross-compile LLVM as well.")
-      endif()
-
-      if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
-        set(HOST_EXECUTABLE_SUFFIX ".exe")
-      endif()
-
-      if(NOT CMAKE_CONFIGURATION_TYPES)
-        set(LLVM_TABLEGEN_EXE
-          "${LLVM_NATIVE_BUILD_DIR}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+    if(LLVM_TABLEGEN)
+      set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN})
+    else()
+      if(CMAKE_CROSSCOMPILING)
+        set(LLVM_NATIVE_BUILD_DIR "${LLVM_BINARY_DIR}/NATIVE")
+        if(NOT EXISTS "${LLVM_NATIVE_BUILD_DIR}")
+          message(FATAL_ERROR
+            "Attempting to cross-compile swift standalone but no native LLVM build
+            found.  Please cross-compile LLVM as well.")
+        endif()
+
+        if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
+          set(HOST_EXECUTABLE_SUFFIX ".exe")
+        endif()
+
+        if(NOT CMAKE_CONFIGURATION_TYPES)
+          set(LLVM_TABLEGEN_EXE
+            "${LLVM_NATIVE_BUILD_DIR}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+        else()
+          # NOTE: LLVM NATIVE build is always built Release, as is specified in
+          # CrossCompile.cmake
+          set(LLVM_TABLEGEN_EXE
+            "${LLVM_NATIVE_BUILD_DIR}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+        endif()
       else()
-        # NOTE: LLVM NATIVE build is always built Release, as is specified in
-        # CrossCompile.cmake
-        set(LLVM_TABLEGEN_EXE
-          "${LLVM_NATIVE_BUILD_DIR}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
-      endif()
-    else()
-      find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" HINTS ${LLVM_TOOLS_BINARY_DIR}
-        NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-      if(LLVM_TABLEGEN_EXE STREQUAL "LLVM_TABLEGEN_EXE-NOTFOUND")
-        message(FATAL_ERROR "Failed to find tablegen in ${LLVM_TOOLS_BINARY_DIR}")
+        find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" HINTS ${LLVM_TOOLS_BINARY_DIR}
+          NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+        if(LLVM_TABLEGEN_EXE STREQUAL "LLVM_TABLEGEN_EXE-NOTFOUND")
+          message(FATAL_ERROR "Failed to find tablegen in ${LLVM_TOOLS_BINARY_DIR}")
+        endif()
       endif()
     endif()
   endif()


ENH: Added -Wno-long-double for gcc on darwin to prevent dumb compiler warning.

--- itkCMakeOptions.cmake
+++ itkCMakeOptions.cmake
@@ -40,7 +40,10 @@
 ENDIF(UNIX)

 IF(CMAKE_COMPILER_IS_GNUCXX)
-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-50")
+  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-50")
+  IF(APPLE)
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-double")
+  ENDIF(APPLE)
 ENDIF(CMAKE_COMPILER_IS_GNUCXX)

 # force the use of ansi cxx flags (i.e. -LANG:std on sgi )


Spelling error in variable name, caused the setting to never be applied: SPANV_LIBRARY vs SPNAV_LIBRARY

--- cMake/FindSpnav.cmake
+++ cMake/FindSpnav.cmake
@@ -24,6 +24,6 @@
     set(SPNAV_LIBRARIES ${SPNAV_LIBRARY})
 endif()

-mark_as_advanced(SPANV_LIBRARY SPNAV_INCLUDE_DIR)
+mark_as_advanced(SPNAV_LIBRARY SPNAV_INCLUDE_DIR)

 ENDIF(UNIX)


ARROW-17440: [C++] Support RISC-V architecture (#13902)

Signed-off-by: Felix Yan <daabdd4f3e62e5182e138d967561f4d1c9f3cc54@archlinux.org>

Lead-authored-by: Yibo Cai <e732a3f0de35687e82bda0008a72e443d2f69704@arm.com>
Co-authored-by: Felix Yan <daabdd4f3e62e5182e138d967561f4d1c9f3cc54@archlinux.org>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -24,7 +24,9 @@
 message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")

 if(NOT DEFINED ARROW_CPU_FLAG)
-  if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64")
+  if(CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64|X86|x86|i[3456]86")
+    set(ARROW_CPU_FLAG "x86")
+  elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64")
     set(ARROW_CPU_FLAG "armv8")
   elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7")
     set(ARROW_CPU_FLAG "armv7")
@@ -32,8 +34,10 @@
     set(ARROW_CPU_FLAG "ppc")
   elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
     set(ARROW_CPU_FLAG "s390x")
-  else()
-    set(ARROW_CPU_FLAG "x86")
+  elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
+    set(ARROW_CPU_FLAG "riscv64")
+  else()
+    message(FATAL_ERROR "Unknown system processor")
   endif()
 endif()


Document ``z3_add_component()``.

Document ``z3_add_component()``.

--- contrib/cmake/cmake/z3_add_component.cmake
+++ contrib/cmake/cmake/z3_add_component.cmake
@@ -50,6 +50,37 @@
   endforeach()
 endfunction()

+# z3_add_component(component_name
+#   [NOT_LIBZ3_COMPONENT]
+#   SOURCES source1 [source2...]
+#   [COMPONENT_DEPENDENCIES component1 [component2...]]
+#   [PYG_FILES pygfile1 [pygfile2...]]
+# )
+#
+# Declares a Z3 component (as a CMake "object library") with target name
+# ``component_name``.
+#
+# The option ``NOT_LIBZ3_COMPONENT`` declares that the
+# component should not be included in libz3. If this is not specified
+# the component will be included in libz3.
+#
+# The mandatory ``SOURCES`` keyword should be followed by the source files
+# (including any files generated at build or configure time) that are should be
+# included in the component. It is not necessary to list header files here as
+# CMake infers header file dependencies unless that header file is generated at
+# build time.
+#
+# The optional ``COMPONENT_DEPENDENCIES`` keyword should be followed by a list of
+# components that ``component_name`` should depend on. The components listed here
+# must have already been declared using ``z3_add_component()``. Listing components
+# here causes them to be built before ``component_name``. It also currently causes
+# the include directories used by the transistive closure of the dependencies
+# to be added to the list of include directories used to build ``component_name``.
+#
+# The optional ``PYG_FILES`` keyword should be followed by a list of one or
+# more ``<NAME>.pyg`` files that should used to be generate
+# ``<NAME>_params.hpp`` header files used by the ``component_name``.
+#
 macro(z3_add_component component_name)
   CMAKE_PARSE_ARGUMENTS("Z3_MOD" "NOT_LIBZ3_COMPONENT" "" "SOURCES;COMPONENT_DEPENDENCIES;PYG_FILES" ${ARGN})
   message(STATUS "Adding component ${component_name}")


Fixing release/reldebug flags in sandbox apps.

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

--- seqan/util/cmake/FindSeqAn.cmake
+++ seqan/util/cmake/FindSeqAn.cmake
@@ -46,7 +46,7 @@
         # This is mainly important for 64 bit but does not get into the way
         # on 32 bit either at minimal performance impact.
         set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer")
-        set (CMAKE_CXX_FLAGS_RELDEBUG "${CMAKE_CXX_FLAGS_RELEASE} -g")# -fno-omit-frame-pointer")
+        set (CMAKE_CXX_FLAGS_RELDEBUG "${CMAKE_CXX_FLAGS_RELEASE} -g -fno-omit-frame-pointer")

         # Pass CXX flags to flags.
         #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSEQAN_CXX_FLAGS_=\"${CMAKE_CXX_FLAGS}\"")
@@ -240,8 +240,15 @@
 # * A target with the name APP_TARGET will be created and dependencies
 #   of this target to subsequently targets added by seqan_add_test will
 #   be added.
+# * Setup the correct flags for Debug, Release and RelDebug mode.

 macro (seqan_setup_apps APP_TARGET)
+    # Set flags for SeqAn.
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSEQAN_ENABLE_TESTING=0")
+    set (CMAKE_CXX_FLAGS_RELDEBUG "${CMAKE_CXX_FLAGS_RELDEBUG} -DSEQAN_ENABLE_DEBUG=0")
+    set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DSEQAN_ENABLE_DEBUG=0")
+    set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSEQAN_ENABLE_DEBUG=1")
+
     # Add a target for the tests.
     add_custom_target(${APP_TARGET})
     # Create a CMake variable for storing the current test target.
@@ -261,8 +268,15 @@
 # * A target with the name DEMO_TARGET will be created and dependencies of
 #   this target to subsequently targets added by seqan_add_executable will be
 #   added.
+# * Setup the correct flags for Debug, Release and RelDebug mode.

 macro (seqan_setup_demos DEMO_TARGET)
+    # Set flags for SeqAn.
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSEQAN_ENABLE_TESTING=0")
+    set (CMAKE_CXX_FLAGS_RELDEBUG "${CMAKE_CXX_FLAGS_RELDEBUG} -DSEQAN_ENABLE_DEBUG=0")
+    set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DSEQAN_ENABLE_DEBUG=0")
+    set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSEQAN_ENABLE_DEBUG=1")
+
     # Add a target for the tests.
     add_custom_target(${DEMO_TARGET})
     # Create a CMake variable for storing the current test target.


getdeps: allow aliasing sources for add_fb_python_executable

Summary:
* Fix a minor issue with `add_fb_python_executable` where it would
  emit `--main` even if `MAIN_MODULE` had not been specified
* Introduce the ability to rename python sources in the manifest so
  that they have a different install path.
* Note that this changes the DEPENDS parameters to reference abs_sources;
  previously these were using relative paths to the sources pulled directly
  from the SOURCES arguments, but since those can now contain aliasing
  operations we need to pre-process the list.  I switched to abs_sources
  because that was already being maintained.  If for some reason the
  DEPENDS list needs to be relative paths, this will need to be adjusted.

Reviewed By: simpkins

Differential Revision: D17147417

fbshipit-source-id: d0825bfbdad6be658c078aaac6645e6926a1530f

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -47,10 +47,11 @@
 # Build a self-executing python binary.
 #
 # This accepts the same arguments as add_fb_python_library().
-# In addition, a MAIN_MODULE argument is required.  This argument specifies
+#
+# In addition, a MAIN_MODULE argument is accepted.  This argument specifies
 # which module should be started as the __main__ module when the executable is
-# run.
-#
+# run.  If left unspecified, a __main__.py script must be present in the
+# manifest.
 function(add_fb_python_executable EXE_NAME)
   # Parse the arguments
   set(one_value_args BASE_DIR NAMESPACE MAIN_MODULE TYPE)
@@ -105,11 +106,15 @@
     endif()
   endif()

+  if(DEFINED ARG_MAIN_MODULE)
+    set(main_argument "--main" "${ARG_MAIN_MODULE}")
+  endif()
+
   add_custom_command(
     OUTPUT "${output_file}"
     ${extra_cmd_params}
     COMMAND
-      "${MAKE_PYTHON_ARCHIVE}" -o "${EXE_NAME}" --main "${ARG_MAIN_MODULE}"
+      "${MAKE_PYTHON_ARCHIVE}" -o "${EXE_NAME}" ${main_argument}
       ${make_py_args}
     DEPENDS
       ${source_files}
@@ -145,6 +150,11 @@
 #   namespace of "foo.bar"
 # - SOURCES <src1> <...>:
 #   The python source files.
+#   You may optionally specify as source using the form: PATH=ALIAS where
+#   PATH is a relative path in the source tree and ALIAS is the relative
+#   path into which PATH should be rewritten.  This is useful for mapping
+#   an executable script to the main module in a python executable.
+#   e.g.: `python/bin/watchman-wait=__main__.py`
 # - DEPENDS <target1> <...>:
 #   Other python libraries that this one depends on.
 # - INSTALL_DIR <dir>:
@@ -229,23 +239,43 @@
   file(WRITE "${tmp_manifest}" "FBPY_MANIFEST 1\n")
   set(abs_sources)
   foreach(src_path IN LISTS ARG_SOURCES)
+    if("${src_path}" MATCHES "=")
+      # We want to split the string on the `=` sign, but cmake doesn't
+      # provide much in the way of helpers for this, so we rewrite the
+      # `=` sign to `;` so that we can treat it as a cmake list and
+      # then index into the components
+      string(REPLACE "=" ";" src_path_list "${src_path}")
+      list(GET src_path_list 0 src_path)
+      # Note that we ignore the `namespace_dir` in the alias case
+      # in order to allow aliasing a source to the top level `__main__.py`
+      # filename.
+      list(GET src_path_list 1 dest_path)
+    else()
+      unset(dest_path)
+    endif()
+
     get_filename_component(abs_source "${src_path}" ABSOLUTE)
     list(APPEND abs_sources "${abs_source}")
     file(RELATIVE_PATH rel_src "${ARG_BASE_DIR}" "${abs_source}")
+
+    if(NOT DEFINED dest_path)
+      if("${rel_src}" MATCHES "^../")
+        message(
+          FATAL_ERROR "${LIB_NAME}: source file \"${abs_source}\" is not inside "
+          "the base directory ${ARG_BASE_DIR}"
+        )
+      endif()
+      set(dest_path "${namespace_dir}${rel_src}")
+    endif()
+
     target_sources(
       "${LIB_NAME}.py_lib" INTERFACE
       "$<BUILD_INTERFACE:${abs_source}>"
-      "$<INSTALL_INTERFACE:${install_dir}${LIB_NAME}/${namespace_dir}${rel_src}>"
+      "$<INSTALL_INTERFACE:${install_dir}${LIB_NAME}/${dest_path}>"
     )
-    if("${rel_src}" MATCHES "^../")
-      message(
-        FATAL_ERROR "${LIB_NAME}: source file \"${abs_source}\" is not inside "
-        "the base directory ${ARG_BASE_DIR}"
-      )
-    endif()
     file(
       APPEND "${tmp_manifest}"
-      "${abs_source} :: ${namespace_dir}${rel_src}\n"
+      "${abs_source} :: ${dest_path}\n"
     )
   endforeach()
   configure_file("${tmp_manifest}" "${manifest_path}" COPYONLY)
@@ -260,7 +290,7 @@
   # This is needed in case some of the source files are generated.  This will
   # ensure that these source files are brought up-to-date before we build
   # any python binaries that depend on this library.
-  add_custom_target("${LIB_NAME}.py_sources_built" DEPENDS ${ARG_SOURCES})
+  add_custom_target("${LIB_NAME}.py_sources_built" DEPENDS ${abs_sources})
   add_dependencies("${LIB_NAME}.py_lib" "${LIB_NAME}.py_sources_built")

   # Hook up library dependencies, and also make the *.py_sources_built target
@@ -306,7 +336,7 @@
       --install-dir "${LIB_NAME}"
       -o "${build_install_dir}/${LIB_NAME}" "${manifest_path}"
     DEPENDS
-      "${ARG_SOURCES}"
+      "${abs_sources}"
       "${manifest_path}"
       "${MAKE_PYTHON_ARCHIVE}"
   )


COMP: ITKIOMINC has a public dependency on ITKIOImageBase.

This addresses the linker errors:

FAILED: : && /home/matt/.config/dotfiles/bin/ccache-clang++   -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow -Wno-deprecated -Wno-invalid-offsetof -Woverloaded-virtual  -Os -DNDEBUG   Modules/IO/MINC/CMakeFiles/ITKIOMINCHeaderTest1.dir/test/ITKIOMINCHeaderTest1.cxx.o  -o bin/ITKIOMINCHeaderTest1  -rdynamic lib/libITKIOMINC-4.9.so.1 lib/libitksys-4.9.so.1 -ldl -Wl,-rpath,/home/matt/bin/ITK-Clang-MinSizeRel/lib -Wl,-rpath-link,/home/matt/bin/ITK-Clang-MinSizeRel/lib && :
lib/libITKIOMINC-4.9.so.1: undefined reference to `itk::ImageIOBase::OpenFileForReading(std::basic_ifstream<char, std::char_traits<char> >&, std::string const&, bool)'
lib/libITKIOMINC-4.9.so.1: undefined reference to `itk::ImageIOBase::SetDirection(unsigned int, vnl_vector<double> const&)'
lib/libITKIOMINC-4.9.so.1: undefined reference to `itk::ImageIOBase::PrintSelf(std::ostream&, itk::Indent) const'
lib/libITKIOMINC-4.9.so.1: undefined reference to `itk::Object::DebugOff() const'
lib/libITKIOMINC-4.9.so.1: undefined reference to `itk::ImageIOBase::WriteBufferAsASCII(std::ostream&, void const*, itk::ImageIOBase::IOComponentType, long)'
lib/libITKIOMINC-4.9.so.1: undefined reference to `itk::ImageIOBase::GetPixelStride() const'
[...]

Change-Id: I14c497d5a8ec30892610094df4adcc0a50fe35de

--- Modules/IO/MINC/itk-module.cmake
+++ Modules/IO/MINC/itk-module.cmake
@@ -3,7 +3,7 @@

 itk_module(ITKIOMINC
   ENABLE_SHARED
-  COMPILE_DEPENDS
+  DEPENDS
     ITKIOImageBase
   PRIVATE_DEPENDS
     ITKMINC


disable RTCc

disable RTCc

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

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

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


Fix doxygen targets with multiple in one directory.

--- cmake/DoxygenTargets.cmake
+++ cmake/DoxygenTargets.cmake
@@ -274,7 +274,7 @@
 		endif()

 		configure_file("${_doxygenmoddir}/DoxygenTargets.doxyfile.in"
-			"${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.additional"
+			"${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.${DOC_TARGET}.additional"
 			@ONLY)

 		if(IN_DASHBOARD_SCRIPT)
@@ -286,7 +286,7 @@
 		add_custom_target(${DOC_TARGET} ${ALL_IN_DASHBOARD}
 			COMMAND
 			"${DOXYGEN_EXECUTABLE}"
-			"${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.additional"
+			"${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.${DOC_TARGET}.additional"
 			WORKING_DIRECTORY
 			"${CMAKE_CURRENT_SOURCE_DIR}"
 			#MAIN_DEPENDENCY ${DOC_TARGET}