Fix Typo that prevents setting Compile Definitions (#3167)

--- src/cmake/fancy_add_executable.cmake
+++ src/cmake/fancy_add_executable.cmake
@@ -45,7 +45,7 @@
             target_include_directories (${_target_NAME} SYSTEM PRIVATE ${_target_SYSTEM_INCLUDE_DIRS})
         endif ()
         if (_target_DEFINITIONS)
-            target_compile_definitions (${_target_name} PRIVATE ${_target_DEFINITIONS})
+            target_compile_definitions (${_target_NAME} PRIVATE ${_target_DEFINITIONS})
         endif ()
         if (_target_LINK_LIBRARIES)
             target_link_libraries (${_target_NAME} PRIVATE ${_target_LINK_LIBRARIES})


Guard for Linux cross compiling.

Guard for Linux cross compiling.

--- Build/CMake/Modules/AtomicUtils.cmake
+++ Build/CMake/Modules/AtomicUtils.cmake
@@ -26,6 +26,6 @@

 endmacro()

-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+if(NOT CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
   set(LINUX TRUE CACHE BOOL "Indicates if host is Linux.")
 endif()


Don't require variable in driver script

Don't require variable in driver script

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -7,7 +7,6 @@
 #-----------------------------------------------------------------------------
 # The following variable are expected to be define in the top-level script:
 set(expected_variables
-  ADDITIONNAL_CMAKECACHE_OPTION
   CTEST_NOTES_FILES
   CTEST_SITE
   CTEST_DASHBOARD_ROOT


Define FLUIDSYNTH_API on OS/2

Define FLUIDSYNTH_API on OS/2

Previously, CMake on OS/2 exported all the symbols unconditionally. Now
it exports necessary symbols only. As a result, it's necessary to
define FLUIDSYNTH_API correctly.

Addresses #678

--- include/fluidsynth.cmake
+++ include/fluidsynth.cmake
@@ -42,6 +42,9 @@

 #elif defined(MACOS9)
 #define FLUIDSYNTH_API __declspec(export)
+
+#elif defined(__OS2__)
+#define FLUIDSYNTH_API __declspec(dllexport)

 #elif defined(__GNUC__)
 #define FLUIDSYNTH_API __attribute__ ((visibility ("default")))


STYLE: Replace write_file() with file(WRITE) and file(APPEND)

The old CMake write_file() command is documented as discouraged and
replaced by the file(WRITE) and file(APPEND) commands which have been
around since long before even CMake 2.4.

Change-Id: Id28778f0c584bc0e4bc9cf62f6c540ba5da307b0

--- Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_config_macros.cmake
+++ Modules/ThirdParty/VNL/src/vxl/config/cmake/config/vxl_config_macros.cmake
@@ -34,9 +34,9 @@
     ELSE(${TEST})
       MESSAGE(STATUS "Performing Test ${TEST} - Failed")
       SET(${TEST} 0 CACHE INTERNAL "Test ${FUNCTION}")
-      WRITE_FILE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
                  "Performing Test ${TEST} failed with the following output:\n"
-                 "${OUTPUT}\n" APPEND)
+                 "${OUTPUT}\n")
     ENDIF(${TEST})
   ELSE("${TEST}" MATCHES "^${TEST}$")
     # Have result
@@ -84,9 +84,9 @@
     ELSE(${TEST})
       MESSAGE(STATUS "Performing Test ${TEST} - Failed")
       SET(${TEST} 0 CACHE INTERNAL "Test ${FUNCTION}")
-      WRITE_FILE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
                  "Performing Test ${TEST} failed with the following output:\n"
-                 "${OUTPUT}\n" APPEND)
+                 "${OUTPUT}\n")
     ENDIF(${TEST})
   ENDIF("${TEST}" MATCHES "^${TEST}$")
   FILE(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/config/${DIR})
@@ -123,22 +123,22 @@
       IF(${TEST})
         MESSAGE(STATUS "Performing Test ${TEST} - Failed")
         SET(${TEST} 0 CACHE INTERNAL "Test ${FUNCTION} (failed to run)")
-        WRITE_FILE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+        FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
                    "Performing Test ${TEST} failed with the following output:\n"
-                   "${OUTPUT}\n" APPEND)
+                   "${OUTPUT}\n")
       ELSE(${TEST})
         SET(${TEST} 1 CACHE INTERNAL "VXL test ${FUNCTION} (successful run)")
         MESSAGE(STATUS "Performing Test ${TEST} - Success")
-        WRITE_FILE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+        FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
                    "Performing Test ${TEST} succeeded with the following output:\n"
-                   "${OUTPUT}\n" APPEND)
+                   "${OUTPUT}\n")
       ENDIF(${TEST})
     ELSE(${TEST}_COMPILED)
       MESSAGE(STATUS "Performing Try-Run Test ${TEST} - Test Compilation Failed")
       SET(${TEST} 0 CACHE INTERNAL "Test ${FUNCTION} (failed to compile)")
-      WRITE_FILE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
                  "Performing Try-Run Test ${TEST} failed to compile with the following output:\n"
-                 "${OUTPUT}\n" APPEND)
+                 "${OUTPUT}\n")
     ENDIF(${TEST}_COMPILED)
   ELSE("${TEST}" MATCHES "^${TEST}$")
     # Have result
@@ -294,7 +294,7 @@
       # Write the config to a file instead of passing on the command
       # line to avoid issues with spaces. (In "long double", for
       # example)
-      WRITE_FILE( ${CMAKE_BINARY_DIR}/CMakeTmp/config.h "#define THE_TYPE ${TYPE}\n#define THE_SIZE ${SIZE}\n#define INTEGRAL_TYPE ${INTEGRAL_TYPE}" )
+      FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/config.h "#define THE_TYPE ${TYPE}\n#define THE_SIZE ${SIZE}\n#define INTEGRAL_TYPE ${INTEGRAL_TYPE}")
       SET( MACRO_DETERMINE_TYPE_FLAGS "-DVXL_HAS_TYPE_OF_SIZE" )
       MESSAGE( STATUS "${MSG} [Checking ${TYPE}...]" )
       TRY_COMPILE(COMPILE_RESULT
@@ -308,9 +308,8 @@
         SET( VXL_${VAR} ${TYPE} )
         SET( VXL_HAS_${VAR} 1 )
       ELSE( COMPILE_RESULT )
-        WRITE_FILE( ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
-          "${MSG} Failed to compile with the following output:\n(FLAGS=${MACRO_DETERMINE_TYPE_FLAGS})\n${OUTPUT}\n"
-          APPEND )
+        FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+          "${MSG} Failed to compile with the following output:\n(FLAGS=${MACRO_DETERMINE_TYPE_FLAGS})\n${OUTPUT}\n")
       ENDIF( COMPILE_RESULT )
     ENDFOREACH( TYPE )
     IF( VXL_HAS_${VAR} )


Build: Add error for missing server includedir

JIRA: MADLIB-1065

Missing server headers is a common error with new contributors. This
leads to a non-related error with CMake. This commit fixes that by
explicitly asking user to check server includedir.

Closes #102

--- src/ports/postgres/cmake/FindPostgreSQL.cmake
+++ src/ports/postgres/cmake/FindPostgreSQL.cmake
@@ -86,7 +86,6 @@
         OUTPUT_VARIABLE ${PKG_NAME}_SERVER_INCLUDE_DIR
         OUTPUT_STRIP_TRAILING_WHITESPACE
     )
-
     execute_process(COMMAND ${${PKG_NAME}_PG_CONFIG} --includedir
         OUTPUT_VARIABLE ${PKG_NAME}_CLIENT_INCLUDE_DIR
         OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -97,7 +96,7 @@
     set(${PKG_NAME}_VERSION_MAJOR 0)
     set(${PKG_NAME}_VERSION_MINOR 0)
     set(${PKG_NAME}_VERSION_PATCH 0)
-
+
     set(CONFIG_FILE ${${PKG_NAME}_SERVER_INCLUDE_DIR}/pg_config.h)

     if(EXISTS ${CONFIG_FILE})
@@ -112,7 +111,6 @@
         else(${CMAKE_COMPILER_IS_GNUCC})
             file(READ ${CONFIG_FILE} _PG_CONFIG_HEADER_CONTENTS)
         endif(${CMAKE_COMPILER_IS_GNUCC})
-

 		# Get PACKAGE_NAME
 		if (_PG_CONFIG_HEADER_CONTENTS MATCHES "#define PACKAGE_NAME \".*\"")
@@ -159,6 +157,10 @@
 			endif(_PG_CONFIG_HEADER_CONTENTS MATCHES "#define ${_PG_CONFIG_VERSION_MACRO} ([0-9]+).*")

         endif(${PKG_NAME}_VERSION_NUM MATCHES "^[0-9]+$")
+    else(EXISTS ${CONFIG_FILE})
+        message(FATAL_ERROR "Found pg_config (\"${${PKG_NAME}_PG_CONFIG}\"), "
+              "but pg_config.h file not present in the "
+              "server include dir (${${PKG_NAME}_SERVER_INCLUDE_DIR}).")
     endif(EXISTS ${CONFIG_FILE})

     if(_PACKAGE_NAME STREQUAL "${_NEEDED_PG_CONFIG_PACKAGE_NAME}")


edited yapsy download and hash

edited yapsy download and hash

--- yapsy.cmake
+++ yapsy.cmake
@@ -10,10 +10,10 @@
 include (setuptools)

 external_source (yapsy
-    1.10.1
-    Yapsy-1.10.1-pythons2n3.tar.gz
-    d41d8cd98f00b204e9800998ecf8427e
-    http://pypi.python.org/packages/source/Y/Yapsy
+    1.10.2
+    Yapsy-1.10.2-pythons2n3.tar.gz
+    d905b574d4f55ff62e02603ec3dc89b3
+    https://pypi.python.org/packages/source/Y/Yapsy
     FORCE)

 message ("Installing ${yapsy_NAME} into ilastik build area: ${BUILDEM_DIR} ...")


ITK superbuild version along the 4.13 release branch

This include fixed for the gradient descent line search, SCIFIO
updates, and transform compatibility.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -52,7 +52,7 @@
 mark_as_advanced(ITK_GIT_REPOSITORY)
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

-set(ITK_GIT_TAG "9cc3f955ca46d244b9043904a3094f7f9538cb95" CACHE
+set(ITK_GIT_TAG " 0d52c43179b3a72340788ee883b27a8c5e716f68" CACHE
   STRING "Tag in ITK git repo") # release-4.13
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


Core/Build: Fix windows build for recent OpenSSL versions (#1065)

Closes #1047

--- src/cmake/macros/FindOpenSSL.cmake
+++ src/cmake/macros/FindOpenSSL.cmake
@@ -35,12 +35,14 @@
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]"
     "C:/OpenSSL-Win64/"
     "C:/OpenSSL/"
+    "C:/Program Files/OpenSSL-Win64/"
   )
 ELSE()
   SET(_OPENSSL_ROOT_PATHS
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]"
     "C:/OpenSSL/"
+    "C:/Program Files/OpenSSL/"
   )
 ENDIF()

@@ -77,30 +79,37 @@
     # libeay32MD.lib is identical to ../libeay32.lib, and
     # ssleay32MD.lib is identical to ../ssleay32.lib

+    # In 1.1 version of OpenSSL we have other names of libs: libcrypto32MTd.lib and libssl32MTd.lib
+    if( "${CMAKE_SIZEOF_VOID_P}" STREQUAL "8" )
+        set(_OPENSSL_MSVC_ARCH_SUFFIX "64")
+    else()
+        set(_OPENSSL_MSVC_ARCH_SUFFIX "32")
+    endif()
+
     FIND_LIBRARY(LIB_EAY_DEBUG
       NAMES
-        libeay32MDd libeay32
+        libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}MDd libeay32MDd libeay32
       PATHS
         ${OPENSSL_ROOT_DIR}/lib/VC
     )

     FIND_LIBRARY(LIB_EAY_RELEASE
       NAMES
-        libeay32MD libeay32
+        libcrypto${_OPENSSL_MSVC_ARCH_SUFFIX}MD libeay32MD libeay32
       PATHS
         ${OPENSSL_ROOT_DIR}/lib/VC
     )

     FIND_LIBRARY(SSL_EAY_DEBUG
       NAMES
-        ssleay32MDd ssleay32 ssl
+        libssl${_OPENSSL_MSVC_ARCH_SUFFIX}MDd ssleay32MDd ssleay32 ssl
       PATHS
         ${OPENSSL_ROOT_DIR}/lib/VC
     )

     FIND_LIBRARY(SSL_EAY_RELEASE
       NAMES
-        ssleay32MD ssleay32 ssl
+        libssl${_OPENSSL_MSVC_ARCH_SUFFIX}MD ssleay32MD ssleay32 ssl
       PATHS
         ${OPENSSL_ROOT_DIR}/lib/VC
     )


enh: Set POSITION_INDEPENDENT_CODE property of library targets [CMake]

