Fix handling of extra include directories passed to the global check.

This was actually completely broken - we were checking a property which
was never in fact used.

Also did some small cleanup:
 - Tabs to whitespace
 - Use cmake_parse_arguments instead of passing list references around.

--- CPPCheck.cmake
+++ CPPCheck.cmake
@@ -61,16 +61,33 @@
 # target
 #
 # SOURCES_VAR : A variable containing a list of sources
-function (cppcheck_add_to_global_unused_function_check SOURCES_VAR)
-
-    set (_sources ${${SOURCES_VAR}})
-
-    foreach (_source ${_sources})
+function (cppcheck_add_to_global_unused_function_check)
+
+    set (GLOBAL_CHECK_MULTIVAR_ARGS
+         SOURCES
+         INCLUDES)
+
+    cmake_parse_arguments (GLOBAL_CHECK
+                           ""
+                           ""
+                           "${GLOBAL_CHECK_MULTIVAR_ARGS}"
+                           ${ARGN})
+
+    foreach (SOURCE ${GLOBAL_CHECK_SOURCES})

         set_property (GLOBAL
                       APPEND
                       PROPERTY CPPCHECK_GLOBAL_UNUSED_FUNCTION_CHECK_SOURCES
-                      ${_source})
+                      ${SOURCE})
+
+    endforeach ()
+
+    foreach (INCLUDE ${GLOBAL_CHECK_INCLUDES})
+
+        set_property (GLOBAL
+                      APPEND
+                      PROPERTY CPPCHECK_GLOBAL_UNUSED_FUNCTION_CHECK_INCLUDES
+                      ${INCLUDE})

     endforeach ()

@@ -95,21 +112,21 @@

     endif ()

-	get_property (_cppcheck_unused_function_sources_set
-		          GLOBAL
-	              PROPERTY CPPCHECK_GLOBAL_UNUSED_FUNCTION_CHECK_SOURCES
-	              SET)
+    get_property (_cppcheck_unused_function_sources_set
+                  GLOBAL
+                  PROPERTY CPPCHECK_GLOBAL_UNUSED_FUNCTION_CHECK_SOURCES
+                  SET)

     if (NOT _cppcheck_unused_function_sources_set)

-    	message (SEND_ERROR "No unused function sources registered, "
-    	                    "they should be registered using "
-    	                    "cppcheck_add_to_global_unused_function_check "
-    	                    "before calling "
-    	                    "cppcheck_add_global_unused_function_check_to_"
-    	                    "target")
-
-    	return ()
+        message (SEND_ERROR "No unused function sources registered, "
+                            "they should be registered using "
+                            "cppcheck_add_to_global_unused_function_check "
+                            "before calling "
+                            "cppcheck_add_global_unused_function_check_to_"
+                            "target")
+
+        return ()

     endif (NOT _cppcheck_unused_function_sources_set)

@@ -123,18 +140,25 @@
                            ${ARGN})

     get_property (_cppcheck_unused_function_sources
-		          GLOBAL
-	              PROPERTY CPPCHECK_GLOBAL_UNUSED_FUNCTION_CHECK_SOURCES)
+                  GLOBAL
+                  PROPERTY CPPCHECK_GLOBAL_UNUSED_FUNCTION_CHECK_SOURCES)
+
+    get_property (_cppcheck_unused_function_includes
+                  GLOBAL
+                  PROPERTY CPPCHECK_GLOBAL_UNUSED_FUNCTION_CHECK_INCLUDES)

     set (OPTIONS
-    	 ${CPPCHECK_COMMON_OPTIONS}
-    	 --enable=unusedFunction)
+         ${CPPCHECK_COMMON_OPTIONS}
+         --enable=unusedFunction)

     if (NOT ADD_GLOBAL_UNUSED_FUNCTION_CHECK_WARN_ONLY)

         list (APPEND OPTIONS --error-exitcode=1)

     endif (NOT ADD_GLOBAL_UNUSED_FUNCTION_CHECK_WARN_ONLY)
+
+    list (APPEND ADD_GLOBAL_UNUSED_FUNCTION_CHECK_INCLUDES
+          ${_cppcheck_unused_function_includes})

     if (ADD_GLOBAL_UNUSED_FUNCTION_CHECK_INCLUDES)

@@ -228,7 +252,10 @@
                                     CPPCHECK_OPTIONS
                                     ${EXTRA_ARGS})

-    cppcheck_add_to_global_unused_function_check (${SOURCES_VAR})
+    cppcheck_add_to_global_unused_function_check (SOURCES
+                                                  ${${SOURCES_VAR}}
+                                                  INCLUDES
+                                                  ${CPPCHECK_INCLUDES})

 endfunction (cppcheck_sources)

@@ -246,38 +273,33 @@
 # [Optional] INCLUDES : Check header files in specified include directories.
 function (cppcheck_target_sources TARGET)

-	get_target_property (_sources ${TARGET} SOURCES)
-	set (_files_to_check)
-	foreach (_file ${_sources})
-
-		get_source_file_property (_lang ${_file} LANGUAGE)
-		get_source_file_property (_location ${_file} LOCATION)
-
-		if ("${_lang}" MATCHES "CXX")
-
-			list (APPEND _files_to_check ${_location})
-
-		endif ("${_lang}" MATCHES "CXX")
+    get_target_property (_sources ${TARGET} SOURCES)
+    set (_files_to_check)
+    foreach (_file ${_sources})
+
+        get_source_file_property (_lang ${_file} LANGUAGE)
+        get_source_file_property (_location ${_file} LOCATION)
+
+        if ("${_lang}" MATCHES "CXX")
+
+            list (APPEND _files_to_check ${_location})
+
+        endif ("${_lang}" MATCHES "CXX")

     endforeach ()

     set (EXTRA_OPTIONS)
-    set (OPTIONAL_OPTIONS CHECK_TARGET_HEADERS)
-    cmake_parse_arguments (CPPCHECK "${OPTIONAL_OPTIONS}" "" "" ${ARGN})
-
-    if (CPPCHECK_CHECK_TARGET_HEADERS)
-
-        get_target_property (_include_directories
-                             ${TARGET}
-                             INCLUDE_DIRECTORIES)
-
-        set (EXTRA_OPTIONS INCLUDES ${_include_directories} ${EXTRA_OPTIONS})
-
-    endif (CPPCHECK_CHECK_TARGET_HEADERS)
+    set (MULTIVALUE_OPTIONS INCLUDES)
+    cmake_parse_arguments (CPPCHECK
+                           ""
+                           ""
+                           "${MULTIVALUE_OPTIONS}"
+                           ${ARGN})

     cppcheck_sources (_files_to_check
                       ${TARGET}
-                      INCLUDES ${_include_directories}
+                      INCLUDES
+                      ${CPPCHECK_INCLUDES}
                       ${ARGN})

 endfunction (cppcheck_target_sources)


Make add_coverage_targets a true function.

So it can be called multiple times.

--- Coverage.cmake
+++ Coverage.cmake
@@ -65,35 +65,42 @@
     set(COVERAGE_LIMITS --rc genhtml_med_limit=40 --rc genhtml_hi_limit=80)
   endif()

-  add_custom_target(lcov-clean_${PROJECT_NAME}
-    COMMAND ${LCOV} -q --directory ${PROJECT_BINARY_DIR} --zerocounters
-    COMMENT "Resetting code coverage counters")
-
+  if(NOT TARGET lcov-clean_${PROJECT_NAME})
+    add_custom_target(lcov-clean_${PROJECT_NAME}
+      COMMAND ${LCOV} -q --directory ${PROJECT_BINARY_DIR} --zerocounters
+      COMMENT "Resetting code coverage counters")
+  endif()
   add_dependencies(${TEST_TARGET} lcov-clean_${PROJECT_NAME})

-  add_custom_target(lcov-gather_${PROJECT_NAME}
-    COMMAND ${LCOV} -q --capture --directory . --no-external
-      --directory ${PROJECT_SOURCE_DIR}/${PROJECT_INCLUDE_NAME}
-      --output-file lcov.info
-    COMMENT "Capturing code coverage counters"
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-    DEPENDS ${TEST_TARGET})
+  if(NOT TARGET lcov-gather_${PROJECT_NAME})
+    add_custom_target(lcov-gather_${PROJECT_NAME}
+      COMMAND ${LCOV} -q --capture --directory . --no-external
+        --directory ${PROJECT_SOURCE_DIR}/${PROJECT_INCLUDE_NAME}
+        --output-file lcov.info
+      COMMENT "Capturing code coverage counters"
+      WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
+  endif()
+  add_dependencies(lcov-gather_${PROJECT_NAME} ${TEST_TARGET})

-  add_custom_target(lcov-remove_${PROJECT_NAME}
-    COMMAND ${LCOV} -q --remove lcov.info 'tests/*' '*.l' 'CMake/test/*'
-      '*/install/*' '${PROJECT_BINARY_DIR}/*' ${LCOV_EXCLUDE}
-      --output-file lcov2.info
-    COMMENT "Cleaning up code coverage counters"
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-    DEPENDS lcov-gather_${PROJECT_NAME})
+  if(NOT TARGET lcov-remove_${PROJECT_NAME})
+    add_custom_target(lcov-remove_${PROJECT_NAME}
+      COMMAND ${LCOV} -q --remove lcov.info 'tests/*' '*.l' 'CMake/test/*'
+        '*/install/*' '${PROJECT_BINARY_DIR}/*' ${LCOV_EXCLUDE}
+        --output-file lcov2.info
+      COMMENT "Cleaning up code coverage counters"
+      WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+      DEPENDS lcov-gather_${PROJECT_NAME})
+  endif()

-  add_custom_target(coverage_${PROJECT_NAME}
-    COMMAND ${GENHTML} -q --title ${PROJECT_NAME} ${COVERAGE_LIMITS}
-      -o CoverageReport ${PROJECT_BINARY_DIR}/lcov2.info
-    COMMENT "Creating html coverage report, open ${PROJECT_BINARY_DIR}/doc/html/CoverageReport/index.html "
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/html
-    DEPENDS lcov-remove_${PROJECT_NAME})
-  make_directory(${PROJECT_BINARY_DIR}/doc/html)
+  if(NOT TARGET coverage_${PROJECT_NAME})
+    add_custom_target(coverage_${PROJECT_NAME}
+      COMMAND ${GENHTML} -q --title ${PROJECT_NAME} ${COVERAGE_LIMITS}
+        -o CoverageReport ${PROJECT_BINARY_DIR}/lcov2.info
+      COMMENT "Creating html coverage report, open ${PROJECT_BINARY_DIR}/doc/html/CoverageReport/index.html "
+      WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/html
+      DEPENDS lcov-remove_${PROJECT_NAME})
+    make_directory(${PROJECT_BINARY_DIR}/doc/html)
+  endif()

   if(NOT TARGET coverage)
     add_custom_target(coverage)


use labels for phSolver/common tests

use labels for phSolver/common tests

--- phSolver/common/test/testing.cmake
+++ phSolver/common/test/testing.cmake
@@ -1,51 +1,30 @@
-add_test(
-  NAME readHeader
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOreadheader 2
-  WORKING_DIRECTORY ${CASES}/incompressible
-)
-add_test(
-  NAME readDatablock
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOreaddatablock 2
-  WORKING_DIRECTORY ${CASES}/incompressible
-)
-add_test(
-  NAME write
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOwrite 2
-  WORKING_DIRECTORY ${CASES}
-)
-add_test(
-  NAME readFtn
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOreadFtn
-  WORKING_DIRECTORY ${CASES}/incompressible/
-)
+macro(common_parallel_test name procs dir exe)
+  set(tname common_${name})
+  add_test(
+    NAME ${tname}
+    COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} ${procs} ${exe} ${ARGN}
+    WORKING_DIRECTORY ${dir} )
+  set_tests_properties(${tname} PROPERTIES LABELS "phsolver_common")
+endmacro(common_parallel_test)
+
+common_parallel_test(readHeader 4 ${CASES}/incompressible
+  ${PHASTA_BINARY_DIR}/bin/phIOreadheader 2)
+common_parallel_test(readDatablock 4 ${CASES}/incompressible
+  ${PHASTA_BINARY_DIR}/bin/phIOreaddatablock 2)
+common_parallel_test(write 4 ${CASES}
+  ${PHASTA_BINARY_DIR}/bin/phIOwrite 2)
+common_parallel_test(readFtn 4 ${CASES}/incompressible/
+  ${PHASTA_BINARY_DIR}/bin/phIOreadFtn)
 if(HAS_VALGRIND)
-  set(vgcmd
-    valgrind
-    --log-file=vg.%p
-    --leak-check=yes
-    ${PHASTA_BINARY_DIR}/bin/phIOreadFtn
-  )
-  add_test(
-    NAME readFtnVG
-    COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${vgcmd}
-    WORKING_DIRECTORY ${CASES}/incompressible/
-  )
+  common_parallel_test(readFtnVG 4 ${CASES}/incompressible/
+    valgrind --log-file=vg.%p --leak-check=yes
+    ${PHASTA_BINARY_DIR}/bin/phIOreadFtn)
 endif(HAS_VALGRIND)
-add_test(
-  NAME writeFtn
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn
-  WORKING_DIRECTORY ${CASES}/
-)
+common_parallel_test(writeFtn 4 ${CASES}
+  ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn)
 if(HAS_VALGRIND)
-  set(vgcmd
-    valgrind
-    --log-file=vg.%p
-    --leak-check=yes
-    ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn
-  )
-  add_test(
-    NAME writeFtnVG
-    COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${vgcmd}
-    WORKING_DIRECTORY ${CASES}/incompressible/
-  )
+  common_parallel_test(
+    writeFtnVG 4 ${CASES}/incompressible
+    valgrind --log-file=vg.%p --leak-check=yes
+    ${PHASTA_BINARY_DIR}/bin/phIOwriteFtn)
 endif(HAS_VALGRIND)


