changed crossflow test case directory name to incompressible

--- phSolver/incompressible/test/testing.cmake
+++ phSolver/incompressible/test/testing.cmake
@@ -1,12 +1,12 @@
-set(CDIR ${CASES}/crossflow)
-add_test(copyInpCfg
+set(CDIR ${CASES}/incompressible)
+add_test(copyInpCfg
   cp ${PHASTA_SOURCE_DIR}/phSolver/common/input.config ${CDIR})
-add_test(resetNumStart
+add_test(resetNumStart
   cp ${CDIR}/numstart.dat ${CDIR}/4-procs_case/numstart.dat)
 add_test(
-  NAME crossflow
+  NAME incompressible
   COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phastaIC.exe
-  WORKING_DIRECTORY ${CASES}/crossflow
+  WORKING_DIRECTORY ${CASES}/incompressible
 )
-add_test(compareCrossflow
+add_test(compareIncompressible
   diff ${CDIR}/restart-dat.4.1.ref ${CDIR}/4-procs_case/restart-dat.4.1)


Better failure message for CMake if C# not installed

--- dev/cmake/Modules/FindCsharp.cmake
+++ dev/cmake/Modules/FindCsharp.cmake
@@ -40,7 +40,7 @@
   endif( )
 else( UNIX )
   find_package( Mono )
-  find_package( Mono )
+  #find_package( Mono )
 endif( )

 if( CSHARP_DOTNET_FOUND )
@@ -54,6 +54,8 @@
   set( CSHARP_COMPILER ${CSHARP_MONO_COMPILER_${CSHARP_MONO_VERSION}} CACHE STRING "Full path to Mono compiler" FORCE )
   set( CSHARP_INTERPRETER ${CSHARP_MONO_INTERPRETER_${CSHARP_MONO_VERSION}} CACHE STRING "Full path to Mono interpreter" FORCE )
   set( CSHARP_SDK "/sdk:2" CACHE STRING "C# Mono SDK commandline switch (e.g. /sdk:2, /sdk:4, /sdk:5)" )
+else()
+  message(FATAL_ERROR "C# could not be found.  Is it installed?")
 endif( )

 message(STATUS "CSHARP_TYPE=${CSHARP_TYPE}")


more descriptive warning when no test source found for test target

--- cmake/BuildTests.cmake
+++ cmake/BuildTests.cmake
@@ -39,7 +39,7 @@
         endif(BUILD_python)

     else(nbTestFiles GREATER 0)
-        message( WARNING  "Unable to locate any test files. No tests to add to this project")
+        message( WARNING  "Unable to locate any test files. No tests to add to target ${test_project}")
     endif(nbTestFiles GREATER 0)

 ENDFUNCTION( build_tests )


Drop the lib prefix from ffmpeg library finder

--- cmake/Findffmpeg.cmake
+++ cmake/Findffmpeg.cmake
@@ -42,7 +42,7 @@
             PATH_SUFFIXES include
             PATHS ${FFMPEG_SEARCH_PATHS}
         )
-        find_library(${comp}_LIBRARY lib${comp}
+        find_library(${comp}_LIBRARY ${comp}
             HINTS
             PATH_SUFFIXES lib
             PATHS ${FFMPEG_SEARCH_PATHS}


Add an add_definitions() in tbag_config__set_library_option() cmake function.

--- cmake/TbagConfig.cmake
+++ cmake/TbagConfig.cmake
@@ -125,6 +125,9 @@
     endif ()

     option (${__value} "Use the ${__package_name} library if on." ${${__value}})
+    if (${__value})
+        add_definitions (-D${__value})
+    endif ()
 endmacro ()

 #/// CMake option value.


Force cache external build options

Force cache external build options

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -94,7 +94,7 @@
     hunter_status_debug("Add extra CMake args: ${var_name} = ${var_value}")
     file(
         APPEND
-        "${HUNTER_DOWNLOAD_TOOLCHAIN}" "set(${var_name} ${var_value})\n"
+        "${HUNTER_DOWNLOAD_TOOLCHAIN}" "set(${var_name} ${var_value} CACHE STRING \"\" FORCE)\n"
     )
   endforeach()


Added -Wno-long-long flag to gcc and clang because Eigen3 has instances of type in its code.

--- cmake/ConfigureCompiler.cmake
+++ cmake/ConfigureCompiler.cmake
@@ -145,7 +145,7 @@
     else()
       message(FATAL_ERROR "Version ${GCC_VERSION} of GCC compiler is not supported.")
     endif()
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -pedantic -Wall -Wextra -fmessage-length=100"
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -pedantic -Wall -Wextra -Wno-long-long -fmessage-length=100"
                         CACHE STRING "Flags used by the compiler during all build types." FORCE)
     set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -O0 -g"
                         CACHE STRING "Flags used by the compiler during debug builds." FORCE)
@@ -201,7 +201,7 @@
       set(CMAKE_XCODE_ATTRIBUTE_GCC_WARN_INHIBIT_ALL_WARNINGS "YES")
       set(CMAKE_XCODE_ATTRIBUTE_GCC_WARN_PEDANTIC "YES")
     else()
-      set(CMAKE_CXX_FLAGS "-pedantic -Wall -Wextra -fmessage-length=100 -std=c++11 -stdlib=libc++"
+      set(CMAKE_CXX_FLAGS "-pedantic -Wall -Wextra -Wno-long-long -fmessage-length=100 -std=c++11 -stdlib=libc++"
                           CACHE STRING "Flags used by the compiler during all build types." FORCE)
     endif()
     set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -O0 -g"


cmake/modules/FindVIGRA.cmake: Use local variable VIGRA_ROOT instead of the environment one.

--- cmake/modules/FindVIGRA.cmake
+++ cmake/modules/FindVIGRA.cmake
@@ -16,7 +16,7 @@
 endif()

 # configVersion.hxx only present, after build of Vigra
-FIND_PATH(VIGRA_INCLUDE_DIR vigra/configVersion.hxx $ENV{VIGRA_ROOT}/include PATHS ENV CPLUS_INCLUDE_PATH)
+FIND_PATH(VIGRA_INCLUDE_DIR vigra/configVersion.hxx ${VIGRA_ROOT}/include PATHS ENV CPLUS_INCLUDE_PATH)

 EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
                             "import vigra.vigranumpycore; print vigra.vigranumpycore.__file__"


Change the name of the produced tarfile by CPack following current conventions.

--- cmake/modules/RootCPack.cmake
+++ cmake/modules/RootCPack.cmake
@@ -59,13 +59,54 @@
   endif()
 endif()

+#---Processor architecture---------------------------------------------------------------------------
+if(APPLE)
+  execute_process(COMMAND uname -m OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE)
+elseif(UNIX)
+  execute_process(COMMAND uname -p OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE)
+elseif(DEFINED ENV{Platform})
+  set(arch $ENV{Platform})
+  string(TOLOWER ${arch} arch)
+else()
+  set(arch $ENV{PROCESSOR_ARCHITECTURE})
+endif()
+#---OS and version-----------------------------------------------------------------------------------
+if(APPLE)
+  execute_process(COMMAND sw_vers "-productVersion"
+                  COMMAND cut -d . -f 1-2
+                  OUTPUT_VARIABLE osvers OUTPUT_STRIP_TRAILING_WHITESPACE)
+  set(OS_NAME_VERSION macosx64-${osvers})
+elseif(WIN32)
+  set(OS_NAME_VERSION win32)
+else()
+  execute_process(COMMAND cat /etc/issue OUTPUT_VARIABLE issue OUTPUT_STRIP_TRAILING_WHITESPACE)
+  if(issue MATCHES Ubuntu)
+    string(REGEX REPLACE ".*Ubuntu ([0-9]+)[.].*" "\\1" osvers "${issue}")
+    set(OS_NAME_VERSION Linux-ubuntu${osvers}-${arch})
+  elseif(issue MATCHES SLC)
+    string(REGEX REPLACE ".*release ([0-9]+)[.].*" "\\1" osvers "${issue}")
+    set(OS_NAME_VERSION Linux-slc${osvers}-${arch})
+  elseif(issue MATCHES Fedora)
+    string(REGEX REPLACE ".*release ([0-9]+)[. ].*" "\\1" osvers "${issue}")
+    set(OS_NAME_VERSION Linux-fedora${osvers}-${arch})
+  else()
+    execute_process(COMMAND cat /etc/os-release OUTPUT_VARIABLE os_release OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(os_release MATCHES "centos")
+      string(REGEX REPLACE ".*VERSION_ID=\"([0-9]+).*" "\\1" osvers "${os_release}")
+      set(OS_NAME_VERSION Linux-cc${osvers}-${arch})
+    else()
+      set(OS_NAME_VERSION Linux-${arch})
+    endif()
+  endif()
+endif()
+#---Build type---------------------------------------------------------------------------------------
+if(NOT CMAKE_BUILD_TYPE STREQUAL Release)
+  string(TOLOWER .${CMAKE_BUILD_TYPE} BUILD_TYPE)
+endif()
+
 set(CPACK_PACKAGE_RELOCATABLE True)
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "root_v${ROOT_VERSION}")
-if(CMAKE_BUILD_TYPE STREQUAL Release)
-  set(CPACK_PACKAGE_FILE_NAME "root_v${ROOT_VERSION}.${ROOT_ARCHITECTURE}${COMPILER_NAME_VERSION}")
-else()
-  set(CPACK_PACKAGE_FILE_NAME "root_v${ROOT_VERSION}.${ROOT_ARCHITECTURE}${COMPILER_NAME_VERSION}.${CMAKE_BUILD_TYPE}")
-endif()
+set(CPACK_PACKAGE_FILE_NAME "root_v${ROOT_VERSION}.${OS_NAME_VERSION}${COMPILER_NAME_VERSION}${BUILD_TYPE}")
 set(CPACK_PACKAGE_EXECUTABLES "root" "ROOT")

 if(WIN32)


[cmake] use cmake -E touch rather than touch (which may no exist)

--- cmake/swig_python_tools.cmake
+++ cmake/swig_python_tools.cmake
@@ -86,7 +86,7 @@
     # No doxy2swig but
     # generate empty ${COMP}-docstrings.i file (required because of %include in swig files)
     add_custom_command(OUTPUT ${SICONOS_SWIG_ROOT_DIR}/${COMP}-docstrings.i
-      COMMAND touch
+      COMMAND ${CMAKE_COMMAND} -E touch
       ARGS ${SICONOS_SWIG_ROOT_DIR}/${COMP}-docstrings.i
       )
     add_custom_target(${COMP}_docstrings DEPENDS ${SICONOS_SWIG_ROOT_DIR}/${COMP}-docstrings.i


OpenEXR 1.x build fix -- include file directory issues.

OpenEXR 2.x uses #include "foo.h", which is the right thing to do.  But
in some places OpenEXR 1.x had #include <foo.h>, which will search only
things in the include path and won't search the same directory as the
enclosing .h file.

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -67,6 +67,9 @@
 mark_as_advanced (OPENEXR_VERSION)

 include_directories ("${OPENEXR_INCLUDE_DIR}")
+# OpenEXR 1.x had weird #include dirctives, this is also necessary:
+include_directories ("${OPENEXR_INCLUDE_DIR}/OpenEXR")
+
 macro (LINK_OPENEXR target)
     target_link_libraries (${target} ${OPENEXR_LIBRARIES})
 endmacro ()


cmake: FindGSL improved

cmake: FindGSL improved

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -25,34 +25,21 @@
 pkg_check_modules(PC_GSL gsl)
 find_path(GSL_INCLUDE_DIR gsl/gsl_linalg.h HINTS ${PC_GSL_INCLUDE_DIRS})
 find_library(GSL_LIBRARY NAMES gsl HINTS ${PC_GSL_LIBRARY_DIRS} )
-
-#added gsl depends
-#BUG in OpenSuse (missing libgslcblas.so link in libgsl.so)
-#if (NOT BUILD_SHARED_LIBS and PC_GSL_LIBRARIES)
-if (PC_GSL_LIBRARIES AND NOT GSL_DEP_LIBRARY)
-  list(REMOVE_ITEM PC_GSL_LIBRARIES gsl)
-  foreach (LIB ${PC_GSL_LIBRARIES})
-    find_library(GSL_${LIB} NAMES ${LIB} HINTS ${PC_GSL_LIBRARY_DIRS} )
-    list(APPEND GSL_DEP_LIBRARY ${GSL_${LIB}})
-    unset(GSL_${LIB} CACHE)
-  endforeach(LIB)
-  set(GSL_DEP_LIBRARY "${GSL_DEP_LIBRARY}" CACHE FILEPATH "GSL dep libs" FORCE)
-endif (PC_GSL_LIBRARIES AND NOT GSL_DEP_LIBRARY)
-#endif (NOT BUILD_SHARED_LIBS and PC_GSL_LIBRARIES)
+find_library(GSL_CBLAS_LIBRARY NAMES gslcblas HINTS ${PC_GSL_LIBRARY_DIRS} )

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE
 # if all listed variables are TRUE
-find_package_handle_standard_args(GSL DEFAULT_MSG GSL_LIBRARY GSL_INCLUDE_DIR GSL_DEP_LIBRARY )
+find_package_handle_standard_args(GSL DEFAULT_MSG GSL_LIBRARY GSL_INCLUDE_DIR GSL_CBLAS_LIBRARY )

-set(GSL_LIBRARIES "${GSL_LIBRARY};${GSL_DEP_LIBRARY}")
+set(GSL_LIBRARIES "${GSL_LIBRARY};${GSL_CBLAS_LIBRARY}")
 set(GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )

 if (GSL_FOUND)
   include(CheckLibraryExists)
   check_library_exists("${GSL_LIBRARIES}" gsl_linalg_QR_decomp "" FOUND_QR_DECOMP)
   if(NOT FOUND_QR_DECOMP)
-    message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARIES}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GSL_LIBRARY by hand and include libgslcblas and libm in there (i.e. -DGSL_LIBRARY='/path/to/libgsl.so;/path/to/libgslcblas.so;/path/to/libm.so') !")
+    message(FATAL_ERROR "Could not find gsl_linalg_QR_decompx in ${GSL_LIBRARIES}, take a look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GSL_LIBRARY and GSL_CBLAS_LIBRARY by hand (i.e. -DGSL_LIBRARY='/path/to/libgsl.so' -DGSL_CBLAS_LIBRARY='/path/to/libgslcblas.so') !")
   endif(NOT FOUND_QR_DECOMP)
 endif (GSL_FOUND)


FindMKL.cmake: also check for Threading lib

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -376,6 +376,7 @@
   REQUIRED_VARS MKL_INCLUDE_DIR
                 MKL_Core_LINK_LIBRARY
                 MKL_Interface_LINK_LIBRARY
+                MKL_Threading_LINK_LIBRARY
                 MKL_ThreadLayer_LINK_LIBRARY)

 find_package_handle_standard_args(MKL_Static


Remove discovery of WinDDK setupapi library since it is not used and might not always be installed.

--- CMake/FindWinDDK.cmake
+++ CMake/FindWinDDK.cmake
@@ -10,9 +10,8 @@
 #

 IF (NOT DEFINED WINDDK_FOUND)
-
 	# If WINDDK_DIR was defined in the environment, use it.
-	IF (NOT DEFINED WINDDK_DIR AND NOT $ENV{WINDDK_DIR} STREQUAL "")
+	IF (NOT DEFINED WINDDK_DIR AND NOT "$ENV{WINDDK_DIR}" STREQUAL "")
 		SET(WINDDK_DIR $ENV{WINDDK_DIR})
 	ENDIF()

@@ -57,10 +56,8 @@
 SET(WINDDK_LIBRARY_SEARCH_DIRS "${WINDDK_DIR}/lib/win7/i386")
 FIND_LIBRARY(WINDDK_HID_LIBRARY hid.lib
   	PATHS ${WINDDK_LIBRARY_SEARCH_DIRS})
-FIND_LIBRARY(WINDDK_SETUPAPI_LIBRARY setupapi
-  	PATHS ${WINDDK_LIBRARY_SEARCH_DIRS})
-SET(WINDDK_WIN7_X86_LIBS "${WINDDK_HID_LIBRARY}" "${WINDDK_SETUPAPI_LIBRARY}"
-	CACHE STRING "MS WinDDK Win7-x86 libraries")
+SET(WINDDK_WIN7_X86_LIBS "${WINDDK_HID_LIBRARY}"
+	CACHE STRING "MS WinDDK Win7-x86 libraries" FORCE)
 UNSET(WINDDK_LIBRARY_SEARCH_DIRS CACHE)
 UNSET(WINDDK_HID_LIBRARY CACHE)
 UNSET(WINDDK_SETUPAPI_LIBRARY CACHE)
@@ -70,10 +67,8 @@
 SET(WINDDK_LIBRARY_SEARCH_DIRS "${WINDDK_DIR}/lib/win7/amd64")
 FIND_LIBRARY(WINDDK_HID_LIBRARY hid.lib
   	PATHS ${WINDDK_LIBRARY_SEARCH_DIRS})
-FIND_LIBRARY(WINDDK_SETUPAPI_LIBRARY setupapi
-  	PATHS ${WINDDK_LIBRARY_SEARCH_DIRS})
-SET(WINDDK_WIN7_X64_LIBS "${WINDDK_HID_LIBRARY}" "${WINDDK_SETUPAPI_LIBRARY}"
-	CACHE STRING "MS WinDDK Win7-x64 libraries")
+SET(WINDDK_WIN7_X64_LIBS "${WINDDK_HID_LIBRARY}"
+	CACHE STRING "MS WinDDK Win7-x64 libraries" FORCE)
 UNSET(WINDDK_LIBRARY_SEARCH_DIRS CACHE)
 UNSET(WINDDK_HID_LIBRARY CACHE)
 UNSET(WINDDK_SETUPAPI_LIBRARY CACHE)
@@ -83,10 +78,8 @@
 SET(WINDDK_LIBRARY_SEARCH_DIRS "${WINDDK_DIR}/lib/wxp/i386")
 FIND_LIBRARY(WINDDK_HID_LIBRARY hid.lib
   	PATHS ${WINDDK_LIBRARY_SEARCH_DIRS})
-FIND_LIBRARY(WINDDK_SETUPAPI_LIBRARY setupapi
-  	PATHS ${WINDDK_LIBRARY_SEARCH_DIRS})
-SET(WINDDK_WINXP_X64_LIBS "${WINDDK_HID_LIBRARY}" "${WINDDK_SETUPAPI_LIBRARY}"
-	CACHE STRING "MS WinDDK WinXP-x86 libraries")
+SET(WINDDK_WINXP_X64_LIBS "${WINDDK_HID_LIBRARY}"
+	CACHE STRING "MS WinDDK WinXP-x86 libraries" FORCE)
 UNSET(WINDDK_LIBRARY_SEARCH_DIRS CACHE)
 UNSET(WINDDK_HID_LIBRARY CACHE)
 UNSET(WINDDK_SETUPAPI_LIBRARY CACHE)


ENH: Use the latest tag for SimpleITK.

ENH: Use the latest tag for SimpleITK.

Prevent movement on master.

Change-Id: I52e59083d18e888b66ace47716119e2081e25d18

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -121,7 +121,7 @@
     set( proj SimpleITK )
     ExternalProject_Add( ${proj}
       GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/SimpleITK/SimpleITK.git"
-      GIT_TAG "origin/master"
+      GIT_TAG "v0.6.1"
       SOURCE_DIR "${CMAKE_BINARY_DIR}/SimpleITK"
       BINARY_DIR "SimpleITK-Build"
       CMAKE_GENERATOR ${gen}


[UPD] CMake option BTK_EXTRA_COMPILER_WARNINGS works also with the Clang compiler.

--- CMake/btkExtraCompilerFlags.cmake
+++ CMake/btkExtraCompilerFlags.cmake
@@ -1,17 +1,21 @@
 # Based on the file vtkCompilerExtras.cmake
-IF(CMAKE_COMPILER_IS_GNUCXX)
+IF(CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
   INCLUDE(CheckCXXCompilerFlag)

+  # Compatible flags between GCC and Clang
+  # -Wshadow has been removed due to eigen
+  SET(CMAKE_CXX_FLAGS_WARN "-Wnon-virtual-dtor -Wno-long-long -Wcast-align -Wchar-subscripts -Wall -Wextra -Wpointer-arith -Wformat-security -Woverloaded-virtual -Wunused-parameter -fno-common")
   # Addtional warnings for GCC
-  # -Wshadow has been removed due to eigen
-  SET(CMAKE_CXX_FLAGS_WARN "-Wnon-virtual-dtor -Wno-long-long -ansi -Wcast-align -Wchar-subscripts -Wall -Wextra -Wpointer-arith -Wformat-security -Woverloaded-virtual -Wunused-parameter -fno-check-new -fno-common")
+  IF(CMAKE_COMPILER_IS_GNUCXX)
+    SET(CMAKE_CXX_FLAGS_WARN ${CMAKE_CXX_FLAGS_WARN} "-fno-check-new -ansi")
+  ENDIF(CMAKE_COMPILER_IS_GNUCXX)

   # This flag is useful as not returning from a non-void function is an error
   # with MSVC, but it is not supported on all GCC compiler versions
-  CHECK_CXX_COMPILER_FLAG(-Werror=return-type HAVE_GCC_ERROR_RETURN_TYPE)
-  IF(HAVE_GCC_ERROR_RETURN_TYPE)
+  CHECK_CXX_COMPILER_FLAG(-Werror=return-type HAVE_COMPILER_ERROR_RETURN_TYPE)
+  IF(HAVE_COMPILER_ERROR_RETURN_TYPE)
     SET(CMAKE_CXX_FLAGS_ERROR "-Werror=return-type")
-  ENDIF(HAVE_GCC_ERROR_RETURN_TYPE)
+  ENDIF(HAVE_COMPILER_ERROR_RETURN_TYPE)

   # Set up the debug CXX_FLAGS for extra warnings
   OPTION(BTK_EXTRA_COMPILER_WARNINGS "Add compiler flags to do stricter checking when building debug." OFF)
@@ -37,4 +41,4 @@
       SET(CMAKE_OLD_CXX_FLAGS_DEBUG 0 CACHE STRING "" FORCE)
     ENDIF(CMAKE_OLD_CXX_FLAGS_DEBUG)
   ENDIF(BTK_EXTRA_COMPILER_WARNINGS)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)+ENDIF(CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))


Remove variable watch debugging cmake.

Remove variable watch debugging cmake.

--- CMakeModules/FindPythonLibs.cmake
+++ CMakeModules/FindPythonLibs.cmake
@@ -45,9 +45,6 @@
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)

-include(CMakeFindFrameworks)
-
-variable_watch(PYTHON_INCLUDE_DIR)
 if(PYTHON_EXECUTABLE AND EXISTS ${PYTHON_EXECUTABLE}-config)
   set(PYTHON_CONFIG ${PYTHON_EXECUTABLE}-config CACHE PATH "" FORCE)
 else()
@@ -66,6 +63,7 @@
     separate_arguments(PYTHON_INCLUDE_DIR)
 endif()

+include(CMakeFindFrameworks)
 # Search for the python framework on Apple.
 CMAKE_FIND_FRAMEWORKS(Python)


find_package(gflags CONFIG QUIET) didn't works in Ubuntu.

Summary:
in Linux environment, `find_package(gflass)` searches `Findgflags.cmake`.
And it cannot find  https://github.com/facebook/folly/blob/master/CMake/FindGFlags.cmake , because linux is case-sensitive environment in filenames and cause error.

```
CMake Error at CMake/folly-deps.cmake:34 (message):
  Unable to determine the target name for the GFlags package.
Call Stack (most recent call first):
  CMakeLists.txt:65 (include)
```

For linux programmers, this line should find `FindGFlags.cmake` file which exists in the same directory.
Closes https://github.com/facebook/folly/pull/805

Reviewed By: yfeldblum

Differential Revision: D7505908

Pulled By: Orvid

fbshipit-source-id: c30097a25569d293df9a1bfecbee84cece260306

--- CMake/folly-deps.cmake
+++ CMake/folly-deps.cmake
@@ -22,7 +22,7 @@
 list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR})

 set(FOLLY_HAVE_LIBGFLAGS OFF)
