Fix pandas 0.22 incompatibility by upgrading Arrow (#3786)

--- cmake/Modules/ArrowExternalProject.cmake
+++ cmake/Modules/ArrowExternalProject.cmake
@@ -15,17 +15,17 @@
 #  - PLASMA_SHARED_LIB

 set(arrow_URL https://github.com/ray-project/arrow.git)
-# This commit is based on https://github.com/apache/arrow/pull/3392. We
+# This commit is based on https://github.com/apache/arrow/pull/3410. We
 # include the link here to make it easier to find the right commit because
 # Arrow often rewrites git history and invalidates certain commits.
 # It has been patched to fix an upstream symbol clash with TensorFlow,
 # the patch is available at
-# https://github.com/ray-project/arrow/commit/f8c990e4165012123e03d822c95526eaea5cbfab
+# https://github.com/ray-project/arrow/commit/511dae1149e3656bbf84f461729f2306d2ebf2e5
 # See the discussion in https://github.com/apache/arrow/pull/3177
 # WARNING: If the arrow version is updated, you need to also update the
 # SETUPTOOLS_SCM_PRETEND_VERSION version string in the ThirdpartyToolchain.cmake
 # file
-set(arrow_TAG f8c990e4165012123e03d822c95526eaea5cbfab)
+set(arrow_TAG 511dae1149e3656bbf84f461729f2306d2ebf2e5)

 set(ARROW_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/arrow-install)
 set(ARROW_HOME ${ARROW_INSTALL_PREFIX})


Strip tone alarm

Strip tone alarm

--- cmake/configs/nuttx_asc-v1_default.cmake
+++ cmake/configs/nuttx_asc-v1_default.cmake
@@ -9,7 +9,6 @@
 	drivers/device
 	drivers/stm32
 	drivers/stm32/adc
-	drivers/stm32/tone_alarm
 	drivers/led
 	#drivers/px4fmu
 	drivers/boards/asc-v1


build: filter -z,nodelete on Windows

build: filter -z,nodelete on Windows

LLVM recently added a new ELF-only linker flag that gets exported.
Filter this from  the linker flags too.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -90,6 +90,7 @@
   # selectively add it to the per-target link flags; this is currently done
   # in add_swift_library within AddSwift.cmake.
   string(REGEX REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+  string(REGEX REPLACE "-Wl,-z,nodelete" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")

   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
   string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" PACKAGE_VERSION_MAJOR


Add hunter_download_cache_{meta,raw}_file calls

--- cmake/modules/hunter_load_from_cache.cmake
+++ cmake/modules/hunter_load_from_cache.cmake
@@ -5,6 +5,8 @@
 include(hunter_cache_run)
 include(hunter_create_cache_meta_directory)
 include(hunter_create_dependency_entry)
+include(hunter_download_cache_meta_file)
+include(hunter_download_cache_raw_file)
 include(hunter_internal_error)
 include(hunter_status_debug)
 include(hunter_test_string_not_empty)
@@ -74,6 +76,10 @@
   set(basic_deps_done "${cache_meta_dir}/basic-deps.DONE")
   set(basic_deps_info "${cache_meta_dir}/basic-deps.info")

+  hunter_download_cache_meta_file(
+      LOCAL "${basic_deps_info}" DONE "${basic_deps_done}"
+  )
+
   if(NOT EXISTS "${basic_deps_done}")
     hunter_status_debug(
         "Cache miss (no basic dependencies info found: ${basic_deps_done})"
@@ -137,6 +143,10 @@

   set(cache_sha1_file "${cache_meta_dir}/cache.sha1")
   set(cache_done_file "${cache_meta_dir}/CACHE.DONE")
+
+  hunter_download_cache_meta_file(
+      LOCAL "${cache_sha1_file}" DONE "${cache_done_file}"
+  )

   if(NOT EXISTS "${cache_done_file}")
     hunter_status_debug(
@@ -179,6 +189,9 @@
   # Unpack cache archive
   file(READ "${cache_sha1_file}" cache_sha1)
   set(archive_file "${cache_directory}/raw/${cache_sha1}.tar.bz2")
+
+  hunter_download_cache_raw_file(LOCAL "${archive_file}" SHA1 "${cache_sha1}")
+
   if(NOT EXISTS "${archive_file}")
     hunter_internal_error("archive file not found: ${archive_file}")
   endif()


Fix CMOCKA_LIBRARIES name in documentation

--- test/cmake/Modules/FindCMocka.cmake
+++ test/cmake/Modules/FindCMocka.cmake
@@ -9,7 +9,7 @@
 #  CMOCKA_FOUND - system has CMocka
 #  CMOCKA_INCLUDE_DIRS - the CMocka include directories
 #  CMOCKA_INCLUDE_DIR - for backwards compatiblity, the same as CMOCKA_INCLUDE_DIRS
-#  CMOCKA_LIBRARIES - Link these to use CMocka
+#  CMOCKA_LIBRARY - CMocka library location
 #  CMOCKA_DEFINITIONS - Compiler switches required for using CMocka
 #


Fix compile err -- this lets us find "SDL.h"

	* Previously, we were including SDL via "SDL2/SDL.h"; this script
shouldn't have allowed that.

--- cmake/modules/FindSDL2.cmake
+++ cmake/modules/FindSDL2.cmake
@@ -18,11 +18,9 @@
 # If found, this will prefer the Framework version over others.
 #

-find_path ( SDL2_INCLUDE_DIR
-            NAMES
-            SDL2/SDL.h
-            PATH_SUFFIXES
-            include/SDL2 SDL2
+find_path (
+            SDL2_INCLUDE_DIR SDL.h
+            PATH_SUFFIXES SDL2
             PATHS
             ~/Library/Frameworks
             /Library/Frameworks


Remove assumption in commentary and messages that the hpdf library that is
found is always static.

svn path=/trunk/; revision=10256

--- cmake/modules/Findhpdf.cmake
+++ cmake/modules/Findhpdf.cmake
@@ -5,7 +5,8 @@
 #  hpdf_FOUND, if false, do not try to use haru pdf.
 #  hpdf_INCLUDE_DIRS, where to find hpdf.h.
 #  hpdf_LIBRARIES, the libraries to link against to use haru pdf
-#  hpdf_LIBRARY_DIRS, the directory where libhpdf.a is found.
+#  hpdf_LIBRARY_DIRS, the directory where libhpdf (either shared or static)
+#  is found.

 find_path(hpdf_INCLUDE_DIR hpdf.h /usr/local/include /usr/include)

@@ -26,10 +27,10 @@

 if(hpdf_FOUND)
   if(NOT hpdf_FIND_QUIETLY)
-    message(STATUS "Findhpdf: Found both hpdf.h and libhpdf.a")
+    message(STATUS "Findhpdf: Found haru header directory, ${hpdf_INCLUDE_DIR}, and library, ${hpdf_LIBRARIES}.")
   endif(NOT hpdf_FIND_QUIETLY)
 else(hpdf_FOUND)
   if(hpdf_FIND_REQUIRED)
-    message(FATAL_ERROR "Findhpdf: Could not find hpdf.h and/or libhpdf.a")
+    message(FATAL_ERROR "Findhpdf: Could not find haru (hpdf) header and/or library.")
   endif(hpdf_FIND_REQUIRED)
 endif(hpdf_FOUND)


ctest: Shorten branch names to gh issue tag

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- test.cmake
+++ test.cmake
@@ -35,6 +35,9 @@
 if(git_branch MATCHES "^[0-9a-f]+$")
    # it's a hash -> make it short
    string(SUBSTRING "${git_branch}" 0 7 git_branch)
+elseif(git_branch MATCHES "^gh-[0-9]+")
+   # it's a feature branch referencing a GitHub issue number -> make it short
+   string(REGEX MATCH "^gh-[0-9]+" git_branch "${git_branch}")
 endif()

 # determine the (short) hostname of the build machine


temporary fix tbb version error

temporary fix tbb version error

--- components/ospcommon/cmake/FindTBB.cmake
+++ components/ospcommon/cmake/FindTBB.cmake
@@ -113,7 +113,7 @@
     FIND_LIBRARY(TBB_LIBRARY_MALLOC_DEBUG tbbmalloc_debug PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
   ELSE()
     FIND_PATH(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
-    SET(TBB_HINTS HINTS ${TBB_ROOT}/lib/intel64/gcc4.4 ${TBB_ROOT}/lib ${TBB_ROOT}/lib64 PATHS /usr/libx86_64-linux-gnu/)
+    SET(TBB_HINTS HINTS ${TBB_ROOT}/lib/intel64/gcc4.7 ${TBB_ROOT}/lib ${TBB_ROOT}/lib64 PATHS /usr/libx86_64-linux-gnu/)
     FIND_LIBRARY(TBB_LIBRARY libtbb.so.2 ${TBB_HINTS})
     FIND_LIBRARY(TBB_LIBRARY_DEBUG libtbb_debug.so.2 ${TBB_HINTS})
     FIND_LIBRARY(TBB_LIBRARY_MALLOC libtbbmalloc.so.2 ${TBB_HINTS})


cmake: added NAMES_PER_DIR flag when searching for boost_python

--- config/FindVIGRANUMPY_DEPENDENCIES.cmake
+++ config/FindVIGRANUMPY_DEPENDENCIES.cmake
@@ -120,6 +120,7 @@

         FIND_LIBRARY(Boost_PYTHON_LIBRARY
                      NAMES ${BOOST_PYTHON_NAMES}
+                     NAMES_PER_DIR
                      HINTS "${Boost_LIBRARY_DIR}"
                      DOC "boost_python libraries")
     ENDIF()


CPPCheck: Set CMAKE_MODULE_PATH before calling find_package

--- CPPCheck.cmake
+++ CPPCheck.cmake
@@ -14,11 +14,15 @@
      "{file}:{line}: {severity} {id}: {message}"
      --inline-suppr
      --max-configs=1)
+set (_CPPCHECK_LIST_DIR "${CMAKE_CURRENT_LIST_DIR}")

 macro (cppcheck_validate CONTINUE)

     if (NOT DEFINED CPPCheck_FOUND)

+        set (CMAKE_MODULE_PATH
+             ${CMAKE_MODULE_PATH} # NOLINT:correctness/quotes
+             "${_CPPCHECK_LIST_DIR}")
         find_package (CPPCHECK ${ARGN})

     endif ()


testing FindPythonLibs

testing FindPythonLibs

--- cmake/FindPythonLibsNew.cmake
+++ cmake/FindPythonLibsNew.cmake
@@ -67,15 +67,7 @@
 # testing whether sys has the gettotalrefcount function is a reliable, cross-platform
 # way to detect a CPython debug interpreter.
 execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
-    "from distutils import sysconfig as s;import sys;import struct;
-print('.'.join(str(v) for v in sys.version_info));
-print(s.PREFIX);
-print(s.get_python_inc(plat_specific=True));
-print(s.get_python_lib(plat_specific=True));
-print(s.get_config_var('SO'));
-print(hasattr(sys, 'gettotalrefcount')+0);
-print(struct.calcsize('@P'));
-"
+    "from distutils import sysconfig as s;import sys;import struct; print('.'.join(str(v) for v in sys.version_info)); print(s.PREFIX); print(s.get_python_inc(plat_specific=True)); print(s.get_python_lib(plat_specific=True)); print(s.get_config_var('SO')); print(hasattr(sys, 'gettotalrefcount')+0); print(struct.calcsize('@P'));"
     RESULT_VARIABLE _PYTHON_SUCCESS
     OUTPUT_VARIABLE _PYTHON_VALUES
     ERROR_VARIABLE _PYTHON_ERROR_VALUE


Use arrow numeric version instead of arrow version string.

--- cmake/Modules/FindArrow.cmake
+++ cmake/Modules/FindArrow.cmake
@@ -74,13 +74,20 @@
     set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${ARROW_ROOT}/lib/pkgconfig" )
     find_package(PkgConfig)
     pkg_search_module(_ARROW REQUIRED arrow) # using only version information
-    ADD_DEFINITIONS(-DARROW_VERSION="${_ARROW_VERSION}")
-    if ("${_ARROW_VERSION}" MATCHES "^(0.8.0|0.9.0|0.10.0)$")
-      ADD_DEFINITIONS(-DARROW_METADATA_V4)
-    elseif ("${_ARROW_VERSION}" MATCHES "^(0.7.0|0.7.1)$")
+    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" ARROW_VERSION_MAJOR "${_ARROW_VERSION}")
+    STRING(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" ARROW_VERSION_MINOR "${_ARROW_VERSION}")
+    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" ARROW_VERSION_PATCH "${_ARROW_VERSION}")
+    math(EXPR ARROW_NUMERIC_VERSION "${ARROW_VERSION_MAJOR} * 10000 + ${ARROW_VERSION_MINOR} * 100 + ${ARROW_VERSION_PATCH}")
+    message(STATUS "ARROW_NUMERIC_VERSION=${ARROW_NUMERIC_VERSION}")
+    ADD_DEFINITIONS(-DARROW_VERSION=${ARROW_NUMERIC_VERSION})
+    # see arrow/ipc/message.h
+    if (ARROW_NUMERIC_VERSION LESS 200)
+      ADD_DEFINITIONS(-DARROW_METADATA_V1)
+    elseif (ARROW_NUMERIC_VERSION LESS 300)
+      ADD_DEFINITIONS(-DARROW_METADATA_V2)
+    elseif (ARROW_NUMERIC_VERSION LESS 800)
       ADD_DEFINITIONS(-DARROW_METADATA_V3)
     else()
-      message(WARNING "Unrecognized arrow version: ${_ARROW_VERSION}, assuming the most recent.")
       ADD_DEFINITIONS(-DARROW_METADATA_V4)
     endif()
 endif ()


fixed qhull cmake files (thanks Nizar!)

fixed qhull cmake files (thanks Nizar!)

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@597 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/Modules/FindQhull.cmake
+++ cmake/Modules/FindQhull.cmake
@@ -7,17 +7,15 @@
 # QHULL_LIBRARIES - Libraries needed to use QHULL.
 # QHULL_DEFINITIONS - Compiler flags for QHULL.

-#find_path(QHULL_INCLUDE_DIR qhull/qhull.h)
 find_path(QHULL_INCLUDE_DIR qhull.h
           HINTS ${QHULL_ROOT}
-          PATH_SUFFIXES qhull src)
+          PATH_SUFFIXES qhull src/libqhull libqhull)

-#find_library(QHULL_LIBRARY qhull)
 find_library(QHULL_LIBRARY qhull
              HINTS ${QHULL_ROOT}
              PATH_SUFFIXES project)

-set(QHULL_INCLUDE_DIRS ${QHULL_INCLUDE_DIR}/qhull ${QHULL_INCLUDE_DIR})
+set(QHULL_INCLUDE_DIRS ${QHULL_INCLUDE_DIR})
 set(QHULL_LIBRARIES ${QHULL_LIBRARY})

 include(FindPackageHandleStandardArgs)


Fix Ninja build on mac. (#4737)

Fix Ninja build on mac. (#4737)

Co-authored-by: Scott Cyphers <7bb9a997e5f2906b81b1e1515637af43501e2590@users.noreply.github.com>

--- cmake/external_protobuf.cmake
+++ cmake/external_protobuf.cmake
@@ -107,7 +107,7 @@
         UPDATE_COMMAND ""
         PATCH_COMMAND ""
         CONFIGURE_COMMAND ./autogen.sh COMMAND ./configure --prefix=${EXTERNAL_PROJECTS_ROOT}/protobuf --disable-shared
-        BUILD_COMMAND $(MAKE) "CXXFLAGS=-std=c++${NGRAPH_CXX_STANDARD} -fPIC"
+        BUILD_COMMAND ${MAKE_UTIL} "CXXFLAGS=-std=c++${NGRAPH_CXX_STANDARD} -fPIC"
         TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/tmp"
         STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/stamp"
         DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/protobuf/download"


Packaging fix related to DESTDIR install.

--- build/cmake/install.cmake
+++ build/cmake/install.cmake
@@ -45,7 +45,6 @@
   CODE "
   message(STATUS \"Directories: \$ENV{DESTDIR}/usr/bin \$ENV{DESTDIR}/var/log \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/etc \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/var/db \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/var/log \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/var/run \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/var/tmp\")
   execute_process(
-    WORKING_DIRECTORY \$ENV{DESTDIR}/usr/bin
     COMMAND mkdir -p \$ENV{DESTDIR}/usr/bin \$ENV{DESTDIR}/var/log \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/etc \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/var/db \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/var/log \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/var/run \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/var/tmp
   )
   message(STATUS \"Installing: \$ENV{DESTDIR}/usr/bin/api-umbrella\")


added usbasp

added usbasp

--- scripts/Arduino.cmake
+++ scripts/Arduino.cmake
@@ -93,9 +93,16 @@

     add_custom_target(flash)
     add_dependencies(flash hex)
-    add_custom_command(TARGET flash POST_BUILD
-        COMMAND ${AVRDUDE} -C${AVRDUDE_CONFIG} -v -p${ARDUINO_MCU} -c${ARDUINO_PROTOCOL}  -P${PORT} -b${ARDUINO_UPLOAD_SPEED} -D -Uflash:w:${FIRMWARE_TARGET}.hex:i
-    )
+
+    if(ARDUINO_PROTOCOL STREQUAL "usbasp")
+        add_custom_command(TARGET flash POST_BUILD
+            COMMAND ${AVRDUDE} -C${AVRDUDE_CONFIG} -v -p${ARDUINO_MCU} -c usbasp -Uflash:w:firmware.hex:i
+        )
+    else()
+        add_custom_command(TARGET flash POST_BUILD
+            COMMAND ${AVRDUDE} -C${AVRDUDE_CONFIG} -v -p${ARDUINO_MCU} -c${ARDUINO_PROTOCOL}  -P${PORT} -b${ARDUINO_UPLOAD_SPEED} -D -Uflash:w:${FIRMWARE_TARGET}.hex:i
+        )
+    endif()

 endif()


add abstraction to ctest functions

add abstraction to ctest functions

so future modules can be added easily

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -15,20 +15,19 @@
 #

 #===============================================================================
-# Functions defining available test types
+# Generic test functions
 #===============================================================================

-# Standard regression test
-function(of_regression testname LABELS)
+function(regression TEST_SCRIPT EXECUTABLE SOURCE_DIRECTORY BUILD_DIRECTORY TESTNAME LABELS PLOT_FLAG)
   file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" PYTHON_EXECUTABLE)

-  file(TO_NATIVE_PATH "${CMAKE_CURRENT_LIST_DIR}/executeOpenfastRegressionCase.py" TEST_SCRIPT)
-  file(TO_NATIVE_PATH "${CTEST_OPENFAST_EXECUTABLE}" OPENFAST_EXECUTABLE)
-  file(TO_NATIVE_PATH "${CMAKE_CURRENT_LIST_DIR}/.." SOURCE_DIRECTORY)
-  file(TO_NATIVE_PATH "${CTEST_BINARY_DIR}/glue-codes/fast" BUILD_DIRECTORY)
+  file(TO_NATIVE_PATH "${EXECUTABLE}" EXECUTABLE)
+  file(TO_NATIVE_PATH "${TEST_SCRIPT}" TEST_SCRIPT)
+  file(TO_NATIVE_PATH "${SOURCE_DIRECTORY}" SOURCE_DIRECTORY)
+  file(TO_NATIVE_PATH "${BUILD_DIRECTORY}" BUILD_DIRECTORY)

+  string(REPLACE "\\" "\\\\" EXECUTABLE ${EXECUTABLE})
   string(REPLACE "\\" "\\\\" TEST_SCRIPT ${TEST_SCRIPT})
-  string(REPLACE "\\" "\\\\" OPENFAST_EXECUTABLE ${OPENFAST_EXECUTABLE})
   string(REPLACE "\\" "\\\\" SOURCE_DIRECTORY ${SOURCE_DIRECTORY})
   string(REPLACE "\\" "\\\\" BUILD_DIRECTORY ${BUILD_DIRECTORY})

@@ -38,10 +37,10 @@
   endif()

   add_test(
-    ${testname} ${PYTHON_EXECUTABLE}
+    ${TESTNAME} ${PYTHON_EXECUTABLE}
        ${TEST_SCRIPT}
-       ${testname}
-       ${OPENFAST_EXECUTABLE}
+       ${TESTNAME}
+       ${EXECUTABLE}
        ${SOURCE_DIRECTORY}              # openfast source directory
        ${BUILD_DIRECTORY}               # build directory for test
        ${TOLERANCE}
@@ -51,32 +50,28 @@
   )
   # limit each test to 90 minutes: 5400s
   set_tests_properties(${testname} PROPERTIES TIMEOUT 5400 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "${LABELS}")
+endfunction(regression)
+
+#===============================================================================
+# Module specific regression test calls
+#===============================================================================
+
+# openfast
+function(of_regression TESTNAME LABELS)
+  set(TEST_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/executeOpenfastRegressionCase.py")
+  set(OPENFAST_EXECUTABLE "${CTEST_OPENFAST_EXECUTABLE}")
+  set(SOURCE_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/..")
+  set(BUILD_DIRECTORY "${CTEST_BINARY_DIR}/glue-codes/fast")
+  regression(${TEST_SCRIPT} ${OPENFAST_EXECUTABLE} ${SOURCE_DIRECTORY} ${BUILD_DIRECTORY} ${TESTNAME} ${LABELS})
 endfunction(of_regression)

-function(bd_regression testname LABELS)
-  file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" PYTHON_EXECUTABLE)
-
-  file(TO_NATIVE_PATH "${CMAKE_CURRENT_LIST_DIR}/executeBeamdynRegressionCase.py" TEST_SCRIPT)
-  file(TO_NATIVE_PATH "${CTEST_BEAMDYN_EXECUTABLE}" BEAMDYN_EXECUTABLE)
-  file(TO_NATIVE_PATH "${CMAKE_CURRENT_LIST_DIR}/.." SOURCE_DIRECTORY)
-  file(TO_NATIVE_PATH "${CTEST_BINARY_DIR}/modules-local/beamdyn" BUILD_DIRECTORY)
-
-  string(REPLACE "\\" "\\\\" TEST_SCRIPT ${TEST_SCRIPT})
-  string(REPLACE "\\" "\\\\" BEAMDYN_EXECUTABLE ${BEAMDYN_EXECUTABLE})
-  string(REPLACE "\\" "\\\\" SOURCE_DIRECTORY ${SOURCE_DIRECTORY})
-  string(REPLACE "\\" "\\\\" BUILD_DIRECTORY ${BUILD_DIRECTORY})
-
-  add_test(
-    ${testname} ${PYTHON_EXECUTABLE}
-       ${TEST_SCRIPT}
-       ${testname}
-       ${BEAMDYN_EXECUTABLE}
-       ${SOURCE_DIRECTORY}              # openfast source directory
-       ${BUILD_DIRECTORY}               # build directory for test
-       ${TOLERANCE}
-  )
-  # limit each test to 90 minutes: 5400s
-  set_tests_properties(${testname} PROPERTIES TIMEOUT 5400 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "${LABELS}")
+# beamdyn
+function(bd_regression TESTNAME LABELS)
+  set(TEST_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/executeBeamdynRegressionCase.py")
+  set(BEAMDYN_EXECUTABLE "${CTEST_BEAMDYN_EXECUTABLE}")
+  set(SOURCE_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/..")
+  set(BUILD_DIRECTORY "${CTEST_BINARY_DIR}/modules-local/beamdyn")
+  regression(${TEST_SCRIPT} ${BEAMDYN_EXECUTABLE} ${SOURCE_DIRECTORY} ${BUILD_DIRECTORY} ${TESTNAME} ${LABELS})
 endfunction(bd_regression)

 #===============================================================================


Report error during configuration if DCMQI is not found

--- CMake/FindDCMQI.cmake
+++ CMake/FindDCMQI.cmake
@@ -8,10 +8,6 @@

 set(DCMQI_INCLUDE_DIR "${DCMQI_DIR}/include" "${MITK_EXTERNAL_PROJECT_PREFIX}/src/DCMQI/include" "${MITK_EXTERNAL_PROJECT_PREFIX}/src/DCMQI/jsoncpp" ${DCMQI_DIR})

-find_package_handle_standard_args(DCMQI
-  FOUND_VAR DCMQI_FOUND
-  REQUIRED_VARS DCMQI_INCLUDE_DIR
-)

 # Find all libraries, store debug and release separately
   # Find Release libraries
@@ -46,3 +42,8 @@
   if(DCMQI_LIBRARY_DEBUG)
     list(APPEND DCMQI_LIBRARIES debug ${DCMQI_LIBRARY_DEBUG})
   endif()
+
+find_package_handle_standard_args(DCMQI
+  FOUND_VAR DCMQI_FOUND
+  REQUIRED_VARS DCMQI_INCLUDE_DIR DCMQI_LIBRARIES
+)


Build sync with dogless disabled

Build sync with dogless disabled

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -314,11 +314,11 @@
         INSTALL_COMMAND ""
         CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory build.debug
                         && cd build.debug
-                        && cmake -D CMAKE_BUILD_TYPE=Debug -DREALM_CORE_BUILDTREE=${core_directory}/build.debug ${sync_cfg_args} ..
+                        && cmake -D CMAKE_BUILD_TYPE=Debug -DREALM_CORE_BUILDTREE=${core_directory}/build.debug ${sync_cfg_args} -DREALM_BUILD_DOGLESS=OFF ..
                         && cd ..
                         && ${CMAKE_COMMAND} -E make_directory build.release
                         && cd build.release
-                        && cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -DREALM_CORE_BUILDTREE=${core_directory}/build.release ${sync_cfg_args} ..
+                        && cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -DREALM_CORE_BUILDTREE=${core_directory}/build.release ${sync_cfg_args} -DREALM_BUILD_DOGLESS=OFF ..

         BUILD_COMMAND cd build.debug
                    && cmake --build .


added documentation and linker property to usecyclus

--- CMake/UseCyclus.cmake
+++ CMake/UseCyclus.cmake
@@ -1,10 +1,38 @@
-MACRO(use_cyclus _dir _name)
-  MESSAGE(STATUS "Starting construction of build files for agent: ${_dir}")
+#
+# The USE_CYCLUS macro builds agent libraries for Cyclus given some source
+# files.
+#
+# Arguments:
+#   lib_root : the root library name, e.g., MyAgent
+#   src_root : the root name of source files, e.g., my_agent for my_agent.h
+#              and my_agent.cc
+#
+# The following vars are updated.
+#
+# CYCLUS_LIBRARIES   : updated to include <lib_root>_LIB
+#
+# The following vars are set.
+#
+# <lib_root>_H       : the headers used for the agent
+# <lib_root>_CC      : the srcs used for the agent
+# <lib_root>_TEST_H  : the headers used for the agent tests, if it exists
+# <lib_root>_TEST_CC : the srcs used for the agent tests, if it exists
+#
+# Target names that are valid:
+#
+# <lib_root>_LIB      : the name of the library target
+# <lib_root>_TEST_LIB : the name of the test library target, if test source
+#                       exists
+#
+MACRO(USE_CYCLUS lib_root src_root)
+  MESSAGE(STATUS "Starting construction of build files for agent: ${lib_root}")

   # output directory
-  SET(AGENT_PATH "/cyclus/${_dir}")
-  SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY
-    ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${AGENT_PATH})
+  SET(AGENT_PATH "cyclus/${lib_root}")
+  SET(
+    CMAKE_LIBRARY_OUTPUT_DIRECTORY
+    ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${AGENT_PATH}
+    )

   # get preprocessor script
   IF(NOT DEFINED CYCPP)
@@ -12,7 +40,7 @@
   ENDIF(NOT DEFINED CYCPP)

   # make a build directory
-  SET(BUILD_DIR ${PROJECT_BINARY_DIR}/${_dir})
+  SET(BUILD_DIR ${PROJECT_BINARY_DIR}/${lib_root})
   FILE(MAKE_DIRECTORY ${BUILD_DIR})

   # collect include directories argument
@@ -31,38 +59,42 @@

   # process header
   SET(ORIG "--pass3-use-orig")
-  SET(HIN "${CMAKE_CURRENT_SOURCE_DIR}/${_name}.h")
-  SET(HOUT "${BUILD_DIR}/${_name}.h")
+  SET(HIN "${CMAKE_CURRENT_SOURCE_DIR}/${src_root}.h")
+  SET(HOUT "${BUILD_DIR}/${src_root}.h")
   SET(HFLAG "-o=${HOUT}")
   IF(EXISTS "${HIN}")
     IF(NOT EXISTS ${HOUT})
       MESSAGE(STATUS "Executing ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}")
       EXECUTE_PROCESS(COMMAND ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS})
     ENDIF(NOT EXISTS ${HOUT})
+    SET(
+      "${lib_root}_H"
+      "${HOUT}"
+      CACHE INTERNAL "Agent header" FORCE
+      )
   ENDIF(EXISTS "${HIN}")

   # process impl
-  SET(CCIN "${CMAKE_CURRENT_SOURCE_DIR}/${_name}.cc")
-  SET(CCOUT "${BUILD_DIR}/${_name}.cc")
+  SET(CCIN "${CMAKE_CURRENT_SOURCE_DIR}/${src_root}.cc")
+  SET(CCOUT "${BUILD_DIR}/${src_root}.cc")
   SET(CCFLAG "-o=${CCOUT}")
   IF(NOT EXISTS ${CCOUT})
     MESSAGE(STATUS "Executing ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}")
     EXECUTE_PROCESS(COMMAND ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS})
   ENDIF(NOT EXISTS ${CCOUT})
+  SET(
+    "${lib_root}_CC"
+    "${CCOUT}"
+    CACHE INTERNAL "Agent source" FORCE
+    )

   # add library
-  ADD_LIBRARY(${_dir} ${CCOUT})
-  TARGET_LINK_LIBRARIES(${_dir} dl cycluscore)
-  SET(CYCLUS_LIBRARIES ${CYCLUS_LIBRARIES} ${_dir})
-  ADD_DEPENDENCIES(${_dir} ${HIN} ${HOUT} ${CCIN} ${CCOUT})
+  ADD_LIBRARY(${lib_root} ${CCOUT})
+  TARGET_LINK_LIBRARIES(${lib_root} dl cycluscore)
+  SET(CYCLUS_LIBRARIES ${CYCLUS_LIBRARIES} ${lib_root})
+  ADD_DEPENDENCIES(${lib_root} ${HIN} ${HOUT} ${CCIN} ${CCOUT})

   IF(EXISTS "${HIN}")
-    ADD_CUSTOM_COMMAND(
-      OUTPUT ${HOUT}
-      COMMAND ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}
-      DEPENDS ${HIN}
-      COMMENT "Executing ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}"
-      )
     ADD_CUSTOM_COMMAND(
       OUTPUT ${CCOUT}
       OUTPUT ${HOUT}
@@ -83,36 +115,36 @@
   ENDIF(EXISTS "${HIN}")

   # install library
-  install(TARGETS ${_dir}
-    LIBRARY DESTINATION lib${_dir}
-    COMPONENT ${_dir}
-    )
-
-  SET("Lib${_dir}" "${_dir}"
-    CACHE INTERNAL "CMake is really silly, the silliest, in fact" FORCE
+  install(
+    TARGETS ${lib_root}
+    LIBRARY DESTINATION lib${lib_root}
+    COMPONENT ${lib_root}
+    )
+  SET(
+    "${lib_root}_LIB"
+    "${lib_root}"
+    CACHE INTERNAL "Agent library alias." FORCE
     )

   # install headers
   IF(EXISTS "${HOUT}")
-    install(FILES ${HOUT}
+    INSTALL(
+      FILES ${HOUT}
       DESTINATION include/cyclus
-      COMPONENT ${_dir}
+      COMPONENT ${lib_root}
       )
   ENDIF(EXISTS "${HOUT}")

   # add tests
-  SET(CCTIN "${CMAKE_CURRENT_SOURCE_DIR}/${_name}_tests.cc")
-  SET(CCTOUT "${BUILD_DIR}/${_name}_tests.cc")
-  SET(HTIN "${CMAKE_CURRENT_SOURCE_DIR}/${_name}_tests.h")
-  SET(HTOUT "${BUILD_DIR}/${_name}_tests.h")
+  SET(CCTIN "${CMAKE_CURRENT_SOURCE_DIR}/${src_root}_tests.cc")
+  SET(CCTOUT "${BUILD_DIR}/${src_root}_tests.cc")
+  SET(HTIN "${CMAKE_CURRENT_SOURCE_DIR}/${src_root}_tests.h")
+  SET(HTOUT "${BUILD_DIR}/${src_root}_tests.h")
   SET(CMD "cp")
   IF(EXISTS "${CCTIN}")
-    MESSAGE(STATUS "Copying ${CCTIN} to ${CCTOUT}.")
-    # FILE(COPY ${CCTIN} DESTINATION ${BUILD_DIR})
-    EXECUTE_PROCESS(COMMAND ${CMD} ${CCTIN} ${CCTOUT})
     IF(EXISTS "${HTIN}")
+      # install test headers
       MESSAGE(STATUS "Copying ${HTIN} to ${HTOUT}.")
-      # FILE(COPY ${HTIN} DESTINATION ${BUILD_DIR})
       EXECUTE_PROCESS(COMMAND ${CMD} ${HTIN} ${HTOUT})
       ADD_CUSTOM_COMMAND(
       	OUTPUT ${HTOUT}
@@ -126,44 +158,41 @@
 	COMMENT "Copying ${HTIN} to ${HTOUT}."
 	COMMENT "Copying ${CCTIN} to ${CCTOUT}."
 	)
-      # ADD_CUSTOM_TARGET(
-      # 	${_dir}TestCp ALL
-      # 	COMMAND ${CMD} ${HTIN} ${HTOUT}
-      # 	COMMAND ${CMD} ${CCTIN} ${CCTOUT}
-      # 	DEPENDS ${HTIN}
-      # 	DEPENDS ${CCTIN}
-      # 	COMMENT "Copying ${HTIN} to ${HTOUT}."
-      # 	COMMENT "Copying ${CCTIN} to ${CCTOUT}."
-      # 	)
-      SET("${_dir}TestHeader"
+      SET(
+	"${lib_root}_Test_H"
 	"${HTOUT}"
-	CACHE INTERNAL "CMake is really silly, the silliest, tin fact" FORCE
+	CACHE INTERNAL "Agent test headers" FORCE
 	)
-    ELSE(EXISTS "${HTIN}")
-      ADD_CUSTOM_COMMAND(
-	OUTPUT ${CCTOUT}
-	COMMAND ${CMD} ${CCTIN} ${CCTOUT}
-	DEPENDS ${CCTIN}
-	DEPENDS ${CCIN}
-	COMMENT "Copying ${CCTIN} to ${CCTOUT}."
-	)
-      # ADD_CUSTOM_TARGET(
-      # 	${_dir}TestCp ALL
-      # 	COMMAND ${CMD} ${CCTIN} ${CCTOUT}
-      # 	DEPENDS ${CCTIN}
-      # 	COMMENT "Copying ${CCTIN} to ${CCTOUT}."
-      # 	)
     ENDIF(EXISTS "${HTIN}")
-    SET("${_dir}TestSource"
+
+    # install test impl
+    MESSAGE(STATUS "Copying ${CCTIN} to ${CCTOUT}.")
+    EXECUTE_PROCESS(COMMAND ${CMD} ${CCTIN} ${CCTOUT})
+    ADD_CUSTOM_COMMAND(
+      OUTPUT ${CCTOUT}
+      COMMAND ${CMD} ${CCTIN} ${CCTOUT}
+      DEPENDS ${CCTIN}
+      DEPENDS ${CCIN}
+      COMMENT "Copying ${CCTIN} to ${CCTOUT}."
+      )
+    SET(
+      "${lib_root}_Test_CC"
       "${CCOUT}"
       "${CCTOUT}"
-      CACHE INTERNAL "CMake is really silly, the silliest, tin fact" FORCE
-      )
-    ADD_LIBRARY(${_dir}Tests ${${_dir}TestSource})
-    TARGET_LINK_LIBRARIES(${_dir}Tests dl cycluscore ${CYCLUS_GTEST_LIBRARIES})
+      CACHE INTERNAL "Agent test source" FORCE
+      )
+    ADD_LIBRARY(${lib_root}Tests ${${lib_root}TestSource})
+    TARGET_LINK_LIBRARIES(${lib_root}Tests dl cycluscore ${CYCLUS_GTEST_LIBRARIES})
+    SET_TARGET_PROPERTIES(${lib_root}Tests PROPERTIES LINKER_LANGUAGE C)
+    SET(
+      "${lib_root}_TEST_LIB"
+      "${lib_root}Tests"
+      CACHE INTERNAL "Agent test library alias." FORCE
+      )
+
   ENDIF(EXISTS "${CCTIN}")

-  MESSAGE(STATUS "Finished construction of build files for agent: ${_dir}")
+  MESSAGE(STATUS "Finished construction of build files for agent: ${lib_root}")
 ENDMACRO()

 macro(add_all_subdirs)


Removed the exit-time-destructors flag from clang.

We don't care about exit-time destructors, at least for now.

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -198,8 +198,8 @@
 			add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow")
 			add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations")
 			add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough")
-			add_flags_cxx("-Wno-weak-vtables -Wno-switch-enum")
-		endif()
-	endif()
-
-endmacro()
+			add_flags_cxx("-Wno-weak-vtables -Wno-switch-enum -Wno-exit-time-destructors")
+		endif()
+	endif()
+
+endmacro()


-DWITH_SHIPPED_GEOIP is handled explicit in filedistribution. No need for pollution.

--- build_settings.cmake
+++ build_settings.cmake
@@ -20,7 +20,7 @@
 set(WARN_OPTS "-Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")

 # C and C++ compiler flags
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -DWITH_SHIPPED_GEOIP -march=westmere -mtune=intel")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel")

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} -Wnon-virtual-dtor -fvisibility-inlines-hidden -fdiagnostics-color=auto")


No need to set it to itself.

No need to set it to itself.

--- build_settings.cmake
+++ build_settings.cmake
@@ -21,8 +21,6 @@

 # C and C++ compiler flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -DWITH_SHIPPED_GEOIP -march=westmere -mtune=intel")
-
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} -Wnon-virtual-dtor -fvisibility-inlines-hidden -fdiagnostics-color=auto")


#51 Command line

#51 Command line

--- sources/cmake/installCpack.cmake
+++ sources/cmake/installCpack.cmake
@@ -26,7 +26,7 @@

 set(AUTHOR "vcdMaker team")
 set(WEBSITE "https://vcdmaker.org")
-set(DESCRIPTION "Commandline tools that can generate VCD files from text logs")
+set(DESCRIPTION "Command line tools that can generate VCD files from text logs")

 set(CPACK_PACKAGE_NAME "vcdMaker")
 set(CPACK_PACKAGE_VENDOR ${AUTHOR})


ffmpeg/3.4: update FFmpeg wrapper 2021.12

- FFmpeg 3.4.9

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,8 +1,8 @@
-# Binaries branch name: ffmpeg/3.4_20211005
-# Binaries were created for OpenCV: 95c1d2a8872b222f32bd88db9f1efcbd9f70a9cf
-ocv_update(FFMPEG_BINARIES_COMMIT "0bf6c0753d435d2c82c03c48db0c6e18ac79976c")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "55c25bbc13e4a12d4339b70d3b76987f")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "67caee9231c6843483b4de9815d6526e")
+# Binaries branch name: ffmpeg/3.4_20211220
+# Binaries were created for OpenCV: a22dd28e0272ec0f1cfee8811d3f5f0392827c65
+ocv_update(FFMPEG_BINARIES_COMMIT "5a7644ec3940c6eed41c6ebb5a0602a5615fdb3f")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "8ad9de6f1f2ca77786748d1f3a4e83ea")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "2c670f068252e7cd28d3883993dc1d6e")
 ocv_update(FFMPEG_FILE_HASH_CMAKE "3b90f67f4b429e77d3da36698cef700c")

 function(download_win_ffmpeg script_var)


Artifactory.cmake: validate the artifact 'upload version'

The artifactory-download script requires a specific format for the
version strings. Artifactory also has some restrictions on what format
the version string can have.

If we don't enforce the correct format here, then it's possible to
upload artifacts with bad names that cause the whole artifact caching
system to break for everyone.

The error that I saw after uploading an artifact with too many hyphens
in the version string was this:

    CMake Error at Artifactory.cmake:269 (message):
      ERROR: Expected to find main artifact buildroot-development-x86_64-sam-hash-confusion.rootfs.tar.gz in the
      list of files, but did not! Artifact files are:

        ...

You can trigger the new error checking code by running:

    cmake -DBUILD_SERIES=my-invalid-build-series

This also fixes some issues in the existing artifact version validation.
You can trigger this by setting stuff like:

    cmake -DARTIFACTS_VERSION=my/bad/version

--- Artifactory.cmake
+++ Artifactory.cmake
@@ -121,6 +121,7 @@
     ensure_all_arguments_parsed(artifactory_add_artifact "${ARTIFACT_UNPARSED_ARGUMENTS}")
     require_arguments(artifactory_add_artifact ARTIFACT GROUP NAME REPO VERSION UPLOAD_VERSION DOWNLOAD_VERSION)
     _artifactory_check_version(${ARTIFACT_VERSION})
+    _artifactory_check_upload_version(${ARTIFACT_UPLOAD_VERSION})

     set(binary_directory ${CMAKE_CURRENT_BINARY_DIR}/${directory})

@@ -358,7 +359,7 @@

     ensure_all_arguments_parsed(artifactory_upload "${ARTIFACT_UNPARSED_ARGUMENTS}")
     require_arguments(artifactory_upload ARTIFACT GROUP LOCAL_DIRECTORY LOCAL_TARGET NAME REPO VERSION UPLOAD_VERSION)
-    _artifactory_check_version(${ARTIFACT_VERSION})
+    _artifactory_check_upload_version(${ARTIFACT_VERSION})

     set(extra_args)

@@ -418,12 +419,38 @@
     # * is allowed, and this lets the user share artifacts between different
     # version numbers. This makes sense if they are also filtering by
     # properties e.g. by commit SHA1 of the source repo.
-    set(invalid_chars "/[]\\")
-
-    if(${version_string} MATCHES "[${invalid_chars}]?")
+    set(invalid_chars "\]\[/\\")
+
+    if(${version_string} MATCHES "[${invalid_chars}]")
         message(FATAL_ERROR
             "Version string '${version_string}' contains invalid characters. "
             "The following characters are not allowed in Artifactory version "
             "strings: ${invalid_chars}")
     endif()
 endfunction()
+
+function(_artifactory_check_upload_version version_string)
+    # Ensure the upload version follows the expected form.
+    #
+    # The closest I can find for a spec for this format is here:
+    #
+    #   <https://www.jfrog.com/confluence/display/RTF/Repository+Layouts>
+    #
+    # The version string given here should be 'base revision' then 'file
+    # integration revision', joined with a dash. The crucial thing we are
+    # validating is that the 'base revision' contains no hyphens, and the
+    # the string as a whole contains exactly two hyphens. The
+    # artifactory-download script expects this format and will break in weird
+    # ways if it is not followed.
+
+    if(NOT ${version_string} MATCHES "^[^-]\+-[^-]\+-[^-]\+$")
+        message(FATAL_ERROR
+            "Version string '${version_string}' does not follow the correct "
+            "form. When uploading artifacts you must have a version string "
+            "following the form 'NAME-YYYYMMDD.hhmmss-N', for example "
+            "'master-20160427.075407-1'. There must be no dashes in the base "
+            "version string and exactly 2 dashes in the string as a whole.")
+    endif()
+
+    _artifactory_check_version(${version_string})
+endfunction()


bug fix on ctest config

bug fix on ctest config

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -7,7 +7,7 @@
   add_test(
     ${testname} bash -c "
       cp ${CMAKE_CURRENT_SOURCE_DIR}/test_files/${testname}/*.fst . &&
-      ${CMAKE_BUILD_DIR}/glue-codes/fast/openfast ${testname}.fst > ${testname}.log &&
+      ${CMAKE_BINARY_DIR}/glue-codes/fast/openfast ${testname}.fst > ${testname}.log &&
       python ${CMAKE_CURRENT_SOURCE_DIR}/pass_fail.py ${CMAKE_BINARY_DIR}/reg_tests/${testname}.outb ${CMAKE_CURRENT_SOURCE_DIR}/test_files/${testname}/${testname}.outb ${TOLERANCE}
     "
   )


Remove Coverage.cmake

Remove Coverage.cmake

--- Coverage.cmake
+++ Coverage.cmake
@@ -1,189 +0,0 @@
-# Copyright (c) 2012 - 2015, Lars Bilke
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification,
-# are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this
-#    list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
-#
-# 3. Neither the name of the copyright holder nor the names of its contributors
-#    may be used to endorse or promote products derived from this software without
-#    specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#
-#
-# 2012-01-31, Lars Bilke
-# - Enable Code Coverage
-#
-# 2013-09-17, Joakim Söderberg
-# - Added support for Clang.
-# - Some additional usage instructions.
-#
-# USAGE:
-
-# 0. (Mac only) If you use Xcode 5.1 make sure to patch geninfo as described here:
-#      http://stackoverflow.com/a/22404544/80480
-#
-# 1. Copy this file into your cmake modules path.
-#
-# 2. Add the following line to your CMakeLists.txt:
-#      INCLUDE(CodeCoverage)
-#
-# 3. Set compiler flags to turn off optimization and enable coverage:
-#    SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-#	 SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-#
-# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
-#    which runs your test executable and produces a lcov code coverage report:
-#    Example:
-#	 SETUP_TARGET_FOR_COVERAGE(
-#				my_coverage_target  # Name for custom target.
-#				test_driver         # Name of the test driver executable that runs the tests.
-#									# NOTE! This should always have a ZERO as exit code
-#									# otherwise the coverage generation will not complete.
-#				coverage            # Name of output directory.
-#				)
-#
-# 4. Build a Debug build:
-#	 cmake -DCMAKE_BUILD_TYPE=Debug ..
-#	 make
-#	 make my_coverage_target
-#
-#
-
-# Check prereqs
-FIND_PROGRAM( GCOV_PATH gcov )
-FIND_PROGRAM( LCOV_PATH lcov )
-FIND_PROGRAM( GENHTML_PATH genhtml )
-FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR})
-
-IF(NOT GCOV_PATH)
-    MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
-ENDIF() # NOT GCOV_PATH
-
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
-    # Clang version 3.0.0 and greater now supports gcov as well.
-    MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
-
-    IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-        MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
-    ENDIF()
-ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX
-
-SET(CMAKE_CXX_FLAGS_COVERAGE
-        "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
-        CACHE STRING "Flags used by the C++ compiler during coverage builds."
-        FORCE )
-SET(CMAKE_C_FLAGS_COVERAGE
-        "-g -O0 --coverage -fprofile-arcs -ftest-coverage"
-        CACHE STRING "Flags used by the C compiler during coverage builds."
-        FORCE )
-SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
-        ""
-        CACHE STRING "Flags used for linking binaries during coverage builds."
-        FORCE )
-SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
-        ""
-        CACHE STRING "Flags used by the shared libraries linker during coverage builds."
-        FORCE )
-MARK_AS_ADVANCED(
-        CMAKE_CXX_FLAGS_COVERAGE
-        CMAKE_C_FLAGS_COVERAGE
-        CMAKE_EXE_LINKER_FLAGS_COVERAGE
-        CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
-
-# Param _targetname     The name of new the custom make target
-# Param _testrunner     The name of the target which runs the tests.
-#						MUST return ZERO always, even on errors.
-#						If not, no coverage report will be created!
-# Param _outputname     lcov output is generated as _outputname.info
-#                       HTML report is generated in _outputname/index.html
-# Optional fourth parameter is passed as arguments to _testrunner
-#   Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
-
-    IF(NOT LCOV_PATH)
-        MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
-    ENDIF() # NOT LCOV_PATH
-
-    IF(NOT GENHTML_PATH)
-        MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
-    ENDIF() # NOT GENHTML_PATH
-
-    # Setup target
-    ADD_CUSTOM_TARGET(${_targetname}
-
-            # Cleanup lcov
-            ${LCOV_PATH} --directory . --zerocounters
-            COMMAND ${LCOV_PATH} -i -c --directory . --output-file ${_outputname}.info
-
-            # Run tests
-            COMMAND ${_testrunner} ${ARGV3}
-
-            # Capturing lcov counters and generating report
-            COMMAND ${LCOV_PATH} -c --directory . --capture --output-file ${_outputname}.info
-            COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
-            COMMAND ${GENHTML_PATH} -o ${_outputname}  ${_outputname}.info.cleaned
-            COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
-
-            WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-            COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
-            )
-
-    # Show info where to find the report
-    ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
-            COMMAND ;
-            COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
-            )
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
-
-# Param _targetname     The name of new the custom make target
-# Param _testrunner     The name of the target which runs the tests
-# Param _outputname     cobertura output is generated as _outputname.xml
-# Optional fourth parameter is passed as arguments to _testrunner
-#   Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
-
-    IF(NOT PYTHON_EXECUTABLE)
-        MESSAGE(FATAL_ERROR "Python not found! Aborting...")
-    ENDIF() # NOT PYTHON_EXECUTABLE
-
-    IF(NOT GCOVR_PATH)
-        MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
-    ENDIF() # NOT GCOVR_PATH
-
-    ADD_CUSTOM_TARGET(${_targetname}
-
-            # Run tests
-            ${_testrunner} ${ARGV3}
-
-            # Running gcovr
-            COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/'  -o ${_outputname}.xml
-            WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-            COMMENT "Running gcovr to produce Cobertura code coverage report."
-            )
-
-    # Show info where to find the report
-    ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
-            COMMAND ;
-            COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
-            )
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA


CXX-882 Correct case of include path in cmake find helper

Use correct lower-case value for the libmongoc-1.0 include directory
path when not using pkgconfig to find the library.

Closes #476

Signed-off-by: Matt Cotter <19ef03deb4cf02399ea89988fb9bde8613102857@mongodb.com>

--- cmake/FindLibMongoC.cmake
+++ cmake/FindLibMongoC.cmake
@@ -31,7 +31,7 @@
   # The best we can do until libMONGOC starts installing a libmongoc-config.cmake file
   set(LIBMONGOC_LIBRARIES mongoc-1.0 CACHE INTERNAL "")
   set(LIBMONGOC_LIBRARY_DIRS ${LIBMONGOC_DIR}/lib CACHE INTERNAL "")
-  set(LIBMONGOC_INCLUDE_DIRS ${LIBMONGOC_DIR}/include/libMONGOC-1.0 CACHE INTERNAL "")
+  set(LIBMONGOC_INCLUDE_DIRS ${LIBMONGOC_DIR}/include/libmongoc-1.0 CACHE INTERNAL "")
   find_package_handle_standard_args(LIBMONGOC DEFAULT_MSG LIBMONGOC_LIBRARIES LIBMONGOC_LIBRARY_DIRS LIBMONGOC_INCLUDE_DIRS)
 else()
     message(FATAL_ERROR "Don't know how to find libmongoc; please set LIBMONGOC_DIR to the prefix directory with which libbson was configured.")


cmake FindTclGraphs macro has message about version

The version must be set before including the macro as TCLGRAPHS_VERSION
so that it can be found from the uber macro that sets cmake paths

--- cmake/FindTclGraphs.cmake
+++ cmake/FindTclGraphs.cmake
@@ -1,5 +1,6 @@

-set(TCLGRAPHS_BASEDIR "${CMAKE_CURRENT_LIST_DIR}/..")
+file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/.." TCLGRAPHS_BASEDIR)
+message(STATUS "Finding TclGraphs ${TCLGRAPHS_VERSION} in ${TCLGRAPHS_BASEDIR} ...")

 find_path(TCLGRAPHS_INCLUDE_PATH
 	NAMES graphs.h
@@ -10,7 +11,7 @@
 	PATHS "${TCLGRAPHS_BASEDIR}/lib"
 )

-set(TCLGRAPHS_DEFINES -DUSE_GAPHS_STUBS=1)
+set(TCLGRAPHS_DEFINES -DUSE_GRAPHS_STUBS=1 -DTCLGRAPHS_VERSION="${TCLGRAPHS_VERSION}")

 mark_as_advanced(
 	TCLGRAPHS_DEFINES


Updated XLink with macOS fix

Updated XLink with macOS fix

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -7,9 +7,9 @@

 hunter_config(
     XLink
-    VERSION "luxonis-2021.3-develop"
-    URL "https://github.com/luxonis/XLink/archive/4c149080d22c35a17ce285f5bca99f2b2fe05e46.tar.gz"
-    SHA1 "64b0a8bfeb1a91f909df88ea8b1d0b17885b92ff"
+    VERSION "luxonis-2021.4-master"
+    URL "https://github.com/luxonis/XLink/archive/c06b86675b8d0fd512ae30fe666eff48468036de.tar.gz"
+    SHA1 "58ff7125729b79b726e23563046b61fcbc659f95"
 )

 hunter_config(


fixed bug where pagma link statements where being written on a single line and therefore ignored by rootcint

--- cmake/MacroRootDict.cmake
+++ cmake/MacroRootDict.cmake
@@ -73,15 +73,13 @@
     SET( _linkdef_header "${ROOT_DICT_OUTPUT_DIR}/${_namespace}_Linkdef.h" )

     FOREACH( _header ${_input_headers} )
-        #FILE( APPEND "${_linkdef_header}" "#pragma link C++ defined_in \"${_header}\";\n" )
-        #SET( ${_namespace}_file_contents "${${_namespace}_file_contents} #pragma link C++ defined_in \\\"${_header}\\\"\\;\\\\n" )
-        SET( ${_namespace}_file_contents "${${_namespace}_file_contents} #pragma link C++ defined_in \\\"${_header}\\\"\\;" )
+        SET( ${_namespace}_file_contents "${${_namespace}_file_contents}\\#pragma link C++ defined_in \\\"${_header}\\\"\\;\\\\n" )
     ENDFOREACH()

     ADD_CUSTOM_COMMAND(
         OUTPUT ${_linkdef_header}
         COMMAND mkdir -p ${ROOT_DICT_OUTPUT_DIR}
-        COMMAND echo "${${_namespace}_file_contents}" > ${_linkdef_header}
+        COMMAND echo -e "${${_namespace}_file_contents}" > ${_linkdef_header}
         DEPENDS ${_input_headers}
         COMMENT "generating: ${_linkdef_header}"
     )


Fresh checkout of ocaml is broken so disable it by default until Hez
gets a chance to fix it.

svn path=/trunk/; revision=11932

--- cmake/modules/ocaml.cmake
+++ cmake/modules/ocaml.cmake
@@ -24,7 +24,7 @@
 if(DEFAULT_NO_BINDINGS)
   option(ENABLE_ocaml "Enable OCaml bindings" OFF)
 else(DEFAULT_NO_BINDINGS)
-  option(ENABLE_ocaml "Enable OCaml bindings" ON)
+  option(ENABLE_ocaml "Enable OCaml bindings" OFF)
 endif(DEFAULT_NO_BINDINGS)

 if(ENABLE_ocaml AND NOT BUILD_SHARED_LIBS)


fixed typo

fixed typo

--- msvc/Custom-vs.cmake
+++ msvc/Custom-vs.cmake
@@ -89,5 +89,6 @@
 # - C4047 levels of indirection difference (int and void*)
 # - C4090 different const qualifiers
 # - C4477 format string type differences
-set(CMAKE_C_FLAGS "${CMAKE_CX_FLAGS} /wd4244 /wd4267 /wd4005 /wd4996 /wd4047 /wd4090 /wd4477")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4267 /wd4005 /wd4996 /wd4047 /wd4090 /wd4477")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267 /wd4005 /wd4996 /wd4047 /wd4090 /wd4477")
+


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -521,7 +521,7 @@
 				CONFIGURATIONS ${BUILD_TYPE})

 		#  --gtest_repeat=1 --gtest_break_on_failure --gtest_shuffle --gmock_verbose=info
-		if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
+		if (DEFINED VALGRIND_BUILD AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
 			find_program(VALGRIND "valgrind")
 			if(VALGRIND)
 				add_test(


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -323,9 +323,9 @@

 macro(cmaki_download_package)
 	# Base URL for packages.
-	IF(NOT DEFINED CMAKI_REPOSITORY)
+	if(NOT DEFINED CMAKI_REPOSITORY)
 		MESSAGE(FATAL_ERROR "CMAKI_REPOSITORY: is not defined")
-	ENDIF()
+	endif()
 	get_filename_component(package_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
 	# ${package_name} en realidad es paquete + version (asyncply-0.0.0.0)
 	get_filename_component(package_name "${package_dir}" NAME)
@@ -402,6 +402,7 @@
 		ADD_EXECUTABLE(${_EXECUTABLE_NAME} ${_SOURCES})
 	endif()
 	target_link_libraries(${_EXECUTABLE_NAME} ${_DEPENDS})
+	echo_targets(${_EXECUTABLE_NAME})
 	foreach(LIB_DIR ${CMAKI_LIBRARIES})
 		target_link_libraries(${_EXECUTABLE_NAME} ${LIB_DIR})
 		cmaki_install_3rdparty(${LIB_DIR})
@@ -433,6 +434,7 @@
 	endif()
 	add_library(${_LIBRARY_NAME} SHARED ${_SOURCES})
 	target_link_libraries(${_LIBRARY_NAME} ${_DEPENDS})
+	echo_targets(${_LIBRARY_NAME})
 	foreach(LIB_DIR ${CMAKI_LIBRARIES})
 		target_link_libraries(${_LIBRARY_NAME} ${LIB_DIR})
 		cmaki_install_3rdparty(${LIB_DIR})
@@ -464,6 +466,7 @@
 	endif()
 	add_library(${_LIBRARY_NAME} STATIC ${_SOURCES})
 	target_link_libraries(${_LIBRARY_NAME} ${_DEPENDS})
+	echo_targets(${_LIBRARY_NAME})
 	foreach(LIB_DIR ${CMAKI_LIBRARIES})
 		target_link_libraries(${_LIBRARY_NAME} ${LIB_DIR})
 		cmaki_install_3rdparty(${LIB_DIR})
@@ -492,6 +495,7 @@
 	endif()
 	add_executable(${_TEST_NAME}_exe ${_SOURCES})
 	target_link_libraries(${_TEST_NAME}_exe ${_DEPENDS})
+	echo_targets(${_TEST_NAME}_exe)
 	foreach(LIB_DIR ${CMAKI_LIBRARIES})
 		target_link_libraries(${_TEST_NAME}_exe ${LIB_DIR})
 		cmaki_install_3rdparty(${LIB_DIR})


added: allow debug variants to be included from install (eg. for stuff with 3rd release only dependencies)

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -214,6 +214,7 @@
     SET(${PROJECT_NAME}_NO_DOC)

     SET(${PROJECT_NAME}_NO_PYTHON)
+    SET(${PROJECT_NAME}_NO_DBG_INSTALL FALSE)
     SET(${PROJECT_NAME}_ENABLE_WRITE_PYTHON_TO_SOURCE)

 ENDMACRO(OSG_SELECT_PROJECT)
@@ -1133,16 +1134,18 @@
                 ARCHIVE DESTINATION ${_OSG_TARGET_LIBDIR_REL}
                 COMPONENT release_libraries)

-        INSTALL(TARGETS ${PROJECT_NAME}
-                CONFIGURATIONS Debug
-                RUNTIME DESTINATION ${_OSG_TARGET_BINDIR_DBG}
-                COMPONENT debug_runtimes)
-
-        INSTALL(TARGETS ${PROJECT_NAME}
-                CONFIGURATIONS Debug
-                LIBRARY DESTINATION ${_OSG_TARGET_LIBDIR_DBG}
-                ARCHIVE DESTINATION ${_OSG_TARGET_LIBDIR_DBG}
-                COMPONENT debug_libraries)
+        IF(NOT ${PROJECT_NAME}_NO_DBG_INSTALL)
+          INSTALL(TARGETS ${PROJECT_NAME}
+                  CONFIGURATIONS Debug
+                  RUNTIME DESTINATION ${_OSG_TARGET_BINDIR_DBG}
+                  COMPONENT debug_runtimes)
+
+          INSTALL(TARGETS ${PROJECT_NAME}
+                  CONFIGURATIONS Debug
+                  LIBRARY DESTINATION ${_OSG_TARGET_LIBDIR_DBG}
+                  ARCHIVE DESTINATION ${_OSG_TARGET_LIBDIR_DBG}
+                  COMPONENT debug_libraries)
+        ENDIF()

         INSTALL(TARGETS ${PROJECT_NAME}
                 CONFIGURATIONS ReleaseNoOpt
@@ -1155,16 +1158,18 @@
                 ARCHIVE DESTINATION ${_OSG_TARGET_LIBDIR_RELNO}
                 COMPONENT release_no_opt_libraries)

-        INSTALL(TARGETS ${PROJECT_NAME}
-                CONFIGURATIONS DebugOpt
-                RUNTIME DESTINATION ${_OSG_TARGET_BINDIR_DBGO}
-                COMPONENT debug_opt_runtimes)
-
-        INSTALL(TARGETS ${PROJECT_NAME}
-                CONFIGURATIONS DebugOpt
-                LIBRARY DESTINATION ${_OSG_TARGET_LIBDIR_DBGO}
-                ARCHIVE DESTINATION ${_OSG_TARGET_LIBDIR_DBGO}
-                COMPONENT debug_opt_libraries)
+        IF(NOT ${PROJECT_NAME}_NO_DBG_INSTALL)
+          INSTALL(TARGETS ${PROJECT_NAME}
+                  CONFIGURATIONS DebugOpt
+                  RUNTIME DESTINATION ${_OSG_TARGET_BINDIR_DBGO}
+                  COMPONENT debug_opt_runtimes)
+
+          INSTALL(TARGETS ${PROJECT_NAME}
+                  CONFIGURATIONS DebugOpt
+                  LIBRARY DESTINATION ${_OSG_TARGET_LIBDIR_DBGO}
+                  ARCHIVE DESTINATION ${_OSG_TARGET_LIBDIR_DBGO}
+                  COMPONENT debug_opt_libraries)
+        ENDIF()

         IF(OSG_INSTALL_PDB_FILES)


Fix warning complaining about missing resource with resource list is empty.

--- CMake/ctkMacroBuildLib.cmake
+++ CMake/ctkMacroBuildLib.cmake
@@ -129,7 +129,7 @@
   else()
     QT4_WRAP_UI(MY_UI_CPP ${MY_UI_FORMS})
   endif()
-  if(DEFINED MY_RESOURCES)
+  if(DEFINED MY_RESOURCES AND NOT MY_RESOURCES STREQUAL "")
     if(CTK_QT_VERSION VERSION_GREATER "4")
       qt5_add_resources(MY_QRC_SRCS ${MY_RESOURCES})
     else()


Recursively search for Qt modules, with module suffix

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -134,8 +134,8 @@
     endif()

     set(GLOBBED_QT_PLUGINS )
-    if(CMAKE_SHARED_MODULE_SUFFIX AND NOT CMAKE_SHARED_MODULE_SUFFIX STREQUAL CMAKE_SHARED_LIBRARY_SUFFIX)
-      file(GLOB_RECURSE GLOBBED_QT_PLUGINS \"\${CMAKE_INSTALL_PREFIX}/${${_target_location}_qt_plugins_install_dir}/plugins/*${CMAKE_SHARED_MODULE_SUFFIX}\")
+    if(NOT \"${CMAKE_SHARED_MODULE_SUFFIX}\" STREQUAL \"\" AND NOT \"${CMAKE_SHARED_MODULE_SUFFIX}\" STREQUAL \"${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+      file(GLOB_RECURSE GLOBBED_QT_PLUGINS \"\${CMAKE_INSTALL_PREFIX}/${${_target_location}_qt_plugins_install_dir}/plugins/*/*${CMAKE_SHARED_MODULE_SUFFIX}\")
     endif()

     set(PLUGINS )


Use VTK_TEST_OUTPUT_DIR rather than rebuilding the path

All of the other test variants use this variable; MPI should as well.

Change-Id: I7d67cabf697cf6bd2e40a0e70d66d16d26766464

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -119,7 +119,7 @@
     set(_V "")
     if(local_TESTING_DATA)
       set(_D -D ${data_dir})
-      set(_T -T ${VTK_BINARY_DIR}/Testing/Temporary)
+      set(_T -T ${VTK_TEST_OUTPUT_DIR})
       if(local_CUSTOM_BASELINES)
         set(_V -V "${data_dir}/Baseline")
       else()


xpro::cub INTERFACE library

xpro::cub INTERFACE library

* with INTERFACE_INCLUDE_DIRECTORIES property set
* issue https://github.com/smanders/externpro/issues/273

--- projects/use/usexp-cub-config.cmake
+++ projects/use/usexp-cub-config.cmake
@@ -1,16 +1,18 @@
 # CUB_FOUND - cub was found
 # CUB_VER - cub version
-# CUB_INCLUDE_DIR - the cub include directory
 set(prj cub)
 # this file (-config) installed to share/cmake
 get_filename_component(XP_ROOTDIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
 get_filename_component(XP_ROOTDIR ${XP_ROOTDIR} ABSOLUTE) # remove relative parts
 string(TOUPPER ${prj} PRJ)
 set(${PRJ}_VER "@VER@ [@PROJECT_NAME@]")
-set(verDir /${prj}_@VER@)
-unset(${PRJ}_INCLUDE_DIR CACHE)
-find_path(${PRJ}_INCLUDE_DIR cub/cub.cuh PATHS ${XP_ROOTDIR}/include${verDir} NO_DEFAULT_PATH)
-set(reqVars ${PRJ}_VER ${PRJ}_INCLUDE_DIR)
+if(NOT TARGET xpro::cub)
+  add_library(xpro::cub INTERFACE IMPORTED)
+  set_target_properties(xpro::cub PROPERTIES
+    INTERFACE_INCLUDE_DIRECTORIES "${XP_ROOTDIR}/include/${prj}_@VER@"
+    )
+endif()
+set(reqVars ${PRJ}_VER)
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars})
 mark_as_advanced(${reqVars})


fix find_python script for cmake >= 3.15 (#419)

--- scripts/find_python.cmake
+++ scripts/find_python.cmake
@@ -2,6 +2,7 @@

 if(DEFINED ENV{HUNTER_PYTHON_LOCATION})
   set(Python_ROOT_DIR $ENV{HUNTER_PYTHON_LOCATION})
+  set(Python_FIND_STRATEGY LOCATION)
 endif()

 find_package(Python COMPONENTS Interpreter QUIET)


fixed typo

fixed typo

--- cmake/FindCURL.cmake
+++ cmake/FindCURL.cmake
@@ -46,7 +46,7 @@

 	find_library(
 		CURL_LIBRARY_DEBUG
-		NAMES ${CURL_DEBUG}
+		NAMES ${CURL_NAMES_DEBUG}
 		DOC "curl debug library"
 	)


fix cmake logic for checking LLVM version

--- cmake/Findllvm.cmake
+++ cmake/Findllvm.cmake
@@ -60,7 +60,7 @@
   if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 12)
     message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
   endif()
-  if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 11)
+  if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 12)
     message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
   endif()
 elseif(("${ZIG_TARGET_TRIPLE}" STREQUAL "native") OR ZIG_PREFER_LLVM_CONFIG)
@@ -91,7 +91,7 @@
   if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 12)
     message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
   endif()
-  if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 11)
+  if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 12)
     message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
   endif()


tag GCC < 4.4.6 as broken for AVX

tag GCC < 4.4.6 as broken for AVX

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -60,6 +60,7 @@
    check_cxx_source_runs("int main() { return sizeof(void*) != 8; }" VOID_PTR_IS_64BIT)

    set(SSE_INTRINSICS_BROKEN false)
+   set(VC_AVX_INTRINSICS_BROKEN false)

    if(VC_COMPILER_IS_OPEN64)
       # Open64 is detected as GNUCXX :(
@@ -166,6 +167,10 @@
             set(SSE_INTRINSICS_BROKEN true)
          endif(NOT GCC_4_3_0)
       endif(NOT GCC_4_4_1)
+      macro_ensure_version("4.4.6" "${VC_GCC_VERSION}" GCC_4_4_6)
+      if(NOT GCC_4_4_6)
+         set(VC_AVX_INTRINSICS_BROKEN true)
+      endif()

       if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
          set(ENABLE_STRICT_ALIASING true CACHE BOOL "Enables strict aliasing rules for more aggressive optimizations")


OSX: add NSAppTransportSecurity/NSAllowArbitraryLoads to default plist file

--- cmake/fips_osx.cmake
+++ cmake/fips_osx.cmake
@@ -38,6 +38,9 @@

 #-------------------------------------------------------------------------------
 #   fips_osx_generate_plist_file(target)
+#
+#   FIXME: need a way to override the plist file from a fips target
+#   description.
 #
 macro(fips_osx_generate_plist_file target)
     set(FIPS_OSX_PLIST_PATH ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
@@ -96,7 +99,7 @@
             "    <dict>\n"
             "      <key>NSAllowsArbitraryLoads</key>\n"
             "      <true/>\n"
-	        "    </dict>\n"
+            "    </dict>\n"
             "  </dict>\n"
             "</plist>\n")
     elseif (FIPS_MACOS)
@@ -137,6 +140,11 @@
             "    <string>\${MACOSX_DEPLOYMENT_TARGET}</string>\n"
             "    <key>NSHighResolutionCapable</key>\n"
             "    <true/>\n"
+            "    <key>NSAppTransportSecurity</key>\n"
+            "    <dict>\n"
+            "      <key>NSAllowsArbitraryLoads</key>\n"
+            "      <true/>\n"
+            "    </dict>\n"
             "  </dict>\n"
             "</plist>\n")
     endif()


update config

update config

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@8561 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -92,9 +92,9 @@
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)

-if (CMAKE_VERSION VERSION_LESS "3.1" AND
-   (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1))
-
+if (CMAKE_VERSION VERSION_LESS "3.1" AND CMAKE_COMPILER_IS_GNUCC)
+
+if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1)
   if(CMAKE_CXX_STANDARD EQUAL "14")
     CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
     if(COMPILER_SUPPORTS_CXX14)
@@ -105,7 +105,6 @@
       endif()
     else()
       message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support.")
-      set(CMAKE_CXX_STANDARD 11 CACHE INTERNAL "")
     endif()
   endif()

@@ -127,23 +126,20 @@
           endif()
         else()
           message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
-          set(CMAKE_CXX_STANDARD 98 CACHE INTERNAL "")
         endif()
      endif()
    endif()
+else() #gcc 6.1
+  if(CMAKE_CXX_STANDARD EQUAL "98")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
+  endif()
+endif()
 endif()#cmake<3.1

-# Smart pointers (depending on CMAKE_CXX_STANDARD)
-if(CMAKE_CXX_STANDARD EQUAL 98 AND STD_UNIQUE_PTR_FOUND)
-  unset(STD_UNIQUE_PTR_FOUND CACHE)
-  unset(STD_SHARED_PTR_FOUND CACHE)
-  find_package (TR1 QUIET)
-elseif(NOT CMAKE_CXX_STANDARD EQUAL 98)
-  set(STD_UNIQUE_PTR_FOUND 1 CACHE INTERNAL "")
-  set(STD_SHARED_PTR_FOUND 1 CACHE INTERNAL "")
-else()
-  find_package (TR1 QUIET)
-endif()
+# Find smart pointers just in case
+if(CMAKE_CXX_STANDARD EQUAL "98")
+  find_package (TR1 REQUIRED)
+endif()

 # Print compilation statistics (these flags work on GCC compiler only)
 #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftime-report")


in RESTRICT_SYMBOL_EXPORTS,handle cases where COMPILE_FLAGS are not set (COMPILE_FLAGS-NOTFOUND)

--- cmake/libutils.cmake
+++ cmake/libutils.cmake
@@ -260,6 +260,10 @@
 MACRO(RESTRICT_SYMBOL_EXPORTS target)
   IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX)
     GET_TARGET_PROPERTY(COMPILE_FLAGS ${target} COMPILE_FLAGS)
+	IF(NOT COMPILE_FLAGS)
+	  # Avoid COMPILE_FLAGS-NOTFOUND
+	  SET(COMPILE_FLAGS)
+	ENDIF()
     SET_TARGET_PROPERTIES(${target} PROPERTIES
        COMPILE_FLAGS "${COMPILE_FLAGS} -fvisibility=hidden")
   ENDIF()


Fix finding Python and Uranium

Fix finding Python and Uranium

Otherwise all tests fail that require UM.

--- cmake/CuraTests.cmake
+++ cmake/CuraTests.cmake
@@ -3,6 +3,8 @@

 enable_testing()
 include(CMakeParseArguments)
+
+find_package(PythonInterp 3.5.0 REQUIRED)

 function(cura_add_test)
     set(_single_args NAME DIRECTORY PYTHONPATH)
@@ -28,7 +30,7 @@
     set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT PYTHONPATH=${_PYTHONPATH})
 endfunction()