KAA-1369 Fix esp8266 build on OS X

KAA-1369 Fix esp8266 build on OS X

--- client/client-multi/client-c/toolchains/esp8266.cmake
+++ client/client-multi/client-c/toolchains/esp8266.cmake
@@ -17,6 +17,8 @@
 #######################
 ### Toolchain setup ###
 #######################
+
+set(CMAKE_SYSTEM_NAME "Generic")

 include(CMakeForceCompiler)


Removed the new old-style-cast warning from error treatment

This is a new warning included in clang that ships with OS X 10.10 Yosemite.

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -228,7 +228,7 @@
 			add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-padded")
 			add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal")
 			add_flags_cxx("-Wno-error=missing-prototypes -Wno-error=non-virtual-dtor")
-			add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow")
+			add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow -Wno-error=old-style-cast")
 			add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations")
 			add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough")
 			add_flags_cxx("-Wno-error=extra-semi -Wno-weak-vtables -Wno-switch-enum")


Wrong cmake var

Wrong cmake var

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -223,8 +223,8 @@
 		add_flags_cxx("-ffast-math")

 		if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-			if ("${CLANG_VERSION_STRING}" VERSION_LESS 3.0)
-				message(FATAL_ERROR "MCServer requires clang version 3.0 or higher, version is ${CLANG_VERSION_STRING}")
+			if ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 3.0)
+				message(FATAL_ERROR "MCServer requires clang version 3.0 or higher, version is ${CMAKE_CXX_COMPILER_VERSION}")
 			endif()
 			# clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math
 			add_flags_cxx("-D__extern_always_inline=inline")


Add the MITK binary directory as include dir to all modules.

This is needed for modules which do not depend on "Mitk" but still
need the mitkExportMacros.h header for example. Additionally, remove
duplicates from the include dirs list.

--- CMake/mitkMacroUseModule.cmake
+++ CMake/mitkMacroUseModule.cmake
@@ -60,7 +60,10 @@
     # set(ALL_LIBRARIES ${ALL_LIBRARIES} ${${package}_LIBRARIES})
   endforeach(package)
   set(ALL_LIBRARIES ${ALL_LIBRARIES} ${MODULE_ADDITIONAL_LIBS})
-  set(ALL_INCLUDE_DIRECTORIES ${ALL_INCLUDE_DIRECTORIES} ${MODULE_INCLUDE_DIRS} ${MODULE_INTERNAL_INCLUDE_DIRS} ${MODULES_CONF_DIRS})
+  set(ALL_INCLUDE_DIRECTORIES ${MITK_BINARY_DIR} ${ALL_INCLUDE_DIRECTORIES} ${MODULE_INCLUDE_DIRS} ${MODULE_INTERNAL_INCLUDE_DIRS} ${MODULES_CONF_DIRS})
+  if(ALL_INCLUDE_DIRECTORIES)
+    list(REMOVE_DUPLICATES ALL_INCLUDE_DIRECTORIES)
+  endif()
   if(ALL_LIBRARY_DIRS)
     list(REMOVE_DUPLICATES ALL_LIBRARY_DIRS)
   endif(ALL_LIBRARY_DIRS)


hard-code boost search path in configure_boost

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

--- CMakeModules/ModuleSetup.cmake
+++ CMakeModules/ModuleSetup.cmake
@@ -151,8 +151,8 @@
         PREFIXES ${ENV_NAALI_DEP_PATH})

     if (MSVC)
-        set (BOOST_INCLUDE_DIRS ${BOOST_INCLUDE_DIRS} ${ENV_NAALI_DEP_PATH}/include)
-        set (BOOST_LIBRARY_DIRS ${BOOST_LIBRARY_DIRS} ${ENV_NAALI_DEP_PATH}/lib)
+        set (BOOST_INCLUDE_DIRS ${BOOST_INCLUDE_DIRS} ${ENV_NAALI_DEP_PATH}/Boost/include)
+        set (BOOST_LIBRARY_DIRS ${BOOST_LIBRARY_DIRS} ${ENV_NAALI_DEP_PATH}/Boost/lib)
     endif ()

 endmacro (configure_boost)


BUG: Updating FDFImageIO remote module

BUG: Updating FDFImageIO remote module

Correctly adding factory registration method, and export
specifications. This addresses critical compilation errors.

Change-Id: I50101452eb05b1ee99872df48ced5d668a785d3e

--- Modules/Remote/FDFImageIO.remote.cmake
+++ Modules/Remote/FDFImageIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(FDFImageIO
   "FDFImageIO plugin for ITK. Authors Gleen Pierce/Nick Tustison/Kent Williams"
   GIT_REPOSITORY http://github.com/InsightSoftwareConsortium/itkFDFImageIO.git
-  GIT_TAG df4888e4f843c18605da1229c28553933994ddbd
+  GIT_TAG  bc972c446c2110e8984785340c3821f9de40ca8e
   )


Increase parallelism

Increase parallelism

--- cmake/circle_continuous.cmake
+++ cmake/circle_continuous.cmake
@@ -20,12 +20,12 @@

 if(test_group STREQUAL python)
   ctest_test(
-    PARALLEL_LEVEL 4 RETURN_VALUE res
+    PARALLEL_LEVEL 16 RETURN_VALUE res
     INCLUDE_LABEL girder_python
   )
 elseif(test_group STREQUAL browser)
   ctest_test(
-    PARALLEL_LEVEL 2 RETURN_VALUE res
+    PARALLEL_LEVEL 16 RETURN_VALUE res
     EXCLUDE_LABEL girder_python
   )
   file(RENAME "${CTEST_BINARY_DIRECTORY}/coverage/js_coverage.xml" "${CTEST_BINARY_DIRECTORY}/coverage.xml")


Ensure that the test executables for not pollute the /bin and /lib directories also for Windows :-)

--- cmake/modules/RootCTest.cmake
+++ cmake/modules/RootCTest.cmake
@@ -30,6 +30,15 @@
 unset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
 unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY)

+if(WIN32)
+  foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
+    string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
+    unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG})
+    unset(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG})
+    unset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG})
+  endforeach()
+endif()
+
 #--Add all subdirectories with tests-----------------------------------------------------------

 get_property(test_dirs GLOBAL PROPERTY ROOT_TEST_SUBDIRS)


Making windows only option not specified for others OS.

--- cmake/submoduleOpenMesh.cmake
+++ cmake/submoduleOpenMesh.cmake
@@ -20,6 +20,24 @@
     set(OPENMESH_LIBRARIES "${RADIUM_SUBMODULES_INSTALL_DIRECTORY}/lib/${OPENMESHLIBNAME}.lib")
 endif()

+if(MSVC OR MINGW)
+  set(COMPILE_DEFS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+    -DBUILD_APPS=OFF
+    -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+    -DOPENMESH_BUILD_SHARED=TRUE
+    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+    -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+    -DCMAKE_BUILD_TYPE=${RADIUM_SUBMODULES_BUILD_TYPE}
+    )
+else()
+  set(COMPILE_DEFS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+    -DBUILD_APPS=OFF
+    -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+    -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+    -DCMAKE_BUILD_TYPE=${RADIUM_SUBMODULES_BUILD_TYPE}
+    )
+endif()

 # here is defined the way we want to import assimp
@@ -38,14 +56,7 @@
         BUILD_BYPRODUCTS "${OPENMESH_LIBRARIES}"
         CMAKE_GENERATOR ${CMAKE_GENERATOR}
         CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET}
-        CMAKE_ARGS
-            -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-            -DBUILD_APPS=OFF
-            -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-            -DOPENMESH_BUILD_SHARED=TRUE
-            -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-            -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-            -DCMAKE_BUILD_TYPE=${RADIUM_SUBMODULES_BUILD_TYPE}
+        CMAKE_ARGS ${COMPILE_DEFS}
         EXCLUDE_FROM_ALL TRUE
 )


cmake: Add missing library, omniDynamic4 for OMNIORB.

Signed-off-by: Peter Soetens <4b8373d016f277527198385ba72fda0feb5da015@thesourceworks.com>

--- lib/orogen/templates/config/FindOrocosCORBA.cmake
+++ lib/orogen/templates/config/FindOrocosCORBA.cmake
@@ -25,6 +25,10 @@
     IF (CORBA_IMPLEMENTATION STREQUAL "TAO")
         LIST(APPEND OrocosCORBA_LIBRARIES TAO_Strategies TAO_AnyTypeCode)
     ENDIF (CORBA_IMPLEMENTATION STREQUAL "TAO")
+    IF (CORBA_IMPLEMENTATION STREQUAL "OMNIORB")
+        LIST(APPEND OrocosCORBA_LIBRARIES omniDynamic4)
+    ENDIF (CORBA_IMPLEMENTATION STREQUAL "OMNIORB")
+

     # ORB-specific configuration steps if the TYPEKIT component
     # is required


ffmpeg configure disable autodetect external libs

issue https://github.com/smanders/externpro/issues/212#issuecomment-417698319

--- projects/ffmpeg.cmake
+++ projects/ffmpeg.cmake
@@ -72,7 +72,9 @@
     set(XP_CONFIGURE_BASE ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${STAGE_DIR}/share/cmake
       PATH=${STAGE_DIR}/bin:$ENV{PATH} # prepend path to yasm
       <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> #--enable-shared --disable-static
-      --enable-libopenh264 --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-zlib
+      --enable-libopenh264 --disable-bzlib --disable-iconv
+      --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-libxcb-shape
+      --disable-lzma --disable-sdl --disable-xlib --disable-zlib
       )
     set(XP_CONFIGURE_Debug ${XP_CONFIGURE_BASE} --enable-debug=1)
     set(XP_CONFIGURE_Release ${XP_CONFIGURE_BASE} --disable-debug)


openssl build depends on nasm (windows)

openssl build depends on nasm (windows)

--- projects/openssl.cmake
+++ projects/openssl.cmake
@@ -38,6 +38,7 @@
     endif()
     ExternalProject_Get_Property(nasm SOURCE_DIR)
     set(NASM_EXE "-DCMAKE_ASM_NASM_COMPILER=${SOURCE_DIR}/nasm.exe")
+    set(depTgts nasm)
   endif()
   xpGetArgValue(${PRO_OPENSSL} ARG NAME VALUE NAME)
   xpGetArgValue(${PRO_OPENSSL} ARG VER VALUE VER)
@@ -55,7 +56,7 @@
     ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake
     @ONLY NEWLINE_STYLE LF
     )
-  xpCmakeBuild(${NAME} "" "${XP_CONFIGURE}" ${NAME}Targets)
+  xpCmakeBuild(${NAME} "${depTgts}" "${XP_CONFIGURE}" ${NAME}Targets)
   if(ARGN)
     set(${ARGN} "${${NAME}Targets}" PARENT_SCOPE)
   endif()


guard setting of syslibs, only if using iostreams

--- projects/use/usexp-boost-config.cmake
+++ projects/use/usexp-boost-config.cmake
@@ -61,7 +61,9 @@
 string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\1.\\2" BOOST_VER2 ${BOOST_VER})
 set(Boost_ADDITIONAL_VERSIONS ${BOOST_VER} ${BOOST_VER2})
 if(UNIX)
-  set(syslibs $<TARGET_FILE:${zlibBinary}> $<TARGET_FILE:${bzip2Binary}>)
+  if(DEFINED zlibBinary AND DEFINED bzip2Binary)
+    set(syslibs $<TARGET_FILE:${zlibBinary}> $<TARGET_FILE:${bzip2Binary}>)
+  endif()
   include(CheckLibraryExists)
   function(checkLibraryConcat lib symbol liblist)
     string(TOUPPER ${lib} LIB)
@@ -103,11 +105,11 @@
   endif()
   link_directories(${XP_ROOTDIR}/lib)
   set(reqVars ${PRJ}_INCLUDE_DIR)
-  if(DEFINED zlibBinary)
-    add_definitions(-DBOOST_ZLIB_BINARY=$<TARGET_FILE:${zlibBinary}>)
-  endif()
-  if(DEFINED bzip2Binary)
-    add_definitions(-DBOOST_BZIP2_BINARY=$<TARGET_FILE:${bzip2Binary}>)
+  if(DEFINED zlibBinary AND DEFINED bzip2Binary)
+    add_definitions(
+      -DBOOST_ZLIB_BINARY=$<TARGET_FILE:${zlibBinary}>
+      -DBOOST_BZIP2_BINARY=$<TARGET_FILE:${bzip2Binary}>
+      )
   endif()
 endif()
 include(FindPackageHandleStandardArgs)


Updating swig-2.0.11-1.tar.gz download bundled on Linux.

Change-Id: Idd2b75dbc6c30b5a9a360c27c69e1dba9128e5f7

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -13,7 +13,7 @@
 if(NOT SWIG_DIR)

   set(SWIG_TARGET_VERSION 2.0.11-1)
-  set(SWIG_DOWNLOAD_SOURCE_HASH "23f4f4b26bf5d8466c6d9008ef0081af")
+  set(SWIG_DOWNLOAD_SOURCE_HASH "c6c23afc5d4df6c87c0205053a3a84dc")
   set(SWIG_DOWNLOAD_WIN_HASH "084d171dd2155782c0c9de0fd289c7e3" )


Adding locations for boost discovery

Adding locations for boost discovery

--- appveyor.cmake
+++ appveyor.cmake
@@ -1,3 +1,5 @@
 set(BUILD_DIR C:/projects/morebin CACHE PATH "")
