script fix

script fix

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -9,6 +9,7 @@
 ##
 ##   ctest -S /path/to/ctest_script.cmake
 ##
+## It is recommended to make a copy of the file (especially using git).
 ## For extra information
 ##
 ##   ctest -S /path/to/ctest_script.cmake -V
@@ -16,7 +17,8 @@
 ## or even  -VV
 ##
 ## Set execution options in the Configuration part.
-## For multiple tests (eg. different compilers) copy this file and adjust options.
+## For multiple tests (eg. different compilers) make multiple copies
+## of this file and adjust options.
 ##
 ######################################################################

@@ -61,8 +63,8 @@
 set(CTEST_BINARY_DIRECTORY ${CTEST_SOURCE_DIRECTORY}/build_ctest)

 # Update type (eg. svn or git)
-set( UPDATE_TYPE svn)
-set( CTEST_UPDATE_COMMAND "svn") #"${CTEST_SOURCE_DIRECTORY}/cmake/svn_github.sh"
+set( UPDATE_TYPE git)
+set( CTEST_UPDATE_COMMAND "git") #"${CTEST_SOURCE_DIRECTORY}/cmake/svn_github.sh"

 # Timeouts
 set(CTEST_TEST_TIMEOUT 200 CACHE STRING
@@ -72,15 +74,15 @@

 # Build options
 set(gismo_build_options
-    #-DGISMO_BUILD_COVERAGE=ON
-    -DGISMO_PLAINDOX=ON # plain doxygen output for the trac Wiki
     -DGISMO_BUILD_LIB=ON
     -DGISMO_WITH_ONURBS=ON
-    -DGISMO_WITH_IPOPT=ON
-    -DIpOpt_DIR=/home/amantzaflaris/dashboards/IpOpt_inst
-    -DGISMO_WITH_PSOLID=ON
-    -DParasolid_DIR=/home/amantzaflaris/dropboxOUT/gforge/parasolid/26/1/153
-    #-DGISMO_BUILD_AXL=ON -DAxel_DIR=/home/amantzaflaris/build/axel
+    #-DGISMO_WITH_IPOPT=ON
+    #-DIpOpt_DIR=/path/to/ipopt
+    #-DGISMO_WITH_PSOLID=ON
+    #-DParasolid_DIR=/path/to/parasolid
+    #-DGISMO_BUILD_AXL=ON -DAxel_DIR=/path/to/axel
+    #-DGISMO_PLAINDOX=ON
+    #-DGISMO_BUILD_COVERAGE=ON
 )

 # Coverage analysis


fix: restore phtread dependency on microprofile

This broke linux static link compilation

--- cmake/microprofile.cmake
+++ cmake/microprofile.cmake
@@ -29,7 +29,8 @@

 set_target_properties(${MICROPROFILE_BIN} PROPERTIES FOLDER External)

-if(WIN32)
+if(UNIX)
+    target_link_libraries(${MICROPROFILE_BIN} PRIVATE pthread)
+elseif(WIN32)
     target_link_libraries(${MICROPROFILE_BIN} PRIVATE ws2_32)
 endif()
-


Fixes for the DA RPMs

Fixes for the DA RPMs

--- cmake/CMakeDA.cmake
+++ cmake/CMakeDA.cmake
@@ -194,16 +194,18 @@
 	# DAVERSION
 	# execute_process(COMMAND svn info ${CMAKE_SOURCE_DIR}/${DASRC} OUTPUT_VARIABLE _daversion OUTPUT_STRIP_TRAILING_WHITESPACE)
 	# string(REGEX REPLACE ".*Last Changed Rev: ([^\n]+)\n.*" "\\1" DAVERSION ${_daversion}e)
-	execute_process(COMMAND git log -1 --format=%h
-	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${DASRC}
+	execute_process(COMMAND git log -1 --format=%h ${DASRC}
+	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+	  OUTPUT_STRIP_TRAILING_WHITESPACE
 	  OUTPUT_VARIABLE DAVERSION)

 	#DAREVISION
 	# execute_process(COMMAND svn info ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE _darevision OUTPUT_STRIP_TRAILING_WHITESPACE)
         # string(REGEX REPLACE ".*Revision: ([^\n]+)\n.*" "\\1" DAREVISION ${_darevision})
-	execute_process(COMMAND git log -1 --format=%h
-	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${DASRC}
-	  OUTPUT_VARIABLE DAVERSION)
+	execute_process(COMMAND git log -1 --format=%h ${DASRC}
+	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+	  OUTPUT_STRIP_TRAILING_WHITESPACE
+	  OUTPUT_VARIABLE DAREVISION)

 	# DAROOTRELEASE
 	  execute_process(COMMAND root-config --version OUTPUT_VARIABLE _darootrelease OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -213,8 +215,9 @@
 	# string(REGEX REPLACE ".*URL: .*/(.+)/${DASRC}.*$" "\\1" DAALIROOTRELEASE ${_daversion})
         # string (REPLACE "-" "." DAALIROOTRELEASE "${DAALIROOTRELEASE}")
 	execute_process(COMMAND git branch
-	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${DASRC}
-	  OUTPUT_VARIABLE DAVERSION)
+	  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+	  OUTPUT_STRIP_TRAILING_WHITESPACE
+	  OUTPUT_VARIABLE DAALIROOTRELEASE)
         string (REPLACE "* " "" DAALIROOTRELEASE "${DAALIROOTRELEASE}")

 	  set(DAARCNAME "${DATARGETNAME}")


build: fix LZO library detection

build: fix LZO library detection

Signed-off-by: Evan Nemerson <178b62e73cc3fab9e30bf27b2372c9ff92401915@coeus-group.com>

--- cmake/FindLZO.cmake
+++ cmake/FindLZO.cmake
@@ -11,6 +11,7 @@

 if (EXISTS ${LZO_INCLUDE_DIR})
   if (EXISTS ${LZO_LIBRARY})
+    set (LZO_LIBRARIES ${LZO_LIBRARY})
     set (LZO_FOUND "LZO_FOUND")
     break ()
   endif ()


build: ignore libLLD.so when it is a broken symlink

closes #318

--- cmake/Findlld.cmake
+++ cmake/Findlld.cmake
@@ -12,7 +12,7 @@
         /mingw64/include)

 find_library(LLD_LIBRARY NAMES lld-4.0 lld PATHS /usr/lib/llvm-4.0/lib)
-if(LLD_LIBRARY)
+if(EXISTS ${LLD_LIBRARY})
     set(LLD_LIBRARIES ${LLD_LIBRARY})
 else()
     macro(FIND_AND_ADD_LLD_LIB _libname_)


Update Freetype library names.

Update Freetype library names.

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


ENH: fixed Qt Resource handling

ENH: fixed Qt Resource handling

--- CMake/ctkMacroBuildQtPlugin.cmake
+++ CMake/ctkMacroBuildQtPlugin.cmake
@@ -4,7 +4,7 @@
 #
 MACRO(ctkMacroBuildQtPlugin)
   CtkMacroParseArguments(MY
-    "NAME;EXPORT_DIRECTIVE;SRCS;MOC_SRCS;UI_FORMS;INCLUDE_DIRECTORIES;TARGET_LIBRARIES;UI_RESOURCES;LIBRARY_TYPE"
+    "NAME;EXPORT_DIRECTIVE;SRCS;MOC_SRCS;UI_FORMS;INCLUDE_DIRECTORIES;TARGET_LIBRARIES;UI_RESOURCES;QRC_FILES;LIBRARY_TYPE"
     ""
     ${ARGN}
     )
@@ -49,9 +49,9 @@
   QT4_WRAP_CPP(MY_SRCS ${MY_MOC_SRCS})
   QT4_WRAP_UI(MY_UI_CXX ${MY_UI_FORMS})
   SET(MY_QRC_SRCS "")
-  IF(DEFINED MY_UI_RESOURCES)
-    QT4_ADD_RESOURCES(MY_QRC_SRCS ${MY_UI_RESOURCES})
-  ENDIF(DEFINED MY_UI_RESOURCES)
+  IF(DEFINED MY_QRC_FILES)
+    QT4_ADD_RESOURCES(MY_QRC_SRCS ${MY_QRC_FILES})
+  ENDIF(DEFINED MY_QRC_FILES)

   SOURCE_GROUP("Resources" FILES
     ${MY_UI_RESOURCES}


enabled assertions for Clang under windows in RelWithDebInfo mode

--- common/cmake/clang.cmake
+++ common/cmake/clang.cmake
@@ -34,6 +34,9 @@
 SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG")
 SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG")

+# remove define NDEBUG and instead set define DEBUG for config RelWithDebInfo
+STRING(REPLACE "NDEBUG" "DEBUG" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
+
 ELSE()

 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC -std=c++11 -fvisibility-inlines-hidden -fvisibility=hidden -fno-strict-aliasing")


USE_OLD_ABI no longer needed

USE_OLD_ABI no longer needed

--- cmake/CompilerConfig.cmake
+++ cmake/CompilerConfig.cmake
@@ -31,12 +31,6 @@
   set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcs <TARGET> <LINK_FLAGS> <OBJECTS>")
   set(CMAKE_CXX_ARCHIVE_FINISH true)

-#  option(USE_OLD_ABI "Sets _GLIBCXX_USE_CXX11_ABI=0 for CentOS builds" ON)
-#  if(${USE_OLD_ABI})
-#    message(WARNING "*** Setting _GLIBCXX_USE_CXX11_ABI=0 consider changing this when gcc on CentOS is updated")
-#    set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
-#  endif()
-
   if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
     message(STATUS "*** GCC>7 Compiler is too awesome. The following warnings are disabled:")
     message(STATUS "       no-implicit-fallthrough")


CMake: Option to treat warnings as errors

--- cmake/compileoptions.cmake
+++ cmake/compileoptions.cmake
@@ -30,6 +30,9 @@
 #--------------------------------------------------------------------
 # Specify standard compile options
 # ivw_define_standard_properties(target1 [target2 ...])
+
+option(IVW_TREAT_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" ON)
+
 function(ivw_define_standard_properties)
     foreach(target ${ARGN})
         get_property(comp_opts TARGET ${target} PROPERTY COMPILE_OPTIONS)
@@ -37,6 +40,9 @@
         if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
             "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
             "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
+            if(${IVW_TREAT_WARNINGS_AS_ERRORS})
+                list(APPEND comp_opts "-Werror") # Threat warnings as errors
+            endif()
             list(APPEND comp_opts "-Wall")
             list(APPEND comp_opts "-Wextra")
             list(APPEND comp_opts "-pedantic")
@@ -45,6 +51,9 @@
         elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
             string(REGEX REPLACE "(^|;)([/-])W[0-9](;|$)" ";" comp_opts "${comp_opts}") # remove any other waning level
             #list(APPEND comp_opts "/nologo") # Suppress Startup Banner
+            if(${IVW_TREAT_WARNINGS_AS_ERRORS})
+                list(APPEND comp_opts "/WX")     # Threat warnings as errors
+            endif()
             list(APPEND comp_opts "/W4")     # Set default warning level to 4
             list(APPEND comp_opts "/wd4005") # macro redefinition    https://msdn.microsoft.com/en-us/library/8d10sc3w.aspx
             list(APPEND comp_opts "/wd4201") # nameless struct/union https://msdn.microsoft.com/en-us/library/c89bw853.aspx
@@ -127,4 +136,4 @@
             set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_INHIBIT_ALL_WARNINGS YES)
         endif()
     endforeach()
-endfunction()+endfunction()


build(cmake/modules): change driver version to 37aab8

This driver version brings into the following features:
- fix for https://github.com/draios/sysdig/issues/1659 (correct handling
  of the pathnames args for *at syscalls)
- update JQ + builtin oniguruma

Signed-off-by: Leonardo Di Donato <2012e0ca99d70aa6c893822ff73002216e5dba72@gmail.com>

--- cmake/modules/sysdig.cmake
+++ cmake/modules/sysdig.cmake
@@ -23,18 +23,18 @@

 file(MAKE_DIRECTORY ${SYSDIG_CMAKE_WORKING_DIR})

-# The sysdig git reference (branch name, commit hash, or tag)
-# To update sysdig version for the next release, change the default below
-# In case you want to test against another sysdig version just pass the variable - ie., `cmake -DSYSDIG_VERSION=dev ..`
+# The sysdig git reference (branch name, commit hash, or tag) To update sysdig version for the next release, change the
+# default below In case you want to test against another sysdig version just pass the variable - ie., `cmake
+# -DSYSDIG_VERSION=dev ..`
 if(NOT SYSDIG_VERSION)
-  set(SYSDIG_VERSION "build/jq-update") # todo(fntlnz): revert this before merging
-  set(SYSDIG_CHECKSUM "SHA256=12541bcf2f3122c3e03bc71e5f39511d679c378d06d7c976527d13901d029410")
+  set(SYSDIG_VERSION "37aab8debf50140ca8796cfb732218d3ab123640")
+  set(SYSDIG_CHECKSUM "SHA256=48482e8299c092899f2516cc5a1db09fa2747fd03ec29fa555f42b62f1e38aeb")
 endif()
 set(PROBE_VERSION "${SYSDIG_VERSION}")

 # cd /path/to/build && cmake /path/to/source
-execute_process(COMMAND "${CMAKE_COMMAND}" -DSYSDIG_VERSION=${SYSDIG_VERSION} -DSYSDIG_CHECKSUM=${SYSDIG_CHECKSUM} ${SYSDIG_CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${SYSDIG_CMAKE_WORKING_DIR})
-
+execute_process(COMMAND "${CMAKE_COMMAND}" -DSYSDIG_VERSION=${SYSDIG_VERSION} -DSYSDIG_CHECKSUM=${SYSDIG_CHECKSUM}
+                        ${SYSDIG_CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${SYSDIG_CMAKE_WORKING_DIR})

 # todo(leodido, fntlnz) > use the following one when CMake version will be >= 3.13


Add comment on Boost chrono dependency and increase version number

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@7029 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -25,8 +25,12 @@

 # Required boost modules
 find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)
+
+# Starting with Boost 1.50, boost_thread depends on chrono. As this is not
+# taken care of automatically on Windows, we add an explicit dependency as a
+# workaround.
 if(WIN32 AND Boost_VERSION VERSION_GREATER "1.49")
-  find_package(Boost 1.40.0 REQUIRED COMPONENTS chrono)
+  find_package(Boost 1.50.0 REQUIRED COMPONENTS chrono)
 endif(WIN32 AND Boost_VERSION VERSION_GREATER "1.49")

 if(Boost_FOUND)


cmake: make install_name dir configurable

Change-Id: I1812f6e5bcc11a98a229eb12075d3a6d035ebe91
Reviewed-on: http://gerrit.aldebaran.lan:8080/10094
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -287,12 +287,16 @@
     qi_install_target("${name}" SUBFOLDER "${ARG_SUBFOLDER}")
   endif()

+  if(NOT DEFINED QI_INSTALL_NAME_DIR)
+    set(QI_INSTALL_NAME_DIR "@executable_path/../lib")
+  endif()
   if(APPLE)
     set_target_properties("${name}"
       PROPERTIES
-        INSTALL_NAME_DIR "@executable_path/../lib"
+      # Contrary to what the cmake doc says,
+      # this is the only variable that works on mac:
+        INSTALL_NAME_DIR ${QI_INSTALL_NAME_DIR}
         BUILD_WITH_INSTALL_RPATH 1
-
     )
   endif()


Disable C++ code formatting if unable to download diff-clang-format.py from GitHub

--- cmake/CodeFormat.cmake
+++ cmake/CodeFormat.cmake
@@ -29,7 +29,21 @@
 file(DOWNLOAD
     https://raw.githubusercontent.com/ORNL-CEES/Cap/master/diff-clang-format.py
     ${CMAKE_BINARY_DIR}/diff-clang-format.py
+    STATUS status
 )
+list(GET status 0 error_code)
+if(error_code)
+    list(GET status 1 error_string)
+    message(WARNING "Failed downloading diff-clang-format.py from GitHub"
+            " (${error_string})")
+    message("-- " "NOTE: Disabling C++ code formatting because "
+            "diff-clang-format-cpp.py is missing")
+    set(skip TRUE)
+endif()
+
+# Do not bother continuing if not able to fetch diff-clang-format.py
+if(NOT skip)
+
 # Download docopt command line argument parser
 file(DOWNLOAD
     https://raw.githubusercontent.com/docopt/docopt/0.6.2/docopt.py
@@ -72,3 +86,5 @@
     NAME check_format_cpp
     COMMAND ${${PACKAGE_NAME}_BINARY_DIR}/check_format_cpp.sh
 )
+
+endif() # skip when download fails


Update FindARPACK.cmake

Update FindARPACK.cmake

--- cmake/FindARPACK.cmake
+++ cmake/FindARPACK.cmake
@@ -1,14 +1,14 @@
 SET(ARPACK_SEARCH_PATHS ${ARPACK_DIR})

 IF (DEFINED ARPACK_SEARCH_PATHS)
-    FIND_LIBRARY(ARPACK_LIB NAMES arpack PATHS ${ARPACK_SEARCH_PATHS} NO_DEFAULT_PATH)
+    FIND_LIBRARY(ARPACK_LIB NAMES arpack HINTS ${ARPACK_SEARCH_PATHS} lib lib64)
 ELSE (DEFINED ARPACK_SEARCH_PATHS)
     FIND_LIBRARY(ARPACK_LIB NAMES arpack)
 ENDIF (DEFINED ARPACK_SEARCH_PATHS)

 if(USE_MPI)
   IF (DEFINED ARPACK_SEARCH_PATHS)
-    FIND_LIBRARY(PARPACK_LIB NAMES parpack PATHS ${ARPACK_SEARCH_PATHS} NO_DEFAULT_PATH)
+    FIND_LIBRARY(PARPACK_LIB NAMES parpack HINTS ${ARPACK_SEARCH_PATHS} lib lib64)
   ELSE (DEFINED ARPACK_SEARCH_PATHS)
     FIND_LIBRARY(PARPACK_LIB NAMES parpack)
   ENDIF (DEFINED ARPACK_SEARCH_PATHS)


Prevent duplicates in LIBCAF_INCLUDE_DIRS

--- cmake/FindLibcaf.cmake
+++ cmake/FindLibcaf.cmake
@@ -1,23 +1,38 @@
-# - Try to find user-defined components of libcaf
-# Once done this will define
+# Try to find libcaf headers and library.
 #
-#  LIBCAF_INCLUDE_DIRS - include directories for all found components
-#  LIBCAF_LIBRARY_$C   - library for component $C
-#  LIBCAF_FOUND        - system has libcaf
-#  LIBCAF_INCLUDE_DIRS - libcaf include dir
-#  LIBCAF_LIBRARIES    - link againgst libcaf
-#  LIBCAF_VERSION      - version in {major}.{minor}.{patch} format
+# Use this module as follows:
+#
+#     find_package(Libcaf)
+#
+# Variables used by this module (they can change the default behaviour and need
+# to be set before calling find_package):
+#
+#  LIBCAF_ROOT_DIR  Set this variable to the root installation of
+#                   libcaf if the module has problems finding
+#                   the proper installation path.
+#
+# Variables defined by this module:
+#
+#  LIBCAF_FOUND              System has libcaf headers and library
+#  LIBCAF_LIBRARIES          List of library files  for all components
+#  LIBCAF_INCLUDE_DIRS       List of include paths for all components
+#  LIBCAF_LIBRARY_$C         Library file for component $C
+#  LIBCAF_INCLUDE_DIR_$C     Include path for component $C

+# iterate over user-defined components
 foreach (comp ${Libcaf_FIND_COMPONENTS})
+  # we use uppercase letters only for variable names
   string(TOUPPER "${comp}" UPPERCOMP)
   if ("${comp}" STREQUAL "core")
     set(HDRNAME "caf/all.hpp")
   else ()
     set(HDRNAME "caf/${comp}/all.hpp")
   endif ()
-  message(STATUS "Search for libcaf_${comp} and ${HDRNAME}")
+  # look for headers: give CMake hints where to find non-installed CAF versions
+  # note that we look for the headers of each component individually: this is
+  # necessary to support non-installed versions of CAF, i.e., accessing the
+  # checked out "actor-framework" directory structure directly
   set(HDRHINT "actor-framework/libcaf_${comp}")
-  unset(LIBCAF_INCLUDE_DIR)
   find_path(LIBCAF_INCLUDE_DIR_${UPPERCOMP}
             NAMES
               ${HDRNAME}
@@ -33,10 +48,21 @@
               ../../../${HDRHINT})
   mark_as_advanced(LIBCAF_INCLUDE_DIR_${UPPERCOMP})
   if ("${LIBCAF_INCLUDE_DIR_${UPPERCOMP}}" STREQUAL "LIBCAF_INCLUDE_DIR_${UPPERCOMP}-NOTFOUND")
+    # exit on first error
     break ()
   else ()
-    message(STATUS "Found headers for ${HDRNAME}")
+    # add to LIBCAF_INCLUDE_DIRS only if path isn't already set
+    set(duplicate false)
+    foreach (p ${LIBCAF_INCLUDE_DIRS})
+      if (${p} STREQUAL ${LIBCAF_INCLUDE_DIR_${UPPERCOMP}})
+        set(duplicate true)
+      endif ()
+    endforeach ()
+    if (NOT duplicate)
+      set(LIBCAF_INCLUDE_DIRS ${LIBCAF_INCLUDE_DIRS} ${LIBCAF_INCLUDE_DIR_${UPPERCOMP}})
+    endif()
   endif ()
+  # look for (.dll|.so|.dylib) file, again giving hints for non-installed CAFs
   find_library(LIBCAF_LIBRARY_${UPPERCOMP}
                NAMES
                  "caf_${comp}"
@@ -52,14 +78,19 @@
                  ../../../actor-framework/build/lib)
   mark_as_advanced(LIBCAF_LIBRARY_${UPPERCOMP})
   if ("${LIBCAF_LIBRARY_${UPPERCOMP}}" STREQUAL "LIBCAF_LIBRARY-NOTFOUND")
+    # exit on first error
     break ()
   else ()
-    message(STATUS "Found lib: ${LIBCAF_LIBRARY_${UPPERCOMP}}")
+    set(LIBCAF_LIBRARIES ${LIBCAF_LIBRARIES} ${LIBCAF_LIBRARY_${UPPERCOMP}})
   endif ()
 endforeach ()

+# final steps to tell CMake we're done
 include(FindPackageHandleStandardArgs)
-
-mark_as_advanced(
-  LIBCAF_ROOT_DIR
-  LIBCAF_INCLUDE_DIRS)
+find_package_handle_standard_args(libcaf
+                                  DEFAULT_MSG
+                                  LIBCAF_LIBRARIES
+                                  LIBCAF_INCLUDE_DIRS)
+mark_as_advanced(LIBCAF_ROOT_DIR
+                 LIBCAF_LIBRARIES
+                 LIBCAF_INCLUDE_DIRS)


[cmake] also find MATLAB versions R2014{a,b}

--- cmake/FindMATLAB.cmake
+++ cmake/FindMATLAB.cmake
@@ -126,7 +126,7 @@
     IF((NOT DEFINED MATLAB_ROOT) OR ("${MATLAB_ROOT}" STREQUAL ""))

     # Search for a version of Matlab available, starting from the most modern one to older versions
-      FOREACH(MATVER "R2013b" "R2013a" "R2012b" "R2012a" "R2011b" "R2011a" "R2010b" "R2010a" "R2009b" "R2009a" "R2008b")
+      FOREACH(MATVER "R2014b" "R2014a" "R2013b" "R2013a" "R2012b" "R2012a" "R2011b" "R2011a" "R2010b" "R2010a" "R2009b" "R2009a" "R2008b")
         SET(MATLAB_VERSION ${MATVER})
         IF((NOT DEFINED MATLAB_ROOT) OR ("${MATLAB_ROOT}" STREQUAL ""))
           IF(EXISTS /Applications/MATLAB_${MATVER}.app)
@@ -194,4 +194,4 @@
   MATLAB_MEXEXT
   MATLAB_FOUND
   MATLAB_ROOT
-)+)


LaTeX build target -> add_custom_command POST_BUILD.

Fixes make dependency specification.

--- cmake/FindSphinx.cmake
+++ cmake/FindSphinx.cmake
@@ -135,12 +135,13 @@
       "${base_destination}/latex/*.tex"
       )