--- CMake/Modules/mirtkAddLibrary.cmake
+++ CMake/Modules/mirtkAddLibrary.cmake
@@ -78,6 +78,7 @@
     if (WIN32)
       set_target_properties(${target_uid} PROPERTIES SUFFIX "_s.lib")
     endif ()
+    set_target_properties(${target_uid} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
   endif ()
   # VTK 7.0.0 adds its CMake modules directory to CMAKE_MODULE_PATH
   # and this directory contains a GenerateExportHeader.cmake module


Renderscript: Updated CMake module to handle projects with no rs sources

--- cmake/modules/FindRenderScript.cmake
+++ cmake/modules/FindRenderScript.cmake
@@ -39,6 +39,9 @@
 #
 #   RS_INCLUDE_DIRS
 #     Specifies the RenderScript include directories.
+#
+#   RS_SOURCES
+#     RenderScript source files.
 #
 #   NDK_CXX_COMPILER
 #     Specifies the NDK C++ compiler executable.
@@ -85,6 +88,8 @@

 SET (RS_INCLUDE_DIRS -I${ANDROID_SOURCE_DIR}/frameworks/rs/scriptc
                      -I${ANDROID_SOURCE_DIR}/external/clang/lib/Headers)
+
+SET (RS_SOURCES "")

 FIND_PROGRAM(NDK_CXX_EXECUTABLE
   NAME arm-linux-androideabi-g++
@@ -154,6 +159,7 @@

 MACRO (RS_WRAP_SCRIPTS DEST)
   FOREACH (SCRIPT ${ARGN})
+    LIST (APPEND RS_SOURCES ${SCRIPT})
     STRING (REGEX REPLACE "\^.*/([a-zA-Z0-9_.-]*).(rs|fs)"
                          "${CMAKE_CURRENT_BINARY_DIR}/ScriptC_\\1.cpp"
                          SCRIPT ${SCRIPT})
@@ -173,11 +179,18 @@
 ENDMACRO ()

 MACRO (RS_ADD_EXECUTABLE NAME)
-  ADD_CUSTOM_TARGET (${NAME} ALL
-    COMMAND ${RS_COMPILER} ${RS_FLAGS} ${RS_INCLUDE_DIRS} ${PROJECT_RS}
-    COMMAND ${NDK_CXX_COMPILER} ${NDK_CXX_FLAGS} ${NDK_DEFINITIONS}
-            ${NDK_INCLUDE_DIRS} ${NDK_LINK_LIBRARIES} ${ARGN} -o ${NAME}
-            ${NDK_LINK_LIBRARIES_${NAME}})
+  IF (RS_SOURCES STREQUAL "")
+    ADD_CUSTOM_TARGET (${NAME} ALL
+      COMMAND ${NDK_CXX_COMPILER} ${NDK_CXX_FLAGS} ${NDK_DEFINITIONS}
+              ${NDK_INCLUDE_DIRS} ${NDK_LINK_LIBRARIES} ${ARGN} -o ${NAME}
+              ${NDK_LINK_LIBRARIES_${NAME}})
+  ELSE ()
+    ADD_CUSTOM_TARGET (${NAME} ALL
+      COMMAND ${RS_COMPILER} ${RS_FLAGS} ${RS_INCLUDE_DIRS} ${RS_SOURCES}
+      COMMAND ${NDK_CXX_COMPILER} ${NDK_CXX_FLAGS} ${NDK_DEFINITIONS}
+              ${NDK_INCLUDE_DIRS} ${NDK_LINK_LIBRARIES} ${ARGN} -o ${NAME}
+              ${NDK_LINK_LIBRARIES_${NAME}})
+  ENDIF ()
 ENDMACRO ()

 MACRO (RS_LINK_LIBRARIES NAME)


[cmake] winrtdebug is now ON by default.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -162,6 +162,7 @@
 set(treeplayer_defvalue ON)
 set(treeviewer_defvalue OFF)
 set(vmc_defvalue OFF)
+set(winrtdebug_defvalue ON)
 set(xml_defvalue OFF)
 set(xmlio_defvalue OFF)
 set(xrootd_defvalue OFF)
@@ -271,7 +272,7 @@
 ROOT_BUILD_OPTION(unuran ${unuran_defvalue} "UNURAN - package for generating non-uniform random numbers")
 ROOT_BUILD_OPTION(vc ${vc_defvalue} "Vc adds a few new types for portable and intuitive SIMD programming")
 ROOT_BUILD_OPTION(vdt ${vdt_defvalue} "VDT adds a set of fast and vectorisable mathematical functions")
-ROOT_BUILD_OPTION(winrtdebug OFF "Link against the Windows debug runtime library")
+ROOT_BUILD_OPTION(winrtdebug ${winrtdebug_defvalue} "Link against the Windows debug runtime library")
 ROOT_BUILD_OPTION(vmc ${vmc_defvalue} "vmc")
 ROOT_BUILD_OPTION(xft ON "Xft support (X11 antialiased fonts)")
 ROOT_BUILD_OPTION(xml ${xml_defvalue} "XML parser interface")


Protobuf: Add protobuf_BUILD_PROTOC_BINARIES=OFF for iOS/Android

--- cmake/projects/Protobuf/hunter.cmake
+++ cmake/projects/Protobuf/hunter.cmake
@@ -126,6 +126,7 @@
       CMAKE_ARGS
         protobuf_BUILD_TESTS=OFF
         protobuf_BUILD_PROTOC=OFF
+        protobuf_BUILD_PROTOC_BINARIES=OFF
   )
 elseif(_hunter_windows_store)
   hunter_cmake_args(


Suppress clang warnings when compiling bundled boost 1.56

Clang generates a bunch of warnings of the type:
bundled/boost-1.56.0/include/boost/preprocessor/tuple/eat.hpp:23:26: warning: variadic macros are a C99 feature [-Wvariadic-macros]
bundled/boost-1.56.0/include/boost/mpl/if.hpp:131:1: warning: empty macro arguments are a C99 feature [-Wc99-extensions]

This patch just disables those warnings. Also see https://code.google.com/p/dealii/issues/detail?id=252

--- cmake/setup_compiler_flags_gnu.cmake
+++ cmake/setup_compiler_flags_gnu.cmake
@@ -113,6 +113,11 @@
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-private-field")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unused-variable")
   ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-unsupported-friend")
+
+  # suppress warnings in boost 1.56:
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-c++11-extensions")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-c99-extensions")
+  ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "-Wno-variadic-macros")
 ENDIF()


ENH: Tweaked options

ENH: Tweaked options

--- Eternia_Kitware_TubeTK_Slicer.cmake
+++ Eternia_Kitware_TubeTK_Slicer.cmake
@@ -42,6 +42,8 @@
 set( TubeTK_BUILD_USING_SLICER ON )
 set( TubeTK_USE_BOOST ON )
 # set( TubeTK_USE_CPPCHECK ON )  Set per ctest type, e.g., Experimental, Nightly
+set( TubeTK_USE_DOXYGEN OFF )
+set( TubeTK_USE_EXAMPLES_AS_TESTS OFF )
 set( TubeTK_USE_IPYTHON_NOTEBOOKS ON )
 # set( TubeTK_USE_KWSTYLE ON )   Set per ctest type, e.g., Experimental, Nightly
 set( TubeTK_USE_LIBSVM ON )
@@ -88,12 +90,12 @@

 set( SITE_NIGHTLY_BUILD ON )
 set( SITE_NIGHTLY_TEST ON )
-set( SITE_NIGHTLY_CPPCHECK OFF )
-set( SITE_NIGHTLY_KWSTYLE OFF )
+set( SITE_NIGHTLY_CPPCHECK ON )
+set( SITE_NIGHTLY_KWSTYLE ON )
 set( SITE_NIGHTLY_COVERAGE OFF )
 set( SITE_NIGHTLY_MEMORY OFF )
-set( SITE_NIGHTLY_PACKAGE ON )
-set( SITE_NIGHTLY_UPLOAD ON )
+set( SITE_NIGHTLY_PACKAGE OFF )
+set( SITE_NIGHTLY_UPLOAD OFF )

 ##############################################################################
 # The following advanced variables should only be changed by experts.


fpta-cmake: refine GoogleTest handling (CMAKE_CURRENT_SOURCE_DIR and so on).

--- cmake.fpta/testing.cmake
+++ cmake.fpta/testing.cmake
@@ -36,15 +36,15 @@

   find_path(gtest_root
     NAMES CMakeLists.txt
-    PATHS ${gtest_paths}
+    PATHS ${gtest_paths} "${CMAKE_BINARY_DIR}/googletest-src"
     PATH_SUFFIXES googletest/googletest gtest/googletest gtest
     NO_DEFAULT_PATH NO_CMAKE_PATH)

   if(gtest_root)
     message(STATUS "Found GoogleTest sources at ${gtest_root}")
   else()
-    # Download and unpack GoogleTest at configure time
-    configure_file(${CMAKE_SOURCE_DIR}/cmake.fpta/googletest-download.cmake.in googletest-download/CMakeLists.txt)
+    message(STATUS "Not found GoogleTest sources, downloading it...")
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake.fpta/googletest-download.cmake.in ${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt)
     execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
       RESULT_VARIABLE result
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download)


android apk file name change

android apk file name change

--- cmake/CEGUIAndroid.cmake
+++ cmake/CEGUIAndroid.cmake
@@ -88,7 +88,7 @@

         add_custom_command(
             TARGET ${ANDROID_PROJECT_TARGET} POST_BUILD COMMAND ${ANDROID_EXECUTABLE}
-            update project --subprojects --target ${ANDROID_TARGET} --path "${NDKOUT}" WORKING_DIRECTORY ${NDKOUT})
+            update project --name ${ANDROID_MOD_NAME} --subprojects --target ${ANDROID_TARGET} --path "${NDKOUT}" WORKING_DIRECTORY ${NDKOUT})

         if(DEBUG)
             add_custom_command( TARGET ${ANDROID_PROJECT_TARGET} POST_BUILD COMMAND


set zlib back to system ignore list/revert pr #871 (#904)

* set zlib to system ignore list
* undo pr #871
* exclude libcec if Dispmanx available

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -24,7 +24,12 @@
 			"libusb-1"
 			"libutil"
 			"libX11"
-		)
+			"libz"
+		)
+
+		if(ENABLE_DISPMANX)
+			list(APPEND SYSTEM_LIBS_SKIP "libcec")
+		endif()

 		if (APPLE)
 			set(OPENSSL_ROOT_DIR /usr/local/opt/openssl)
@@ -153,35 +158,14 @@

 		endif()

-		# Pack Python modules to pythonXX.zip or copy to 'share/hyperion/lib/python'
+		# Copy Python modules to 'share/hyperion/lib/python'
 		if (PYTHON_MODULES_DIR)
-			# Since version 3.3.2 CMake has the functionality to generate a zip file built-in.
-			if (NOT CMAKE_VERSION VERSION_LESS "3.3.2")
-
-				file(GLOB PYTHON_MODULE_FILES RELATIVE "${PYTHON_MODULES_DIR}" "${PYTHON_MODULES_DIR}/*")
-				set(PYTHON_ZIP "python${PYTHON_VERSION_MAJOR_MINOR}.zip")
-
-				execute_process(
-					COMMAND "${CMAKE_COMMAND}" "-E" "tar" "cf" "${CMAKE_BINARY_DIR}/${PYTHON_ZIP}" "--format=zip" ${PYTHON_MODULE_FILES}
-					WORKING_DIRECTORY "${PYTHON_MODULES_DIR}"
-					OUTPUT_QUIET
-				)
-
-				install(
-					FILES "${CMAKE_BINARY_DIR}/${PYTHON_ZIP}"
-					DESTINATION "share/hyperion/bin"
-					COMPONENT "Hyperion"
-				)
-
-			else()
-
-				install(
-					DIRECTORY ${PYTHON_MODULES_DIR}/
-					DESTINATION "share/hyperion/lib/python"
-					COMPONENT "Hyperion"
-				)
-
-			endif()
+
+			install(
+				DIRECTORY ${PYTHON_MODULES_DIR}/
+				DESTINATION "share/hyperion/lib/python"
+				COMPONENT "Hyperion"
+			)

 		endif(PYTHON_MODULES_DIR)


added pcl dependency

added pcl dependency

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -16,6 +16,11 @@
 include_directories(SYSTEM ${FLANN_INCLUDE_DIRS})
 list(APPEND path_planning_LIBRARIES ${FLANN_LIBRARIES})

+# Find PCL.
+find_package( PCL 1.3 REQUIRED COMPONENTS common )
+include_directories(SYSTEM ${PCL_INCLUDE_DIRS})
+list(APPEND path_planning_LIBRARIES ${PCL_LIBRARIES})
+
 # Find OpenCV.
 find_package( OpenCV REQUIRED )
 include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS})


removing unused file

removing unused file


Core: inviwo/inviwo-dev#1362 Switched order of auto-generated module files to make sure it has been run before ivw_create_module