-set(BOOST_ROOT C:/Libraries/boost_1_60_0/lib64-msvc-14.0 CACHE_PATH "")
-set(BOOST_DIR C:/Libraries/boost_1_60_0/lib64-msvc-14.0 CACHE_PATH "")
+set(BOOST_ROOT C:/Libraries/boost_1_60_0/ CACHE_PATH "")
+set(BOOST_DIR C:/Libraries/boost_1_60_0/ CACHE_PATH "")
+set(BOOST_INCLUDE_DIR C:/Libraries/boost_1_60_0/ CACHE_PATH "")
+set(BOOST_LIBRARY_DIR C:/Libraries/boost_1_60_0/lib64-msvc-14.0/ CACHE_PATH "")


Updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -4,30 +4,25 @@
 #  find_package(Corrade [REQUIRED])
 # This module tries to find Corrade library and then defines:
 #  CORRADE_FOUND                    - True if Corrade library is found
-#  CORRADE_INCLUDE_DIR              - Include dir for Corrade
-#  CORRADE_INTERCONNECT_LIBRARIES   - Corrade Interconnect library and
-#   dependent libraries
-#  CORRADE_UTILITY_LIBRARIES        - Corrade Utility library and
-#   dependent libraries
-#  CORRADE_PLUGINMANAGER_LIBRARIES  - Corrade PluginManager library and
-#   dependent libraries
-#  CORRADE_TESTSUITE_LIBRARIES      - Corrade TestSuite library and
-#   dependent libraries
-#  CORRADE_RC_EXECUTABLE            - Corrade resource compiler executable
-# Additionally these variables are defined for internal usage:
-#  CORRADE_INTERCONNECT_LIBRARY     - Corrade Interconnect library (w/o
-#   dependencies)
-#  CORRADE_UTILITY_LIBRARY          - Corrade Utility library (w/o
-#   dependencies)
-#  CORRADE_PLUGINMANAGER_LIBRARY    - Corrade Plugin manager library (w/o
-#   dependencies)
-#  CORRADE_TESTSUITE_LIBRARY        - Corrade TestSuite library (w/o
-#   dependencies)
+#  CORRADE_INCLUDE_DIR              - Root include dir
+#  CORRADE_INTERCONNECT_LIBRARIES   - Interconnect library and dependent
+#   libraries
+#  CORRADE_UTILITY_LIBRARIES        - Utility library and dependent
+#   libraries
+#  CORRADE_PLUGINMANAGER_LIBRARIES  - PluginManager library and dependent
+#   libraries
+#  CORRADE_TESTSUITE_LIBRARIES      - TestSuite library and dependent
+#   libraries
+#  CORRADE_RC_EXECUTABLE            - Resource compiler executable
 # Corrade configures the compiler to use C++11 standard. Additionally you can
 # use CORRADE_CXX_FLAGS to enable additional pedantic set of warnings and enable
 # hidden visibility by default.
 #
-# If Corrade library is found, these macros and functions are defined:
+# Features of found Corrade library are exposed in these variables:
+#  CORRADE_GCC46_COMPATIBILITY - Defined if compiled with compatibility
+#   mode for GCC 4.6
+#
+# Corrade provides these macros and functions:
 #
 #
 # Add unit test using Corrade's TestSuite.
@@ -36,7 +31,7 @@
 #                   [LIBRARIES libraries...])
 # Test name is also executable name. You can also specify libraries to link
 # with instead of using target_link_libraries(). CORRADE_TESTSUITE_LIBRARIES
-# are linked atuomatically to each test. Note that the enable_testing()
+# are linked automatically to each test. Note that the enable_testing()
 # function must be called explicitly.
 #
 #
@@ -47,7 +42,7 @@
 # Depends on corrade-rc, which is part of Corrade utilities. This command
 # generates resource file with group group_name from given files in current
 # build directory. Argument name is name under which the resources can be
-# explicitly loaded. Variable 'name' contains compiled resource filename,
+# explicitly loaded. Variable `name` contains compiled resource filename,
 # which is then used for compiling library / executable. Example usage:
 #  corrade_add_resource(name group_name file1 ALIAS alias1 file2 file3)
 #  add_executable(app source1 source2 ... ${name})
@@ -58,7 +53,7 @@
 # The macro adds preprocessor directive CORRADE_DYNAMIC_PLUGIN. Additional
 # libraries can be linked in via target_link_libraries(plugin_name ...). If
 # install_dir is set to CMAKE_CURRENT_BINARY_DIR (e.g. for testing purposes),
-# the files are copied directly, without need to run 'make install'.
+# the files are copied directly, without need to run `make install`.
 #
 #
 # Add static plugin.
@@ -83,6 +78,15 @@
 # It is possible to specify also additional paths for searching. DLL names can
 # also contain paths, they will be installed into exact specified path. If an
 # DLL is not found, fatal error message is printed.
+#
+#
+# Additionally these variables are defined for internal usage:
+#  CORRADE_INTERCONNECT_LIBRARY     - Interconnect library (w/o
+#   dependencies)
+#  CORRADE_UTILITY_LIBRARY          - Utility library (w/o dependencies)
+#  CORRADE_PLUGINMANAGER_LIBRARY    - Plugin manager library (w/o
+#   dependencies)
+#  CORRADE_TESTSUITE_LIBRARY        - TestSuite library (w/o dependencies)
 #

 #


modules: updated FindCorrade.cmake.

modules: updated FindCorrade.cmake.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -73,7 +73,9 @@
 #  CORRADE_TARGET_UNIX          - Defined if compiled for some Unix flavor
 #   (Linux, BSD, OS X)
 #  CORRADE_TARGET_APPLE         - Defined if compiled for Apple platforms
-#  CORRADE_TARGET_IOS           - Defined if compiled for iOS
+#  CORRADE_TARGET_IOS           - Defined if compiled for iOS (device or
+#   simulator)
+#  CORRADE_TARGET_IOS_SIMULATOR - Defined if compiled for iOS Simulator
 #  CORRADE_TARGET_WINDOWS       - Defined if compiled for Windows
 #  CORRADE_TARGET_WINDOWS_RT    - Defined if compiled for Windows RT
 #  CORRADE_TARGET_NACL          - Defined if compiled for Google Chrome Native
@@ -97,6 +99,7 @@
 #  CORRADE_USE_MODULE           - Path to UseCorrade.cmake module (included
 #   automatically)
 #  CORRADE_TESTSUITE_XCTEST_RUNNER - Path to XCTestRunner.mm.in file
+#  CORRADE_TESTSUITE_ADB_RUNNER - Path to AdbRunner.sh file
 #  CORRADE_PEDANTIC_COMPILER_OPTIONS - List of pedantic compiler options used
 #   for targets with :prop_tgt:`CORRADE_USE_PEDANTIC_FLAGS` enabled
 #  CORRADE_PEDANTIC_COMPILER_DEFINITIONS - List of pedantic compiler
@@ -120,12 +123,20 @@
 #
 #  corrade_add_test(<test name>
 #                   <sources>...
-#                   [LIBRARIES <libraries>...])
+#                   [LIBRARIES <libraries>...]
+#                   [FILES <files>...])
 #
 # Test name is also executable name. You can also specify libraries to link
 # with instead of using :command:`target_link_libraries()`.
 # ``Corrade::TestSuite`` target is linked automatically to each test. Note
 # that the :command:`enable_testing()` function must be called explicitly.
+#
+# You can list files needed by the test in the `FILES` section. The filenames
+# are treated relatively to `CMAKE_CURRENT_SOURCE_DIR`. On desktop platforms
+# the files are added to the :prop_test:`REQUIRED_FILES` target property. On
+# Emscripten they are bundled to the executable and available in the virtual
+# filesystem root. On Android they are copied along the executable to the
+# target.
 #
 # Unless :variable:`CORRADE_TESTSUITE_TARGET_XCTEST` is set, test cases on iOS
 # targets are created as bundles with bundle identifier set to CMake project
@@ -152,36 +163,59 @@
 # Add dynamic plugin::
 #
 #  corrade_add_plugin(<plugin name>
-#                     <debug install dir> <release install dir>
+#                     "<debug binary install dir>;<debug library install dir>"
+#                     "<release binary install dir>;<release library install dir>"
 #                     <metadata file>
 #                     <sources>...)
 #
 # The macro adds preprocessor directive ``CORRADE_DYNAMIC_PLUGIN``. Additional
 # libraries can be linked in via :command:`target_link_libraries(plugin_name ...) <target_link_libraries>`.
-# If ``<debug install dir>`` is set to :variable:`CMAKE_CURRENT_BINARY_DIR`
-# (e.g. for testing purposes), the files are copied directly, without the need
-# to perform install step. Note that the files are actually put into
-# configuration-based subdirectory, i.e. ``${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}``.
-# See documentation of :variable:`CMAKE_CFG_INTDIR` variable for more
-# information.
+# On DLL platforms, the plugin DLLs and metadata files are put into
+# ``<debug binary install dir>``/``<release binary install dir>`` and the
+# ``*.lib`` files into ``<debug library install dir>``/``<release library install dir>``.
+# On non-DLL platforms everything is put into ``<debug library install dir>``/
+# ``<release library install dir>``.
+#
+#  corrade_add_plugin(<plugin name>
+#                     <debug install dir>
+#                     <release install dir>
+#                     <metadata file>
+#                     <sources>...)
+#
+# Unline the above version this puts everything into ``<debug install dir>`` on
+# both DLL and non-DLL platforms. If ``<debug install dir>`` is set to
+# :variable:`CMAKE_CURRENT_BINARY_DIR` (e.g. for testing purposes), the files
+# are copied directly, without the need to perform install step. Note that the
+# files are actually put into configuration-based subdirectory, i.e.
+# ``${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}``. See documentation of
+# :variable:`CMAKE_CFG_INTDIR` variable for more information.
 #
 # .. command:: corrade_add_static_plugin
 #
 # Add static plugin::
+#
+#  corrade_add_static_plugin(<plugin name>
+#                            "<binary install dir>;<library install dir>"
+#                            <metadata file>
+#                            <sources>...)
+#
+# The macro adds preprocessor directive ``CORRADE_STATIC_PLUGIN``. Additional
+# libraries can be linked in via :command:`target_link_libraries(plugin_name ...) <target_link_libraries>`.
+# The ``<binary install dir>`` is ignored and included just for compatibility
+# with the :command:`corrade_add_plugin` command, everything is installed into
+# ``<library install dir>``. Note that plugins built in debug configuration
+# (e.g. with :variable:`CMAKE_BUILD_TYPE` set to ``Debug``) have ``"-d"``
+# suffix to make it possible to have both debug and release plugins installed
+# alongside each other.
 #
 #  corrade_add_static_plugin(<plugin name>
 #                            <install dir>
 #                            <metadata file>
 #                            <sources>...)
 #
-# The macro adds preprocessor directive ``CORRADE_STATIC_PLUGIN``. Additional
-# libraries can be linked in via :command:`target_link_libraries(plugin_name ...) <target_link_libraries>`.
+# Equivalent to the above with ``<library install dir>`` set to ``<install dir>``.
 # If ``<install dir>`` is set to :variable:`CMAKE_CURRENT_BINARY_DIR` (e.g. for
 # testing purposes), no installation rules are added.
-#
-# Note that plugins built in debug configuration (e.g. with :variable:`CMAKE_BUILD_TYPE`
-# set to ``Debug``) have ``"-d"`` suffix to make it possible to have both debug
-# and release plugins installed alongside each other.
 #
 # .. command:: corrade_find_dlls_for_libs
 #
@@ -248,6 +282,7 @@
     TARGET_UNIX
     TARGET_APPLE
     TARGET_IOS
+    TARGET_IOS_SIMULATOR
     TARGET_WINDOWS
     TARGET_WINDOWS_RT
     TARGET_NACL
@@ -269,6 +304,13 @@
     find_file(CORRADE_TESTSUITE_XCTEST_RUNNER XCTestRunner.mm.in
         PATH_SUFFIXES share/corrade/TestSuite)
     set(CORRADE_TESTSUITE_XCTEST_RUNNER_NEEDED CORRADE_TESTSUITE_XCTEST_RUNNER)
+endif()
+
+# ADB runner file
+if(CORRADE_TARGET_ANDROID)
+    find_file(CORRADE_TESTSUITE_ADB_RUNNER AdbRunner.sh
+        PATH_SUFFIXES share/corrade/TestSuite)
+    set(CORRADE_TESTSUITE_ADB_RUNNER_NEEDED CORRADE_TESTSUITE_ADB_RUNNER)
 endif()

 # CMake module dir
@@ -459,6 +501,7 @@
     _CORRADE_MODULE_DIR
     _CORRADE_CONFIGURE_FILE
     ${CORRADE_TESTSUITE_XCTEST_RUNNER_NEEDED}
+    ${CORRADE_TESTSUITE_ADB_RUNNER_NEEDED}
     HANDLE_COMPONENTS)

 # Finalize the finding process


Cosmetic change to .pc.cmake file

Cosmetic change to .pc.cmake file

--- yaml-cpp.pc.cmake
+++ yaml-cpp.pc.cmake
@@ -4,7 +4,7 @@
 includedir=@INCLUDE_INSTALL_DIR@

 Name: Yaml-cpp
-Description: A YAML parser for C++
+Description: A YAML parser and emitter for C++
 Version: @YAML_CPP_VERSION@
 Requires:
 Libs: -L${libdir} -lyaml-cpp


remove final error message

remove final error message

--- cmake/FindSDL2.cmake
+++ cmake/FindSDL2.cmake
@@ -69,8 +69,6 @@
 #=============================================================================
 # (To distribute this file outside of CMake, substitute the full
 #  License text for the above reference.)