-find_package(gflags CONFIG QUIET)
+find_package(GFlags CONFIG QUIET)
 if (gflags_FOUND)
   message(STATUS "Found gflags from package config")
   set(FOLLY_HAVE_LIBGFLAGS ON)


build

build

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -41,7 +41,7 @@
   # Module library
   file(GLOB SOURCE_FILES "zlib/*.c")
   if(NOT MSVC)
-    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-shift-negative-value")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-implicit-function-declaration -Wno-shift-negative-value")
   else()
     # C4127: conditional expression is constant
     # C4131: 'function' : uses old-style declarator


update

update

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -42,18 +42,16 @@
   file(GLOB SOURCE_FILES "zlib/*.c")
   if(MSVC)
     list(APPEND ${SOURCE_FILES} "zlib/contrib/masmx64/inffas8664.c")
-  endif()
-  add_library(zlib ${SOURCE_FILES})
-  if(MSVC)
     # C4127: conditional expression is constant
     # C4131: 'function' : uses old-style declarator
     # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
     # C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
     # C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data
-    set_target_properties(zlib PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4127 /wd4131 /wd4244 /wd4245 /wd4267")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} /wd4127 /wd4131 /wd4244 /wd4245 /wd4267")
   else()
-    set_target_properties(zlib PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-implicit-function-declaration -Wno-shift-negative-value")
+    set_source_files_properties(${SOURCE_FILES} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-implicit-function-declaration -Wno-shift-negative-value")
   endif()
+  add_library(zlib ${SOURCE_FILES})
   target_include_directories(zlib PUBLIC "zlib")
   target_link_libraries(zlib)


ENH: Added ProjectURL

ENH: Added ProjectURL

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -7,8 +7,12 @@
 SET (DROP_LOCATION "/incoming")
 SET (DROP_SITE_USER "ftpuser")
 SET (DROP_SITE_PASSWORD "public")
+SET (DROP_METHOD "ftp")
 SET (TRIGGER_SITE
        "http://${DROP_SITE}/cgi-bin/Submit-Insight-TestingResults.pl")
+
+# Project Home Page
+SET (PROJECT_URL "http://www.itk.org/")

 # Dart server configuration
 SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/cvsweb.cgi/Insight/")
@@ -27,3 +31,4 @@
 SET (SMTP_MAILHOST "public.kitware.com")
 SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com")
 SET (CONTINUOUS_BASE_URL "http://www.itk.org/Testing")
+


Add KillReader test with simultaneous readers

--- testing/adios2/engine/sst/TestSSTMxN.cmake
+++ testing/adios2/engine/sst/TestSSTMxN.cmake
@@ -65,6 +65,13 @@
   COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/run_staging_test -rd 5
     -nw 3 -nr 5 -v -p TestSst -arg 'RendezvousReaderCount:0,QueueLimit:3' -arg '--expect_time_gap')
 set_tests_properties(ADIOSSstDelayedReaderWithBlockingTest.3x5 PROPERTIES TIMEOUT 30 RUN_SERIAL 1)
+
+add_test(
+  NAME ADIOSSstKillReadersTest.3ReaderMax
+  COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/run_multi_test -test_protocol kill_readers
+    -verbose -nw 3 -nr 2 -max_readers 3 -warg 'RendezvousReaderCount:0' -rarg '--ignore_time_gap')
+set_tests_properties(ADIOSSstKillReadersTest.3ReaderMax PROPERTIES TIMEOUT 300 RUN_SERIAL 1)
+
 if(ADIOS2_HAVE_ZFP)
   add_test(
     NAME ADIOSSstZFPCompression.3x5


[cmake] added support for SM86

[cmake] added support for SM86

as per here http://arnon.dk/tag/nvcc-flags/

--- cmake/ChooseCudaCC.cmake
+++ cmake/ChooseCudaCC.cmake
@@ -65,7 +65,7 @@

   set(CC_LIST_BY_SYSTEM_PROCESSOR "")
   if(CMAKE_SYSTEM_PROCESSOR IN_LIST OTHER_SUPPORTED_PROCESSORS)
-    list(APPEND CC_LIST_BY_SYSTEM_PROCESSOR "20;21;30;35;50;52;60;61;70;75;80")
+    list(APPEND CC_LIST_BY_SYSTEM_PROCESSOR "20;21;30;35;50;52;60;61;70;75;80;86")
   endif()
   if(CMAKE_SYSTEM_PROCESSOR IN_LIST TEGRA_SUPPORTED_PROCESSORS)
     list(APPEND CC_LIST_BY_SYSTEM_PROCESSOR "32;53;62;72")
@@ -79,7 +79,7 @@
   # Shortening the lists saves a lot of compile time.
   #
   set(CUDA_MIN_CC 20)
-  set(CUDA_MAX_CC 80)
+  set(CUDA_MAX_CC 86)
   if(CUDA_VERSION_MAJOR GREATER_EQUAL 11)
     set(CUDA_MIN_CC 35)
   elseif(CUDA_VERSION_MAJOR GREATER_EQUAL 10)


Chmoded 644 `CodeCoverage.cmake`.

Chmoded 644 `CodeCoverage.cmake`.


Added missing FindPackage call

Added missing FindPackage call

--- cmake/clang-format.cmake
+++ cmake/clang-format.cmake
@@ -1,4 +1,6 @@
 # additional target to perform clang-format run, requires clang-format
+
+find_package(ClangFormat)

 set(CLANG_FORMAT_CXX_FILE_EXTENSIONS ${CLANG_FORMAT_CXX_FILE_EXTENSIONS} *.cpp *.h *.cxx *.hxx *.hpp *.cc *.ipp)
 file(GLOB_RECURSE ALL_SOURCE_FILES ${CLANG_FORMAT_CXX_FILE_EXTENSIONS})
@@ -18,17 +20,12 @@

 add_custom_target(clangformat
     COMMENT "Running clang-format to change files"
-        COMMAND ${CLANG_FORMAT_BIN}
-        -i
-        ${ALL_SOURCE_FILES}
+    COMMAND ${CLANG_FORMAT_BIN} -i ${ALL_SOURCE_FILES}
 )

 add_custom_target(format
     COMMENT "Running clang-format to change files"
-    COMMAND ${CLANG_FORMAT_BIN}
-    -style=file
-    -i
-    ${ALL_SOURCE_FILES}
+    COMMAND ${CLANG_FORMAT_BIN} -style=file -i ${ALL_SOURCE_FILES}
 )


[cmake] update error message.

[cmake] update error message.

--- cmake/coverageFunc.cmake
+++ cmake/coverageFunc.cmake
@@ -85,7 +85,7 @@
         set(RADIUM_ENABLE_TESTING "ON")
         set(ENABLE_COVERAGE "ON")
     else()
-        message( FATAL_ERROR "[Tests] Coverage requested (RADIUM_ENABLE_COVERAGE), but not activable, only supported in DEBUG with GCC.")
+        message( FATAL_ERROR "[Tests] Coverage requested (RADIUM_ENABLE_COVERAGE), but not available, only supported in DEBUG with GCC (i.e. GNU/Debug). Current configuration is ${CMAKE_CXX_COMPILER_ID}/${CMAKE_BUILD_TYPE}")
     endif()
 endmacro()


improved a bit the testsuite script

improved a bit the testsuite script

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -158,7 +158,7 @@

 # this is the initial cache to use for the binary tree, be careful to escape
 # any quotes inside of this string if you use it
-if(WIN32)
+if(WIN32 AND NOT CYGWIN)
   #message(SEND_ERROR "win32")
   set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
   SET (CTEST_INITIAL_CACHE "
@@ -168,21 +168,12 @@
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-else(WIN32)
+else(WIN32 AND NOT CYGWIN)
   SET (CTEST_INITIAL_CACHE "
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}
     SITE:STRING=${EIGEN_SITE}
   ")
-endif(WIN32)
-
-# MAKECOMMAND:STRING=nmake -i
-# CMAKE_MAKE_PROGRAM:FILEPATH=make
-# CMAKE_GENERATOR:INTERNAL=Makefiles
-SET (CTEST_INITIAL_CACHE "
-  BUILDNAME:STRING=opensuse-11_1-x86_64-${EIGEN_CXX}
-  SITE:STRING=pc-gael
-  CVSCOMMAND:FILEPATH=/usr/bin/svn"
-)
+endif(WIN32 AND NOT CYGWIN)

 # set any extra environment variables to use during the execution of the script here:


Updates to the ws WebSocket library have caused issues with the JavaScript bindings. Updating FindNodePackages.cmake to explicitly use ws version 0.5.0 pending actually figuring out what has changed

--- tools/cmake/Modules/FindNodePackages.cmake
+++ tools/cmake/Modules/FindNodePackages.cmake
@@ -58,8 +58,11 @@
         endif()
     endmacro()

-    # Check if ws WebSocket library https://github.com/einaros/ws is installed
-    InstallPackage("NODE_WS_FOUND" "ws")
+    # Check if ws WebSocket library https://github.com/websockets/ws is installed
+    # N.B. something changed between ws 0.5.0 and 0.6.0 that breaks proton js
+    # so explicitly pulling version 0.5.0
+    # TODO update javascript binding/emscripten/both to work with latest ws.
+    InstallPackage("NODE_WS_FOUND" "ws@0.5.0")

     # Check if jsdoc3 API documentation generator https://github.com/jsdoc3/jsdoc is installed
     InstallPackage("NODE_JSDOC_FOUND" "jsdoc")


Add re2c. Improve flex/bison.

Add re2c. Improve flex/bison.

--- src/inserts/functions.cmake
+++ src/inserts/functions.cmake
@@ -1086,7 +1086,21 @@
         DEPENDS ${i}
     )
     set(src ${src} ${o})
-endmacro(ragel)
+endmacro()
+
+########################################
+# MACRO re2c
+########################################
+
+macro(re2c f)
+    set(i ${SDIR}/${f})
+    set(o ${BDIR_PRIVATE}/${f}.cpp)
+    add_custom_command(OUTPUT ${o}
+        COMMAND pvt.cppan.demo.re2c.re2c -o ${o} ${i}
+        DEPENDS ${i}
+    )
+    set(src ${src} ${o})
+endmacro()

 ########################################
 # FUNCTION flex_bison
@@ -1103,18 +1117,29 @@
         set(bison bison)
     endif()

-    get_filename_component(d ${parser} DIRECTORY)
-    execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${bdir}/${d})
+    # parser
+    get_filename_component(name ${parser} NAME)
+
+    set(d ${bdir}/${name})
+    execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${d})

     add_custom_command(OUTPUT
-            ${bdir}/${parser}.cpp
-            ${bdir}/${parser}.hpp
-        COMMAND ${bison} ${FB_PARSER_ARGS} -o ${bdir}/${parser}.cpp --defines=${bdir}/${parser}.hpp ${SDIR}/${parser}
+            ${d}/${name}.cpp
+            ${d}/${name}.hpp
+        COMMAND ${bison} ${FB_PARSER_ARGS} -o ${d}/${name}.cpp --defines=${d}/${name}.hpp ${SDIR}/${parser}
         DEPENDS ${bison} ${SDIR}/${parser}
-        WORKING_DIRECTORY ${bdir}/${d}
+        WORKING_DIRECTORY ${d}
     )