-    add_custom_target( ${target_base_name}_pdf ALL
+    add_custom_command( TARGET ${target_base_name}_latex
+      POST_BUILD
       COMMAND ${PDFLATEX_COMPILER}
         ${base_destination}/latex/${_texfile}
         -output-directory ${base_destination}/latex
       WORKING_DIRECTORY ${base_destination}/latex
-      DEPENDS ${target_base_name}_latex
+      COMMENT "Building PDF"
       )
   endif()


Make sphinx executable advanced setting

Make sphinx executable advanced setting

This is similar to how dependencies are handled in other projects.

--- cmake/FindSphinx.cmake
+++ cmake/FindSphinx.cmake
@@ -1,3 +1,5 @@
 find_program(SPHINX_EXECUTABLE NAMES sphinx-build HINTS $ENV{SPHINX_DIR} PATH_SUFFIXES bin DOC "Sphinx documentation generator.")
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Sphinx DEFAULT_MSG SPHINX_EXECUTABLE)
+
+mark_as_advanced(SPHINX_EXECUTABLE)


fixed thunderegg inclusion

fixed thunderegg inclusion

--- cmake/ThunderEgg.cmake
+++ cmake/ThunderEgg.cmake
@@ -29,6 +29,8 @@

 # --- required libraries
 find_package(FFTW REQUIRED)
+find_package(BLAS)
+find_package(LAPACK)

 # --- imported target

@@ -43,7 +45,10 @@
 set_target_properties(ThunderEgg::ThunderEgg PROPERTIES
   IMPORTED_LOCATION ${THUNDEREGG_LIBRARIES}
   INTERFACE_INCLUDE_DIRECTORIES ${THUNDEREGG_INCLUDE_DIRS}
-  INTERFACE_LINK_LIBRARIES "FFTW::FFTW;P4EST::P4EST;SC::SC;LAPACK::LAPACK;BLAS::BLAS;MPI::MPI_CXX"
+  INTERFACE_LINK_LIBRARIES "FFTW::FFTW;P4EST::P4EST;SC::SC;MPI::MPI_CXX"
 )
+if(TARGET BLAS::BLAS AND TARGET LAPACK::LAPACK)
+  target_link_libraries(ThunderEgg::ThunderEgg INTERFACE BLAS::BLAS LAPACK::LAPACK
+endif()

 add_dependencies(ThunderEgg::ThunderEgg ThunderEgg)


For the Qt5 case set PLD_epsqt to OFF since Qt5 does not support
PostScript.

This change requires rearrangment of the logic so
that the order of the variable processing changes from

ANY_QT_DEVICE ==> ENABLE_qt ==> PLPLOT_USE_QT5

to

ENABLE_qt ==> PLPLOT_USE_QT5 ==> ANY_QT_DEVICE.

Visual inspection of the code appears to indicate there should be no
issues with this new order.

svn path=/trunk/; revision=13055

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -56,19 +56,6 @@
 # PYQT_SIP_DIR		  - sip system directory
 # PYQT_SIP_FLAGS	  - sip command flags

-if(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt OR PLD_memqt)
-  set(ANY_QT_DEVICE ON)
-endif(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt OR PLD_memqt)
-
-if(ANY_QT_DEVICE)
-  if(NOT CMAKE_CXX_COMPILER_WORKS)
-    message(STATUS "WARNING: no working C++ compiler so "
-      "disabling all qt devices."
-      )
-    set(ANY_QT_DEVICE OFF)
-  endif(NOT CMAKE_CXX_COMPILER_WORKS)
-endif(ANY_QT_DEVICE)
-
 if(DEFAULT_NO_BINDINGS)
   option(ENABLE_qt "Enable Qt bindings" OFF)
   option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" OFF)
@@ -77,6 +64,36 @@
   option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" ON)
 endif(DEFAULT_NO_BINDINGS)

+if(ENABLE_qt)
+  option(PLPLOT_USE_QT5 "Experimental (and currently quite limited) option to try Qt5" OFF)
+
+  if(PLPLOT_USE_QT5)
+    find_package(Qt5Core 5.2.1)
+    if(Qt5Core_FOUND)
+      message(STATUS "Attempting to use Qt5 so have set PLD_epsqt to OFF since Qt5 does not support PostScript")
+      set(PLD_epsqt OFF CACHE BOOL "Enable Qt EPS device" FORCE)
+    else(Qt5Core_FOUND)
+      message(STATUS
+	"WARNING: Qt5Core could not be found so falling back to Qt4"
+	)
+      set(PLPLOT_USE_QT5 OFF CACHE BOOL "Experimental (and currently quite limited) option to try Qt5" FORCE)
+    endif(Qt5Core_FOUND)
+  endif(PLPLOT_USE_QT5)
+endif(ENABLE_qt)
+
+if(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt OR PLD_memqt)
+  set(ANY_QT_DEVICE ON)
+endif(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt OR PLD_memqt)
+
+if(ANY_QT_DEVICE)
+  if(NOT CMAKE_CXX_COMPILER_WORKS)
+    message(STATUS "WARNING: no working C++ compiler so "
+      "disabling all qt devices."
+      )
+    set(ANY_QT_DEVICE OFF)
+  endif(NOT CMAKE_CXX_COMPILER_WORKS)
+endif(ANY_QT_DEVICE)
+
 # ENABLE_qt depends on PLD_extqt
 if(NOT ANY_QT_DEVICE)
     set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE)
@@ -91,18 +108,6 @@
 endif(ENABLE_qt AND NOT PLD_extqt)

 if(ENABLE_qt)
-  option(PLPLOT_USE_QT5 "Experimental (and currently quite limited) option to try Qt5" OFF)
-
-  if(PLPLOT_USE_QT5)
-    find_package(Qt5Core 5.2.1)
-    if(NOT Qt5Core_FOUND)
-      message(STATUS
-	"WARNING: Qt5Core could not be found so falling back to Qt4"
-	)
-      set(PLPLOT_USE_QT5 OFF CACHE BOOL "Experimental (and currently quite limited) option to try Qt5" FORCE)
-    endif(NOT Qt5Core_FOUND)
-  endif(PLPLOT_USE_QT5)
-
   if(NOT PLPLOT_USE_QT5)
     # Use a minimum version corresponding to the version installed by
     # Debian Wheezy.  I assume all other non-enterprise Linux distros,


