Copy doc if build on mac

Copy doc if build on mac

git-svn-id: b66b41e514ff40863ef1aa95df2dbf63dd8d6be1@356 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/OpenMeshPackage.cmake
+++ cmake/OpenMeshPackage.cmake
@@ -129,7 +129,7 @@
   endif()

    # copy the documentation if it exists
-   IF ( WIN32)
+   IF ( WIN32 )
      if (EXISTS ${CMAKE_BINARY_DIR}/Build/Doc)
 	     install(DIRECTORY ${CMAKE_BINARY_DIR}/Build/Doc
 	     DESTINATION ./
@@ -171,6 +171,15 @@
   include (InstallRequiredSystemLibraries)
 endif ()

+if (APPLE)
+  if (EXISTS ${CMAKE_BINARY_DIR}/Build/share/OpenMesh/Doc)
+	     install(DIRECTORY ${CMAKE_BINARY_DIR}/Build/share/OpenMesh/Doc
+	     DESTINATION ./
+         COMPONENT Applications
+     )
+  endif()
+endif()
+

 include (CPack)

@@ -184,4 +193,4 @@
   add_custom_target (PACKAGE_SOURCE
     ${CMAKE_CPACK_COMMAND} --config "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake"
   )
-endif ()+endif ()


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(buffer VERSION 0.1.8)
+hunter_config(puffin-buffer VERSION 0.1.0.0)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)
 hunter_config(Android-Build-Tools VERSION 22.0.1)


Updated FindDIP.cmake

Updated FindDIP.cmake

--- cmake/modules/FindDIP.cmake
+++ cmake/modules/FindDIP.cmake
@@ -2,18 +2,14 @@
 # Find Depth-Image-Processing (DIP)
 #
 # DIP_FOUND - True if DIP was found.
-# DIP_INCLUDE_DIRS - Directories containing the DIP include files.
+# DIP_INCLUDE_DIR - Directory containing the DIP include files.
 # DIP_LIBRARIES - Libraries need to use DIP.

 find_path(DIP_INCLUDE_DIR dip
           HINTS /usr/local/include/
-          PATHS "$ENV{PROGRAMFILES}/dip/include"
+                "$ENV{PROGRAMFILES}/dip/include"
                 "$ENV{PROGRAMW6432}/dip/include"
           )
-
-set(DIP_INCLUDE_DIRS
-    ${DIP_INCLUDE_DIR}
-    )

 set(DIP_MODULES
     cameras
@@ -33,6 +29,8 @@
   find_library(DIP_${MODULE}_LIBRARY
                NAMES ${MODULE}
                PATHS /usr/local/lib/
+                     "$ENV{PROGRAMFILES}/dip/lib"
+                     "$ENV{PROGRAMW6432}/dip/lib"
                )

   set(DIP_LIBRARIES


cleanups

cleanups

--- common/cmake/tutorial.cmake
+++ common/cmake/tutorial.cmake
@@ -19,21 +19,20 @@

 MACRO (ADD_TUTORIAL TUTORIAL_NAME)

-ADD_EXECUTABLE(${TUTORIAL_NAME} ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
-TARGET_LINK_LIBRARIES(${TUTORIAL_NAME} embree tutorial image transport tutorial_device ${ADDITIONAL_LIBRARIES})
-SET_PROPERTY(TARGET ${TUTORIAL_NAME} PROPERTY FOLDER tutorials/single)
-INSTALL(TARGETS ${TUTORIAL_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
+  ADD_EXECUTABLE(${TUTORIAL_NAME} ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
+  TARGET_LINK_LIBRARIES(${TUTORIAL_NAME} embree tutorial image transport tutorial_device ${ADDITIONAL_LIBRARIES})
+  SET_PROPERTY(TARGET ${TUTORIAL_NAME} PROPERTY FOLDER tutorials/single)
+  INSTALL(TARGETS ${TUTORIAL_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
+  SET(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} "${CMAKE_INSTALL_BINDIR}/${TUTORIAL_NAME}" "${TUTORIAL_NAME}")

-SET(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} "${CMAKE_INSTALL_BINDIR}/${TUTORIAL_NAME}" "${TUTORIAL_NAME}")
+  IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
+    ADD_EMBREE_ISPC_EXECUTABLE(${TUTORIAL_NAME}_ispc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.ispc)
+    TARGET_LINK_LIBRARIES(${TUTORIAL_NAME}_ispc embree tutorial image transport tutorial_device_ispc)
+    SET_PROPERTY(TARGET ${TUTORIAL_NAME}_ispc PROPERTY FOLDER tutorials/ispc)
+    INSTALL(TARGETS ${TUTORIAL_NAME}_ispc DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
+    SET(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} "${CMAKE_INSTALL_BINDIR}/${TUTORIAL_NAME}_ispc" "${TUTORIAL_NAME}_ispc")
+  ENDIF()

-IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
-  ADD_EMBREE_ISPC_EXECUTABLE(${TUTORIAL_NAME}_ispc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.ispc)
-  TARGET_LINK_LIBRARIES(${TUTORIAL_NAME}_ispc embree tutorial image transport tutorial_device_ispc)
-  SET_PROPERTY(TARGET ${TUTORIAL_NAME}_ispc PROPERTY FOLDER tutorials/ispc)
-  INSTALL(TARGETS ${TUTORIAL_NAME}_ispc DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
-  SET(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} "${CMAKE_INSTALL_BINDIR}/${TUTORIAL_NAME}_ispc" "${TUTORIAL_NAME}_ispc")
-ENDIF()
-
-SET(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} PARENT_SCOPE)
+  SET(CPACK_NSIS_MENU_LINKS ${CPACK_NSIS_MENU_LINKS} PARENT_SCOPE)

 ENDMACRO ()


--llvm-lto is ignored when upstream emscripten backend is used

--- toolchains/emscripten.cmake
+++ toolchains/emscripten.cmake
@@ -17,7 +17,12 @@
 list( APPEND TNUN_compiler_exceptions_on  ${TNUN_linker_exceptions_on}  )
 list( APPEND TNUN_compiler_exceptions_off ${TNUN_linker_exceptions_off} )

-list( APPEND TNUN_linker_LTO "SHELL:--llvm-lto 3" "SHELL:--llvm-opts 3")
+# use that on fastcomp - upstream backend does this out of the box when -flto is specified and whines about --llvm-lto flag being ignored
+string( REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION} )
+list( GET VERSION_LIST 0 clang_major_version  )
+if ( ${clang_major_version} EQUAL 6 )
+    list( APPEND TNUN_linker_LTO "SHELL:--llvm-lto 3" "SHELL:--llvm-opts 3")
+endif()

 set( TNUN_compiler_assertions "SHELL:-s ASSERTIONS=2" "SHELL:-s GL_ASSERTIONS=1" "SHELL:-s SAFE_HEAP=1" )
 set( TNUN_linker_assertions ${TNUN_compiler_assertions} )


uses origin/master rather than master

uses origin/master rather than master

fixes #76

--- version_config.cmake
+++ version_config.cmake
@@ -86,22 +86,22 @@

 set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/SIRF )
 if (DEVEL_BUILD)
-  set (DEFAULT_SIRF_TAG master)
+  set (DEFAULT_SIRF_TAG origin/master)
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
-  set(DEFAULT_STIR_TAG master)
+  set(DEFAULT_STIR_TAG origin/master)

   ## Gadgetron
   set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron )
-  set(DEFAULT_Gadgetron_TAG master)
+  set(DEFAULT_Gadgetron_TAG origin/master)

   ## siemens_to_ismrmrd
   set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd )
-  set(DEFAULT_siemens_to_ismrmrd_TAG master)
+  set(DEFAULT_siemens_to_ismrmrd_TAG origin/master)

   ## ISMRMRD
   set(DEFAULT_ISMRMRD_URL https://github.com/ismrmrd/ismrmrd )
-  set(DEFAULT_ISMRMRD_TAG master)
+  set(DEFAULT_ISMRMRD_TAG origin/master)

 else()
   set(DEFAULT_SIRF_TAG v0.9.2)


update CIL versions to master

update CIL versions to master

--- version_config.cmake
+++ version_config.cmake
@@ -131,7 +131,7 @@
   set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master)

 else()
-  set(DEFAULT_SIRF_TAG origin/spdhg_from_cil)
+  set(DEFAULT_SIRF_TAG origin/add_to_sirf_classes)

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
@@ -166,11 +166,11 @@

   # CCPi CIL
   set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git)
-  set(DEFAULT_CCPi-Framework_TAG ccb9a65318aa5ca1b72edfa9acf349cd14ad3747 )
+  set(DEFAULT_CCPi-Framework_TAG origin/master )
   set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git)
-  set(DEFAULT_CCPi-RGL_TAG a106da50c7f428db2e4115fe1bdc0c156a933a21 )
+  set(DEFAULT_CCPi-RGL_TAG origin/master )
   set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git)
-  set(DEFAULT_CCPi-FrameworkPlugins_TAG 0cb81711927adee9f2d1973a8af2b7799dd28ab6 )
+  set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master )

 endif()


revert part of last commit, improved error message

--- core/rosbuild/private.cmake
+++ core/rosbuild/private.cmake
@@ -88,7 +88,7 @@
   rosbuild_find_ros_package(${PROJECT_NAME})
   # Compare to where we are
   execute_process(
-    COMMAND $ENV{ROS_ROOT}/../rosbuild/bin/check_same_directories.py ${${PROJECT_NAME}_PACKAGE_PATH} ${PROJECT_SOURCE_DIR}
+    COMMAND $ENV{ROS_ROOT}/core/rosbuild/bin/check_same_directories.py ${${PROJECT_NAME}_PACKAGE_PATH} ${PROJECT_SOURCE_DIR}
     OUTPUT_VARIABLE _rosbuild_check_package_location_error
     ERROR_VARIABLE _rosbuild_check_package_location_error
     RESULT_VARIABLE _rosbuild_check_package_location_failed
@@ -96,6 +96,8 @@
     OUTPUT_STRIP_TRAILING_WHITESPACE
   )
   if(_rosbuild_check_package_location_failed)
+    message("[rosbuild] Error from directory check: $ENV{ROS_ROOT}/core/rosbuild/bin/check_same_directories.py ${${PROJECT_NAME}_PACKAGE_PATH} ${PROJECT_SOURCE_DIR}")
+    message("${_rosbuild_check_package_location_error}")
     message(FATAL_ERROR "[rosbuild] rospack found package \"${PROJECT_NAME}\" at \"${${PROJECT_NAME}_PACKAGE_PATH}\", but the current directory is \"${PROJECT_SOURCE_DIR}\".  You should double-check your ROS_PACKAGE_PATH to ensure that packages are found in the correct precedence order.")
   endif(_rosbuild_check_package_location_failed)
 endmacro(_rosbuild_check_package_location)


ARROW-882: [C++] Rename statically build library on Windows to avoid …

…conflict with shared version

Currently, statically built arrow.lib file overwrites previously built arrow.lib file of shared build. To resolve this, statically built library renamed to arrow_static.lib

Author: Max Risuhin <risuhin.max@gmail.com>

Closes #590 from MaxRis/ARROW-882 and squashes the following commits:

4f2f3f0 [Max Risuhin] ARROW-882: [C++] Rename statically build library on Windows to avoid conflict with shared version

--- cpp/cmake_modules/BuildUtils.cmake
+++ cpp/cmake_modules/BuildUtils.cmake
@@ -147,11 +147,16 @@
   endif()

   if (ARROW_BUILD_STATIC)
+      if (MSVC)
+        set(LIB_NAME_STATIC ${LIB_NAME}_static)
+      else()
+        set(LIB_NAME_STATIC ${LIB_NAME})
+      endif()
       add_library(${LIB_NAME}_static STATIC $<TARGET_OBJECTS:${LIB_NAME}_objlib>)
     set_target_properties(${LIB_NAME}_static
       PROPERTIES
       LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}"
-      OUTPUT_NAME ${LIB_NAME})
+      OUTPUT_NAME ${LIB_NAME_STATIC})

   target_link_libraries(${LIB_NAME}_static
       LINK_PUBLIC ${ARG_STATIC_LINK_LIBS}


Make it explicit which configuration settings are meant for MinGW.

--- Source/CMake/Modules/Urho3D-CMake-common.cmake
+++ Source/CMake/Modules/Urho3D-CMake-common.cmake
@@ -21,10 +21,10 @@
 #

 # Certain MinGW versions fail to compile SSE code. This is the initial guess for known "bad" version range, and can be tightened later
-if (WIN32 AND NOT MSVC)
+if (MINGW)
     execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
     if (GCC_VERSION VERSION_LESS 4.9.1)
-        message ("Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1. You can also try to re-enable SSE with CMake option -DURHO3D_SSE=1, but this may result in compile errors.")
+        message (WARNING "Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1. You can also try to re-enable SSE with CMake option -DURHO3D_SSE=1, but this may result in compile errors.")
         set (URHO3D_DEFAULT_SSE FALSE)
     else ()
         set (URHO3D_DEFAULT_SSE TRUE)
@@ -286,7 +286,7 @@
             endif ()
         endif ()
         # MinGW-specific setup
-        if (WIN32)
+        if (MINGW)
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static -static-libgcc -fno-keep-inline-dllexport")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static -static-libstdc++ -static-libgcc -fno-keep-inline-dllexport")
             set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static")


CMake: minor: modified a warning message in the detection macro (an empty reference variable is now considered valid).

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -509,10 +509,10 @@
     ## from the given reference path. The variable "referenceVariable" may be a list.
     ## In this case we take its first element.

-    # First test if the variable exists and is not empty:
-    IF((NOT DEFINED ${referenceVariable}) OR ("${${referenceVariable}}" STREQUAL ""))
+    # First test if the variable exists, warn otherwise:
+    IF(NOT DEFINED ${referenceVariable})
       MESSAGE(WARNING "${pkg}: the reference variable '${referenceVariable}' used when calling the macro "
-      "SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() does not exist or is empty.")
+      "SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() is not defined.")
     ENDIF()

     LIST(LENGTH ${referenceVariable} _tmp_len)
@@ -522,9 +522,8 @@
        #  Note the double de-reference of "referenceVariable":
        SET(_tmp_ROOT_DIR "${${referenceVariable}}")
     ENDIF()
-    IF(${upCount})
-      MATH(EXPR _rge "${upCount}-1")
-      FOREACH(_unused RANGE ${_rge})
+    IF(${upCount})
+      FOREACH(_unused RANGE 1 ${upCount})
         GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
       ENDFOREACH()
     ENDIF()


Add new test to testing suite

Add new test to testing suite

--- test/testing.cmake
+++ test/testing.cmake
@@ -170,7 +170,23 @@
     "${GRAPHS}/torus/4_01/"
     2
     cake/)