-
-message("arch is ${arch}")

 FIND_PATH(SDL2_INCLUDE_DIR SDL.h
   HINTS


erthink-cmake: minor fix AARCH64 cpu distinction.

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -160,12 +160,12 @@
   set(E2K TRUE)
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
   set(X86_64 TRUE)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*")
   set(X86_32 TRUE)
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|ARM64.*)")
+  set(AARCH64 TRUE)
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
   set(ARM32 TRUE)
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
-  set(AARCH64 TRUE)
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le.*")
   set(PPC64LE TRUE)
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64.*")


Update FW

Update FW

--- 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 "80d7184640c65a88a807b744c9623da8058f890b")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "82144ce72c305a2e9217ccf8691a378d9de8cb94")

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


fixed function

fixed function

--- cmake/function/function_signature_get.cmake
+++ cmake/function/function_signature_get.cmake
@@ -1,5 +1,5 @@
 #
-function(function_signature_get result func)
+function(function_signature_get func)
 	function_lines_get( "${func}")
   ans(lines)
 	#function_signature_regex(regex)


[cmake][NFC] Fix message for arrow not found

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -936,10 +936,10 @@
   find_package(Arrow)
   if(NOT ARROW_FOUND)
     if(fail-on-missing)
-      message(FATAL_ERROR "Apache Arrow not found. Please set ARROW_HOME to point to you Arrow installation,"
-                          "or include the installation of Arrrow the CMAKE_PREFIX_PATH. ")
-    else()
-      message(STATUS "Apache Arrow API not found. Set variable ARROW_HOME to point to your Arrow installation,"
+      message(FATAL_ERROR "Apache Arrow not found. Please set ARROW_HOME to point to your Arrow installation, "
+                          "or include the installation of Arrow in the CMAKE_PREFIX_PATH.")
+    else()
+      message(STATUS "Apache Arrow API not found. Set variable ARROW_HOME to point to your Arrow installation, "
                      "or include the installation of Arrow in the CMAKE_PREFIX_PATH.")
       message(STATUS "For the time being switching OFF 'arrow' option")
       set(arrow OFF CACHE BOOL "Disabled because Apache Arrow API not found (${arrow_description})" FORCE)


Add Clang dependency to the check for Clang C++ headers.

The problem is that CMake is mostly imperative and the result of
processing "if (TARGET blah)" checks depends on the order of import of
CMake files.
In this case, "projects" folder is registered before "tools",
and calling "CheckClangHeaders" [renamed to have a better name]
errors out without even giving Clang a chance to be built.

This, in turn, leads to libFuzzer bot failures in some circumstances on
some machines (depends on whether LIT or UNIT tests are scheduled
first).

Differential Revision: https://reviews.llvm.org/D37126

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

--- cmake/Modules/CompilerRTCompile.cmake
+++ cmake/Modules/CompilerRTCompile.cmake
@@ -67,8 +67,8 @@
   if(NOT COMPILER_RT_STANDALONE_BUILD)
     list(APPEND SOURCE_DEPS clang compiler-rt-headers)
   endif()
-  if (TARGET CompilerRTUnitTestCheckCxx)
-    list(APPEND SOURCE_DEPS CompilerRTUnitTestCheckCxx)
+  if (TARGET CheckClangHeaders)
+    list(APPEND SOURCE_DEPS CheckClangHeaders)
   endif()
   string(REGEX MATCH "[.](cc|cpp)$" is_cxx ${source_rpath})
   string(REGEX MATCH "[.](m|mm)$" is_objc ${source_rpath})
@@ -132,12 +132,10 @@
       "  false"
       "fi"
       )
-    add_custom_target(CompilerRTUnitTestCheckCxx
+    add_custom_target(CheckClangHeaders
       COMMAND bash -c "${CMD}"
       COMMENT "Checking that just-built clang can find C++ headers..."
       VERBATIM)
-    if (TARGET clang)
-      ADD_DEPENDENCIES(CompilerRTUnitTestCheckCxx clang)
-    endif()
+    ADD_DEPENDENCIES(CheckClangHeaders clang)
   endif()
 endmacro()


Remove flag for no longer supported MSVC version

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -360,10 +360,6 @@
   endif()

   include(ChooseMSVCCRT)
-
-  if( MSVC11 )
-    add_definitions(-D_VARIADIC_MAX=10)
-  endif()

   # Add definitions that make MSVC much less annoying.
   add_definitions(


Now that we move all the headers to the build directory, it is no needed to provide a full list of include directories in ROOT_INCLUDE_DIRS.

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -506,11 +506,9 @@
 set(ROOT_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}\")")

 #---To be used from the binary tree--------------------------------------------------------------------------
-get_property(buildtree_include_dirs GLOBAL PROPERTY ROOT_INCLUDE_DIRS)
-list(REMOVE_DUPLICATES buildtree_include_dirs)
 set(ROOT_INCLUDE_DIR_SETUP "
 # ROOT configured for use from the build tree - absolute paths are used.
-set(ROOT_INCLUDE_DIRS ${buildtree_include_dirs})
+set(ROOT_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
 ")
 set(ROOT_LIBRARY_DIR_SETUP "
 # ROOT configured for use from the build tree - absolute paths are used.


hunter_setup_msvc: vcvarsall.bat location for Visual Studio 2017

--- cmake/modules/hunter_setup_msvc.cmake
+++ cmake/modules/hunter_setup_msvc.cmake
@@ -109,13 +109,23 @@
       if(HUNTER_TESTING)
         # ignore error, see 'tests/hunter_setup_msvc/CMakeLists.txt'
       else()
-        hunter_internal_error(
-             "Environment variable ${_hunter_vcvarsall_env} is empty"
+        hunter_status_debug(
+            "Environment variable '${_hunter_vcvarsall_env}' is empty, analyzing CMAKE_VS_DEVENV_COMMAND"
         )
+        string(COMPARE EQUAL "${CMAKE_VS_DEVENV_COMMAND}" "" is_empty)
+        if(is_empty)
+          hunter_internal_error("CMAKE_VS_DEVENV_COMMAND is empty")
+        endif()
+        if(NOT IS_ABSOLUTE "${CMAKE_VS_DEVENV_COMMAND}")
+          hunter_internal_error("CMAKE_VS_DEVENV_COMMAND is not absolute")
+        endif()
+        get_filename_component(_hunter_vcvarsall_path "${CMAKE_VS_DEVENV_COMMAND}" DIRECTORY)
+        set(_hunter_vcvarsall_path "${_hunter_vcvarsall_path}/../../VC/Auxiliary/Build")
       endif()
+    else()
+      set(_hunter_vcvarsall_path "${_hunter_vcvarsall_path}/../../VC")
     endif()

-    set(_hunter_vcvarsall_path "${_hunter_vcvarsall_path}/../../VC")
     get_filename_component(
         _hunter_vcvarsall_path "${_hunter_vcvarsall_path}" ABSOLUTE
     )


boost.mpi: report broken for boost >= 1.56 (MSVC)

--- cmake/projects/Boost/mpi/hunter.cmake
+++ cmake/projects/Boost/mpi/hunter.cmake
@@ -9,6 +9,14 @@

 include(hunter_download)
 include(hunter_pick_scheme)
+include(hunter_report_broken_package)
+
+if(NOT HUNTER_Boost_VERSION VERSION_LESS 1.56.0 AND MSVC)
+  hunter_report_broken_package(
+      "boost.mpi library failed to install even if b2 build exit with 0."
+      "Use boost 1.55.0-patched-3"
+  )
+endif()

 hunter_pick_scheme(
     DEFAULT


Update PACKAGE_INTERNAL_DEPS_ID

Update PACKAGE_INTERNAL_DEPS_ID

--- cmake/projects/odb-boost/hunter.cmake
+++ cmake/projects/odb-boost/hunter.cmake
@@ -27,5 +27,5 @@
     PACKAGE_UNRELOCATABLE_TEXT_FILES
     "lib/libodb-boost.la"
     "lib/pkgconfig/libodb-boost.pc"
-    PACKAGE_INTERNAL_DEPS_ID "6"
+    PACKAGE_INTERNAL_DEPS_ID "7"
 )


boards: mimxrt1160_evk_cm4: enable standalone debugging

Enable standalone debugging of secondary CM4 core on MIMXRT1160 EVK.

Signed-off-by: Daniel DeGrasse <002dd1d4ac44ebb71088aae93501e62b784ed821@nxp.com>

--- boards/arm/mimxrt1160_evk/board.cmake
+++ boards/arm/mimxrt1160_evk/board.cmake
@@ -4,8 +4,16 @@
 # SPDX-License-Identifier: Apache-2.0
 #

+if(CONFIG_SOC_MIMXRT1166_CM7)
 board_runner_args(pyocd "--target=mimxrt1160_cm7")
 board_runner_args(jlink "--device=MIMXRT1166xxx6_M7" "--reset-after-load")
+endif()
+
+if(CONFIG_SOC_MIMXRT1166_CM4)
+board_runner_args(pyocd "--target=mimxrt1160_cm4")
+# Note: Please use JLINK above V7.50 (Only support run cm4 image when debugging due to default boot core on board is cm7 core)
+board_runner_args(jlink "--device=MIMXRT1166xxx6_M4")
+endif()

 include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
 include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)


BUG: test to remove the binary option from windows patch args

--- SuperBuild/CMake/SuperBuild_Macro.cmake
+++ SuperBuild/CMake/SuperBuild_Macro.cmake
@@ -117,8 +117,6 @@

   if(WIN32)
     set(DIFF_FILE_MATCH_STRING "win")
-    if(NOT PATCH_ARGS)
-      set(PATCH_ARGS "--binary")
     endif()
   else()
     if(APPLE)


Updated jenkins cmake script

Updated jenkins cmake script

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -37,7 +37,7 @@
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
 set(CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION})

-ctest_start("${JENKINS_DASHBOARD}" ${QUIET_})n/MEM
+ctest_start("${JENKINS_DASHBOARD}" ${QUIET_})
 ctest_configure(OPTIONS -DCMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION} RETURN_VALUE CONFIGURING_RET_VALUE ${QUIET_})
 ctest_build(RETURN_VALUE BUILDING_RET_VALUE ${QUIET_})
 ctest_test(${QUIET_})


ENH: Additional search paths for MySQL files. Now it works without manual intervention when building 64-bit VTK with 64-bit CMake on a Win64 machine with 64-bit MySQL installed.

--- CMake/FindMySQL.cmake
+++ CMake/FindMySQL.cmake
@@ -24,6 +24,7 @@
   /usr/local/include/mysql
   /usr/local/mysql/include
   "C:/Program Files/MySQL/include"
+  "C:/Program Files/MySQL/MySQL Server 5.0/include"
   "C:/MySQL/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include"
@@ -39,6 +40,7 @@
   /usr/local/lib/mysql
   /usr/local/mysql/lib
   "C:/Program Files/MySQL/lib"
+  "C:/Program Files/MySQL/MySQL Server 5.0/lib/opt"
   "C:/MySQL/lib/debug"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
@@ -65,4 +67,3 @@
 ENDIF (MYSQL_LIBRARY)

 MARK_AS_ADVANCED( MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES MYSQL_INCLUDE_DIRECTORIES )
-


Readd install for thrift.  Necessary for thrift exe and python lib

--- thrift.cmake
+++ thrift.cmake
@@ -42,7 +42,7 @@
         CPPFLAGS=-I${BUILDEM_DIR}/include
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     BUILD_IN_SOURCE     1
-    INSTALL_COMMAND     ""
+    INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install
 )

 set (thrift_STATIC_LIBRARIES ${BUILDEM_LIB_DIR}/libthrift.a)


build: Update Thrust to 1.8.2

build: Update Thrust to 1.8.2

--- contrib/thrust.cmake
+++ contrib/thrust.cmake
@@ -4,7 +4,7 @@
     PREFIX ${thrust_PREFIX}
     GIT_REPOSITORY "https://github.com/thrust/thrust.git"
     # we're tracking branch 1.8.0
-    GIT_TAG "c2863d38d107a225e9dae9bb4ff9a5d39b71ab3b"
+    GIT_TAG "1.8.2"
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
     INSTALL_COMMAND ""


ARROW-14748: [C++][CI] Update flags to give warning for unused results

Maybe problematic on older GCC compilers https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38172

Closes #11747 from bkmgit/ARROW-14748

Lead-authored-by: Benson Muite <e0844a8d1d85d7ae0a06d19fd8861a1c84037a1b@users.noreply.github.com>
Co-authored-by: bkmgit <663cf55e4fe00ad38f7c7762e6bf4ffba9809f3c@emailplus.org>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -275,6 +275,7 @@
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-conversion")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-deprecated-declarations")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-sign-conversion")
+    set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wunused-result")
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
     if(WIN32)
       set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /Wall")
@@ -305,6 +306,7 @@
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wpedantic")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wextra")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-unused-parameter")
+    set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wunused-result")
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
     if(WIN32)
       set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /Wall")


[CMake] Add option to set moc args for plugins.