-    target_include_directories(${this} PRIVATE ${bdir}/${d})
-
+    target_include_directories(${this} PRIVATE ${d})
+
+    target_sources(${this} PRIVATE
+        ${d}/${name}.cpp
+        ${d}/${name}.hpp
+    )
+
+    set(parser_header ${d}/${name}.hpp)
+
+    # lexer
     get_filename_component(d ${lexer} DIRECTORY)
     execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${bdir}/${d})

@@ -1123,14 +1148,12 @@
             #${bdir}/${lexer}.h
         #COMMAND ${flex} -o ${bdir}/${lexer}.cpp --header-file=${lexer}.h ${SDIR}/${lexer}
         COMMAND ${flex} ${FB_LEXER_ARGS} -o ${bdir}/${lexer}.cpp ${SDIR}/${lexer}
-        DEPENDS ${flex} ${SDIR}/${lexer} ${bdir}/${parser}.hpp
+        DEPENDS ${flex} ${SDIR}/${lexer} ${parser_header}
         WORKING_DIRECTORY ${bdir}
     )
     target_include_directories(${this} PRIVATE ${bdir}/${d})

     target_sources(${this} PRIVATE
-        ${bdir}/${parser}.cpp
-        ${bdir}/${parser}.hpp
         ${bdir}/${lexer}.cpp
         #${bdir}/${lexer}.h
     )
@@ -1153,20 +1176,22 @@

     set(parser_include ${BDIR_PRIVATE}/${name}_parser.h)
     set(parser_include_in ${parser_include}.in)
-    file(WRITE ${parser_include_in} "
-        #pragma once
-
-        #define THIS_PARSER_NAME    ${name}
-        #define THIS_PARSER_NAME_UP ${name_upper}
-        #define MY_PARSER           ${parser_name}
-
-        #define ${type}
-
-        #include <primitives/helper/bison.h>
-        #include <${name}.yy.hpp>
-
-        DECLARE_PARSER;
-    ")
+    file(WRITE ${parser_include_in} "#pragma once
+
+#undef THIS_PARSER_NAME
+#undef THIS_PARSER_NAME_UP
+#undef MY_PARSER
+
+#define THIS_PARSER_NAME    ${name}
+#define THIS_PARSER_NAME_UP ${name_upper}
+#define MY_PARSER           ${parser_name}
+
+#define ${type}
+#include <primitives/helper/bison.h>
+#undef ${type}
+
+#include <${name}.yy.hpp>
+")

     add_custom_command(OUTPUT ${parser_include}
         COMMAND ${CMAKE_COMMAND} -E copy_if_different ${parser_include_in} ${parser_include}


updates to .gitlab-ci.yml

updates to .gitlab-ci.yml

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -64,7 +64,7 @@
 ENDMACRO()

 EXECUTE_PROCESS(
-  COMMAND "wget http://10.123.110.90/CDash"
+  COMMAND "wget" "http://10.123.110.90/CDash"
   WORKING_DIRECTORY ${TEST_MODELS_DIRECTORY}
   RESULT_VARIABLE retcode)
 check_result()


closes #63

closes #63

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -97,7 +97,11 @@
 # Note that we need the main program for the configuration files and the tests)
 find_package(Matlab COMPONENTS MAIN_PROGRAM)

-option(USE_SYSTEM_Boost "Build using an external version of Boost" ON)
+if (UNIX)
+  option(USE_SYSTEM_Boost "Build using an external version of Boost" OFF)
+else()
+  option(USE_SYSTEM_Boost "Build using an external version of Boost" ON)
+endif()
 option(USE_SYSTEM_STIR "Build using an external version of STIR" OFF)
 option(USE_SYSTEM_HDF5 "Build using an external version of HDF5" OFF)
 option(USE_SYSTEM_ISMRMRD "Build using an external version of ISMRMRD" OFF)


ENH: Update elastix

ENH: Update elastix

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -11,7 +11,7 @@
 file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )

 set( ELASTIX_GIT_REPOSITORY ${git_protocol}://github.com/kaspermarstal/elastix )
-set( ELASTIX_GIT_TAG 54e5a7c4513bb36374c18d05951de7354f5837ca )
+set( ELASTIX_GIT_TAG 416faf3eaa7e55fdf5990ed839d1db512180fe23 )

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


Whoops, add license header

Whoops, add license header

--- tools/cmake/create_distro.cmake
+++ tools/cmake/create_distro.cmake
@@ -1,3 +1,6 @@
+# Copyright (c) 2021 ARM Limited. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0
+
 # This script provides mbed_create_distro(), a function that lets you compile multiple
 # apps that use Mbed OS without waiting for Mbed OS to build multiple times.

@@ -12,7 +15,7 @@
 # target_link_libraries(myapp2 PRIVATE mbed_for_my_app)
 # mbed_set_post_build(myapp2)
 #
-# Both myapp1 and myapp2 will act like they were linked to mbed-os mbed-storage-kvstore,
+# Both myapp1 and myapp2 will act like they were linked to mbed-os, mbed-storage-kvstore,
 # and mbed-storage-filesystem.  Note that if you actually did target_link_libraries(myapp1 PRIVATE mbed-os
 # mbed-storage-kvstore mbed-storage-filesystem), it would compile a new version of the Mbed OS source
 # files for each target. However, using mbed_create_distro(), Mbed OS will only be compiled once.


Add documentation and remove include for deleted file

--- Tensile/cmake/TensileConfig.cmake
+++ Tensile/cmake/TensileConfig.cmake
@@ -21,6 +21,19 @@
 # SOFTWARE.
 #
 ################################################################################
+
+################################################################################
+# Sample cmake usage:
+#     set(Tensile_LIBRARY_FORMAT <"msgpack"/"yaml">)
+#     set(Tensile_ROOT <path to Tensile folder>)
+#     find_package(Tensile <version> EXACT REQUIRED [HIP] PATHS ${Tensile_ROOT})
+#
+#     get_target_property(TensileHost_INCLUDES TensileHost INCLUDE_DIRECTORIES)
+#     include_directories(${TensileHost_INCLUDES})
+#     target_link_libraries(<project name> TensileHost)
+#
+#     TensileCreateLibraryFiles(<args...>)
+#

 include(CMakeParseArguments)

@@ -70,7 +83,6 @@
 endif()

 add_subdirectory("${Tensile_ROOT}/Source" "Tensile")
-#include("${Tensile_ROOT}/Source/TensileCreateLibrary.cmake")

 # Target is created for copying dependencies
 function(TensileCreateCopyTarget


fix a typo

fix a typo

--- cmake/macros/macro_check_compiler_setup.cmake
+++ cmake/macros/macro_check_compiler_setup.cmake
@@ -21,7 +21,7 @@
 #
 # This macro tries to compile and link a simple "int main(){ return 0; }
 # with the given set of provided compiler and linker flags  and an optional
-# list of libraries to link against. If the test is succesful the variable
+# list of libraries to link against. If the test is successful the variable
 # ${_var} is set to true, otherwise it is set to false.
 #


Fix typo in puglint test cmake definition

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -70,7 +70,7 @@
     WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
     COMMAND "${PUGLINT_EXECUTABLE}" -c "${PROJECT_SOURCE_DIR}/.pug-lintrc" "${path}"
   )
-  set_property(TEST "eslint_${name}" PROPERTY LABELS girder_browser girder_static_analysis)
+  set_property(TEST "puglint_${name}" PROPERTY LABELS girder_browser girder_static_analysis)
 endfunction()

 function(add_web_client_test case specFile)


backed out use of /INCREMENTAL:YES for release, conflicts with /OPT:REF and is not used

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -51,10 +51,7 @@
   set(CMAKE_CXX_FLAGS_RELEASE
       "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 /Oi /Ot /GF /Gy /arch:SSE2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
       CACHE STRING "C++ compiler release options" FORCE)
-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE"
-      CACHE STRING "Flags used by the linker during all builds" FORCE)
-  set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL:YES"
-      CACHE STRING "Flags used by the linker during release builds" FORCE)
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")

   set(CMAKE_CXX_STANDARD_LIBRARIES "")


NO_OMIT_FRAMEPOINTERS for OSX.

NO_OMIT_FRAMEPOINTERS for OSX.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -303,6 +303,12 @@
     set(ENABLE_SIGNING TRUE)
     set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
   endif (XCODE_VERSION GREATER 4.2)
+  # <FS:ND> Build without frame pointer if requested. Otherwise profiling might not work reliable. N.B. Win32 uses FP based calling by default.
+  if( NO_OMIT_FRAMEPOINTER )
+    set(CMAKE_CXX_FLAGS_RELEASE "-fno-omit-frame-pointer ${CMAKE_CXX_FLAGS_RELEASE}")
+  endif( NO_OMIT_FRAMEPOINTER )
+  # </FS:ND>
+
 endif (DARWIN)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


Squashed 'cmake/yacma/' changes from 8db9ea9..ec1c5e8

ec1c5e8 A few new compiler flags in yacma.

git-subtree-dir: cmake/yacma
git-subtree-split: ec1c5e8f0bb0c9bfa1eb4dbd6e386bfb45625dd4

--- YACMACompilerLinkerSettings.cmake
+++ YACMACompilerLinkerSettings.cmake
@@ -118,10 +118,16 @@
         # This is useful when the compiler decides the template backtrace is too verbose.
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-ftemplate-backtrace-limit=0)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-fstack-protector-all)
-        # These became available in GCC from version 5.
+        # A few suggestion flags.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-attribute=pure)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-attribute=const)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-attribute=noreturn)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-attribute=format)
+        # From GCC 5.
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wodr)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-types)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-methods)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-override)
         # From GCC 6.
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshift-negative-value)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshift-overflow=2)
@@ -133,6 +139,9 @@
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Waligned-new)
         # From GCC 8.
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wcast-align=strict)
+        # This is supposed to produce a nice graphical visualization
+        # of mismatching template errors.
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-show-template-tree)
         if(YACMA_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.999")
             # NOTE: GCC >= 6 seems to be wrongly warning about visibility attributes
             # in some situations:


CMake: Export Mumps headers to User as well

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29237 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/configure/configure_mumps.cmake
+++ deal.II/cmake/configure/configure_mumps.cmake
@@ -18,4 +18,13 @@

 SET(FEATURE_MUMPS_DEPENDS DEAL_II_WITH_MPI DEAL_II_WITH_LAPACK)

+MACRO(FEATURE_MUMPS_CONFIGURE_EXTERNAL)
+  INCLUDE_DIRECTORIES(${MUMPS_INCLUDE_DIRS})
+
+  # The user has to know the location of the MUMPS headers as well:
+  LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${MUMPS_INCLUDE_DIRS})
+
+  LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${MUMPS_LIBRARIES})
+ENDMACRO()
+
 CONFIGURE_FEATURE(MUMPS)