--- cmake/globalmacros.cmake
+++ cmake/globalmacros.cmake
@@ -397,7 +397,10 @@
             endforeach()
         endif()
     endforeach()
-
+
+    # Generate module registration file
+    ivw_private_generate_module_registration_file(sorted_modules)
+
     # Add enabled modules in sorted order
     set(ivw_module_classes "")
     set(ivw_module_names "")
@@ -424,8 +427,7 @@
     # Save list of modules
     set(ivw_all_registered_modules ${ivw_module_names} CACHE INTERNAL "All registered inviwo modules")

-    # Generate module registration file
-    ivw_private_generate_module_registration_file(sorted_modules)
+

     # Save information for python tools.
     ivw_private_create_pyconfig("${IVW_MODULE_DIR};${IVW_EXTERNAL_MODULES}" "${ivw_module_classes}")


Improve code readability while setting link dependencies

Co-authored-by: Hish15 <1640eac1dca1920a07a819535f090a1e3909eec0@gmail.com>

--- cmake/stm32/common.cmake
+++ cmake/stm32/common.cmake
@@ -229,11 +229,12 @@
     endif()

     get_target_property(LINK_DEPENDS ${TARGET} ${INTERFACE_PREFIX}LINK_DEPENDS)
-    if(LINK_DEPENDS STREQUAL "LINK_DEPENDS-NOTFOUND")
+    if(LINK_DEPENDS)
+        list(APPEND LINK_DEPENDS "${SCRIPT}")
+    else()
         set(LINK_DEPENDS "${SCRIPT}")
-    else()
-        list(APPEND LINK_DEPENDS "${SCRIPT}")
-    endif()
+    endif()
+

     set_target_properties(${TARGET} PROPERTIES ${INTERFACE_PREFIX}LINK_DEPENDS "${LINK_DEPENDS}")
 endfunction()
@@ -273,4 +274,3 @@
 include(stm32/l4)
 include(stm32/l5)

-


Add getopt support to CMake summary

Add getopt support to CMake summary

--- cmake_admin/report.cmake
+++ cmake_admin/report.cmake
@@ -170,6 +170,12 @@
 else ( SYSTEMD_SUPPORT )
   set ( MISC_REPORT "${MISC_REPORT}  systemd:               no\n" )
 endif ( SYSTEMD_SUPPORT )
+
+if ( HAVE_GETOPT_H )
+  set ( MISC_REPORT "${MISC_REPORT}  getopt:                yes\n" )
+else ( HAVE_GETOPT_H )
+  set ( MISC_REPORT "${MISC_REPORT}  getopt:                no\n" )
+endif ( HAVE_GETOPT_H )

 set ( DEVEL_REPORT "\nDeveloper nerds info:\n" )


Need the include path to regression test.

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -115,9 +115,7 @@
 #
 # add include path for general testing header file
 #
-IF (BUILD_TESTING)
-  INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Common/Testing/Cxx)
-ENDIF (BUILD_TESTING)
+INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Common/Testing/Cxx)

 IF(CMAKE_COMPILER_IS_GNUCXX)
   IF(WIN32)


*** empty log message ***

*** empty log message ***

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -154,6 +154,3 @@
   ENDIF (JAVA_AWT_INCLUDE_PATH)
 ENDIF (VTK_WRAP_JAVA)

-IF(COMMAND VTK_MAKE_INSTANTIATOR)
-  SET(VTK_MAKE_INSTANTIATOR 1)
-ENDIF(COMMAND VTK_MAKE_INSTANTIATOR)


Enhanced FindUrho3D.cmake module to find library with debug postfix on windows platform. It should work for all build configurations.

--- Source/CMake/Modules/FindUrho3D.cmake
+++ Source/CMake/Modules/FindUrho3D.cmake
@@ -30,10 +30,6 @@
 #

 set (URHO3D_FOUND 0)
-
-if (WIN32)
-    set (CMAKE_DEBUG_POSTFIX _d)
-endif ()

 set (URHO3D_HOME $ENV{URHO3D_HOME})
 if (URHO3D_HOME)
@@ -70,14 +66,22 @@
             set (URHO3D_INCLUDE_DIR ${URHO3D_INCLUDE_DIR} ${URHO3D_HOME}/Build/Engine)
             set (URHO3D_LIB_SEARCH_PATH ${URHO3D_HOME}/Lib)
         endif ()
-        find_library (URHO3D_LIBRARIES Urho3D${CMAKE_DEBUG_POSTFIX} ${URHO3D_LIB_SEARCH_PATH} NO_DEFAULT_PATH)
+        if (WIN32)
+            find_library (URHO3D_LIBRARIES NAMES Urho3D Urho3D_d ${URHO3D_LIB_SEARCH_PATH} NO_DEFAULT_PATH)
+        else ()
+            find_library (URHO3D_LIBRARIES Urho3D ${URHO3D_LIB_SEARCH_PATH} NO_DEFAULT_PATH)
+        endif ()
     endif ()
 else ()
     set (URHO3D_INC_SEARCH_PATH /opt/include)
     find_path (URHO3D_INCLUDE_DIR Engine.h PATH_SUFFIXES Urho3D ${URHO3D_INC_SEARCH_PATH})

     set (URHO3D_LIB_SEARCH_PATH /opt/lib)
-    find_library (URHO3D_LIBRARIES Urho3D${CMAKE_DEBUG_POSTFIX} PATH_SUFFIXES Urho3D ${URHO3D_LIB_SEARCH_PATH})
+    if (WIN32)
+        find_library (URHO3D_LIBRARIES NAMES Urho3D Urho3D_d PATH_SUFFIXES Urho3D ${URHO3D_LIB_SEARCH_PATH})
+    else ()
+        find_library (URHO3D_LIBRARIES Urho3D PATH_SUFFIXES Urho3D ${URHO3D_LIB_SEARCH_PATH})
+    endif ()
 endif ()

 if (URHO3D_INCLUDE_DIR AND URHO3D_LIBRARIES)


SuperBuild: ossim: cmake generator is handled by SB_CMAKE_COMMAND

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -32,7 +32,6 @@

   if(MSVC)
     set(OSSIM_CXX_FLAGS /EHsc)
-    list(APPEND OSSIM_SB_CONFIG "-GNMake\ Makefiles")
   endif()

   # archive version


Correction to commit e7ab4f6

Correction to commit e7ab4f6

--- common/build_gtest.cmake
+++ common/build_gtest.cmake
@@ -37,7 +37,7 @@
     SVN_REPOSITORY http://googletest.googlecode.com/svn/trunk/
     SVN_REVISION -r 660
     TIMEOUT 10
-    PATCH_COMMAND "${Subversion_SVN_EXECUTABLE}" patch "${CMAKE_BINARY_DIR}/gtest.patch" "${CMAKE_BINARY_DIR}/third_party/src/googletest" patch "${CMAKE_BINARY_DIR}/gtest.patch" "${CMAKE_BINARY_DIR}/third_party/src/googletest"
+    PATCH_COMMAND "${Subversion_SVN_EXECUTABLE}" patch "${CMAKE_BINARY_DIR}/gtest.patch" "${CMAKE_BINARY_DIR}/third_party/src/googletest"
     # Force separate output paths for debug and release builds to allow easy
     # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands
     CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}


do not add file-dependency on target's generated files

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -2041,14 +2041,6 @@
 	# depend on target source files marked with custom COTIRE_DEPENDENCY property
 	get_target_property(_targetSourceFiles ${_target} SOURCES)
 	cotire_get_objects_with_property_on(_dependencySources COTIRE_DEPENDENCY SOURCE ${_targetSourceFiles})
-	if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
-		# GCC and clang raise a fatal error if a file is not found during preprocessing
-		# thus we depend on target's generated source files for prefix header generation
-		cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles})
-		if (_generatedSources)
-			list (APPEND _dependencySources ${_generatedSources})
-		endif()
-	endif()
 	if (COTIRE_DEBUG AND _dependencySources)
 		message (STATUS "${_language} ${_target} prefix header dependencies: ${_dependencySources}")
 	endif()
@@ -2405,6 +2397,22 @@
 		set (_comment "Generating ${_language} prefix source ${_prefixFileRelPath}")
 	else()
 		set (_comment "Generating ${_language} prefix header ${_prefixFileRelPath}")
+	endif()
+	# prevent pre-processing errors upon generating the prefix header when a target's generated include file does not yet exist
+	# we do not add a file-level dependency for the target's generated files though, because we only want to depend on their existence
+	# thus we make the prefix header generation depend on a custom helper target which triggers the generation of the files
+	set (_preTargetName "${_target}${COTIRE_PCH_TARGET_SUFFIX}_pre")
+	if (TARGET ${_preTargetName})
+		# custom helper target has already been generated while processing a different language
+		list (APPEND _dependencySources ${_preTargetName})
+	else()
+		get_target_property(_targetSourceFiles ${_target} SOURCES)
+		cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles})
+		if (_generatedSources)
+			add_custom_target("${_preTargetName}" DEPENDS ${_generatedSources})
+			cotire_init_target("${_preTargetName}")
+			list (APPEND _dependencySources ${_preTargetName})
+		endif()
 	endif()
 	add_custom_command(
 		OUTPUT "${_prefixFile}" "${_prefixFile}.log"


Use symlinks instead of hard links for The Tool and friends. #2140

--- build/cmake/macros/CloneInstall.cmake
+++ build/cmake/macros/CloneInstall.cmake
@@ -29,12 +29,10 @@

 	foreach ( new_target ${_NEWNAMES} )

-        if (WINDOWS OR ${LN} STREQUAL "LN-NOTFOUND")
+        if (WINDOWS)
             install (CODE "FILE(INSTALL \"${${_ORIG_TARGET}_loc}\" DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}\" USE_SOURCE_PERMISSIONS RENAME \"${new_target}${WIN_EXE_EXT}\")")
         else()
-            #install (CODE "execute_process(COMMAND cd \${CMAKE_INSTALL_PREFIX} && ${LN} -v -f ${_ORIG_INSTALL}/${_ORIG_TARGET} ${_INSTALL_LOC}/${new_target})")
-            # because it's a hardlink absolute paths should not matter.
-	    install (CODE "execute_process(COMMAND ${LN} -v -f \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_ORIG_INSTALL}/${_ORIG_TARGET} \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}/${new_target})")
+	    install (CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${_ORIG_TARGET} \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}/${new_target})")
         endif()

 	endforeach(new_target)


BUG: Fixed older XCode linking error

BUG: Fixed older XCode linking error

Added an excluding condition (Clang <= 3.2) of USE_COMPILER_HIDDEN_VISIBILITY

Change-Id: I6b0fc1fdcf52f4a67f9f2105f416d473c12a6478

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -9,9 +9,10 @@
 include(${_ITKModuleMacros_DIR}/CppcheckTargets.cmake)
 include(${_ITKModuleMacros_DIR}/ITKModuleCPPCheckTest.cmake)

-# With Apple's GGC <=4.2 and LLVM-GCC <=4.2 visibility of template
-# don't work. Set the option to off and hide it.
-if(APPLE AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "4.3")
+# With Apple's (GGC <=4.2 and LLVM-GCC <=4.2) or (Clang < 3.2)
+# visibility of template  don't work. Set the option to off and hide it.
+if(APPLE AND ((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "4.3")
+   OR ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "3.2")))
   set( USE_COMPILER_HIDDEN_VISIBILITY OFF CACHE INTERNAL "" )
 endif()
 include(GenerateExportHeader)


COMP: Refine order of searching for header files

SYSTEM_INCLUDE_DIRS should be searched after local INCLUDE_DIRS
so that local changes take precedence over installed versions.

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -181,7 +181,8 @@
     include_directories(${${itk-module}_INCLUDE_DIRS})
   endif()
   if(${itk-module}_SYSTEM_INCLUDE_DIRS)
-    include_directories(${${itk-module}_SYSTEM_INCLUDE_DIRS})
+    # _SYSTEM_INCLUDE_DIRS should searched after internal _INCLUDE_DIRS
+    include_directories(AFTER ${${itk-module}_SYSTEM_INCLUDE_DIRS})
   endif()

   if(${itk-module}_SYSTEM_LIBRARY_DIRS)


Remove cache path from NVVM path

Remove cache path from NVVM path

--- CMakeModules/FindNVVM.cmake
+++ CMakeModules/FindNVVM.cmake
@@ -4,23 +4,29 @@

 # libNVVM
 if(NOT DEFINED ENV{LIBNVVM_HOME})
-  set(LIBNVVM_HOME "${CUDA_TOOLKIT_ROOT_DIR}/nvvm" CACHE PATH "Path to NVVM.")
+  set(LIBNVVM_HOME "${CUDA_TOOLKIT_ROOT_DIR}/nvvm")
 else()