--- cmake-module/gepetto-viewer-plugin.cmake
+++ cmake-module/gepetto-viewer-plugin.cmake
@@ -22,6 +22,7 @@
   SET(options QT4)
   SET(oneValueArgs )
   SET(multiValueArgs
+    MOC_OPTIONS
     HEADERS
     HEADERS_NO_MOC
     FORMS
@@ -32,7 +33,7 @@
   CMAKE_PARSE_ARGUMENTS(PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

   IF(DEFINED GEPETTO_VIEWER_INCLUDEDIR)
-    SET(MOC_INCLUDE_GEPETTO_VIEWER "-I${GEPETTO_VIEWER_INCLUDEDIR}")
+    SET(MOC_INCLUDE_GEPETTO_VIEWER "-I${GEPETTO_VIEWER_INCLUDEDIR}" ${PLUGIN_MOC_OPTIONS})
   ENDIF(DEFINED GEPETTO_VIEWER_INCLUDEDIR)

   IF(PLUGIN_QT4)
@@ -47,12 +48,6 @@
   ENDIF()

-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-  ADD_DEFINITIONS(${QT_DEFINITIONS}
-                  -DQT_PLUGIN
-                  -DQT_NO_DEBUG
-                  -DQT_SHARED)
-
   IF(APPLE)
     SET(CMAKE_MACOSX_RPATH TRUE)
   ENDIF(APPLE)
@@ -64,6 +59,9 @@
     ${PLUGIN_FORMS_HEADERS}
     ${PLUGIN_RESOURCES_RCC}
     )
+  target_include_directories(${PLUGIN_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+  target_compile_definitions(${PLUGIN_NAME} PRIVATE ${QT_DEFINITIONS} -DQT_PLUGIN -DQT_NO_DEBUG -DQT_SHARED)
+
   SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES PREFIX "")
   IF(APPLE)
     SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES SUFFIX ".so")


Upgrade Arrow to include Plasma TensorFlow Op release fix (#3448)

This includes a fix so the TensorFlow op releases memory properly (https://github.com/apache/arrow/pull/3061) and the possibility to store arrow data structures in plasma (https://github.com/apache/arrow/pull/2832).

https://github.com/ray-project/ray/issues/3404

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

 set(arrow_URL https://github.com/apache/arrow.git)
-# The PR for this commit is https://github.com/apache/arrow/pull/2826. We
+# The PR for this commit is https://github.com/apache/arrow/pull/3061. We
 # include the link here to make it easier to find the right commit because
 # Arrow often rewrites git history and invalidates certain commits.
-set(arrow_TAG b4f7ed6d6ed5cdb6dd136bac3181a438f35c8ea0)
+set(arrow_TAG a667fca3b71772886bb2595986266d2039823dcc)

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


OSX: forgotten adaption for png update, use only unversioned libname, i added a symlink anyway

--- cmake/SpecializedConfig/Config_OSX.cmake
+++ cmake/SpecializedConfig/Config_OSX.cmake
@@ -46,7 +46,7 @@
 SET(JPEG_LIBRARIES ${OSX_DEPENDENCY_ROOT}/lib/libjpeg.a)
 SET(JPEG_INCLUDE_DIR ${OSX_DEPENDENCY_ROOT}/include/jpeg)
 SET(JPEG_FOUND ON)
-SET(PNG_LIBRARIES ${OSX_DEPENDENCY_ROOT}/lib/libpng14.a ${SYS_LIBRARIES})
+SET(PNG_LIBRARIES ${OSX_DEPENDENCY_ROOT}/lib/libpng.a ${SYS_LIBRARIES})
 SET(PNG_INCLUDE_DIR ${OSX_DEPENDENCY_ROOT}/include/png)
 SET(PNG_FOUND ON)
 SET(EMBREE_LIBRARY ${OSX_DEPENDENCY_ROOT}/lib/embree2/libembree.2.4.0.dylib)


disable cxx11 on clang with libc++ if buggy

--- cmake/checks/check_01_cxx_features.cmake
+++ cmake/checks/check_01_cxx_features.cmake
@@ -180,6 +180,15 @@
       int main(){ bind(multiplies<int>(),4,_1)(5); return 0; }
       "
       DEAL_II_HAVE_CXX11_FUNCTIONAL_GCCBUG35569_OK)
+
+    # clang libc++ bug, see https://llvm.org/bugs/show_bug.cgi?id=20084
+    CHECK_CXX_SOURCE_COMPILES(
+      "
+      #include <functional>
+      struct A { void foo() const {} };
+      int main() { A a; std::bind(&A::foo,a)(); return 0; }
+      "
+      DEAL_II_HAVE_CXX11_FUNCTIONAL_LLVMBUG20084_OK)

     CHECK_CXX_SOURCE_COMPILES(
       "
@@ -312,6 +321,7 @@
       DEAL_II_HAVE_CXX11_CONDITION_VARIABLE AND
       DEAL_II_HAVE_CXX11_FUNCTIONAL AND
       DEAL_II_HAVE_CXX11_FUNCTIONAL_GCCBUG35569_OK AND
+      DEAL_II_HAVE_CXX11_FUNCTIONAL_LLVMBUG20084_OK AND
       DEAL_II_HAVE_CXX11_SHARED_PTR AND
       DEAL_II_HAVE_CXX11_THREAD AND
       DEAL_II_HAVE_CXX11_MUTEX AND


Remove -DBOOST_TEST_DYN_LINK from all translation units

* Above define was being set on all translation units,
  this is only necessary for boost tests, and should be
  defined only when required

--- FindBoostConfig.cmake
+++ FindBoostConfig.cmake
@@ -10,9 +10,6 @@
 set(Boost_DETAILED_FAILURE_MSG ON) # Output which components are missing
 add_definitions(-DBOOST_ALL_NO_LIB) # Don't use 'pragma lib' on Windows
 add_definitions(-DBoost_NO_BOOST_CMAKE) # Fix for CMake problem in FindBoost
-if(NOT Boost_USE_STATIC_LIBS)
-  add_definitions(-DBOOST_TEST_DYN_LINK) # generates main() for unit tests
-endif()
 if(NOT "$ENV{BOOST_ROOT}" STREQUAL "" OR
     NOT "$ENV{BOOST_LIBRARYDIR}" STREQUAL "")
   # Fix find of non-system Boost


Add compiler flags for coverage for INTERNAL_WITH_GCOV.

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -15,6 +15,12 @@
     else()
        add_definitions(-g -std=c99 -Wall -Wextra -Wunused)
     endif (WITH_CXX)
+
+    if (INTERNAL_WITH_GCOV)
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage -fprofile-arcs")
+      set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage -fprofile-arcs")
+      set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage -fprofile-arcs")
+    endif (INTERNAL_WITH_GCOV)

     add_definitions(-D_REENTRANT)           # for gmtime_r()
     add_definitions(-D_XOPEN_SOURCE)        # for popen() and pclose()


CMake: REGEX REPLACE ARGS needs to be quoted on Windows

--- CMake/sitkCheckRequiredFlags.cmake
+++ CMake/sitkCheckRequiredFlags.cmake
@@ -39,7 +39,7 @@
       CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
       CMAKE_SHARED_LINKER_FLAGS_DEBUG
       CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO )
-    STRING(REGEX REPLACE "INCREMENTAL(:[a-zA-Z]+)?" "INCREMENTAL:NO" ${_varName} ${${_varName}})
+    STRING(REGEX REPLACE "INCREMENTAL(:[a-zA-Z]+)?" "INCREMENTAL:NO" ${_varName} "${${_varName}}")
   endforeach()

 endif()


Make ament_include_directories_order a function to allow paths with backslashes on windows. (#371)

* Repalce backslashes with forward slashes on Windows

Signed-off-by: Shane Loretz <7fde345e8e2e22c78a1570a4807e4629866dc7de@osrfoundation.org>

* Typo

Signed-off-by: Shane Loretz <7fde345e8e2e22c78a1570a4807e4629866dc7de@osrfoundation.org>

* Replace slashes in ARGN

Signed-off-by: Shane Loretz <7fde345e8e2e22c78a1570a4807e4629866dc7de@osrfoundation.org>

* Don't quote

Signed-off-by: Shane Loretz <7fde345e8e2e22c78a1570a4807e4629866dc7de@osrfoundation.org>

* Check ARGN has values before trying to string(REPLACE them

Signed-off-by: Shane Loretz <7fde345e8e2e22c78a1570a4807e4629866dc7de@osrfoundation.org>

* Make ament_include_directories_order a function

Signed-off-by: Shane Loretz <7fde345e8e2e22c78a1570a4807e4629866dc7de@osrfoundation.org>

--- ament_cmake_include_directories/cmake/ament_include_directories_order.cmake
+++ ament_cmake_include_directories/cmake/ament_include_directories_order.cmake
@@ -22,16 +22,12 @@
 #
 # @public
 #
-macro(ament_include_directories_order var)
-  set(_ament_prefix_path_list "$ENV{AMENT_PREFIX_PATH}")
+function(ament_include_directories_order var)
+  set(prefixes "$ENV{AMENT_PREFIX_PATH}")
   if(NOT WIN32)
-    string(REPLACE ":" ";" _ament_prefix_path_list "${_ament_prefix_path_list}")
+    string(REPLACE ":" ";" prefixes "${prefixes}")
   endif()
-  _ament_include_directories_order(${var} "${_ament_prefix_path_list}" ${ARGN})
-endmacro()

-
-function(_ament_include_directories_order var prefixes)
   # create list of empty slots, one per prefix and one for unknown prefixes
   list(LENGTH prefixes prefix_count)
   foreach(index RANGE ${prefix_count})


remove usb-1.0 headers from openni ones

remove usb-1.0 headers from openni ones

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -66,8 +66,9 @@
 if(OPENNI_FOUND)
   set(HAVE_OPENNI ON)
   # Add the include directories
-  set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIRS} ${USB_10_INCLUDE_DIR})
+  set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIRS})
   include_directories(${OPENNI_INCLUDE_DIRS})
+	include_directories(${USB_10_INCLUDE_DIR})
   message(STATUS "OpenNI found (include: ${OPENNI_INCLUDE_DIRS}, lib: ${OPENNI_LIBRARY})")
 endif(OPENNI_FOUND)


Make cmake be quiet about aravis

Make cmake be quiet about aravis

--- cmake/modules/FindAravis.cmake
+++ cmake/modules/FindAravis.cmake
@@ -29,7 +29,7 @@
 )

 # Finally the library itself
-find_library(aravis_LIBRARY
+find_library(aravis_LIBRARIES
 	NAMES
 	libaravis-0.4
 	libaravis-0.6
@@ -44,8 +44,8 @@
 	/usr/lib
 )

-# # Set the include dir variables and the libraries and let libfind_process do the rest.
-# # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
-set(aravis_PROCESS_INCLUDES aravis_INCLUDE_DIR aravis_INCLUDE_DIRS)
-set(aravis_PROCESS_LIBS aravis_LIBRARY aravis_LIBRARIES)
-libfind_process(aravis)
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set TCAM_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(Aravis  DEFAULT_MSG
+  aravis_LIBRARIES aravis_INCLUDE_DIR)


FindNodejs.cmake: V8_VERSION_MAJOR is being set and MINOR/PATCH where empty

This has been wrong for a while and probably not the most important but when
node.js fails to be detected (typically this means runtime check on node.js has
failed which hopefully is rare!)

Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- cmake/modules/FindNodejs.cmake
+++ cmake/modules/FindNodejs.cmake
@@ -48,8 +48,8 @@
         set (NODE_VERSION_MINOR "10")
         set (NODE_VERSION_PATCH "30")
         set (V8_VERSION_MAJOR "3")
-        set (V8_VERSION_MAJOR "14")
-        set (V8_VERSION_MAJOR "5")
+        set (V8_VERSION_MINOR"14")
+        set (V8_VERSION_PATCH "5")
         set (V8_VERSION_STRING "3.28.72")
         message ("defaulted to node 0.10.30")
     endif ()


CMake/TpQtMacros: Added missing dependencies.

Generated header now depends on input xmls.

Fixes build with ninja.

--- cmake/modules/TpQtMacros.cmake
+++ cmake/modules/TpQtMacros.cmake
@@ -223,7 +223,9 @@
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

         DEPENDS ${CMAKE_SOURCE_DIR}/tools/libqtcodegen.py
-                ${CMAKE_SOURCE_DIR}/tools/qt-client-gen.py)
+                ${CMAKE_SOURCE_DIR}/tools/qt-client-gen.py
+                ${CMAKE_CURRENT_BINARY_DIR}/_gen/stable-spec.xml
+                ${CMAKE_CURRENT_BINARY_DIR}/_gen/spec-${spec}.xml)
     add_custom_target(generate_cli-${spec}-body DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_gen/cli-${spec}-body.hpp)
     add_dependencies(all-generated-sources generate_cli-${spec}-body)

@@ -259,7 +261,9 @@
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

         DEPENDS ${CMAKE_SOURCE_DIR}/tools/libqtcodegen.py
-                ${CMAKE_SOURCE_DIR}/tools/qt-client-gen.py)
+                ${CMAKE_SOURCE_DIR}/tools/qt-client-gen.py
+                ${CMAKE_CURRENT_BINARY_DIR}/_gen/future-spec.xml
+                ${CMAKE_CURRENT_BINARY_DIR}/_gen/future-${spec}.xml)
     add_custom_target(generate_future-${spec}-body DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_gen/future-${spec}-body.hpp)
     add_dependencies(all-generated-sources generate_future-${spec}-body)

@@ -294,7 +298,9 @@
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

         DEPENDS ${CMAKE_SOURCE_DIR}/tools/libqtcodegen.py
-                ${CMAKE_SOURCE_DIR}/tools/qt-svc-gen.py)
+                ${CMAKE_SOURCE_DIR}/tools/qt-svc-gen.py
+                ${CMAKE_CURRENT_BINARY_DIR}/_gen/stable-spec.xml
+                ${CMAKE_CURRENT_BINARY_DIR}/_gen/spec-svc-${spec}.xml)
     add_custom_target(generate_service-${spec}-body DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_gen/svc-${spec}.cpp)
     add_dependencies(all-generated-service-sources generate_service-${spec}-body)


Fixing hdf5 compilation on osx

Fixing hdf5 compilation on osx

Former-commit-id: daddcd81d7ca8a216ea4e1fa821463016e482e35