Windows, compilation : restore support for erxceptions (fixes warnings in Innodb code)

--- cmake/os/Windows.cmake
+++ cmake/os/Windows.cmake
@@ -80,10 +80,6 @@
    STRING(REPLACE "/MD"  "/MT" "${flag}" "${${flag}}")
   ENDFOREACH()

-  # Remove support for exceptions
-  FOREACH(flag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_INIT)
-   STRING(REPLACE "/EHsc" ""   "${flag}" "${${flag}}")
-  ENDFOREACH()

   # Fix CMake's predefined huge stack size
   FOREACH(type EXE SHARED MODULE)


*** empty log message ***

*** empty log message ***

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

--- library/FindNistSparseBlas.cmake
+++ library/FindNistSparseBlas.cmake
@@ -7,6 +7,7 @@
 	${CMAKE_SOURCE_DIR}/../../ThirdParty/spblastk0.9b/lib )

 FIND_LIBRARY(NIST_SPARSE_BLAS NAMES sbtk PATHS ${NIST_SPARSE_BLAS_SEARCH_PATHS})
+FIND_LIBRARY(NIST_SPARSE_BLAS_DEBUG NAMES sbtk-g PATHS ${NIST_SPARSE_BLAS_SEARCH_PATHS})

 GET_FILENAME_COMPONENT(NIST_SPARSE_BLAS_INCLUDE_DIR ${NIST_SPARSE_BLAS} PATH CACHE)


Adding dependency on ImageGrid module

Adding dependency on ImageGrid module

--- itk-module.cmake
+++ itk-module.cmake
@@ -15,6 +15,7 @@
   DEPENDS
     ITKCommon
     ITKStatistics
+    ITKImageGrid
   COMPILE_DEPENDS
     ITKImageSources
   TEST_DEPENDS


Increase timeout for mitkPackage test

Increase timeout for mitkPackage test

--- CMake/mitkPackageTest.cmake
+++ CMake/mitkPackageTest.cmake
@@ -9,14 +9,14 @@
                COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config Release --target package)

       set_tests_properties( mitkPackageTest PROPERTIES
-                          TIMEOUT 6000
+                          TIMEOUT 14400
                           LABELS "MITK;MITK-Plugins;PACKAGE_TESTS")
     elseif(CMAKE_BUILD_TYPE)
       add_test( NAME mitkPackageTest
                 COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config ${CMAKE_BUILD_TYPE} --target package)

       set_tests_properties( mitkPackageTest PROPERTIES
-                          TIMEOUT 6000
+                          TIMEOUT 14400
                           LABELS "MITK;MITK-Plugins;PACKAGE_TESTS"
                           RUN_SERIAL TRUE)
     endif()


Use Windows specific OpenCV source package.

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -14,8 +14,14 @@
 SET(OpenCV_DEPENDS ${proj})

 IF(NOT DEFINED OpenCV_DIR)
+  IF(WIN32)
+    SET(opencv_url http://mitk.org/download/thirdparty/OpenCV-2.2.0-win.tar.bz2)
+  ELSE()
+    SET(opencv_url http://mitk.org/download/thirdparty/OpenCV-2.2.0.tar.bz2)
+  ENDIF()
+
   ExternalProject_Add(${proj}
-     URL http://mitk.org/download/thirdparty/OpenCV-2.2.0.tar.bz2
+     URL ${opencv_url}
      BINARY_DIR ${proj}-build
      INSTALL_COMMAND ""
      CMAKE_GENERATOR ${gen}


fix macro var bug with CAKE_PKG_DEPENDS_* processing

--- Modules/CakePkg.cmake
+++ Modules/CakePkg.cmake
@@ -488,14 +488,15 @@
   # includes the file 'cake_pkg_depends_file'
   # if that doesn't exist, looks up CAKE_PKG_DEPENDS_* variables and includes those
   # also applies the variables in 'definitions'
-  macro(_cake_include_cake_pkg_depends cake_pkg_depends_file cid name definitions)
+  macro(_cake_include_cake_pkg_depends cake_pkg_depends_file_arg cid name definitions)
+    set(_cake_pkg_depends_file "${cake_pkg_depends_file_arg}")
     set(randomfile "")
-    if(NOT EXISTS "${cake_pkg_depends_file}")
+    if(NOT EXISTS "${_cake_pkg_depends_file}")
       set(scriptvarname "")
       if(DEFINED CAKE_PKG_DEPENDS_URL_${cid})
         set(scriptvarname "CAKE_PKG_DEPENDS_URL_${cid}")
-      elseif(NOT "${name}" STREQUAL "" AND DEFINED CAKE_PKG_DEPENDS_URL_${name})
-        set(scriptvarname "CAKE_PKG_DEPENDS_URL_${name}")
+      elseif(NOT "${name}" STREQUAL "" AND DEFINED CAKE_PKG_DEPENDS_NAME_${name})
+        set(scriptvarname "CAKE_PKG_DEPENDS_NAME_${name}")
       else()
         set(scriptvarname "")
       endif()
@@ -503,17 +504,17 @@
         string(RANDOM LENGTH 10 randomfile)
         set(randomfile "${CAKE_PKG_INSTALL_PREFIX}/tmp/cake_pkg_${randomfile}")
         file(WRITE "${randomfile}" "${${scriptvarname}}")
-        set(cake_pkg_depends_file "${randomfile}")
-      endif()
-    endif()
-
-    if(EXISTS "${cake_pkg_depends_file}")
+        set(_cake_pkg_depends_file "${randomfile}")
+      endif()
+    endif()
+
+    if(EXISTS "${_cake_pkg_depends_file}")
       # execute either the cake-pkg-depends.script
       # or the script defined in the CAKE_PKG_DEPENDS_* var
       # The script usually contains cake_pkg(INSTALL ...) calls to
       # fetch and install dependencies
       _cake_apply_definitions("${definitions}")
-      include("${cake_pkg_depends_file}")
+      include("${_cake_pkg_depends_file}")
     endif()

     if(randomfile)
@@ -710,7 +711,21 @@
       message(FATAL_ERROR "[cake_pkg] Either URL or NAME (or both) must be specified.")
     endif()

+    if(ARG_PK_OUT)
+      set(${ARG_PK_OUT} "" PARENT_SCOPE)
+    endif()
+
     if(ARG_CLONE OR ARG_INSTALL)
+      # something like this should be considered:
+      # skip entire cake_pkg(INSTALL/CLONE) if find_package already works
+      # not sure how to do it not to make any suprises
+      #if(ARG_NAME)
+      #  find_package(${ARG_NAME} QUIET)
+      #  string(TOUPPER "${ARG_NAME}" u)
+      #  if(${ARG_NAME}_FOUND OR ${u}_FOUND)
+      #    return()
+      #  endif()
+      #endif()
       if(ARG_URL)
         cake_parse_pkg_url("${ARG_URL}" repo_url repo_cid repo_options repo_definitions)
       else()


[cmake] automatic date/time information in version info

--- version.cmake
+++ version.cmake
@@ -1,3 +1,5 @@
+#..............................................................................
+
 set (JANCY_VERSION_MAJOR     1)
 set (JANCY_VERSION_MINOR     7)
 set (JANCY_VERSION_REVISION  0)
@@ -12,5 +14,11 @@
 	set (JANCY_VERSION_TAG_SUFFIX)
 endif ()

+string (TIMESTAMP JANCY_VERSION_YEAR  "%Y")
+string (TIMESTAMP JANCY_VERSION_MONTH "%m")
+string (TIMESTAMP JANCY_VERSION_DAY   "%d")
+
 set (JANCY_VERSION_COMPANY   "Tibbo Technology Inc")
-set (JANCY_VERSION_YEARS     "2007-2015")
+set (JANCY_VERSION_YEARS     "2007-${JANCY_VERSION_YEAR}")
+
+#..............................................................................


[cmake] bump version number

[cmake] bump version number

need to make a package for internal use

--- version.cmake
+++ version.cmake
@@ -11,7 +11,7 @@

 set(DOXYREST_VERSION_MAJOR     2)
 set(DOXYREST_VERSION_MINOR     1)
-set(DOXYREST_VERSION_REVISION  0)
+set(DOXYREST_VERSION_REVISION  1)
 set(DOXYREST_VERSION_TAG       )

 set(DOXYREST_VERSION_FULL "${DOXYREST_VERSION_MAJOR}.${DOXYREST_VERSION_MINOR}.${DOXYREST_VERSION_REVISION}")


Split off 8.0.50

Split off 8.0.50

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 0 )
-set ( HPCC_POINT 49 )
+set ( HPCC_POINT 51 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.6.16

Split off 8.6.16

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 6 )
-set ( HPCC_POINT 15 )
+set ( HPCC_POINT 17 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Fix bug in find-script when using the source directory

--- libzeug-config.cmake
+++ libzeug-config.cmake
@@ -72,9 +72,9 @@

     find_path(${LIB_NAME_UPPER}_INCLUDE_DIR ${HEADER}
         ${ENVLIBZEUG_DIR}/include
-        ${ENVLIBZEUG_DIR}/source/${LIB_NAME}/include
+        ${ENVLIBZEUG_DIR}/source/${LIBNAME}/include
         ${LIBZEUG_DIR}/include
-        ${LIBZEUG_DIR}/source/${LIB_NAME}/include
+        ${LIBZEUG_DIR}/source/${LIBNAME}/include
         ${ENVPROGRAMFILES}/libzeug/include
         /usr/include
         /usr/local/include


Revert "added missing CMake FFTW variables to External_SIRF.cmake, fixes #197 (together with installing boost_1_65_1)"

This reverts commit 5b8cb8961a8db4376c67528abc98fc6442aad6b2.

--- SuperBuild/External_SIRF.cmake
+++ SuperBuild/External_SIRF.cmake
@@ -88,8 +88,6 @@
         -DPYTHON_DEST_DIR=${PYTHON_DEST_DIR}
         -DPYTHON_STRATEGY=${PYTHON_STRATEGY}
         -DNiftyReg_Binary_DIR=${NiftyReg_Binary_DIR}
-		-DFFTW3F_LIBRARY=${FFTW3F_LIBRARY}
-		-DFFTW3_INCLUDE_DIR=${FFTW3_INCLUDE_DIR}
 	INSTALL_DIR ${SIRF_Install_Dir}
     DEPENDS
         ${${proj}_DEPENDENCIES}


Use the right variables for config.h.

Use the right variables for config.h.

--- config.h.cmake
+++ config.h.cmake
@@ -1,8 +1,8 @@
 #cmakedefine PACKAGE "${APPLICATION_NAME}"
 #cmakedefine VERSION "${APPLICATION_VERSION}"
 #cmakedefine LOCALEDIR "${LOCALE_INSTALL_DIR}"
-#cmakedefine DATADIR "${SHARE_INSTALL_PREFIX}"
-#cmakedefine LIBDIR "${LIB_INSTALL_DIR}"
+#cmakedefine DATADIR "${DATADIR}"
+#cmakedefine LIBDIR "${LIBDIR}"
 #cmakedefine PLUGINDIR "${PLUGINDIR}"
 #cmakedefine SYSCONFDIR "${SYSCONFDIR}"
 #cmakedefine BINARYDIR "${BINARYDIR}"


remove debug message.

remove debug message.

--- WkCompilerSetup.cmake
+++ WkCompilerSetup.cmake
@@ -101,7 +101,6 @@
 		#rewrite all arguments as string
 		set(NEW_FLAGS "")
 		foreach(f ${CURRENT_C_ARGS})
-			message(${f})
 			set(NEW_FLAGS "${NEW_FLAGS}${f} " )
 		endforeach(f)
 		set(${FLAG} ${NEW_FLAGS} CACHE STRING "" FORCE)


Fix last fix (exclude list use regexp, not globbing).

	* build-aux/cmake/modules/DynLibDep.cmake: here.

Signed-off-by: Vincent Ordy <d26676a94649632b1c477e78d16c5a762a0d6fbf@gostai.com>

--- build-aux/cmake/modules/DynLibDep.cmake
+++ build-aux/cmake/modules/DynLibDep.cmake
@@ -11,7 +11,7 @@
   set(DLDEP_UNIX_EXCLUSION_LIST
     "^libc.so"
     "^libdl.so"
-    "^libpthread*"      # Fedora 9
+    "^libpthread.*"     # Fedora 9
     )

   # The list of excluded Windows libraries.


don't pass "-x cu" option to hipcc

don't pass "-x cu" option to hipcc


Update version of h5pp

Update version of h5pp

Former-commit-id: 4fe3b5e7ba371ac490f49aa5884822e09fc4a0cb

--- cmake-modules/Fetch_h5pp.cmake
+++ cmake-modules/Fetch_h5pp.cmake
@@ -1,5 +1,5 @@
 if(NOT TARGET h5pp::h5pp AND DMRG_DOWNLOAD_METHOD STREQUAL "find")
-    find_package(h5pp 1.7.1 QUIET NO_CMAKE_PACKAGE_REGISTRY)
+    find_package(h5pp 1.8.0 QUIET NO_CMAKE_PACKAGE_REGISTRY)
     if(h5pp_FOUND AND TARGET h5pp::h5pp)
         message(STATUS "Found h5pp")
     endif()
@@ -25,6 +25,7 @@
     list(APPEND H5PP_CMAKE_OPTIONS  -DEIGEN3_INCLUDE_DIR:PATH=${CMAKE_INSTALL_PREFIX}/Eigen3/include)
     list(APPEND H5PP_CMAKE_OPTIONS  -DH5PP_DOWNLOAD_METHOD:BOOL=${DMRG_DOWNLOAD_METHOD})
     list(APPEND H5PP_CMAKE_OPTIONS  -DH5PP_PREFER_CONDA_LIBS:BOOL=${DMRG_PREFER_CONDA_LIBS})
+    list(APPEND H5PP_CMAKE_OPTIONS  -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE})
     build_dependency(h5pp "${CMAKE_INSTALL_PREFIX}" "${H5PP_CMAKE_OPTIONS}")
     find_package(h5pp 1.8.0
             NO_CMAKE_PACKAGE_REGISTRY)


Update Google Test in CMake builds to 1.10.0

--- cmake/DownloadGoogleTest.cmake
+++ cmake/DownloadGoogleTest.cmake
@@ -4,8 +4,8 @@

 INCLUDE(ExternalProject)
 ExternalProject_Add(googletest
-	URL https://github.com/google/googletest/archive/release-1.8.0.zip
-	URL_HASH SHA256=f3ed3b58511efd272eb074a3a6d6fb79d7c2e6a0e374323d1e6bcbcc1ef141bf
+	URL https://github.com/google/googletest/archive/release-1.10.0.zip
+	URL_HASH SHA256=94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91
 	SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest"
 	BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest"
 	CONFIGURE_COMMAND ""


Luajit library can be either luajit or luajit-5.1

--- cmake/Modules/FindLuaJIT.cmake
+++ cmake/Modules/FindLuaJIT.cmake
@@ -24,7 +24,7 @@
 #  LUA_VERSION_PATCH  - the patch version of Lua

 FIND_PATH(LUAJIT_INCLUDE_DIR NAMES lua.h PATH_SUFFIXES luajit-2.0)
-FIND_LIBRARY(LUAJIT_LIBRARIES NAMES luajit-5.1)
+FIND_LIBRARY(LUAJIT_LIBRARIES NAMES luajit-5.1 luajit)

 if (LUAJIT_INCLUDE_DIR AND EXISTS "${LUAJIT_INCLUDE_DIR}/lua.h")
     # At least 5.[012] have different ways to express the version


cmake/FindWaffle: Fix for usage outside of /usr/share/cmake/Modules

If a project imported FindWaffle.cmake, then the module failed to work
because it attempted to include FindPackageHandleStandardArgs.cmake from
the current directory rather than /usr/share/cmake/Modules.

Signed-off-by: Adrian Marius Negreanu <6275e895b07c55965e568461471033e41dc8e923@intel.com>
[chadv: Write commit message. Split into two patches.]
Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

--- cmake/Modules/FindWaffle.cmake
+++ cmake/Modules/FindWaffle.cmake
@@ -58,7 +58,7 @@

 # handle the 'QUIETLY' and 'REQUIRED' arguments and
 # set 'WAFFLE_FOUND' to TRUE if all listed variables are TRUE
-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Waffle
     REQUIRED_VARS WAFFLE_LIBRARIES WAFFLE_INCLUDE_DIRS
     VERSION_VAR WAFFLE_VERSION_STRING


Fix build when sqlite is not installed

Fix build when sqlite is not installed

--- cmake/modules/FindSqlite.cmake
+++ cmake/modules/FindSqlite.cmake
@@ -86,7 +86,7 @@

 endif()

-if (DEFINED SQLITE_INCLUDE_DIR AND DEFINED SQLITE_LIBRARIES AND ${SQLITE_VERSION_OK})
+if (DEFINED SQLITE_INCLUDE_DIR AND DEFINED SQLITE_LIBRARIES AND "${SQLITE_VERSION_OK}")
   file(WRITE ${CMAKE_BINARY_DIR}/sqlite_unlock_notify.cpp
        "#include <sqlite3.h>
         int main(int argc, char **argv) {


Update RootMacros.cmake

Update RootMacros.cmake

Forgot to change the second line

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -660,7 +660,7 @@
       ${incdirs} $<TARGET_PROPERTY:${ARG_MODULE},INCLUDE_DIRECTORIES>)
   else()
     get_filename_component(dictionary_name ${dictionary} NAME)
-    add_custom_target(${dictionary} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
+    add_custom_target(${dictionary_name} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file})
   endif()

   if(PROJECT_NAME STREQUAL "ROOT")


Add HUNTER_EXPERIMENTAL_HOST_TOOLCHAIN_FILE variable

--- cmake/modules/hunter_experimental_add_host_project.cmake
+++ cmake/modules/hunter_experimental_add_host_project.cmake
@@ -76,6 +76,15 @@
     set(host_generator -G${HUNTER_EXPERIMENTAL_HOST_GENERATOR})
   endif()

+  string(COMPARE EQUAL "${HUNTER_EXPERIMENTAL_HOST_TOOLCHAIN_FILE}" "" no_toolchain)
+  if(no_toolchain)
+    set(host_toolchain "")
+    hunter_status_debug("Not using host toolchain")
+  else()
+    hunter_status_debug("Using host toolchain: ${HUNTER_EXPERIMENTAL_HOST_TOOLCHAIN_FILE}")
+    set(host_toolchain -DCMAKE_TOOLCHAIN_FILE=${HUNTER_EXPERIMENTAL_HOST_TOOLCHAIN_FILE})
+  endif()
+
   # invoke cmake for host project
   include(${HUNTER_SELF}/scripts/clear-all.cmake)
   execute_process(
@@ -89,6 +98,7 @@
           "-DHUNTER_ALREADY_LOCKED_DIRECTORIES=${HUNTER_ALREADY_LOCKED_DIRECTORIES}"
           "-DHUNTER_CACHE_SERVERS=${HUNTER_CACHE_SERVERS}"
           ${host_generator}
+          ${host_toolchain}
       RESULT_VARIABLE exit_code
   )
   string(COMPARE EQUAL "${exit_code}" "0" success)


Make build system aware of a new patch for ITK

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -53,6 +53,9 @@
      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.13.3.tar.gz
      URL_MD5 d1c10c8288b47577d718a71190444815
      PATCH_COMMAND
+       # 2021/03/26: Only the patch file changed since the last snapshot.
+       # The only purpose of this comment is to change this .cmake file
+       # to make our build system aware of a change.
        ${PATCH_COMMAND} -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/ITK-4.13.3.patch
      CMAKE_GENERATOR ${gen}
      CMAKE_GENERATOR_PLATFORM ${gen_platform}


determine windows version from major.minor only, the patch number is irrelevant.

--- cmake/EigenDetermineOSVersion.cmake
+++ cmake/EigenDetermineOSVersion.cmake
@@ -9,18 +9,18 @@

 # - A little helper variable which should not be directly called
 function(DetermineShortWindowsName WIN_VERSION win_num_version)
-   if    (${win_num_version} VERSION_EQUAL "6.1.7600")
+   if    (${win_num_version} VERSION_EQUAL "6.1")
        set(_version "win7")
-   elseif(${win_num_version} VERSION_EQUAL "6.0.6000")
+   elseif(${win_num_version} VERSION_EQUAL "6.0")
        set(_version "winVista")
-   elseif(${win_num_version} VERSION_EQUAL "5.2.3790")
+   elseif(${win_num_version} VERSION_EQUAL "5.2")
        set(_version "winXpProf")
-   elseif(${win_num_version} VERSION_EQUAL "5.1.2600")
+   elseif(${win_num_version} VERSION_EQUAL "5.1")
        set(_version "winXp")
-   elseif(${win_num_version} VERSION_EQUAL "5.0.2195")
+   elseif(${win_num_version} VERSION_EQUAL "5.0")
        set(_version "win2000Prof")
    else()
-       set(_version "")
+       set(_version "unknownWin")
    endif()
    set(${WIN_VERSION} ${_version} PARENT_SCOPE)
 endfunction()
@@ -28,16 +28,14 @@
 function(DetermineOSVersion OS_VERSION)
   if (WIN32)
     file (TO_NATIVE_PATH "$ENV{COMSPEC}" SHELL)
-    exec_program( ${SHELL} ARGS "/c" "ver"
-      OUTPUT_VARIABLE ver_output)
+    exec_program( ${SHELL} ARGS "/c" "ver" OUTPUT_VARIABLE ver_output)

       string(REGEX MATCHALL "[0-9]+"
            ver_list "${ver_output}")
       list(GET ver_list 0 _major)
       list(GET ver_list 1 _minor)
-      list(GET ver_list 2 _patch)

-    set(win_num_version ${_major}.${_minor}.${_patch})
+    set(win_num_version ${_major}.${_minor})
     DetermineShortWindowsName(win_version "${win_num_version}")
     if(win_version)
       set(${OS_VERSION} ${win_version} PARENT_SCOPE)


eds-I#120 - Fails to build with libasan using Clang (undefined symbols)

Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/120

--- cmake/modules/SetupBuildFlags.cmake
+++ cmake/modules/SetupBuildFlags.cmake
@@ -78,8 +78,8 @@
 	endif(CMAKE_CXX_COMPILER_ID)

 	if(("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD"))
-		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
-		set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
-		set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+		set(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_EXE_LINKER_FLAGS}")
+		set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}")
+		set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
 	endif(("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD"))
 endmacro()


Bump internal OpenSSL cache ID.

Bump internal OpenSSL cache ID.

--- cmake/projects/OpenSSL/hunter.cmake
+++ cmake/projects/OpenSSL/hunter.cmake
@@ -194,4 +194,4 @@
 )

 hunter_cacheable(OpenSSL)
-hunter_download(PACKAGE_NAME OpenSSL)
+hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID 1)


Another attempt to fix the project configuration issue.

--- Source/CMake/Modules/GetUrho3DRevision.cmake
+++ Source/CMake/Modules/GetUrho3DRevision.cmake
@@ -22,7 +22,7 @@

 # Get Urho3D library revision number

-if (DEFINED ENV{CI} AND DEFINED ENV{RELEASE_TAG})
+if (DEFINED ENV{CI} AND NOT "$ENV{RELEASE_TAG}" STREQUAL "")
     # Use the release tag provided by the CI server, this is important because git describe command will be off by one commit in the CI mirror branches
     set (LIB_REVISION $ENV{RELEASE_TAG})
     set (GIT_EXIT_CODE 0)


CMake: Fixed typo in `-DHAS_AUTHENTICATION=0` instructions.

Windows builds without this flag instruct you to add it,
but the instructions were missing the prefix `D` for define,
and so as-is resulted in an error message. This could be a
source of frustration for those unfamiliar with CMake.

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

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -59,7 +59,7 @@
     FATAL_ERROR
     "Windows builds of Mesos currently do not support agent to master "
     "authentication. To build without this capability, pass "
-    "`-HAS_AUTHENTICATION=0` as an argument when you run CMake.")
+    "`-DHAS_AUTHENTICATION=0` as an argument when you run CMake.")
 endif (WIN32 AND HAS_AUTHENTICATION)

 # If 'REBUNDLED' is set to FALSE, this will cause Mesos to build against