-  set(LIBNVVM_HOME "$ENV{LIBNVVM_HOME}" CACHE PATH "Path to NVVM.")
+  set(LIBNVVM_HOME "$ENV{LIBNVVM_HOME}")
 endif()
 message(STATUS "Using LIBNVVM_HOME: ${LIBNVVM_HOME}")
+
+IF(${CUDA_VERSION_MAJOR} LESS 7)
+	SET(NVVM_DLL_VERSION 20_0)
+ELSE(${CUDA_VERSION_MAJOR} LESS 7)
+	SET(NVVM_DLL_VERSION 30_0)
+ENDIF(${CUDA_VERSION_MAJOR} LESS 7)

 if (CMAKE_SIZEOF_VOID_P STREQUAL "8")
   if (WIN32)
     set (CUDA_LIB_SEARCH_PATH "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64")
-    set (NVVM_DLL_NAME nvvm64_20_0.dll)
+    set (NVVM_DLL_NAME nvvm64_${NVVM_DLL_VERSION}.dll)
   else ()
     set (CUDA_LIB_SEARCH_PATH "")
   endif()
 else()
   if (WIN32)
     set (CUDA_LIB_SEARCH_PATH "${CUDA_TOOLKIT_ROOT_DIR}/lib/Win32")
-    set (NVVM_DLL_NAME nvvm32_20_0.dll)
+    set (NVVM_DLL_NAME nvvm32_${NVVM_DLL_VERSION}.dll)
   else()
     set (CUDA_LIB_SEARCH_PATH "")
   endif()


Fixed debug mode link problem with way qwt was built for debug (mismatch between .lib and .dll file).

--- src/EWS/BuildScripts/InstallSupportLibraries.cmake
+++ src/EWS/BuildScripts/InstallSupportLibraries.cmake
@@ -81,6 +81,7 @@

         install(FILES ${Qwt5_DLL_DIR}/qwt5d.dll
             DESTINATION bin
+            RENAME qwt5.dll
             CONFIGURATIONS Debug RelWithDebInfo
             COMPONENT Runtime
         )


Fix typo

Fix typo

--- cmake-d/CMakeDetermineDCompiler.cmake
+++ cmake-d/CMakeDetermineDCompiler.cmake
@@ -126,8 +126,8 @@
     file(READ ${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake CMAKE_DETERMINE_COMPILER_ID_CMAKE_CONTENT)
     STRING(REPLACE "file(READ \${CMAKE_ROOT}/Modules/\${src}.in ID_CONTENT_IN)"
       "find_file(src_in \${src}.in PATHS \${CMAKE_ROOT}/Modules \${CMAKE_MODULE_PATH} NO_DEFAULT_PATH)
-  file(READ \${src_in} ID_CONTENT_IN)
-  unset(src_in CACHE)"
+    file(READ \${src_in} ID_CONTENT_IN)
+    unset(src_in CACHE)"
     CMAKE_DETERMINE_COMPILER_ID_CMAKE_CONTENT_PATCHED ${CMAKE_DETERMINE_COMPILER_ID_CMAKE_CONTENT})
     file(WRITE ${CMAKE_PLATFORM_INFO_DIR}/CMakeDetermineCompilerId.cmake
       ${CMAKE_DETERMINE_COMPILER_ID_CMAKE_CONTENT_PATCHED})


Fixed pre-compiled header command line options, especially on Linux

--- cmake/modules/PrecompiledHeader.cmake
+++ cmake/modules/PrecompiledHeader.cmake
@@ -68,11 +68,37 @@
   set(_compile_definitions "$<TARGET_PROPERTY:${_target},COMPILE_DEFINITIONS>")
   set(_compile_flags "$<TARGET_PROPERTY:${_target},COMPILE_FLAGS>")
   set(_compile_options "$<TARGET_PROPERTY:${_target},COMPILE_OPTIONS>")
+
+  #handle config-specific cxx flags
+  string(TOUPPER ${CMAKE_BUILD_TYPE} _config)
+  set(_build_cxx_flags ${CMAKE_CXX_FLAGS_${_config}})
+
+  #handle fpie option
+  get_target_property(_fpie ${_target} POSITION_INDEPENDENT_CODE)
+  if (_fpie AND CMAKE_POSITION_INDEPENDENT_CODE)
+    list(APPEND _compile_options ${CMAKE_CXX_COMPILE_OPTIONS_PIC})
+  endif()
+
+  #handle compiler standard (GCC only)
+  if(CMAKE_COMPILER_IS_GNUCXX)
+    get_target_property(_cxx_standard ${_target} CXX_STANDARD)
+    if ((NOT "${_cxx_standard}" STREQUAL NOTFOUND) AND (NOT "${_cxx_standard}" STREQUAL ""))
+      get_target_property(_cxx_extensions ${_target} CXX_EXTENSIONS)
+      get_property(_exists TARGET ${_target} PROPERTY CXX_EXTENSIONS SET)
+      if (NOT _exists OR ${_cxx_extensions})
+        list(APPEND _compile_options "-std=gnu++${_cxx_standard}")
+      else()
+        list(APPEND _compile_options "-std=c++${_cxx_standard}")
+      endif()
+    endif()
+  endif()
+
   set(_include_directories "$<$<BOOL:${_include_directories}>:-I$<JOIN:${_include_directories},\n-I>\n>")
   set(_compile_definitions "$<$<BOOL:${_compile_definitions}>:-D$<JOIN:${_compile_definitions},\n-D>\n>")
   set(_compile_flags "$<$<BOOL:${_compile_flags}>:$<JOIN:${_compile_flags},\n>\n>")
   set(_compile_options "$<$<BOOL:${_compile_options}>:$<JOIN:${_compile_options},\n>\n>")
-  file(GENERATE OUTPUT "${_filename}" CONTENT "${_compile_definitions}${_include_directories}${_compile_flags}${_compile_options}\n")
+  set(_cxx_flags "$<$<BOOL:${CMAKE_CXX_FLAGS}>:${CMAKE_CXX_FLAGS}\n>$<$<BOOL:${_build_cxx_flags}>:${_build_cxx_flags}\n>")
+  file(GENERATE OUTPUT "${_filename}" CONTENT "${_compile_definitions}${_include_directories}${_compile_flags}${_compile_options}${_cxx_flags}\n")
 endfunction()

 function(add_precompiled_header _target _input)


Fix [partically] cherry picked from e4f4d6d5

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -552,7 +552,7 @@
   execute_process(COMMAND ${CMAKE_SOURCE_DIR}/build/unix/compiledata.sh include/compiledata.h "${CXX}" ""
        "${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}"
         "${CMAKE_CXX_FLAGS}" "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}" "${CMAKE_EXE_FLAGS}" "${LibSuffix}" "${SYSLIBS}"
-        "${libdir}" "-lCore" "-Rint" "${incdir}" "" "" "${ROOT_ARCHITECTURE}" "" "${explicitlink}" )
+        "${libdir}" "-lCore" "-lRint" "${incdir}" "" "" "${ROOT_ARCHITECTURE}" "" "${explicitlink}" )
 endif()

 configure_file(${CMAKE_SOURCE_DIR}/config/root-config.in ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/root-config @ONLY)


fix MSVC compilation by adding /bigobj

fix MSVC compilation by adding /bigobj

this fixes "fatal error C1128: number of sections exceeded object file format limit"

--- cmake/setup_compiler_flags_msvc.cmake
+++ cmake/setup_compiler_flags_msvc.cmake
@@ -35,6 +35,10 @@
 ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/NOMINMAX")
 LIST(APPEND DEAL_II_DEFINITIONS "NOMINMAX")
 LIST(APPEND DEAL_II_USER_DEFINITIONS "NOMINMAX")
+
+# fix "fatal error C1128: number of sections exceeded object file format limit"
+# happening in debug mode with visual studio 2015
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/bigobj")

 ADD_FLAGS(DEAL_II_CXX_FLAGS "/W3")


RPM package: set selinux permissions on the log directory systematically

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -48,20 +48,6 @@
 fi

 %endif # %if %{debian_platform}
-
-
-
-# Macro to set SELinux permission on log directory
-# It is needed in order logrotate be able to manipulate
-# Flexisip's logs
-%if %centos_platform
-
-%global selinux_logdir_permissions \
-if [ $1 -eq 1 ]; then \
-	/usr/bin/chcon -t chcon -t var_log_t %{flexisip_logdir} || true \
-fi
-
-%endif

@@ -208,7 +194,7 @@
 %if %centos_platform
 %post
 %systemd_post %flexisip_services
-%selinux_logdir_permissions
+/usr/bin/chcon -t chcon -t var_log_t %{flexisip_logdir} || true
 %endif

 %preun


SuperBuild: add an uninstall  option for Qt4. otherwise it pickup files from previous installation

--- SuperBuild/CMake/External_qt4.cmake
+++ SuperBuild/CMake/External_qt4.cmake
@@ -55,6 +55,36 @@

 endif()