--- cmake_modules/Fetch_HDF5.cmake
+++ cmake_modules/Fetch_HDF5.cmake
@@ -4,7 +4,7 @@

 find_file(HDF5_CXX_COMPILER_EXECUTABLE NAMES h5c++ h5cc h5fc h5pfc PATHS /usr/bin /usr/local/bin)
 set(HDF5_USE_STATIC_LIBRARIES ON)
-set(HDF5_FIND_DEBUG ON)
+set(HDF5_FIND_DEBUG OFF)
 find_package(HDF5 COMPONENTS C CXX HL)
 if(HDF5_LIBRARIES MATCHES "anaconda")
     message("Found anaconda version. Ignoring...")


Build call graphs in doxygen conditionally with cmake.

--- cmake/generate_doxygen.cmake
+++ cmake/generate_doxygen.cmake
@@ -1,5 +1,14 @@
 FIND_PACKAGE(Doxygen QUIET)
 IF(DOXYGEN_FOUND)
+    IF (DOXYGEN_CREATE_GRAPHS EQUAL 1)
+        SET (CJET_HAVE_DOT YES)
+        SET (CJET_SET_CALL_GRAPH YES)
+        SET (CJET_SET_CALLER_GRAPH YES)
+    ELSE()
+        SET (CJET_HAVE_DOT NO)
+        SET (CJET_SET_CALL_GRAPHi NO)
+        SET (CJET_SET_CALLER_GRAPH NO)
+    ENDIF()
     SET(CJET_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
     CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/generated/Doxyfile)
     ADD_CUSTOM_TARGET(doc ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/generated/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM)


Travis-CI: trying to understand why the tests don't pass on OS X while they do locally.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -985,12 +985,21 @@
     #       use the real path instead. So, we need to handle both cases...

     GET_FILENAME_COMPONENT(REAL_QT_LIBRARY_DIR ${QT_LIBRARY_DIR} REALPATH)
+ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
+                   COMMAND echo "=========")
+ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
+                   COMMAND echo "QT_LIBRARY_DIR: ${QT_LIBRARY_DIR}")
+ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
+                   COMMAND echo "REAL_QT_LIBRARY_DIR: ${REAL_QT_LIBRARY_DIR}")
+STRING(REPLACE ";" " " FORMATTED_ARGN "${ARGN}")
+ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
+                   COMMAND echo "ARGN: ${FORMATTED_ARGN}")

     FOREACH(DEPENDENCY ${ARGN})
         SET(DEPENDENCY_FILENAME ${DEPENDENCY}.framework/Versions/${QT_VERSION_MAJOR}/${DEPENDENCY})

 ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND echo "---------")
+                   COMMAND echo "~~~~~~~~~")
 ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
                    COMMAND otool -L ${FULL_FILENAME})

@@ -1005,9 +1014,9 @@

 ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
                    COMMAND otool -L ${FULL_FILENAME})
+    ENDFOREACH()
 ADD_CUSTOM_COMMAND(TARGET ${PROJECT_TARGET} POST_BUILD
-                   COMMAND echo "---------")
-    ENDFOREACH()
+                   COMMAND echo "=========")
 ENDMACRO()

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


CMake: some minor cleaning up.

CMake: some minor cleaning up.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -124,10 +124,16 @@

   if(CLANG_TIDY_AVAILABLE)
     if(NOT "${_TARGET}" STREQUAL "cellml")
-        set(_NO_BUGPRONE_EXCEPTION_ESCAPE -bugprone-exception-escape)
-        set(_NO_CPPCOREGUIDELINES_AVOID_NON_CONST_GLOBAL_VARIABLES -cppcoreguidelines-avoid-non-const-global-variables)
-        set(_NO_CPPCOREGUIDELINES_PRO_TYPE_VARARG -cppcoreguidelines-pro-type-vararg)
-        set(_NO_HICPP_VARARG -hicpp-vararg)
+        set(_DISABLED_BUGPRONE_CHECKS
+          -bugprone-exception-escape
+        )
+        set(_DISABLED_CPPCOREGUIDELINES_CHECKS
+          -cppcoreguidelines-avoid-non-const-global-variables
+          -cppcoreguidelines-pro-type-vararg
+        )
+        set(_DISABLED_HICPP_CHECKS
+          -hicpp-vararg
+        )
     endif()

     # The full list of Clang-Tidy checks can be found at
@@ -136,7 +142,7 @@
       -*
       bugprone-*
       -bugprone-branch-clone
-      ${_NO_BUGPRONE_EXCEPTION_ESCAPE}
+      ${_DISABLED_BUGPRONE_CHECKS}
       cert-*
       -cert-err58-cpp
       cppcoreguidelines-*
@@ -144,10 +150,9 @@
       -cppcoreguidelines-init-variables
       -cppcoreguidelines-owning-memory
       -cppcoreguidelines-pro-type-reinterpret-cast
-      ${_NO_CPPCOREGUIDELINES_AVOID_NON_CONST_GLOBAL_VARIABLES}
-      ${_NO_CPPCOREGUIDELINES_PRO_TYPE_VARARG}
       -cppcoreguidelines-slicing
       -cppcoreguidelines-special-member-functions
+      ${_DISABLED_CPPCOREGUIDELINES_CHECKS}
       fuchsia-*
       -fuchsia-default-arguments
       -fuchsia-default-arguments-calls
@@ -160,7 +165,7 @@
       -google-runtime-references
       hicpp-*
       -hicpp-special-member-functions
-      ${_NO_HICPP_VARARG}
+      ${_DISABLED_HICPP_CHECKS}
       llvm-*
       -llvm-qualified-auto
       -llvm-header-guard


In CMake, check headers in C, not in C++.

Looks like all along, CMake was breaking, and not making it quite clear
enough!  We removed C as a language, but it turns out that checking for
an "include file" _always_ uses the C compiler.  Which wasn't
configured.  And here I was thinking that it was normal that you need
to run cmake twice in a row — what posessed it to proceed to a state
where you could "successfully" generate the build despite a compiler
being missing!?

Anyway, there's an alternative module and function to check for a C++
header.  That did the trick.

--- cmake/config.cmake
+++ cmake/config.cmake
@@ -20,16 +20,15 @@
   " "${macro}" "__attribute__ ((${attr_name}))")
 endfunction(detect_attribute)

-include(CheckIncludeFiles)
+include(CheckIncludeFileCXX)
 include(CheckFunctionExists)
 include(CMakeDetermineCompileFeatures)
 include(CheckCXXSourceCompiles)

-check_include_files("sys/select.h" HAVE_SYS_SELECT_H)
-check_include_files("sys/stat.h" HAVE_SYS_STAT_H)
-check_include_files("sys/time.h" HAVE_SYS_TIME_H)
-check_include_files("sys/types.h" HAVE_SYS_TYPES_H)
-check_include_files("unistd.h" HAVE_UNISTD_H)
+check_include_file_cxx("sys/select.h" HAVE_SYS_SELECT_H)
+check_include_file_cxx("sys/time.h" HAVE_SYS_TIME_H)
+check_include_file_cxx("sys/types.h" HAVE_SYS_TYPES_H)
+check_include_file_cxx("unistd.h" HAVE_UNISTD_H)

 check_function_exists("poll" HAVE_POLL)


Typo fix

Typo fix

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -48,7 +48,7 @@
   if (${TARGET} STREQUAL "COOPERLAKE" AND NOT NO_AVX512)
     if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
       execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
-        if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL10.1)
+        if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL 10.1)
           set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=cooperlake")
         else()
           set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")


Replaced add_custom_command with add_custom_target in xpu_kp_cmake (#44619)

* Replaced add_custom_command with add_custom_target in xpu_kp_cmake

--- cmake/xpu_kp.cmake
+++ cmake/xpu_kp.cmake
@@ -168,11 +168,13 @@
   else()
     set(ABI_VERSION "-D_GLIBCXX_USE_CXX11_ABI=1")
   endif()
+  add_custom_target(
+    ${kernel_name}.xpu ALL
+    COMMAND ${CMAKE_COMMAND} -E copy ${kernel_path}/${kernel_name}.kps
+            kernel_build/${kernel_name}.xpu)
   add_custom_command(
     OUTPUT kernel_build/${kernel_name}.bin.o
     COMMAND ${CMAKE_COMMAND} -E make_directory kernel_build
-    COMMAND ${CMAKE_COMMAND} -E copy ${kernel_path}/${kernel_name}.kps
-            kernel_build/${kernel_name}.xpu
     COMMAND
       ${XPU_CLANG} --sysroot=${CXX_DIR} -std=c++11 ${ABI_VERSION} ${OPT_LEVEL}
       -fno-builtin -mcpu=xpu2 -fPIC ${XPU_CXX_DEFINES} ${XPU_CXX_FLAGS}
@@ -189,8 +191,6 @@
   add_custom_command(
     OUTPUT kernel_build/${kernel_name}.host.o
     COMMAND ${CMAKE_COMMAND} -E make_directory kernel_build
-    COMMAND ${CMAKE_COMMAND} -E copy ${kernel_path}/${kernel_name}.kps
-            kernel_build/${kernel_name}.xpu
     COMMAND
       ${XPU_CLANG} --sysroot=${CXX_DIR} -std=c++11 ${ABI_VERSION} ${OPT_LEVEL}
       -fno-builtin -mcpu=xpu2 -fPIC ${XPU_CXX_DEFINES} ${XPU_CXX_FLAGS}


SuperBuild: delete cmake unused macro

SuperBuild: delete cmake unused macro

--- SuperBuild/CMake/SuperBuild_Macro.cmake
+++ SuperBuild/CMake/SuperBuild_Macro.cmake
@@ -1,46 +1,4 @@
 include(CMakeParseArguments)
-
-# Macro ADD_SYSTEM_LOCATION : define variables to specific system locations
-macro(ADD_SYSTEM_LOCATION)
-  cmake_parse_arguments(NEW_SYSLOC  "" "PROJECT" "VARIABLES" ${ARGN})
-  foreach(var ${NEW_SYSLOC_VARIABLES})
-    set(${var} "" CACHE FILEPATH "Set a custom system location")
-    mark_as_advanced(${var})
-    if(USE_SYSTEM_${NEW_SYSLOC_PROJECT})
-      set_property(CACHE ${var} PROPERTY TYPE FILEPATH)
-    else()
-      set_property(CACHE ${var} PROPERTY TYPE INTERNAL)
-    endif()
-    # add variable to cache if not empty
-    if(NOT ${var} STREQUAL "")
-      # additional argument for CMake cache
-      set(ITEM_FOR_CMAKE_CACHE "-D${var}:STRING=${${var}}")
-      list(APPEND SYSTEM_${NEW_SYSLOC_PROJECT}_CMAKE_CACHE ${ITEM_FOR_CMAKE_CACHE})
-    endif()
-  endforeach(var)
-endmacro(ADD_SYSTEM_LOCATION)
-
-# Macro ADD_SYSTEM_PREFIX : defines a system prefix for the given project
-#   - creates a cache variable SYSTEM_${PROJECT}_PREFIX
-#   - if CMAKE_ALIAS is defined, it is used to add an entry in cache
-#       -D${CMAKE_ALIAS}:PATH=${SYSTEM_${PROJECT}_PREFIX}
-macro(ADD_SYSTEM_PREFIX)
-  cmake_parse_arguments(NEW_SYSPREFIX  "" "PROJECT;CMAKE_ALIAS" "" ${ARGN})
-  set(SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX "" CACHE PATH "Set a custom system prefix")
-  mark_as_advanced(SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX)
-  if(USE_SYSTEM_${NEW_SYSPREFIX_PROJECT})
-    set_property(CACHE SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX PROPERTY TYPE PATH)
-  else()
-    set_property(CACHE SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX PROPERTY TYPE INTERNAL)
-  endif()
-  if(NOT ${NEW_SYSPREFIX_CMAKE_ALIAS} STREQUAL "")
-    if(NOT SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX STREQUAL "")
-      set(ITEM_FOR_CMAKE_CACHE
-        "-D${NEW_SYSPREFIX_CMAKE_ALIAS}:PATH=${SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX}")
-      list(APPEND SYSTEM_${NEW_SYSLOC_PROJECT}_CMAKE_CACHE ${ITEM_FOR_CMAKE_CACHE})
-    endif()
-  endif()
-endmacro(ADD_SYSTEM_PREFIX)

 macro(INCLUDE_ONCE_MACRO project)
   if( __included_${project}__)


Fix missing quotes around variable

Fix missing quotes around variable

--- cmake/GlobalBuildConfig.cmake
+++ cmake/GlobalBuildConfig.cmake
@@ -6,10 +6,12 @@
   "${CMAKE_SOURCE_DIR}/cmake/Modules"
 )

-if(${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Intel")
+if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
+   "${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
   set(CMAKE_COMPILER_IS_GNUCC TRUE)
 endif()
-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
+   "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
   set(CMAKE_COMPILER_IS_GNUCXX TRUE)
 endif()


cmake: Fix packaging of niral_utilities on windows

Since the target property LOCATION is not guaranty to default to
the Release configuration when building using multi-configuration
generator, this commit explicitly specifies LOCATION_RELEASE.

Fixes #42

--- DTIProcess.cmake
+++ DTIProcess.cmake
@@ -36,7 +36,11 @@

   foreach(niral_utilities_lib ${niral_utilities_LIBRARIES})

-    get_target_property(niral_utilities_location ${niral_utilities_lib} LOCATION)
+    get_target_property(niral_utilities_location ${niral_utilities_lib} LOCATION_RELEASE)
+    if(NOT EXISTS ${niral_utilities_location})
+      message(STATUS "skipping niral_utilities_lib install rule: [${niral_utilities_location}] does not exist")
+      continue()
+    endif()

     install(PROGRAMS ${niral_utilities_location}
       DESTINATION ${INSTALL_RUNTIME_DESTINATION}


Package Qt3Support on windows

Package Qt3Support on windows

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -90,7 +90,7 @@
     BINARY_DIR ${${proj}_DIR}
     PREFIX ${proj}${ep_suffix}
     GIT_REPOSITORY "git://public.kitware.com/Bender/Slicer.git"
-    GIT_TAG "d36af0c88bc60771a7ad88fbddfc2b14512ea0f1"
+    GIT_TAG "d89f59ab8cdabbb8a8943c80977c48ee6543a91c"
     ${bender_external_update}
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}


Add TBB include directory

Add TBB include directory

refs #319

``* Fix compile error when TBB include files are in non-system directory``

--- CMake/hoomd/HOOMDCommonLibsSetup.cmake
+++ CMake/hoomd/HOOMDCommonLibsSetup.cmake
@@ -21,6 +21,7 @@

 if(ENABLE_TBB)
     find_package(TBB 4.3)
+    include_directories(${TBB_INCLUDE_DIR})

     # Detect clang and fix incompatiblity with TBB
     # https://github.com/wjakob/tbb/blob/master/CMakeLists.txt


Add volta and remove fermi from CUDA Toolkit 9.0 builds

--- CMakeModules/select_compute_arch.cmake
+++ CMakeModules/select_compute_arch.cmake
@@ -30,12 +30,18 @@

 if (CUDA_VERSION VERSION_GREATER "7.5")
   list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Pascal")
-  list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "6.0" "6.1" "6.1+PTX")
+  list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "6.0" "6.1")
 else()
   list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "5.2+PTX")
 endif ()

-
+if (CUDA_VERSION VERSION_GREATER "8.5")
+  list(APPEND CUDA_KNOWN_GPU_ARCHITECTURES "Volta")
+  list(REMOVE_ITEM CUDA_KNOWN_GPU_ARCHITECTURES "Fermi")
+  list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "7.0" "7.0+PTX")
+else()
+  list(APPEND CUDA_COMMON_GPU_ARCHITECTURES "6.1+PTX")
+endif()

 ################################################################################################
 # A function for automatic detection of GPUs installed  (if autodetection is enabled)