-
+  IF(ENABLE_PUMI)
+    mpi_test(splitAndBalanceMeshPUMI 8
+      ./splitAndBalanceMesh
+      "${MESHES}/torus/torus.dmg"
+      "${MESHES}/torus/4imb/torus.smb"
+      0
+      2
+      )
+    mpi_test(splitAndBalanceMeshEnGPar 8
+      ./splitAndBalanceMesh
+      "${MESHES}/torus/torus.dmg"
+      "${MESHES}/torus/4imb/torus.smb"
+      1
+      2
+      )
+
+  endif()
 endif()

 mpi_test(vtxBalanceCube 4


download and extract nasm zip, not installer

* node will find nasm executable in SOURCE_DIR (location of extracted zip)
* no need for patch_nasm, find_nasm, or build_nasm cmake functions
* issue https://github.com/smanders/externpro/issues/240

--- projects/nasm.cmake
+++ projects/nasm.cmake
@@ -9,32 +9,6 @@
   DESC "The Netwide Assembler - an 80x86 and x86-64 assembler"
   GRAPH GRAPH_SHAPE box
   VER ${VER}
-  DLURL ${URL}/pub/nasm/releasebuilds/${VER}/win64/nasm-${VER}-installer-x64.exe
-  DLMD5 e871a6d2651e81ce8674ae2d31fe33b0
+  DLURL ${URL}/pub/nasm/releasebuilds/${VER}/win64/nasm-${VER}-win64.zip
+  DLMD5 bce3b7e205bab546ead85db761df89db
   )
-########################################
-function(patch_nasm)
-  # don't want xpPatch(${PRO_NASM}) called automatically
-  # because then an ExternalProject_Add(nasm) will try to extract the executable
-  # which doesn't make any sense, since this executable is an installer
-endfunction()
-########################################
-function(find_nasm)
-  find_program(NASM_EXECUTABLE)
-  if(NASM_EXECUTABLE)
-    execute_process(COMMAND ${NASM_EXECUTABLE} -version
-      OUTPUT_VARIABLE nasmVersion
-      ERROR_QUIET
-      OUTPUT_STRIP_TRAILING_WHITESPACE
-      )
-    if(nasmVersion MATCHES "^NASM version ([0-9\\.]*)")
-      set(NASM_VERSION_STRING "${CMAKE_MATCH_1}")
-    endif()
-    unset(nasmVersion)
-  endif()
-  include(FindPackageHandleStandardArgs)
-  find_package_handle_standard_args(nasm
-    REQUIRED_VARS NASM_EXECUTABLE
-    VERSION_VAR NASM_VERSION_STRING
-    )
-endfunction()


[Build] Fix flag in benchmark build

[Build] Fix flag in benchmark build

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -355,7 +355,7 @@
       "-c"
       "-target" "${target}"
       "-${BENCH_COMPILE_ARCHOPTS_OPT}" ${PAGE_ALIGNMENT_OPTION}
-      "-Xfrontend -enable-experimental-layout-prespecialization")
+      "-Xfrontend" "-enable-experimental-layout-prespecialization")

   if(SWIFT_BENCHMARK_GENERATE_DEBUG_INFO)
     list(APPEND common_options "-g")


[OGRE-230] Include the unordered folder from boost to fix builds in some situations

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -206,7 +206,6 @@
       PATTERN "timer" EXCLUDE
       PATTERN "tr1" EXCLUDE
       PATTERN "units" EXCLUDE
-      PATTERN "unordered" EXCLUDE
       PATTERN "uuid" EXCLUDE
       PATTERN "variant" EXCLUDE
       PATTERN "wave" EXCLUDE


fix typo

fix typo

--HG--
branch : androidbuildfixes

--- CMake/Utils/AndroidMacros.cmake
+++ CMake/Utils/AndroidMacros.cmake
@@ -59,7 +59,7 @@
       else()
 	    SET(ANDROID_EXECUTABLE "/opt/android-sdk/tools/android")
       endif()
-      if(EXISTS $ENV{ANDROID_SDK})
+      if(EXISTS $ENV{ANDROID_NDK})
         SET(NDK_BUILD_EXECUTABLE "$ENV{ANDROID_NDK}/ndk-build")
       else()
         SET(NDK_BUILD_EXECUTABLE "${ANDROID_NDK}/ndk-build")


BUG: Install FFTW headers in same location as ITK

The "Algorithm" appears to be a remnant of a prior organization of
ITK. This fixes the header installation path so it's install along
side other ITK header files, enabling the ITK FFT module to utilizes
these include.

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -160,7 +160,7 @@
     # copy headers into install tree
     install(CODE
       "file(GLOB FFTW_INC ${ITK_BINARY_DIR}/fftw/include/*fftw3*)
-file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/include/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}/Algorithms\"
+file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/include/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}\"
 TYPE FILE FILES \${FFTW_INC})" COMPONENT Development)

   endif()


Fixed a bug when creating more than one AndroidJNI project and a couple of warnings.

--HG--
branch : android-cmake-project-creation-refactor

--- CMake/Utils/AndroidMacros.cmake
+++ CMake/Utils/AndroidMacros.cmake
@@ -41,6 +41,7 @@

 	SET(DEPENDENCIES ${DEPENDENCIES} OgreTerrain OgreRTShaderSystem OgreOverlay OgrePaging OgreVolume Plugin_ParticleFX Plugin_OctreeSceneManager)
 	add_dependencies(${ANDROID_PROJECT_TARGET} ${DEPENDENCIES})
+	set(DEPEND_STATIC_LIBS "")
 	foreach(DEPENDENCY ${DEPENDENCIES})
 	    set(DEPEND_STATIC_LIBS "${DEPENDENCY}Static" ${DEPEND_STATIC_LIBS})
 	endforeach(DEPENDENCY ${DEPENDENCIES})
@@ -49,7 +50,7 @@
         add_static_libs("${OGRE_DEPENDENCIES_DIR}/lib/@ANDROID_ABI@"  "glsl_optimizer" "glcpp-library" "mesa")
 	endif()

-	add_static_libs("${OGRE_DEPENDENCIES_DIR}/lib/@ANDROID_ABI@" "OIS" "freetype" "FreeImage" "zlib""zzip")
+	add_static_libs("${OGRE_DEPENDENCIES_DIR}/lib/@ANDROID_ABI@" "OIS" "freetype" "FreeImage" "zlib" "zzip")

     if(APPLE OR WIN32)
       SET(ANDROID_EXECUTABLE "android")


[UPD] Matlab 7.11 added in the search list under Windows.
[UPD] Matlab detection under linux is more flexible.
[FIX] Issue 10 fixed: Wrong MEX extension for Matlab 64-bit under linux.

git-svn-id: ed06c97986a68fa016311908f99ed1538fbb9b5d@571 93be6e1e-6fcc-11de-baec-69240fdc299a

--- CMake/FindMatlab.cmake
+++ CMake/FindMatlab.cmake
@@ -31,6 +31,7 @@

 IF(WIN32)
   SET(MATLAB_PATHS
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.11;MATLABROOT]"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.10;MATLABROOT]"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.9;MATLABROOT]"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.8;MATLABROOT]"
@@ -113,12 +114,11 @@
     SET(LIBMX "libmx.dylib")
     SET(LIBENG "libeng.dylib")
   ELSE(APPLE)
-    FILE(GLOB MATLAB_LOCAL_PATHS "/usr/local/matlab*")
-    FILE(GLOB MATLAB_OPT_PATHS "/opt/matlab*")
-    FILE(GLOB MATLAB_USR_PATHS "/usr/matlab*")
+    FILE(GLOB MATLAB_LOCAL_PATHS "/usr/local/[Mm][Aa][Tt][Ll][Aa][Bb]*")
+    FILE(GLOB MATLAB_OPT_PATHS "/opt/[Mm][Aa][Tt][Ll][Aa][Bb]*")
+    FILE(GLOB MATLAB_USR_PATHS "/usr/[Mm][Aa][Tt][Ll][Aa][Bb]*")
     SET(MATLAB_PATHS ${MATLAB_LOCAL_PATHS} ${MATLAB_OPT_PATHS} ${MATLAB_USR_PATHS})

-    SET(MATLAB_MEXFILE_EXT mexglx)
     SET(LIBMEX "libmex.so")
     SET(LIBMX "libmx.so")
     SET(LIBENG "libeng.so")
@@ -131,9 +131,11 @@
     IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
       # Regular x86
       SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/glnx86")
+      SET(MATLAB_MEXFILE_EXT mexglx)
     ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
       # AMD64:
       SET(MATLAB_LIBRARIES_PATHS "${MATLAB_ROOT}/bin/glnxa64")
+      SET(MATLAB_MEXFILE_EXT mexa64)
     ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
   ENDIF(APPLE)

@@ -193,7 +195,6 @@
 # MATLAB_MEX_CREATE(functionname inputfiles thridlibraries)
 MACRO(MATLAB_MEX_CREATE functionname)
   MATLAB_EXTRACT_SOURCES_LIBRARIES(sources thirdlibraries ${ARGN})
-
   ADD_LIBRARY(${functionname} SHARED ${sources} mexFunction.def)
   TARGET_LINK_LIBRARIES(${functionname} ${MATLAB_LIBRARIES} ${thirdlibraries})
   SET_TARGET_PROPERTIES(${functionname} PROPERTIES


Add missing include to FindPixman

Add missing include to FindPixman

--- CMake/FindPixman.cmake
+++ CMake/FindPixman.cmake
@@ -30,6 +30,7 @@

 find_library(PIXMAN_LIBRARY NAMES pixman-1)

+include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(pixman-1 DEFAULT_MSG PIXMAN_LIBRARY PIXMAN_INCLUDE_DIR)

 if(PIXMAN-1_FOUND)


Issue #10: Pass BUILD_QML to sub-build.

Issue #10: Pass BUILD_QML to sub-build.

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -242,6 +242,7 @@
       -DBUILD_SUPERBUILD:BOOL=OFF           # Must force this to be off, or else you will loop forever.
       -DWITHIN_SUPERBUILD:BOOL=ON
       -DBUILD_QTVTKGUI:BOOL=${BUILD_QTVTKGUI}
+      -DBUILD_QML:BOOL=${BUILD_QML}
       -DBUILD_gflags:BOOL=${BUILD_gflags}
       -DBUILD_glog:BOOL=${BUILD_glog}
       -DBUILD_Eigen:BOOL=${BUILD_Eigen}


folly: cmake: fixup libevent include dirs

Summary:
When finding a package via its config, we need to
add its include dirs to our list.  Previously we were squeaking
by for this because libevent was installed in either the default
include path or in the same installation prefix as folly.

In the getdeps build environment we have libevent in its own
installation prefix.

The `LibeventConfig.cmake` file from libevent `release-2.1.8-stable` exports
the include dirs via the `LIBEVENT_INCLUDE_DIRS` variable, which is slightly
different from that used by the `folly/public_tld/CMake/FindLibEvent.cmake`
file.

In a later diff I plan to standardize and move the libevent
logic to the common cmake dir.  For now, this unblocks my build.

Reviewed By: strager

Differential Revision: D14680677

fbshipit-source-id: 9f757c84fd145d052925803348008dc2c1abf263

--- CMake/folly-deps.cmake
+++ CMake/folly-deps.cmake
@@ -35,8 +35,18 @@

 find_package(Libevent CONFIG QUIET)
 if(TARGET event)
-  message(STATUS "Found libevent from package config")
+  message(STATUS "Found libevent from package config inc=${LIBEVENT_INCLUDE_DIRS}")
   list(APPEND FOLLY_SHINY_DEPENDENCIES event)
+  # Somewhat gross, but some vcpkg installed libevents have a relative
+  # `include` path exported into LIBEVENT_INCLUDE_DIRS, which triggers
+  # a cmake error because it resolves to the `include` dir within the
+  # folly repo, which is not something cmake allows to be in the
+  # INTERFACE_INCLUDE_DIRECTORIES.  Thankfully on such a system the
+  # actual include directory is already part of the global include
+  # directories, so we can just skip it.
+  if (NOT "${LIBEVENT_INCLUDE_DIRS}" STREQUAL "include")
+    list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIRS})
+  endif()
 else()
   find_package(LibEvent MODULE REQUIRED)
   list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB})


Add aff3ct-dev package.

Add aff3ct-dev package.

--- cmake/Modules/UploadPPA.cmake
+++ cmake/Modules/UploadPPA.cmake
@@ -60,7 +60,22 @@
          "Architecture: ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}\n"
          "Depends: ${bin_depends}, \${shlibs:Depends}, \${misc:Depends}\n"
          "Description: ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n"
+         "${DEBIAN_LONG_DESCRIPTION}\n"
+         "\n"
+         "Package: ${CPACK_DEBIAN_PACKAGE_NAME}-dev\n"
+         "Architecture: ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}\n"
+         "Depends: ${bin_depends}, \${shlibs:Depends}, \${misc:Depends}\n"
+         "Description: ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n"
          "${DEBIAN_LONG_DESCRIPTION}\n")
+
+    file(WRITE "${DEBIAN_SOURCE_DIR}/debian/${CPACK_DEBIAN_PACKAGE_NAME}.install"
+         "usr/bin/*\n"
+         "usr/share/*/conf/*\n"
+         "usr/share/*/refs/*\n")
+
+    file(WRITE "${DEBIAN_SOURCE_DIR}/debian/${CPACK_DEBIAN_PACKAGE_NAME}-dev.install"
+         "usr/lib/*\n"
+         "usr/include/*\n")

     ##############################################################################
     # debian/copyright


fix CMakeLists.txt error

fix CMakeLists.txt error

--- defaults/FindTreeFrog.cmake
+++ defaults/FindTreeFrog.cmake
@@ -1,5 +1,5 @@
 # Search paths
-file(TO_CMAKE_PATH $ENV{TFDIR} TFDIR)
+file(TO_CMAKE_PATH "$ENV{TFDIR}" TFDIR)

 set(TreeFrog_INCLUDE_SEARCH_PATHS
   /usr/include/treefrog


Reduce size of build name in Windows because path are too long

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3408 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/test/openVibeTests.cmake
+++ trunk/test/openVibeTests.cmake
@@ -20,7 +20,7 @@
 endmacro(getuname)

 IF(WIN32)
-	SET(distrib ${CMAKE_SYSTEM})
+	SET(distrib ""})
 	SET(distrib-release "")
 ELSE(WIN32)
 	find_program(LSB_RELEASE NAMES lsb_release)


Unused file in old toolchain folder

Unused file in old toolchain folder