+
+#Remove left over or previous installation from install prefix.
+#Existing files in install prefix was disturbing a second installation.
+#even afer the QT4 directory is removed from build
+
+add_custom_target(QT4-uninstall
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/include/QtCore"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/include/QtDBus"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/include/QtGui"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/include/QtNetwork"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/include/QtOpenGL"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/include/QtSql"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/include/QtSvg"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/include/QtTest"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/include/QtXml"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/mkspecs"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/plugins"
+  COMMAND ${CMAKE_COMMAND} -E remove_directory "${SB_INSTALL_PREFIX}/translations"
+  COMMAND ${CMAKE_COMMAND} -E remove -f "${SB_INSTALL_PREFIX}/lib/libQt*"
+  COMMAND ${CMAKE_COMMAND} -E remove -f "${SB_INSTALL_PREFIX}/bin/qmake"
+  COMMAND ${CMAKE_COMMAND} -E remove -f "${SB_INSTALL_PREFIX}/bin/lrelease"
+  COMMAND ${CMAKE_COMMAND} -E remove -f "${SB_INSTALL_PREFIX}/bin/moc"
+  COMMAND ${CMAKE_COMMAND} -E remove -f "${SB_INSTALL_PREFIX}/bin/rcc"
+  COMMAND ${CMAKE_COMMAND} -E remove -f "${SB_INSTALL_PREFIX}/bin/uic"
+  WORKING_DIRECTORY "${SB_INSTALL_PREFIX}"
+  )
+
+#adding it to dependencies will remove the files when configure QWT
+#list(APPEND QT4_DEPENDENCIES QT4-uninstall)
+
   ExternalProject_Add(QT4
     PREFIX QT4
     URL "http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz"
@@ -68,28 +98,18 @@

  if(MSVC)
- #Q: why this copy here?.
- #RK: Because QT4 sucks with qmake -query.
-  ExternalProject_Add_Step(QT4 copy_specs
-    COMMAND
-    ${CMAKE_COMMAND} -E copy_directory
-    ${QT4_SB_SRC}/mkspecs ${SB_INSTALL_PREFIX}/mkspecs
-    DEPENDEES patch update
-    DEPENDERS configure )
-
-  ExternalProject_Add_Step(QT4 _jpeg_lib_name
-    COMMAND
-    ${CMAKE_COMMAND} -E copy
-    ${CMAKE_SOURCE_DIR}/patches/QT4/qjpeghandler.pri
-    ${QT4_SB_SRC}/src/gui/image/
-    DEPENDEES patch update
-    DEPENDERS configure )
-
+   #Q: why this copy here?.
+   #RK: Because QT4 sucks with qmake -query.
+   ExternalProject_Add_Step(QT4 patches
+     COMMAND ${CMAKE_COMMAND} -E copy_directory
+     ${QT4_SB_SRC}/mkspecs ${SB_INSTALL_PREFIX}/mkspecs
+     COMMAND ${CMAKE_COMMAND} -E copy
+     ${CMAKE_SOURCE_DIR}/patches/QT4/qjpeghandler.pri
+     ${QT4_SB_SRC}/src/gui/image/
+     DEPENDEES patch update
+     DEPENDERS configure )
 endif()

-
-
-  SUPERBUILD_PATCH_SOURCE(QT4)
-
+SUPERBUILD_PATCH_SOURCE(QT4)

 set(_SB_QT_QMAKE_EXECUTABLE ${SB_INSTALL_PREFIX}/bin/qmake)


modules: Update FindMagnum.cmake

modules: Update FindMagnum.cmake

Signed-off-by: Squareys <b4e1335d2c774058f7a95112f52894dcc752fd3f@googlemail.com>

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -67,6 +67,8 @@
 #  TextureTools                 - TextureTools library
 #  Trade                        - Trade library
 #  Vk                           - Vk library
+#  AndroidApplication           - Android application
+#  EmscriptenApplication        - Emscripten application
 #  GlfwApplication              - GLFW application
 #  GlxApplication               - GLX application
 #  Sdl2Application              - SDL2 application
@@ -338,10 +340,10 @@
 set(_MAGNUM_LIBRARY_COMPONENT_LIST
     Audio DebugTools GL MeshTools Primitives SceneGraph Shaders Text
     TextureTools Trade Vk
-    AndroidApplication GlfwApplication GlxApplication Sdl2Application
-    XEglApplication WindowlessCglApplication WindowlessEglApplication
-    WindowlessGlxApplication WindowlessIosApplication WindowlessWglApplication
-    WindowlessWindowsEglApplication
+    AndroidApplication EmscriptenApplication GlfwApplication GlxApplication
+    Sdl2Application XEglApplication WindowlessCglApplication
+    WindowlessEglApplication WindowlessGlxApplication WindowlessIosApplication
+    WindowlessWglApplication WindowlessWindowsEglApplication
     CglContext EglContext GlxContext WglContext
     OpenGLTester)
 set(_MAGNUM_PLUGIN_COMPONENT_LIST
@@ -410,6 +412,10 @@

 set(_MAGNUM_Trade_DEPENDENCIES )
 set(_MAGNUM_AndroidApplication_DEPENDENCIES GL)
+set(_MAGNUM_EmscriptenApplication_DEPENDENCIES)
+if(MAGNUM_TARGET_GL)
+    list(APPEND _MAGNUM_EmscriptenApplication_DEPENDENCIES GL)
+endif()

 set(_MAGNUM_GlfwApplication_DEPENDENCIES )
 if(MAGNUM_TARGET_GL)


some minor changes

some minor changes

--- cmake/FindPythonLibsNew.cmake
+++ cmake/FindPythonLibsNew.cmake
@@ -66,7 +66,7 @@
 # According to http://stackoverflow.com/questions/646518/python-how-to-detect-debug-interpreter
 # 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"
+execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-vc"
     "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
@@ -75,6 +75,7 @@

 if(NOT _PYTHON_SUCCESS MATCHES 0)
     if(PythonLibsNew_FIND_REQUIRED)
+        message("-- PYTHON EXECUTABLE: ${PYTHON_EXECUTABLE}")
         message(FATAL_ERROR
             "Python config failure:\n${_PYTHON_ERROR_VALUE}")
     endif()


build: FindStdFilesystem.cmake: use Seastar_CXX_DIALECT

The filesystem header file includes its subordinate include files
only for its supported dialects.

For example, /usr/include/c++/8/filesystem uses:

Signed-off-by: Benny Halevy <23c997c90eb8537635e9392d48e7af1bf1b2ca22@scylladb.com>

--- cmake/FindStdFilesystem.cmake
+++ cmake/FindStdFilesystem.cmake
@@ -26,7 +26,7 @@
 macro (_stdfilesystem_check_compiles var)
   set (libraries ${ARGN})
   set (CMAKE_REQUIRED_LIBRARIES ${libraries})
-  set (CMAKE_REQUIRED_FLAGS -std=gnu++14)
+  set (CMAKE_REQUIRED_FLAGS -std=${Seastar_CXX_DIALECT})
   check_cxx_source_compiles ("${_stdfilesystem_test_code}" ${var})
 endmacro ()


Update FindBoost.Cmake module to support up to boost 1.70.0 (#1676)

* Remove hardcoded FindBoost.cmake and instead rely on local default

* Revert "Remove hardcoded FindBoost.cmake and instead rely on local default"

This reverts commit 08c576a43f693dea18826a9abc715e878eed57bc.
Also updated FindBoost.Cmake from https://github.com/Kitware/CMake/commit/266808c4130a0b40aed236381707462a9368a1eb to handle up to Boost 1.77.0 for ubuntu 16.04 cmake 3.5 compatibility

--- cmake/Modules/FindBoost.cmake
+++ cmake/Modules/FindBoost.cmake
@@ -1,237 +1,242 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.

-#.rst:
-# FindBoost
-# ---------
-#
-# Find Boost include dirs and libraries
-#
-# Use this module by invoking find_package with the form::
-#
-#   find_package(Boost
-#     [version] [EXACT]      # Minimum or EXACT version e.g. 1.67.0
-#     [REQUIRED]             # Fail with error if Boost is not found
-#     [COMPONENTS <libs>...] # Boost libraries by their canonical name
-#                            # e.g. "date_time" for "libboost_date_time"
-#     [OPTIONAL_COMPONENTS <libs>...]
-#                            # Optional Boost libraries by their canonical name)
-#     )                      # e.g. "date_time" for "libboost_date_time"
-#
-# This module finds headers and requested component libraries OR a CMake
-# package configuration file provided by a "Boost CMake" build.  For the
-# latter case skip to the "Boost CMake" section below.  For the former
-# case results are reported in variables::
-#
-#   Boost_FOUND            - True if headers and requested libraries were found
-#   Boost_INCLUDE_DIRS     - Boost include directories
-#   Boost_LIBRARY_DIRS     - Link directories for Boost libraries
-#   Boost_LIBRARIES        - Boost component libraries to be linked
-#   Boost_<C>_FOUND        - True if component <C> was found (<C> is upper-case)
-#   Boost_<C>_LIBRARY      - Libraries to link for component <C> (may include
-#                            target_link_libraries debug/optimized keywords)
-#   Boost_VERSION          - BOOST_VERSION value from boost/version.hpp
-#   Boost_LIB_VERSION      - Version string appended to library filenames
-#   Boost_MAJOR_VERSION    - Boost major version number (X in X.y.z)
-#   Boost_MINOR_VERSION    - Boost minor version number (Y in x.Y.z)
-#   Boost_SUBMINOR_VERSION - Boost subminor version number (Z in x.y.Z)
-#   Boost_LIB_DIAGNOSTIC_DEFINITIONS (Windows)
-#                          - Pass to add_definitions() to have diagnostic
-#                            information about Boost's automatic linking
-#                            displayed during compilation
-#
-# Note that Boost Python components require a Python version suffix
-# (Boost 1.67 and later), e.g. ``python36`` or ``python27`` for the
-# versions built against Python 3.6 and 2.7, respectively.  This also
-# applies to additional components using Python including
-# ``mpi_python`` and ``numpy``.  Earlier Boost releases may use
-# distribution-specific suffixes such as ``2``, ``3`` or ``2.7``.
-# These may also be used as suffixes, but note that they are not
-# portable.
-#
-# This module reads hints about search locations from variables::
-#
-#   BOOST_ROOT             - Preferred installation prefix
-#    (or BOOSTROOT)
-#   BOOST_INCLUDEDIR       - Preferred include directory e.g. <prefix>/include
-#   BOOST_LIBRARYDIR       - Preferred library directory e.g. <prefix>/lib
-#   Boost_NO_SYSTEM_PATHS  - Set to ON to disable searching in locations not
-#                            specified by these hint variables. Default is OFF.
-#   Boost_ADDITIONAL_VERSIONS
-#                          - List of Boost versions not known to this module
-#                            (Boost install locations may contain the version)
-#
-# and saves search results persistently in CMake cache entries::
-#
-#   Boost_INCLUDE_DIR         - Directory containing Boost headers
-#   Boost_LIBRARY_DIR_RELEASE - Directory containing release Boost libraries
-#   Boost_LIBRARY_DIR_DEBUG   - Directory containing debug Boost libraries
-#   Boost_<C>_LIBRARY_DEBUG   - Component <C> library debug variant
-#   Boost_<C>_LIBRARY_RELEASE - Component <C> library release variant
-#
-# The following :prop_tgt:`IMPORTED` targets are also defined::
-#
-#   Boost::boost                  - Target for header-only dependencies
-#                                   (Boost include directory)
-#   Boost::<C>                    - Target for specific component dependency
-#                                   (shared or static library); <C> is lower-
-#                                   case
-#   Boost::diagnostic_definitions - interface target to enable diagnostic
-#                                   information about Boost's automatic linking
-#                                   during compilation (adds BOOST_LIB_DIAGNOSTIC)
-#   Boost::disable_autolinking    - interface target to disable automatic
-#                                   linking with MSVC (adds BOOST_ALL_NO_LIB)
-#   Boost::dynamic_linking        - interface target to enable dynamic linking
-#                                   linking with MSVC (adds BOOST_ALL_DYN_LINK)
-#
-# Implicit dependencies such as Boost::filesystem requiring
-# Boost::system will be automatically detected and satisfied, even
-# if system is not specified when using find_package and if
-# Boost::system is not added to target_link_libraries.  If using
-# Boost::thread, then Threads::Threads will also be added automatically.
-#
-# It is important to note that the imported targets behave differently
-# than variables created by this module: multiple calls to
-# find_package(Boost) in the same directory or sub-directories with
-# different options (e.g. static or shared) will not override the
-# values of the targets created by the first call.
-#
-# Users may set these hints or results as cache entries.  Projects
-# should not read these entries directly but instead use the above
-# result variables.  Note that some hint names start in upper-case
-# "BOOST".  One may specify these as environment variables if they are
-# not specified as CMake variables or cache entries.
-#
-# This module first searches for the Boost header files using the above
-# hint variables (excluding BOOST_LIBRARYDIR) and saves the result in
-# Boost_INCLUDE_DIR.  Then it searches for requested component libraries
-# using the above hints (excluding BOOST_INCLUDEDIR and
-# Boost_ADDITIONAL_VERSIONS), "lib" directories near Boost_INCLUDE_DIR,
-# and the library name configuration settings below.  It saves the
-# library directories in Boost_LIBRARY_DIR_DEBUG and
-# Boost_LIBRARY_DIR_RELEASE and individual library
-# locations in Boost_<C>_LIBRARY_DEBUG and Boost_<C>_LIBRARY_RELEASE.
-# When one changes settings used by previous searches in the same build
-# tree (excluding environment variables) this module discards previous
-# search results affected by the changes and searches again.
-#
-# Boost libraries come in many variants encoded in their file name.
-# Users or projects may tell this module which variant to find by
-# setting variables::
-#
-#   Boost_USE_DEBUG_LIBS     - Set to ON or OFF to specify whether to search
-#                              and use the debug libraries.  Default is ON.
-#   Boost_USE_RELEASE_LIBS   - Set to ON or OFF to specify whether to search
-#                              and use the release libraries.  Default is ON.
-#   Boost_USE_MULTITHREADED  - Set to OFF to use the non-multithreaded
-#                              libraries ('mt' tag).  Default is ON.
-#   Boost_USE_STATIC_LIBS    - Set to ON to force the use of the static
-#                              libraries.  Default is OFF.
-#   Boost_USE_STATIC_RUNTIME - Set to ON or OFF to specify whether to use
-#                              libraries linked statically to the C++ runtime
-#                              ('s' tag).  Default is platform dependent.
-#   Boost_USE_DEBUG_RUNTIME  - Set to ON or OFF to specify whether to use
-#                              libraries linked to the MS debug C++ runtime
-#                              ('g' tag).  Default is ON.
-#   Boost_USE_DEBUG_PYTHON   - Set to ON to use libraries compiled with a
-#                              debug Python build ('y' tag). Default is OFF.
-#   Boost_USE_STLPORT        - Set to ON to use libraries compiled with
-#                              STLPort ('p' tag).  Default is OFF.
-#   Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
-#                            - Set to ON to use libraries compiled with
-#                              STLPort deprecated "native iostreams"
-#                              ('n' tag).  Default is OFF.
-#   Boost_COMPILER           - Set to the compiler-specific library suffix
-#                              (e.g. "-gcc43").  Default is auto-computed
-#                              for the C++ compiler in use.  A list may be
-#                              used if multiple compatible suffixes should
-#                              be tested for, in decreasing order of
-#                              preference.
-#   Boost_THREADAPI          - Suffix for "thread" component library name,
-#                              such as "pthread" or "win32".  Names with
-#                              and without this suffix will both be tried.
-#   Boost_NAMESPACE          - Alternate namespace used to build boost with
-#                              e.g. if set to "myboost", will search for
-#                              myboost_thread instead of boost_thread.
-#
-# Other variables one may set to control this module are::
-#
-#   Boost_DEBUG              - Set to ON to enable debug output from FindBoost.
-#                              Please enable this before filing any bug report.
-#   Boost_DETAILED_FAILURE_MSG
-#                            - Set to ON to add detailed information to the
-#                              failure message even when the REQUIRED option
-#                              is not given to the find_package call.
-#   Boost_REALPATH           - Set to ON to resolve symlinks for discovered
-#                              libraries to assist with packaging.  For example,
-#                              the "system" component library may be resolved to
-#                              "/usr/lib/libboost_system.so.1.67.0" instead of
-#                              "/usr/lib/libboost_system.so".  This does not
-#                              affect linking and should not be enabled unless
-#                              the user needs this information.
-#   Boost_LIBRARY_DIR        - Default value for Boost_LIBRARY_DIR_RELEASE and
-#                              Boost_LIBRARY_DIR_DEBUG.
-#
-# On Visual Studio and Borland compilers Boost headers request automatic
-# linking to corresponding libraries.  This requires matching libraries
-# to be linked explicitly or available in the link library search path.
-# In this case setting Boost_USE_STATIC_LIBS to OFF may not achieve
-# dynamic linking.  Boost automatic linking typically requests static
-# libraries with a few exceptions (such as Boost.Python).  Use::
-#
-#   add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
-#
-# to ask Boost to report information about automatic linking requests.
-#
-# Example to find Boost headers only::
-#
-#   find_package(Boost 1.36.0)
-#   if(Boost_FOUND)
-#     include_directories(${Boost_INCLUDE_DIRS})
-#     add_executable(foo foo.cc)
-#   endif()
-#
-# Example to find Boost libraries and use imported targets::
-#
-#   find_package(Boost 1.56 REQUIRED COMPONENTS
-#                date_time filesystem iostreams)
-#   add_executable(foo foo.cc)
-#   target_link_libraries(foo Boost::date_time Boost::filesystem
-#                             Boost::iostreams)
-#
-# Example to find Boost Python 3.6 libraries and use imported targets::
-#
-#   find_package(Boost 1.67 REQUIRED COMPONENTS
-#                python36 numpy36)
-#   add_executable(foo foo.cc)
-#   target_link_libraries(foo Boost::python36 Boost::numpy36)
-#
-# Example to find Boost headers and some *static* (release only) libraries::
-#
-#   set(Boost_USE_STATIC_LIBS        ON)  # only find static libs
-#   set(Boost_USE_DEBUG_LIBS         OFF) # ignore debug libs and
-#   set(Boost_USE_RELEASE_LIBS       ON)  # only find release libs
-#   set(Boost_USE_MULTITHREADED      ON)
-#   set(Boost_USE_STATIC_RUNTIME    OFF)
-#   find_package(Boost 1.66.0 COMPONENTS date_time filesystem system ...)
-#   if(Boost_FOUND)
-#     include_directories(${Boost_INCLUDE_DIRS})
-#     add_executable(foo foo.cc)
-#     target_link_libraries(foo ${Boost_LIBRARIES})
-#   endif()
-#
-# Boost CMake
-# ^^^^^^^^^^^
-#
-# If Boost was built using the boost-cmake project it provides a package
-# configuration file for use with find_package's Config mode.  This
-# module looks for the package configuration file called
-# BoostConfig.cmake or boost-config.cmake and stores the result in cache
-# entry "Boost_DIR".  If found, the package configuration file is loaded
-# and this module returns with no further action.  See documentation of
-# the Boost CMake package configuration for details on what it provides.
-#
-# Set Boost_NO_BOOST_CMAKE to ON to disable the search for boost-cmake.
+#[=======================================================================[.rst:
+FindBoost
+---------
+
+Find Boost include dirs and libraries
+
+Use this module by invoking find_package with the form::
+
+  find_package(Boost
+    [version] [EXACT]      # Minimum or EXACT version e.g. 1.67.0
+    [REQUIRED]             # Fail with error if Boost is not found
+    [COMPONENTS <libs>...] # Boost libraries by their canonical name
+                           # e.g. "date_time" for "libboost_date_time"
+    [OPTIONAL_COMPONENTS <libs>...]
+                           # Optional Boost libraries by their canonical name)
+    )                      # e.g. "date_time" for "libboost_date_time"
+
+This module finds headers and requested component libraries OR a CMake
+package configuration file provided by a "Boost CMake" build.  For the
+latter case skip to the "Boost CMake" section below.  For the former
+case results are reported in variables::
+
+  Boost_FOUND            - True if headers and requested libraries were found
+  Boost_INCLUDE_DIRS     - Boost include directories
+  Boost_LIBRARY_DIRS     - Link directories for Boost libraries
+  Boost_LIBRARIES        - Boost component libraries to be linked
+  Boost_<C>_FOUND        - True if component <C> was found (<C> is upper-case)
+  Boost_<C>_LIBRARY      - Libraries to link for component <C> (may include
+                           target_link_libraries debug/optimized keywords)
+  Boost_VERSION          - BOOST_VERSION value from boost/version.hpp
+  Boost_LIB_VERSION      - Version string appended to library filenames
+  Boost_MAJOR_VERSION    - Boost major version number (X in X.y.z)
+  Boost_MINOR_VERSION    - Boost minor version number (Y in x.Y.z)
+  Boost_SUBMINOR_VERSION - Boost subminor version number (Z in x.y.Z)
+  Boost_VERSION_STRING   - Boost version number in x.y.z format
+  Boost_LIB_DIAGNOSTIC_DEFINITIONS (Windows)
+                         - Pass to add_definitions() to have diagnostic
+                           information about Boost's automatic linking
+                           displayed during compilation
+
+Note that Boost Python components require a Python version suffix
+(Boost 1.67 and later), e.g. ``python36`` or ``python27`` for the
+versions built against Python 3.6 and 2.7, respectively.  This also
+applies to additional components using Python including
+``mpi_python`` and ``numpy``.  Earlier Boost releases may use
+distribution-specific suffixes such as ``2``, ``3`` or ``2.7``.
+These may also be used as suffixes, but note that they are not
+portable.
+
+This module reads hints about search locations from variables::
+
+  BOOST_ROOT             - Preferred installation prefix
+   (or BOOSTROOT)
+  BOOST_INCLUDEDIR       - Preferred include directory e.g. <prefix>/include
+  BOOST_LIBRARYDIR       - Preferred library directory e.g. <prefix>/lib
+  Boost_NO_SYSTEM_PATHS  - Set to ON to disable searching in locations not
+                           specified by these hint variables. Default is OFF.
+  Boost_ADDITIONAL_VERSIONS
+                         - List of Boost versions not known to this module
+                           (Boost install locations may contain the version)
+
+and saves search results persistently in CMake cache entries::
+
+  Boost_INCLUDE_DIR         - Directory containing Boost headers
+  Boost_LIBRARY_DIR_RELEASE - Directory containing release Boost libraries
+  Boost_LIBRARY_DIR_DEBUG   - Directory containing debug Boost libraries
+  Boost_<C>_LIBRARY_DEBUG   - Component <C> library debug variant
+  Boost_<C>_LIBRARY_RELEASE - Component <C> library release variant
+
+The following :prop_tgt:`IMPORTED` targets are also defined::
+
+  Boost::boost                  - Target for header-only dependencies
+                                  (Boost include directory)
+  Boost::<C>                    - Target for specific component dependency
+                                  (shared or static library); <C> is lower-
+                                  case
+  Boost::diagnostic_definitions - interface target to enable diagnostic
+                                  information about Boost's automatic linking
+                                  during compilation (adds BOOST_LIB_DIAGNOSTIC)
+  Boost::disable_autolinking    - interface target to disable automatic
+                                  linking with MSVC (adds BOOST_ALL_NO_LIB)
+  Boost::dynamic_linking        - interface target to enable dynamic linking
+                                  linking with MSVC (adds BOOST_ALL_DYN_LINK)
+
+Implicit dependencies such as Boost::filesystem requiring
+Boost::system will be automatically detected and satisfied, even
+if system is not specified when using find_package and if
+Boost::system is not added to target_link_libraries.  If using
+Boost::thread, then Threads::Threads will also be added automatically.
+
+It is important to note that the imported targets behave differently
+than variables created by this module: multiple calls to
+find_package(Boost) in the same directory or sub-directories with
+different options (e.g. static or shared) will not override the
+values of the targets created by the first call.
+
+Users may set these hints or results as cache entries.  Projects
+should not read these entries directly but instead use the above
+result variables.  Note that some hint names start in upper-case
+"BOOST".  One may specify these as environment variables if they are
+not specified as CMake variables or cache entries.
+
+This module first searches for the Boost header files using the above
+hint variables (excluding BOOST_LIBRARYDIR) and saves the result in
+Boost_INCLUDE_DIR.  Then it searches for requested component libraries
+using the above hints (excluding BOOST_INCLUDEDIR and
+Boost_ADDITIONAL_VERSIONS), "lib" directories near Boost_INCLUDE_DIR,
+and the library name configuration settings below.  It saves the
+library directories in Boost_LIBRARY_DIR_DEBUG and
+Boost_LIBRARY_DIR_RELEASE and individual library
+locations in Boost_<C>_LIBRARY_DEBUG and Boost_<C>_LIBRARY_RELEASE.
+When one changes settings used by previous searches in the same build
+tree (excluding environment variables) this module discards previous
+search results affected by the changes and searches again.
+
+Boost libraries come in many variants encoded in their file name.
+Users or projects may tell this module which variant to find by
+setting variables::
+
+  Boost_USE_DEBUG_LIBS     - Set to ON or OFF to specify whether to search
+                             and use the debug libraries.  Default is ON.
+  Boost_USE_RELEASE_LIBS   - Set to ON or OFF to specify whether to search
+                             and use the release libraries.  Default is ON.
+  Boost_USE_MULTITHREADED  - Set to OFF to use the non-multithreaded
+                             libraries ('mt' tag).  Default is ON.
+  Boost_USE_STATIC_LIBS    - Set to ON to force the use of the static
+                             libraries.  Default is OFF.
+  Boost_USE_STATIC_RUNTIME - Set to ON or OFF to specify whether to use
+                             libraries linked statically to the C++ runtime
+                             ('s' tag).  Default is platform dependent.
+  Boost_USE_DEBUG_RUNTIME  - Set to ON or OFF to specify whether to use
+                             libraries linked to the MS debug C++ runtime
+                             ('g' tag).  Default is ON.
+  Boost_USE_DEBUG_PYTHON   - Set to ON to use libraries compiled with a
+                             debug Python build ('y' tag). Default is OFF.
+  Boost_USE_STLPORT        - Set to ON to use libraries compiled with
+                             STLPort ('p' tag).  Default is OFF.
+  Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
+                           - Set to ON to use libraries compiled with
+                             STLPort deprecated "native iostreams"
+                             ('n' tag).  Default is OFF.
+  Boost_COMPILER           - Set to the compiler-specific library suffix
+                             (e.g. "-gcc43").  Default is auto-computed
+                             for the C++ compiler in use.  A list may be
+                             used if multiple compatible suffixes should
+                             be tested for, in decreasing order of
+                             preference.
+  Boost_ARCHITECTURE       - Set to the architecture-specific library suffix
+                             (e.g. "-x64").  Default is auto-computed for the
+                             C++ compiler in use.
+  Boost_THREADAPI          - Suffix for "thread" component library name,
+                             such as "pthread" or "win32".  Names with
+                             and without this suffix will both be tried.
+  Boost_NAMESPACE          - Alternate namespace used to build boost with
+                             e.g. if set to "myboost", will search for
+                             myboost_thread instead of boost_thread.
+
+Other variables one may set to control this module are::
+
+  Boost_DEBUG              - Set to ON to enable debug output from FindBoost.
+                             Please enable this before filing any bug report.
+  Boost_DETAILED_FAILURE_MSG
+                           - Set to ON to add detailed information to the
+                             failure message even when the REQUIRED option
+                             is not given to the find_package call.
+  Boost_REALPATH           - Set to ON to resolve symlinks for discovered
+                             libraries to assist with packaging.  For example,
+                             the "system" component library may be resolved to
+                             "/usr/lib/libboost_system.so.1.67.0" instead of
+                             "/usr/lib/libboost_system.so".  This does not
+                             affect linking and should not be enabled unless
+                             the user needs this information.
+  Boost_LIBRARY_DIR        - Default value for Boost_LIBRARY_DIR_RELEASE and
+                             Boost_LIBRARY_DIR_DEBUG.
+
+On Visual Studio and Borland compilers Boost headers request automatic
+linking to corresponding libraries.  This requires matching libraries
+to be linked explicitly or available in the link library search path.
+In this case setting Boost_USE_STATIC_LIBS to OFF may not achieve
+dynamic linking.  Boost automatic linking typically requests static
+libraries with a few exceptions (such as Boost.Python).  Use::
+
+  add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
+
+to ask Boost to report information about automatic linking requests.
+
+Example to find Boost headers only::
+
+  find_package(Boost 1.36.0)
+  if(Boost_FOUND)
+    include_directories(${Boost_INCLUDE_DIRS})
+    add_executable(foo foo.cc)
+  endif()
+
+Example to find Boost libraries and use imported targets::
+
+  find_package(Boost 1.56 REQUIRED COMPONENTS
+               date_time filesystem iostreams)
+  add_executable(foo foo.cc)
+  target_link_libraries(foo Boost::date_time Boost::filesystem
+                            Boost::iostreams)
+
+Example to find Boost Python 3.6 libraries and use imported targets::
+
+  find_package(Boost 1.67 REQUIRED COMPONENTS
+               python36 numpy36)
+  add_executable(foo foo.cc)
+  target_link_libraries(foo Boost::python36 Boost::numpy36)
+
+Example to find Boost headers and some *static* (release only) libraries::
+
+  set(Boost_USE_STATIC_LIBS        ON)  # only find static libs
+  set(Boost_USE_DEBUG_LIBS         OFF) # ignore debug libs and
+  set(Boost_USE_RELEASE_LIBS       ON)  # only find release libs
+  set(Boost_USE_MULTITHREADED      ON)
+  set(Boost_USE_STATIC_RUNTIME    OFF)
+  find_package(Boost 1.66.0 COMPONENTS date_time filesystem system ...)
+  if(Boost_FOUND)
+    include_directories(${Boost_INCLUDE_DIRS})
+    add_executable(foo foo.cc)
+    target_link_libraries(foo ${Boost_LIBRARIES})
+  endif()
+
+Boost CMake
+^^^^^^^^^^^
+
+If Boost was built using the boost-cmake project it provides a package
+configuration file for use with find_package's Config mode.  This
+module looks for the package configuration file called
+BoostConfig.cmake or boost-config.cmake and stores the result in cache
+entry "Boost_DIR".  If found, the package configuration file is loaded
+and this module returns with no further action.  See documentation of
+the Boost CMake package configuration for details on what it provides.
+
+Set Boost_NO_BOOST_CMAKE to ON to disable the search for boost-cmake.
+#]=======================================================================]

 # Save project's policies
 cmake_policy(PUSH)
@@ -406,15 +411,18 @@

 #-------------------------------------------------------------------------------

-#
-# Runs compiler with "-dumpversion" and parses major/minor
-# version with a regex.
-#
-function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
-  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\1\\2"
-    _boost_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION})
+# Convert CMAKE_CXX_COMPILER_VERSION to boost compiler suffix version.
+function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION _OUTPUT_VERSION_MAJOR _OUTPUT_VERSION_MINOR)
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\1"
+    _boost_COMPILER_VERSION_MAJOR "${CMAKE_CXX_COMPILER_VERSION}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\2"
+    _boost_COMPILER_VERSION_MINOR "${CMAKE_CXX_COMPILER_VERSION}")
+
+  set(_boost_COMPILER_VERSION "${_boost_COMPILER_VERSION_MAJOR}${_boost_COMPILER_VERSION_MINOR}")

   set(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE)