-cura_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH ${CMAKE_SOURCE_DIR})
+cura_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH "${CMAKE_SOURCE_DIR}/../Uranium:${CMAKE_SOURCE_DIR}")

 file(GLOB_RECURSE _plugins plugins/*/__init__.py)
 foreach(_plugin ${_plugins})


Remove debugging message

Remove debugging message

--HG--
branch : v0-8

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -493,7 +493,6 @@
 # its parent rather than directly the subdirectory. Otherwise we'll get compiler errors.
 if ("${CEGUI_VERSION}" VERSION_GREATER "0.8.0")
     add_parent_dir(CEGUI_INCLUDE_DIRS_TEMP CEGUI_INCLUDE_DIR)
-    message(${CEGUI_INCLUDE_DIRS_TEMP})
     set(${CEGUI_INCLUDE_DIRS} ${CEGUI_INCLUDE_DIRS_TEMP})
 endif()
 set(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS})


only add openssl if it's available

only add openssl if it's available

--- cmake/FindCURL_.cmake
+++ cmake/FindCURL_.cmake
@@ -1,5 +1,5 @@

-find_package(OpenSSL COMPONENTS Crypto SSL REQUIRED)
+find_package(OpenSSL COMPONENTS Crypto SSL)
 find_package(CURL REQUIRED)

 if (NOT TARGET CURL::CURL)
@@ -10,10 +10,11 @@
     set_property(TARGET CURL::CURL
             APPEND
             PROPERTY IMPORTED_LOCATION "${CURL_LIBRARY}")
+    if (OpenSSL_FOUND)
+        set(INTERFACE_LINK_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
+    endif()
     set_property(TARGET CURL::CURL
             APPEND
             PROPERTY INTERFACE_LINK_LIBRARIES
-            OpenSSL::SSL
-            OpenSSL::Crypto
-            ZLIB::ZLIB)
+            ${INTERFACE_LINK_LIBRARIES})
 endif()


Revert "Try simplifying FindFLINT.cmake."

This reverts commit 2f2f00ae8d7dfaba8b7ed42478def17002267025.

--- cmake/FindFLINT.cmake
+++ cmake/FindFLINT.cmake
@@ -45,7 +45,7 @@
 # NOTE: this has been adapted from CMake's FindPNG.cmake.
 if(FLINT_FOUND AND NOT TARGET FLINT::FLINT)
     add_library(FLINT::FLINT UNKNOWN IMPORTED)
-    set_target_properties(FLINT::FLINT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FLINT_INCLUDE_DIR}"
+    set_target_properties(FLINT::FLINT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FLINT_INCLUDE_DIR};${FLINT_INCLUDE_DIR}/flint"
         IMPORTED_LINK_INTERFACE_LANGUAGES "C"
         IMPORTED_LOCATION "${FLINT_LIBRARY}")
 endif()


[all] use axl_cmake.cmake dropper from the axl folder

--- cmake/axl_cmake.cmake
+++ cmake/axl_cmake.cmake
@@ -1,11 +1,11 @@
 #...............................................................................
 #
-#  This file is part of the Jancy toolkit.
+#  This file is part of the AXL library.
 #
-#  Jancy is distributed under the MIT license.
+#  AXL is distributed under the MIT license.
 #  For details see accompanying license.txt file,
 #  the public copy of which is also available at:
-#  http://tibbo.com/downloads/archive/jancy/license.txt
+#  http://tibbo.com/downloads/archive/axl/license.txt
 #
 #...............................................................................

@@ -20,11 +20,11 @@

 macro (
 axl_calc_max_string_length
-    _RESULT
+	_RESULT
 	# ...
 	)

-    set (_STRING_LIST ${ARGN})
+	set (_STRING_LIST ${ARGN})

 	set (_MAX_LENGTH 0)
 	foreach (_STRING ${_STRING_LIST})
@@ -39,23 +39,23 @@

 macro (
 axl_create_space_padding
-    _RESULT
+	_RESULT
 	_STRING
 	_MAX_LENGTH
 	)

-    string (LENGTH ${_STRING} _LENGTH)
+	string (LENGTH ${_STRING} _LENGTH)
 	math (EXPR _PADDING_LENGTH "${_MAX_LENGTH} - ${_LENGTH} + 1")
 	string (RANDOM LENGTH ${_PADDING_LENGTH} ALPHABET " " ${_RESULT})
 endmacro ()

 macro (
 axl_create_empty_setting_file
-    _FILE_NAME
+	_FILE_NAME
 	# ...
 	)

-    set (_SETTING_LIST ${ARGN})
+	set (_SETTING_LIST ${ARGN})

 	axl_calc_max_string_length (_MAX_LENGTH ${_SETTING_LIST})

@@ -74,12 +74,12 @@

 macro (
 axl_find_file
-    _RESULT
+	_RESULT
 	_FILE_NAME
 	# ...
 	)

-    set (_DIR_LIST ${ARGN})
+	set (_DIR_LIST ${ARGN})

 	set (_FILE_PATH ${_FILE_NAME}-NOTFOUND)

@@ -95,12 +95,12 @@

 macro (
 axl_find_file_recurse_parent_dirs
-    _RESULT
+	_RESULT
 	_FILE_NAME
 	_START_DIR
 	)

-    set (_DIR ${_START_DIR})
+	set (_DIR ${_START_DIR})

 	while (TRUE)
 		if (EXISTS ${_DIR}/${_FILE_NAME})


Use correct case for FindGit script

Use correct case for FindGit script

--- cmake/buildinfo.cmake
+++ cmake/buildinfo.cmake
@@ -17,7 +17,7 @@
 # This file is based largely off the work of Matt Keeter
 # See: https://www.mattkeeter.com/blog/2018-01-06-versioning/
 # Updated to use FindGit :)
-find_package(git)
+find_package(Git)
 if(GIT_FOUND)
     execute_process(COMMAND ${GIT_EXECUTABLE} log --pretty=format:'%h' -n 1
                     OUTPUT_VARIABLE GIT_REV


cmake: LTO option

cmake: LTO option

--- cmake/compilers.cmake
+++ cmake/compilers.cmake
@@ -20,6 +20,12 @@
   string(APPEND CMAKE_Fortran_FLAGS " -Mdclchk")
 endif()

+include(CheckIPOSupported)
+check_ipo_supported(RESULT lto_supported)
+if(lto_supported)
+  set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
+endif()
+

 include(CheckFortranSourceCompiles)
 check_fortran_source_compiles("call random_init(.false., .false.); end" f2018random_init


Replace cmake check for printf with a check for fopen.

Printf is a builtin, and the check fails with -Werror because of a clang
warning about an incompatible redeclaration.

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@255187 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -13,7 +13,7 @@

 # Check libraries
 check_library_exists(pthread pthread_create "" LIBCXX_HAS_PTHREAD_LIB)
-check_library_exists(c printf "" LIBCXX_HAS_C_LIB)
+check_library_exists(c fopen "" LIBCXX_HAS_C_LIB)
 check_library_exists(m ccos "" LIBCXX_HAS_M_LIB)
 check_library_exists(rt clock_gettime "" LIBCXX_HAS_RT_LIB)
 check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXX_HAS_GCC_S_LIB)


Add function to configure a directory

Add function to configure a directory

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -85,6 +85,44 @@
   vistk_configure_file(${name} "${source}" "${dest}" ${ARGN})
 endfunction ()

+function (vistk_configure_directory name sourcedir destdir)
+  set(no_configure_target TRUE)
+
+  file(GLOB_RECURSE sources
+    RELATIVE "${sourcedir}"
+    "${sourcedir}/*")
+
+  set(count 0)
+  set(source_paths)
+  set(dest_paths)
+
+  foreach (source ${sources})
+    set(source_path
+      "${sourcedir}/${source}")
+    set(dest_path
+      "${destdir}/${source}")
+
+    vistk_configure_file(${name}-${count}
+      "${source_path}"
+      "${dest_path}")
+
+    set(source_paths
+      ${source_paths}
+      "${source_path}")
+    set(dest_paths
+      ${dest_paths}
+      "${dest_path}")
+
+    math(EXPR count "${count} + 1")
+  endforeach ()
+
+  add_custom_target(configure-${name} ${all}
+    DEPENDS ${dest_paths}
+    SOURCES ${source_paths})
+  add_dependencies(configure
+    configure-${name})
+endfunction ()
+
 function (vistk_configure_pkgconfig module)
   if (UNIX)
     set(pkgconfig_file "${vistk_binary_dir}/${module}.pc")


cmake: Use TARGET_PROCESSOR to set Linux .tgz name suffix

Instead of hard-wiring "x86_64"

Co-Authored-By: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>

--- cmake/packaging.cmake
+++ cmake/packaging.cmake
@@ -332,7 +332,7 @@
   if(DEFINED PLATFORM_LINUX)
     set(OSQUERY_PACKAGE_RELEASE "1.linux")
     if(CPACK_GENERATOR STREQUAL "TGZ")
-      set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}_${OSQUERY_PACKAGE_RELEASE}_x86_64")
+      set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}_${OSQUERY_PACKAGE_RELEASE}_${TARGET_PROCESSOR}")
       set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
       set(CPACK_SET_DESTDIR ON)
     elseif(CPACK_GENERATOR STREQUAL "DEB")


search for deb only in linux, nsis only in windows, programmanager only in macos, rpm disabled

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@740 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -3,27 +3,36 @@
 ###############################################################################
 #find available package generators

-# RPM
-find_program(RPM_PROGRAM rpm)
-if(EXISTS ${RPM_PROGRAM})
-  list(APPEND CPACK_GENERATOR "RPM")
-endif(EXISTS ${RPM_PROGRAM})
+# RPM (disabled until RedHat/Fedora users/developers need this)
+#find_program(RPM_PROGRAM rpm)
+#if(EXISTS ${RPM_PROGRAM})
+#  list(APPEND CPACK_GENERATOR "RPM")
+#endif(EXISTS ${RPM_PROGRAM})
+
 # DEB
-find_program(DPKG_PROGRAM dpkg)
-if(EXISTS ${DPKG_PROGRAM})
-  list(APPEND CPACK_GENERATOR "DEB")
-endif(EXISTS ${DPKG_PROGRAM})
+if("${CMAKE_SYSTEM}" MATCHES "Linux")
+  find_program(DPKG_PROGRAM dpkg)
+  if(EXISTS ${DPKG_PROGRAM})
+    list(APPEND CPACK_GENERATOR "DEB")
+  endif(EXISTS ${DPKG_PROGRAM})
+endif()
+
 # NSIS
-find_program(NSIS_PROGRAM makensis MakeNSIS)
-if(EXISTS ${NSIS_PROGRAM})
-  list(APPEND CPACK_GENERATOR "NSIS")
-endif(EXISTS ${NSIS_PROGRAM})
+if(WIN32)
+  find_program(NSIS_PROGRAM makensis MakeNSIS)
+  if(EXISTS ${NSIS_PROGRAM})
+    list(APPEND CPACK_GENERATOR "NSIS")
+  endif(EXISTS ${NSIS_PROGRAM})
+endif()
+
 # dpkg
-find_program(PACKAGE_MAKER_PROGRAM PackageMaker
-	    HINTS /Developer/Applications/Utilities)
-if(EXISTS ${PACKAGE_MAKER_PROGRAM})
-  list(APPEND CPACK_GENERATOR "PackageMaker")
-endif(EXISTS ${PACKAGE_MAKER_PROGRAM})
+if(APPLE)
+  find_program(PACKAGE_MAKER_PROGRAM PackageMaker
+               HINTS /Developer/Applications/Utilities)
+  if(EXISTS ${PACKAGE_MAKER_PROGRAM})
+    list(APPEND CPACK_GENERATOR "PackageMaker")
+  endif(EXISTS ${PACKAGE_MAKER_PROGRAM})
+endif()

 include(InstallRequiredSystemLibraries)


Fix: even if set to ON disable tests if GTest not found

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

--- cmake/pcl_tests.cmake
+++ cmake/pcl_tests.cmake
@@ -23,7 +23,11 @@
 elseif(NOT ${BUILD_TESTS})
     message(STATUS "Tests will not be built: Disabled manually")
 else(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})
-    message(STATUS "Tests will be built")
+    if(GTEST_FOUND)
+        message(STATUS "Tests will be built")
+    else(GTEST_FOUND)
+        set (BUILD_TESTS OFF CACHE BOOL "Tests can not be built!" FORCE)
+    endif(GTEST_FOUND)
 endif(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})

 # Set up for testing if tests are enabled


default SIRF_TAG v1.0.0-rc.1

default SIRF_TAG v1.0.0-rc.1

--- version_config.cmake
+++ version_config.cmake
@@ -104,7 +104,7 @@
   set(DEFAULT_ISMRMRD_TAG origin/master)

 else()
-  set(DEFAULT_SIRF_TAG d8975119e4134fb86620e5d31ed15526d793243c)
+  set(DEFAULT_SIRF_TAG v1.0.0-rc.1)

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )


CMake: Used `TRUE|FALSE` instead of `ON|OFF` consistently.

While these are equivalent values to CMake, we should be consistent.
Also made uses of `option` consistent, and moved `ENABLE_JAVA` to the
3rdparty section.

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

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -16,43 +16,24 @@

 # GENERAL OPTIONS.
 ##################
-option(VERBOSE "Enable verbose CMake statements and compilation output" ON)
+option(VERBOSE
+  "Enable verbose CMake statements and compilation output."
+  TRUE)
 set(CMAKE_VERBOSE_MAKEFILE ${VERBOSE})

 if (NOT WIN32)
-  set(DEFAULT_BUILD_SHARED_LIBS ON)
+  set(DEFAULT_BUILD_SHARED_LIBS TRUE)
 else ()
-  set(DEFAULT_BUILD_SHARED_LIBS OFF)
-endif ()
-
-option(BUILD_SHARED_LIBS "Build shared libraries." ${DEFAULT_BUILD_SHARED_LIBS})
-
-option(ENABLE_JAVA "Build Java components. Warning: this is SLOW." OFF)
-if (ENABLE_JAVA)
-  include(FindJava)
-  find_package(Java COMPONENTS Development)
-
-  if (NOT JAVA_FOUND)
-    message(FATAL_ERROR "Java was not found!")
-  endif ()
-
-  include(FindJNI)
-  if (NOT JNI_FOUND)
-    message(FATAL_ERROR "JNI Java libraries were not found!")
-  endif ()
-
-  find_program(MVN mvn)
-  if (NOT MVN)
-    message(FATAL_ERROR "Maven was not found!")
-  endif ()
-
-  if (Java_FOUND AND JNI_FOUND AND MVN)
-    set(HAS_JAVA TRUE)
-  endif ()
-endif ()
+  set(DEFAULT_BUILD_SHARED_LIBS FALSE)
+endif ()
+
+option(BUILD_SHARED_LIBS
+  "Build shared libraries."
+  ${DEFAULT_BUILD_SHARED_LIBS})

 option(ENABLE_PRECOMPILED_HEADERS
-  "Enable auto-generated precompiled headers using cotire" ${WIN32})
+  "Enable auto-generated precompiled headers using cotire"
+  ${WIN32})

 if (NOT WIN32 AND ENABLE_PRECOMPILED_HEADERS)
   message(
@@ -88,23 +69,50 @@
 ###################
 option(
   REBUNDLED
-  "Use dependencies from the 3rdparty folder (instead of internet)"
+  "Use dependencies from the 3rdparty folder (instead of internet)."
   TRUE)

 option(
   ENABLE_LIBEVENT
-  "Use libevent instead of libev as the core event loop implementation"
+  "Use libevent instead of libev as the core event loop implementation."
   FALSE)

 option(
   ENABLE_SSL
-  "Build libprocess with SSL support"
+  "Build libprocess with SSL support."
   FALSE)

 option(
   ENABLE_LOCK_FREE_RUN_QUEUE
-  "Build libprocess with lock free run queue"
+  "Build libprocess with lock free run queue."
   FALSE)
+
+option(ENABLE_JAVA
+  "Build Java components. Warning: this is SLOW."
+  FALSE)
+
+if (ENABLE_JAVA)
+  include(FindJava)
+  find_package(Java COMPONENTS Development)
+
+  if (NOT JAVA_FOUND)
+    message(FATAL_ERROR "Java was not found!")
+  endif ()
+
+  include(FindJNI)
+  if (NOT JNI_FOUND)
+    message(FATAL_ERROR "JNI Java libraries were not found!")
+  endif ()
+
+  find_program(MVN mvn)
+  if (NOT MVN)
+    message(FATAL_ERROR "Maven was not found!")
+  endif ()
+
+  if (Java_FOUND AND JNI_FOUND AND MVN)
+    set(HAS_JAVA TRUE)
+  endif ()
+endif ()

 # If 'REBUNDLED' is set to FALSE, this will cause Mesos to build against the
 # specified dependency repository. This is especially useful for Windows
@@ -260,7 +268,7 @@
   if (BUILD_SHARED_LIBS)
     message(WARNING "Building with shared libraries is a work-in-progress.")

-    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)

     # Use dynamic CRT.
     set(CRT " /MD")


cmake bugfix

cmake bugfix

--- cmake/modules/FindTcmalloc.cmake
+++ cmake/modules/FindTcmalloc.cmake
@@ -35,4 +35,4 @@

 mark_as_advanced(
   Tcmalloc_LIBRARY
-))
+)


Fix -Wmisleading-indentation

Fix -Wmisleading-indentation

--- cmake/multiarch_popcnt_bmi.cmake
+++ cmake/multiarch_popcnt_bmi.cmake
@@ -38,10 +38,10 @@
     {
         uint64_t bits = 789;
         uint64_t count = popcnt64(bits);
-        if (count > 0) primes64[0] = ctz64(bits); bits &= bits - 1;
-        if (count > 1) primes64[1] = ctz64(bits); bits &= bits - 1;
-        if (count > 2) primes64[2] = ctz64(bits); bits &= bits - 1;
-        if (count > 3) primes64[3] = ctz64(bits); bits &= bits - 1;
+        if (count > 0) { primes64[0] = ctz64(bits); bits &= bits - 1; }
+        if (count > 1) { primes64[1] = ctz64(bits); bits &= bits - 1; }
+        if (count > 2) { primes64[2] = ctz64(bits); bits &= bits - 1; }
+        if (count > 3) { primes64[3] = ctz64(bits); bits &= bits - 1; }
     }
     int main()
     {


Adapted FindLibClang for Gentoo paths

Adapted FindLibClang for Gentoo paths

--- cmake_modules/FindLibClang.cmake
+++ cmake_modules/FindLibClang.cmake
@@ -14,10 +14,10 @@
 #               Known LLVM release numbers.

 # most recent versions come first
-set(LIBCLANG_KNOWN_LLVM_VERSIONS 6.0.0 6.0
-  5.0.1 5.0.0 5.0
+set(LIBCLANG_KNOWN_LLVM_VERSIONS 6.0.0 6.0 6
+  5.0.1 5.0.0 5.0 5
   4.0.1
-  4.0.0_1 4.0.0 4.0
+  4.0.0_1 4.0.0 4.0 4
   3.9.1
   3.9.0 3.9
   3.8.1
@@ -41,6 +41,8 @@
   list(APPEND libclang_llvm_header_search_paths
     # LLVM Debian/Ubuntu nightly packages: http://llvm.org/apt/
     "/usr/lib/llvm-${version}/include"
+    # LLVM Gentoo
+    "/usr/lib/llvm/${version}/include"
     # LLVM MacPorts
     "/opt/local/libexec/llvm-${version}/include"
     # LLVM Homebrew
@@ -52,6 +54,9 @@
   list(APPEND libclang_llvm_lib_search_paths
     # LLVM Debian/Ubuntu nightly packages: http://llvm.org/apt/
     "/usr/lib/llvm-${version}/lib/"
+    # LLVM Gentoo
+    "/usr/lib/llvm/${version}/lib64/"
+    "/usr/lib/llvm/${version}/lib32/"
     # LLVM MacPorts
     "/opt/local/libexec/llvm-${version}/lib"
     # LLVM Homebrew


reorder

reorder

--- cmake/FindCOIN.cmake
+++ cmake/FindCOIN.cmake
@@ -152,7 +152,7 @@
     # Not required by cbc v2.5, but required by later versions in which case,
     # the lower line should be commented out and this line used
     #SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
-    SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_CLP_LIBRARY};${COIN_OSI_CLP_LIBRARIES}")
+    SET(COIN_CBC_LIBRARIES "${COIN_CBC_SOLVER_LIBRARY};${COIN_CBC_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
     #SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_CLP_LIBRARIES}")
     SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
 ENDIF(COIN_FOUND)


Updates for recent Fern

Updates for recent Fern

--- cmake/FindFern.cmake
+++ cmake/FindFern.cmake
@@ -11,100 +11,83 @@
 #             that the Fern headers and libraries can be found in
 #             ${FERN_ROOT}/include and ${FERN_ROOT}/lib, respectively.

-IF(DEFINED ENV{FERN_ROOT})
+if(DEFINED ENV{FERN_ROOT})
     SET(_FERN_ROOT $ENV{FERN_ROOT})
     SET(_FERN_ROOT_INCLUDE ${_FERN_ROOT}/include)
     SET(_FERN_ROOT_LIB ${_FERN_ROOT}/lib)
-ENDIF()
+endif()

-FIND_PATH(FERN_INCLUDE_DIRS
+find_path(FERN_INCLUDE_DIRS
     NAMES fern/core/string.h
     PATHS ${_FERN_ROOT_INCLUDE}
 )

-FIND_LIBRARY(FERN_ALGORITHM_CORE_LIBRARY
-    NAMES fern_algorithm_core
+find_library(FERN_ALGORITHM_LIBRARY
+    NAMES fern_algorithm
     PATHS ${_FERN_ROOT_LIB}
 )
-IF(WIN32)
-    FIND_LIBRARY(FERN_ALGORITHM_CORE_DEBUG_LIBRARY
-        NAMES fern_algorithm_cored
+if(WIN32)
+    find_library(FERN_ALGORITHM_DEBUG_LIBRARY
+        NAMES fern_algorithmd
         PATHS ${_FERN_ROOT_LIB}
     )
-    SET(FERN_ALGORITHM_CORE_LIBRARY
-        optimized ${FERN_ALGORITHM_CORE_LIBRARY}
-        debug ${FERN_ALGORITHM_CORE_DEBUG_LIBRARY}
+    set(FERN_ALGORITHM_LIBRARY
+        optimized ${FERN_ALGORITHM_LIBRARY}
+        debug ${FERN_ALGORITHM_DEBUG_LIBRARY}
     )
-ENDIF()
+endif()

-FIND_LIBRARY(FERN_ALGORITHM_POLICY_LIBRARY
-    NAMES fern_algorithm_policy
+find_library(FERN_FEATURE_LIBRARY
+    NAMES fern_feature
     PATHS ${_FERN_ROOT_LIB}
 )
-IF(WIN32)
-    FIND_LIBRARY(FERN_ALGORITHM_POLICY_DEBUG_LIBRARY
-        NAMES fern_algorithm_policyd
+if(WIN32)
+    find_library(FERN_FEATURE_DEBUG_LIBRARY
+        NAMES fern_featured
         PATHS ${_FERN_ROOT_LIB}
     )
-    SET(FERN_ALGORITHM_POLICY_LIBRARY
-        optimized ${FERN_ALGORITHM_POLICY_LIBRARY}
-        debug ${FERN_ALGORITHM_POLICY_DEBUG_LIBRARY}
+    set(FERN_FEATURE_LIBRARY
+        optimized ${FERN_FEATURE_LIBRARY}
+        debug ${FERN_FEATURE_DEBUG_LIBRARY}
     )
-ENDIF()
+endif()

-FIND_LIBRARY(FERN_FEATURE_CORE_LIBRARY
-    NAMES fern_feature_core
-    PATHS ${_FERN_ROOT_LIB}
-)
-IF(WIN32)
-    FIND_LIBRARY(FERN_FEATURE_CORE_DEBUG_LIBRARY
-        NAMES fern_feature_cored
-        PATHS ${_FERN_ROOT_LIB}
-    )
-    SET(FERN_FEATURE_CORE_LIBRARY
-        optimized ${FERN_FEATURE_CORE_LIBRARY}
-        debug ${FERN_FEATURE_CORE_DEBUG_LIBRARY}
-    )
-ENDIF()
-
-
-FIND_LIBRARY(FERN_CORE_LIBRARY
+find_library(FERN_CORE_LIBRARY
     NAMES fern_core
     PATHS ${_FERN_ROOT_LIB}
 )
-IF(WIN32)
-    FIND_LIBRARY(FERN_CORE_DEBUG_LIBRARY
+if(WIN32)
+    find_library(FERN_CORE_DEBUG_LIBRARY
         NAMES fern_cored
         PATHS ${_FERN_ROOT_LIB}
     )
-    SET(FERN_CORE_LIBRARY
+    set(FERN_CORE_LIBRARY
         optimized ${FERN_CORE_LIBRARY}
         debug ${FERN_CORE_DEBUG_LIBRARY}
     )
-ENDIF()
+endif()

-SET(FERN_LIBRARIES
-    ${FERN_ALGORITHM_CORE_LIBRARY}
-    ${FERN_ALGORITHM_POLICY_LIBRARY}
-    ${FERN_FEATURE_CORE_LIBRARY}
+set(FERN_LIBRARIES
+    ${FERN_ALGORITHM_LIBRARY}
+    ${FERN_FEATURE_LIBRARY}
     ${FERN_CORE_LIBRARY}
 )

-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fern
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Fern
     REQUIRED_VARS
         FERN_LIBRARIES
         FERN_INCLUDE_DIRS
 )

-MARK_AS_ADVANCED(
+mark_as_advanced(
     FERN_LIBRARIES
     FERN_INCLUDE_DIRS
 )


changes needed when Ogre debug (OgreMain{Static}_d is only available) v0-8

--HG--
branch : v0-8

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -147,6 +147,10 @@
 find_library(OGRE_LIB_DBG NAMES ${OGRE_LIBRARY_NAMES}_d
              PATHS ${OGRE_PREFIX_PATH}
              PATH_SUFFIXES Debug lib/Debug)
+
+if (NOT OGRE_LIB AND OGRE_LIB_DBG)
+    set(OGRE_LIB OGRE_LIB_DBG)
+endif()

 mark_as_advanced(OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH OGRE_LIB OGRE_LIB_DBG)

@@ -212,8 +216,14 @@
             endif ()
         endif ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${ZZIP_LIBRARIES} ${ZLIB_LIBRARIES} ${FREEIMAGE_LIBRARIES} ${FREETYPE_LIBRARIES})
+        if (OGRE_LIBRARIES_DBG)
+            set(OGRE_LIBRARIES_DBG ${OGRE_LIBRARIES_DBG} ${ZZIP_LIBRARIES} ${ZLIB_LIBRARIES} ${FREEIMAGE_LIBRARIES} ${FREETYPE_LIBRARIES})
+        endif()
         if (APPLE)
             set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB} ${Carbon_LIBRARIES} ${Cocoa_LIBRARIES})
+            if (OGRE_LIBRARIES_DBG)
+                set(OGRE_LIBRARIES_DBG ${OGRE_LIBRARIES_DBG} ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB} ${Carbon_LIBRARIES} ${Cocoa_LIBRARIES})
+            endif()
         endif()
         if (NOT ZLIB_FOUND OR NOT ZZIP_FOUND)
             set(OGRE_DEPS_FOUND FALSE)
@@ -229,6 +239,9 @@
                 set(OGRE_DEPS_FOUND FALSE)
             endif ()
             set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${X11_LIBRARIES} ${X11_Xt_LIB} ${XAW_LIBRARY} ${X11_Xrandr_LIB} pthread dl)
+            if (OGRE_LIBRARIES_DBG)
+                set(OGRE_LIBRARIES_DBG ${OGRE_LIBRARIES_DBG} ${X11_LIBRARIES} ${X11_Xt_LIB} ${XAW_LIBRARY} ${X11_Xrandr_LIB} pthread dl)
+            endif()
         endif ()
         if (NOT OGRE_DEPS_FOUND)
             message(status "Could not find all required dependencies for the Ogre package.")


Layout

Layout

--- cmake/ROCSDeps.cmake
+++ cmake/ROCSDeps.cmake
@@ -32,6 +32,7 @@
 	# Parse arguments
 	parse_arguments(ARG "COMPONENTS;USEDBY" "" ${ARGN})
 	list(GET ARG_DEFAULT_ARGS 0 ARG_VERSION)
+
 	# Test if we use the internal boost components
 	if(ROCS_USE_INTERNAL_BOOST)
 		# Use the components that we have internally
@@ -43,6 +44,7 @@
 			include_directories(${ROCS_SRC_THIRDPARTY}/boost)
 		endif(${TMP})
 	endif(ROCS_USE_INTERNAL_BOOST)
+
 	# Check if the (remaining) components exist in the system
 	separate_by_spaces(COMPONENTS_SEPARATED ARG_COMPONENTS)
 	find_package(Boost ${ARG_VERSION} COMPONENTS ${COMPONENTS_SEPARATED})
@@ -50,6 +52,7 @@
 		message(FATAL_ERROR "System Boost libraries (${COMPONENTS_SEPARATED}) version ${ARG_VERSION} not found. Those libraries are required by the ${ARG_USEDBY}. Try enabling ROCS_USE_INTERNAL_BOOST.")
 	endif(NOT Boost_FOUND)
 	message(STATUS "Using system Boost libraries (${COMPONENTS_SEPARATED}) version ${ARG_VERSION} (required by ${ARG_USEDBY}).")
+
 	# Include boost headers
 	include_directories(${Boost_INCLUDE_DIRS})
 endmacro(depend_on_boost)


Added missing )

Added missing )

--- cmake/Conan.cmake
+++ cmake/Conan.cmake
@@ -12,7 +12,7 @@
     NAME
     bincrafters
     URL
-    https://bincrafters.jfrog.io/artifactory/api/conan/public-conan
+    https://bincrafters.jfrog.io/artifactory/api/conan/public-conan)

   conan_cmake_run(
     REQUIRES


restore pumi cmake option

restore pumi cmake option

--- config/defaults.cmake
+++ config/defaults.cmake
@@ -36,6 +36,7 @@
 option(MFEM_USE_PETSC "Enable PETSc support." OFF)
 option(MFEM_USE_MPFR "Enable MPFR usage." OFF)
 option(MFEM_USE_SIDRE "Enable Axom/Sidre usage" OFF)
+option(MFEM_USE_SCOREC "Enable SCOREC" OFF)

 # Allow a user to disable testing, examples, and/or miniapps at CONFIGURE TIME
 # if they don't want/need them (e.g. if MFEM is "just a dependency" and all they
@@ -121,6 +122,9 @@
 set(LAPACK_INCLUDE_DIRS "" CACHE STRING "Path to LAPACK headers.")
 set(LAPACK_LIBRARIES "" CACHE STRING "The LAPACK library.")

+set(SCOREC_PREFIX "${MFEM_DIR}/../core/install" CACHE STRING
+  "Directory where SCOREC is installed")
+
 # Some useful variables:
 set(CMAKE_SKIP_PREPROCESSED_SOURCE_RULES ON) # Skip *.i rules
 set(CMAKE_SKIP_ASSEMBLY_SOURCE_RULES  ON)    # Skip *.s rules


Bump version to 1.0.0. Removing Boost a pretty major change!

--- cmake/Config.cmake
+++ cmake/Config.cmake
@@ -1,7 +1,7 @@

 # setup version numbers
-set(VERSION_MAJOR 0)
-set(VERSION_MINOR 8)
+set(VERSION_MAJOR 1)
+set(VERSION_MINOR 0)
 set(VERSION_PATCH 0)
 set(VERSION_STR "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
 message("Project version: ${VERSION_STR}")


remove spurious lines (probably editor malfunction)

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -4,13 +4,6 @@
 ##
 set(NETLIB_LAPACK_DIR "${PROJECT_SOURCE_DIR}/lapack-netlib")

-1
-
-##
-
-2
-
-## Author: Hank Anderson <hank@statease.com>
 # System detection, via CMake.
 include("${PROJECT_SOURCE_DIR}/cmake/system_check.cmake")


Change download branch SDK CPP, v3.0.1 -> release

--- cmake/virgil.cmake
+++ cmake/virgil.cmake
@@ -137,7 +137,7 @@
         if (NOT TARGET ${VIRGIL}_project)
             ExternalProject_Add (${VIRGIL}_project
                 GIT_REPOSITORY "https://github.com/VirgilSecurity/virgil-sdk-cpp.git"
-                GIT_TAG "v3.1.0"
+                GIT_TAG "release"
                 PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ext/virgil-sdk"
                 CMAKE_ARGS ${CMAKE_ARGS}
             )


use find_program to find clang and clang++

--- compiler/clang.cmake
+++ compiler/clang.cmake
@@ -16,5 +16,31 @@
   polly_fatal_error(${_err})
 endif()

-set(CMAKE_C_COMPILER clang CACHE STRING "C compiler" FORCE)
-set(CMAKE_CXX_COMPILER clang++ CACHE STRING "C++ compiler" FORCE)
+find_program(CMAKE_C_COMPILER clang)
+find_program(CMAKE_CXX_COMPILER clang++)
+
+if(NOT CMAKE_C_COMPILER)
+  polly_fatal_error("clang not found")
+endif()
+
+if(NOT CMAKE_CXX_COMPILER)
+  polly_fatal_error("clang++ not found")
+endif()
+
+set(
+    CMAKE_C_COMPILER
+    "${CMAKE_C_COMPILER}"
+    CACHE
+    STRING
+    "C compiler"
+    FORCE
+)
+
+set(
+    CMAKE_CXX_COMPILER
+    "${CMAKE_CXX_COMPILER}"
+    CACHE
+    STRING
+    "C++ compiler"
+    FORCE
+)


~ moving setup.py output one level upper to make python eggs mechanism happy

--- contrib/cmake/PyExtensions.cmake
+++ contrib/cmake/PyExtensions.cmake
@@ -124,7 +124,7 @@

     if( py_extensions_SETUP_TEMPLATE )
         message( STATUS "setup.py will be generated for ${PYPKGNM} from ${py_extensions_SETUP_TEMPLATE}" )
-        configure_file( ${py_extensions_SETUP_TEMPLATE} ${CMAKE_CURRENT_BINARY_DIR}/setup.py )
+        configure_file( ${py_extensions_SETUP_TEMPLATE} ${CMAKE_CURRENT_BINARY_DIR}/../setup.py )
     endif( py_extensions_SETUP_TEMPLATE )

     set( PY_MODULES_INSTALL_DIR ${PY_MODULES_INSTALL_DIR} PARENT_SCOPE )


COMP: Updated dashboard driver script to build "doc" target if WITH_DOCUMENTATION is True

--- CMake/ctkDashboardDriverScript.cmake
+++ CMake/ctkDashboardDriverScript.cmake
@@ -125,7 +125,7 @@
 QT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
 SUPERBUILD_EXCLUDE_CTKBUILD_TARGET:BOOL=TRUE
 WITH_COVERAGE:BOOL=${WITH_COVERAGE}
-DOCUMENTATION_TARGET_IN_ALL:BOOL=${WITH_DOCUMENTATION}
+#DOCUMENTATION_TARGET_IN_ALL:BOOL=${WITH_DOCUMENTATION}
 DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY:PATH=${DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY}
 ${ADDITIONNAL_CMAKECACHE_OPTION}
 ")
@@ -189,6 +189,12 @@

      ctest_submit(PARTS Build)
     endforeach()
+
+    if (WITH_DOCUMENTATION)
+      # Build Documentation target
+      set(CTEST_BUILD_TARGET "doc")
+      ctest_build(BUILD "${ctk_build_dir}" APPEND)
+    endif()

     # HACK Unfortunately ctest_coverage ignores the build argument, try to force it...
     file(READ ${ctk_build_dir}/CMakeFiles/TargetDirectories.txt ctk_build_coverage_dirs)


feat(Cmake/FindMySQL): add support MariaDB 10.9 (#11835)

--- src/cmake/macros/FindMySQL.cmake
+++ src/cmake/macros/FindMySQL.cmake
@@ -40,7 +40,7 @@
 # Find MariaDB for Windows
 if (WIN32)
   # Set know versions MariaDB
-  set(_MARIADB_KNOWN_VERSIONS "MariaDB 10.8" "MariaDB 10.7" "MariaDB 10.6" "MariaDB 10.5")
+  set(_MARIADB_KNOWN_VERSIONS "MariaDB 10.9" "MariaDB 10.8" "MariaDB 10.7" "MariaDB 10.6" "MariaDB 10.5")

   # Set default options
   set(MARIADB_FOUND_LIB 0)


[cmake]Fix -mcpu for x86_64.

[cmake]Fix -mcpu for x86_64.

--- cmake/FindD.cmake
+++ cmake/FindD.cmake
@@ -46,7 +46,15 @@
     else (dmd_version)
 	string(REGEX MATCH "LLVM-based D Compiler" is_ldc "${d_output}")
 	if (is_ldc)
-        set(LDC_CPU ${CMAKE_SYSTEM_PROCESSOR} CACHE STRING "Set the CPU for LLVM to generate for")
+        if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^i.86$")
+            set(LDC_DEFAULT_CPU "i686")
+        elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(amd|x86[_-])64$")
+            set(LDC_DEFAULT_CPU "x86-64")
+        else (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^i.86$")
+            set(LDC_DEFAULT_CPU "")
+        endif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^i.86$")
+        set(LDC_CPU ${LDC_DEFAULT_CPU} CACHE STRING "Set the CPU for LLVM to generate for")
+
 	    exec_program(${DC} ARGS "--version" OUTPUT_VARIABLE d_output)
 	    string(REGEX MATCH "based on DMD v[0-9]\\.[0-9]+" ldc_version "${d_output}")
 	    set(D_IS_LLVM true)


fix bug: fix clang force load static shadow library

--- cmake/Utils.cmake
+++ cmake/Utils.cmake
@@ -109,8 +109,7 @@
       set(${output_var} ${lib} PARENT_SCOPE)
     endif ()
   elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-    #set(${output_var} -Wl,-force_load,$<TARGET_FILE:${lib}> PARENT_SCOPE)
-    set(${output_var} -Wl,--whole-archive ${lib} -Wl,--no-whole-archive PARENT_SCOPE)
+    set(${output_var} -Wl,-force_load ${lib} PARENT_SCOPE)
   else ()
     set(${output_var} -Wl,--whole-archive ${lib} -Wl,--no-whole-archive PARENT_SCOPE)
   endif ()


Improve error message when googletest is missing.

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -1,5 +1,10 @@
 if (NOT EXISTS "${PROJECT_SOURCE_DIR}/../third_party/googletest/CMakeLists.txt")
-  message(FATAL_ERROR "Cannot find third_party/googletest directory.")
+  message(FATAL_ERROR
+          "Cannot find third_party/googletest directory that's needed to "
+          "build tests. If you use git, make sure you have cloned submodules:\n"
+          "  git submodule update --init --recursive\n"
+          "If instead you want to skip tests, run cmake with:\n"
+          "  cmake -Dprotobuf_BUILD_TESTS=OFF\n")
 endif()

 option(protobuf_ABSOLUTE_TEST_PLUGIN_PATH


Fix a small syntax error. A ( was accidently deleted.

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -181,7 +181,7 @@
     set(append_with ${ARGV5})
   endif ()

-  if ${ARGC} GREATER 6)
+  if (${ARGC} GREATER 6)
     set(no_float_type ${ARGV6})
   else ()
     set(no_float_type false)


build boost.iostreams with externpro-built bzip2

--- projects/boost.cmake
+++ projects/boost.cmake
@@ -1,9 +1,6 @@
 ########################################
 # boost
 # http://sourceforge.net/projects/boost/files/boost/
-# * to build boost.iostreams on Linux: need to install bz2 dev pkgs
-# *   sudo apt-get install libbz2-dev [ubuntu]
-# *   sudo yum install bzip2-devel.x86_64 [rhel6]
 # * to build boost.python on Linux: need to install python dev pkgs
 # *   sudo apt-get install python-dev [ubuntu]
 # *   sudo yum install python-devel.x86_64 [rhel6]
@@ -51,9 +48,16 @@
     set(XP_PRO_ZLIB ON CACHE BOOL "include zlib" FORCE)
     patch_zlib()
   endif()
+  if(NOT (XP_DEFAULT OR XP_PRO_BZIP2))
+    message(STATUS "boost.cmake: requires bzip2")
+    set(XP_PRO_BZIP2 ON CACHE BOOL "include bzip2" FORCE)
+    patch_bzip2()
+  endif()
   build_zlib(zlibTgts)
+  build_bzip2(bzip2Tgts)
   list(APPEND tgts
     ${zlibTgts}
+    ${bzip2Tgts}
     # patched submodules
     boostconfig
     boostgil
@@ -265,7 +269,11 @@
     )
   #list(APPEND boost_BUILD --without-locale --without-mpi)
   list(APPEND boost_BUILD --with-iostreams --with-filesystem)
-  list(APPEND boost_BUILD -s ZLIB_BINARY=zlibstatic-s -s ZLIB_INCLUDE=${STAGE_DIR}/include/zlib -s ZLIB_LIBPATH=${STAGE_DIR}/lib)
+  list(APPEND boost_BUILD -s ZLIB_INCLUDE=${STAGE_DIR}/include/zlib -s ZLIB_LIBPATH=${STAGE_DIR}/lib)
+  list(APPEND boost_BUILD -s BZIP2_INCLUDE=${STAGE_DIR}/include/bzip2 -s BZIP2_LIBPATH=${STAGE_DIR}/lib)
+  if(WIN32)
+    list(APPEND boost_BUILD -s ZLIB_BINARY=zlibstatic-s -s BZIP2_BINARY=bz2-s)
+  endif()
   if(${CMAKE_SYSTEM_NAME} STREQUAL SunOS)
     # Memory exhausted errors (/opt/csw/i386-pc-solaris2.10/bin/ranlib)
     # wave/build/gcc-4.8.0/debug/address-model-64/link-static/runtime-link-static/threading-multi/


Incorporate patched from casey

Incorporate patched from casey

This makes it work with older versions of cmake and
inherits the build examples value from the parent

--- CMake/vtkAndroid.cmake
+++ CMake/vtkAndroid.cmake
@@ -61,7 +61,7 @@
     PREFIX ${PREFIX_DIR}/vtk-compile-tools
     BINARY_DIR ${BUILD_DIR}/vtk-compile-tools
     ${VTK_BUILD_COMMAND} vtkCompileTools
-    BUILD_ALWAYS 1
+    ${BUILD_ALWAYS_STRING}
     INSTALL_DIR ${INSTALL_DIR}/vtk-compile-tools
     CMAKE_CACHE_ARGS
       -DCMAKE_BUILD_TYPE:STRING=Release
@@ -97,7 +97,7 @@
   -DANT_EXECUTABLE:FILE=${ANT_EXECUTABLE}
   -DBUILD_SHARED_LIBS:BOOL=OFF
   -DBUILD_TESTING:BOOL=OFF
-  -DBUILD_EXAMPLES:BOOL=ON
+  -DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
   -DVTK_RENDERING_BACKEND:STRING=OpenGL2
   -DOPENGL_ES_VERSION:STRING=${OPENGL_ES_VERSION}
   -DVTK_Group_Rendering:BOOL=OFF
@@ -124,6 +124,10 @@
   -DModule_vtkRenderingFreeType:BOOL=OFF
 )

+set(BUILD_ALWAYS_STRING)
+if(${CMAKE_VERSION} GREATER 3.0)
+  set(BUILD_ALWAYS_STRING "BUILD_ALWAYS 1")
+endif()

 macro(crosscompile target toolchain_file)
   ExternalProject_Add(
@@ -133,7 +137,7 @@
     BINARY_DIR ${BUILD_DIR}/${target}
     INSTALL_DIR ${INSTALL_DIR}/${target}
     DEPENDS vtk-compile-tools
-    BUILD_ALWAYS 1
+    ${BUILD_ALWAYS_STRING}
     CMAKE_ARGS
       -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/${target}
       -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}


cmake: warn about unused functions and typedefs

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -210,7 +210,6 @@
          AddCompilerFlag("-Wpointer-arith")
          AddCompilerFlag("-Wcast-align")
          AddCompilerFlag("-Wreturn-type")
-         AddCompilerFlag("-Wno-unused-function")
          AddCompilerFlag("-pedantic")
          AddCompilerFlag("-Wno-long-long")
          AddCompilerFlag("-Wshadow")
@@ -231,17 +230,12 @@
       #                                              GCC                                               #
       ##################################################################################################
       if(_add_warning_flags)
-         foreach(_f -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -Wno-unused-function -pedantic -Wshadow -Wundef -Wold-style-cast -Wno-variadic-macros)
+         foreach(_f -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef -Wold-style-cast -Wno-variadic-macros)
             AddCompilerFlag("${_f}")
          endforeach()
          if(Vc_GCC_VERSION VERSION_GREATER "4.5.2" AND Vc_GCC_VERSION VERSION_LESS "4.6.4")
             # GCC gives bogus "array subscript is above array bounds" warnings in math.cpp
             AddCompilerFlag("-Wno-array-bounds")
-         endif()
-         if(Vc_GCC_VERSION VERSION_GREATER "4.7.99")
-            # GCC 4.8 warns about stuff we don't care about
-            # Some older GCC versions have problems to note that they don't support the flag
-            AddCompilerFlag("-Wno-unused-local-typedefs")
          endif()
       endif()
       vc_add_compiler_flag(Vc_DEFINITIONS "-Wabi")