initialize HGTIP with empty string to avoid compile errors when call to hg tip fails due to whatever reason

--- tools/cmake/HGVersion.cmake
+++ tools/cmake/HGVersion.cmake
@@ -8,6 +8,8 @@
 #message( STATUS "${PROJECT_NAME}_HGPATHS=${${PROJECT_NAME}_HGPATHS}}" )
 exec_program( hg ${PROJECT_SOURCE_DIR} ARGS tip OUTPUT_VARIABLE __HGTIP__ )
 #message(STATUS "__HGTIP__=${__HGTIP__}")
+
+SET( CHANGESET  "\""  "\"" )

 string( REPLACE "\n" ";" __HGTIP__ ${__HGTIP__} )
 foreach(HGTIP ${__HGTIP__})


use more explicit input argument for python script call; refactor code for clarity

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -5,7 +5,14 @@
 # Standard regression test
 function(add_test_r testname )
   add_test(
-    ${testname} python ${CMAKE_CURRENT_SOURCE_DIR}/executeRegressionTestCase.py ${testname} ${CMAKE_BINARY_DIR}/glue-codes/fast/openfast ${CMAKE_SOURCE_DIR} ${TOLERANCE} ${CMAKE_SYSTEM_NAME} ${CMAKE_Fortran_COMPILER_ID}
+    ${testname} python
+       ${CMAKE_SOURCE_DIR}/reg_tests/executeRegressionTestCase.py
+       ${testname}
+       ${EXECUTABLE}
+       ${CMAKE_SOURCE_DIR}
+       ${TOLERANCE}
+       ${CMAKE_SYSTEM_NAME}
+       ${CMAKE_Fortran_COMPILER_ID}
   )
   # limit each test to 25 minutes: 1500s
   set_tests_properties(${testname} PROPERTIES TIMEOUT 1500 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" LABELS "regression")
@@ -14,7 +21,6 @@
 #===============================================================================
 # Regression tests
 #===============================================================================
-
 add_test_r(Test01)
 add_test_r(Test02)
 add_test_r(Test03)


Use the new BALL_HAS_XDR CMake flag

Use the new BALL_HAS_XDR CMake flag

--- source/CONCEPT/sources.cmake
+++ source/CONCEPT/sources.cmake
@@ -18,7 +18,11 @@
 	timeStamp.C
 	visitor.C
 	molecularInformation.C
-)
+)
+
+IF(BALL_HAS_XDR)
+	LIST(APPEND SOURCES_LIST XDRPersistenceManager.C)
+ENDIF()

 ### asio dependent sources ###
 IF (BALL_HAS_ASIO)


CMake: Recognize FreeType version 2.3.11

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -1,38 +1,38 @@
-# - Try to find FreeType
-# Once done, this will define
-#
-#  FREETYPE_FOUND - system has FreeType
-#  FREETYPE_INCLUDE_DIRS - the FreeType include directories
-#  FREETYPE_LIBRARIES - link these to use FreeType
-
-include(FindPkgMacros)
-findpkg_begin(FREETYPE)
-
-# Get path, convert backslashes as ${ENV_${var}}
-getenv_path(FREETYPE_HOME)
-
-# construct search paths
-set(FREETYPE_PREFIX_PATH ${FREETYPE_HOME} ${ENV_FREETYPE_HOME})
-create_search_paths(FREETYPE)
-# redo search if prefix path changed
-clear_if_changed(FREETYPE_PREFIX_PATH
-  FREETYPE_LIBRARY_FWK
-  FREETYPE_LIBRARY_REL
-  FREETYPE_LIBRARY_DBG
-  FREETYPE_INCLUDE_DIR
-)
-
-set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238)
-get_debug_names(FREETYPE_LIBRARY_NAMES)
-
-use_pkgconfig(FREETYPE_PKGC freetype2)
-
-findpkg_framework(FREETYPE)
-
-find_path(FREETYPE_INCLUDE_DIR NAMES freetype/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
-find_library(FREETYPE_LIBRARY_REL NAMES ${FREETYPE_LIBRARY_NAMES} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
-find_library(FREETYPE_LIBRARY_DBG NAMES ${FREETYPE_LIBRARY_NAMES_DBG} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
-make_library_set(FREETYPE_LIBRARY)
-
-findpkg_finish(FREETYPE)
-
+# - Try to find FreeType
+# Once done, this will define
+#
+#  FREETYPE_FOUND - system has FreeType
+#  FREETYPE_INCLUDE_DIRS - the FreeType include directories
+#  FREETYPE_LIBRARIES - link these to use FreeType
+
+include(FindPkgMacros)
+findpkg_begin(FREETYPE)
+
+# Get path, convert backslashes as ${ENV_${var}}
+getenv_path(FREETYPE_HOME)
+
+# construct search paths
+set(FREETYPE_PREFIX_PATH ${FREETYPE_HOME} ${ENV_FREETYPE_HOME})
+create_search_paths(FREETYPE)
+# redo search if prefix path changed
+clear_if_changed(FREETYPE_PREFIX_PATH
+  FREETYPE_LIBRARY_FWK
+  FREETYPE_LIBRARY_REL
+  FREETYPE_LIBRARY_DBG
+  FREETYPE_INCLUDE_DIR
+)
+
+set(FREETYPE_LIBRARY_NAMES freetype freetype219 freetype235 freetype238 freetype239 freetype2311)
+get_debug_names(FREETYPE_LIBRARY_NAMES)
+
+use_pkgconfig(FREETYPE_PKGC freetype2)
+
+findpkg_framework(FREETYPE)
+
+find_path(FREETYPE_INCLUDE_DIR NAMES freetype/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
+find_library(FREETYPE_LIBRARY_REL NAMES ${FREETYPE_LIBRARY_NAMES} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
+find_library(FREETYPE_LIBRARY_DBG NAMES ${FREETYPE_LIBRARY_NAMES_DBG} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
+make_library_set(FREETYPE_LIBRARY)
+
+findpkg_finish(FREETYPE)
+


CMake: and in one more place ...

CMake: and in one more place ...

--- cmake/Modules/CheckJPEGSymbols.cmake
+++ cmake/Modules/CheckJPEGSymbols.cmake
@@ -2,6 +2,10 @@

 set(CMAKE_REQUIRED_INCLUDES_SAVE "${CMAKE_REQUIRED_INCLUDES}")
 set(CMAKE_REQUIRED_LIBRARIES_SAVE "${CMAKE_REQUIRED_LIBRARIES}")
+set(CMAKE_REQUIRED_FLAGS_SAVE "${CMAKE_REQUIRED_FLAGS}")
+
+# Workaround cmake-3.25 bug.
+set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-newline-eof")

 set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES_SAVE};${JPEG_INCLUDE_DIRS}")
 set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_SAVE};${JPEG_LIBRARIES}")
@@ -10,3 +14,4 @@

 set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES_SAVE}")
 set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_SAVE}")
+set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_SAVE}")


Ensure static zinc library dependent configs passed to clients. Issue 3502.

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

--- cmake/ZincLibrarySetup.both.in.cmake
+++ cmake/ZincLibrarySetup.both.in.cmake
@@ -1,5 +1,8 @@

 IF( ZINC_USE_STATIC )
+
+    @DEPENDENT_CONFIGS@
+
     SET(ZINC_LIBRARY @ZINC_STATIC_TARGET@ CACHE STRING "The static Zinc library target" )
     ADD_DEFINITIONS( @ZINC_STATIC_DEFINITIONS@ )
 ELSE()


No missing-braces or mismatched-tags warnings on Clang

Compilation of upstream fnal-fhicl-cpp project identifies issues
with base cetbuildtools flags for Clang. The `-Wall` option enables
many more options than GNU and leads to the problems reported in
Issue #2. Additional problems were found with the mismatched-tags
warning.

Update CetCompilerSettings to add `-Wno-missing-braces` and
`-Wno-mismatched-tags` to CAUTIOUS diagnostic flags for Clang
only.

Improve documentation to describe how flags are aggregated,
and document CET_COMPILER_DIAGNOSTIC_LEVEL option for controlling
the warning level.

--- Modules/CetCompilerSettings.cmake
+++ Modules/CetCompilerSettings.cmake
@@ -40,10 +40,17 @@

 #-----------------------------------------------------------------------
 #.rst:
-# CET Build Types and Compiler Flags
-# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-#
-# CET uses the same build modes as vanilla CMake:
+# CET Base Compiler Flags and Build Types
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+#
+# Base flags for a language, that is ``CMAKE_<LANG>_FLAGS`` are always
+# set by prepending any required to the existing value of the ``CMAKE_<LANG>_FLAGS``
+# variable. This enables a project or environment to override or extend
+# flags by setting ``CMAKE_<LANG>_FLAGS`` in their own CMake scripts before
+# including this module.
+#
+# Additional flags are added depending on the build mode being used,
+# and CET uses the same set as defined by vanilla CMake:
 #
 # * ``None``: Base language flags only
 # * ``Release``: Highest optimization possible, debugging information
@@ -52,6 +59,7 @@
 # * ``RelWithDebInfo``: Moderate optimization, debugging info
 #
 # For the GNU, Clang and Intel C/C++ compilers, these correspond to
+# flags for optimization and debugging of:
 #
 # * ``Release``: ``-O3 -g``
 # * ``Debug``: ``-O0 -g``
@@ -67,13 +75,37 @@
 # Options for Controlling Compiler Warnings
 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 #
-# The warnings checked for by the compiler are defined in CET by four
-# levels:
-#
-# * cavalier
-# * cautious (default?)
-# * vigilant
-# * paranoid
+# .. cmake:variable:: CET_COMPILER_DIAGNOSTIC_LEVEL
+#
+#   Option to select the level of compiler diagnostics to add to flags.
+#   The warnings checked for by the compiler are defined in CET by four
+#   levels, with the following flags prepended to ``CMAKE_C_FLAGS`` and ``CMAKE_CXX_FLAGS``.
+#   At present, diagnostic selection is only enabled for C and C++ languages
+#   and when using the GNU, Clang or Intel compilers.
+#
+#   * ``CAVALIER``
+#
+#     * No additional flags added for any compiler
+#
+#   * ``CAUTIOUS`` (default)
+#
+#     * All ``CAVALIER`` flags for the compiler in use, plus
+#     * GNU/Intel compilers: ``-Wall -Werror=return-type``
+#     * Clang compilers: ``-Wall -Werror=return-type -Wno-mismatched-tags -Wno-missing-braces``
+#
+#   * ``VIGILANT``
+#
+#     * All ``CAUTIOUS`` flags for the compiler in use, plus
+#     * GNU/Clang compilers: ``-Wextra -Wno-long-long -Winit-self -Wno-unused-local-typedefs``
+#     * Intel compilers: ``-Wextra -Wno-long-long -Winit-self``
+#     * GNU/Clang/Intel C++ compilers also add: ``-Woverloaded-virtual``
+#
+#   * ``PARANOID``
+#
+#     * All ``VIGILANT`` flags for the compiler in use, plus
+#     * GNU/Clang/Intel compilers: ``-pedantic -Wformat-y2k -Wswitch-default -Wsync-nand -Wtrampolines -Wlogical-op -Wshadow -Wcast-qual``
+#     * NB: these are known to be GNU specific at present, but are retained until
+#       a good set for each compiler can be developed.
 #
 enum_option(CET_COMPILER_DIAGNOSTIC_LEVEL
   VALUES CAVALIER CAUTIOUS VIGILANT PARANOID
@@ -99,8 +131,23 @@
   # GNU/Clang/Intel are mostly common...
   if(CMAKE_${_lang}_COMPILER_ID MATCHES "GNU|(Apple)+Clang|Intel")
     # C/C++ common
+    # - Basic
     set(CET_COMPILER_${_lang}_DIAGFLAGS_CAVALIER "")
+
+    # - Cautious
     set(CET_COMPILER_${_lang}_DIAGFLAGS_CAUTIOUS "${CET_COMPILER_${_lang}_DIAGFLAGS_CAVALIER} -Wall -Werror=return-type")
+    # Clang's -Wall activates a larger number of warnings than GCC, and
+    # can lead to spurious warnings, so turn the following off:
+    # mismatched-tags : Seemingly only needed for systems that may
+    #                   mangle struct/class differently
+    # missing-braces  : Down to parsing/standard behaviour, see
+    #                   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25137
+    #                   https://llvm.org/bugs/show_bug.cgi?id=21629
+    if(CMAKE_${_lang}_COMPILER_ID MATCHES "(Apple)+Clang")
+      set(CET_COMPILER_${_lang}_DIAGFLAGS_CAUTIOUS "${CET_COMPILER_${_lang}_DIAGFLAGS_CAVALIER} -Wno-mismatched-tags -Wno-missing-braces")
+    endif()
+
+    # - Vigilant
     set(CET_COMPILER_${_lang}_DIAGFLAGS_VIGILANT "${CET_COMPILER_${_lang}_DIAGFLAGS_CAUTIOUS} -Wextra -Wno-long-long -Winit-self")

     # We want -Wno-unused-local-typedef in VIGILANT, but Intel doesn't know this
@@ -113,6 +160,7 @@
       set(CET_COMPILER_CXX_DIAGFLAGS_VIGILANT "${CET_COMPILER_CXX_DIAGFLAGS_VIGILANT} -Woverloaded-virtual")
     endif()

+    # - Paranoid
     set(CET_COMPILER_${_lang}_DIAGFLAGS_PARANOID "${CET_COMPILER_${_lang}_DIAGFLAGS_VIGILANT} -pedantic -Wformat-y2k -Wswitch-default -Wsync-nand -Wtrampolines -Wlogical-op -Wshadow -Wcast-qual")
   endif()
 endforeach()
@@ -133,7 +181,8 @@
 # Options for Controlling Debugging Output
 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 #
-# For compatible compilers, the DWARF debugging standard can be defined
+# For compatible compilers, the version and strictness of DWARF
+# debugging output may be controlled
 #
 option(CET_COMPILER_DWARF_STRICT "only emit DWARF debugging info at defined level" ON)
 # NB: this is a number, so again an enum option


Fixed bug in MultiConfig/cmake/build_options.cmake

Change-Id: I1fdc4e5b41001c6d320073bca8fffee47cb59c3a
Reviewed-on: https://wn-project.dnsalias.net/gerrit/375
Reviewed-by: Andrew Woloszyn <2926f0436f8103ab8257713335cf26447d8bf68a@google.com>
Try: Andrew Woloszyn <2926f0436f8103ab8257713335cf26447d8bf68a@google.com>
Tested-by: WNBot <efa0942020584fb66fb8bea377b59e48fa0f85ef@gmail.com>

--- Overlays/MultiConfig/cmake/build_options.cmake
+++ Overlays/MultiConfig/cmake/build_options.cmake
@@ -93,8 +93,10 @@
       set(overlay_group "")
     endif()

-    string(REPLACE "/" "\\" dir_name ${dir_name})
-    source_group("${overlay_group}${dir_name}" FILES "${existing_full_source}")
+    if (dir_name)
+      string(REPLACE "/" "\\" dir_name ${dir_name})
+      source_group("${overlay_group}${dir_name}" FILES "${existing_full_source}")
+    endif()
   endforeach()
 endmacro()


Find binaries on Windows in config script

--- gloperate-config.cmake
+++ gloperate-config.cmake
@@ -3,26 +3,37 @@

 # GLOPERATE_LIBRARIES
 # GLOPERATE_INCLUDES
+# GLOPERATE_BINARIES

 # GLOPERATE_LIBRARIES
 # GLOPERATE_LIBRARY_[RELEASE|DEBUG]
 # GLOPERATE_INCLUDE_DIR
+# GLOPERATE_BINARIES
+# GLOPERATE_BINARY_[RELEASE|DEBUG]

 # GLOPERATE_QT_LIBRARIES
 # GLOPERATE_QT_LIBRARY_[RELEASE|DEBUG]
 # GLOPERATE_QT_INCLUDE_DIR
+# GLOPERATE_QT_BINARIES
+# GLOPERATE_QT_BINARY_[RELEASE|DEBUG]

 # GLOPERATE_GLFW_LIBRARIES
 # GLOPERATE_GLFW_LIBRARY_[RELEASE|DEBUG]
 # GLOPERATE_GLFW_INCLUDE_DIR
+# GLOPERATE_GLFW_BINARIES
+# GLOPERATE_GLFW_BINARY_[RELEASE|DEBUG]

 # GLOPERATE_OSG_LIBRARIES
 # GLOPERATE_OSG_LIBRARY_[RELEASE|DEBUG]
 # GLOPERATE_OSG_INCLUDE_DIR
+# GLOPERATE_OSG_BINARIES
+# GLOPERATE_OSG_BINARY_[RELEASE|DEBUG]

 # GLOPERATE_QTWIDGETS_LIBRARIES
 # GLOPERATE_QTWIDGETS_LIBRARY_[RELEASE|DEBUG]
 # GLOPERATE_QTWIDGETS_INCLUDE_DIR
+# GLOPERATE_QTWIDGETS_BINARIES
+# GLOPERATE_QTWIDGETS_BINARY_[RELEASE|DEBUG]

 include(FindPackageHandleStandardArgs)
@@ -36,6 +47,7 @@

 set(GLOPERATE_INCLUDES "")
 set(GLOPERATE_LIBRARIES "")
+set(GLOPERATE_BINARIES "")

 set(LIB_PATHS
     ${GLOPERATE_DIR}/build
@@ -98,9 +110,42 @@
     # message("${LIB_NAME_UPPER}_LIBRARY         = ${${LIB_NAME_UPPER}_LIBRARY}")

     if (${LIB_NAME_UPPER}_LIBRARIES)
-	list(APPEND GLOPERATE_INCLUDES ${${LIB_NAME_UPPER}_INCLUDE_DIR})
-	list(APPEND GLOPERATE_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARIES})
+        list(APPEND GLOPERATE_INCLUDES ${${LIB_NAME_UPPER}_INCLUDE_DIR})
+        list(APPEND GLOPERATE_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARIES})
     endif ()
+
+    # find binaries
+    if (WIN32 AND ${LIB_NAME_UPPER}_LIBRARIES)
+        set(${LIB_NAME_UPPER}_BINARIES "")
+
+        find_file(${LIB_NAME_UPPER}_BINARY_RELEASE
+            NAMES ${LIB_NAME}.dll
+            PATHS
+            ${GLOPERATE_DIR}/bin
+            ${GLOPERATE_DIR}/build/Release
+            ${GLOPERATE_DIR}/build-release
+            DOC "The ${LIB_NAME_UPPER} binary")
+
+        find_file(${LIB_NAME_UPPER}_BINARY_DEBUG
+            NAMES ${LIB_NAME}d.dll
+            PATHS
+            ${GLOPERATE_DIR}/bin
+            ${GLOPERATE_DIR}/build/Debug
+            ${GLOPERATE_DIR}/build-debug
+            DOC "The ${LIB_NAME_UPPER} debug binary")
+
+        if(NOT ${LIB_NAME_UPPER}_BINARY_RELEASE STREQUAL "${LIB_NAME_UPPER}_BINARY_RELEASE-NOTFOUND")
+            list(APPEND ${LIB_NAME_UPPER}_BINARIES ${${LIB_NAME_UPPER}_BINARY_RELEASE})
+        endif()
+
+        if(NOT ${LIB_NAME_UPPER}_BINARY_DEBUG STREQUAL "${LIB_NAME_UPPER}_BINARY_DEBUG-NOTFOUND")
+            list(APPEND ${LIB_NAME_UPPER}_BINARIES ${${LIB_NAME_UPPER}_BINARY_DEBUG})
+        endif()
+
+        if (${LIB_NAME_UPPER}_BINARIES)
+            list(APPEND GLOPERATE_BINARIES ${${LIB_NAME_UPPER}_BINARIES})
+        endif()
+    endif()
 endmacro()

 find(gloperate gloperate/gloperate_api.h ${LIB_PATHS})


Set up more dependencies to control the flow

--- test/module_test.cmake
+++ test/module_test.cmake
@@ -43,7 +43,7 @@
   COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=cpu ${DIRECTIVE_CPU} ${DEBUG_FLAG} -J ${XMOD_DIR} -o ${OUTPUT_FILE_CPU} ${ORIGINAL_FILE}
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   DEPENDS ${ORIGINAL_FILE}
-  COMMENT "Translating CLAW directive with ${CLAWFC} for CPU target"
+  COMMENT "Translating CLAW directive with ${CLAWFC} for CPU target on file ${ORIGINAL_FILE}"
 )

 # Execute the CLAW compiler for GPU target