+  set(${_OUTPUT_VERSION_MAJOR} ${_boost_COMPILER_VERSION_MAJOR} PARENT_SCOPE)
+  set(${_OUTPUT_VERSION_MINOR} ${_boost_COMPILER_VERSION_MINOR} PARENT_SCOPE)
 endfunction()

 #
@@ -479,25 +487,35 @@
     if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
         set(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
     else()
-      _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
+      _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION _boost_COMPILER_VERSION_MAJOR _boost_COMPILER_VERSION_MINOR)
       set(_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
     endif()
   elseif (UNIX)
-    if (CMAKE_COMPILER_IS_GNUCXX)
+    _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION _boost_COMPILER_VERSION_MAJOR _boost_COMPILER_VERSION_MINOR)
+    if(NOT Boost_VERSION VERSION_LESS 106900)
+      # From GCC 5 and clang 4, versioning changes and minor becomes patch.
+      # For those compilers, patch is exclude from compiler tag in Boost 1.69+ library naming.
+      if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND _boost_COMPILER_VERSION_MAJOR VERSION_GREATER 4)
+        set(_boost_COMPILER_VERSION "${_boost_COMPILER_VERSION_MAJOR}")
+      elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND _boost_COMPILER_VERSION_MAJOR VERSION_GREATER 3)
+        set(_boost_COMPILER_VERSION "${_boost_COMPILER_VERSION_MAJOR}")
+      endif()
+    endif()
+
+    if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
       if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
         set(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
       else()
-        _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
         # Determine which version of GCC we have.
         if(APPLE)
           if(Boost_MINOR_VERSION)
             if(${Boost_MINOR_VERSION} GREATER 35)
               # In Boost 1.36.0 and newer, the mangled compiler name used
-              # on Mac OS X/Darwin is "xgcc".
+              # on macOS/Darwin is "xgcc".
               set(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
             else()
               # In Boost <= 1.35.0, there is no mangled compiler name for
-              # the Mac OS X/Darwin version of GCC.
+              # the macOS/Darwin version of GCC.
               set(_boost_COMPILER "")
             endif()
           else()
@@ -509,7 +527,10 @@
           set(_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
         endif()
       endif()
-    endif ()
+    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+      # TODO: Find out any Boost version constraints vs clang support.
+      set(_boost_COMPILER "-clang${_boost_COMPILER_VERSION}")
+    endif()
   else()
     # TODO at least Boost_DEBUG here?
     set(_boost_COMPILER "")
@@ -573,7 +594,7 @@
   endif()

   set(_Boost_IMPORTED_TARGETS TRUE)
-  if(Boost_VERSION VERSION_LESS 103300)
+  if(Boost_VERSION AND Boost_VERSION VERSION_LESS 103300)
     message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION} (all versions older than 1.33)")
     set(_Boost_IMPORTED_TARGETS FALSE)
   elseif(NOT Boost_VERSION VERSION_LESS 103300 AND Boost_VERSION VERSION_LESS 103500)
@@ -806,26 +827,72 @@
     set(_Boost_TIMER_DEPENDENCIES chrono system)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+  elseif(NOT Boost_VERSION VERSION_LESS 106700 AND Boost_VERSION VERSION_LESS 106800)
+    set(_Boost_CHRONO_DEPENDENCIES system)
+    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+    set(_Boost_COROUTINE_DEPENDENCIES context system)
+    set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+    set(_Boost_FILESYSTEM_DEPENDENCIES system)
+    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+    set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+    set(_Boost_MPI_DEPENDENCIES serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+    set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+    set(_Boost_RANDOM_DEPENDENCIES system)
+    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+    set(_Boost_TIMER_DEPENDENCIES chrono system)
+    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+  elseif(NOT Boost_VERSION VERSION_LESS 106800 AND Boost_VERSION VERSION_LESS 106900)
+    set(_Boost_CHRONO_DEPENDENCIES system)
+    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+    set(_Boost_CONTRACT_DEPENDENCIES thread chrono system date_time)
+    set(_Boost_COROUTINE_DEPENDENCIES context system)
+    set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+    set(_Boost_FILESYSTEM_DEPENDENCIES system)
+    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+    set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+    set(_Boost_MPI_DEPENDENCIES serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+    set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+    set(_Boost_RANDOM_DEPENDENCIES system)
+    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+    set(_Boost_TIMER_DEPENDENCIES chrono system)
+    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+  elseif(NOT Boost_VERSION VERSION_LESS 106900 AND Boost_VERSION VERSION_LESS 107000)
+    set(_Boost_CONTRACT_DEPENDENCIES thread chrono date_time)
+    set(_Boost_COROUTINE_DEPENDENCIES context)
+    set(_Boost_FIBER_DEPENDENCIES context)
+    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+    set(_Boost_LOG_DEPENDENCIES date_time log_setup filesystem thread regex chrono atomic)
+    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+    set(_Boost_MPI_DEPENDENCIES serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+    set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+    set(_Boost_THREAD_DEPENDENCIES chrono date_time atomic)
+    set(_Boost_TIMER_DEPENDENCIES chrono system)
+    set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
+    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
   else()
-    if(NOT Boost_VERSION VERSION_LESS 106700)
-      set(_Boost_CHRONO_DEPENDENCIES system)
-      set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
-      set(_Boost_COROUTINE_DEPENDENCIES context system)
-      set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
-      set(_Boost_FILESYSTEM_DEPENDENCIES system)
+    if(NOT Boost_VERSION VERSION_LESS 107000)
+      set(_Boost_CONTRACT_DEPENDENCIES thread chrono date_time)
+      set(_Boost_COROUTINE_DEPENDENCIES context)
+      set(_Boost_FIBER_DEPENDENCIES context)
       set(_Boost_IOSTREAMS_DEPENDENCIES regex)
-      set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+      set(_Boost_LOG_DEPENDENCIES date_time log_setup filesystem thread regex chrono atomic)
       set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
       set(_Boost_MPI_DEPENDENCIES serialization)
       set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
       set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
-      set(_Boost_RANDOM_DEPENDENCIES system)
-      set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_THREAD_DEPENDENCIES chrono date_time atomic)
       set(_Boost_TIMER_DEPENDENCIES chrono system)
-      set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+      set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
       set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
     endif()
-    if(NOT Boost_VERSION VERSION_LESS 106800)
+    if(NOT Boost_VERSION VERSION_LESS 107100)
       message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
     endif()
   endif()
@@ -862,7 +929,12 @@
   set(_Boost_ATOMIC_HEADERS              "boost/atomic.hpp")
   set(_Boost_CHRONO_HEADERS              "boost/chrono.hpp")
   set(_Boost_CONTAINER_HEADERS           "boost/container/container_fwd.hpp")
-  set(_Boost_CONTEXT_HEADERS             "boost/context/all.hpp")
+  set(_Boost_CONTRACT_HEADERS            "boost/contract.hpp")
+  if(Boost_VERSION VERSION_LESS 106100)
+    set(_Boost_CONTEXT_HEADERS           "boost/context/all.hpp")
+  else()
+    set(_Boost_CONTEXT_HEADERS           "boost/context/detail/fcontext.hpp")
+  endif()
   set(_Boost_COROUTINE_HEADERS           "boost/coroutine/all.hpp")
   set(_Boost_DATE_TIME_HEADERS           "boost/date_time/date.hpp")
   set(_Boost_EXCEPTION_HEADERS           "boost/exception/exception.hpp")
@@ -891,6 +963,12 @@
   set(_Boost_REGEX_HEADERS               "boost/regex.hpp")
   set(_Boost_SERIALIZATION_HEADERS       "boost/serialization/serialization.hpp")
   set(_Boost_SIGNALS_HEADERS             "boost/signals.hpp")
+  set(_Boost_STACKTRACE_ADDR2LINE_HEADERS "boost/stacktrace.hpp")
+  set(_Boost_STACKTRACE_BACKTRACE_HEADERS "boost/stacktrace.hpp")
+  set(_Boost_STACKTRACE_BASIC_HEADERS    "boost/stacktrace.hpp")
+  set(_Boost_STACKTRACE_NOOP_HEADERS     "boost/stacktrace.hpp")
+  set(_Boost_STACKTRACE_WINDBG_CACHED_HEADERS "boost/stacktrace.hpp")
+  set(_Boost_STACKTRACE_WINDBG_HEADERS   "boost/stacktrace.hpp")
   set(_Boost_SYSTEM_HEADERS              "boost/system/config.hpp")
   set(_Boost_TEST_EXEC_MONITOR_HEADERS   "boost/test/test_exec_monitor.hpp")
   set(_Boost_THREAD_HEADERS              "boost/thread.hpp")
@@ -1062,7 +1140,8 @@
   # _Boost_COMPONENT_HEADERS.  See the instructions at the top of
   # _Boost_COMPONENT_DEPENDENCIES.
   set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
-    "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
+    "1.70.0" "1.70" "1.69.0" "1.69"
+    "1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
     "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
     "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
     "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
@@ -1219,7 +1298,7 @@
     list(APPEND _boost_INCLUDE_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
   else()
     if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
-      foreach(ver ${_Boost_KNOWN_VERSIONS})
+      foreach(ver ${_boost_TEST_VERSIONS})
         string(REPLACE "." "_" ver "${ver}")
         list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS "C:/local/boost_${ver}")
       endforeach()
@@ -1304,6 +1383,7 @@
   math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
   math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
   math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
+  set(Boost_VERSION_STRING "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")

   string(APPEND Boost_ERROR_REASON
     "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
@@ -1363,6 +1443,13 @@
   set(Boost_NAMESPACE "boost")
 endif()

+if(Boost_DEBUG)
+  message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+    "Boost_LIB_PREFIX = ${Boost_LIB_PREFIX}")
+  message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+    "Boost_NAMESPACE = ${Boost_NAMESPACE}")
+endif()
+
 # ------------------------------------------------------------------------
 #  Suffix initialization and compiler suffix detection.
 # ------------------------------------------------------------------------
@@ -1455,27 +1542,35 @@
 #  -x86     Architecture and address model tag
 #           First character is the architecture, then word-size, either 32 or 64
 #           Only used in 'versioned' layout, added in Boost 1.66.0
-set(_boost_ARCHITECTURE_TAG "")
-# {CMAKE_CXX_COMPILER_ARCHITECTURE_ID} is not currently set for all compilers
-if(NOT "x${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "x" AND NOT Boost_VERSION VERSION_LESS 106600)
-  string(APPEND _boost_ARCHITECTURE_TAG "-")
-  # This needs to be kept in-sync with the section of CMakePlatformId.h.in
-  # inside 'defined(_WIN32) && defined(_MSC_VER)'
-  if(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "IA64")
-    string(APPEND _boost_ARCHITECTURE_TAG "i")
-  elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "X86"
-            OR ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "x64")
-    string(APPEND _boost_ARCHITECTURE_TAG "x")
-  elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} MATCHES "^ARM")
-    string(APPEND _boost_ARCHITECTURE_TAG "a")
-  elseif(${CMAKE_CXX_COMPILER_ARCHITECTURE_ID} STREQUAL "MIPS")
-    string(APPEND _boost_ARCHITECTURE_TAG "m")
-  endif()
-
-  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-    string(APPEND _boost_ARCHITECTURE_TAG "64")
-  else()
-    string(APPEND _boost_ARCHITECTURE_TAG "32")
+if(DEFINED Boost_ARCHITECTURE)
+  set(_boost_ARCHITECTURE_TAG "${Boost_ARCHITECTURE}")
+  if(Boost_DEBUG)
+    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+      "using user-specified Boost_ARCHITECTURE = ${_boost_ARCHITECTURE_TAG}")
+  endif()
+else()
+  set(_boost_ARCHITECTURE_TAG "")
+  # {CMAKE_CXX_COMPILER_ARCHITECTURE_ID} is not currently set for all compilers
+  if(NOT "x${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "x" AND NOT Boost_VERSION VERSION_LESS 106600)
+    string(APPEND _boost_ARCHITECTURE_TAG "-")
+    # This needs to be kept in-sync with the section of CMakePlatformId.h.in
+    # inside 'defined(_WIN32) && defined(_MSC_VER)'
+    if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "IA64")
+      string(APPEND _boost_ARCHITECTURE_TAG "i")
+    elseif(CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "X86"
+              OR CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "x64")
+      string(APPEND _boost_ARCHITECTURE_TAG "x")
+    elseif(CMAKE_CXX_COMPILER_ARCHITECTURE_ID MATCHES "^ARM")
+      string(APPEND _boost_ARCHITECTURE_TAG "a")
+    elseif(CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "MIPS")
+      string(APPEND _boost_ARCHITECTURE_TAG "m")
+    endif()
+
+    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+      string(APPEND _boost_ARCHITECTURE_TAG "64")
+    else()
+      string(APPEND _boost_ARCHITECTURE_TAG "32")
+    endif()
   endif()
 endif()