Force the ncurses include path when using brew

--- cmake/Modules/FindNcursesw.cmake
+++ cmake/Modules/FindNcursesw.cmake
@@ -120,10 +120,14 @@
   get_filename_component(_cursesLibDir "${CURSES_NCURSESW_LIBRARY}" PATH)
   get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH)

-  find_path(CURSES_INCLUDE_PATH
-    NAMES ncursesw/ncurses.h ncursesw/curses.h ncurses.h curses.h
-    HINTS "${_cursesParentDir}/include"
+  if(${OSX_BREW_NCURSES})
+    set(CURSES_INCLUDE_PATH /usr/local/opt/ncurses/include)
+  else()
+    find_path(CURSES_INCLUDE_PATH
+      NAMES ncursesw/ncurses.h ncursesw/curses.h ncurses.h curses.h
+      HINTS "${_cursesParentDir}/include"
     )
+  endif()

   # Previous versions of FindCurses provided these values.
   if(NOT DEFINED CURSES_LIBRARY)


Initial package+plugin setup

Initial package+plugin setup

--- cmake/Modules/FindOpenRAVE.cmake
+++ cmake/Modules/FindOpenRAVE.cmake
@@ -1,88 +0,0 @@
-# Try to find OpenRAVE
-# Once done this will define
-#
-# OPENRAVE_FOUND - if Coin3d is found
-# OPENRAVE_CXXFLAGS - extra flags
-# OPENRAVE_INCLUDE_DIRS - include directories
-# OPENRAVE_LINK_DIRS - link directories
-# OPENRAVE_LIBRARY_RELEASE - the relase version
-# OPENRAVE_LIBRARY_DEBUG - the debug version
-# OPENRAVE_LIBRARY - a default library, with priority debug.
-
-# use openrave-config
-find_program(OPENRAVE_CONFIG_EXECUTABLE NAMES openrave-config DOC "openrave-config executable")
-mark_as_advanced(OPENRAVE_CONFIG_EXECUTABLE)
-
-if(OPENRAVE_CONFIG_EXECUTABLE)
-  set(OPENRAVE_FOUND 1)
-
-  execute_process(
-    COMMAND ${OPENRAVE_CONFIG_EXECUTABLE} --cflags
-    OUTPUT_VARIABLE _openraveconfig_cflags
-    RESULT_VARIABLE _openraveconfig_failed)
-  string(REGEX REPLACE "[\r\n]" " " _openraveconfig_cflags "${_openraveconfig_cflags}")
-  execute_process(
-    COMMAND ${OPENRAVE_CONFIG_EXECUTABLE} --libs
-    OUTPUT_VARIABLE _openraveconfig_ldflags
-    RESULT_VARIABLE _openraveconfig_failed)
-  string(REGEX REPLACE "[\r\n]" " " _openraveconfig_ldflags "${_openraveconfig_ldflags}")
-
-  execute_process(
-    COMMAND ${OPENRAVE_CONFIG_EXECUTABLE} --cflags-only-I
-    OUTPUT_VARIABLE _openraveconfig_includedirs
-    RESULT_VARIABLE _openraveconfig_failed)
-  string(REGEX REPLACE "[\r\n]" " " _openraveconfig_includedirs "${_openraveconfig_includedirs}")
-  string(REGEX MATCHALL "(^| )-I([./+-_\\a-zA-Z]*)" _openraveconfig_includedirs "${_openraveconfig_includedirs}")
-  string(REGEX REPLACE "(^| )-I" "" _openraveconfig_includedirs "${_openraveconfig_includedirs}")
-  separate_arguments(_openraveconfig_includedirs)
-
-  execute_process(
-    COMMAND ${OPENRAVE_CONFIG_EXECUTABLE} --libs-only-L
-    OUTPUT_VARIABLE _openraveconfig_ldflags
-    RESULT_VARIABLE _openraveconfig_failed)
-  string(REGEX REPLACE "[\r\n]" " " _openraveconfig_ldflags "${_openraveconfig_ldflags}")
-  string(REGEX MATCHALL "(^| )-L([./+-_\\a-zA-Z]*)" _openraveconfig_ldirs "${_openraveconfig_ldflags}")
-  string(REGEX REPLACE "(^| )-L" "" _openraveconfig_ldirs "${_openraveconfig_ldirs}")
-  separate_arguments(_openraveconfig_ldirs)
-
-  execute_process(
-    COMMAND ${OPENRAVE_CONFIG_EXECUTABLE} --libs-only-l
-    OUTPUT_VARIABLE _openraveconfig_libs
-    RESULT_VARIABLE _openraveconfig_failed)
-  string(REGEX REPLACE "[\r\n]" " " _openraveconfig_libs "${_openraveconfig_libs}")
-  string(REGEX MATCHALL "(^| )-l([./+-_\\a-zA-Z]*)" _openraveconfig_libs "${_openraveconfig_libs}")
-  string(REGEX REPLACE "(^| )-l" "" _openraveconfig_libs "${_openraveconfig_libs}")
-
-  set( OPENRAVE_CXXFLAGS "${_openraveconfig_cflags}" )
-  set( OPENRAVE_LINK_FLAGS "${_openraveconfig_ldflags}" )
-  set( OPENRAVE_INCLUDE_DIRS ${_openraveconfig_includedirs})
-  set( OPENRAVE_LINK_DIRS ${_openraveconfig_ldirs})
-  set( OPENRAVE_LIBRARY ${_openraveconfig_libs})
-  set( OPENRAVE_LIBRARY_RELEASE ${OPENRAVE_LIBRARY})
-  set( OPENRAVE_LIBRARY_DEBUG ${OPENRAVE_LIBRARY})
-else(OPENRAVE_CONFIG_EXECUTABLE)
-  # openrave include files in local directory
-  if( MSVC )
-    set(OPENRAVE_FOUND 1)
-    set( OPENRAVE_CXXFLAGS "")
-    set( OPENRAVE_LINK_FLAGS "")
-    set( OPENRAVE_INCLUDE_DIRS "c:/program files/openrave/include")
-    set( OPENRAVE_LINK_DIRS "c:/program files/openrave/libs" )
-    set( OPENRAVE_LIBRARY openrave)
-    set( OPENRAVE_LIBRARY_RELEASE "openrave")
-    set( OPENRAVE_LIBRARY_DEBUG "openrave")
-  else( MSVC )
-    set(OPENRAVE_FOUND 0)
-  endif( MSVC )
-endif(OPENRAVE_CONFIG_EXECUTABLE)
-
-MARK_AS_ADVANCED(
-    OPENRAVE_FOUND
-    OPENRAVE_CXXFLAGS
-    OPENRAVE_LINK_FLAGS
-    OPENRAVE_INCLUDE_DIRS
-    OPENRAVE_LINK_DIRS
-    OPENRAVE_LIBRARY
-    OPENRAVE_LIBRARY_RELEASE
-    OPENRAVE_LIBRARY_DEBUG
-)


Apply correct -fPIE flags for executable targets

--- cmake/kl/PrecompileHeaders.cmake
+++ cmake/kl/PrecompileHeaders.cmake
@@ -144,6 +144,16 @@
             endif()
         endforeach()

+        # For executable targets we need to turn -fPIC into -fPIE
+        get_target_property(var ${_target} TYPE)
+        if(var STREQUAL EXECUTABLE)
+            set_target_properties(${_target}.pch PROPERTIES POSITION_INDEPENDENT_CODE OFF)
+            get_target_property(var ${_target} POSITION_INDEPENDENT_CODE)
+            if(NOT (var STREQUAL var-NOTFOUND OR var STREQUAL ""))
+                target_compile_options(${_target}.pch PRIVATE -fPIE)
+            endif()
+        endif()
+
         # # Generate a symlink from a ${host_file}.obj to gch_file
         add_custom_command(OUTPUT ${gch_file}
             COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_OBJECTS:${_target}.pch> ${gch_file}


[cmake] Fix host tools build in when LLVM_EXPERIMENTAL_TARGETS_TO_BUILD is set

r320413 triggered cmake configure failures when building with
-DLLVM_OPTIMIZED_TABLEGEN=True and with LLVM_EXPERIMENTAL_TARGETS_TO_BUILD set
(e.g. to RISCV). This is because that patch moved to passing through
LLVM_TARGETS_TO_BUILD, and at that point LLVM_EXPERIMENTAL_TARGETS_TO_BUILD
has been merged in to it. LLVM_EXPERIMENTAL_TARGETS_TO_BUILD must be also be
passed through to avoid errors like below:

-- Constructing LLVMBuild project information
CMake Error at CMakeLists.txt:682 (message):
  The target `RISCV' does not exist.

      It should be one of

  AArch64;AMDGPU;ARM;BPF;Hexagon;Lanai;Mips;MSP430;NVPTX;PowerPC;Sparc;SystemZ;X86;XCore

-- Configuring incomplete, errors occurred!

See the thread
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20171211/509225.html
for discussion of this fix.

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

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -40,12 +40,15 @@
   # them to spaces.
   string(REPLACE ";" "$<SEMICOLON>" targets_to_build_arg
          "${LLVM_TARGETS_TO_BUILD}")
+  string(REPLACE ";" "$<SEMICOLON>" experimental_targets_to_build_arg
+         "${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}")

   add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}/CMakeCache.txt
     COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
         ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
         -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
         -DLLVM_TARGETS_TO_BUILD="${targets_to_build_arg}"
+        -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${experimental_targets_to_build_arg}"
         ${build_type_flags} ${linker_flag} ${external_clang_dir}
     WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}
     DEPENDS CREATE_LLVM_${target_name}


fix bug: fix find openblas cmake script

fix bug: fix find openblas cmake script

--- cmake/modules/FindOpenBLAS.cmake
+++ cmake/modules/FindOpenBLAS.cmake
@@ -7,7 +7,7 @@
 find_path(OpenBLAS_INCLUDE_DIRS
           NAMES cblas.h
           PATHS ${OpenBLAS_DIR}
-          PATH_SUFFIXES include include/x86_64 include/x64
+          PATH_SUFFIXES include include/x86_64 include/x64 include/x86_64-linux-gnu include/aarch64-linux-gnu
           NO_DEFAULT_PATH)

 find_library(OpenBLAS_LIBRARIES
@@ -23,7 +23,7 @@
 if (OpenBLAS_FOUND)
   parse_header_single_define(${OpenBLAS_INCLUDE_DIRS}/openblas_config.h
                              OPENBLAS_VERSION
-                             "[0-9]+\\.[0-9]+\\.[0-9]+.[a-z]+")
+                             "[0-9]+\\.[0-9]+\\.[0-9]+")
   if (NOT OPENBLAS_VERSION)
     set(OpenBLAS_VERSION "?")
   else ()


- added mechanism to provide additional test properties for a specific test    using a global property that can be set "outside"

--- cmake_modules/ZorbaAddTest.cmake
+++ cmake_modules/ZorbaAddTest.cmake
@@ -47,6 +47,11 @@
 		ENDIF(WIN32)
 	ENDIF(ZORBA_WIN_PUT_ALL_BINARIES_IN_SAME_DIR)
   SET_TESTS_PROPERTIES ("${NAME}" PROPERTIES TIMEOUT "${NORMAL_TIMEOUT_VALUE}")
+  GET_PROPERTY(TEST_EXTRAPROPS GLOBAL PROPERTY "EXTRAPROPS-${NAME}")
+  IF (TEST_EXTRAPROPS)
+    MESSAGE(STATUS "using additional properties for ${NAME}: [${TEST_EXTRAPROPS}]")
+    SET_TESTS_PROPERTIES("${NAME}" PROPERTIES ${TEST_EXTRAPROPS})
+  ENDIF(TEST_EXTRAPROPS)
 ENDMACRO(ZORBA_ADD_TEST_SIMPLE)

 # This macro easies the process of adding test for store dependent executables


Fixed various build errors for targets other than ARM64.

--- nnpack.cmake
+++ nnpack.cmake
@@ -2,17 +2,23 @@
 set( nnpack_source ${CMAKE_CURRENT_LIST_DIR} )
 set( nnpack_interface_includes "${nnpack_source}/include" "${nnpack_source}/pthreadpool/include" )

+if ( WIN32 )
+  set( NNPACK_USE_MB_DISPATCH true )
+else()
+  option( NNPACK_USE_MB_DISPATCH "Make NNPACK use mb::sweat_shop for parallel jobs" true )
+endif()
+
 if ( MSVC AND NOT NNPACK_IN_MSVC_SUBPROJECT )
-  set( binary_dir "${CMAKE_BINARY_DIR}/nnpack" )
-  execute_process( COMMAND "${CMAKE_COMMAND}" -E make_directory "${binary_dir}" )
+  set( nnpack_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/nnpack" )
+  execute_process( COMMAND "${CMAKE_COMMAND}" -E make_directory "${nnpack_binary_dir}" )
   execute_process(
     COMMAND "${CMAKE_COMMAND}"
+      -G ${CMAKE_GENERATOR}
       -T v141_clang_c2
       -DNNPACK_IN_MSVC_SUBPROJECT:BOOL=true
-      -DNNPACK_USE_MB_DISPATCH:BOOL=true
       -DMB_GLOBAL_ENABLE_TIMER:BOOL=false
       ${CMAKE_CURRENT_LIST_DIR}
-    WORKING_DIRECTORY "${binary_dir}"
+    WORKING_DIRECTORY "${nnpack_binary_dir}"
     ERROR_VARIABLE    stderr
     OUTPUT_VARIABLE   stdout
   )
@@ -20,12 +26,8 @@
   if ( stderr )
     message( FATAL_ERROR "NNPACK project creation failure:\n${stderr}" )
   endif()
-  include_external_msproject( NNPACK ${binary_dir}/NNPACK.vcxproj )
+  include_external_msproject( NNPACK "${nnpack_binary_dir}/NNPACK.vcxproj" )
   return()
-endif()
-
-if ( NOT WIN32 )
-  option( NNPACK_USE_MB_DISPATCH "Make NNPACK use mb::sweat_shop for parallel jobs" true )
 endif()

 #include( "${CMAKE_CURRENT_LIST_DIR}/../../core-utils/cmake-build/common_settings.cmake" )
@@ -40,27 +42,37 @@
 file( GLOB_RECURSE nnpack_scalar_sources "${nnpack_source}/src/scalar/*.c"     )
 file( GLOB_RECURSE nnpack_x86_sources    "${nnpack_source}/src/x86_64-fma/*.c" )
 source_group( "Headers" FILES ${nnpack_common_headers} )
-if( NNPACK_USE_MB_DISPATCH )
-  set_source_files_properties( ${SRC_PATH}/pthreadpoolImpl.cpp PROPERTIES COMPILE_FLAGS "-DNN_NNPACK_USE_SWEATER=1" )
-else()
+if( NOT NNPACK_USE_MB_DISPATCH )
   set( pthread_pool_sources "${nnpack_source}/pthreadpool/src/threadpool-pthreads.c" )
 endif()
 list( APPEND nnpack_sources ${nnpack_common_headers} ${nnpack_common_sources} ${nnpack_scalar_sources} ${pthread_pool_sources} )
-if ( ANDROID OR iOS )
+if ( ANDROID )
+  if ( ANDROID_ABI MATCHES "arm" )
+    list( APPEND nnpack_sources ${nnpack_neon_sources} ${nnpack_psimd_sources} )
+  elseif( ANDROID_ABI MATCHES "x86" )
+    # no Android ABI or version guarantees AVX2 required by the x86 NNPACK backend
+    list( APPEND nnpack_sources ${nnpack_psimd_sources} )
+  endif()
+elseif ( iOS )
   list( APPEND nnpack_sources ${nnpack_neon_sources} ${nnpack_psimd_sources} )
 elseif( MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL Clang )
   # neither x86 nor PSIMD backends work (see later comments for more info)
 else()
-  list( APPEND nnpack_sources ${nnpack_x86_sources} )
+  list( APPEND nnpack_sources ${nnpack_psimd_sources} ) # ${nnpack_x86_sources} don't want to run PeachPy or require AVX2
+  set( nnpack_explicit_backend PSIMD )
 endif()
 #set_source_files_properties( ${nnpack_sources} PROPERTIES LANGUAGE CXX )
 build_static_library( NNPACK ${nnpack_source} ${nnpack_sources} )
-target_include_directories( NNPACK PUBLIC ${nnpack_interface_includes} )
+target_include_directories( NNPACK PUBLIC  ${nnpack_interface_includes}   )
 target_include_directories( NNPACK PRIVATE ${nnpack_source}/src           )
 target_include_directories( NNPACK PRIVATE ${nnpack_source}/src/ref       )
 target_include_directories( NNPACK PRIVATE ${nnpack_source}/fp16/include  )
 target_include_directories( NNPACK PRIVATE ${nnpack_source}/FXdiv/include )
 target_include_directories( NNPACK PRIVATE ${nnpack_source}/psimd/include )
+
+if ( DEFINED nnpack_explicit_backend )
+  target_compile_definitions( NNPACK PRIVATE NNP_BACKEND_${nnpack_explicit_backend}=1 )
+endif()

 force_include_header( NNPACK "${nnpack_source}/src/c99.h" )
 if ( CMAKE_CXX_COMPILER_ID STREQUAL MSVC )
@@ -71,10 +83,21 @@
 endif()

 if ( WIN32 )
-  target_compile_options( NNPACK PRIVATE
-    -DNOMINMAX -D__STDC__ # minmax macros
-    # -D__GNUC__ # for psimd.h
-    # -DNNP_BACKEND_PSIMD=1 # '_mm256_blendv_ps': Intrinsic not yet implemented (in MSVC14.1u2+Clang 3.8)
-    -DNNP_BACKEND_SCALAR=1 # nnpack\psimd\include\psimd.h(616): fatal error C1001: An internal error has occurred in the compiler (MSVC14.1u2)
+  target_compile_definitions( NNPACK PRIVATE
+    NOMINMAX __STDC__ # minmax macros
+    # __GNUC__ # for psimd.h
+    # NNP_BACKEND_PSIMD=1 # '_mm256_blendv_ps': Intrinsic not yet implemented (in MSVC14.1u2+Clang 3.8)
+    NNP_BACKEND_SCALAR=1 # nnpack\psimd\include\psimd.h(616): fatal error C1001: An internal error has occurred in the compiler (MSVC14.1u2)
+  )
+  target_compile_options( NNPACK PRIVATE -std=gnu11 -g2 -gdwarf-2 -mavx -ffast-math -fno-pic -fno-rtti -fno-exceptions $<$<CONFIG:RELEASE>:-O3 -fno-stack-protector> ) # -flto "fatal error LNK1136: invalid or corrupt file"
+elseif( ANDROID )
+  if ( ANDROID_ABI STREQUAL "armeabi-v7a" )
+    target_compile_options( NNPACK PRIVATE -mfpu=neon-fp16 )
+    target_link_libraries( NNPACK PUBLIC cpufeatures )
+  endif()
+elseif( iOS )
+  set_target_properties( NNPACK PROPERTIES
+    XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=armv7] "$(OTHER_CFLAGS) -mfpu=neon-fp16"
+    XCODE_ATTRIBUTE_OTHER_CFLAGS[arch=armv7s] "$(OTHER_CFLAGS) -mfpu=neon-fp16"
   )
 endif()


cmake/BuildPCRE2.cmake: fixed a condition specific to WIN32 [ci skip]

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -45,7 +45,7 @@
   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))
+IF (WIN32 AND ((CMAKE_BUILD_TYPE STREQUAL Debug) OR (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)))
   SET (PCRE2_LINK_FLAGS  "${3RDPARTY_OUTPUT_PATH}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}pcre2-8d${CMAKE_STATIC_LIBRARY_SUFFIX}")
 ELSE ()
   SET (PCRE2_LINK_FLAGS  "${3RDPARTY_OUTPUT_PATH}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}pcre2-8${CMAKE_STATIC_LIBRARY_SUFFIX}")


rename everything ADIOS to ADIOS1 in FindADIOS1.cmake

--- cmake/FindADIOS1.cmake
+++ cmake/FindADIOS1.cmake
@@ -1,8 +1,8 @@
-# - Find ADIOS library, routines for scientific, parallel IO
+# - Find ADIOS 1.x library, routines for scientific, parallel IO
 #   https://www.olcf.ornl.gov/center-projects/adios/
 #
 # Use this module by invoking find_package with the form:
-#   find_package(ADIOS
+#   find_package(ADIOS1
 #     [version] [EXACT]     # Minimum or EXACT version, e.g. 1.6.0
 #     [REQUIRED]            # Fail with an error if ADIOS or a required
 #                           #   component is not found
@@ -11,46 +11,46 @@
                             # sequential (all are case insentative)
 #   )
 #
-# Module that finds the includes and libraries for a working ADIOS install.
+# Module that finds the includes and libraries for a working ADIOS 1.x install.
 # This module invokes the `adios_config` script that should be installed with
 # the other ADIOS tools.
 #
 # To provide a hint to the module where to find the ADIOS installation,
-# set the ADIOS_ROOT environment variable.
+# set the ADIOS1_ROOT or ADIOS1_DIR environment variable.
 #
 # If this variable is not set, make sure that at least the according `bin/`
-# directory of ADIOS is in your PATH environment variable.
+# directory of ADIOS 1.x is in your PATH environment variable.
 #
 # Set the following CMake variables BEFORE calling find_packages to
 # influence this module:
-#   ADIOS_USE_STATIC_LIBS - Set to ON to force the use of static
+#   ADIOS1_USE_STATIC_LIBS - Set to ON to force the use of static
 #                           libraries.  Default: OFF
 #
 # This module will define the following variables:
-#   ADIOS_INCLUDE_DIRS    - Include directories for the ADIOS headers.
-#   ADIOS_LIBRARY_PATH    - Full path of the libadios library (.a or .so file)
-#   ADIOS_DEPENDENCY_LIBRARIES       - ADIOS dependency libraries.
-#   ADIOS_FOUND           - TRUE if FindADIOS found a working install
-#   ADIOS_VERSION         - Version in format Major.Minor.Patch
+#   ADIOS1_INCLUDE_DIRS    - Include directories for the ADIOS 1.x headers.
+#   ADIOS1_LIBRARY_PATH    - Full path of the libadios library (.a or .so file)
+#   ADIOS1_DEPENDENCY_LIBRARIES       - ADIOS 1.x dependency libraries.
+#   ADIOS1_FOUND           - TRUE if FindADIOS1 found a working install
+#   ADIOS1_VERSION         - Version in format Major.Minor.Patch
 #
 # Not used for now:
-#   ADIOS_DEFINITIONS     - Compiler definitions you should add with
-#                           add_definitions(${ADIOS_DEFINITIONS})
-#
-# Example to find ADIOS (default)
-# find_package(ADIOS)
-# if(ADIOS_FOUND)
-#   include_directories(${ADIOS_INCLUDE_DIRS})
+#   ADIOS1_DEFINITIONS     - Compiler definitions you should add with
+#                           add_definitions(${ADIOS1_DEFINITIONS})
+#
+# Example to find ADIOS 1.x (default)
+# find_package(ADIOS1)
+# if(ADIOS1_FOUND)
+#   include_directories(${ADIOS1_INCLUDE_DIRS})
 #   add_executable(foo foo.c)
-#   target_link_libraries(foo ${ADIOS_LIBRARY_PATH} ADIOS_DEPENDENCY_LIBRARIES)
+#   target_link_libraries(foo ${ADIOS1_LIBRARY_PATH} ADIOS1_DEPENDENCY_LIBRARIES)
 # endif()

-# Example to find ADIOS using component
-# find_package(ADIOS COMPONENTS fortran)
-# if(ADIOS_FOUND)
-#   include_directories(${ADIOS_INCLUDE_DIRS})
+# Example to find ADIOS 1.x using component
+# find_package(ADIOS1 COMPONENTS fortran)
+# if(ADIOS1_FOUND)
+#   include_directories(${ADIOS1_INCLUDE_DIRS})
 #   add_executable(foo foo.c)
-#   target_link_libraries(foo ${ADIOS_LIBRARY_PATH} ${ADIOS_DEPENDENCY_LIBRARIES})
+#   target_link_libraries(foo ${ADIOS1_LIBRARY_PATH} ${ADIOS1_DEPENDENCY_LIBRARIES})
 # endif()
 ###############################################################################
 #Copyright (c) 2014, Axel Huebl and Felix Schmitt from http://picongpu.hzdr.de
@@ -96,8 +96,8 @@
 # get flags for adios_config, -l is the default
 #-f for fortran, -r for readonly, -s for sequential (nompi)
 set(OPTLIST "-l")
-if(ADIOS_FIND_COMPONENTS)
-    foreach(COMP ${ADIOS_FIND_COMPONENTS})
+if(ADIOS1_FIND_COMPONENTS)
+    foreach(COMP ${ADIOS1_FIND_COMPONENTS})
         string(TOLOWER ${COMP} comp)
         if(comp STREQUAL "fortran")
             set(OPTLIST "${OPTLIST}f")
@@ -106,102 +106,102 @@
         elseif(comp STREQUAL "sequential")
             set(OPTLIST "${OPTLIST}s")
         else()
-            message("ADIOS component ${COMP} is not supported. Please use fortran, readonly, or sequential")
+            message("ADIOS 1.x component ${COMP} is not supported. Please use fortran, readonly, or sequential")
         endif()
     endforeach()
 endif()

 # we start by assuming we found ADIOS and falsify it if some
 # dependencies are missing (or if we did not find ADIOS at all)
-set(ADIOS_FOUND TRUE)
+set(ADIOS1_FOUND TRUE)

 # find `adios_config` program #################################################
-#   check the ADIOS_ROOT hint and the normal PATH
-find_file(ADIOS_CONFIG
+#   check the ADIOS1_ROOT and ADIOS1_DIR hint and the normal PATH
+find_file(ADIOS1_CONFIG
     NAME adios_config
-    PATHS $ENV{ADIOS_ROOT}/bin $ENV{ADIOS_DIR}/bin $ENV{INSTALL_PREFIX}/bin $ENV{PATH})
-
-if(ADIOS_CONFIG)
-    message(STATUS "Found 'adios_config': ${ADIOS_CONFIG}")
-else(ADIOS_CONFIG)
-    set(ADIOS_FOUND FALSE)
-    message(STATUS "Can NOT find 'adios_config' - set ADIOS_ROOT, ADIOS_DIR or INSTALL_PREFIX, or check your PATH")
-endif(ADIOS_CONFIG)
+    PATHS $ENV{ADIOS1_ROOT}/bin $ENV{ADIOS1_DIR}/bin $ENV{INSTALL_PREFIX}/bin $ENV{PATH})
+
+if(ADIOS1_CONFIG)
+    message(STATUS "Found 'adios_config': ${ADIOS1_CONFIG}")
+else(ADIOS1_CONFIG)
+    set(ADIOS1_FOUND FALSE)
+    message(STATUS "Can NOT find 'adios_config' - set ADIOS1_ROOT, ADIOS1_DIR or INSTALL_PREFIX, or check your PATH")
+endif(ADIOS1_CONFIG)

 # check `adios_config` program ################################################
-if(ADIOS_FOUND)
-    execute_process(COMMAND ${ADIOS_CONFIG} ${OPTLIST}
-                    OUTPUT_VARIABLE ADIOS_LINKFLAGS
-                    RESULT_VARIABLE ADIOS_CONFIG_RETURN
+if(ADIOS1_FOUND)
+    execute_process(COMMAND ${ADIOS1_CONFIG} ${OPTLIST}
+                    OUTPUT_VARIABLE ADIOS1_LINKFLAGS
+                    RESULT_VARIABLE ADIOS1_CONFIG_RETURN
                     OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if(NOT ADIOS_CONFIG_RETURN EQUAL 0)
-        set(ADIOS_FOUND FALSE)
+    if(NOT ADIOS1_CONFIG_RETURN EQUAL 0)
+        set(ADIOS1_FOUND FALSE)
         message(STATUS "Can NOT execute 'adios_config' - check file permissions")
     endif()

-    # find ADIOS_ROOT_DIR
-    execute_process(COMMAND ${ADIOS_CONFIG} -d
-                    OUTPUT_VARIABLE ADIOS_ROOT_DIR
+    # find ADIOS1_ROOT_DIR
+    execute_process(COMMAND ${ADIOS1_CONFIG} -d
+                    OUTPUT_VARIABLE ADIOS1_ROOT_DIR
                     OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if(NOT IS_DIRECTORY "${ADIOS_ROOT_DIR}")
-        set(ADIOS_FOUND FALSE)
-        message(STATUS "The directory provided by 'adios_config -d' does not exist: ${ADIOS_ROOT_DIR}")
+    if(NOT IS_DIRECTORY "${ADIOS1_ROOT_DIR}")
+        set(ADIOS1_FOUND FALSE)
+        message(STATUS "The directory provided by 'adios_config -d' does not exist: ${ADIOS1_ROOT_DIR}")
     endif()
-endif(ADIOS_FOUND)
+endif(ADIOS1_FOUND)

 # option: use only static libs ################################################
-if(ADIOS_USE_STATIC_LIBS)
+if(ADIOS1_USE_STATIC_LIBS)
     # carfully: we have to restore the original path in the end
     set(_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
     set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
 endif()

-# we found something in ADIOS_ROOT_DIR and adios_config works #################
-if(ADIOS_FOUND)
+# we found something in ADIOS1_ROOT_DIR and adios_config works #################
+if(ADIOS1_FOUND)
     # ADIOS headers
-    list(APPEND ADIOS_INCLUDE_DIRS ${ADIOS_ROOT_DIR}/include)
-
-    # check for compiled in dependencies, recomve ";" in ADIOS_LINKFLAGS (from cmake build)
-    string(REGEX REPLACE ";" " " ADIOS_LINKFLAGS "${ADIOS_LINKFLAGS}")
-    message(STATUS "ADIOS linker flags (unparsed): ${ADIOS_LINKFLAGS}")
+    list(APPEND ADIOS1_INCLUDE_DIRS ${ADIOS1_ROOT_DIR}/include)
+
+    # check for compiled in dependencies, recomve ";" in ADIOS1_LINKFLAGS (from cmake build)
+    string(REGEX REPLACE ";" " " ADIOS1_LINKFLAGS "${ADIOS1_LINKFLAGS}")
+    message(STATUS "  ADIOS1 linker flags (unparsed): ${ADIOS1_LINKFLAGS}")

     # find all library paths -L
     #   note: this can cause trouble if some libs are specified twice from
     #         different sources (quite unlikely)
     #         http://www.cmake.org/pipermail/cmake/2008-November/025128.html
-    set(ADIOS_LIBRARY_DIRS "")
-    string(REGEX MATCHALL " -L([A-Za-z_0-9/\\.-]+)" _ADIOS_LIBDIRS " ${ADIOS_LINKFLAGS}")
-    foreach(_LIBDIR ${_ADIOS_LIBDIRS})
+    set(ADIOS1_LIBRARY_DIRS "")
+    string(REGEX MATCHALL " -L([A-Za-z_0-9/\\.-]+)" _ADIOS1_LIBDIRS " ${ADIOS1_LINKFLAGS}")
+    foreach(_LIBDIR ${_ADIOS1_LIBDIRS})
         string(REPLACE " -L" "" _LIBDIR ${_LIBDIR})
-        list(APPEND ADIOS_LIBRARY_DIRS ${_LIBDIR})
+        list(APPEND ADIOS1_LIBRARY_DIRS ${_LIBDIR})
     endforeach()
     # we could append ${CMAKE_PREFIX_PATH} now but that is not really necessary

-    #message(STATUS "ADIOS DIRS to look for libs: ${ADIOS_LIBRARY_DIRS}")
+    #message(STATUS "ADIOS1 DIRS to look for libs: ${ADIOS1_LIBRARY_DIRS}")

     # parse all -lname libraries and find an absolute path for them
-    string(REGEX MATCHALL " -l([A-Za-z_0-9\\.-]+)" _ADIOS_LIBS " ${ADIOS_LINKFLAGS}")
-    foreach(_LIB ${_ADIOS_LIBS})
+    string(REGEX MATCHALL " -l([A-Za-z_0-9\\.-]+)" _ADIOS1_LIBS " ${ADIOS1_LINKFLAGS}")
+    foreach(_LIB ${_ADIOS1_LIBS})
         string(REPLACE " -l" "" _LIB ${_LIB})

         # find static lib: absolute path in -L then default
-        find_library(_LIB_DIR NAMES ${_LIB} PATHS ${ADIOS_LIBRARY_DIRS} CMAKE_FIND_ROOT_PATH_BOTH)
+        find_library(_LIB_DIR NAMES ${_LIB} PATHS ${ADIOS1_LIBRARY_DIRS} CMAKE_FIND_ROOT_PATH_BOTH)

         # found?
         if(_LIB_DIR)
-            message(STATUS "Found ${_LIB} in ${_LIB_DIR}")
             if(_LIB STREQUAL "adios")
-                message(STATUS "    Found the adios main lib as ${_LIB_DIR}")
-                set(ADIOS_LIBRARY_PATH "${_LIB_DIR}")
-                message(STATUS "    ADIOS_LIBRARY_PATH set to ${ADIOS_LIBRARY_PATH}")
+                message(STATUS "  Found the main adios library in ${_LIB_DIR}")
+                set(ADIOS1_LIBRARY_PATH "${_LIB_DIR}")
+                #message(STATUS "    ADIOS1_LIBRARY_PATH set to ${ADIOS1_LIBRARY_PATH}")
             else()
-                list(APPEND ADIOS_DEPENDENCY_LIBRARIES "${_LIB_DIR}")
+                message(STATUS "  Found ${_LIB} in ${_LIB_DIR}")
+                list(APPEND ADIOS1_DEPENDENCY_LIBRARIES "${_LIB_DIR}")
             endif()
         else(_LIB_DIR)
-            set(ADIOS_FOUND FALSE)
-            message(STATUS "ADIOS: Could NOT find library '${_LIB}'")
+            set(ADIOS1_FOUND FALSE)
+            message(STATUS "ADIOS1: Could NOT find library '${_LIB}'")
         endif(_LIB_DIR)

         # clean cached var
@@ -210,26 +210,26 @@
     endforeach()

     #add libraries which are already using cmake format
-    string(REGEX MATCHALL "/([A-Za-z_0-9/\\.-]+)\\.([a|so]+)" _ADIOS_LIBS_SUB "${ADIOS_LINKFLAGS}")
-    list(APPEND ADIOS_DEPENDENCY_LIBRARIES "${_ADIOS_LIBS_SUB}")
+    string(REGEX MATCHALL "/([A-Za-z_0-9/\\.-]+)\\.([a|so]+)" _ADIOS1_LIBS_SUB "${ADIOS1_LINKFLAGS}")
+    list(APPEND ADIOS1_DEPENDENCY_LIBRARIES "${_ADIOS1_LIBS_SUB}")

     # add the version string
-    execute_process(COMMAND ${ADIOS_CONFIG} -v
-                    OUTPUT_VARIABLE ADIOS_VERSION
+    execute_process(COMMAND ${ADIOS1_CONFIG} -v
+                    OUTPUT_VARIABLE ADIOS1_VERSION
                     OUTPUT_STRIP_TRAILING_WHITESPACE)

-endif(ADIOS_FOUND)
+endif(ADIOS1_FOUND)

 # unset checked variables if not found
-if(NOT ADIOS_FOUND)
-    unset(ADIOS_INCLUDE_DIRS)
-    unset(ADIOS_DEPENDENCY_LIBRARIES)
-    unset(ADIOS_LIBRARY_PATH)
-endif(NOT ADIOS_FOUND)
+if(NOT ADIOS1_FOUND)
+    unset(ADIOS1_INCLUDE_DIRS)
+    unset(ADIOS1_DEPENDENCY_LIBRARIES)
+    unset(ADIOS1_LIBRARY_PATH)
+endif(NOT ADIOS1_FOUND)

 # restore CMAKE_FIND_LIBRARY_SUFFIXES if manipulated by this module ###########
-if(ADIOS_USE_STATIC_LIBS)
+if(ADIOS1_USE_STATIC_LIBS)
     set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
 endif()

@@ -240,21 +240,21 @@

 # handles the REQUIRED, QUIET and version-related arguments for find_package
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(ADIOS
-    REQUIRED_VARS ADIOS_LIBRARY_PATH ADIOS_DEPENDENCY_LIBRARIES ADIOS_INCLUDE_DIRS
-    VERSION_VAR ADIOS_VERSION
+find_package_handle_standard_args(ADIOS1
+    REQUIRED_VARS ADIOS1_LIBRARY_PATH ADIOS1_DEPENDENCY_LIBRARIES ADIOS1_INCLUDE_DIRS
+    VERSION_VAR ADIOS1_VERSION
 )

 ##########################################################################
 # Add target and dependencies to ADIOS2
 ##########################################################################
-message(STATUS "ADIOS1 Find ended with ${ADIOS_FOUND}")
-    if(ADIOS_FOUND AND NOT TARGET adios1::adios)
+#message(STATUS "ADIOS1 Find ended with ${ADIOS1_FOUND}")
+    if(ADIOS1_FOUND AND NOT TARGET adios1::adios)
       message(STATUS "Add library ADIOS1 to the build")
       add_library(adios1::adios UNKNOWN IMPORTED)
       set_target_properties(adios1::adios PROPERTIES
-        IMPORTED_LOCATION "${ADIOS_LIBRARY_PATH}"
-        INTERFACE_LINK_LIBRARIES "${ADIOS_DEPENDENCY_LIBRARIES}"
-        INTERFACE_INCLUDE_DIRECTORIES "${ADIOS_INCLUDE_DIRS}"
+        IMPORTED_LOCATION "${ADIOS1_LIBRARY_PATH}"
+        INTERFACE_LINK_LIBRARIES "${ADIOS1_DEPENDENCY_LIBRARIES}"
+        INTERFACE_INCLUDE_DIRECTORIES "${ADIOS1_INCLUDE_DIRS}"
       )
     endif()


Added cmake support for dsound and windows 8/10 SDKs

--- cmake/FindDSound.cmake
+++ cmake/FindDSound.cmake
@@ -8,19 +8,63 @@
 #   DSOUND_LIBRARY     - the dsound library
 #

+# DSOUND_INCLUDE_DIR
+file(GLOB DXSDK_INCLUDE_DIRS LIST_DIRECTORIES TRUE "C:/Program Files (x86)/Windows Kits/10/Include/*")
+if (DXSDK_INCLUDE_DIRS)
+  list(SORT DXSDK_INCLUDE_DIRS)
+  list(REVERSE DXSDK_INCLUDE_DIRS)
+endif()
+
 find_path(DSOUND_INCLUDE_DIR
-          NAMES dsound.h
-          PATHS "${DXSDK_DIR}"
-          PATH_SUFFIXES include
-          DOC "The DirectSound include directory"
+          NAMES
+            "dsound.h"
+          PATHS
+            "${DXSDK_DIR}"
+            ${DXSDK_INCLUDE_DIRS}
+            "C:/Program Files (x86)/Windows Kits/8.0"
+            "C:/Program Files (x86)/Windows Kits/8.1"
+          PATH_SUFFIXES
+            Include
+            um
+            Include/um
+          DOC
+            "The DirectSound include directory"
 )
+
+# DSOUND_LIBRARY
+if(CMAKE_CL_64)
+    set (DirectX_ARCHITECTURE x64)
+else()
+    set (DirectX_ARCHITECTURE x86)
+endif()
+
+file(GLOB DXSDK_LIB_DIRS LIST_DIRECTORIES TRUE "C:/Program Files (x86)/Windows Kits/10/Lib/*")
+if (DXSDK_LIB_DIRS)
+  list(SORT DXSDK_LIB_DIRS)
+  list(REVERSE DXSDK_LIB_DIRS)
+endif()

 find_library(DSOUND_LIBRARY
              NAMES dsound
-             PATHS "${DXSDK_DIR}"
-             PATH_SUFFIXES lib lib/x86 lib/x64
-             DOC "The DirectSound library"
-)
+             DOC "The DirectSound library")
+if (NOT DSOUND_LIBRARY)
+  find_library(DSOUND_LIBRARY
+               NAMES dsound
+               PATHS
+                "${DXSDK_DIR}"
+                ${DXSDK_LIB_DIRS}
+                "C:/Program Files (x86)/Windows Kits/8.0"
+                "C:/Program Files (x86)/Windows Kits/8.1"
+               PATH_SUFFIXES
+                Lib
+                Lib/${DirectX_ARCHITECTURE}
+                um/${DirectX_ARCHITECTURE}
+                Lib/win8/um/${DirectX_ARCHITECTURE}
+                Lib/winv6.3/um/${DirectX_ARCHITECTURE}
+               DOC
+                "The DirectSound library"
+  )
+endif()

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(DSound


update PVS-Studio.cmake to the latest upstream version and set policy 0116

--- cmake/PVS-Studio.cmake
+++ cmake/PVS-Studio.cmake
@@ -5,6 +5,7 @@

 cmake_minimum_required(VERSION 2.8.12)
 cmake_policy(SET CMP0054 NEW)
+cmake_policy(SET CMP0116 NEW)

 if (PVS_STUDIO_AS_SCRIPT)
     # This code runs at build time.
@@ -33,18 +34,13 @@
     endforeach ()

     execute_process(COMMAND ${PVS_STUDIO_COMMAND} ${additional_args}
-                    ERROR_VARIABLE error
-                    RESULT_VARIABLE result)
-
-    set(stderr_type "")
-
-    if (result)
-        set(stderr_type FATAL_ERROR)
-    endif ()
-
-    if (result OR error)
-        message(${stderr_type} "${error}")
-    endif ()
+                    RESULT_VARIABLE result
+                    OUTPUT_VARIABLE output
+                    ERROR_VARIABLE error)
+
+    if (result AND NOT output MATCHES "^No compilation units were found\\.")
+        message(FATAL_ERROR "PVS-Studio exited with non-zero code.\nStdout:\n${output}\nStderr:\n${error}\n")
+    endif()

     return()
 endif ()
@@ -63,13 +59,17 @@
 endfunction ()

 function (pvs_studio_relative_path VAR ROOT FILEPATH)
+    if (WIN32)
+        STRING(REGEX REPLACE "\\\\" "/" ROOT ${ROOT})
+        STRING(REGEX REPLACE "\\\\" "/" FILEPATH ${FILEPATH})
+    endif()
     set("${VAR}" "${FILEPATH}" PARENT_SCOPE)
-    if ("${FILEPATH}" MATCHES "^/.*$" OR "${FILEPATH}" MATCHES "^.:/.*$")
+    if (IS_ABSOLUTE "${FILEPATH}")
         file(RELATIVE_PATH RPATH "${ROOT}" "${FILEPATH}")
-        if (NOT "${RPATH}" MATCHES "^\\.\\..*$")
+        if (NOT IS_ABSOLUTE "${RPATH}")
             set("${VAR}" "${RPATH}" PARENT_SCOPE)
-        endif ()
-    endif ()
+        endif()
+    endif()
 endfunction ()

 function (pvs_studio_join_path VAR DIR1 DIR2)
@@ -101,7 +101,7 @@
 endmacro ()

 macro (pvs_studio_append_standard_flag FLAGS STANDARD)
-    if ("${STANDARD}" MATCHES "^(99|11|14|17)$")
+    if ("${STANDARD}" MATCHES "^(99|11|14|17|20)$")
         if ("${PVS_STUDIO_PREPROCESSOR}" MATCHES "gcc|clang")
             list(APPEND "${FLAGS}" "-std=c++${STANDARD}")
         endif ()
@@ -126,6 +126,11 @@
     set(CXX_FLAGS "${${CXX}}")
     set(C_FLAGS "${${C}}")

+    if (NOT MSVC)
+        list(APPEND CXX_FLAGS "$<$<BOOL:${CMAKE_SYSROOT}>:--sysroot=${CMAKE_SYSROOT}>")
+        list(APPEND C_FLAGS "$<$<BOOL:${CMAKE_SYSROOT}>:--sysroot=${CMAKE_SYSROOT}>")
+    endif ()
+
     set(prop_incdirs "$<TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES>")
     list(APPEND CXX_FLAGS "$<$<BOOL:${prop_incdirs}>:-I$<JOIN:${prop_incdirs},$<SEMICOLON>-I>>")
     list(APPEND C_FLAGS "$<$<BOOL:${prop_incdirs}>:-I$<JOIN:${prop_incdirs},$<SEMICOLON>-I>>")
@@ -133,6 +138,10 @@
     set(prop_compdefs "$<TARGET_PROPERTY:${TARGET},COMPILE_DEFINITIONS>")
     list(APPEND CXX_FLAGS "$<$<BOOL:${prop_compdefs}>:-D$<JOIN:${prop_compdefs},$<SEMICOLON>-D>>")
     list(APPEND C_FLAGS "$<$<BOOL:${prop_compdefs}>:-D$<JOIN:${prop_compdefs},$<SEMICOLON>-D>>")
+
+    set(prop_compopt "$<TARGET_PROPERTY:${TARGET},COMPILE_OPTIONS>")
+    list(APPEND CXX_FLAGS "$<$<BOOL:${prop_compopt}>:$<JOIN:${prop_compopt},$<SEMICOLON>>>")
+    list(APPEND C_FLAGS "$<$<BOOL:${prop_compopt}>:$<JOIN:${prop_compopt},$<SEMICOLON>>>")

     set("${CXX}" "${CXX_FLAGS}" PARENT_SCOPE)
     set("${C}" "${C_FLAGS}" PARENT_SCOPE)
@@ -211,7 +220,7 @@
                            COMMAND "${CMAKE_COMMAND}" -E remove_directory "${LOG}"
                            COMMAND ${pvscmd}
                            WORKING_DIRECTORY "${BINARY_DIR}"
-                           DEPENDS "${SOURCE}" "${PVS_STUDIO_CONFIG}"
+                           DEPENDS "${SOURCE}" "${PVS_STUDIO_SUPPRESS_BASE}" "${PVS_STUDIO_DEPENDS}"
                            IMPLICIT_DEPENDS "${PVS_STUDIO_LANGUAGE}" "${SOURCE}"
                            ${depCommandArg}
                            VERBATIM
@@ -292,6 +301,7 @@
 # LICENSE path                  path to PVS-Studio.lic (default: ~/.config/PVS-Studio/PVS-Studio.lic)
 # CONFIG path                   path to PVS-Studio.cfg
 # CFG_TEXT text                 embedded PVS-Studio.cfg
+# SUPPRESS_BASE                 path to suppress base file
 # KEEP_COMBINED_PLOG            do not delete combined plog file *.pvs.raw for further processing with plog-converter
 #
 # Misc options:
@@ -302,6 +312,7 @@
 # C_FLAGS flags...              additional C_FLAGS
 # CXX_FLAGS flags...            additional CXX_FLAGS
 # ARGS args...                  additional pvs-studio-analyzer/CompilerCommandsAnalyzer.exe flags
+# CONVERTER_ARGS args...        additional plog-converter/HtmlGenerator.exe flags
 function (pvs_studio_add_target)
     macro (default VAR VALUE)
         if ("${${VAR}}" STREQUAL "")
@@ -318,19 +329,12 @@
         set(DEFAULT_PREPROCESSOR "gcc")
     endif ()

-    set(OPTIONAL OUTPUT ALL RECURSIVE HIDE_HELP KEEP_COMBINED_PLOG COMPILE_COMMANDS)
-    set(SINGLE LICENSE CONFIG TARGET LOG FORMAT BIN CONVERTER PLATFORM PREPROCESSOR CFG_TEXT)
-    set(MULTI SOURCES C_FLAGS CXX_FLAGS ARGS DEPENDS ANALYZE MODE)
+    set(OPTIONAL OUTPUT ALL RECURSIVE HIDE_HELP KEEP_COMBINED_PLOG COMPILE_COMMANDS KEEP_INTERMEDIATE_FILES)
+    set(SINGLE LICENSE CONFIG TARGET LOG FORMAT BIN CONVERTER PLATFORM PREPROCESSOR CFG_TEXT SUPPRESS_BASE)
+    set(MULTI SOURCES C_FLAGS CXX_FLAGS ARGS DEPENDS ANALYZE MODE CONVERTER_ARGS)
     cmake_parse_arguments(PVS_STUDIO "${OPTIONAL}" "${SINGLE}" "${MULTI}" ${ARGN})

-    if ("${PVS_STUDIO_CONFIG}" STREQUAL "" OR NOT "${PVS_STUDIO_CFG_TEXT}" STREQUAL "")
-        set(PVS_STUDIO_EMPTY_CONFIG ON)
-    else ()
-        set(PVS_STUDIO_EMPTY_CONFIG OFF)
-    endif ()
-
-    default(PVS_STUDIO_CFG_TEXT "analysis-mode=31")
-    default(PVS_STUDIO_CONFIG "${CMAKE_BINARY_DIR}/PVS-Studio.cfg")
+
     default(PVS_STUDIO_C_FLAGS "")
     default(PVS_STUDIO_CXX_FLAGS "")
     default(PVS_STUDIO_TARGET "pvs")
@@ -377,17 +381,18 @@

     string(REPLACE ";" "+" PVS_STUDIO_MODE "${PVS_STUDIO_MODE}")

-    if (PVS_STUDIO_EMPTY_CONFIG)
+    if ("${PVS_STUDIO_CONFIG}" STREQUAL "" AND NOT "${PVS_STUDIO_CFG_TEXT}" STREQUAL "")
+        set(PVS_STUDIO_CONFIG "${CMAKE_BINARY_DIR}/PVS-Studio.cfg")
+
         set(PVS_STUDIO_CONFIG_COMMAND "${CMAKE_COMMAND}" -E echo "${PVS_STUDIO_CFG_TEXT}" > "${PVS_STUDIO_CONFIG}")
-    else ()
-        set(PVS_STUDIO_CONFIG_COMMAND "${CMAKE_COMMAND}" -E touch "${PVS_STUDIO_CONFIG}")
-    endif ()
-
-    add_custom_command(OUTPUT "${PVS_STUDIO_CONFIG}"
-                       COMMAND ${PVS_STUDIO_CONFIG_COMMAND}
-                       WORKING_DIRECTORY "${BINARY_DIR}"
-                       COMMENT "Generating PVS-Studio.cfg")
-
+
+        add_custom_command(OUTPUT "${PVS_STUDIO_CONFIG}"
+                           COMMAND ${PVS_STUDIO_CONFIG_COMMAND}
+                           WORKING_DIRECTORY "${BINARY_DIR}"
+                           COMMENT "Generating PVS-Studio.cfg")
+
+        list(APPEND PVS_STUDIO_DEPENDS "${PVS_STUDIO_CONFIG}")
+    endif ()
     if (NOT "${PVS_STUDIO_PREPROCESSOR}" MATCHES "^${PVS_STUDIO_SUPPORTED_PREPROCESSORS}$")
         message(FATAL_ERROR "Preprocessor ${PVS_STUDIO_PREPROCESSOR} isn't supported. Available options: ${PVS_STUDIO_SUPPORTED_PREPROCESSORS}.")
     endif ()
@@ -396,13 +401,20 @@
     pvs_studio_set_directory_flags("${CMAKE_CURRENT_SOURCE_DIR}" PVS_STUDIO_CXX_FLAGS PVS_STUDIO_C_FLAGS)

     if (NOT "${PVS_STUDIO_LICENSE}" STREQUAL "")
-        pvs_studio_join_path(PVS_STUDIO_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}" "${PVS_STUDIO_LICENSE}")
         list(APPEND PVS_STUDIO_ARGS --lic-file "${PVS_STUDIO_LICENSE}")
     endif ()

-    list(APPEND PVS_STUDIO_ARGS --cfg "${PVS_STUDIO_CONFIG}"
-                                --platform "${PVS_STUDIO_PLATFORM}"
+    if (NOT ${PVS_STUDIO_CONFIG} STREQUAL "")
+        list(APPEND PVS_STUDIO_ARGS --cfg "${PVS_STUDIO_CONFIG}")
+    endif ()
+
+    list(APPEND PVS_STUDIO_ARGS --platform "${PVS_STUDIO_PLATFORM}"
                                 --preprocessor "${PVS_STUDIO_PREPROCESSOR}")
+
+    if (NOT "${PVS_STUDIO_SUPPRESS_BASE}" STREQUAL "")
+        pvs_studio_join_path(PVS_STUDIO_SUPPRESS_BASE "${CMAKE_CURRENT_SOURCE_DIR}" "${PVS_STUDIO_SUPPRESS_BASE}")
+        list(APPEND PVS_STUDIO_ARGS --suppress-file "${PVS_STUDIO_SUPPRESS_BASE}")
+    endif ()

     if (NOT "${CMAKE_CXX_COMPILER}" STREQUAL "")
         list(APPEND PVS_STUDIO_ARGS --cxx "${CMAKE_CXX_COMPILER}")
@@ -410,6 +422,15 @@

     if (NOT "${CMAKE_C_COMPILER}" STREQUAL "")
         list(APPEND PVS_STUDIO_ARGS --cc "${CMAKE_C_COMPILER}")
+    endif ()
+
+    if (PVS_STUDIO_KEEP_INTERMEDIATE_FILES)
+        list(APPEND PVS_STUDIO_ARGS --dump-files)
+    endif()
+
+    string(REGEX REPLACE [123,:] "" ANALYZER_MODE ${PVS_STUDIO_MODE})
+    if (NOT "$ANALYZER_MODE" STREQUAL "GA")
+        list (APPEND PVS_STUDIO_ARGS -a "${ANALYZER_MODE}")
     endif ()

     set(PVS_STUDIO_PLOGS "")
@@ -476,7 +497,7 @@
                     ${PVS_STUDIO_ARGS}
             COMMENT "Analyzing with PVS-Studio"
             WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
-            DEPENDS "${PVS_STUDIO_CONFIG}"
+            DEPENDS "${PVS_STUDIO_SUPPRESS_BASE}" "${PVS_STUDIO_DEPENDS}"
         )
         list(APPEND PVS_STUDIO_PLOGS_LOGS "${COMPILE_COMMANDS_LOG}.always")
         list(APPEND PVS_STUDIO_PLOGS_DEPENDENCIES "${COMPILE_COMMANDS_LOG}")
@@ -488,19 +509,23 @@
             string(REPLACE / \\ PVS_STUDIO_PLOGS "${PVS_STUDIO_PLOGS}")
         endif ()
         if (WIN32)
-            set(COMMANDS COMMAND type ${PVS_STUDIO_PLOGS} ${PVS_STUDIO_PLOGS_LOGS} > "${PVS_STUDIO_LOG}" 2>nul)
+            set(COMMANDS COMMAND type ${PVS_STUDIO_PLOGS} ${PVS_STUDIO_PLOGS_LOGS} > "${PVS_STUDIO_LOG}" 2>nul || cd .)
         else ()
-            set(COMMANDS COMMAND cat ${PVS_STUDIO_PLOGS} ${PVS_STUDIO_PLOGS_LOGS} > "${PVS_STUDIO_LOG}")
+            set(COMMANDS COMMAND cat ${PVS_STUDIO_PLOGS} ${PVS_STUDIO_PLOGS_LOGS} > "${PVS_STUDIO_LOG}" 2>/dev/null || true)
         endif ()
         set(COMMENT "Generating ${LOG_RELATIVE}")
         if (NOT "${PVS_STUDIO_FORMAT}" STREQUAL "" OR PVS_STUDIO_OUTPUT)
             if ("${PVS_STUDIO_FORMAT}" STREQUAL "")
                 set(PVS_STUDIO_FORMAT "errorfile")
             endif ()
+            set(converter_no_help "")
+            if (PVS_STUDIO_HIDE_HELP)
+              set(converter_no_help "--noHelpMessages")
+            endif()
             list(APPEND COMMANDS
                 COMMAND "${CMAKE_COMMAND}" -E remove -f "${PVS_STUDIO_LOG}.pvs.raw"
                 COMMAND "${CMAKE_COMMAND}" -E rename "${PVS_STUDIO_LOG}" "${PVS_STUDIO_LOG}.pvs.raw"
-                COMMAND "${PVS_STUDIO_CONVERTER}" -t "${PVS_STUDIO_FORMAT}" "${PVS_STUDIO_LOG}.pvs.raw" -o "${PVS_STUDIO_LOG}" -a "${PVS_STUDIO_MODE}"
+                COMMAND "${PVS_STUDIO_CONVERTER}" "${PVS_STUDIO_CONVERTER_ARGS}" ${converter_no_help} -t "${PVS_STUDIO_FORMAT}" "${PVS_STUDIO_LOG}.pvs.raw" -o "${PVS_STUDIO_LOG}" -a "${PVS_STUDIO_MODE}"
                 )
             if(NOT PVS_STUDIO_KEEP_COMBINED_PLOG)
                 list(APPEND COMMANDS COMMAND "${CMAKE_COMMAND}" -E remove -f "${PVS_STUDIO_LOG}.pvs.raw")
@@ -528,9 +553,7 @@
     endif ()

     if (PVS_STUDIO_OUTPUT)
-        if (PVS_STUDIO_HIDE_HELP AND NOT WIN32)
-            set(COMMANDS COMMAND grep -v " error: Help:" ${PVS_STUDIO_LOG} 1>&2 || exit 0)
-        elseif (WIN32)
+        if (WIN32)
             set(COMMANDS COMMAND type "${PVS_STUDIO_LOG}" 1>&2)
         else ()
             set(COMMANDS COMMAND cat "${PVS_STUDIO_LOG}" 1>&2)
@@ -539,7 +562,9 @@
         set(COMMANDS "")
     endif ()

-    add_custom_target("${PVS_STUDIO_TARGET}" ${ALL} ${COMMANDS} WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" DEPENDS ${PVS_STUDIO_DEPENDS} "${PVS_STUDIO_LOG}")
+    add_custom_target("${PVS_STUDIO_TARGET}" ${ALL} ${COMMANDS}
+                      WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+                      DEPENDS ${PVS_STUDIO_DEPENDS} "${PVS_STUDIO_LOG}")

     # A workaround to add implicit dependencies of source files from include directories
     set_target_properties("${PVS_STUDIO_TARGET}" PROPERTIES INCLUDE_DIRECTORIES "${inc_path}")


Don't inherit internal compile-flags for GCC and Clang (ref #170)

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -91,6 +91,7 @@
 # GCC and Clang compiler options
 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
     set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
+    PRIVATE
         -fno-exceptions
         -fno-rtti

@@ -116,17 +117,17 @@
                 -Wreturn-local-addr
             >
         >
-
+
         $<$<CXX_COMPILER_ID:Clang>:
             -Wpedantic

             -Wreturn-stack-address
         >
-
+    PUBLIC
         $<$<PLATFORM_ID:Darwin>:
             -pthread
         >
-
+
         $<$<VERSION_LESS:${CMAKE_VERSION},3.1>:
             -std=c++11
         >
@@ -143,6 +144,7 @@
 # Use pthreads on mingw and linux
 if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
     set(DEFAULT_LINKER_OPTIONS
+    PUBLIC
         -pthread
     )
 endif()


Fix cmake file broken by D38277.

Fix cmake file broken by D38277.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@314528 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/base-config-ix.cmake
+++ cmake/base-config-ix.cmake
@@ -151,7 +151,7 @@
       # Strip out -nodefaultlibs when calling TEST_BIG_ENDIAN. Configuration
       # will fail with this option when building with a sanitizer.
       cmake_push_check_state()
-      string(REPLACE "-nodefaultlibs" "" CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
+      string(REPLACE "-nodefaultlibs" "" CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
       TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN)
       cmake_pop_check_state()


CMake: add (disabled) defines to enable glibc debug mode.

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -40,6 +40,13 @@
 elseif(NOT (CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO" OR CMAKE_BUILD_TYPE STREQUAL "FUZZ"))
   # if not Release/RelWithDebInfo/Fuzz build, enable extra debug mode
   add_definitions(-DDEBUG)
+
+  # all this does not work with integer sanitizer
+  # add_definitions(-D_GLIBCXX_ASSERTIONS)
+  # add_definitions(-D_GLIBCXX_DEBUG)
+  # add_definitions(-D_GLIBCXX_DEBUG_PEDANTIC)
+
+  add_definitions(-D_GLIBCXX_SANITIZE_VECTOR)
 endif()

 IF(NOT APPLE)


Mark signing parameters as advanced

Mark signing parameters as advanced

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -73,18 +73,17 @@

 IF(WIN32)
   OPTION(SIGNCODE "Sign executables and dlls with digital certificate" OFF)
+  MARK_AS_ADVANCED(SIGNCODE)
   IF(SIGNCODE)
    SET(SIGNTOOL_PARAMETERS
      /a /t http://timestamp.verisign.com/scripts/timstamp.dll
      CACHE STRING "parameters for signtool (list)")
-   MARK_AS_ADVANCED(SIGNCODE SIGNTOOL_PARAMETERS)
-  ENDIF()
-  IF(SIGNCODE)
     FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool)
     IF(NOT SIGNTOOL_EXECUTABLE)
       MESSAGE(FATAL_ERROR
       "signtool is not found. Signing executables not possible")
     ENDIF()
+    MARK_AS_ADVANCED(SIGNTOOL_EXECUTABLE  SIGNTOOL_PARAMETERS)
   ENDIF()
 ENDIF()


Bump version to 1.1.0

Bump version to 1.1.0

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -19,8 +19,8 @@
 ##############################################################

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


Add -DSIMDJSON_PRODUCTION flag

Add -DSIMDJSON_PRODUCTION flag

--- cmake/simdjson-flags.cmake
+++ cmake/simdjson-flags.cmake
@@ -172,11 +172,13 @@
 #
 # Other optional flags
 #
-option(SIMDJSON_API_USAGE_CHECKS "Validate ondemand user code at runtime to ensure it is being used correctly. Turning this off disables some checks that have a small performance impact. Defaults to ON." ON)
-if(SIMDJSON_API_USAGE_CHECKS)
-  message(STATUS "Ondemand safety rails enabled. Ondemand user code will be checked at runtime. Turn this on for production to get maximum performance!")
+option(SIMDJSON_PRODUCTION "Optimize for production by disabling development-time aids, such as checks for incorrect API usage." OFF)
+if(SIMDJSON_PRODUCTION)
+  message(STATUS "SIMDJSON_PRODUCTION is ON: optimizing for production by disabling development-time aids, such as checks for incorrect API usage.")
+else()
+  message(STATUS "Development-time aids enabled. Use cmake -DSIMDJSON_PRODUCTION=ON to disable development-time aids, such as checks for incorrect API usage.")
   target_compile_definitions(simdjson-flags INTERFACE SIMDJSON_API_USAGE_CHECKS=1)
-endif(SIMDJSON_API_USAGE_CHECKS)
+endif()

 option(SIMDJSON_BASH "Allow usage of bash within CMake" ON)


Fix issues with removing try_compile input file.     - Don't remove input file     - Put output in ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}     - Remove try_compile variable from the cache after using

--- cmakemodules/FindMPI.cmake
+++ cmakemodules/FindMPI.cmake
@@ -443,10 +443,14 @@
 endfunction()

+# This function attempts to compile with the regular compiler, to see if MPI programs
+# work with it.  This is a last ditch attempt after we've tried interrogating mpicc and
+# friends, and after we've tried to find generic libraries.  Works on machines like
+# Cray XE6, where the modules environment changes what MPI version cc, CC, and ftn use.
 function(try_regular_compiler lang success)
-  # last ditch attempt: just try to compile something with the regular compiler
+  set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
   if (${lang} STREQUAL Fortran)
-    set(test_file ${CMAKE_CURRENT_BINARY_DIR}/cmake_mpi_test.f90)
+    set(test_file ${scratch_directory}/cmake_mpi_test.f90)
     file(WRITE ${test_file}
       "program hello\n"
       "include 'mpif.h'\n"
@@ -456,9 +460,9 @@
       "end\n")
   else()
     if (${lang} STREQUAL CXX)
-      set(test_file ${CMAKE_CURRENT_BINARY_DIR}/cmake_mpi_test.cpp)
+      set(test_file ${scratch_directory}/cmake_mpi_test.cpp)
     else()
-      set(test_file ${CMAKE_CURRENT_BINARY_DIR}/cmake_mpi_test.c)
+      set(test_file ${scratch_directory}/cmake_mpi_test.c)
     endif()
     file(WRITE ${test_file}
       "#include <mpi.h>\n"
@@ -467,8 +471,8 @@
       "  MPI_Finalize();\n"
       "}\n")
   endif()
-  try_compile(worked ${CMAKE_CURRENT_BINARY_DIR} ${test_file})
-  if (worked)
+  try_compile(compiler_has_mpi ${scratch_directory} ${test_file})
+  if (compiler_has_mpi)
     set(MPI_${lang}_NO_INTERROGATE ${CMAKE_${lang}_COMPILER} CACHE STRING "Whether to interrogate MPI ${lang} compiler" FORCE)
     set(MPI_${lang}_COMPILER       ${CMAKE_${lang}_COMPILER} CACHE STRING "MPI ${lang} compiler"                        FORCE)
     set(MPI_${lang}_COMPILE_FLAGS  ""                        CACHE STRING "MPI ${lang} compilation flags"               FORCE)
@@ -476,8 +480,8 @@
     set(MPI_${lang}_LINK_FLAGS     ""                        CACHE STRING "MPI ${lang} linking flags"                   FORCE)
     set(MPI_${lang}_LIBRARIES      ""                        CACHE STRING "MPI ${lang} libraries to link against"       FORCE)
   endif()
-  set(${success} ${worked} PARENT_SCOPE)
-  file(REMOVE ${test_file})
+  set(${success} ${compiler_has_mpi} PARENT_SCOPE)
+  unset(compiler_has_mpi CACHE)
 endfunction()

 # End definitions, commence real work here.