@@ -53,7 +53,7 @@
   COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=gpu ${DIRECTIVE_GPU} ${DEBUG_FLAG} -J ${XMOD_DIR} -o ${OUTPUT_FILE_GPU} ${ORIGINAL_FILE}
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   DEPENDS ${ORIGINAL_FILE}
-  COMMENT "Translating CLAW directive with ${CLAWFC} for GPU target"
+  COMMENT "Translating CLAW directive with ${CLAWFC} for GPU target on file ${ORIGINAL_FILE}"
 )

 if(HAS_EXTRA_MOD)
@@ -63,8 +63,8 @@
     COMMAND touch ${ORIGINAL_FILE_EXTRA} # to force new compilation
     COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=cpu ${DIRECTIVE_CPU} ${DEBUG_FLAG} -J ${XMOD_DIR} -o ${OUTPUT_FILE_EXTRA_CPU} ${ORIGINAL_FILE_EXTRA}
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    DEPENDS ${ORIGINAL_FILE_EXTRA}
-    COMMENT "Translating CLAW directive with ${CLAWFC} for CPU target"
+    DEPENDS ${ORIGINAL_FILE_EXTRA} ${OUTPUT_FILE_CPU}
+    COMMENT "Translating CLAW directive with ${CLAWFC} for CPU target on file ${ORIGINAL_FILE_EXTRA}"
   )

   # Execute the CLAW compiler for GPU target
@@ -73,8 +73,8 @@
     COMMAND touch ${ORIGINAL_FILE_EXTRA} # to force new compilation
     COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=gpu ${DIRECTIVE_GPU} ${DEBUG_FLAG} -J ${XMOD_DIR} -o ${OUTPUT_FILE_EXTRA_GPU} ${ORIGINAL_FILE_EXTRA}
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    DEPENDS ${ORIGINAL_FILE_EXTRA}
-    COMMENT "Translating CLAW directive with ${CLAWFC} for GPU target"
+    DEPENDS ${ORIGINAL_FILE_EXTRA} ${OUTPUT_FILE_GPU}
+    COMMENT "Translating CLAW directive with ${CLAWFC} for GPU target on file ${ORIGINAL_FILE_EXTRA}"
   )

   # Target for the transformation


Compat with cmake 2.8.11

Compat with cmake 2.8.11

--- cmake/Modules/FindCapnproto.cmake
+++ cmake/Modules/FindCapnproto.cmake
@@ -43,7 +43,7 @@
   foreach(FIL ${ARGN})
     get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
     get_filename_component(FIL_WE ${FIL} NAME_WE)
-    get_filename_component(FIL_DIR ${ABS_FIL} DIRECTORY)
+    get_filename_component(FIL_DIR ${ABS_FIL} PATH)

     list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.capnp.c++")
     list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.capnp.h")


Lib preference order now based on whether we're building dynamic or static libs.

--- cmake/modules/FindLibCrypto.cmake
+++ cmake/modules/FindLibCrypto.cmake
@@ -17,13 +17,23 @@
         HINTS ${CMAKE_INSTALL_PREFIX}/include
         )

-find_library(LibCrypto_LIBRARY
-        NAMES libcrypto.so libcrypto.a
-        HINTS ${CMAKE_INSTALL_PREFIX}/build/crypto
-        ${CMAKE_INSTALL_PREFIX}/build
-        ${CMAKE_INSTALL_PREFIX}
-        ${CMAKE_INSTALL_PREFIX}/lib
-       )
+if (BUILD_SHARED_LIBS)
+    find_library(LibCrypto_LIBRARY
+            NAMES libcrypto.so libcrypto.a
+            HINTS ${CMAKE_INSTALL_PREFIX}/build/crypto
+            ${CMAKE_INSTALL_PREFIX}/build
+            ${CMAKE_INSTALL_PREFIX}
+            ${CMAKE_INSTALL_PREFIX}/lib
+    )
+else()
+    find_library(LibCrypto_LIBRARY
+            NAMES libcrypto.a libcrypto.so
+            HINTS ${CMAKE_INSTALL_PREFIX}/build/crypto
+            ${CMAKE_INSTALL_PREFIX}/build
+            ${CMAKE_INSTALL_PREFIX}
+            ${CMAKE_INSTALL_PREFIX}/lib
+    )
+endif()

 include(FindPackageHandleStandardArgs)


Add search for alternate config header name

--- cmakemodule/FindSuiteSparse.cmake
+++ cmakemodule/FindSuiteSparse.cmake
@@ -138,6 +138,11 @@
 		SET(suitesparseComp_ALT "${suitesparseComp}") # Alternative names
 		if("${suitesparseComp}" STREQUAL "CXSPARSE")
 			SET(suitesparseComp_ALT "cs") # Alternative name of CXSparse
+		endif()
+
+		## Special case: suitesparseconfig library is named "libsuitesparseconfig.*" but headers are "SuiteSparse_config.h":
+		if("${suitesparseCompUC}" STREQUAL "SUITESPARSECONFIG")
+			SET(suitesparseComp_ALT "SuiteSparse_config") # Alternative name of suitesparseconfig
 		endif()

 		## try to find include dir (looking for very important header file)


build: make the linker script passing to the linker portable

--- build/cmake/arch.cmake
+++ build/cmake/arch.cmake
@@ -33,7 +33,7 @@
 endfunction()

 function(kernel_ldscript LDSCRIPT)