@@ -141,6 +147,9 @@
       elseif(${arch_name} STREQUAL "Pascal")
         set(arch_bin 6.0 6.1)
         set(arch_ptx 6.1)
+      elseif(${arch_name} STREQUAL "Volta")
+        set(arch_bin 7.0 7.0)
+        set(arch_ptx 7.0)
       else()
         message(SEND_ERROR "Unknown CUDA Architecture Name ${arch_name} in CUDA_SELECT_NVCC_ARCH_FLAGS")
       endif()


examples/common.cmake: apply new gate variables

--- examples/common.cmake
+++ examples/common.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Ruslan Baratov
+# Copyright (c) 2013, 2015 Ruslan Baratov
 # All rights reserved.

 cmake_minimum_required(VERSION 3.0)
@@ -7,5 +7,12 @@
   message(FATAL_ERROR "Expected HUNTER_ROOT")
 endif()

+# Emulate HunterGate
+set(HUNTER_GATE_ROOT "${HUNTER_ROOT}")
+set(_unused "xxxxxxx")
+set(HUNTER_GATE_VERSION "${_unused}")
+set(HUNTER_GATE_SHA1 "${_unused}")
+# -- end
+
 include("${HUNTER_ROOT}/cmake/Hunter")
 include(hunter_add_package)


buildsys: release++

buildsys: release++

Signed-off-by: Igor Gnatenko <71fb2d16c26f553767b965fdac40e83622cad277@redhat.com>

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
-SET(LIBREPO_MINOR "7")
-SET(LIBREPO_PATCH "20")
+SET(LIBREPO_MINOR "8")
+SET(LIBREPO_PATCH "0")


SuperBuild: Freetype needs a dependency Harfbuzz