--- build/toolchains/linux.cmake
+++ build/toolchains/linux.cmake
@@ -1,35 +0,0 @@
-# options
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
-set(CXX_FLAGS_DEBUG "-g -O0")
-set(EXECUTABLE_NAME "tangram.out")
-
-add_definitions(-DPLATFORM_OSX)
-
-find_package(PkgConfig REQUIRED)
-pkg_search_module(GLFW REQUIRED glfw3)
-include_directories(${GLFW_INCLUDE_DIRS})
-
-# load core library
-include_directories(${PROJECT_SOURCE_DIR}/core/include/)
-add_subdirectory(${PROJECT_SOURCE_DIR}/core)
-include_recursive_dirs(${PROJECT_SOURCE_DIR}/core/*.h)
-
-# add sources and include headers
-find_sources_and_include_directories(
-    ${PROJECT_SOURCE_DIR}/osx/src/*.h
-    ${PROJECT_SOURCE_DIR}/osx/src/*.cpp)
-
-include_directories("${PROJECT_SOURCE_DIR}/osx/include/")
-
-# link and build functions
-function(link_libraries)
-
-    target_link_libraries(${EXECUTABLE_NAME} ${GLFW_STATIC_LIBRARIES} core)
-
-endfunction()
-
-function(build)
-
-    add_executable(${EXECUTABLE_NAME} ${SOURCES})
-
-endfunction()


name fixed

name fixed

--- client/client-multi/client-c/toolchains/cc32xx.cmake
+++ client/client-multi/client-c/toolchains/cc32xx.cmake
@@ -17,9 +17,9 @@
 include(CMakeForceCompiler)

 if(DEFINED WIN32)
-  set(WIN_EXE .exe)
+  set(EXECUTABLE_SUFFIX .exe)
 else()
-  set(WIN_EXE)
+  set(EXECUTABLE_SUFFIX)
 endif()

 if(NOT DEFINED KAA_TOOLCHAIN_PATH)


ENH: update UseJava.cmake from cmake-2.8.6 sources

--- CMake/UseJava.cmake
+++ CMake/UseJava.cmake
@@ -3,175 +3,168 @@
 # has already been loaded.  See FindJava.cmake for information on how to
 # load Java into your CMake project.
 #
-# Available Functions:
-#
-#  add_jar(TARGET_NAME SRC1 SRC2 .. SRCN RCS1 RCS2 .. RCSN)
-#
-#  This command creates a <TARGET_NAME>.jar. It compiles the given source
-#  files (SRC) and adds the given resource files (RCS) to the jar file.
-#  If only resource files are given then just a jar file is created.
-#
-#  Additional instructions:
-#    To add compile flags to the target you can set these flags with
-#    the following variable:
-#
-#        set(CMAKE_JAVA_COMPILE_FLAGS -nowarn)
-#
-#    To add a path or a jar file to the class path you can do this
-#    with the CMAKE_JAVA_INCLUDE_PATH variable.
-#
-#        set(CMAKE_JAVA_INCLUDE_PATH /usr/share/java/shibboleet.jar)
-#
-#    To use a different output name for the target you can set it with:
-#
-#        set(CMAKE_JAVA_TARGET_OUTPUT_NAME shibboleet.jar)
-#        add_jar(foobar foobar.java)
-#
-#    To add a VERSION to the target output name you can set it using
-#    CMAKE_JAVA_TARGET_VERSION. This will create a jar file with the name
-#    shibboleet-1.0.0.jar and will create a symlink shibboleet.jar
-#    pointing to the jar with the version information.
-#
-#        set(CMAKE_JAVA_TARGET_VERSION 1.2.0)
-#        add_jar(shibboleet shibbotleet.java)
-#
-#     If the target is a JNI library, utilize the following commands to
-#     create a JNI symbolic link:
-#
-#        set(CMAKE_JNI_TARGET TRUE)
-#        set(CMAKE_JAVA_TARGET_VERSION 1.2.0)
-#        add_jar(shibboleet shibbotleet.java)
-#        install_jar(shibboleet ${LIB_INSTALL_DIR}/shibboleet)
-#        install_jni_symlink(shibboleet ${JAVA_LIB_INSTALL_DIR})
-#
-#     If a single target needs to produce more than one jar from its
-#     java source code, to prevent the accumulation of duplicate class
-#     files in subsequent jars, set/reset CMAKE_JAR_CLASSES_PREFIX prior
-#     to calling the add_jar() function:
-#
-#        set(CMAKE_JAR_CLASSES_PREFIX com/redhat/foo)
-#        add_jar(foo foo.java)
-#
-#        set(CMAKE_JAR_CLASSES_PREFIX com/redhat/bar)
-#        add_jar(bar bar.java)
-#
-#  Variables set:
-#    The add_jar() functions sets some variables which can be used in the
-#    same scope where add_jar() is called.
-#
-#    <target>_INSTALL_FILES      The files which should be installed. This
-#                                is used by install_jar().
-#    <target>_JNI_SYMLINK        The JNI symlink which should be
-#                                installed.
-#                                This is used by install_jni_symlink().
-#    <target>_JAR_FILE           The location of the jar file so that you
-#                                can include it.
-#    <target>_CLASS_DIR          The directory where the class files can
-#                                be found. For example to use them with
-#                                javah.
-#
-#   find_jar(
-#            <VAR>
-#            name | NAMES name1 [name2 ...]
-#            [PATHS path1 [path2 ... ENV var]]
-#            [VERSIONS version1 [version2]]
-#            [DOC "cache documentation string"]
-#           )
-#
-#   This command is used to find a full path to the named jar. A cache
-#   entry named by <VAR> is created to stor the result of this command. If
-#   the full path to a jar is found the result is stored in the variable
-#   and the search will not repeated unless the variable is cleared. If
-#   nothing is found, the result will be <VAR>-NOTFOUND, and the search
-#   will be attempted again next time find_jar is invoked with the same
-#   variable.
-#   The name of the full path to a file that is searched for is specified
-#   by the names listed after NAMES argument. Additional search locations
-#   can be specified after the PATHS argument. If you require special a
-#   version of a jar file you can specify it with the VERSIONS argument.
-#   The argument after DOC will be used for the documentation string in
-#   the cache.
-#
-#   install_jar(TARGET_NAME DESTINATION)
-#
-#   This command installs the TARGET_NAME files to the given DESTINATION.
-#   It should be called in the same scope as add_jar() or it will fail.
-#
-#   install_jni_symlink(TARGET_NAME DESTINATION)
-#
-#   This command installs the TARGET_NAME JNI symlinks to the given
-#   DESTINATION. It should be called in the same scope as add_jar()
-#   or it will fail.
-#
-#   create_javadoc
-#
-#     Create jave documentation based on files or packages. For more
-#     details please read the javadoc manpage.
-#
-#     There are two main signatures for create_javadoc. The first
-#     signature works with package names on a path with source files:
-#
-#     create_javadoc(
-#                    <VAR>
-#                    PACKAGES pkg1 [pkg2 ...]
-#                    [SOURCEPATH <sourcepath>]
-#                    [CLASSPATH <classpath>]
-#                    [INSTALLPATH <install path>]
-#                    [DOCTITLE "the documentation title"]
-#                    [WINDOWTITLE "the title of the document"]
-#                    [AUTHOR TRUE|FALSE]
-#                    [USE TRUE|FALSE]
-#                    [VERSION TRUE|FALSE]
-#                   )
-#
-#     Example:
-#     create_javadoc(my_example_doc
-#       PACKAGES com.exmaple.foo com.example.bar
-#       SOURCEPATH ${CMAKE_CURRENT_SOURCE_PATH}
-#       CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
-#       WINDOWTITLE "My example"
-#       DOCTITLE "
My example
"
-#       AUTHOR TRUE
-#       USE TRUE
-#       VERSION TRUE
-#     )
-#
-#     The second signature for create_javadoc works on a given list of
-#     files.
-#
-#     create_javadoc(
-#                    <VAR>
-#                    FILES file1 [file2 ...]
-#                    [CLASSPATH <classpath>]
-#                    [INSTALLPATH <install path>]
-#                    [DOCTITLE "the documentation title"]
-#                    [WINDOWTITLE "the title of the document"]
-#                    [AUTHOR TRUE|FALSE]
-#                    [USE TRUE|FALSE]
-#                    [VERSION TRUE|FALSE]
-#                   )
-#
-#     Example:
-#     create_javadoc(my_example_doc
-#       FILES ${example_SRCS}
-#       CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
-#       WINDOWTITLE "My example"
-#       DOCTITLE "
My example
"
-#       AUTHOR TRUE
-#       USE TRUE
-#       VERSION TRUE
-#     )
-#
-#     Both signatures share most of the options. These options are the
-#     same as what you can find in the javadoc manpage. Please look at
-#     the manpage for CLASSPATH, DOCTITLE, WINDOWTITLE, AUTHOR, USE and
-#     VERSION.
-#
-#     The documentation will be by default installed to
-#
-#       ${CMAKE_INSTALL_PREFIX}/share/javadoc/<VAR>
-#
-#     if you don't set the INSTALLPATH.
+# add_jar(TARGET_NAME SRC1 SRC2 .. SRCN RCS1 RCS2 .. RCSN)
+#
+# This command creates a <TARGET_NAME>.jar. It compiles the given source
+# files (SRC) and adds the given resource files (RCS) to the jar file.
+# If only resource files are given then just a jar file is created.
+#
+# Additional instructions:
+#   To add compile flags to the target you can set these flags with
+#   the following variable:
+#
+#       set(CMAKE_JAVA_COMPILE_FLAGS -nowarn)
+#
+#   To add a path or a jar file to the class path you can do this
+#   with the CMAKE_JAVA_INCLUDE_PATH variable.
+#
+#       set(CMAKE_JAVA_INCLUDE_PATH /usr/share/java/shibboleet.jar)
+#
+#   To use a different output name for the target you can set it with:
+#
+#       set(CMAKE_JAVA_TARGET_OUTPUT_NAME shibboleet.jar)
+#       add_jar(foobar foobar.java)
+#
+#   To add a VERSION to the target output name you can set it using
+#   CMAKE_JAVA_TARGET_VERSION. This will create a jar file with the name
+#   shibboleet-1.0.0.jar and will create a symlink shibboleet.jar
+#   pointing to the jar with the version information.
+#
+#       set(CMAKE_JAVA_TARGET_VERSION 1.2.0)
+#       add_jar(shibboleet shibbotleet.java)
+#
+#    If the target is a JNI library, utilize the following commands to
+#    create a JNI symbolic link:
+#
+#       set(CMAKE_JNI_TARGET TRUE)
+#       set(CMAKE_JAVA_TARGET_VERSION 1.2.0)
+#       add_jar(shibboleet shibbotleet.java)
+#       install_jar(shibboleet ${LIB_INSTALL_DIR}/shibboleet)
+#       install_jni_symlink(shibboleet ${JAVA_LIB_INSTALL_DIR})
+#
+#    If a single target needs to produce more than one jar from its
+#    java source code, to prevent the accumulation of duplicate class
+#    files in subsequent jars, set/reset CMAKE_JAR_CLASSES_PREFIX prior
+#    to calling the add_jar() function:
+#
+#       set(CMAKE_JAR_CLASSES_PREFIX com/redhat/foo)
+#       add_jar(foo foo.java)
+#
+#       set(CMAKE_JAR_CLASSES_PREFIX com/redhat/bar)
+#       add_jar(bar bar.java)
+#
+# Target Properties:
+#   The add_jar() functions sets some target properties. You can get these
+#   properties with the
+#      get_property(TARGET <target_name> PROPERTY <propery_name>)
+#   command.
+#
+#   INSTALL_FILES      The files which should be installed. This is used by
+#                      install_jar().
+#   JNI_SYMLINK        The JNI symlink which should be installed.
+#                      This is used by install_jni_symlink().
+#   JAR_FILE           The location of the jar file so that you can include
+#                      it.
+#   CLASS_DIR          The directory where the class files can be found. For
+#                      example to use them with javah.
+#
+# find_jar(<VAR>
+#          name | NAMES name1 [name2 ...]
+#          [PATHS path1 [path2 ... ENV var]]
+#          [VERSIONS version1 [version2]]
+#          [DOC "cache documentation string"]
+#         )
+#
+# This command is used to find a full path to the named jar. A cache
+# entry named by <VAR> is created to stor the result of this command. If
+# the full path to a jar is found the result is stored in the variable
+# and the search will not repeated unless the variable is cleared. If
+# nothing is found, the result will be <VAR>-NOTFOUND, and the search
+# will be attempted again next time find_jar is invoked with the same
+# variable.
+# The name of the full path to a file that is searched for is specified
+# by the names listed after NAMES argument. Additional search locations
+# can be specified after the PATHS argument. If you require special a
+# version of a jar file you can specify it with the VERSIONS argument.
+# The argument after DOC will be used for the documentation string in
+# the cache.
+#
+# install_jar(TARGET_NAME DESTINATION)
+#
+# This command installs the TARGET_NAME files to the given DESTINATION.
+# It should be called in the same scope as add_jar() or it will fail.
+#
+# install_jni_symlink(TARGET_NAME DESTINATION)
+#
+# This command installs the TARGET_NAME JNI symlinks to the given
+# DESTINATION. It should be called in the same scope as add_jar()
+# or it will fail.
+#
+# create_javadoc(<VAR>
+#                PACKAGES pkg1 [pkg2 ...]
+#                [SOURCEPATH <sourcepath>]
+#                [CLASSPATH <classpath>]
+#                [INSTALLPATH <install path>]
+#                [DOCTITLE "the documentation title"]
+#                [WINDOWTITLE "the title of the document"]
+#                [AUTHOR TRUE|FALSE]
+#                [USE TRUE|FALSE]
+#                [VERSION TRUE|FALSE]
+#               )
+#
+# Create jave documentation based on files or packages. For more
+# details please read the javadoc manpage.
+#
+# There are two main signatures for create_javadoc. The first
+# signature works with package names on a path with source files:
+#
+#   Example:
+#   create_javadoc(my_example_doc
+#     PACKAGES com.exmaple.foo com.example.bar
+#     SOURCEPATH ${CMAKE_CURRENT_SOURCE_PATH}
+#     CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
+#     WINDOWTITLE "My example"
+#     DOCTITLE "
My example
"
+#     AUTHOR TRUE
+#     USE TRUE
+#     VERSION TRUE
+#   )
+#
+# The second signature for create_javadoc works on a given list of
+# files.
+#
+#   create_javadoc(<VAR>
+#                  FILES file1 [file2 ...]
+#                  [CLASSPATH <classpath>]
+#                  [INSTALLPATH <install path>]
+#                  [DOCTITLE "the documentation title"]
+#                  [WINDOWTITLE "the title of the document"]
+#                  [AUTHOR TRUE|FALSE]
+#                  [USE TRUE|FALSE]
+#                  [VERSION TRUE|FALSE]
+#                 )
+#
+# Example:
+#   create_javadoc(my_example_doc
+#     FILES ${example_SRCS}
+#     CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH}
+#     WINDOWTITLE "My example"
+#     DOCTITLE "
My example
"
+#     AUTHOR TRUE
+#     USE TRUE
+#     VERSION TRUE
+#   )
+#
+# Both signatures share most of the options. These options are the
+# same as what you can find in the javadoc manpage. Please look at
+# the manpage for CLASSPATH, DOCTITLE, WINDOWTITLE, AUTHOR, USE and
+# VERSION.
+#
+# The documentation will be by default installed to
+#
+#   ${CMAKE_INSTALL_PREFIX}/share/javadoc/<VAR>
+#
+# if you don't set the INSTALLPATH.
 #

 #=============================================================================
@@ -269,7 +262,10 @@
             set(_JAVA_CLASS_FILE "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_JAVA_REL_PATH}/${_JAVA_FILE}.class")
             set(_JAVA_CLASS_FILES ${_JAVA_CLASS_FILES} ${_JAVA_CLASS_FILE})

-        elseif (_JAVA_EXT MATCHES ".jar")
+        elseif (_JAVA_EXT MATCHES ".jar"
+                OR _JAVA_EXT MATCHES ".war"
+                OR _JAVA_EXT MATCHES ".ear"
+                OR _JAVA_EXT MATCHES ".sar")
             list(APPEND CMAKE_JAVA_INCLUDE_PATH ${_JAVA_SOURCE_FILE})

         elseif (_JAVA_EXT STREQUAL "")
@@ -356,51 +352,91 @@
     # Add the target and make sure we have the latest resource files.
     add_custom_target(${_TARGET_NAME} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME})

-    set(${_TARGET_NAME}_INSTALL_FILES
-        ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME}
-        PARENT_SCOPE)
+    set_property(
+        TARGET
+            ${_TARGET_NAME}
+        PROPERTY
+            INSTALL_FILES
+                ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME}
+    )
+
     if (_JAVA_TARGET_OUTPUT_LINK)
-        set(${_TARGET_NAME}_INSTALL_FILES
-            ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME}
-            ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_LINK}
-            PARENT_SCOPE)
+        set_property(
+            TARGET
+                ${_TARGET_NAME}
+            PROPERTY
+                INSTALL_FILES
+                    ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME}
+                    ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_LINK}
+        )
+
         if (CMAKE_JNI_TARGET)
-            set(${_TARGET_NAME}_JNI_SYMLINK
-                ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_LINK}
-                PARENT_SCOPE)
+            set_property(
+                TARGET
+                    ${_TARGET_NAME}
+                PROPERTY
+                    JNI_SYMLINK
+                        ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_LINK}
+            )
         endif (CMAKE_JNI_TARGET)
     endif (_JAVA_TARGET_OUTPUT_LINK)
-    set(${_TARGET_NAME}_JAR_FILE
-        ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME} PARENT_SCOPE)
-    set(${_TARGET_NAME}_CLASS_DIR
-        ${CMAKE_JAVA_CLASS_OUTPUT_PATH}
-         PARENT_SCOPE)
+
+    set_property(
+        TARGET
+            ${_TARGET_NAME}
+        PROPERTY
+            JAR_FILE
+                ${CMAKE_CURRENT_BINARY_DIR}/${_JAVA_TARGET_OUTPUT_NAME}
+    )
+
+    set_property(
+        TARGET
+            ${_TARGET_NAME}
+        PROPERTY
+            CLASSDIR
+                ${CMAKE_JAVA_CLASS_OUTPUT_PATH}
+    )
+
 endfunction(add_jar)

 function(INSTALL_JAR _TARGET_NAME _DESTINATION)
-    if (${_TARGET_NAME}_INSTALL_FILES)
+    get_property(__FILES
+        TARGET
+            ${_TARGET_NAME}
+        PROPERTY
+            INSTALL_FILES
+    )
+
+    if (__FILES)
         install(
             FILES
-                ${${_TARGET_NAME}_INSTALL_FILES}
+                ${__FILES}
             DESTINATION
                 ${_DESTINATION}
         )
-    else (${_TARGET_NAME}_INSTALL_FILES)
+    else (__FILES)
         message(SEND_ERROR "The target ${_TARGET_NAME} is not known in this scope.")
-    endif (${_TARGET_NAME}_INSTALL_FILES)
+    endif (__FILES)
 endfunction(INSTALL_JAR _TARGET_NAME _DESTINATION)

 function(INSTALL_JNI_SYMLINK _TARGET_NAME _DESTINATION)
-    if (${_TARGET_NAME}_JNI_SYMLINK)
+    get_property(__SYMLINK
+        TARGET
+            ${_TARGET_NAME}
+        PROPERTY
+            JNI_SYMLINK
+    )
+
+    if (__SYMLINK)
         install(
             FILES
-                ${${_TARGET_NAME}_JNI_SYMLINK}
+                ${__SYMLINK}
             DESTINATION
                 ${_DESTINATION}
         )
-    else (${_TARGET_NAME}_JNI_SYMLINK)
+    else (__SYMLINK)
         message(SEND_ERROR "The target ${_TARGET_NAME} is not known in this scope.")
-    endif (${_TARGET_NAME}_JNI_SYMLINK)
+    endif (__SYMLINK)
 endfunction(INSTALL_JNI_SYMLINK _TARGET_NAME _DESTINATION)

 function (find_jar VARIABLE)


Minor fix

Minor fix

--- CacheDownload.cmake
+++ CacheDownload.cmake
@@ -18,8 +18,8 @@
 	    OUTPUT ${TEST_DOWNLOAD_CACHE_DIR}/${BASEFILE}
 	    DEPENDS ${FLYEM_BUILD_DIR}/src/${BASEFILE} ${${ABBREV}_NAME}
 	    COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_DOWNLOAD_CACHE_DIR}
-	    COMMAND ${CMAKE_COMMAND} -E copy ${FLYEM_BUILD_DIR}/src/${BASEFILE} ${TEST_DOWNLOAD_CACHE_DIR})
-		COMMENT "Copied ${FLYEM_BUILD_DIR}/src/${BASEFILE} to ${TEST_DOWNLOAD_CACHE_DIR}"
+	    COMMAND ${CMAKE_COMMAND} -E copy ${FLYEM_BUILD_DIR}/src/${BASEFILE} ${TEST_DOWNLOAD_CACHE_DIR}
+		COMMENT "Copied ${FLYEM_BUILD_DIR}/src/${BASEFILE} to ${TEST_DOWNLOAD_CACHE_DIR}")
 endif ()

 endmacro (cache_download)


BUG: External_ITKv4 required zlib even if BUILD_ZLIB_SUPPORT was not set to ON

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -133,8 +133,6 @@
   #      link properly if -fopenmp is used.
   string(REPLACE "-fopenmp" "" ITK_CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
   string(REPLACE "-fopenmp" "" ITK_CMAKE_CXX_FLAGS "${CMAKE_CX_FLAGS}")
-
-  find_package(ZLIB REQUIRED)

   set(${proj}_INSTALL_PATH "${EXTERNAL_BINARY_DIRECTORY}/${proj}-install")


use glfw2

use glfw2

--- cmake/Modules/FindGLFW.cmake
+++ cmake/Modules/FindGLFW.cmake
@@ -84,7 +84,7 @@
 # GLFW-1.1 is the name used by FreeBSD ports...
 # don't confuse it for the version number.
 FIND_LIBRARY(GLFW_LIBRARY_TEMP
-  NAMES GLFW glfw
+  NAMES GLFW glfw glfw2
   HINTS
   $ENV{GLFWDIR}
   PATH_SUFFIXES lib64 lib


cmake: cleanup

cmake: cleanup

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -1448,7 +1448,6 @@
 #
 #=============================================================================#
 function(setup_serial_targets)
-
     # Detect screen command
     if(CMAKE_HOST_UNIX)
         find_program(SCREEN screen)
@@ -1459,12 +1458,11 @@
         message(FATAL_ERROR "${CMAKE_HOST_SYSTEM_NAME} not supported yet!" )
     endif()

-
-    # Detect terminal
+    # Detect terminal command
     file(GLOB TERMINALS "/usr/bin/gnome-terminal" "/usr/bin/konsole" "/usr/bin/xterm" "/opt/X11/bin/xterm")
     list(GET TERMINALS 0 TERMINAL)

-    # Detect port
+    # Detect serial port
     if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
         file(GLOB SERIAL_PORTS /dev/ttyACM*)
     elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
@@ -1473,14 +1471,13 @@
         message(FATAL_ERROR "${CMAKE_HOST_SYSTEM_NAME} not supported yet." )
     endif()

-    # Create targets
+    # Create serial targets
     foreach(SERIAL_PORT ${SERIAL_PORTS})
-        # Setup arguments
+        # Setup terminal arguments
         set(ARGUMENTS "-e" "'sh -c \"${SCREEN} -r || ${SCREEN} ${SERIAL_PORT}\"'")
         separate_arguments(ARGUMENTS)

         get_filename_component(SERIAL_NAME ${SERIAL_PORT} NAME)
-
         add_custom_target(serial-${SERIAL_NAME}
                 COMMAND ${TERMINAL} ${ARGUMENTS})
     endforeach()


fixed: error limits for clang

fixed: error limits for clang

--- cmake/SetupCompilerPre.cmake
+++ cmake/SetupCompilerPre.cmake
@@ -27,6 +27,7 @@
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -Wno-ignored-qualifiers")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fmessage-length=0")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fdiagnostics-show-option")
+  SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -ferror-limit=5")

   IF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "3.0")
     SET(GLOBAL_COMPILER_FLAGS "-std=c++11 ${GLOBAL_COMPILER_FLAGS}")
@@ -87,6 +88,7 @@
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fmessage-length=0")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fdiagnostics-show-location=once")
   SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -fdiagnostics-show-option")
+  # SET(GLOBAL_COMPILER_FLAGS "${GLOBAL_COMPILER_FLAGS} -save-temps")

   IF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "4.6")
     SET(GLOBAL_COMPILER_FLAGS "-std=c++11 ${GLOBAL_COMPILER_FLAGS}")


Turn ENABLE_EIGEN_LAPACK ON by default

Turn ENABLE_EIGEN_LAPACK ON by default

--- cmake/ShogunFindLAPACK.cmake
+++ cmake/ShogunFindLAPACK.cmake
@@ -1,5 +1,5 @@
 # Enable Eigen to use Lapack backend
-OPTION(ENABLE_EIGEN_LAPACK "Enable Eigen to use detected BLAS and LAPACK backend" OFF)
+OPTION(ENABLE_EIGEN_LAPACK "Enable Eigen to use detected BLAS and LAPACK backend" ON)

 FIND_PACKAGE(LAPACK)
 IF (LAPACK_FOUND)


[cmake] added compiler option for -Wunknown-warning-option (defaults to -Wno-unknown-warning-option)

this is important for clang, which otherwise pukes warnings about unknown warnings all over the console

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -329,6 +329,13 @@
 	# that is because GCC diagnostic pragmas get lost if defined in precompiled headers

 	axl_create_compiler_flag_setting (
+		GCC_FLAG_WARNING_UNKNOWN_WARNING_OPTIONS
+		DESCRIPTION "Warn about unknown warning command-line options"
+		DEFAULT "-Wno-unknown-warning-option"
+		"-Wunknown-warning-option" "-Wno-unknown-warning-option"
+		)
+
+	axl_create_compiler_flag_setting (
 		GCC_FLAG_WARNING_DEPRECATED_DECLARATIONS
 		DESCRIPTION "Warn about uses of functions/variables/types marked as deprecated"
 		DEFAULT "-Wno-deprecated-declarations"


#51 Fix FFmpeg lib suffix on non Windows target

--- FFmpeg/FFmpeg.cmake
+++ FFmpeg/FFmpeg.cmake
@@ -6,6 +6,11 @@
 	else()
 		set(SUFFIX ${CMAKE_IMPORT_LIBRARY_SUFFIX})
 	endif()
+
+	if (NOT "${SUFFIX}")
+		set(SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
+	endif()
+
 	set(${output} "${basePath}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${libName}${SUFFIX}")
 endmacro(import_library_path)


Specify 'simulator' environment explicitly

Clang understands `simulator` as a [valid environment](https://github.com/llvm/llvm-project/blob/657adcb0779d2d119737f2ca557a87456024a5ac/llvm/include/llvm/ADT/Triple.h#L231)
like `macabi` for Catalyst builds. It makes explicit
that the build is targeted at the Simulator. Otherwise,
`arm64-apple-ios11.0` is an iOS build which it tries to
link to the iPhoneSimulator SDK.

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -317,26 +317,26 @@
   set(SDK_NAME iphonesimulator)
   if(NOT ARCHS)
     set(ARCHS i386)
-    set(APPLE_TARGET_TRIPLE_INT i386-apple-ios${DEPLOYMENT_TARGET})
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET})
+    set(APPLE_TARGET_TRIPLE_INT i386-apple-ios${DEPLOYMENT_TARGET}-simulator)
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator)
   endif()
   message(DEPRECATION "SIMULATOR IS DEPRECATED. Consider using SIMULATOR64 instead.")
 elseif(PLATFORM_INT STREQUAL "SIMULATOR64")
   set(SDK_NAME iphonesimulator)
   if(NOT ARCHS)
     set(ARCHS x86_64)
-    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-ios${DEPLOYMENT_TARGET})
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET})
+    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-ios${DEPLOYMENT_TARGET}-simulator)
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator)
   endif()
 elseif(PLATFORM_INT STREQUAL "SIMULATORARM64")
   set(SDK_NAME iphonesimulator)
   if(NOT ARCHS)
     set(ARCHS arm64)
-    set(APPLE_TARGET_TRIPLE_INT arm64-apple-ios${DEPLOYMENT_TARGET})
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET})
+    set(APPLE_TARGET_TRIPLE_INT arm64-apple-ios${DEPLOYMENT_TARGET}-simulator)
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-ios${DEPLOYMENT_TARGET}-simulator)
   endif()
 elseif(PLATFORM_INT STREQUAL "TVOS")
   set(SDK_NAME appletvos)
@@ -366,9 +366,9 @@
   set(SDK_NAME appletvsimulator)
   if(NOT ARCHS)
     set(ARCHS x86_64)
-    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-tvos${DEPLOYMENT_TARGET})
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET})
+    set(APPLE_TARGET_TRIPLE_INT x86_64-apple-tvos${DEPLOYMENT_TARGET}-simulator)
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-tvos${DEPLOYMENT_TARGET}-simulator)
   endif()
 elseif(PLATFORM_INT STREQUAL "WATCHOS")
   set(SDK_NAME watchos)
@@ -412,9 +412,9 @@
   set(SDK_NAME watchsimulator)
   if(NOT ARCHS)
     set(ARCHS i386)
-    set(APPLE_TARGET_TRIPLE_INT i386-apple-watchos${DEPLOYMENT_TARGET})
-  else()
-    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET})
+    set(APPLE_TARGET_TRIPLE_INT i386-apple-watchos${DEPLOYMENT_TARGET}-simulator)
+  else()
+    set(APPLE_TARGET_TRIPLE_INT ${ARCHS_SPLIT}-apple-watchos${DEPLOYMENT_TARGET}-simulator)
   endif()
 elseif(PLATFORM_INT STREQUAL "MAC" OR PLATFORM_INT STREQUAL "MAC_CATALYST")
   set(SDK_NAME macosx)


- sanitize input for running test suite

- sanitize input for running test suite

--- sbml-testsuite/run_suite.cmake
+++ sbml-testsuite/run_suite.cmake
@@ -29,8 +29,16 @@
   file(MAKE_DIRECTORY ${OUT_DIR})
 endif()

+string(REPLACE " " "" UNSUPPORTED ${UNSUPPORTED})
+string(REPLACE ";" "," UNSUPPORTED ${UNSUPPORTED})
+string(REPLACE "\"" "" UNSUPPORTED ${UNSUPPORTED})
+
 if ("${UNSUPPORTED}" STREQUAL "")
   set (UNSUPPORTED "AlgebraicRule,CSymbolDelay,CSymbolRateOf,AssignedVariableStoichiometry,FastReaction, VolumeConcentrationRates,L3v2MathML,BoolNumericSwap,fbc")
+endif()
+
+if (UNSUPPORTED)
+message(STATUS "Not supporting: '${UNSUPPORTED}'")
 endif()

 if ("${SBML_LEVEL}" STREQUAL "")


modules: updated FindCorrade.cmake.

modules: updated FindCorrade.cmake.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -37,6 +37,10 @@
 #   Native Client with `glibc` toolchain
 #  CORRADE_TARGET_EMSCRIPTEN    - Defined if compiled for Emscripten
 #
+# If CORRADE_BUILD_DEPRECATED is defined, the CORRADE_INCLUDE_DIR variable also
+# contains path directly to Corrade directory (i.e. for includes without
+# `Corrade/` prefix).
+#
 # Corrade provides these macros and functions:
 #
 #
@@ -126,8 +130,7 @@

 # Include dir
 find_path(CORRADE_INCLUDE_DIR
-    NAMES PluginManager Utility
-    PATH_SUFFIXES Corrade)
+    NAMES Corrade/PluginManager Corrade/Utility)

 # CMake module dir
 find_path(_CORRADE_MODULE_DIR
@@ -155,7 +158,7 @@
 endif()

 # Configuration
-file(READ ${CORRADE_INCLUDE_DIR}/corradeConfigure.h _corradeConfigure)
+file(READ ${CORRADE_INCLUDE_DIR}/Corrade/corradeConfigure.h _corradeConfigure)

 # Compatibility?
 string(FIND "${_corradeConfigure}" "#define CORRADE_GCC47_COMPATIBILITY" _GCC47_COMPATIBILITY)
@@ -215,6 +218,11 @@
     CORRADE_TESTSUITE_LIBRARY
     _CORRADE_MODULE_DIR)

+# Add Corrade dir to include path if this is deprecated build
+if(CORRADE_BUILD_DEPRECATED)
+    set(CORRADE_INCLUDE_DIR ${CORRADE_INCLUDE_DIR} ${CORRADE_INCLUDE_DIR}/Corrade)
+endif()
+
 # Include our module dir, if we have any
 if(NOT "${_CORRADE_MODULE_DIR}" STREQUAL "${CMAKE_ROOT}/Modules")
     set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_CORRADE_MODULE_DIR}")


Fix CMake style

Fix CMake style

--- rosidl_generator_java/cmake/rosidl_generator_java_generate_interfaces.cmake
+++ rosidl_generator_java/cmake/rosidl_generator_java_generate_interfaces.cmake
@@ -169,8 +169,7 @@
     RUNTIME_OUTPUT_DIRECTORY${_build_type} ${_output_path}/${_parent_folder}
     C_STANDARD 11
     CXX_STANDARD 14
-    OUTPUT_NAME "${_library_path}"
-    )
+    OUTPUT_NAME "${_library_path}")
 endmacro()

 set(_type_support_by_generated_cpp_files ${_type_support_by_generated_msg_cpp_files} ${_type_support_by_generated_srv_cpp_files})


Android toolchain is updated for NDK r7c

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -170,6 +170,8 @@
 #     [+] improved toolchain loading speed
 #     [+] added assembler language support (.S)
 #     [+] allowed preset search paths and extra search suffixes
+#   - modified April 2012 Andrey Kamaev andrey.kamaev@itseez.com
+#     [+] updated for NDK r7c
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -188,7 +190,7 @@
 #this one not so much
 set( CMAKE_SYSTEM_VERSION 1 )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )


Improve find script

Improve find script

--- glbinding-config.cmake
+++ glbinding-config.cmake
@@ -9,8 +9,6 @@
 # GLBINDING_LIBRARY_DEBUG
 # GLBINDING_INCLUDE_DIR

-find_package(OpenGL REQUIRED)
-
 include(FindPackageHandleStandardArgs)

 if(CMAKE_CURRENT_LIST_FILE)
@@ -19,6 +17,9 @@

 file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ENVPROGRAMFILES)
 file(TO_CMAKE_PATH "$ENV{GLBINDING_DIR}" ENVGLBINDING_DIR)
+
+set(GLBINDING_INCLUDES "")
+set(GLBINDING_LIBRARIES "")

 set(LIB_PATHS
     ${GLBINDING_DIR}/build
@@ -79,24 +80,27 @@
         set(${LIB_NAME_UPPER}_LIBRARY ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
     endif()

-    set(GLBINDING_INCLUDES  ${GLBINDING_INCLUDES}  ${${LIB_NAME_UPPER}_INCLUDE_DIR})
-    set(GLBINDING_LIBRARIES ${GLBINDING_LIBRARIES} ${${LIB_NAME_UPPER}_LIBRARY})
+    list(APPEND GLBINDING_INCLUDES ${${LIB_NAME_UPPER}_INCLUDE_DIR})
+    list(APPEND GLBINDING_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY})

     # DEBUG
-    #message("${LIB_NAME_UPPER}_INCLUDE_DIR     = ${${LIB_NAME_UPPER}_INCLUDE_DIR}")
-    #message("${LIB_NAME_UPPER}_LIBRARY_RELEASE = ${${LIB_NAME_UPPER}_LIBRARY_RELEASE}")
-    #message("${LIB_NAME_UPPER}_LIBRARY_DEBUG   = ${${LIB_NAME_UPPER}_LIBRARY_DEBUG}")
-    #message("${LIB_NAME_UPPER}_LIBRARY         = ${${LIB_NAME_UPPER}_LIBRARY}")
+    # message("${LIB_NAME_UPPER}_INCLUDE_DIR     = ${${LIB_NAME_UPPER}_INCLUDE_DIR}")
+    # message("${LIB_NAME_UPPER}_LIBRARY_RELEASE = ${${LIB_NAME_UPPER}_LIBRARY_RELEASE}")
+    # message("${LIB_NAME_UPPER}_LIBRARY_DEBUG   = ${${LIB_NAME_UPPER}_LIBRARY_DEBUG}")
+    # message("${LIB_NAME_UPPER}_LIBRARY         = ${${LIB_NAME_UPPER}_LIBRARY}")

 endmacro()

-set(GLBINDING_LIBRARIES "${OPENGL_LIBRARIES}")
-
 find(glbinding glbinding/glbinding_api.h ${LIB_PATHS})
+if (GLBINDING_LIBRARY)
+  # add dependencies
+  find_package(OpenGL REQUIRED)
+  list(APPEND GLBINDING_LIBRARIES ${OPENGL_LIBRARIES})
+endif()

 # DEBUG
-#message("GLBINDING_INCLUDES  = ${GLBINDING_INCLUDES}")
-#message("GLBINDING_LIBRARIES = ${GLBINDING_LIBRARIES}")
+# message("GLBINDING_INCLUDES  = ${GLBINDING_INCLUDES}")
+# message("GLBINDING_LIBRARIES = ${GLBINDING_LIBRARIES}")

 find_package_handle_standard_args(GLBINDING DEFAULT_MSG GLBINDING_LIBRARIES GLBINDING_INCLUDES)
 mark_as_advanced(GLBINDING_FOUND)


Added a macro for installing header directory

--- build/macros.cmake
+++ build/macros.cmake
@@ -107,6 +107,17 @@
 		)
 	endif()
 endmacro()
+
+macro(install_header_dir _dir _dest _exclude)
+	if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
+		install(
+			DIRECTORY "${_dir}/" #Note trailing slash
+			DESTINATION "${_dest}"
+			PATTERN "${_exclude}" EXCLUDE
+		)
+	endif()
+endmacro()
+
 macro(install_shared _targ _head)
 	install_bin(${_targ})
 	install_headers(${_head} "${INSTALL_INC_DIR}")


Add MSVC arch id.

Add MSVC arch id.

--- src/inserts/functions.cmake
+++ src/inserts/functions.cmake
@@ -277,6 +277,18 @@
         set(toolset ${CPPAN_CONFIG_PART_DELIMETER}${toolset})
     endif()

+    set(msvc_arch)
+    if (MSVC AND MSVC_C_ARCHITECTURE_ID)
+        prepare_config_part(msvc_arch ${MSVC_C_ARCHITECTURE_ID})
+        set(msvc_arch ${CPPAN_CONFIG_PART_DELIMETER}${msvc_arch})
+
+        # can they differ?
+        if (MSVC_CXX_ARCHITECTURE_ID AND NOT "${MSVC_C_ARCHITECTURE_ID}" STREQUAL "${MSVC_CXX_ARCHITECTURE_ID}")
+            prepare_config_part(msvc_arch2 ${MSVC_CXX_ARCHITECTURE_ID})
+            set(msvc_arch ${msvc_arch}${CPPAN_CONFIG_PART_DELIMETER}${msvc_arch2})
+        endif()
+    endif()
+
     # add suffix (configuration) to distinguish build types
     # for non VS/XCODE builds
     set(configuration)
@@ -285,7 +297,7 @@
     endif()

     set(config ${config}${CPPAN_CONFIG_PART_DELIMETER}${version})
-    set(config ${config}${CPPAN_CONFIG_PART_DELIMETER}${bits}${mt_flag}${dll}${toolset})
+    set(config ${config}${CPPAN_CONFIG_PART_DELIMETER}${bits}${msvc_arch}${mt_flag}${dll}${toolset})
     set(config ${config}${configuration})

     set(${out} ${config} PARENT_SCOPE)


Remove unliked comment and empty macro

Remove unliked comment and empty macro

--- CMake/OTBModuleEnablement.cmake
+++ CMake/OTBModuleEnablement.cmake
@@ -379,13 +379,6 @@
 file(WRITE "${OTB_BINARY_DIR}/OTBTargets.cmake"
   "# Generated by CMake, do not edit!")

-# Override CMake's built-in add_* commands: assign LABELS to tests and targets
-# automatically. Depends on the CMake variable otb-module being set to the
-# "current" module when add_* is called.
-macro(verify_otb_module_is_set)
-
-endmacro()
-
 macro(init_module_vars)
   if( "${otb-module}" STREQUAL "" )
     message(FATAL_ERROR "CMake variable otb-module is not set")


with ninja, require bleeding edge cmake

with ninja, require bleeding edge cmake

--- CMake/hoomd/HOOMDHIPSetup.cmake
+++ CMake/hoomd/HOOMDHIPSetup.cmake
@@ -46,8 +46,13 @@
         set(CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
             "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -c <SOURCE> -o <OBJECT>")

-        # hipcc can write dependencies (undocumented CMake option)
-        set(CMAKE_DEPFILE_FLAGS_CUDA "-MD -MT <OBJECT> -MF <DEPFILE>")
+        if(CMAKE_GENERATOR STREQUAL "Ninja")
+            # this is also ugly, but ninja/hipcc is only supported with bleeding-edge cmake
+            CMAKE_MINIMUM_REQUIRED(VERSION 3.16.1 FATAL_ERROR)
+
+            # hipcc can write dependencies (undocumented CMake option)
+            set(CMAKE_DEPFILE_FLAGS_CUDA "-MD -MT <OBJECT> -MF <DEPFILE>")
+        endif()

         # don't let CMake examine the compiler, because it will fail
         SET(CMAKE_CUDA_COMPILER_FORCED TRUE)


Change end fx line

Change end fx line

--- test/BuildGPUTests.cmake
+++ test/BuildGPUTests.cmake
@@ -55,7 +55,7 @@
     if(MPI_FOUND)
 	    target_link_libraries(${name} ${MPI_LIBRARIES})
     endif()
-endif()
+endfunction(add_GPU_NVT_test)

 function(add_GPU_NPT_test name)
     add_executable(${name} ${cudaSources} ${cudaHeaders} ${GOMCHeaders} ${GOMCSources} ${libHeaders} ${libSources}
@@ -75,7 +75,7 @@
     if(MPI_FOUND)
 	    target_link_libraries(${name} ${MPI_LIBRARIES})
     endif()
-endif()
+endfunction(add_GPU_NPT_test)

 function(add_GPU_GCMC_test name)
     add_executable(${name} ${cudaSources} ${cudaHeaders} ${GOMCHeaders} ${GOMCSources} ${libHeaders} ${libSources}
@@ -95,7 +95,7 @@
     if(MPI_FOUND)
 	    target_link_libraries(${name} ${MPI_LIBRARIES})
     endif()
-endif()
+endfunction(add_GPU_GCMC_test)

 function(add_GPU_GEMC_test name)
     add_executable(${name} ${cudaSources} ${cudaHeaders} ${GOMCHeaders} ${GOMCSources} ${libHeaders} ${libSources}
@@ -115,7 +115,7 @@
     if(MPI_FOUND)
 	    target_link_libraries(${name} ${MPI_LIBRARIES})
     endif()
-endif()
+endfunction(add_GPU_GEMC_test)

 add_GPU_NVT_test(GOMC_GPU_NVT_Test)
 add_GPU_NPT_test(GOMC_GPU_NPT_Test)


Updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -21,6 +21,7 @@
 # Features of found Corrade library are exposed in these variables:
 #  CORRADE_GCC46_COMPATIBILITY  - Defined if compiled with compatibility
 #   mode for GCC 4.6
+#  CORRADE_BUILD_STATIC         - Defined if compiled as static libraries
 #  CORRADE_TARGET_NACL          - Defined if compiled for Google Chrome
 #   Native Client
 #  CORRADE_TARGET_NACL_NEWLIB   - Defined if compiled for Google Chrome
@@ -155,6 +156,10 @@
 if(NOT _GCC46_COMPATIBILITY EQUAL -1)
     set(CORRADE_GCC46_COMPATIBILITY 1)
 endif()
+string(FIND "${_corradeConfigure}" "#define CORRADE_BUILD_STATIC" _BUILD_STATIC)
+if(NOT _BUILD_STATIC EQUAL -1)
+    set(CORRADE_BUILD_STATIC 1)
+endif()
 string(FIND "${_corradeConfigure}" "#define CORRADE_TARGET_NACL" _TARGET_NACL)
 if(NOT _TARGET_NACL EQUAL -1)
     set(CORRADE_TARGET_NACL 1)


fix grouping of sources used for more than one type

--- cmake/lapack.cmake
+++ cmake/lapack.cmake
@@ -1,11 +1,12 @@
 # Sources for compiling lapack-netlib. Can't use CMakeLists.txt because lapack-netlib already has its own cmake files.

 set(ALLAUX ilaenv.f ilaenv2stage.f ieeeck.f lsamen.f iparmq.f iparam2stage.F
-   ilaprec.f ilatrans.f ilauplo.f iladiag.f chla_transtype.f
+   ilaprec.f ilatrans.f ilauplo.f iladiag.f chla_transtype.f dlaset.f
    ../INSTALL/ilaver.f xerbla_array.f
    ../INSTALL/slamch.f)

 set(SCLAUX
+	scombssq.f sbdsvdx.f sstevx.f sstein.f
    sbdsdc.f
    sbdsqr.f sdisna.f slabad.f slacpy.f sladiv.f slae2.f  slaebz.f
    slaed0.f slaed1.f slaed2.f slaed3.f slaed4.f slaed5.f slaed6.f
@@ -25,6 +26,7 @@

 set(DZLAUX
    dbdsdc.f
+   dbdsvdx.f dstevx.f dstein.f
    dbdsqr.f ddisna.f dlabad.f dlacpy.f dladiv.f dlae2.f  dlaebz.f
    dlaed0.f dlaed1.f dlaed2.f dlaed3.f dlaed4.f dlaed5.f dlaed6.f
    dlaed7.f dlaed8.f dlaed9.f dlaeda.f dlaev2.f dlagtf.f
@@ -35,14 +37,14 @@
    dlartg.f dlaruv.f dlas2.f  dlascl.f
    dlasd0.f dlasd1.f dlasd2.f dlasd3.f dlasd4.f dlasd5.f dlasd6.f
    dlasd7.f dlasd8.f dlasda.f dlasdq.f dlasdt.f
-   dlaset.f dlasq1.f dlasq2.f dlasq3.f dlasq4.f dlasq5.f dlasq6.f
+   dlasq1.f dlasq2.f dlasq3.f dlasq4.f dlasq5.f dlasq6.f
    dlasr.f  dlasrt.f dlassq.f dlasv2.f dpttrf.f dstebz.f dstedc.f
    dsteqr.f dsterf.f dlaisnan.f disnan.f
    dlartgp.f dlartgs.f
    ../INSTALL/dlamch.f ../INSTALL/dsecnd_${TIMER}.f)

 set(SLASRC
-   sbdsvdx.f sgbbrd.f sgbcon.f sgbequ.f sgbrfs.f sgbsv.f
+   sgbbrd.f sgbcon.f sgbequ.f sgbrfs.f sgbsv.f
    sgbsvx.f sgbtf2.f sgbtrf.f sgbtrs.f sgebak.f sgebal.f sgebd2.f
    sgebrd.f sgecon.f sgeequ.f sgees.f  sgeesx.f sgeev.f  sgeevx.f
    sgehd2.f sgehrd.f sgelq2.f sgelqf.f
@@ -83,8 +85,8 @@
    ssbev.f  ssbevd.f ssbevx.f ssbgst.f ssbgv.f  ssbgvd.f ssbgvx.f
    ssbtrd.f sspcon.f sspev.f  sspevd.f sspevx.f sspgst.f
    sspgv.f  sspgvd.f sspgvx.f ssprfs.f sspsv.f  sspsvx.f ssptrd.f
-   ssptrf.f ssptri.f ssptrs.f sstegr.f sstein.f sstev.f  sstevd.f sstevr.f
-   sstevx.f ssycon.f ssyev.f  ssyevd.f ssyevr.f ssyevx.f ssygs2.f
+   ssptrf.f ssptri.f ssptrs.f sstegr.f sstev.f  sstevd.f sstevr.f
+   ssycon.f ssyev.f  ssyevd.f ssyevr.f ssyevx.f ssygs2.f
    ssygst.f ssygv.f  ssygvd.f ssygvx.f ssyrfs.f ssysv.f  ssysvx.f
    ssytd2.f ssytf2.f ssytrd.f ssytrf.f ssytri.f ssytri2.f ssytri2x.f
    ssyswapr.f ssytrs.f ssytrs2.f
@@ -116,7 +118,7 @@
    ssytrd_2stage.f ssytrd_sy2sb.f ssytrd_sb2st.F ssb2st_kernels.f
    ssyevd_2stage.f ssyev_2stage.f ssyevx_2stage.f ssyevr_2stage.f
    ssbev_2stage.f ssbevx_2stage.f ssbevd_2stage.f ssygv_2stage.f
-   scombssq.f sgesvdq.f slaorhr_col_getrfnp.f
+   sgesvdq.f slaorhr_col_getrfnp.f
    slaorhr_col_getrfnp2.f sorgtsqr.f sorhr_col.f )

 set(SXLASRC sgesvxx.f sgerfsx.f sla_gerfsx_extended.f sla_geamv.f
@@ -229,7 +231,7 @@
    cla_lin_berr.f clarscl2.f clascl2.f cla_wwaddw.f)

 set(DLASRC
-   dbdsvdx.f dgbbrd.f dgbcon.f dgbequ.f dgbrfs.f dgbsv.f
+   dgbbrd.f dgbcon.f dgbequ.f dgbrfs.f dgbsv.f
    dgbsvx.f dgbtf2.f dgbtrf.f dgbtrs.f dgebak.f dgebal.f dgebd2.f
    dgebrd.f dgecon.f dgeequ.f dgees.f  dgeesx.f dgeev.f  dgeevx.f
    dgehd2.f dgehrd.f dgelq2.f dgelqf.f
@@ -270,8 +272,8 @@
    dsbev.f  dsbevd.f dsbevx.f dsbgst.f dsbgv.f  dsbgvd.f dsbgvx.f
    dsbtrd.f dspcon.f dspev.f  dspevd.f dspevx.f dspgst.f
    dspgv.f  dspgvd.f dspgvx.f dsprfs.f dspsv.f  dspsvx.f dsptrd.f
-   dsptrf.f dsptri.f dsptrs.f dstegr.f dstein.f dstev.f  dstevd.f dstevr.f
-   dstevx.f dsycon.f dsyev.f  dsyevd.f dsyevr.f
+   dsptrf.f dsptri.f dsptrs.f dstegr.f dstev.f  dstevd.f dstevr.f
+   dsycon.f dsyev.f  dsyevd.f dsyevr.f
    dsyevx.f dsygs2.f dsygst.f dsygv.f  dsygvd.f dsygvx.f dsyrfs.f
    dsysv.f  dsysvx.f
    dsytd2.f dsytf2.f dsytrd.f dsytrf.f dsytri.f dsytrs.f dsytrs2.f
@@ -474,12 +476,16 @@
 if(BUILD_COMPLEX)
   set(LA_REL_SRC ${LA_REL_SRC} ${CLASRC} ${ZCLASRC} ${ALLAUX} ${SCLAUX})
   SET(LA_GEN_SRC ${LA_GEN_SRC} ${CMATGEN} ${SCATGEN})
-  message(STATUS "Building Complex Precision")
+  message(STATUS "Building Single Precision Complex")
 endif()
 if(BUILD_COMPLEX16)
   set(LA_REL_SRC ${LA_REL_SRC} ${ZLASRC} ${ZCLASRC} ${ALLAUX} ${DZLAUX})
   SET(LA_GEN_SRC ${LA_GEN_SRC} ${ZMATGEN} ${DZATGEN})
-  message(STATUS "Building Double Complex Precision")
+# for zlange/zlanhe
+  if (NOT BUILD_DOUBLE)
+    set (LA_REL_SRC ${LA_REL_SRC} dcombssq.f)
+  endif	()
+  message(STATUS "Building Double Precision Complex")
 endif()

 # add lapack-netlib folder to the sources


updated cmake toolchain

updated cmake toolchain


ManageEnvironment: Fix IFs

ManageEnvironment: Fix IFs

--- Modules/ManageEnvironment.cmake
+++ Modules/ManageEnvironment.cmake
@@ -85,19 +85,19 @@
 	IF("${_arg}" STREQUAL "ENV_NAME")
 	    SET(_stage "ENV_NAME")
 	ELSEIF("${_arg}" STREQUAL "CACHE")
-	    SET(_stage "CACHE")
+	    SET(_stage "_CACHE")
 	ELSE()
 	    IF("${_stage}" STREQUAL "ENV_NAME")
 		SET(_env "${_arg}")
-	    ELSEIF("${_stage}" STREQUAL "CACHE")
+	    ELSEIF("${_stage}" STREQUAL "_CACHE")
 		LIST(APPEND _setOpts "${_arg}")
 		IF("${_arg}" STREQUAL "FORCE")
 		    SET(_force 1)
 		ENDIF()
 	    ELSE()
 		SET(_defaultValue "${_arg}")
-	    ENDIF(_stage STREQUAL "ENV_NAME")
-	ENDIF(_arg STREQUAL "ENV_NAME")
+	    ENDIF()
+	ENDIF()
     ENDFOREACH(_arg ${ARGN})

     IF("${_setOpts}" STREQUAL "")


Suppress warnings in random123

Suppress warnings in random123

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -41,6 +41,9 @@

 # setup CUDA compile options
 if (ENABLE_CUDA)
+    # supress warnings in random123
+    list(APPEND CUDA_NVCC_FLAGS "-Xcudafe;--diag_suppress=code_is_unreachable")
+
     # setup nvcc to build for all CUDA architectures. Allow user to modify the list if desired
     if (CUDA_VERSION VERSION_GREATER 8.99)
         set(CUDA_ARCH_LIST 30 35 50 60 70 CACHE STRING "List of target sm_ architectures to compile CUDA code for. Separate with semicolons.")


Fix the system-test driver

Fix the system-test driver

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -1,11 +1,5 @@
 #!/usr/bin/env bash
-# Copyright 2011, Tokyo Institute of Technology.
-# All rights reserved.
-#
-# This file is distributed under the license described in
-# LICENSE.txt.
-#
-# Author: Naoya Maruyama (naoya@matsulab.is.titech.ac.jp)
+# Licensed under the BSD license. See LICENSE.txt for more details.

 #
 # For usage, see the help message by executing this script with option --help.
@@ -789,7 +783,6 @@
     local src_name=${1%%.*}
     local target=$2
     local ref_exe=$(get_reference_exe_name $1 $2)
-	echo $ref_exe
     local ref_out=$ref_exe.out
     # Do nothing if no reference implementation is found.
     if [ ! -x $ref_exe ]; then
@@ -864,7 +857,9 @@
 			exit_error "Unsupported target: $2"
 			;;
     esac
-    if [ $? -ne 0 ] || grep -q "orted was unable to" $exename.err; then
+	# Note OpenMPI does not necessarily return non-zero even upon failures
+    if [ $? -ne 0 ] || \
+		egrep -qiw "orted was unable to|exited on signal" $exename.err; then
 		cat $exename.err
 		return 1
     fi
@@ -1205,10 +1200,13 @@
 			FAILED_TESTS="$FAILED_TESTS $test_sig"
 			;;
 		$FAIL_COMPILE)
+			inc NUM_SUCCESS_TRANS
 			inc NUM_FAIL_COMPILE
 			FAILED_TESTS="$FAILED_TESTS $test_sig"
 			;;
 		$FAIL_EXECUTE)
+			inc NUM_SUCCESS_TRANS
+			inc NUM_SUCCESS_COMPILE
 			inc NUM_FAIL_EXECUTE
 			FAILED_TESTS="$FAILED_TESTS $test_sig"
 			;;


fixed CMake recursion into subdirs: should ignore hidden dirs (e.g. '.svn')


Use the cmake built in support for which C++ standard to use instead of doing a custom job.

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -90,13 +90,24 @@
     endforeach()
   endif()

-  # We want Position independent code for all builds
-  set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE INTERNAL "Position-Independent Code")
+  # Standard environment - Position independent code, Symbols hidden by default, and standard C++11
+  set(CMAKE_POSITION_INDEPENDENT_CODE ON PARENT_SCOPE)
+  set(CMAKE_CXX_VISIBILITY_PRESET hidden PARENT_SCOPE)
+  set(CMAKE_VISIBILITY_INLINES_HIDDEN ON PARENT_SCOPE)
+  set(CMAKE_CXX_STANDARD 11 PARENT_SCOPE)
+  set(CMAKE_CXX_STANDARD_REQUIRED ON PARENT_SCOPE)
+  set(CMAKE_CXX_EXTENSIONS OFF PARENT_SCOPE)
+
+  #CMAKE_OSX_DEPLOYMENT_TARGET < 10.9 implies -stdlib=libstdc++, which doesn't have
+  #complete c++11 support. oveeride with libc++
+  if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" PARENT_SCOPE)
+  endif()
+
 endfunction()

 function(standard_project_postinit)
   ##Post-initialization steps. All of these depend on project() having been called.
-
   include(CTest)

   if(CMAKE_COMPILER_IS_GNUCC)
@@ -110,20 +121,4 @@
   endif()
   message(STATUS "Compiler version ${CMAKE_CXX_COMPILER_VERSION}")

-  # Always use c++11 compiler with hidden visibility
-  if(NOT WIN32)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fvisibility=hidden" CACHE INTERNAL "C++ Compiler Flags")
-  endif()
-
-  # Clang needs special additional flags to build with C++11
-  if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
-    message(STATUS "AppleClang C++11")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" CACHE INTERNAL "C++ Compiler Flags")
-    set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++" CACHE INTERNAL "XCode Clang C++ STL Version")
-  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    message(STATUS "Clang C++11")
-    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lstdc++" CACHE INTERNAL "C++ EXE Linker Flags")
-  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-    message(STATUS "GCC C++11")
-  endif()
 endfunction()


Updated Windows build flags to set _SECURE_SCL. Removed some duplicate declarations.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -7,10 +7,10 @@
 # Portable compilation flags.
 set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
 set(CMAKE_CXX_FLAGS_RELEASE
-    "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DNDEBUG")
+    "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG")

 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
-    "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
+    "-DLL_RELEASE=1 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")

 # Configure crash reporting
 set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
@@ -36,13 +36,13 @@
   # Don't build DLLs.
   set(BUILD_SHARED_LIBS OFF)

-  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP"
+  set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP -D_SCL_SECURE_NO_WARNINGS=1"
       CACHE STRING "C++ compiler debug options" FORCE)
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
-      "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Ob2"
+      "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Ob2 -D_SECURE_STL=0"
       CACHE STRING "C++ compiler release-with-debug options" FORCE)
   set(CMAKE_CXX_FLAGS_RELEASE
-      "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2"
+      "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
       CACHE STRING "C++ compiler release options" FORCE)

   set(CMAKE_CXX_STANDARD_LIBRARIES "")
@@ -59,18 +59,9 @@
       /Zc:forScope
       /nologo
       /Oy-
+      /Zc:wchar_t-
       )

-  if(MSVC)
-    set(CMAKE_CXX_FLAGS_RELEASE
-      "${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
-      CACHE STRING "C++ compiler release options" FORCE)
-
-    add_definitions(
-      /Zc:wchar_t-
-      )
-  endif (MSVC)
-
   # Are we using the crummy Visual Studio KDU build workaround?
   if (NOT VS_DISABLE_FATAL_WARNINGS)
     add_definitions(/WX)


Fixed plugin description.

Fixed plugin description.

--- Libs/PluginFramework/Testing/ConfigAdminTest/manifest_headers.cmake
+++ Libs/PluginFramework/Testing/ConfigAdminTest/manifest_headers.cmake
@@ -1,7 +1,7 @@
 set(Plugin-ActivationPolicy "eager")
 set(Plugin-Name "ConfigAdmin TestSuite")
 set(Plugin-Version "0.9")
-set(Plugin-Description "Test bundle for the CTK Configuration Admin specs")
+set(Plugin-Description "Test plugin for the CTK Configuration Admin specs")
 set(Plugin-Vendor "CommonTK")
 set(Plugin-DocURL "http://www.commontk.org")
 set(Plugin-ContactAddress "http://www.commontk.org")


Do not add not found library name.

Do not add not found library name.

	* build-aux/cmake/modules/DynLibDep.cmake: Do that.

--- build-aux/cmake/modules/DynLibDep.cmake
+++ build-aux/cmake/modules/DynLibDep.cmake
@@ -148,23 +148,22 @@
 	set(lib_name ${CMAKE_MATCH_1})
 	get_filename_component(lib_name_we ${lib_name} NAME_WE)

-	list(APPEND _lib_names ${lib_name})
-
 	# Try to search in programs.
 	find_program(${lib_name_we}_prog ${lib_name})
 	if(${lib_name_we}_prog)
 	  get_filename_component(lib_dir ${${lib_name_we}_prog} PATH)
+	  list(APPEND _lib_names ${lib_name})
 	  list(APPEND _lib_dirs ${lib_dir})
 	else(${lib_name_we}_prog)
 	  # Try to search in libraries.
 	  find_library(${lib_name_we}_lib ${lib_name})
 	  if(${lib_name_we}_lib)
 	    get_filename_component(lib_dir ${${lib_name_we}_lib} PATH)
+	    list(APPEND _lib_names ${lib_name})
 	    list(APPEND _lib_dirs ${lib_dir})
 	  else(${lib_name_we}_lib)
 	    # Failed to find the library.
 	    dldep_info("cannot find '${lib_name}'")
-	    list(APPEND _lib_dirs "")
 	  endif(${lib_name_we}_lib)
 	endif(${lib_name_we}_prog)


cmake: Enable creation of the compile command database by default.

--- cmake/Modules/DefineCMakeDefaults.cmake
+++ cmake/Modules/DefineCMakeDefaults.cmake
@@ -25,3 +25,6 @@
       "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
   )
 endif (NOT CMAKE_BUILD_TYPE)
+
+# Create the compile command database for clang by default
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)


cmake: fix handling of INF_ENGINE_RELEASE

- default value should be handled earlier

--- cmake/OpenCVDetectInferenceEngine.cmake
+++ cmake/OpenCVDetectInferenceEngine.cmake
@@ -105,6 +105,20 @@
   message(STATUS "Detected InferenceEngine: cmake package (${InferenceEngine_VERSION})")
 endif()

+if(DEFINED InferenceEngine_VERSION)
+  message(STATUS "InferenceEngine: ${InferenceEngine_VERSION}")
+  if(NOT INF_ENGINE_RELEASE AND NOT (InferenceEngine_VERSION VERSION_LESS "2021.4"))
+    math(EXPR INF_ENGINE_RELEASE_INIT "${InferenceEngine_VERSION_MAJOR} * 1000000 + ${InferenceEngine_VERSION_MINOR} * 10000 + ${InferenceEngine_VERSION_PATCH} * 100")
+  endif()
+endif()
+if(NOT INF_ENGINE_RELEASE AND NOT INF_ENGINE_RELEASE_INIT)
+  message(STATUS "WARNING: InferenceEngine version has not been set, 2021.4.1 will be used by default. Set INF_ENGINE_RELEASE variable if you experience build errors.")
+  set(INF_ENGINE_RELEASE_INIT "2021040100")
+elseif(DEFINED INF_ENGINE_RELEASE)
+  set(INF_ENGINE_RELEASE_INIT "${INF_ENGINE_RELEASE}")
+endif()
+set(INF_ENGINE_RELEASE "${INF_ENGINE_RELEASE_INIT}" CACHE STRING "Force IE version, should be in form YYYYAABBCC (e.g. 2020.1.0.2 -> 2020010002)")
+
 if(NOT INF_ENGINE_TARGET AND INF_ENGINE_LIB_DIRS AND INF_ENGINE_INCLUDE_DIRS)
   find_path(ie_custom_inc "inference_engine.hpp" PATHS "${INF_ENGINE_INCLUDE_DIRS}" NO_DEFAULT_PATH)
   if(CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -140,19 +154,6 @@
 # Add more features to the target

 if(INF_ENGINE_TARGET)
-  if(DEFINED InferenceEngine_VERSION)
-    message(STATUS "InferenceEngine: ${InferenceEngine_VERSION}")
-    if(NOT INF_ENGINE_RELEASE AND NOT (InferenceEngine_VERSION VERSION_LESS "2021.4"))
-      math(EXPR INF_ENGINE_RELEASE_INIT "${InferenceEngine_VERSION_MAJOR} * 1000000 + ${InferenceEngine_VERSION_MINOR} * 10000 + ${InferenceEngine_VERSION_PATCH} * 100")
-    endif()
-  endif()
-  if(NOT INF_ENGINE_RELEASE AND NOT INF_ENGINE_RELEASE_INIT)
-    message(WARNING "InferenceEngine version has not been set, 2021.4.1 will be used by default. Set INF_ENGINE_RELEASE variable if you experience build errors.")
-    set(INF_ENGINE_RELEASE_INIT "2021040100")
-  elseif(DEFINED INF_ENGINE_RELEASE)
-    set(INF_ENGINE_RELEASE_INIT "${INF_ENGINE_RELEASE}")
-  endif()
-  set(INF_ENGINE_RELEASE "${INF_ENGINE_RELEASE_INIT}" CACHE STRING "Force IE version, should be in form YYYYAABBCC (e.g. 2020.1.0.2 -> 2020010002)")
   set_target_properties(${INF_ENGINE_TARGET} PROPERTIES
       INTERFACE_COMPILE_DEFINITIONS "HAVE_INF_ENGINE=1;INF_ENGINE_RELEASE=${INF_ENGINE_RELEASE}"
   )


Enable also SSE math for GCC when SSE instructions are enabled.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -219,13 +219,13 @@
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
             if (ENABLE_SSE)
                 if (NOT WIN32)
-                    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse")
-                    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse")
+                    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -mfpmath=sse")
+                    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -mfpmath=sse")
                 else ()
                     message (STATUS "Using SSE2 instead of SSE because SSE fails on some Windows ports of GCC")
                     message (STATUS "Disable SSE with the CMake option -DENABLE_SSE=0 if this is not desired")
-                    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
-                    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
+                    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")
+                    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
                 endif ()
             endif ()
         endif ()


add comments to FindQIRC.cmake

add comments to FindQIRC.cmake

--- FindQIRC.cmake
+++ FindQIRC.cmake
@@ -2,6 +2,8 @@
   set(QIRC_FIND_QUIETLY TRUE)
 endif(QIRC_INCLUDE_DIR)

+#
+# Look for QIRC headers
 find_path(QIRC_INCLUDE_DIR QIRC/connection.h
   PATHS
   "$ENV{QIRC}/include"
@@ -10,6 +12,8 @@
   /usr/include
 )

+#
+# Look for the actual library
 find_library(QIRC_LIBRARIES QIRC
   PATHS
   "$ENV{QIRC}/lib"


fix typo in FindQIRC.cmake

fix typo in FindQIRC.cmake

--- FindQIRC.cmake
+++ FindQIRC.cmake
@@ -10,7 +10,7 @@
   /usr/include
 )

-find_libraries(QIRC_LIBRARIES QIRC
+find_library(QIRC_LIBRARIES QIRC
   PATHS
   "$ENV{QIRC}/lib"
   /usr/local/lib


ENH (#1656): Adding POCO include dirs for the test drivers

--- Utilities/openCherry/CMake/TestingHelpers.cmake
+++ Utilities/openCherry/CMake/TestingHelpers.cmake
@@ -12,6 +12,7 @@
   STRING(REPLACE . _ plugin_target ${plugin_name})

   INCLUDE_DIRECTORIES(${OPENCHERRY_BASE_DIR}/Testing)
+  INCLUDE_DIRECTORIES(${Poco_INCLUDE_DIRS})

   #
   # Create the TestDriver binary which contains all the tests.


fixed conflict about wkdoc dir

fixed conflict about wkdoc dir

--- WkDoc.cmake
+++ WkDoc.cmake
@@ -43,6 +43,9 @@
 FIND_PACKAGE(Doxygen)

 IF (DOXYGEN_FOUND)
+  option (${PROJECT_NAME}_CODE_DOC "Enable Code Documentation" OFF)
+  IF ( ${PROJECT_NAME}_CODE_DOC )
+
 	if ( NOT DEFINED Project_DOC_DIR )
 		WkDocDir("doc")
 	else()
@@ -87,6 +90,7 @@
   #forcing doc generation whenever main target is being built
   #add_dependencies( ${PROJECT_NAME}  ${PROJECT_NAME}_doc )

+  ENDIF ( ${PROJECT_NAME}_CODE_DOC )
 ENDIF(DOXYGEN_FOUND)

 endmacro( WKDoc )


load CONFIG_EXTRAS before exported information

--- ament_cmake_core/cmake/core/ament_package.cmake
+++ ament_cmake_core/cmake/core/ament_package.cmake
@@ -72,7 +72,7 @@

   # expand and install config extras
   set(PACKAGE_CONFIG_EXTRA_FILES "")
-  foreach(extra ${${PROJECT_NAME}_CONFIG_EXTRAS} ${PACKAGE_CONFIG_EXTRAS})
+  foreach(extra ${PACKAGE_CONFIG_EXTRAS} ${${PROJECT_NAME}_CONFIG_EXTRAS})
     assert_file_exists("${extra}"
       "ament_package() called with extra file '${extra}' which does not exist")
     stamp("${extra}")


removed println

removed println

--- cmake/FindCPU_FEATURES.cmake
+++ cmake/FindCPU_FEATURES.cmake
@@ -252,7 +252,7 @@

   OFA_AutodetectHostArchitecture()
   OFA_HandleX86Options()
-  message("++ _available_vector_units_list = ${_available_vector_units_list}")
+

   list(FIND _available_vector_units_list "sse" SSE_INDEX)
   list(FIND _available_vector_units_list "sse2" SSE2_INDEX)
@@ -296,7 +296,7 @@
   set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host")
   set(AVX_FOUND false CACHE BOOL "AVX available on host")
   set(AVX2_FOUND false CACHE BOOL "AVX2 available on host")
-
+
 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")

 message(STATUS "found hardware: ${CPU_VENDOR} ${CPU_MODEL_NAME}")


CMake pkg_check_modules sets GLEW_INCLUDEDIR

not GLEW_INCLUDE_DIR

--- cmake/Modules/FindGLEW.cmake
+++ cmake/Modules/FindGLEW.cmake
@@ -52,6 +52,7 @@
     find_package(PkgConfig)
     pkg_check_modules(GLEW glew)
     SET(GLEW_GLEW_LIBRARY ${GLEW_LIBRARIES} CACHE STRING "GLEW library for OSX")
+    SET(GLEW_INCLUDE_DIR ${GLEW_INCLUDEDIR} CACHE STRING "GLEW include dir for OSX")
   endif (${CMAKE_SYSTEM_VERSION} VERSION_LESS "13.0.0")
     SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
   ELSE (APPLE)


Update OpenCVDetectCUDA.cmake

Update OpenCVDetectCUDA.cmake

Add check for CUDA version >= 7.0 (currently in RC1), which drops support for arches 1.x.

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -85,6 +85,8 @@
     else()
       if(${CUDA_VERSION} VERSION_LESS "5.0")
         set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
+      elseif(${CUDA_VERSION} VERSION_GREATER "6.5")
+        set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5")
       else()
         set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5")
       endif()


Fixed cucumber-testing.cmake script (used to setup acceptance test with cucumber) so that it sets a cost for the steprunner & cucumber-runner. This guarantees that the steprunner always is started (& waits) for the cucumber-runner.

--- cmake/cucumber-testing.cmake
+++ cmake/cucumber-testing.cmake
@@ -1,4 +1,11 @@
 find_program(CUCUMBER cucumber)
+
+# Tests are run in descending order (higher cost first)
+# We use this to make sure steprunner is started before cucumber-feature when run in parallel
+# (steprunner blocks & waits for cucumber-feature to send steps to execute)
+if(NOT TEST_COST)
+    set(TEST_COST "100000000")
+endif()

 if(NOT CUCUMBER)
     message("TESTING - Cucumber not found, skipping acceptance tests.")
@@ -44,18 +51,37 @@
         NAME ${FEATURE_NAME}_steprunner
         COMMAND ${FEATURE_NAME}
     )
-    set_tests_properties( ${FEATURE_NAME}_steprunner PROPERTIES LABELS "acceptance")
-    set_tests_properties( ${FEATURE_NAME}_steprunner
-        PROPERTIES
-            TIMEOUT 10
-            PARALLEL_LEVEL 2
-            PROCESSORS 2
-    )
+    decrement_cost_and_set_for_test( TEST ${FEATURE_NAME}_steprunner )
+
     add_test(
         NAME ${FEATURE_NAME}
         COMMAND ${CUCUMBER} "${CMAKE_CURRENT_SOURCE_DIR}/${arg_FEATURE}"
         WORKING_DIRECTORY ${arg_FEATURES_ROOT}
     )
-    set_tests_properties( ${FEATURE_NAME} PROPERTIES LABELS "acceptance")
+    decrement_cost_and_set_for_test( TEST ${FEATURE_NAME} )
+
+    # Shared settings
+    set_tests_properties( ${FEATURE_NAME} ${FEATURE_NAME}_steprunner
+        PROPERTIES
+            TIMEOUT 10
+            PARALLEL_LEVEL 2
+            PROCESSORS 1
+            LABELS "acceptance"
+    )

-endfunction()+endfunction()
+
+function(decrement_cost_and_set_for_test)
+    set(oneValueArgs
+        TEST
+    )
+    cmake_parse_arguments(arg "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+    math(EXPR TEST_COST "${TEST_COST}-1")
+    set(TEST_COST ${TEST_COST} PARENT_SCOPE)
+
+    set_tests_properties( ${arg_TEST}
+        PROPERTIES
+            COST ${TEST_COST}
+    )
+
+endfunction()


[build] remove support for embedding bitcode in host libraries (#32730)

We are more interested in generating bitcode for the standard library.

Addresses rdar://64952135

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -505,24 +505,6 @@
   endif()

   if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
-    # Include LLVM Bitcode slices for iOS, Watch OS, and Apple TV OS device libraries.
-    if(SWIFT_EMBED_BITCODE_SECTION)
-      target_compile_options(${name} PRIVATE
-        -fembed-bitcode)
-      target_link_options(${name} PRIVATE
-        "LINKER:-bitcode_bundle"
-        "LINKER:-lto_library,${LLVM_LIBRARY_DIR}/libLTO.dylib")
-
-      # Please note that using a generator expression to fit this in a single
-      # target_link_options does not work (at least in CMake 3.15 and 3.16),
-      # since that seems not to allow the LINKER: prefix to be evaluated (i.e.
-      # it will be added as-is to the linker parameters)
-      if(SWIFT_EMBED_BITCODE_SECTION_HIDE_SYMBOLS)
-        target_link_options(${name} PRIVATE
-          "LINKER:-bitcode_hide_symbols")
-      endif()
-    endif()
-
     target_link_options(${name} PRIVATE
       "LINKER:-compatibility_version,1")
     if(SWIFT_COMPILER_VERSION)


[build] set linker parameters in a single way (#30339)

After noticing that also in CMake 3.16 the LINKER: prefix is not
expanded correctly when used in `target_link_options`, prefer to set the
linker parameters in a more verbose way and leave a comment behind on
when this behavior was observed in case we want to change the
implementation later.

Follow up to #29636.
Addresses rdar://problem/59732421

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -732,26 +732,18 @@
     # Include LLVM Bitcode slices for iOS, Watch OS, and Apple TV OS device libraries.
     if(SWIFT_EMBED_BITCODE_SECTION)
       if(${SWIFT_HOST_VARIANT_SDK} MATCHES "(I|TV|WATCH)OS")
-        # The two branches of this if statement accomplish the same end result
-        # We are simply accounting for the fact that on CMake < 3.16
-        # using a generator expression to
-        # specify a LINKER: argument does not work,
+        target_link_options(${target} PRIVATE
+          "LINKER:-bitcode_bundle"
+          "LINKER:-lto_library,${LLVM_LIBRARY_DIR}/libLTO.dylib")
+
+        # Please note that using a generator expression to fit
+        # this in a single target_link_options does not work
+        # (at least in CMake 3.15 and 3.16),
         # since that seems not to allow the LINKER: prefix to be
         # evaluated (i.e. it will be added as-is to the linker parameters)
-        if(CMAKE_VERSION VERSION_LESS 3.16)
+        if(SWIFT_EMBED_BITCODE_SECTION_HIDE_SYMBOLS)
           target_link_options(${target} PRIVATE
-            "LINKER:-bitcode_bundle"
-            "LINKER:-lto_library,${LLVM_LIBRARY_DIR}/libLTO.dylib")
-
-          if(SWIFT_EMBED_BITCODE_SECTION_HIDE_SYMBOLS)
-            target_link_options(${target} PRIVATE
-              "LINKER:-bitcode_hide_symbols")
-          endif()
-        else()
-          target_link_options(${target} PRIVATE
-            "LINKER:-bitcode_bundle"
-            $<$<BOOL:SWIFT_EMBED_BITCODE_SECTION_HIDE_SYMBOLS>:"LINKER:-bitcode_hide_symbols">
-            "LINKER:-lto_library,${LLVM_LIBRARY_DIR}/libLTO.dylib")
+            "LINKER:-bitcode_hide_symbols")
         endif()
       endif()
     endif()


CMake: set release optimizations

CMake: set release optimizations

--- cmake/profiles/release.cmake
+++ cmake/profiles/release.cmake
@@ -7,6 +7,7 @@
     list(APPEND c_compile_options
         "-c"
         "-std=gnu11"
+        "-Os"
     )
     target_compile_options(mbed-os
         PUBLIC
@@ -18,6 +19,7 @@
         "-std=gnu++14"
         "-fno-rtti"
         "-Wvla"
+        "-Os"
     )
     target_compile_options(mbed-os
         PUBLIC
@@ -48,6 +50,7 @@
 elseif(MBED_TOOLCHAIN STREQUAL "ARM")
     list(APPEND c_compile_options
         "-std=gnu11"
+        "-Oz"
     )
     target_compile_options(mbed-os
         PUBLIC
@@ -58,6 +61,7 @@
         "-std=gnu++14"
         "-fno-rtti"
         "-fno-c++-static-destructors"
+        "-Oz"
     )
     target_compile_options(mbed-os
         PUBLIC


CMake: Added a warning about doxygen always running on Visual Studio

--- tools/doxygen/doxygen.cmake
+++ tools/doxygen/doxygen.cmake
@@ -29,6 +29,13 @@

 if(${MSVC})
     option(IVW_DOXYGEN_PROJECT "Create Inviwo doxygen files" OFF)
+    if(${IVW_DOXYGEN_PROJECT})
+        ivw_message(STATUS
+            "In Visual Studio the doxygen project will rerun every time you run\n"
+            "\"ALL_BUILD\" even if it is up to date. Hence, you propbably only\n"
+            "want to enable \"IVW_DOXYGEN_PROJECT\" once to generate the\n"
+            "documentation and then then disable it.")
+    endif()
 else()
     option(IVW_DOXYGEN_PROJECT "Create Inviwo doxygen files" ON)
 endif()


[CMake]: only warn when the working directory in a git worktree (#7562)

Signed-off-by: Rudi Heitbaum <1f53d03209ef868737b2f546e002198b2b4875ac@heitbaum.com>

Signed-off-by: Rudi Heitbaum <1f53d03209ef868737b2f546e002198b2b4875ac@heitbaum.com>
Co-authored-by: Derek Bailey <fba4b034b859aae28ee22dc46404a75392e00155@google.com>

--- CMake/Version.cmake
+++ CMake/Version.cmake
@@ -3,35 +3,37 @@
 set(VERSION_PATCH 26)
 set(VERSION_COMMIT 0)

-find_program(GIT git)
-if(GIT AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
-  execute_process(
+if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
+  find_program(GIT git)
+  if(GIT)
+    execute_process(
       COMMAND ${GIT} describe --tags
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       OUTPUT_VARIABLE GIT_DESCRIBE_DIRTY
       OUTPUT_STRIP_TRAILING_WHITESPACE
       RESULT_VARIABLE GIT_DESCRIBE_RESULT
-  )
+    )

-  if(GIT_DESCRIBE_RESULT EQUAL 0)
-    # Test if the most recent Git tag matches the pattern "v<major>.<minor>.<patch>*"
-    if(GIT_DESCRIBE_DIRTY MATCHES "^v[0-9]+\\.[0-9]+\\.[0-9]+.*")
-      string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_DESCRIBE_DIRTY}")
-      string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_DESCRIBE_DIRTY}")
-      string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GIT_DESCRIBE_DIRTY}")
-      string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+).*" "\\1" VERSION_COMMIT "${GIT_DESCRIBE_DIRTY}")
-      # If the tag points to the commit, then only the tag is shown in "git describe"
-      if(VERSION_COMMIT STREQUAL GIT_DESCRIBE_DIRTY)
-        set(VERSION_COMMIT 0)
+    if(GIT_DESCRIBE_RESULT EQUAL 0)
+      # Test if the most recent Git tag matches the pattern "v<major>.<minor>.<patch>*"
+      if(GIT_DESCRIBE_DIRTY MATCHES "^v[0-9]+\\.[0-9]+\\.[0-9]+.*")
+        string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GIT_DESCRIBE_DIRTY}")
+        string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GIT_DESCRIBE_DIRTY}")
+        string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GIT_DESCRIBE_DIRTY}")
+        string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+\\-([0-9]+).*" "\\1" VERSION_COMMIT "${GIT_DESCRIBE_DIRTY}")
+        # If the tag points to the commit, then only the tag is shown in "git describe"
+        if(VERSION_COMMIT STREQUAL GIT_DESCRIBE_DIRTY)
+          set(VERSION_COMMIT 0)
+        endif()
+      else()
+        message(WARNING "\"${GIT_DESCRIBE_DIRTY}\" does not match pattern v<major>.<minor>.<patch>-<commit>")
       endif()
     else()
-      message(WARNING "\"${GIT_DESCRIBE_DIRTY}\" does not match pattern v<major>.<minor>.<patch>-<commit>")
+      message(WARNING "git describe failed with exit code: ${GIT_DESCRIBE_RESULT}")
     endif()
   else()
-    message(WARNING "git describe failed with exit code: ${GIT_DESCRIBE_RESULT}")
+    message(WARNING "git is not found")
   endif()
-else()
-  message(WARNING "git is not found")
 endif()

 message(STATUS "Proceeding with version: ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_COMMIT}")


Work.

Work.

--- mod_cmake/ModularDeps.cmake
+++ mod_cmake/ModularDeps.cmake
@@ -4,14 +4,9 @@

 find_package(Git REQUIRED)

-# The global dependency list.
-set(DEPENDENCY_LIST)
-
 function(add_dependency DEP_NAME DEP_REPO)
-  # Determine if the dependency has already been added.
-  set(DEP_INDEX)
-  list(FIND DEPENDENCY_LIST "${DEP_NAME}" DEP_INDEX)
-  if(DEP_INDEX GREATER -1)
+  # Determine if the dependency has already been satisfied.
+  if(${DEP_NAME}_DEP_SATISFIED)
     message(STATUS "The dependency '${DEP_NAME}' is already satisfied.")
     return()
   endif()
@@ -41,13 +36,11 @@
     message(STATUS "'${DEP_NAME}' was successfully cloned.")
   endif()

-  # Add the dependency to the global dependency list.
-  # NOTE: we cannot use list(APPEND) here because DEPENDENCY_LIST is a global variable,
-  # and in order to access it we need to use the PARENT_SCOPE option of the set() command.
-  set(DEPENDENCY_LIST ${DEPENDENCY_LIST} "${DEP_NAME}" PARENT_SCOPE)
-
   # Add the subdirectory of the dependency.
   add_subdirectory("${PROJECT_SOURCE_DIR}/deps/${DEP_NAME}")
+
+  # Mark the dependency as satisfied.
+  set(${DEP_NAME}_DEP_SATISFIED YES PARENT_SCOPE)
 endfunction()

 # Mark as included.


Use llvm 14 and gcc 12 on Darwin.

Use llvm 14 and gcc 12 on Darwin.

--- default_build_settings.cmake
+++ default_build_settings.cmake
@@ -64,7 +64,7 @@

 function(setup_vespa_default_build_settings_darwin)
   message("-- Setting up default build settings for darwin")
-  set(DEFAULT_VESPA_LLVM_VERSION "13" PARENT_SCOPE)
+  set(DEFAULT_VESPA_LLVM_VERSION "14" PARENT_SCOPE)
   set(DEFAULT_CMAKE_PREFIX_PATH "${VESPA_DEPS}" "/usr/local/opt/bison" "/usr/local/opt/flex" "/usr/local/opt/openssl@1.1" "/usr/local/opt/openblas" "/usr/local/opt/icu4c" PARENT_SCOPE)
   set(DEFAULT_EXTRA_LINK_DIRECTORY "${VESPA_DEPS}/lib" "/usr/local/opt/bison/lib" "/usr/local/opt/flex/lib" "/usr/local/opt/icu4c/lib" "/usr/local/opt/openssl@1.1/lib" "/usr/local/opt/openblas/lib")
   list(APPEND DEFAULT_EXTRA_LINK_DIRECTORY "/usr/local/lib")
@@ -351,8 +351,8 @@
   unset(DEFAULT_CMAKE_CXX_COMPILER)
   if(NOT DEFINED VESPA_COMPILER_VARIANT OR VESPA_COMPILER_VARIANT STREQUAL "gcc")
     if(APPLE)
-      set(DEFAULT_CMAKE_C_COMPILER "/usr/local/bin/gcc-11")
-      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/local/bin/g++-11")
+      set(DEFAULT_CMAKE_C_COMPILER "/usr/local/bin/gcc-12")
+      set(DEFAULT_CMAKE_CXX_COMPILER "/usr/local/bin/g++-12")
     elseif(VESPA_OS_DISTRO_COMBINED STREQUAL "amzn 2")
       set(DEFAULT_CMAKE_C_COMPILER "/usr/bin/gcc10-gcc")
       set(DEFAULT_CMAKE_CXX_COMPILER "/usr/bin/gcc10-g++")


package: add a "test" which builds a package

--- superbuild/tests/tests.cmake
+++ superbuild/tests/tests.cmake
@@ -41,6 +41,14 @@
          COMMAND "${PV_NIGHTLY_PVBATCH}"
                  "${CMAKE_CURRENT_SOURCE_DIR}/basic_python.py")
 set_tests_properties(Test-pvbatch PROPERTIES LABELS "PARAVIEW")
+
+if (RGG_BUILD_PACKAGE)
+  add_test(NAME package
+           COMMAND "${CMAKE_COMMAND}"
+                   "--build" "${CMAKE_BINARY_DIR}"
+                   "--target" "package"
+                   "--config" "$<CONFIGURATION>")
+endif ()

 if (PARAVIEW_DATA_ROOT)
   # Test to load various data files to ensure reader support.


Corrected bootloader address

Corrected bootloader address

--- targets/avr/bootloader.cmake
+++ targets/avr/bootloader.cmake
@@ -9,7 +9,7 @@
 configure_file ( ${MCODE_TOP}/mcode-config.h.in ${PROJECT_BINARY_DIR}/include/mcode-config.h )

 add_executable( bootloader ${BL_SRC_LIST} )
-target_link_libraries ( bootloader "-mmcu=atmega32 -Ttext=0x3800 -nostartfiles -nodefaultlibs" )
+target_link_libraries ( bootloader "-mmcu=atmega32 -Ttext=0x7000 -nostartfiles -nodefaultlibs" )

 add_custom_command (
   TARGET bootloader