-  set(KERNEL_LD_FLAGS "${KERNEL_LD_FLAGS} -T\"${LDSCRIPT}\"" PARENT_SCOPE)
+  set(KERNEL_LD_FLAGS "${KERNEL_LD_FLAGS} -Wl,-T\"${LDSCRIPT}\"" PARENT_SCOPE)
   set_source_files_properties(
     kernel/entry.c
     PROPERTIES


ENH: Update elastix to revision 5293

ENH: Update elastix to revision 5293

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -2,7 +2,7 @@

 file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )
 set( ELASTIX_REPOSITORY http://github.com/kaspermarstal/elastix )
-set( ELASTIX_TAG 90fc77940e59277300ef911ae4460017b0946e1f )
+set( ELASTIX_TAG 18b00fab2328670da448e593362ba9f3091b8cc8 )

 ExternalProject_Add( ${proj}
   GIT_REPOSITORY ${ELASTIX_REPOSITORY}


ffmpeg: update 4.0 (master)

ffmpeg: update 4.0 (master)

- ffmpeg 4.0.2
- openh264 1.8.0

--- 3rdparty/ffmpeg/ffmpeg.cmake
+++ 3rdparty/ffmpeg/ffmpeg.cmake
@@ -1,9 +1,9 @@
-# Binaries branch name: ffmpeg/master_20180220
-# Binaries were created for OpenCV: 9819ebc0954c2df62943ebbd5936d325e5dc89e1
-ocv_update(FFMPEG_BINARIES_COMMIT "0a0e88972a7ea97708378d0488a65f83e7cc5e69")
-ocv_update(FFMPEG_FILE_HASH_BIN32 "b8120c07962d591e2e9071a1bf566fd0")
-ocv_update(FFMPEG_FILE_HASH_BIN64 "dc9c50e7b05482acc25d6ce0ac61bf1d")
-ocv_update(FFMPEG_FILE_HASH_CMAKE "3b90f67f4b429e77d3da36698cef700c")
+# Binaries branch name: ffmpeg/master_20180918
+# Binaries were created for OpenCV: e628fd7bce2b5d64c36b5bdc55a37c0ae78bc907
+ocv_update(FFMPEG_BINARIES_COMMIT "c88df798e9dc3d63840f913714563a730245464a")
+ocv_update(FFMPEG_FILE_HASH_BIN32 "48c95ce37d5aa6b15b3ad116e331ebc1")
+ocv_update(FFMPEG_FILE_HASH_BIN64 "d33eca57ae1cfd6287b975b98125f7a3")
+ocv_update(FFMPEG_FILE_HASH_CMAKE "5fd49e1b84e9f402ca155e27c92d2ce9")

 function(download_win_ffmpeg script_var)
   set(${script_var} "" PARENT_SCOPE)


Install ressources according to OGRE_LIB_DIRECTORY .

--HG--
branch : v1-7

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -46,10 +46,10 @@
   set(OGRE_MEDIA_PATH "share/OGRE/media")
   set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
   set(OGRE_MEDIA_DIR_DBG "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
-  set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/lib/OGRE")
-  set(OGRE_PLUGIN_DIR_DBG "${CMAKE_INSTALL_PREFIX}/lib/OGRE")
-  set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/lib/OGRE/Samples")
-  set(OGRE_SAMPLES_DIR_DBG "${CMAKE_INSTALL_PREFIX}/lib/OGRE/Samples")
+  set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE")
+  set(OGRE_PLUGIN_DIR_DBG "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE")
+  set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE/Samples")
+  set(OGRE_SAMPLES_DIR_DBG "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE/Samples")
   set(OGRE_CFG_INSTALL_PATH "share/OGRE")
 endif ()


0001021: add directory to findCoin cmake

--- cMake/FindCoin3D.cmake
+++ cMake/FindCoin3D.cmake
@@ -13,6 +13,7 @@
     FIND_PATH(COIN3D_INCLUDE_DIR Inventor/So.h
       /usr/include
       /usr/local/include
+      /usr/include/coin
     )

     FIND_LIBRARY(COIN3D_LIBRARY Coin


libgit2: don't put /usr in the FIND_ROOT_PATH

Otherwise, cmake will find some cygwin files incompatible for cross compilation to mingw32
I don't know why the build did succeed once in cygwin64, it does not in cygwin32 without this fix.

--- build.win32x86/third-party/Toolchain-cross-mingw32-cygwin.cmake
+++ build.win32x86/third-party/Toolchain-cross-mingw32-cygwin.cmake
@@ -7,7 +7,7 @@
 SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)

 # here is the target environment located
-SET(CMAKE_FIND_ROOT_PATH  /usr/i686-w64-mingw32 /usr )
+SET(CMAKE_FIND_ROOT_PATH  /usr/i686-w64-mingw32 )

 # adjust the default behaviour of the FIND_XXX() commands:
 # search headers and libraries in the target environment, search


Further test scripting coverage.

Further test scripting coverage.

--- ctest-scripts/ExperimentalTest.cmake
+++ ctest-scripts/ExperimentalTest.cmake
@@ -20,9 +20,9 @@

 # Set locations of src/build
-set (CTEST_DASHBOARD_ROOT /Users/wfisher/Desktop/ctest/Dashboards)
-SET (CTEST_SOURCE_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}/src-snapshot")
-SET (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/build")
+set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}/Dashboards")
+SET (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/netcdf-src")
+SET (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/builds/build-exp")

 #####
 # End Test/System Setup
@@ -30,7 +30,8 @@

 set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
-set (CTEST_SVN_COMMAND "/opt/local/bin/svn")
+#set (CTEST_SVN_COMMAND "/opt/local/bin/svn")
+find_program(CTEST_SVN_COMMAND NAMES svn)
 set (CTEST_SVN_CHECKOUT "\"${CTEST_SVN_COMMAND} co https://sub.unidata.ucar.edu/netcdf/branches/netcdf-cmake ${CTEST_SOURCE_DIRECTORY}")
 set (CTEST_COMMAND "\"${CTEST_EXECUTABLE_NAME} -D Experimental\"")


iOS: set cache variables

iOS: set cache variables

--- iOS.cmake
+++ iOS.cmake
@@ -26,10 +26,10 @@
   message(FATAL_ERROR "This toolchain is available only on Xcode")
 endif()

-set(CMAKE_OSX_SYSROOT "iphoneos" CACHE STRING "System root for iOS")
+set(CMAKE_OSX_SYSROOT "iphoneos" CACHE STRING "System root for iOS" FORCE)

 # Skip compiler check:
 #     http://cmake.org/Bug/view.php?id=12288
 #     http://code.google.com/p/ios-cmake/issues/detail?id=1
-set(CMAKE_CXX_COMPILER_WORKS TRUE)
-set(CMAKE_C_COMPILER_WORKS TRUE)
+set(CMAKE_CXX_COMPILER_WORKS TRUE CACHE BOOL "Skip compiler check" FORCE)
+set(CMAKE_C_COMPILER_WORKS TRUE CACHE BOOL "Skip compiler check" FORCE)


Added some source_group definitions to CMake build system.

--- cmake/BALLMacros.cmake
+++ cmake/BALLMacros.cmake
@@ -111,7 +111,7 @@

 	ADD_FLEX_BISON_DEPENDENCY(${BASENAME}Lexer ${BASENAME}Parser)

-	SET(BALL_sources ${BALL_sources} ${PARSEROUTPUT} ${LEXEROUTPUT})
+	SET(BALL_sources ${BALL_sources} ${PARSERINPUT} ${PARSEROUTPUT} ${LEXERINPUT} ${LEXEROUTPUT})

 	SOURCE_GROUP("Source Files\\\\${GROUP}" FILES ${PARSEROUTPUT} ${LEXEROUTPUT})
 	SOURCE_GROUP("Parser Files\\\\${GROUP}" FILES ${PARSERINPUT})
@@ -155,9 +155,13 @@
 		SET(OUTFILES)
 		QT4_WRAP_UI_BALL(OUTFILES ${UI_FILE})

-		### Setting a source group won't work here  ###
-		### since the files do not really exist yet ###
-		SET(VIEW_sources ${VIEW_sources} "${OUTFILES}")
+		### and add them to the sources ###
+		SET(VIEW_sources ${VIEW_sources} "${OUTFILES}" ${UI_FILE})
+
+		### source group definition ###
+		STRING(REGEX REPLACE "/" "\\\\" S_GROUP ${GROUP})
+		SOURCE_GROUP("Source Files\\\\${S_GROUP}" FILES ${OUTFILES})
+		SOURCE_GROUP("UI Files" FILES ${UI_FILE})
 	ENDFOREACH()
 ENDMACRO()

@@ -177,8 +181,11 @@
 		### generate the corresponding moc files ###
 		QT4_GENERATE_MOC(${MOC_FILE} ${OUTFILE})

-		### Setting a source group won't work here  ###
-		### since the files do not really exist yet ###
+		### and add them to the sources ###
 		SET(VIEW_sources ${VIEW_sources} ${OUTFILE})
+
+		### source group definition ###
+		STRING(REGEX REPLACE "/" "\\\\" S_GROUP ${GROUP})
+		SOURCE_GROUP("Source Files\\\\${S_GROUP}" FILES ${OUTFILE})
 	ENDFOREACH()
 ENDMACRO()


Fix CMake circular dependencies issue

Fix CMake circular dependencies issue

--- cmake/CodeFormat.cmake
+++ cmake/CodeFormat.cmake
@@ -14,7 +14,7 @@
     COMMENT "Copying diff-clang-format.py"
 )
 add_custom_target(
-    diff-clang-format.py ALL
+    diff-clang-format_py ALL
     DEPENDS ${CMAKE_BINARY_DIR}/diff-clang-format.py
 )
 add_custom_target(format-cpp
@@ -25,8 +25,6 @@
         --config=${CMAKE_SOURCE_DIR}/.clang-format
         --apply-patch
         ${CMAKE_SOURCE_DIR}/cpp
-    DEPENDS
-        ${CMAKE_BINARY_DIR}/diff-clang-format.py
 )
 file(WRITE
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/check_format_cpp.sh


Pass BUILD_GAME_NACL_NEXE along when building nacl vms

--- cmake/DaemonGame.cmake
+++ cmake/DaemonGame.cmake
@@ -80,6 +80,7 @@
                     -DDEPS_DIR=${DEPS_DIR}
                     -DBUILD_CGAME=${BUILD_CGAME}
                     -DBUILD_SGAME=${BUILD_SGAME}
+                    -DBUILD_GAME_NACL_NEXE=${BUILD_GAME_NACL_NEXE}
                     -DBUILD_GAME_NACL=1
                     -DBUILD_GAME_NATIVE_DLL=0
                     -DBUILD_GAME_NATIVE_EXE=0


Use list(APPEND ...) to build lists avoiding excessive ";"s

--- cmake/Extensions.cmake
+++ cmake/Extensions.cmake
@@ -36,6 +36,14 @@
 # These options convert the extension_name to upper case first and remove any
 # leading underscores.  So add_python_extension(_foo ...) will create the
 # options ENABLE_FOO and BUILTIN_FOO.
+
+macro(append_list_in_cache L)
+  if(ARGN)
+    list(APPEND ${L} ${ARGN})
+    list(REMOVE_DUPLICATES ${L})
+    set(${L} "${${L}}" CACHE INTERNAL "" FORCE)
+  endif()
+endmacro()

 function(add_python_extension name)
     set(options BUILTIN)
@@ -107,11 +115,11 @@

     if(BUILTIN_${upper_name})
         # This will be compiled into libpython instead of as a separate library
-        set(builtin_extensions "${builtin_extensions}${name};" CACHE INTERNAL "" FORCE)
-        set(builtin_source "${builtin_source}${absolute_sources};" CACHE INTERNAL "" FORCE)
-        set(builtin_link_libraries "${builtin_link_libraries}${ADD_PYTHON_EXTENSION_LIBRARIES};" CACHE INTERNAL "" FORCE)
-        set(builtin_includedirs "${builtin_includedirs}${ADD_PYTHON_EXTENSION_INCLUDEDIRS};" CACHE INTERNAL "" FORCE)
-        set(builtin_definitions "${builtin_definitions}${ADD_PYTHON_EXTENSION_DEFINITIONS};" CACHE INTERNAL "" FORCE)
+        append_list_in_cache(builtin_extensions ${name})
+        append_list_in_cache(builtin_source ${absolute_sources})
+        append_list_in_cache(builtin_link_libraries ${ADD_PYTHON_EXTENSION_LIBRARIES})
+        append_list_in_cache(builtin_includedirs ${ADD_PYTHON_EXTENSION_INCLUDEDIRS})
+        append_list_in_cache(builtin_definitions ${ADD_PYTHON_EXTENSION_DEFINITIONS})
     elseif(WIN32 AND NOT BUILD_SHARED)
         # Extensions cannot be built against a static libpython on windows
     else(BUILTIN_${upper_name})


cleanup FindOctave

cleanup FindOctave

--- cmake/FindOctave.cmake
+++ cmake/FindOctave.cmake
@@ -155,9 +155,6 @@
   )
 endmacro ()

-message(DEBUG "Octave libraries : ${OCTAVE_LIBRARIES}")
-message(DEBUG "VERSION_VAR : ${OCTAVE_VERSION_STRING}")
-
 # handle REQUIRED and QUIET options
 include ( FindPackageHandleStandardArgs )
 if ( CMAKE_VERSION LESS 2.8.3 )


Find OpenCV independent of version

Find OpenCV independent of version

The CMake script has been updated to find OpenCV independent of version.
Also added support for Visual Studio 2015.

--- cmake/FindOpenCV.cmake
+++ cmake/FindOpenCV.cmake
@@ -17,7 +17,22 @@
 FIND_PATH(OPENCV_INCLUDE_DIRS NAMES opencv2/opencv.hpp HINTS
 	${OPENCV_ROOT_DIR}/build/include/ )

-	# Determine architecture
+
+# Try to ascertain the version of the SDK
+IF(OPENCV_INCLUDE_DIRS)
+	SET(_OPENCV_VERSION_FILE "${OPENCV_INCLUDE_DIRS}/opencv2/core/version.hpp")
+	IF(EXISTS "${_OPENCV_VERSION_FILE}")
+		FILE(STRINGS "${_OPENCV_VERSION_FILE}" _OPENCV_VERSION_FILE_CONTENTS REGEX "#define CV_VERSION_[A-Z]+[ \t]+[0-9]+")
+		STRING(REGEX REPLACE ".*#define CV_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" OPENCV_VERSION_MAJOR ${_OPENCV_VERSION_FILE_CONTENTS})
+		STRING(REGEX REPLACE ".*#define CV_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" OPENCV_VERSION_MINOR ${_OPENCV_VERSION_FILE_CONTENTS})
+		STRING(REGEX REPLACE ".*#define CV_VERSION_REVISION[ \t]+([0-9]+).*" "\\1" OPENCV_VERSION_REVISION ${_OPENCV_VERSION_FILE_CONTENTS})
+
+		SET(OPENCV_VERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_REVISION}" CACHE INTERNAL "The version of OpenCV which was detected")
+		SET(_OPENCV_VERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_REVISION}" CACHE INTERNAL "The short version of the OpenCV version number")
+	ENDIF()
+ENDIF()
+
+# Determine architecture
 IF(CMAKE_SIZEOF_VOID_P MATCHES "8")
 	IF(MSVC)
 		SET(_OPENCV_LIB_ARCH "x64")
@@ -44,6 +59,10 @@
 	IF(MSVC12)
 		SET(_OPENCV_MSVC_DIR "vc12")
 	ENDIF()
+	# Visual Studio 2015
+	IF(MSVC14)
+		SET(_OPENCV_MSVC_DIR "vc14")
+	ENDIF()
 ENDIF()

 # Append "d" to debug libs on windows platform
@@ -51,9 +70,9 @@
 	SET(CMAKE_DEBUG_POSTFIX d)
 ENDIF()

-# Look for the library.
-FIND_LIBRARY(OPENCV_LIBRARY NAMES opencv_world300 HINTS ${OPENCV_ROOT_DIR} ${OPENCV_ROOT_DIR}/build/${_OPENCV_LIB_ARCH}/${_OPENCV_MSVC_DIR}/lib)
-FIND_LIBRARY(OPENCV_LIBRARY_DEBUG NAMES opencv_world300${CMAKE_DEBUG_POSTFIX} HINTS ${OPENCV_ROOT_DIR} ${OPENCV_ROOT_DIR}/build/${_OPENCV_LIB_ARCH}/${_OPENCV_MSVC_DIR}/lib)
+# Look for the library
+FIND_LIBRARY(OPENCV_LIBRARY NAMES opencv_world${_OPENCV_VERSION} HINTS ${OPENCV_ROOT_DIR} ${OPENCV_ROOT_DIR}/build/${_OPENCV_LIB_ARCH}/${_OPENCV_MSVC_DIR}/lib)
+FIND_LIBRARY(OPENCV_LIBRARY_DEBUG NAMES opencv_world${_OPENCV_VERSION}${CMAKE_DEBUG_POSTFIX} HINTS ${OPENCV_ROOT_DIR} ${OPENCV_ROOT_DIR}/build/${_OPENCV_LIB_ARCH}/${_OPENCV_MSVC_DIR}/lib)

 MARK_AS_ADVANCED(OPENCV_LIBRARY)
 MARK_AS_ADVANCED(OPENCV_LIBRARY_DEBUG)
@@ -62,7 +81,7 @@

 # Find binaries i.e. DLL path
 IF (MSVC)
-	FIND_PATH(OPENCV_BIN_DIR opencv_world300.dll HINTS ${OPENCV_ROOT_DIR} ${OPENCV_ROOT_DIR}/build/${_OPENCV_LIB_ARCH}/${_OPENCV_MSVC_DIR}/bin)
+	FIND_PATH(OPENCV_BIN_DIR opencv_world${_OPENCV_VERSION}.dll HINTS ${OPENCV_ROOT_DIR} ${OPENCV_ROOT_DIR}/build/${_OPENCV_LIB_ARCH}/${_OPENCV_MSVC_DIR}/bin)
 	MARK_AS_ADVANCED(OPENCV_BIN_DIR)
 ENDIF(MSVC)


add --leak-check=full to unit test valgrind wrapper

--- cmake/TestHelper.cmake
+++ cmake/TestHelper.cmake
@@ -2,7 +2,7 @@
     add_executable(Test${testName} Test${testName}.cpp ${COMMON_SOURCES})
     target_link_libraries(Test${testName} ${TEST_LIBS} ${GTEST_BOTH_LIBRARIES})
     if($ENV{BC_UNIT_TEST_VG})
-        add_test(NAME Test${testName} COMMAND valgrind --error-exitcode=1 $<TARGET_FILE:Test${testName}>)
+        add_test(NAME Test${testName} COMMAND valgrind --leak-check=full --error-exitcode=1 $<TARGET_FILE:Test${testName}>)
     else()
         add_test(NAME Test${testName} COMMAND Test${testName})
     endif()


cmake: extensions.cmake: use blocklist instead in comment

There is a comment which needed to be rephrased for inclusive
language. This commit replaces it with the recommended
replacement.

Signed-off-by: Jennifer Williams <7953176682adde4345743ea99dbf2682fb898b9d@intel.com>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -1057,7 +1057,7 @@
 function(zephyr_check_compiler_flag_hardcoded lang option check exists)
   # Various flags that are not supported for CXX may not be testable
   # because they would produce a warning instead of an error during
-  # the test.  Exclude them by toolchain-specific blacklist.
+  # the test.  Exclude them by toolchain-specific blocklist.
   if((${lang} STREQUAL CXX) AND ("${option}" IN_LIST CXX_EXCLUDED_OPTIONS))
     set(check 0 PARENT_SCOPE)
     set(exists 1 PARENT_SCOPE)


separated unittest build and unittest execution, so executable persists and timings are separated

--- cmake-d/UseDUnittest.cmake
+++ cmake-d/UseDUnittest.cmake
@@ -36,7 +36,11 @@
         list(APPEND SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
     endforeach()

+
+    add_test(NAME build_${_testtarget}
+        COMMAND ${CMAKE_D_COMPILER} ${CMAKE_D_FLAGS} ${CMAKE_D_COMPILE_OPTIONS_PIC} ${INCLUDES} ${CMAKE_LIBRARY_PATH_FLAG}${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${LIBS} -of${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_testtarget} ${SOURCES} -unittest ${main_unittest})
+
     add_test(NAME ${_testtarget}
-        COMMAND ${CMAKE_D_COMPILER} ${CMAKE_D_FLAGS} ${CMAKE_D_COMPILE_OPTIONS_PIC} ${INCLUDES} ${CMAKE_LIBRARY_PATH_FLAG}${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${LIBS} -of${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_testtarget} ${SOURCES} -unittest -run ${main_unittest})
+        COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_testtarget})
     set_tests_properties(${_testtarget} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
 endmacro()


Require fakeroot for prepare_debian

Require fakeroot for prepare_debian

--- cmake/ArangoDBMacros.cmake
+++ cmake/ArangoDBMacros.cmake
@@ -231,8 +231,9 @@
 endif()

 find_program(DH_INSTALLINIT dh_installinit)
-
-if (DH_INSTALLINIT)
+find_program(FAKEROOT fakeroot)
+
+if (DH_INSTALLINIT AND FAKEROOT)
   add_custom_target(prepare_debian)
   SET(DEBIAN_CONTROL_EXTRA_BASENAMES
     postinst


MINIFICPP-1968 Replace libcurl download url

Signed-off-by: Ferenc Gerlits <935a9a037c0eb96fabee8eebe1d7089d664f797c@gmail.com>
This closes #1440

--- cmake/BundledLibcURL.cmake
+++ cmake/BundledLibcURL.cmake
@@ -61,7 +61,7 @@
     # Build project
     ExternalProject_Add(
             curl-external
-            URL "https://curl.haxx.se/download/curl-7.64.0.tar.gz"
+            URL "https://github.com/curl/curl/releases/download/curl-7_64_0/curl-7.64.0.tar.gz"
             URL_HASH "SHA256=cb90d2eb74d4e358c1ed1489f8e3af96b50ea4374ad71f143fa4595e998d81b5"
             SOURCE_DIR "${BINARY_DIR}/thirdparty/curl-src"
             LIST_SEPARATOR % # This is needed for passing semicolon-separated lists


Fixed the Win32 Visual Studio Path based on the downloaded project source.

--- cmake/FindCHIPMUNK2D.cmake
+++ cmake/FindCHIPMUNK2D.cmake
@@ -9,15 +9,15 @@

 if(WIN32 AND MSVC_VERSION AND CHIPMUNK2D_MSVC)
 	if(MSVC_VERSION EQUAL 1600)
-		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc10/chipmunk)
+		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc10/chipmunk/Win32)
 	elseif(MSVC_VERSION EQUAL 1700)
-		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc10/chipmunk)
+		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc10/chipmunk/Win32)
 	elseif(MSVC_VERSION EQUAL 1800)
-		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc12/chipmunk)
+		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc12/chipmunk/Win32)
 	elseif(MSVC_VERSION EQUAL 1900)
-		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc14/chipmunk)
+		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc14/chipmunk/Win32)
 	else()