--- SuperBuild/CMake/External_freetype.cmake
+++ SuperBuild/CMake/External_freetype.cmake
@@ -14,8 +14,8 @@

   ExternalProject_Add(${proj}
     PREFIX ${proj}
-    URL "http://download.savannah.gnu.org/releases/freetype/freetype-2.6.1.tar.gz"
-    URL_MD5 348e667d728c597360e4a87c16556597
+    URL "http://download.savannah.gnu.org/releases/freetype/freetype-2.6.tar.gz"
+    URL_MD5 1d733ea6c1b7b3df38169fbdbec47d2b
     BINARY_DIR ${FREETYPE_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


PKG: empty custom target PACKAGE-TOOLS on windows

--- SuperBuild/CMake/External_pkgtools.cmake
+++ SuperBuild/CMake/External_pkgtools.cmake
@@ -6,17 +6,9 @@
 include(ExternalProject)

 if(WIN32)
-  ExternalProject_Add(PACKAGE-TOOLS
-    PREFIX "${PKGTOOLS_SB_PREFIX_DIR}"
-    URL "https://www.orfeo-toolbox.org/packages/qt4-native-tools-win64.zip"
-    URL_MD5 0e4bfd5677eb63ae691f4615a4338490
-    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-    CONFIGURE_COMMAND  ""
-    BUILD_COMMAND      ""
-    INSTALL_COMMAND    ""
-    )
+  add_custom_target(PACKAGE-TOOLS)
+  return()
 endif()
-

 if(UNIX AND NOT WIN32)
   if(APPLE)


[pybindings] fix incorrect PYTHON_INCLUDE_DIRS cmake variable

PYTHON_INCLUDE_DIRS means possible python paths.
PYTHON_INCLUDE_DIR means exact externally specified python path,
which we pass from setup.py.


use CMAKE_SYSTEM_NAME instead of LINUX

use CMAKE_SYSTEM_NAME instead of LINUX

Summary: Closes https://github.com/caffe2/caffe2/pull/170

Differential Revision: D4617063

Pulled By: Yangqing

fbshipit-source-id: cec9bc3f2f7324fd0281e92fab3d96e2cd4ed9e7

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -252,7 +252,7 @@
   if (NOT USE_CUDA)
     message(WARNING "If not using cuda, one should not use NCCL either.")
     set(USE_NCCL OFF)
-  elseif (NOT LINUX)
+  elseif (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
     message(WARNING "NCCL is currently only supported under Linux.")
     set(USE_NCCL OFF)
   else()


- remove the debug_test_* targets from "all"   (otherwise they are compiled when you simply run    make in test/ or when enforcing "test" to be part of "all") - add linking libraries to the debug_test_* targets

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -45,7 +45,7 @@
   set(filename ${testname}.cpp)
   add_executable(${targetname} ${filename})
   add_dependencies(btest ${targetname})
-  add_executable(${debug_targetname} ${filename})
+  add_executable(${debug_targetname} EXCLUDE_FROM_ALL ${filename})

   if(NOT EIGEN_NO_ASSERTION_CHECKING)

@@ -92,6 +92,7 @@
     string(LENGTH "${ARGV2_stripped}" ARGV2_stripped_length)
     if(${ARGV2_stripped_length} GREATER 0)
       target_link_libraries(${targetname} ${ARGV2})
+      target_link_libraries(${debug_targetname} ${ARGV2})
     endif(${ARGV2_stripped_length} GREATER 0)
   endif(${ARGC} GREATER 2)


BUILD_STATIC/FULL OFF by default

BUILD_STATIC/FULL OFF by default

+ more options hidden

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -218,8 +218,8 @@

 option (BUILD_SHARED "Build the shared version of elektra." ON)
-option (BUILD_FULL "Build the full version of elektra (shared with all selected backends included)." ON)
-option (BUILD_STATIC "Build the static version of elektra (all selected backends included statically)." ON)
+option (BUILD_FULL "Build the full version of elektra (shared with all selected backends included)." OFF)
+option (BUILD_STATIC "Build the static version of elektra (all selected backends included statically)." OFF)

 option (BUILD_DOCUMENTATION "Build the documentation (API, man pages)" ON)
 if (BUILD_DOCUMENTATION)
@@ -398,4 +398,22 @@
 	SWIG_DIR SWIG_EXECUTABLE SWIG_VERSION
 	gtest_build_samples gtest_build_tests gtest_disable_pthreads
 	gtest_force_shared_crt BUILD_SHARED_LIBS
+
+	ADDED_DIRECTORIES
+	ADDED_PLUGINS
+	REMOVED_PLUGINS
+
+	LIBGCRYPTCONFIG_EXECUTABLE
+	RONN_LOC
+
+	jna
+
+	Qt5Core_DIR
+	Qt5Gui_DIR
+	Qt5Network_DIR
+	Qt5Qml_DIR
+	Qt5Quick_DIR
+	Qt5Test_DIR
+	Qt5Widgets_DIR
+	Qt5_DIR
 	)


Remove boost hint cache except root.

Remove boost hint cache except root.

--- cmake/FindPackages.cmake
+++ cmake/FindPackages.cmake
@@ -8,8 +8,6 @@
         option(Boost_USE_STATIC_RUNTIME "Boost uses static runtime" OFF)

         set(BOOST_ROOT "" CACHE PATH "Hint for finding boost root directory")
-        set(BOOST_INCLUDEDIR "" CACHE PATH "Hint for finding boost include directory")
-        set(BOOST_LIBRARYDIR "" CACHE PATH "Hint for finding boost library directory")
     endif()

     set(missed_component "")


Revert "Added missing FindPackage call"

Revert "Added missing FindPackage call"

This reverts commit 7410a53f2dc503b933c15f4b9ddb909b2576a442.

--- cmake/clang-format.cmake
+++ cmake/clang-format.cmake
@@ -1,6 +1,4 @@
 # 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})
@@ -20,12 +18,17 @@

 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: toolchain: Improve error feedback when toolchain is not found

Improve the error feedback when the toolchain is not found.

Currently, for some setups, presumably primarily SDK-less setups,
users can get an error message like this for certain types of
misconfigurations:

CMake Error at zephyr/cmake/extensions.cmake:984 (message):
  No such file or directory: CMAKE_READELF: 'CMAKE_READELF-NOTFOUND'
Call Stack (most recent call first):
  zephyr/cmake/compiler/gcc.cmake:14 (assert_exists)
  zephyr/cmake/toolchain.cmake:38 (include)
  zephyr/cmake/app/boilerplate.cmake:243 (include)
  CMakeLists.txt:1 (include)

This commit will improve the error feedback to give a explanation for
what kind of failure has occured and will also dump relevant variables
to ease debugging.

This fixes #7075

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/compiler/gcc.cmake
+++ cmake/compiler/gcc.cmake
@@ -11,7 +11,15 @@
 find_program(CMAKE_GDB        ${CROSS_COMPILE}gdb     PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
 find_program(CMAKE_NM         ${CROSS_COMPILE}nm      PATH ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)

-assert_exists(CMAKE_READELF)
+if(CMAKE_C_COMPILER STREQUAL CMAKE_C_COMPILER-NOTFOUND)
+  message(FATAL_ERROR "Zephyr was unable to find the toolchain. Is the environment misconfigured?
+User-configuration:
+ZEPHYR_TOOLCHAIN_VARIANT: ${ZEPHYR_TOOLCHAIN_VARIANT}
+Internal variables:
+CROSS_COMPILE: ${CROSS_COMPILE}
+TOOLCHAIN_HOME: ${TOOLCHAIN_HOME}
+")
+endif()

 if(CONFIG_CPLUSPLUS)
   set(cplusplus_compiler ${CROSS_COMPILE}g++)


CMake: Warning for 32bit builds closes inviwo/inviwo-dev#1344

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -52,6 +52,11 @@
     endif()
 endif()

+if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
+    mesage(WARNING "Inviwo is only supported for 64-bit architectures.")
+endif()
+
+
 set_property(GLOBAL PROPERTY USE_FOLDERS On)
 set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER cmake)


Added fatal error in case that none of Qt versions is not found

--- cmake/include/pqTestSuite_setup_qt.cmake
+++ cmake/include/pqTestSuite_setup_qt.cmake
@@ -26,3 +26,9 @@
     endif()

 endif()
+
+if (NOT QT_FOUND)
+  message(FATAL_ERROR
+      "Qt libraries are required."
+  "Please install Qt4 or Qt5 and run again the CMake on the project.")
+endif ()


posix_sitl_default cmake: add ekf2_replay

so that CI will build it

--- cmake/configs/posix_sitl_default.cmake
+++ cmake/configs/posix_sitl_default.cmake
@@ -38,6 +38,7 @@
 	modules/commander
 	modules/dataman
 	modules/ekf2
+	modules/ekf2_replay
 	modules/events
 	modules/fw_att_control
 	modules/fw_pos_control_l1


cmake/boost: fixes fort visual studio

cmake/boost: fixes fort visual studio

* force using static  (workaround for boostpro packaging)
* set -DBOOST_ALL_NO_LIB to prevent auto-linking

Change-Id: I888749ed172efbdce66addecaefb486a3c48e875
Reviewed-on: http://gerrit.aldebaran.lan:8080/78
Reviewed-by: Dimitri Merejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: Dimitri Merejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/modules/boostutils.cmake
+++ cmake/qibuild/modules/boostutils.cmake
@@ -1,6 +1,7 @@
 ## Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
 ## Use of this source code is governed by a BSD-style license that can be
 ## found in the COPYING file.
+

 function(boost_flib _libname)
   string(TOUPPER ${_libname} _prefix)
@@ -8,6 +9,19 @@
   clean(${_prefix})
   # Required so that FindBoost.cmake does not try to include this file
   set(Boost_NO_BOOST_CMAKE TRUE)
+  if(MSVC)
+    # boost program option dll does not link:
+    #    main.obj : error LNK2001: unresolved external symbol
+    # "public: static unsigned int const
+    #    boost::program_options::options_description::m_default_line_length"
+    # main.obj : error LNK2001: unresolved external symbol
+    # "class std::basic_string<char,struct std::char_traits<char>,
+    #                          class std::allocator<char> >
+    #        boost::program_options::arg"
+    # http://lists.boost.org/boost-users/2011/07/69515.php
+    set(Boost_USE_STATIC_LIBS ON)
+    qi_set_global(${_prefix}_DEFINITIONS  "BOOST_ALL_NO_LIB")
+  endif()
   find_package(Boost COMPONENTS "${_libname}" QUIET)
   qi_set_global(${_prefix}_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
   qi_set_global(${_prefix}_LIBRARIES    ${Boost_LIBRARIES})


SetFlags: Omit frame pointer in C arm debug builds Fixes mbedtls build failure with inline asm.

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -109,6 +109,7 @@

 		if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
 			set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fomit-frame-pointer")
+			set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fomit-frame-pointer")
 		endif()

 		set(CMAKE_CXX_FLAGS          "${CMAKE_CXX_FLAGS}          -std=c++11")


emscripten: Generating WASM by default!

emscripten: Generating WASM by default!

--- core/cmake/toolchains/emscripten.cmake
+++ core/cmake/toolchains/emscripten.cmake
@@ -8,7 +8,7 @@
 #
 # TODO: AVOID DOUBLE-INCLUSION OF FLAGS
 #
-set(CMAKE_CXX_FLAGS "-Wno-warn-absolute-paths -std=c++14 -s WASM=0"
+set(CMAKE_CXX_FLAGS "-Wno-warn-absolute-paths -std=c++14 -s WASM=1"
   CACHE STRING "cmake_cxx_flags/emscripten"
 )


[changed] a little wording

[changed] a little wording

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -367,7 +367,7 @@

 MACRO( BOTG_ConfigureSuperPackage package_name )

-    MESSAGE( STATUS "[BootsOnTheGround] initializing super package=${package_name} ...")
+    MESSAGE( STATUS "[BootsOnTheGround] configuring super package=${package_name} ...")

     TRIBITS_PACKAGE_DECL( ${package_name} )
     TRIBITS_PROCESS_SUBPACKAGES()
@@ -378,7 +378,7 @@

 MACRO( BOTG_ConfigurePackage package_name )

-    MESSAGE( STATUS "[BootsOnTheGround] initializing simple package=${package_name} ...")
+    MESSAGE( STATUS "[BootsOnTheGround] configuring simple package=${package_name} ...")

     TRIBITS_PACKAGE( ${package_name} )
     TRIBITS_PACKAGE_POSTPROCESS()


reenable active scripts

reenable active scripts

--- external/vigra_cmake/VigraAddDep.cmake
+++ external/vigra_cmake/VigraAddDep.cmake
@@ -20,9 +20,9 @@
   variable_watch(_VAD_LIBRARY_DIR_LIST VAD_CREATE_ACTIVATE)
   set_property(GLOBAL PROPERTY VigraAddDepIncludedOnce TRUE)
   if(WIN32)
-    #file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/vad_activate_$<CONFIG>.bat" INPUT "${CMAKE_CURRENT_BINARY_DIR}/.vad/vad_activate.bat.generate")
-    #file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/vad_deactivate.bat" INPUT "${VigraAddDepPath}/vad_deactivate.bat.in")
-    #file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/.vad/vad_path_$<CONFIG>" INPUT "${CMAKE_CURRENT_BINARY_DIR}/.vad/vad_path.generate")
+    file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/vad_activate_$<CONFIG>.bat" INPUT "${CMAKE_CURRENT_BINARY_DIR}/.vad/vad_activate.bat.generate")
+    file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/vad_deactivate.bat" INPUT "${VigraAddDepPath}/vad_deactivate.bat.in")
+    file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/.vad/vad_path_$<CONFIG>" INPUT "${CMAKE_CURRENT_BINARY_DIR}/.vad/vad_path.generate")
   endif()
 endif()


fixing cmake libdir for spdlog

fixing cmake libdir for spdlog

Former-commit-id: 296b1a16b7509042fe145949f80220b9d68b70ff

--- cmake-modules/Fetch_spdlog.cmake
+++ cmake-modules/Fetch_spdlog.cmake
@@ -22,9 +22,10 @@
     ExternalProject_Get_Property(external_SPDLOG INSTALL_DIR)
     add_library(spdlog INTERFACE)
     add_library(spdlog::spdlog ALIAS spdlog)
-    set(spdlog_DIR ${INSTALL_DIR}/spdlog/lib/spdlog/cmake)
+    include(GNUInstallDirs)
+    set(spdlog_DIR ${INSTALL_DIR}/spdlog/${CMAKE_INSTALL_LIBDIR}/spdlog/cmake)
     add_dependencies(spdlog external_SPDLOG)
-    target_include_directories(spdlog INTERFACE ${INSTALL_DIR}/include)
+    target_include_directories(spdlog INTERFACE ${INSTALL_DIR}/${CMAKE_INSTALL_INCLUDEDIR})
     target_link_libraries(spdlog INTERFACE ${INSTALL_DIR}/lib/spdlog/libspdlog${CUSTOM_SUFFIX})
     target_link_libraries (spdlog INTERFACE ${PTHREAD_LIBRARY})
 else()


Find yaml-cpp: Ignore missing `pkg-config`

Before this update CMake would print a warning message, if `pkg-config`
was not installed.

--- cmake/Modules/Findyaml-cpp.cmake
+++ cmake/Modules/Findyaml-cpp.cmake
@@ -13,7 +13,10 @@
 # ~~~

 find_package (PkgConfig QUIET)
-pkg_check_modules (PC_YAML-CPP QUIET yaml-cpp)
+
+if (PKG_CONFIG_FOUND)
+	pkg_check_modules (PC_YAML-CPP QUIET yaml-cpp)
+endif (PKG_CONFIG_FOUND)

 find_path (YAML-CPP_INCLUDE_DIR
 	   NAMES yaml-cpp/yaml.h


build: add DT_SONAME for ELF libraries

build: add DT_SONAME for ELF libraries

Unfortunately, because we do not use CMake for generating the libraries,
we need to explicitly control the library names for the time being.  Add
a DT_SONAME entry to the ELF binary that we generate to ensure that we
are able to properly link to the libraries at load time.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -133,7 +133,11 @@
   file(WRITE ${rsp_file} ${rsp_text})

   if(AST_LIBRARY)
+    if(CMAKE_SYSTEM_NAME STREQUAL Windows OR CMAKE_SYSTEM_NAME STREQUAL Darwin)
       set(emit_library -emit-library)
+    else()
+      set(emit_library -emit-library -Xlinker -soname -Xlinker ${AST_OUTPUT})
+    endif()
   endif()
   if(NOT AST_LIBRARY OR library_kind STREQUAL SHARED)
     add_custom_command(OUTPUT


Turn -dev cgm OFF by default because the new example 16 shows severe memory
management issues with this device.  All other examples I have checked with
this device are absolutely valgrind clean.

svn path=/trunk/; revision=10194

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -112,7 +112,8 @@
   "pscairo:cairo:ON"
   "svgcairo:cairo:ON"
   "xcairo:cairo:ON"
-  "cgm:cgm:ON"
+  # new example 16 shows severe valgrind issues with this device.
+  "cgm:cgm:OFF"
   "dg300:dg300:OFF"
   "epsqt:qt:ON"
   "pdfqt:qt:ON"


Add chromium zlib 0.0.0-f87c2b10efb4-p0 as ZLIB version (#61)

--- cmake/projects/ZLIB/hunter.cmake
+++ cmake/projects/ZLIB/hunter.cmake
@@ -74,6 +74,17 @@
     fbb8be77db5cb3f4d1b269f273a357d22ccc4b32
 )

+hunter_add_version(
+    PACKAGE_NAME
+    ZLIB
+    VERSION
+    "0.0.0-chromium-f87c2b10efb4-p0"
+    URL
+    "https://github.com/hunter-packages/chromium_zlib/archive/v0.0.0-f87c2b10efb4-p0.tar.gz"
+    SHA1
+    2fc1f19ef5ba48c415a614e56e1c12507f4676ab
+)
+
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(ZLIB)
 hunter_download(PACKAGE_NAME ZLIB


Add missing license file (#981)

Add missing license file (#981)

--- cmake/FindNanopb.cmake
+++ cmake/FindNanopb.cmake
@@ -1,3 +1,17 @@
+# Copyright 2018 Google
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 include(FindPackageHandleStandardArgs)

 set(BINARY_DIR ${FIREBASE_INSTALL_DIR}/external/nanopb)


fix a comment : OPENCL_INCLUDE_DIRS (plural)

--- cmake/FindOpenCL.cmake
+++ cmake/FindOpenCL.cmake
@@ -59,7 +59,7 @@
 # Once done this will define
 #
 #  OPENCL_FOUND - System has OPENCL
-#  OPENCL_INCLUDE_DIR - The OPENCL include directory
+#  OPENCL_INCLUDE_DIRS - The OPENCL include directory
 #  OPENCL_LIBRARIES - The libraries needed to use OPENCL


use verbatim on test target to fix testing with ninja (#935)

* use verbatim on test target to fix ninja test

* additional verbatim pointed out by gaschler

--- cmake/test/tests.cmake
+++ cmake/test/tests.cmake
@@ -128,7 +128,9 @@
     # for the run_tests target the command needs to return zero so that testing is not aborted
     set(cmd ${cmd_wrapper} ${_testing_COMMAND})
     add_custom_target(run_tests_${PROJECT_NAME}_${type}_${name}
-      COMMAND ${cmd})
+      COMMAND ${cmd}
+      VERBATIM
+    )
   else()
     # create empty dummy target
     set(cmd "${CMAKE_COMMAND}" "-E" "echo" "Skipping test target \\'run_tests_${PROJECT_NAME}_${type}_${name}\\'. Enable testing via -DCATKIN_ENABLE_TESTING.")
@@ -140,13 +142,17 @@
   endif()
   # hidden test target which depends on building all tests and cleaning test results
   add_custom_target(_run_tests_${PROJECT_NAME}_${type}_${name}
-    COMMAND ${cmd})
+    COMMAND ${cmd}
+    VERBATIM
+  )
   add_dependencies(_run_tests_${PROJECT_NAME}_${type} _run_tests_${PROJECT_NAME}_${type}_${name})

   # create target to clean project specific test results
   if(NOT TARGET clean_test_results_${PROJECT_NAME})
     add_custom_target(clean_test_results_${PROJECT_NAME}
-      COMMAND ${PYTHON_EXECUTABLE} "${catkin_EXTRAS_DIR}/test/remove_test_results.py" "${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME}")
+      COMMAND ${PYTHON_EXECUTABLE} "${catkin_EXTRAS_DIR}/test/remove_test_results.py" "${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME}"
+      VERBATIM
+    )
   endif()
   add_dependencies(_run_tests_${PROJECT_NAME}_${type}_${name} clean_test_results_${PROJECT_NAME} tests ${_testing_DEPENDENCIES})
 endfunction()


Add -march option for AVX512

Add -march option for AVX512

--- cmake/cc.cmake
+++ cmake/cc.cmake
@@ -96,3 +96,10 @@
   endif ()
 endif ()

+if (${CORE} STREQUAL "SKYLAKEX")
+  if (NOT DYNAMIC_ARCH)
+    if (NOT NO_AVX512)
+      set (CCOMMON_OPT = "${CCOMMON_OPT} -march=skylake-avx512")
+    endif ()
+  endif ()
+endif ()


Added back the option to build shared libraries.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -10,7 +10,7 @@
   add_definitions(-DIOS=1)
 endif ()

-macro(create_target target is_executable)
+macro(create_target target is_executable is_shared)
   set(CMAKE_OSX_ARCHITECTURES "armv7 arm64")
   list(APPEND ALL_PROJECTS ${target})
   set(ALL_PROJECTS ${ALL_PROJECTS} PARENT_SCOPE)
@@ -52,7 +52,11 @@
   endif ()

   if (${is_executable})
-    add_executable(${target} ${SOURCES})
+    if (${is_shared})
+      add_library(${target} SHARED ${SOURCES})
+    else ()
+      add_executable(${target} ${SOURCES})
+    endif ()
   else ()
     add_library(${target} ${SOURCES})
   endif ()
@@ -88,13 +92,19 @@
 endmacro(create_target)

 macro(create_library target)
-  create_target(${target} FALSE)
+  create_target(${target} FALSE FALSE)
   string(TOUPPER "${CURRENT_TARGET}" UPPER_CURRENT_TARGET)
   add_definitions("-D${UPPER_CURRENT_TARGET}_LIB")
 endmacro(create_library)

+macro(create_shared_library target)
+  create_target(${target} TRUE TRUE)
+  string(TOUPPER "${CURRENT_TARGET}" UPPER_CURRENT_TARGET)
+  add_definitions("-D${UPPER_CURRENT_TARGET}_LIB")
+endmacro()
+
 macro(create_executable target)
-  create_target(${target} TRUE)
+  create_target(${target} TRUE FALSE)
 endmacro(create_executable)

 macro(create_header_library target)
@@ -147,7 +157,11 @@
 endmacro(add_project)

 macro(add name)
-  add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${name})
+  if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/${name}/${name}.cmake)
+    include(${CMAKE_CURRENT_LIST_DIR}/${name}/${name}.cmake)
+  else ()
+    add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${name})
+  endif ()
 endmacro(add)

 macro(add_resources resources_dir)