@@ -1530,7 +1625,7 @@
     if( Boost_NO_SYSTEM_PATHS )
       list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
     else()
-      foreach(ver ${_Boost_KNOWN_VERSIONS})
+      foreach(ver ${_boost_TEST_VERSIONS})
         string(REPLACE "." "_" ver "${ver}")
         _Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS(_boost_LIBRARY_SEARCH_DIRS_${c} "C:/local/boost_${ver}")
       endforeach()
@@ -1717,6 +1812,7 @@
     list(APPEND _boost_RELEASE_NAMES
       ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
       ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}
       ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component} )
     if(_boost_STATIC_RUNTIME_WORKAROUND)
       set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
@@ -2018,6 +2114,9 @@
         message (STATUS "  ${COMPONENT}")
       endif()
       list(APPEND Boost_LIBRARIES ${Boost_${UPPERCOMPONENT}_LIBRARY})
+      if(COMPONENT STREQUAL "thread")
+        list(APPEND Boost_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+      endif()
     endif()
   endforeach()
 else()
@@ -2076,4 +2175,4 @@
   CACHE INTERNAL "Components requested for this build tree.")

 # Restore project's policies
-cmake_policy(POP)
+cmake_policy(POP)


Do not set "-stdlib" flag for Emscripten target

--- toolchains/gcc_compatibles_stl.cmake
+++ toolchains/gcc_compatibles_stl.cmake
@@ -17,7 +17,7 @@
 set( TNUN_CPP_LIBRARY ${TNUN_CPP_LIBRARY_DEFAULT} CACHE STRING "C++ library used" )
 set_property( CACHE TNUN_CPP_LIBRARY PROPERTY STRINGS "libc++" "stdc++" )