-		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc14/chipmunk)
+		set (CHIPMUNK2D_VC_PATH ${CHIPMUNK2D_ROOT}/msvc/vc14/chipmunk/Win32)
 	endif()

 	if(CHIPMUNK2D_STATIC_LIBRARIES)


CMake: revisit coverage flags

CMake: revisit coverage flags

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -26,26 +26,16 @@
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")

 SET(CMAKE_CXX_FLAGS_COVERAGE
-    "-g -O0 -fprofile-arcs -ftest-coverage"
+    "-fprofile-arcs -ftest-coverage"
     CACHE STRING "Flags used by the C++ compiler during coverage builds."
     FORCE )
 SET(CMAKE_C_FLAGS_COVERAGE
-    "-g -O0 -fprofile-arcs -ftest-coverage"
+    "-fprofile-arcs -ftest-coverage"
     CACHE STRING "Flags used by the C compiler during coverage builds."
-    FORCE )
-SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    ""
-    CACHE STRING "Flags used for linking binaries during coverage builds."
-    FORCE )
-SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
-    ""
-    CACHE STRING "Flags used by the shared libraries linker during coverage builds."
     FORCE )
 MARK_AS_ADVANCED(
     CMAKE_CXX_FLAGS_COVERAGE
-    CMAKE_C_FLAGS_COVERAGE
-    CMAKE_EXE_LINKER_FLAGS_COVERAGE
-    CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
+    CMAKE_C_FLAGS_COVERAGE )

 SET(CMAKE_CXX_FLAGS_ASAN
     "-fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common -U_FORTIFY_SOURCE -fsanitize=address -fstack-protector-strong"


don't install mysql-test/var and cmake internal files

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -388,19 +388,21 @@
       DESTINATION "${INSTALL_MYSQLTESTDIR}/${to}"
       USE_SOURCE_PERMISSIONS
       COMPONENT Test
-      PATTERN "var/" EXCLUDE
+      PATTERN "var" EXCLUDE
       PATTERN "lib/My/SafeProcess" EXCLUDE
       PATTERN "lib/t*" EXCLUDE
       PATTERN "CPack" EXCLUDE
       PATTERN "CMake*" EXCLUDE
+      PATTERN "cmake_install.cmake" EXCLUDE
       PATTERN "mtr.out*" EXCLUDE
       PATTERN ".cvsignore" EXCLUDE
       PATTERN "*.am" EXCLUDE
       PATTERN "*.in" EXCLUDE
+      PATTERN "Makefile" EXCLUDE
       PATTERN "*.vcxproj" EXCLUDE
       PATTERN "*.vcxproj.filters" EXCLUDE
       PATTERN "*.vcxproj.user" EXCLUDE
-      PATTERN "CTest" EXCLUDE
+      PATTERN "CTest*" EXCLUDE
       PATTERN "*~" EXCLUDE
     )
   ENDIF()


Change PROJECT_NAME to PROJECT_LONGNAME for parity with cmake

--- source/defines.h.cmake
+++ source/defines.h.cmake
@@ -20,7 +20,7 @@
 // An anonymous namespace restricts these variables to the scope of the
 // compilation unit.
 namespace {
-  const char* PROJECT_NAME = "@PROJECT_LONGNAME@"
+  const char* PROJECT_LONGNAME = "@PROJECT_LONGNAME@"
   const char* PROJECT_VERSION = "@PROJECT_VERSION@"
 }


Fixed redefiniton of std

Fixed redefiniton of std

--- caffe/cmake/Cuda.cmake
+++ caffe/cmake/Cuda.cmake
@@ -154,7 +154,7 @@
     list(APPEND CUDA_NVCC_FLAGS -Xcompiler -Wno-unused-function)
   endif()

-  list(APPEND CUDA_NVCC_FLAGS -std=c++11)
+  #list(APPEND CUDA_NVCC_FLAGS -std=c++11)

   cuda_compile(cuda_objcs ${ARGN})


Update clBlast to 1.5.0

Update clBlast to 1.5.0

--- CMakeModules/build_CLBlast.cmake
+++ CMakeModules/build_CLBlast.cmake
@@ -7,16 +7,44 @@

 include(ExternalProject)

+find_program(GIT git)
+
 set(prefix ${PROJECT_BINARY_DIR}/third_party/CLBlast)
 set(CLBlast_location ${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}clblast${CMAKE_STATIC_LIBRARY_SUFFIX})
+
+if(APPLE)
+  # We need this patch on macOS until #PR 356 is merged in the CLBlast repo
+  write_file(clblast.patch
+"diff --git a/src/clpp11.hpp b/src/clpp11.hpp
+index 9446499..786f7db 100644
+--- a/src/clpp11.hpp
++++ b/src/clpp11.hpp
+@@ -358,8 +358,10 @@ class Device {
+
+   // Returns if the Nvidia chip is a Volta or later archicture (sm_70 or higher)
+   bool IsPostNVIDIAVolta() const {
+-    assert(HasExtension(\"cl_nv_device_attribute_query\"));
+-    return GetInfo<cl_uint>(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV) >= 7;
++    if(HasExtension(\"cl_nv_device_attribute_query\")) {
++      return GetInfo<cl_uint>(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV) >= 7;
++    }
++    return false;
+   }
+
+   // Retrieves the above extra information (if present)
+")
+
+  set(CLBLAST_PATCH_COMMAND ${GIT} apply ${ArrayFire_BINARY_DIR}/clblast.patch)
+endif()

 ExternalProject_Add(
     CLBlast-ext
     GIT_REPOSITORY https://github.com/cnugteren/CLBlast.git
-    GIT_TAG 43e3f27254c4f7e4a0b332f5b88965c53c20bdd1 # v1.4.0 plus CLBlast #295
+    GIT_TAG 1.5.0
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""
+    PATCH_COMMAND ${CLBLAST_PATCH_COMMAND}
     BUILD_BYPRODUCTS ${CLBlast_location}
     CONFIGURE_COMMAND ${CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" -Wno-dev <SOURCE_DIR>/
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}


boards: holybro_durandal-v1_stackcheck don't build all mags

--- boards/holybro/durandal-v1/stackcheck.cmake
+++ boards/holybro/durandal-v1/stackcheck.cmake
@@ -38,7 +38,8 @@
 		#lights/blinkm
 		#lights/rgbled
 		lights/rgbled_ncp5623c
-		magnetometer # all available magnetometer drivers
+		#magnetometer # all available magnetometer drivers
+		magnetometer/ist8310
 		#mkblctrl
 		#optical_flow # all available optical flow drivers
 		#osd


removed redundand find_package for Caffe2

--- CMake/PackageDepends/MITK_Caffe2_Config.cmake
+++ CMake/PackageDepends/MITK_Caffe2_Config.cmake
@@ -1,6 +1,2 @@
-find_package(Caffe2 REQUIRED)
-
 list(APPEND ALL_LIBRARIES ${Caffe2_LIBRARIES})
 list(APPEND ALL_INCLUDE_DIRECTORIES ${Caffe2_INCLUDE_DIR})
-
-


Fixed cmake. Plus additional debug output.

--- generate/cmake/compiler.cmake
+++ generate/cmake/compiler.cmake
@@ -58,10 +58,10 @@
 set( GNU_COMPILER_OPTIONS_DEBUG   "-Wall ${GCC_ENABLE_CXX_11} ${PROJECT_DEFINES_GCC} ${GCC_VERBOSE}" )
 set( GNU_COMPILER_OPTIONS_RELEASE "-Wall ${GCC_ENABLE_CXX_11} ${PROJECT_DEFINES_GCC} ${GCC_VERBOSE} -O3" )

-if( DEFINED EXTRA_WARNINGS )
+if( EXTRA_WARNINGS )
    set( GNU_COMPILER_OPTIONS_DEBUG   "-Winline -Werror ${GNU_COMPILER_OPTIONS_DEBUG}" )
    set( GNU_COMPILER_OPTIONS_RELEASE "-Winline -Werror ${GNU_COMPILER_OPTIONS_RELEASE}" )
-endif( DEFINED EXTRA_WARNINGS )
+endif( EXTRA_WARNINGS )

@@ -72,10 +72,10 @@
 set( CLANG_COMPILER_OPTIONS_DEBUG   "${CLANG_ENABLE_CXX_11} ${PROJECT_DEFINES_CLANG} ${CLANG_VERBOSE}" )
 set( CLANG_COMPILER_OPTIONS_RELEASE "${CLANG_ENABLE_CXX_11} ${PROJECT_DEFINES_CLANG} ${CLANG_VERBOSE}" )

-if( DEFINED EXTRA_WARNINGS )
+if( EXTRA_WARNINGS )
    set( CLANG_COMPILER_OPTIONS_DEBUG   "-Werror -Wthread-safety -ftemplate-backtrace-limit=0 ${CLANG_COMPILER_OPTIONS_DEBUG}" )
-   set( CLANG_COMPILER_OPTIONS_RELEASE "-Werror -Wthread-safety -ftemplate-backtrace-limit=0 ${CLANG_COMPILER_OPTIONS_RELEASE}" )
-endif( DEFINED EXTRA_WARNINGS )
+   set( CLANG_COMPILER_OPTIONS_RELEASE "-v -Werror -Wthread-safety -ftemplate-backtrace-limit=0 ${CLANG_COMPILER_OPTIONS_RELEASE}" )
+endif( EXTRA_WARNINGS )

@@ -86,10 +86,10 @@
 set( INTEL_COMPILER_OPTIONS_DEBUG   "<insert here> ${PROJECT_DEFINES_INTEL} ${INTEL_VERBOSE}" )
 set( INTEL_COMPILER_OPTIONS_RELEASE "<insert here> ${PROJECT_DEFINES_INTEL} ${INTEL_VERBOSE}" )

-if( DEFINED EXTRA_WARNINGS )
+if( EXTRA_WARNINGS )
    set( INTEL_COMPILER_OPTIONS_DEBUG   "<insert here> ${INTEL_COMPILER_OPTIONS_DEBUG}" )
    set( INTEL_COMPILER_OPTIONS_RELEASE "<insert here> ${INTEL_COMPILER_OPTIONS_RELEASE}" )
-endif( DEFINED EXTRA_WARNINGS )
+endif( EXTRA_WARNINGS )

@@ -99,10 +99,10 @@
 set( MSVC_COMPILER_OPTIONS_DEBUG   "/Od ${PROJECT_DEFINES_MSVC} ${MSVC_VERBOSE}" )
 set( MSVC_COMPILER_OPTIONS_RELEASE "/O2 ${PROJECT_DEFINES_MSVC} ${MSVC_VERBOSE}" )

-if( DEFINED EXTRA_WARNINGS )
+if( EXTRA_WARNINGS )
    set( MSVC_COMPILER_OPTIONS_DEBUG   "<insert here> ${MSVC_COMPILER_OPTIONS_DEBUG}" )
    set( MSVC_COMPILER_OPTIONS_RELEASE "<insert here> ${MSVC_COMPILER_OPTIONS_RELEASE}" )
-endif( DEFINED EXTRA_WARNINGS )
+endif( EXTRA_WARNINGS )


Fix ColorCamera resource allocation when setIspScale is used

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "8c8ee74873f3a0caa83009c7ff00353fa1c91e97")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "c1b1c5fe00931df3c9408eb64933d6b195deb7be")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Got rid of useless comment.

Got rid of useless comment.

--- cmake/Modules/add_polyamri_executable.cmake
+++ cmake/Modules/add_polyamri_executable.cmake
@@ -1,4 +1,3 @@
-# This function adds a (serial) unit test executable to be built using cmockery.
 function(add_polyamri_executable exe)
   add_executable(${exe} ${ARGN})
   target_link_libraries(${exe} ${POLYAMRI_LIBRARIES})


Fix builtin_tbb for gcc 4.9 in SLC6 (flag -mno-rtm needed). Added few missing fail-on-error.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1092,9 +1092,13 @@
     message(STATUS "Looking for DAVIX")
     find_package(Davix)
     if(NOT DAVIX_FOUND)
-      message(STATUS "Davix not found. You can enable the option 'builtin_davix' to build the library internally'")
-      message(STATUS "                 For the time being switching off 'davix' option")
-      set(davix OFF CACHE BOOL "" FORCE)
+      if(fail-on-missing)
+        message(FATAL_ERROR "Davix not found. You can enable the option 'builtin_davix' to build the library internally'")
+      else()
+        message(STATUS "Davix not found. You can enable the option 'builtin_davix' to build the library internally'")
+        message(STATUS "                 For the time being switching off 'davix' option")
+        set(davix OFF CACHE BOOL "" FORCE)
+      endif()
     endif()
   endif()
 endif()
@@ -1155,21 +1159,26 @@
       endif()
     endif()
     if(NOT TBB_FOUND)
-      message(STATUS "TBB not found. Switching on builtin_tbb option")
-      set(builtin_tbb ON CACHE BOOL "" FORCE)
+      if(fail-on-missing)
+        message(FATAL_ERROR "TBB not found. You can enable the option 'builtin_tbb' to build the library internally")
+      else()
+        message(STATUS "TBB not found. Switching on builtin_tbb option")
+        set(builtin_tbb ON CACHE BOOL "" FORCE)
+      endif()
     endif()
   endif()
 endif()
 if(builtin_tbb)
-  set(tbb_version 44_20160128)
+  set(tbb_version 44_20160413)
+  ROOT_ADD_CXX_FLAG(_tbb_cxxflags -mno-rtm)
   ExternalProject_Add(
     TBB
     URL ${repository_tarfiles}/tbb${tbb_version}oss_src.tgz
     INSTALL_DIR ${CMAKE_BINARY_DIR}
     CONFIGURE_COMMAND ""
-    BUILD_COMMAND make CPLUS=${CMAKE_CXX_COMPILER} CONLY=${CMAKE_C_COMPILER}
+    BUILD_COMMAND make CXXFLAGS=${_tbb_cxxflags} CPLUS=${CMAKE_CXX_COMPILER} CONLY=${CMAKE_C_COMPILER}
     INSTALL_COMMAND ${CMAKE_COMMAND} -Dinstall_dir=<INSTALL_DIR> -Dsource_dir=<SOURCE_DIR>
-                                      -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
+                                     -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallTBB.cmake
     INSTALL_COMMAND ""
     BUILD_IN_SOURCE 1
     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
@@ -1199,10 +1208,14 @@
   message(STATUS "Looking for VecGeom")
   find_package(VecGeom ${VecGeom_FIND_VERSION} CONFIG QUIET)
   if(NOT VecGeom_FOUND )
+    if(fail-on-missing)
+      message(FATAL_ERROR "VecGeom not found. Ensure that the installation of VecGeom is in the CMAKE_PREFIX_PATH")
+    else()
       message(STATUS "VecGeom not found. Ensure that the installation of VecGeom is in the CMAKE_PREFIX_PATH")
       message(STATUS "              example: CMAKE_PREFIX_PATH=<VecGeom_install_path>/lib/CMake/VecGeom")
       message(STATUS "              For the time being switching OFF 'vecgeom' option")
       set(vecgeom OFF CACHE BOOL "" FORCE)
+    endif()
   endif()
 endif()

@@ -1212,10 +1225,14 @@
     message(STATUS "Looking for Vc")
     find_package(Vc 1.0 CONFIG QUIET)
     if(NOT Vc_FOUND)
-      message(STATUS "Vc not found. Ensure that the installation of Vc is in the CMAKE_PREFIX_PATH")
-      message(STATUS "              Alternatively, you can also enable the option 'builtin_vc' to build the Vc libraries internally")
-      message(STATUS "              For the time being switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
+      if(fail-on-missing)
+        message(FATAL_ERROR "Vc not found. Ensure that the installation of Vc is in the CMAKE_PREFIX_PATH")
+      else()
+        message(STATUS "Vc not found. Ensure that the installation of Vc is in the CMAKE_PREFIX_PATH")
+        message(STATUS "              Alternatively, you can also enable the option 'builtin_vc' to build the Vc libraries internally")
+        message(STATUS "              For the time being switching OFF 'vc' option")
+        set(vc OFF CACHE BOOL "" FORCE)
+      endif()
     endif()
     set(Vc_INCLUDE_DIRS ${Vc_INCLUDE_DIR})    # Missing from VcConfig.cmake
   endif()


Added new option 'builtin_ssl' to build OpenSSL (static libraries) internally. This is useful for Mac OS X 10.11 (3)

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -415,7 +415,7 @@
     )
     ExternalProject_Get_Property(OPENSSL INSTALL_DIR)
     set(OPENSSL_INCLUDE_DIR ${INSTALL_DIR}/include)
-    set(OPENSSL_LIBRARIES ${INSTALL_DIR}/lib/libssl.a ${INSTALL_DIR}/lib/libcrypto.a ${CMAKE_DL_LIBS})
+    set(OPENSSL_LIBRARIES ${INSTALL_DIR}/lib/libssl.a ${INSTALL_DIR}/lib/libcrypto.a)
     set(OPENSSL_PREFIX ${INSTALL_DIR})
     set(ssl ON CACHE BOOL "" FORCE)
   else()


[cmake][NFC] Fix indentation

[cmake][NFC] Fix indentation

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -836,20 +836,20 @@

 #---Check for Xrootd support---------------------------------------------------------
 if(xrootd AND NOT builtin_xrootd)
-    message(STATUS "Looking for XROOTD")
-    find_package(XROOTD)
-    if(NOT XROOTD_FOUND)
-      if(fail-on-missing)
-        message(FATAL_ERROR "XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation, "
-                            "or inlcude the installation of XROOTD in the CMAKE_PREFIX_PATH. "
-                            "Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally")
-      else()
-        message(STATUS "XROOTD not found, enabling 'builtin_xrootd' option")
-        set(builtin_xrootd ON CACHE BOOL "Enabled because xrootd is enabled, but external xrootd was not found (${xrootd_description})" FORCE)
-      endif()
-    else()
-      set(XROOTD_VERSIONNUM ${xrdversnum})  # variable used internally
-    endif()
+  message(STATUS "Looking for XROOTD")
+  find_package(XROOTD)
+  if(NOT XROOTD_FOUND)
+    if(fail-on-missing)
+      message(FATAL_ERROR "XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation, "
+                          "or inlcude the installation of XROOTD in the CMAKE_PREFIX_PATH. "
+                          "Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally")
+    else()
+      message(STATUS "XROOTD not found, enabling 'builtin_xrootd' option")
+      set(builtin_xrootd ON CACHE BOOL "Enabled because xrootd is enabled, but external xrootd was not found (${xrootd_description})" FORCE)
+    endif()
+  else()
+    set(XROOTD_VERSIONNUM ${xrdversnum})  # variable used internally
+  endif()
 endif()

 if(builtin_xrootd)


Workaround ninja dependencies re-stat behavior.

Using the BUILD_BYPRODUCTS directive we tell ninja that those libs will be
created and it is ok to use them as dependencies.

Further info:
 * https://github.com/ninja-build/ninja/issues/760
 * https://cmake.org/Bug/view.php?id=14963
 * https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=557aef0b

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1377,6 +1377,15 @@
   # FIXME: Remove our version of gtest in roottest. We can reuse this one.
   # Add gtest
   # http://stackoverflow.com/questions/9689183/cmake-googletest
+
+  set(_byproduct_binary_dir
+    ${CMAKE_CURRENT_BINARY_DIR}/googletest-prefix/src/googletest-build/googlemock/)
+  set(_byproducts
+    ${_byproduct_binary_dir}/gtest/libgtest.a
+    ${_byproduct_binary_dir}/gtest/libgtest_main.a
+    ${_byproduct_binary_dir}/libgmock.a
+    ${_byproduct_binary_dir}/libgmock_main.a
+    )
   ExternalProject_Add(
     googletest
     GIT_REPOSITORY https://github.com/google/googletest.git
@@ -1389,6 +1398,7 @@
     #            -Dgtest_force_shared_crt=ON
     # Disable install step
     INSTALL_COMMAND ""
+    BUILD_BYPRODUCTS ${_byproducts}
     # Wrap download, configure and build steps in a script to log output
     LOG_DOWNLOAD ON
     LOG_CONFIGURE ON


Completely disable vc on Windows

Completely disable vc on Windows

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -846,10 +846,8 @@
       set(vc OFF CACHE BOOL "" FORCE)
     endif()
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)  # equivalent to MSVC 2010
-      message(STATUS "VC requires MSVC version >= 2011; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-    endif()
+    message(STATUS "VC is not supported on Windows; switching OFF 'vc' option")
+    set(vc OFF CACHE BOOL "" FORCE)
   endif()
 endif()


MINIFI-368 exclude hidden files when scanning for src files

This closes #125.

Signed-off-by: Aldrin Piri <8746015474cd01110181ed51735247560fd08de4@apache.org>

--- cmake/BuildTests.cmake
+++ cmake/BuildTests.cmake
@@ -21,7 +21,7 @@
   FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
   SET(dirlist "")
   FOREACH(child ${children})
-    IF( "${curdir}/${child}" MATCHES .*\\.cpp)
+    IF( "${child}" MATCHES ^[^.].*\\.cpp)

       LIST(APPEND dirlist ${child})
     ENDIF()