-if( CLANG )
+if( CLANG AND NOT EMSCRIPTEN )
     if( ${TNUN_CPP_LIBRARY} STREQUAL "libc++" )
         add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-stdlib=libc++> )
         link_libraries( -stdlib=libc++ )


Bugfix

Bugfix

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

--- deal.II/cmake/modules/FindP4EST.cmake
+++ deal.II/cmake/modules/FindP4EST.cmake
@@ -32,8 +32,8 @@
   )

 SET(P4EST_LIBRARIES
-  ${P4EST_LIBRARIES}
-  ${SC_LIBRARIES}
+  ${P4EST_LIBRARY}
+  ${SC_LIBRARY}
   )

 SET(P4EST_INCLUDE_DIRS


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Set CMake policy 0042 to avoid warnings on OS X

--- ament_cmake_core/cmake/core/all.cmake
+++ ament_cmake_core/cmake/core/all.cmake
@@ -53,6 +53,12 @@
 _set_cmake_policy_to_new_if_available(CMP0021)
 _set_cmake_policy_to_new_if_available(CMP0022)
 _set_cmake_policy_to_new_if_available(CMP0023)
+_set_cmake_policy_to_new_if_available(CMP0042)
+
+# set RPATH to ON for OS X
+if(APPLE)
+  set(CMAKE_MACOSX_RPATH ON)
+endif()

 # the following operations must be performed inside a project context
 if(NOT PROJECT_NAME)


Fix capitalization in comment

Fix capitalization in comment

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -88,7 +88,7 @@
   set(CMAKE_DEBUG_POSTFIX "d${CMAKE_DEBUG_POSTFIX}")
   set(CMAKE_DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} PARENT_SCOPE)

-  # 64-bit installations should suffix with 64 regardless of the CPU type (arm or intel)
+  # 64-bit installations should suffix with 64 regardless of the CPU type (ARM or Intel)
   if(CMAKE_SIZEOF_VOID_P EQUAL 8)
     foreach(config IN LISTS CMAKE_CONFIGURATION_TYPES)
       string(TOUPPER ${config} config)


fix ExternalProject_Add_Empty to parse directories

--- CMake/ExternalProjectDependency.cmake
+++ CMake/ExternalProjectDependency.cmake
@@ -688,7 +688,7 @@
 #
 macro(ExternalProject_Add_Empty project_name)
   set(options)
-  set(oneValueArgs)
+  set(oneValueArgs BINARY_DIR SOURCE_DIR TMP_DIR STAMP_DIR DOWNLOAD_DIR INSTALL_DIR)
   set(multiValueArgs DEPENDS)
   cmake_parse_arguments(_sb "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

@@ -701,8 +701,12 @@
   endif()

   ExternalProject_Add(${project_name}
-    SOURCE_DIR ${CMAKE_BINARY_DIR}/${project_name}
-    BINARY_DIR ${project_name}-build
+    SOURCE_DIR ${_sb_SOURCE_DIR}
+    BINARY_DIR ${_sb_BINARY_DIR}
+    DOWNLOAD_DIR ${_sb_DOWNLOAD_DIR}
+    STAMP_DIR ${_sb_STAMP_DIR}
+    TMP_DIR ${_sb_TMP_DIR}
+    INSTALL_DIR ${_sb_TMP_DIR}
     DOWNLOAD_COMMAND ""
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""


Correctly restore the CTEST_USE_LAUNCHERS variable.

--- CMake/MITKDashboardDriverScript.cmake
+++ CMake/MITKDashboardDriverScript.cmake
@@ -391,12 +391,13 @@

     if (WITH_DOCUMENTATION)
       message("----------- [ Build Documentation ] -----------")
+      set(ctest_use_launchers_orig ${CTEST_USE_LAUNCHERS})
       set(CTEST_USE_LAUNCHERS 0)
       # Build Documentation target
       set_property(GLOBAL PROPERTY SubProject Documentation)
       set_property(GLOBAL PROPERTY Label Documentation)
       func_build_target("doc" "${build_dir}")
-      set(CTEST_USE_LAUNCHERS 1)
+      set(CTEST_USE_LAUNCHERS ${ctest_use_launchers_orig})
     endif()

     set_property(GLOBAL PROPERTY SubProject SuperBuild)


Update system settings for CMake

Update system settings for CMake

--- CMakeTools/MacroConfigureSystem.cmake
+++ CMakeTools/MacroConfigureSystem.cmake
@@ -1,25 +1,56 @@
-# System configuration
+#
+# Copyright (c) 2002 - present, H. Hernan Saez
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * 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.
+#     * 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 COPYRIGHT HOLDER 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.
+#
+
 IF ( ${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten" )
   	SET( CRIMILD_ENABLE_EMSCRIPTEN ON )
 	ADD_DEFINITIONS( -DCRIMILD_PLATFORM_EMSCRIPTEN=1 )
-ELSE ()
-  	SET( CRIMILD_ENABLE_EMSCRIPTEN OFF )
+	SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -static -U__STRICT_ANSI__" )
+	RETURN()
 ENDIF ()

-IF ( APPLE )
-  	 # Enable C++17 features
-	 SET( CMAKE_CXX_FLAGS "-std=c++17 -stdlib=libc++ -U__STRICT_ANSI__ -fvisibility=hidden -fvisibility-inlines-hidden" )
+SET( CRIMILD_ENABLE_EMSCRIPTEN OFF )

-	 SET( CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++0x" )
-	 SET( CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++" )
+SET( CMAKE_CXX_STANDARD 20 )
+SET( CMAKE_CXX_STANDARD_REQUIRED ON )
+SET( CMAKE_CXX_EXTENSIONS OFF )

-	 SET( CMAKE_MACOSX_RPATH 1 )
-ELSE ( APPLE )
-  	IF ( CRIMILD_ENABLE_EMSCRIPTEN )
-		SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -static -U__STRICT_ANSI__" )
-	ELSE ()
-		set( CMAKE_CXX_STANDARD 20 )
-		set( CMAKE_CXX_STANDARD_REQUIRED ON )
-		set( CMAKE_CXX_EXTENSIONS OFF )
-	ENDIF ()
-ENDIF ( APPLE )
+IF ( MSVC )
+	ADD_COMPILE_OPTIONS( /W4 )
+ELSE()
+	ADD_COMPILE_OPTIONS(
+		-Wall
+		-Wextra
+		-Wpedantic
+	)
+
+	# Ignore specific warnings
+	ADD_COMPILE_OPTIONS(
+		-Wno-missing-braces
+		-Wno-c++98-compat
+		-Wno-c++98-compat-pedantic
+	)
+ENDIF()


Added a CMake function to return the intermediate output directory where the Generator html and stmt output will be placed. This allows a test to copy these files into its resource bundle.

Former-commit-id: 37594c766fc7f1aa69753ab2cc10197cab504bec

--- test/HalideGenerator.cmake
+++ test/HalideGenerator.cmake
@@ -1,3 +1,14 @@
+# This function returns the intermediate output directory where the Halide
+# generator output will be placed. This path is automatically added to the
+# library path and include path of the specified target. This function can be
+# used to determine the location of the other output files like the bit code and
+# html.
+function(halide_generator_output_path gen_name result_var)
+  file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/" NATIVE_INT_DIR)
+  set(${result_var} "${NATIVE_INT_DIR}scratch_${gen_name}" PARENT_SCOPE)
+  file(MAKE_DIRECTORY "${result_var}")
+endfunction(halide_generator_output_path)
+
 # This function adds custom build steps to invoke a Halide generator exectuable,
 # produce a static library containing the generated code, and then link that
 # static library to the specified target. The generator executable must be
@@ -6,9 +17,7 @@

   # Determine a scratch directory to build and execute the generator. ${target}
   # will include the generated header from this directory.
-  file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/" NATIVE_INT_DIR)
-  set(SCRATCH_DIR "${NATIVE_INT_DIR}scratch_${gen_name}")
-  file(MAKE_DIRECTORY "${SCRATCH_DIR}")
+  halide_generator_output_path(${gen_name} SCRATCH_DIR)

   # CMake 2.8 doesn't have string(CONCAT), so fake it like so:
   string(REPLACE ".lib" "${CMAKE_STATIC_LIBRARY_SUFFIX}" FILTER_LIB "${func_name}.lib" )


[FIX] Fixing syntax error in CMake file.

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

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -420,11 +420,11 @@
         # Compose arguments to the demo_checker.py script.
         if (EXISTS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${EXECUTABLE}")
             set (ARGS "--binary-path" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${EXECUTABLE}")
-        else if (EXISTS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/${EXECUTABLE}")
+        elseif (EXISTS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/${EXECUTABLE}")
             set (ARGS "--binary-path" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/${EXECUTABLE}")
-        else if (EXISTS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/${EXECUTABLE}")
+        elseif (EXISTS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/${EXECUTABLE}")
             set (ARGS "--binary-path" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/${EXECUTABLE}")
-        else if (EXISTS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/RelWithDebInfo/${EXECUTABLE}")
+        elseif (EXISTS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/RelWithDebInfo/${EXECUTABLE}")
             set (ARGS "--binary-path" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/RelWithDebInfo/${EXECUTABLE}")
         endif ()
         if (EXISTS "${STDOUT_PATH}")


bump version

bump version

--- CMake/version.cmake
+++ CMake/version.cmake
@@ -1,3 +1,3 @@
 set (VV_VERSION_MAJOR 3)
 set (VV_VERSION_MINOR 0)
-set (VV_VERSION_PATCH 6)
+set (VV_VERSION_PATCH 7)